Re: ocamllex eating up line breaks even when not asked to
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
I see. My mistake was to treat special classes of characters as « keywords », the correct
way to proceed is to treat them in the rules section directly :
| '\n'
| '\r' as lb
{ LINEBREAK lb}
| '|'
| '\"'
| '\''
| '='
| '`'
| ','
| '?'
| ':'
| '('
| ')'
| '{'
| '}' as pnct
{PUNCTUATION_MARK pnct}
It works now, thank you.