Documentation for vislcg3
vislcg3 is the next parser generation from Odense. As its predecessor, vislcg, it is open source and available from SourceForge.
We still have not started using vislcg3, and the documentation is still sketchy.
Installation
Commands to update the vislcg3 program.
This supposes vislcg3 is downloaded to /usr/local/vislcg3/
Do the following commands:
- cd /usr/local/vislcg3/trunk/
- svn update
- ./compile-mac.sh
- ./test/runall.pl
Usage
There is a file sme-3dis.rle parallel to the usual sme-dis.rle, they are manually kept in sync during a transition period. It can be run with the same basic command as vislcg (... | vislcg3 --grammar=disfile | ...), but the format of the flags is different.
Flags
The list of flags can be obtained by vislcg3 --help. That command prints something like this:
VISL CG-3 Disambiguator version 0.8.0. Usage: vislcg3 [OPTIONS] [FILES] Options: -h or -? or --help Displays this list. -V or --version Prints version number. -g or --grammar Specifies the grammar file to use for disambiguation. -p or --vislcg-compat Tells the grammar compiler to be compatible with older VISLCG syntax. --grammar-out Writes the compiled grammar back out in textual form to a file. --grammar-bin Writes the compiled grammar back out in binary form to a file. --grammar-info Writes the compiled grammar back out in textual form to a file, with lots of statistics and information. --grammar-only Compiles the grammar only. --check-only Compiles the grammar only. --trace Prints debug output alongside with normal output. --prefix Sets the prefix for mapping. Defaults to @. --reorder Rearranges rules so SELECTs are run first. --single-run Only runs each section once. --no-mappings Disables running any MAP, ADD, or REPLACE rules. --no-corrections Disables running any SUBSTITUTE or APPEND rules. -O or --stdout A file to print out to instead of stdout. -I or --stdin A file to read input from instead of stdin. -E or --stderr A file to print errors to instead of stderr. -C or --codepage-all The codepage to use for grammar, input, and output streams. Defaults to ISO-8859-1. --codepage-grammar Codepage to use for grammar. Overwrites --codepage-all. --codepage-input Codepage to use for input. Overwrites --codepage-all. --codepage-output Codepage to use for output. Overwrites --codepage-all. -L or --locale-all The locale to use for grammar, input, and output streams. Defaults to en_US_POSIX. --locale-grammar Locale to use for grammar. Overwrites --locale-all. --locale-input Locale to use for input. Overwrites --locale-all. --locale-output Locale to use for output. Overwrites --locale-all.


