Changeset [f8e3caa3db95587d03fc54fc7d403ab1a0f79a84] by Douglas Creager
November 10th, 2008 @ 12:19 PM
Allow newlines before and after binary operators
The CSPM spec uses newlines to separate the definitions in a file and in a “let” statement, but also allows newlines to appear certain extra situations for readability — for instance, before and after any binary operator. Like in [Scattergood98], we handle these silent newlines in the lexer rather than the parser; any consecutive newlines are replaced with a single TNewline token, and any TNewlines that appear before or after a “soakable” token are removed from the token stream before it's passed on to the parser.
[Scattergood98] J. B. Scattergood. /The semantics and
implementation of Machine-Readable CSP/. D.Phil. dissertation,
Oxford University, 1998.
Committed by Douglas Creager
- M cspm/src/HST/CSPM/Lexer.lhs
- M cspm/tests/processes/test-newlines.sh
- M cspm/tests/run-tests.sh
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
An open-source refinement checker for the CSP process algebra.