The OLE (Optional Lambda Expression) is converted into a bovine lambda. This lambda has special short-cuts to simplify reading the semantic action definition. An OLE like this:
( $1 )
results in a lambda return which consists entirely of the string or object found by matching the first (zeroth) element of match. An OLE like this:
( ,(foo $1) )
foo on the first argument, and then splices its return
into the return list whereas:
( (foo $1) )
foo, and that is placed in the return list.
Here are other things that can appear inline:
( $1 ).
foo(exactly as displayed).
(EXPAND$1 nonterminal depth
EXPANDperforms a recursive parse on the token passed to it (represented by ‘$1’ above.) The semantic list is a common token to expand, as there are often interesting things in the list. The nonterminal is a symbol in your table which the bovinator will start with when parsing. nonterminal's definition is the same as any other nonterminal. depth should be at least ‘1’ when descending into a semantic list.
(EXPANDFULL$1 nonterminal depth
EXPAND, except that the parser will iterate over nonterminal until there are no more matches. (The same way the parser iterates over the starting rule (see Starting Rules). This lets you have much simpler rules in this specific case, and also lets you have positional information in the returned tokens, and error skipping.
(ASSOCsymbol1 value1 symbol2 value2
nil. While the items are all listed explicitly, the created structure is an association list of the form:
((symbol1 . value1) (symbol2 . value2) ...)
variable, though any symbol will work.
:constant-flag t :parent "parenttype".
(TAG-VARIABLEname type default-value
(TAG-FUNCTIONname type arg-list
(TAG-TYPEname type members parents
code. See see Creating Tags for the lisp functions these translate into.
If the symbol
%quotemode backquote is specified, then use
,@ to splice a list in, and
, to evaluate the expression.
This lets you send
$1 as a symbol into a list instead of having
it expanded inline.