S-expressions: Difference between revisions

Content added Content deleted
(→‎{{header|TXR}}: Added explicit parser.)
(→‎{{header|TXR}}: Disclaimer about string literal lexing.)
Line 2,741:
The following solution avoids "cheating" in this way with the built-in parser; it implements a from-scratch S-exp parser which treats <code>!@#</code> as just a symbol.
 
The grammar is roughly as follows:
 
<pre>
Line 2,836:
junk:
</pre>
 
TODO: Note that the recognizer for string literals does not actually process the interior escape sequences <code>\"</code>; these remain as part of the string data. The only processing is the stripping of the outer quotes from the lexeme.
 
{{omit from|Brlcad}}