[antlr-interest] translations wanted?
paul taney
paultaney at yahoo.com
Tue Sep 9 09:43:31 PDT 2003
--- Pete Forman <pete.forman at westerngeco.com> wrote:
> At 2003-09-08 08:31 -0700, mzukowski at yci.com wrote:
> >I think it would be more fun to do a Python grammar
> though :)
>
> So that we could write an emitter that puts in
> braces? ;-)
Now Pete,
You know that's nothing that ten or eleven chars
of perl can't fix. You just need a preprocessor,
here it is:
perl -pe 'y/{}/: /'
as in:
$ cat >tmp
i = 2
while i {
print "Redundancy is good."
i -= 1
}
$ perl -pe 'y/{}/: /' tmp | python
Redundancy is good.
Redundancy is good.
To brace or indent, that is the question.
No. You can have both.
paul
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list