pacc logo
pacc v0.3: Lexical details

Next: , Previous: , Up: User manual   [Contents][Index]


21.3 Lexical details

21.3.1 Comments and whitespace

Whitespace between grammar elements is optional, except when needed to avoid ambiguity. A comment may appear anywhere that whitespace can. Pacc understands both styles of C comment: ‘/* comment */’ and ‘// to end of line’ and also ‘# to end of line’.

21.3.2 Alternative characters

The left arrow that separates a rule (and optional type) from its definition can be written ‘’ (U+2190 LEFTWARDS ARROW), or ‘<-’ (ASCII less than, hyphen) or ‘=’ (ASCII equals).

The right arrow that separates a sequence from a value can be written ‘’ (U+2192 RIGHTWARDS ARROW), or ‘->’ (ASCII hyphen, greater than).

The slash that separates alternatives can be written ‘/’ (ASCII slash) or ‘|’ (ASCII vertical bar).

The empty sequence can be represented with ‘ε’ (U+03B5 GREEK SMALL LETTER EPSILON) or ‘%’ (ASCII percent). (It can also be simply omitted, although explicitly marking it aids readability.)

Last updated: 2016-08-03 21:39:50 UTC

News

Porting and packaging

One thing pacc needs is more users. And, perhaps, one way to get more users is to reduce the friction in getting started with pacc. An obvious lubricant is packaging. Read More...

Release relief

Looking at _pacc_coords(), I noticed that it seemed to have the same realloc() bug that I'd just fixed in _pacc_result(). However, the "list of arrays" trick really wasn't going to work here. Read More...

See more news articles

feed