hiya. yep, i had a similar proposal way back when for v3.0 but I abandoned; can't remember why at this point. i love idea but impl had some issues. ter On Feb 16, 2011, at 2:02 PM, Scott Stanchfield wrote:
> Has anyone looked at the context-sensitive-scanning proposal I sent a > while back? > > http://javadude.com/articles/antlr-context-sensitive-scanner.html > > -- Scott > > ---------------------------------------- > Scott Stanchfield > http://javadude.com > > > > On Wed, Feb 16, 2011 at 4:38 PM, Jim Idle <[email protected]> wrote: >> No you do this in the parser by allowing the keywords where ID is expected >> then by predicating the WHERE keyword in the LINQ rules: >> >> >> .... ((WHERE)=>where_clause)? .... >> >> >> id : ID | WHERE | .... >> >> >> I have fully working C# lexer, parser, tree walker if that is what you are >> trying to build. It is a commercial product though. >> >> Jim >> >>> -----Original Message----- >>> From: [email protected] [mailto:antlr-interest- >>> [email protected]] On Behalf Of chris king >>> Sent: Wednesday, February 16, 2011 1:32 PM >>> To: [email protected] >>> Subject: [antlr-interest] Context Sensitive Keyword Support? >>> >>> Does ANTLR support context sensitive keywords? For example, in C# >>> "where" is a keyword only in a LINQ expression. To support this ANTLR >>> would need to change the lexer behavior given feedback from the parser >>> letting it know what context it is in. From what I hear ANTLR lexes the >>> entire file before passing it onto the parser. If that's true than I >>> guess it doesn't support this language concept. In that case, is there >>> a way to work around? >>> >>> Thanks, >>> Chris >>> >>> List: http://www.antlr.org/mailman/listinfo/antlr-interest >>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- >>> email-address >> >> List: http://www.antlr.org/mailman/listinfo/antlr-interest >> Unsubscribe: >> http://www.antlr.org/mailman/options/antlr-interest/your-email-address >> > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address 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.
