> -----Original Message----- > From: [email protected] [mailto:antlr-interest- > [email protected]] On Behalf Of Michael Siff > Sent: Wednesday, February 10, 2010 12:25 PM > To: [email protected] > Subject: Re: [antlr-interest] Lexing nested comments > > Jim, first of all, thank you very much for the prompt reply. What you > sent seems to do the trick quite nicely. I had tried listing BOOL > first, > but, for whatever reason, NESTED still seems to take precedence. > > You are right, the source language in question is not something I would > recommend programming in. What I sent was a simplification of a > pedagogical language I have designed call php-- that is essentially a > subset (and much less powerful subset at that) of PHP. The idea is to > add explicit types to an implicitly typed language and still let the > explicitly typed version sneak through the original language's parser > (so to have the new language remain essentially a subset). This way > students can try out simple php-- programs using command-line php. (The > same idea can be applied to most any language that has multiline > comments.) Of course, the nested comment ability is not strictly > necessary - but as a pedagogical language it demonstrates to > introductory compilers students some of the lexical-analysis challenges > that compiler writers have historically faced.
Ah OK - I see the point of it now :-) Jim List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
