protected void match(String terminalSymbol)
{
if (lookAhead(1).getText().Equals(terminalSymbol))
{
consume();
}
else
{
throw new ApplicationException(
"Syntax error detected at match. Expected "
+ terminalSymbol + " but got "
+ lookAhead(1).getText());
}
}