[antlr-interest] Re: Python support for ANTLR
whaefelinger
ora.et.labora at web.de
Wed Nov 3 06:33:49 PST 2004
Hi,
I'm also about to write a code generator for Python and indeed
indendation levels, empty statements etc are causing some head-
aches.
I solved the indendation problem by just doing something like
int _tabs_ = tabs;
JavaBlockFinishingInfo howToFinish = genCommonBlock(blk, true);
genBlockFinish(howToFinish, throwNoViable);
tabs = _tabs_;
In other words, I just reset the level to was it was before
generating the (nested) alternatives.
Worked fine for me
--- In antlr-interest at yahoogroups.com, "marqkole" <marq.kole at p...>
wrote:
> The problems I have currently are in the
examples/python/lexertester
> directory. There are a few simple tests here, but the generated
code will give errors due to incorrect indentation.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list