clang  7.0.0svn
Classes | Namespaces
Parser.h File Reference

Simple matcher expression parser. More...

#include "clang/ASTMatchers/ASTMatchersInternal.h"
#include "clang/ASTMatchers/Dynamic/Registry.h"
#include "clang/ASTMatchers/Dynamic/VariantValue.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include <utility>
#include <vector>
Include dependency graph for Parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  clang::ast_matchers::dynamic::Parser
 Matcher expression parser. More...
class  clang::ast_matchers::dynamic::Parser::Sema
 Interface to connect the parser with the registry and more. More...
class  clang::ast_matchers::dynamic::Parser::RegistrySema
 Sema implementation that uses the matcher registry to process the tokens. More...


 Dataflow Directional Tag Classes.

Detailed Description

Simple matcher expression parser.

The parser understands matcher expressions of the form: MatcherName(Arg0, Arg1, ..., ArgN) as well as simple types like strings. The parser does not know how to process the matchers. It delegates this task to a Sema object received as an argument.

Grammar for the expressions supported:
<Expression> := <Literal> | <NamedValue> | <MatcherExpression>
<Literal> := <StringLiteral> | <Boolean> | <Double> | <Unsigned>
<StringLiteral> := "quoted string"
<Boolean> := true | false
<Double> := [0-9]+.[0-9]* | [0-9]+.[0-9]*[eE][-+]?[0-9]+
<Unsigned> := [0-9]+
<NamedValue> := <Identifier>
<MatcherExpression> := <Identifier>(<ArgumentList>) |
<Identifier> := [a-zA-Z]+
<ArgumentList> := <Expression> | <Expression>,<ArgumentList>

Definition in file Parser.h.