Transforms grammar rules into Prolog clauses before they are compiled.
Normally called by the compiler, but can be called directly. The transform
can be customized by defining the hook
Usually called by the built-in Load Predicates and not directly by user programs.
Normally used to translate grammar rules, written with
into ordinary Prolog clauses, written with
Term1 is a grammar rule, then Term2 is the
corresponding clause. Otherwise Term2 is simply
If Term1 is not of the proper form, or if Term2 does not
unify with its clausal form,
expand_term/2 simply fails.
Prints messages for exceptions
See examples in ref-gru-tra.