S/SL programming language

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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 pseudocode) and a pseudocode 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 pseudocode into a table (byte-codes) that is interpreted by the S/SL table-walker (interpreter). The pseudocode 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.

S/SL's "semantic mechanisms" extend its capabilities to all phases of compiling, and it has been used to implement all phases of compilation, including scanners, parsers, semantic analyzers, code generators and virtual machine interpreters in multi-pass language processors.[3]

S/SL has been used to implement production commercial compilers for languages such as PL/I, Euclid, Turing, Ada, and COBOL, as well as interpreters, command processors, and domain specific languages of many kinds. It is the primary technology used in IBM's ILE/400 COBOL compiler,[4] and the ZMailer mail transfer agent uses S/SL[5] for defining both its mail router processing language and its RFC 822 email address validation.

References[edit]

  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. ^ Barnard, D.T.; Cordy, J.R. (1988). "SL Parses the LR Languages". Computer Languages. 13 (2): 65–74. doi:10.1016/0096-0551(88)90010-0. 
  3. ^ Holt, Richard C.; Cordy, James R.; Wortman, David B. (1982). "An Introduction to S/SL: Syntax/Semantic Language". ACM Transactions on Programming Languages and Systems. 4 (2): 149–178. doi:10.1145/357162.357164. 
  4. ^ Ian H. Carmichael and Stephen Perelgut. S/SL revisited. Proc. CASCON'95, Conference of the Centre for Advanced Studies on Collaborative Research, Toronto, Canada, November 1995 http://portal.acm.org/citation.cfm?id=781915.781926
  5. ^ ZMailer the Manual, http://www.zmailer.org/zman/zmanual.shtml