The Parle\Parser classIntroductionParser class. Rules can be defined on the fly. Once finalized, a Parle\Lexer instance is required to deliver the token stream. Class synopsisParle\Parser
class Parle\Parser
{
/* Constants */
const
int
Parle\Parser::ACTION_ERROR = 0;
const
int
Parle\Parser::ACTION_SHIFT = 1;
const
int
Parle\Parser::ACTION_REDUCE = 2;
const
int
Parle\Parser::ACTION_GOTO = 3;
const
int
Parle\Parser::ACTION_ACCEPT = 4;
const
int
Parle\Parser::ERROR_SYNTAX = 0;
const
int
Parle\Parser::ERROR_NON_ASSOCIATIVE = 1;
const
int
Parle\Parser::ERROR_UNKNOWN_TOKEN = 2;
/* Properties */
public
int
$action = 0;
public
int
$reduceId = 0;
/* Methods */
public void advance()
public void build()
public void consume(string
$data , Parle\Lexer $lexer )public void dump()
public Parle\ErrorInfo errorInfo()
public void left(string
$tok )public void nonassoc(string
$tok )public void precedence(string
$tok )public int push(string
$name , string $rule )public void reset(int
$tokenId = ?)public void right(string
$tok )public string sigil(int
$idx )public int sigilCount()
public string sigilName(int
$idx )public void token(string
$tok )public int tokenId(string
$tok )public string trace()
public bool validate(string
}$data , Parle\Lexer $lexer )Predefined Constants
Properties
|