[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hacking sablecc grammar




Hi,

I would like to make some changes to sablecc, particularly the grammar.
The source however does not include the grammar file which was used to
generate it's parser (It looks like there has been some modification by
hand).

What is the simplest way to change the sablecc grammar? I don't really
want to modify the lexer/nodes by hand, and I don't really want to have to
modify all the walker classes that generate the corresponding parsers
classes (the sablecc grammar in sablecc-grammars-2.0.0-src.tar.gz produces
different nodes).

I hope this makes sense...

Also, Etienne, I read in one of your previous posts, that you are opposed
to storing attribute values in the AST (instead preferring to store them
in a hashtable indexed by the node). You said it was poor style to use
attributes in nodes. Why?

Regards,

Roger.