Beispiel #1
0
 sptr<Node> Parser::ParseBodyBlock()
 {
     ParseConstDecl();
     ParseTypeDecl();
     ParseVarDecl();
     return ParseBlock();
 }
Beispiel #2
0
void Parser::ParseDecl()
{
	while (true)
	{
		if (t.GetValue() == "var")
			ParseVarDecl();
		else
		if(t.GetValue() == "type")
			ParseTypeDecl();
		else
		if(t.GetValue() == "const")
			ParseConstDecl();
		else
		if(t.GetValue() == "procedure")
			ParseProc();
		else
		if(t.GetValue() == "function")
			ParseFunc();
		else
			break;
	}
}