# (c) 1989, 1991 Andrew W. Appel, David R. Tarditi
# Api for internal version of grammar
# Compiled by:
#
src/app/yacc/src/mythryl-yacc.libapi Internal_Grammar {
package grammar: Grammar; # Grammar is from
src/app/yacc/src/grammar.api package symbol_assoc: Table; # Table is from
src/app/yacc/src/utils.api package nonterm_assoc: Table;
sharing symbol_assoc::Key == grammar::Symbol; # grammar is from
src/app/yacc/src/grammar.pkg sharing nonterm_assoc::Key == grammar::Nonterminal;
Rule = RULE { lhs: grammar::Nonterminal,
rhs: List( grammar::Symbol ),
num: Int, # internal number of rule - convenient for producing LR graph
rulenum: Int,
precedence: Null_Or( Int )
};
gt_term: (grammar::Terminal, grammar::Terminal) -> Bool;
eq_term: (grammar::Terminal, grammar::Terminal) -> Bool;
gt_nonterm: (grammar::Nonterminal, grammar::Nonterminal) -> Bool;
eq_nonterm: (grammar::Nonterminal, grammar::Nonterminal) -> Bool;
gt_symbol: (grammar::Symbol, grammar::Symbol) -> Bool;
eq_symbol: (grammar::Symbol, grammar::Symbol) -> Bool;
# Debugging information will be
# generated only if debug is TRUE:
#
debug: Bool;
pr_rule: ((grammar::Symbol -> String), (grammar::Nonterminal -> String) ,
(String -> Y)) -> Rule -> Void;
pr_grammar: ((grammar::Symbol -> String),(grammar::Nonterminal -> String) ,
(String -> Void)) -> grammar::Grammar -> Void;
};