|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.czt.parser.circus.OperatorScanner
public class OperatorScanner
This is an operator lexer (part of context-sensitive lexis) for Circus specifications in unicode format.
According to the ISO Standard for Z, the lexis for Z specifications consists of two phases: the context-free lexis and the context-sensitive lexis. This class is an implementation of sections 7.4.4 and 7.5 of the ISO Z standard, which describes the context-sensitive lexis.
This class transforms a stream of tokens into another stream of tokens. It translates words (DECORWORD or DECLWORD tokens) into operator tokens like L, I, etc. There are two cases in which a transformation to operator tokens is not performed:
The transformation into operator tokens requires a lookup in an operator table, which must be set appropriately before the lookup is performed. This is usually done by the parser who updates the operator table while parsing. This is not standard conforming since the operator table gets updated when an operator template is parsed while the standard requires that the scope of the associations between words and operator tokens is the whole of the section in which the operator template appears (not just from the operator template onwards).
| Method Summary | |
|---|---|
net.sourceforge.czt.parser.util.OpTable |
getOperatorTable()
|
protected net.sourceforge.czt.java_cup.runtime.Symbol |
localLookup(net.sourceforge.czt.java_cup.runtime.Symbol symbol)
Lookup the value of this symbol |
net.sourceforge.czt.java_cup.runtime.Symbol |
next_token()
|
void |
setOperatorTable(net.sourceforge.czt.parser.util.OpTable table)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public net.sourceforge.czt.parser.util.OpTable getOperatorTable()
public void setOperatorTable(net.sourceforge.czt.parser.util.OpTable table)
public net.sourceforge.czt.java_cup.runtime.Symbol next_token()
throws java.lang.Exception
next_token in interface net.sourceforge.czt.java_cup.runtime.Scannerjava.lang.Exceptionprotected net.sourceforge.czt.java_cup.runtime.Symbol localLookup(net.sourceforge.czt.java_cup.runtime.Symbol symbol)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||