[antlr-interest] Newbe questions
researcher0x00 at gmail.com
Tue Mar 13 12:46:35 PDT 2012
On Tue, Mar 13, 2012 at 12:27 PM, Pander <pander at users.sourceforge.net>wrote:
> Hi all,
> I have just starting to use ANTLRWorks and it is very useful. I am
> working on a simple grammar for defining hyphenation patterns. This will
> be used to improve hyphenation support in TeX, LibreOffice, etc.
> The grammar is currently http://pastebin.com/H77JGeLF and is still under
> 1) How can I convert this grammar (preferably back and forth) to EBNF so
> I can use http://railroad.my28msec.com/rr/ui ?
The closest thing at antlr.org would be the strip tool
For any editing/changes you need to the ouptut beyond this and you are own
your own. Sorry.
> 2) How can I do tests on the command-line with e.g. the following data?
> After working on the grammar, I would like to use as much command-line
> as possible but can't figure out how to get started. The documentation
> talks about a Main.java but I do not have this. I can howver generate a
> .class and .token file.
You mention ANTLRWorks at the start, which last I checked does not accept
data inputs on the command line. Data inputs are set in a window once you
start the debugger, and can chose from entering in a text window, or
selecting a file.
If however you want to input the data using the command line without using
ANTLRWorks, then you need to write a custom driver. See:
http://www.antlr.org/wiki/display/ANTLR3/Expression+evaluator for an
Hope that helps, Eric
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
More information about the antlr-interest