MathParser\Lexing\TokenType Class Reference

Token type values. More...

Public Attributes

const PosInt = 1
 Token representing a positive integer.
 
const Integer = 2
 Token representing a (not necessarily positive) integer.
 
const RealNumber = 3
 Token representing a floating point number.
 
const Identifier = 20
 Token representing an identifier, i.e. More...
 
const OpenParenthesis = 31
 Token representing an opening parenthesis, i.e. More...
 
const CloseParenthesis = 32
 Token representing a closing parenthesis, i.e. More...
 
const UnaryMinus = 99
 Token representing a unary minus. More...
 
const AdditionOperator = 100
 Token representing '+'.
 
const SubtractionOperator = 101
 Token representing '-'.
 
const MultiplicationOperator = 102
 Token representing '*'.
 
const DivisionOperator = 103
 Token representing '/'.
 
const ExponentiationOperator = 104
 Token representing '^'.
 
const FactorialOperator = 105
 Token representing postfix factorial operator '!'.
 
const SemiFactorialOperator = 105
 Token representing postfix subfactorial operator '!!'.
 
const FunctionName = 200
 Token represented a function name, e.g. More...
 
const Constant = 300
 Token represented a known constant, e.g. More...
 
const Terminator = 998
 Token representing a terminator, e.g. More...
 
const Whitespace = 999
 Token representing white space, e.g. More...
 
const Sentinel = 1000
 Token representing a senitinel, for internal used in the Parser. More...
 

Detailed Description

Token type values.

Currently, the following token types are available

  • PosInt
  • Integer
  • RealNumber
  • Identifier
  • OpenParenthesis
  • CloseParenthesis
  • UnaryMinus
  • AdditionOperator
  • SubtractionOperator
  • MultiplicationOperator
  • DivisionOperator
  • ExponentiationOperator
  • FunctionName
  • Constant
  • Terminator
  • Whitespace
  • Sentinel

Member Data Documentation

const MathParser\Lexing\TokenType::CloseParenthesis = 32

Token representing a closing parenthesis, i.e.

')'

const MathParser\Lexing\TokenType::Constant = 300

Token represented a known constant, e.g.

'pi'

const MathParser\Lexing\TokenType::FunctionName = 200

Token represented a function name, e.g.

'sin'

const MathParser\Lexing\TokenType::Identifier = 20

Token representing an identifier, i.e.

a variable name.

const MathParser\Lexing\TokenType::OpenParenthesis = 31

Token representing an opening parenthesis, i.e.

'('

const MathParser\Lexing\TokenType::Sentinel = 1000

Token representing a senitinel, for internal used in the Parser.

Not used.

const MathParser\Lexing\TokenType::Terminator = 998

Token representing a terminator, e.g.

';'. Currently not used.

const MathParser\Lexing\TokenType::UnaryMinus = 99

Token representing a unary minus.

Not used. This is the responsibility of the Parser

const MathParser\Lexing\TokenType::Whitespace = 999

Token representing white space, e.g.

spaces and tabs.


The documentation for this class was generated from the following file: