1 using System;
2 using MdbTokens;
3
4 parser StatementParser
5 {
6 uselexer MdbLexer;
7 main;
8
9 using MdbExprParser.Expression;
10
11 Statement : cmsx.debug.Node*
12 ::= PrintStatement:printStatement{ return printStatement; }
13 | TraceStatement:traceStatement{ return traceStatement; }
14 ;
15
16 PrintStatement(var Span s) : cmsx.debug.Node*
17 ::= PRINT{ s = span; } Expression:expr{ s.end = span.end; return new cmsx.debug.PrintStatementNode(s, expr); }
18 ;
19
20 TraceStatement(var Span s) : cmsx.debug.Node*
21 ::= (TRACE{ s = span; } Expression:expr?){ s.end = span.end; return new cmsx.debug.TraceStatementNode(s, expr); }
22 ;
23 }