void Parse_SyntaxExpressionMoreSingle(Context& ctx) { if (ctx.Token() == TKVerticalLineCharacter) { //SyntaxExpressionMoreSingle => VerticalLineCharacter SyntaxExpressionSingle SyntaxExpressionMoreSingle ctx.Match(TKVerticalLineCharacter); ctx.Action_CloseProduction(); Parse_SyntaxExpressionSingle(ctx); ctx.Action_CloseProduction(); Parse_SyntaxExpressionMoreSingle(ctx); } else if (ctx.Token() == TKSemicolonCharacter) { //SyntaxExpressionMoreSingle => Epsilon } else { assert(false); } }
void Parse_SyntaxExpressionMoreSingle(Context& ctx) { if (ctx.Token() == TKVerticalLineCharacter) { //SyntaxExpressionMoreSingle => VerticalLineCharacter SyntaxExpressionSingle SyntaxExpressionMoreSingle ctx.Match(TKVerticalLineCharacter); ctx.Action_CloseProduction(); Parse_SyntaxExpressionSingle(ctx); ctx.Action_CloseProduction(); Parse_SyntaxExpressionMoreSingle(ctx); } else if (ctx.Token() == TKSemicolonCharacter) { //SyntaxExpressionMoreSingle => Epsilon } else { throw ParserException(ctx.GetLine(), ctx.GetCol(), ErrorCodeUnexpectedToken); } }