Copied!
CloneableInstantiable
Properties
public array $tokens = []
 
  • var \Token[]
Methods
public __construct(string $input, array $operators)
 

Tokenizer constructor.

  • param \Operator[] $operators
public buildReversePolishNotation() : array
 
  • throws \IncorrectBracketsException
  • throws \UnknownOperatorException
  • return \Token[] Array of tokens in revers polish notation
public tokenize() : self
Properties
private bool $allowNegative = true
private bool $inDoubleQuotedString = false
private string $input
private bool $inSingleQuotedString = false
private string $numberBuffer = ''
private array $operators
private string $stringBuffer = ''
Methods
private emptyNumberBufferAsLiteral() : void
private emptyStrBufferAsVariable() : void
private isAlpha(string $ch) : bool
private isComma(string $ch) : bool
private isDot(string $ch) : bool
private isLP(string $ch) : bool
private isNumber(string $ch) : bool
private isRP(string $ch) : bool
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration