Class representing a token rule.
Class TokenRule( token, action, nextState ) from \ Rule(( nextState, action))
token | the string matching a fixed token |
action | the action (function) that should be done when hitting the token. The function will be called with the token as last parameter. |
Token rules are simply fixed length rules matching the input text.
Properties | |
separators | |
token | |
Methods | |
apply | |
isSep | |
match |
Properties inherited from class Rule | |
action | |
lookAhead | |
matchLen | |
nextState | |
Methods inherited from class Rule | |
apply | |
match |
apply( ctx )
isSep( item )
match( text, pos )