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 (Keyword, Literal, Or, QuotedString, Suppress, Word,
14 alphanums, alphas, delimitedList, nums,
18 IDENT = Word(alphas +
'_', alphanums +
'_') ^ Word(nums)
20 RAW_POINTER, SHARED_POINTER, REF = map(Literal,
"@*&")
22 LPAREN, RPAREN, LBRACE, RBRACE, COLON, SEMI_COLON = map(Suppress,
"(){}:;")
23 LOPBRACK, ROPBRACK, COMMA, EQUAL = map(Suppress,
"<>,=")
28 NUMBER_OR_STRING = (pyparsing_common.number ^ QuotedString(
'"') ^ QuotedString(
"'"))
31 TUPLE = (LPAREN + delimitedList(NUMBER_OR_STRING) + RPAREN)
34 DEFAULT_ARG = (NUMBER_OR_STRING ^ pyparsing_common.identifier ^ TUPLE)
36 CONST, VIRTUAL, CLASS, STATIC, PAIR, TEMPLATE, TYPEDEF, INCLUDE = map(
49 ENUM = Keyword(
"enum") ^ Keyword(
"enum class") ^ Keyword(
"enum struct")
50 NAMESPACE = Keyword(
"namespace")