Abstract
The theory of compiler-compilers is well known. Here we present a small collection of SNOBOL subroutines which make the SNOBOL pattern matcher a self-documenting instant compiler. All one need add are the syntax productions (as simple SNOBOL patterns mimicking BNF) and the associated (synthesyzing) semartic transformation in the form of arbitrarily simple SNOBOL programs.
The resulting compiler produces a complete (or partial at the usér's discretion) trace of the parse showing how the syntax matches or fails to match the input. After a match is achieved, the semantic rules are executed on the resulting parse tree. The execution of these rules too are optionally traced so that one has a full picture of just which transformations were performed at each node of the tree. Finally the parse tree is printed.
Index Terms
A do-it-yourself instant compiler.kit
Recommendations
A do-it-yourself instant compiler.kit
SIGCSE '77: Proceedings of the seventh SIGCSE technical symposium on Computer science educationThe theory of compiler-compilers is well known. Here we present a small collection of SNOBOL subroutines which make the SNOBOL pattern matcher a self-documenting instant compiler. All one need add are the syntax productions (as simple SNOBOL patterns ...
Layout-sensitive language extensibility with SugarHaskell
Haskell '12: Proceedings of the 2012 Haskell SymposiumProgrammers need convenient syntax to write elegant and concise programs. Consequently, the Haskell standard provides syntactic sugar for some scenarios (e.g., do notation for monadic code), authors of Haskell compilers provide syntactic sugar for more ...
Layout-sensitive language extensibility with SugarHaskell
Haskell '12Programmers need convenient syntax to write elegant and concise programs. Consequently, the Haskell standard provides syntactic sugar for some scenarios (e.g., do notation for monadic code), authors of Haskell compilers provide syntactic sugar for more ...






Comments