Why aren't colons optional?
nhodgson at bigpond.net.au
Mon Jan 21 00:21:13 CET 2002
> I like ANTLR, too. I was just curious how it was your were going
> to go about creating context-dependency. This isn't impossible in
> limited cases where you remove certain types from consideration in
> segments of the parse tree, but it does introduce complexities into
> parsing that some parser authors would rather avoid, wouldn't you
> say? Or am I going down the wrong track here?
Some people like to have everything in the grammar specification but I'm
more inclined to do the stuff that is clear and easy in the lexical rules
and grammar and then perform extra processing on the tree later. Currently
important languages such as C++ and Perl can't be described completely by
the grammar specifications possible with available tools, so post-processing
is often needed.
> I'll consider that possibly I am, as I haven't really considered
> what grammatical constructs we're really selecting between in any
I haven't considered it closely either - you can regard my posts as hand
waving if you like ;-)
More information about the Python-list