2 GTSAM Copyright 2010-2020, Georgia Tech Research Corporation, 3 Atlanta, Georgia 30332-0415 6 See LICENSE for the license information 8 All the token definitions. 10 Author: Duy Nguyen Ta, Fan Jiang, Matthew Sklar, Varun Agrawal, and Frank Dellaert 13 from pyparsing
import Or
14 from pyparsing
import (Keyword, Literal, OneOrMore, QuotedString, Suppress,
15 Word, alphanums, alphas, nestedExpr, nums,
16 originalTextFor, printables)
19 IDENT = Word(alphas +
'_', alphanums +
'_') ^ Word(nums)
21 RAW_POINTER, SHARED_POINTER, REF = map(Literal,
"@*&")
23 LPAREN, RPAREN, LBRACE, RBRACE, COLON, SEMI_COLON = map(Suppress,
"(){}:;")
24 LOPBRACK, ROPBRACK, COMMA, EQUAL = map(Suppress,
"<>,=")
30 DEFAULT_ARG = originalTextFor(
34 Word(printables, excludeChars=
"(){}[]<>,;") ^
35 nestedExpr(opener=
'(', closer=
')') ^
36 nestedExpr(opener=
'[', closer=
']') ^
37 nestedExpr(opener=
'{', closer=
'}') ^
38 nestedExpr(opener=
'<', closer=
'>')
41 CONST, VIRTUAL, CLASS, STATIC, PAIR, TEMPLATE, TYPEDEF, INCLUDE = map(
54 ENUM = Keyword(
"enum") ^ Keyword(
"enum class") ^ Keyword(
"enum struct")
55 NAMESPACE = Keyword(
"namespace")