@flowscripter/mpeg-sdl-parser
Version:
ISO/IEC 14496-34 Syntactic Description Language (MPEG SDL) parser implemented in TypeScript
49 lines (45 loc) • 1.05 kB
Plain Text
# Simple
class A {do {i++;} while (i<3);}
==>
Specification(
ClassDeclaration(
class
Whitespace
Identifier
Whitespace
OpenBrace
DoStatement(
do
Whitespace
CompoundStatement(
OpenBrace
ExpressionStatement(
UnaryExpression(
UnaryExpression(
Identifier
)
PostfixIncrement
)
Semicolon
)
CloseBrace
)
Whitespace
while
Whitespace
OpenParenthesis
BinaryExpression(
UnaryExpression(
Identifier
)
RelationalLessThan
UnaryExpression(
IntegerLiteral
)
)
CloseParenthesis
Semicolon
)
CloseBrace
)
)