| LLOOP Index | GSP Language | GSP Library | Framework Classes | Component Classes |
LLOOP provides a library of standard gsp specifications which gather the following useful symbols, tokens and pre-processors:
| Standard symbols | System symbols | Special symbols | Wild symbols | C-language symbols | ISO symbols | Pre-processors |
| bool char double id int nil quote quoteorstring string text word | file fileunix filewindows image urlfile | ctrl | any byte block line | double int quote comment_c comment_cpp | ISO_639 | backslashnewline c_comment cplusplus_comment dos_comment define ini_comment shell_comment |
This defines the following boolean types:
- 2-states boolean: reads 'yes' or 'no'
- 3-states boolean (phi-boolean): 'yes', 'no', 'unknown'
Reads a char. Preceding whitespaces are eaten as usual.
Reads a "double" C type (including overflow check).
Reads a sequence of alphanumeric letters, underscores, colons, dots.
Reads a "long" C type (including overflow check).
NO-OP symbol. Does nothing.
Reads any sequence of chars enclosed by double or simple quote chars. Escape chars are supported.
Reads either a quote token or a string token.
Reads any sequence of printable chars (between 0x20 (' ') and 0x7E ('~')), except space chars.
Reads any sequence of printable chars (between 0x20 (' ') and 0x7E ('~')).
Reads a sequence of letters, underscores and numeric chars starting with a letter. This token is implemented using the standard String class. The chars read from the input are appended to the final string using the appropriate methods of the inherited String class.
This defines several tokens related to files:
- file: reads a file name or path, either UNIX or Windows
- existingfile: same as file, except that the file must exist
- directory: same as file, except that the file must be a valid directory if it exists
- existingdir: same as directory, except the directory must exist and must be a directory
- forcedir: same as directory, except the directory is created if it does not exist. An error is raised if it already exists and it is not a directory.
Reads a unix file/directory name or path.
Names are separated with slash chars '/'.
Any ASCII char can be used for the names, but the first encountered white space char marks the end of the path.
Whitespaces inside file paths must be banalized using backslash chars '\', or alternatively the full path can be enclosed by quotes. Escape chars are allowed.
Reads a windows file/directory name or path. This is quite different from reading a unix path.
Names are separated with backslash chars '\' and no escape sequence is allowed.
Any printable char (0x20 to 0x7E in ASCII) except '/', ',', ':', '*', '?', '"', '<', '>' and '|' can be used for the names, but the first encountered white space char marks the end of the path. File names containing white space chars must be enclosed by double quotes.
Reads the name or the path of an existing image.
It also checks whether the file has a valid image file extension, ie. png, jpg, jpeg, gif, ppm, bmp, xpm, xbm, pbm, pcx, pgm, eps.
Raises an error when the file does not exist or when the image extension is not recognised.
Reads an URL file, ie. a Universal Resource Locator starting with file://. Platform-specific paths are accepted following the URL prefix.
Example:
file://readme.txt file:///home/myaccount/myfile.txt
Control symbols. Control symbols do not parse anything but rather act like parse control functions. There are intended to add some control over parent symbols, like whitespace enabling.
Reads any multi-line sequence of chars with an end delimiter (any constant string).
The Any token is a specialization of the BlockToken, whereby the left delimiter is forced to an empty string value.
Any byte, inclusive those standing for whitespace chars.
Reads any multi-line sequence of chars surrounded by start and end delimiters (i.e. any constant string).
All chars until next new line.
Reads a "double" C type (including overflow check).
Reads a "long" C type (including overflow check).
Reads any sequence of chars enclosed by double or simple quote chars. Escape chars are supported.
Reads a C comment.
Reads a C++ comment, ie. either a pure C comment or a one-line C++ comment.
This defines two symbols:
- ISO639_2LetterCode: ISO 639 Country 2-Letter Codes
- ISO639_3LetterCode: ISO 639 Country 3-Letter Codes
Concatenates lines separated with a banalized new line, regardless of used platform line separator (\n, \n\r...).
Pre-processes C comments. Strips the input of any C comment, but regardless of whether the comment is within quotes.
Pre-processes C++ comments (//) Strips the input of any C++ // comment, but regardless of whether the comment is within quotes.
Pre-processes MS-DOS comments (') Strips the input data of all ' comments regardless of whether the comment is within quotes. The REM notation is not supported.
Pre-processes C #define. Fulfils the same function as a C #define statement.
The static member function "add" allows to add a new define, given the define name and the replacement string
Example:
#define NAME "James" => define::add("NAME", "\"James\"");Pre-processes Windows Ini File comments.
Strips the input of all ini comments, i.e. all chars following ; till end of line.
Pre-processes shell script comments.
Strips the input of all shell comments, i.e. all chars following # till end of line.
This file is part of the LLOOP Reversible Object-Oriented Parser Generator. Copyright (c) 2005-2006 Michel MEHL, France. All rights reserved. LLOOP is distributed by the company ERSA SaRL.
| Copyright (c) 2005-2006 Michel MEHL, Haguenau, France |
| LLOOP version 1.1 |