        // regex in the form: <miniscanner>(opt) regex
_optMs_regex:       
    ms_spec reset regexOrEOF
    {
        $$ = $3;
    }
|
    regexOrEOF
;

    // series of _optMs_regexes, separated by '|' at the end of lines. E.g.,
    // _optMs_regex1   |
    // _optMs_regex2   |
    // _optMs_regex3
    // (ORNL is returned at '| {OPTBL} \n')
    // at ORNL any previously set ms-spec ends, and is back to INITIAL

_optMs_rule:                             // after ORNL continue parsing
    _optMs_rule ORNL '\n' reset _optMs_rule // at a new line
    {
        orAction();
    }
|
    _optMs_regex
    {
        addRule($1, true);  // true: reset the miniscanner spec to INITIAL
    }
;

optMs_rule:
        // just regular expressions, without an action block
    _optMs_rule 
|
        // the scanner returns a block if it encounters a non-blank character
        // on a line after ws, unless the character is a '|'
    _optMs_rule action
    {
        assignBlock();
    }
;






