Class: Token

page.BNF. Token

Represents a (unique!) token for BNF.


<private> new Token(_name, _pattern)

Creates a new token for BNF.

Parameters:
Name Type Description
_name string

token name.

_pattern string

for a token.

Properties:
Name Type Description
name string

token name.

pattern string

pattern for token; null if name is $error.

Source:

Extends

Methods


dump()

Displays ordinal number, if any, and description of terminal.

Inherited From:
Source:
Returns:
Type
string

toString()

Displays name of a token.

Source:
Returns:
Type
string