pacc logo
pacc v0.3: Binding

21.4 Binding

The binding operator is ‘:’. To its left is an identifier, following the usual C rules. To its right is any pacc expression, which must match the input at this point. The binding operator brings into scope the identifier on its left; this name remains in scope till the end of the sequence, that is, the end of the rule or enclosing parentheses, or the next ‘/’ operator. This identifier may be used in expressions and semantic guards.

If the expression on the right of the ‘:’ is a call matcher, then the type of the name bound is the same as the type of the rule called. In all other cases, the type of the name bound is ‘ref_t’; this includes the case where the expression is a parenthesized call.

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