public interface State
stateful attribute, whose value is the
name of the class implementing this interface. The class, in turn,
must have a no-argument constructor, which is used to create the
global state object.
Each production that resets the global state (i.e., serves as
a top-level entry point) needs to be marked with the resetting attribute. At the beginning
of the method representing such a production, the global state is
reset by calling reset(String).
Each production that might modify the global state (or that
depends on other productions that modify the global state) needs to
be marked with the stateful
attribute. At the beginning of the method representing such a
production, a new transaction is started by calling start(). This transaction is completed on a successful parse by
calling commit() and on an erroneous parse by calling
abort().void reset(java.lang.String file)
resetting attribute.file - The file name.void start()
stateful attribute.void commit()
stateful attribute.void abort()
stateful attribute.Copyright © 2012. All Rights Reserved.