@flowscripter/mpeg-sdl-parser
Version:
ISO/IEC 14496-34 Syntactic Description Language (MPEG SDL) parser implemented in TypeScript
110 lines (85 loc) • 1.25 kB
Plain Text
# Simple commant
// hello world
class A {}
==>
Specification(
Comment
Whitespace
ClassDeclaration(
class
Whitespace
Identifier
Whitespace
OpenBrace
CloseBrace
)
)
# Multiple comments
class A {}
// hello
// world
==>
Specification(
ClassDeclaration(
class
Whitespace
Identifier
Whitespace
OpenBrace
CloseBrace
)
Whitespace
Comment
Whitespace
Comment
)
# Multiple comments and whitespace
// hello
// world
class A {}
==>
Specification(
Comment
Whitespace
Comment
Whitespace
ClassDeclaration(
class
Whitespace
Identifier
Whitespace
OpenBrace
CloseBrace
)
)
# Comment within comment
// hello // world
class A {}
==>
Specification(
Comment
Whitespace
ClassDeclaration(
class
Whitespace
Identifier
Whitespace
OpenBrace
CloseBrace
)
)
# Comment at end of line
class A {} // hello
==>
Specification(
ClassDeclaration(
class
Whitespace
Identifier
Whitespace
OpenBrace
CloseBrace
)
Whitespace
Comment
)