[antlr-interest] Newbe questions

Pander pander at users.sourceforge.net
Tue Mar 13 09:27:59 PDT 2012


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
discussion.

1) How can I convert this grammar (preferably back and forth) to EBNF so
I can use http://railroad.my28msec.com/rr/ui ?

2) How can I do tests on the command-line with e.g. the following data?

asdfetasdf;asdf<et|n>asdf
aasdf;-2-;aasdf
asdfasdf;asdf=asdf
asdfqwer;asdf·qwer;asd==fqwer

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.

Thanks,

Pander


More information about the antlr-interest mailing list