A simple TokenFactory implementation.

The token index and start index is incremented with each token.

no subtypes hierarchy

Initializer
SimpleTokenFactory(Integer initialIndex = 0, Integer initialStartIndex = 0)
Parameters:
  • initialIndex = 0

    The token index of the first token.

  • initialStartIndex = 0

    The start index of the first token.

Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
tokenshared actual CommonToken token(String text, Integer type, Integer length)

Creates a CommonToken with the specified text, type, and length.

Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: TokenFactory