[antlr-interest] "Language design patterns" book available in beta

Steve Cooper steve at stevecooper.org
Sat Jun 6 02:33:20 PDT 2009


2009/6/6 Terence Parr <parrt at cs.usfca.edu>:
> Hi. Isn't it annoying though to get a description of something (say in
> a printed book) and then have to go to the machine to read along in
> the code?

I like the approach you've taken with the java pseudocode;

    public Token nextToken() {
        while ( «lookahead-char»!=EOF ) {
            if ( «comment-start-sequence» ) { COMMENT(); continue; }

If you can shorten the code by including this kind of thing, I think
that works very well.


More information about the antlr-interest mailing list