[PATCH] First revision of the dynamic ASTMatcher library
Dmitri Gribenko
gribozavr at gmail.com
Fri May 3 11:17:27 PDT 2013
================
Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:242
@@ +241,3 @@
+/// parse function.
+bool parseToken(const TokenInfo &Token, CodeTokenizer *Tokenizer,
+ Parser::TokenProcessor *Processor, VariantValue *Value,
----------------
Samuel Benzaquen wrote:
> Dmitri Gribenko wrote:
> > Why doesn't lexer do this? Every token could have an associated value (optional, of course).
> It could do the rest of the parsing, except for the matchers. I would have to pass more state to it, though.
It would be best to associate values with single-token literals in the lexer. Recursive-descent parsing will be simplified because you will need to parse only high-level constructs in the parser.
http://llvm-reviews.chandlerc.com/D714
BRANCH
svn
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list