7.2.4.1 Marking a Left-Hand Side

The #l-… specifier marks the left-hand side of a production of a source PCFG. The production has nonterminal symbols at the right-hand side.

The specifier has the format:

#l-NonterminalSymbolOfSourcePCFG

where NonterminalSymbolOfSourcePCFG is the name of a nonterminal symbol at the left-hand side of a production of a source PCFG. That name is a sequence of English letters, digits, and the characters ‘_’.

There are a few kinds of places where inserting a #l-… specifier is necessary:

  1. At the left-hand side of a production of a bottom-up template grammar.

    Example

    A/10 #l-A: B/3 C/3 D/4 ... ;
    

    The #l-A specifier here sets A as a nonterminal symbol at the left-hand side of a source PCFG production for the expression ‘B/3 C/3 D/4’. The source PCFG production might have the form

    A: B C D ... ;
    
  2. Before ‘(’ … ‘)’ containing a set of alternatives separated by ‘|’.

    Example

    A #l-A: B C D #l-_A_1C ( E ...
                           | F ...
                           | G ...
                           ) ...
    ;
    

    The #l-_A_1C specifier here sets _A_1C as a nonterminal symbol at the left-hand side of source PCFG productions for the expression ‘E … | F … | G …’. The source PCFG productions might have the form

    _A_1C: E ...
         | F ...
         | G ...
    ;
    

    If the right-hand side of a nonterminal symbol of a bottom-up template grammar is a set of alternatives separated by ‘|’, an #l-… specifier just after the nonterminal symbol contains a source nonterminal symbol at the left-hand side of source PCFG productions separated by ‘|’.

    Example

    A #l-A: E ...
          | F ...
          | G ...
    ;
    

    The #l-A specifier here sets A as a nonterminal symbol at the left-hand side of source PCFG productions for the expression ‘E … | F … | G …’. The source PCFG productions might have the form

    A: E ...
     | F ...
     | G ...
    ;
    
  3. At the beginning of a subexpression quantified by ‘*’.

    Example

    S #l-S: B C ( #l-_S_1A D ... )* ...
    

    The #l-_S_1A specifier here sets _S_1A as a nonterminal symbol at the left-hand side of a source PCFG production for a repeatable expression ‘D …’. The source PCFG production might have the form

    _S_1A: D ... ;