|
This example is a Jacc specification of an interactive parser for
Prolog terms (and thus for Prolog). It illustrates the use of dynamic
operators and how to specify top-down undo semantic actions. The parser
repeatedly reads a term from the standard input, prints its canonical
form - i.e., f(t1, ... ,tn). All
Prolog dynamic operators are predefined, but may be redefined at parse
time. New dynamic operators may also be defined and redefined at parse
time as well.
|
Copyright © 2006 ILOG, Inc.; All Rights Reserved.