7.1.3.6 Inserting Assembler Code [Experimental]

A template grammar can contain assembler code insertions enclosed in ‘{’ and ‘}’, for example:

A: . { push_random
       set_random  true } ( { pop_random } .
                          | { pop_random } . .
                          | { pop_random } . . .
                          )
;

Note: processing a template grammar with assembler code insertions usually requires changing parser source code to define corresponding instruction meta-classes and register corresponding instruction classes in the instruction class set (for push_random, set_random, and pop_random in the above example).