Jump to content

S/SL programming language

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 117.198.11.2 (talk) at 15:18, 24 February 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Syntax/Semantic Language (S/SL) is an executable high level specification language for recursive descent parsers, semantic analyzers and code generators developed by James Cordy, Ric Holt and David Wortman at the University of Toronto in 1980.[1]

S/SL is a small programming language that supports cheap recursion and defines input, output, and error token names (& values), semantic mechanisms (class interfaces whose methods are really escapes to routines in a host programming language but allow good abstraction in the pseudo-code) and a pseudo-code program that defines the syntax of the input language by the token stream the program accepts. Alternation, control flow and one-symbol look-ahead constructs are part of the language.

The S/SL processor compiles this pseudo-code into a table (byte-codes) that is interpreted by the S/SL table-walker (interpreter). The pseudo-code language processes the input language in LL(1) recursive descent style but extensions allow it to process any LR(k) language relatively easily.[2] S/SL is designed to provide excellent syntax error recovery and repair. It is more powerful and transparent than Yacc but can be slower.


References

  1. ^ J. R. Cordy, R. C. Holt and D. B. Wortman, "S/SL: Syntax/Semantic Language - Introduction and Specification, Technical Report CSRG-118, Computer Systems Research Group, University of Toronto, Sept. 1980
  2. ^ D.T. Barnard and J.R. Cordy, "SL Parses the LR Languages", Computer Languages 13,2 (April 1988), pp. 65-74 http://dx.doi.org/10.1016/0096-0551(88)90010-0