[antlr-interest] How to create a data entry GUI corresponding to a grammar

aryoo howaryoo at gmail.com
Tue Aug 31 13:22:41 PDT 2010


Hello,

I would like to create a GUI to help/guide users type in data according to a
grammar.
This GUI could be a tree/graph widget in which the nodes can only take
certain values according to the corresponding rule in the grammar.

More specifically, when the user wants to create a new tree/graph, he needs
to create the root and can only provide the starting rule. Once the root
node is created the user can provide it's children etc, etc.

I did some tinkering in Python with a tree grammar that outputs an AST. If I
run the parser on some sample input, I do get a nice tree of type:
antlr3.tree.CommonTree whose children and node type are available from the
root.

There must be a nicer way to do this without having to provide some input to
the parser.

Any ideas, recommendations or remarks would be greatly appreciated.

Regards,
Arye.


More information about the antlr-interest mailing list