- I want to consider whitespaces and newlines as normal whitespaces.
- I want to distinguish newlines from other whitespaces moreover to allow special case.
First attempt to write a compliant grammar fails.
Here is the grammar:
! ------------------------------------------------- Sets
{WS} = {Whitespace} - {CR} - {LF}
{ID Head} = {Letter} + [_]
{ID Tail} = {Alphanumeric} + [_]
{String Chars} = {Printable} + {HT} - ["\]
! ------------------------------------------------- Terminals
! The following defines the Whitespace terminal using the {WS}
! set - which excludes the carriage return and line feed
! characters
Whitespace = {WS}+ | {CR}{LF} | {CR} | {LF}
!NewLine = {CR}{LF} | {CR} | {LF}
MyNewLine = {CR}{LF} | {CR} | {LF}