Next: Report errors, Previous: Writing a lexer, Up: Wisent Parsing [Contents][Index]

### 3.2 Variables and macros useful in grammar actions.

Variable: wisent-input

  The last token read. This variable only has meaning in the scope of `wisent-parse`.

Function: wisent-lexer

  Obtain the next terminal in input.

Function: wisent-region &rest positions

  Return the start/end positions of the region including positions. Each element of positions is a pair `(start-pos . end-pos)` or `nil`. The returned value is the pair `(min-start-pos . max-end-pos)` or `nil` if no positions are available.