[antlr-interest] Fig: a generic config file reader
Terence Parr
parrt at cs.usfca.edu
Mon Jun 18 22:00:01 PDT 2007
Hi,
For my talk tomorrow, I built a simple example that I will go over:
http://www.antlr.org/wiki/display/ANTLR3/Fig+-+Generic+configuration
+language+interpreter
Intro:
Many applications need configuration files. In the old days people
built their own syntax and parser. Then people tried to use simple
property files with Java. Now people use XML for everything, but XML
is a horrible Human interface (see "Humans should not have to grok
XML"); XML is fine for data if you don't mind the verboseness. This
article describes Fig, a little config file reader that I made for my
talk at the Sydney Java users group June 20, 2007. The basic goal is
to allow an application to include the fig.jar and then use the Fig
parser to suck in files, the result of which is a list of objects.
Fig supports strings, ints, lists, and references to other
configuration objects. Fig uses reflection to create instances and
call setters or set fields directly (if no setter exists).
Ter
More information about the antlr-interest
mailing list