Computing Pages

by Francesc Hervada-Sala


types add-in

This add-in module is meant to provide parsers for common text structures. It currently supports tables.

Tables

To scan a table you define once such a structure:

^ <table definition name> : table {
	^ name : string
	~ type <type of the whole table>
	~ line <type of each row>
	~ ID <column containing the row key>
	~ column <name of the first column>
	~ column <name of the second column>
	~ column ...
	~ hide <name of a column not to be output>
	~ hide ...
	~ separator <separation char between each column>
}

After that you can set up a particular table entering a row in each line separating columns with the choosen character:

~ <table definition name> <table name> [
<columns of first row>
<columns of second row>
...
]

Sample:

Suppose you have a structure such as:

^ Books {
	^ Book {
		^ Title : string
	}
}

Then you can set this definition:

^ Booklist : table {
	^ name : string
	~ type Books
	~ line Book
	~ ID ISBN
	~ column ISBN
	~ column Title
	~ hide ISBN
	~ separator ' '
}

You can now enter a book list with this lines:

~ Booklist BooksOnKant [
0820422525 Imagination and Depth in Kant's Critique of Pure Reason
3050023163 Nachforschungen zu Briefen und Handschriften Immanuel Kants
]

The parser will then generate the following text:

=BooksOnKant ~Books {
	=0820422525 ~Book {
		~Title Imagination and Depth in Kant's Critique of Pure Reason
	}
	=3050023163 ~Book {
		~Title Nachforschungen zu Briefen und Handschriften Immanuel Kants
	}
}
Print Contact

types add-in

Tables

UText/1.2 Manual

Copyright

Getting Started

Installation

Quick Tour

User Guide

Universaltext Language

Feeding Text

Alternate Parsers

Text Selectors

Output Processors

Universaltext Script

Add-In Modules

Reference: Base Modules

UText.pm

UTL.pm

Navigation.pm

Tags.pm

FILE.pm

Reference: Script

Script.pm

Functions.pm

Settings.pm

utshell.pl

Reference: Extensions

cms add-in

odt add-in

types add-in

env add-in

Reference: Predefined Operations

Operations Index

Tags

Functions

Add-In Hooks

Project Universal Text

Forerunner

UText/1

Milestones

Text Engine

Text Repository

Text Server

Text Workbench

Text OS

Design Documents

Concepts

Universal Text Language

UTL Syntax

UTL Name System

Architecture

Glossary

Discussion

On Text Structure