def on_grammar(node, compiled_grammar)
      # Create the prototypes for all rules since rules can be referenced before
      # they are defined.
      node.children.each do |child|
        if child.type == :rule
          on_rule_prototype(child, compiled_grammar)
        end
      end

      node.children.each do |child|
        process(child, compiled_grammar)
      end
    end
def on_grammar(node, compiled_grammar)
      # Create the prototypes for all rules since rules can be referenced before
      # they are defined.
      node.children.each do |child|
        if child.type == :rule
          on_rule_prototype(child, compiled_grammar)
        end
      end

      node.children.each do |child|
        process(child, compiled_grammar)
      end
    end
Processes the root node of a grammar.

 @param [LL::AST::Node] node
 @param [LL::CompiledGrammar] compiled_grammar