[antlr-interest] Parsing AspectJ pointcuts
mstrzer
stoerzer at fmi.uni-passau.de
Thu May 15 06:49:44 PDT 2003
Hi everybody!
I'm just trying to write a parser for AspectJ based on ANTLR. Now
AspectJ has some weired syntax, at least from parsing point of view,
so I ran into a bunch of problems.
AspectJ extends Java by allowing pointcuts which look like this
pointcut myPointcut(<arglist>):
call(!public SomeQualifiedReturnType*with..patterns*
someMethodName*withPatterns(..));
All those patterns interfere with (qualified) identifiers, arithmetic
expressions (*) and so on, a real mess. So I thought it would be a
good idea to use a different lexer here.
Now, as I learned from studying the documentation and some earlier
posts, it is not possible (or recommendable) to try to switch the
lexer from the parser.
On the other hand, I have no single token where I can switch the lexer
in the lexer grammar, besides some keywords ("pointcut").
However, I couldn't figure out, how to associate a action (like
switching the lexer) with a keyword.
Can anyone help me with this problem?
Thanks in advance, best regards,
Max
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list