19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix H<br />

Generated Concrete Syntax<br />

This grammar is automatically derived from a <strong>Fortress</strong> parser under development, and is included to help give insight<br />

into how some syntactic features (white-space sensitivity, optional semicolons) are supported. A GLR parser-generator<br />

is assumed. Some restrictions that could be enforced syntactically (e.g., which modifiers are allowed in which contexts)<br />

are instead assumed to be checked in a later phase of the compiler, and some language features are not yet implemented.<br />

compilation_unit<br />

-> w api w<br />

-> w component w<br />

-> imports_opt<br />

exports_opt<br />

defs_opt w<br />

api<br />

-> "api" w<br />

dotted<br />

imports_opt<br />

decls_opt<br />

w "end"<br />

component<br />

-> "component" w<br />

dotted<br />

imports_opt<br />

exports_opt<br />

defs_opt w<br />

"end"<br />

dotteds<br />

-> dotted<br />

-> dotted w "," w dotteds<br />

dotted<br />

-> build_dotted<br />

build_dotted<br />

383

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!