scanners
Class JLexScanner.OopsScanner
java.lang.Object
|
+--scanners.JLexScanner.OopsScanner
- Enclosing class:
- JLexScanner
- public static class JLexScanner.OopsScanner
- extends java.lang.Object
- implements oops.parser.Scanner, JLexScanner.Action
Method Summary |
boolean |
advance()
move on to next token. |
boolean |
atEnd()
|
void |
character(java.lang.String symbol)
|
void |
integer(java.lang.String symbol)
|
java.lang.Object |
node()
|
void |
real(java.lang.String symbol)
|
void |
scan(java.io.Reader in,
oops.parser.Parser parser)
initialize, read one symbol ahead. |
oops.parser.Set |
tokenSet()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
parser
protected oops.parser.Parser parser
NUMBER
protected oops.parser.Set NUMBER
scanner
protected JLexScanner scanner
atEnd
protected boolean atEnd
tokenSet
protected oops.parser.Set tokenSet
node
protected java.lang.Object node
JLexScanner.OopsScanner
public JLexScanner.OopsScanner()
scan
public void scan(java.io.Reader in,
oops.parser.Parser parser)
throws java.io.IOException
- initialize, read one symbol ahead.
- Specified by:
- scan in interface oops.parser.Scanner
- Parameters:
parser
- is used to screen symbols.
advance
public boolean advance()
throws java.io.IOException
- move on to next token.
- Specified by:
- advance in interface oops.parser.Scanner
- Returns:
- false if atEnd() becomes true.
atEnd
public boolean atEnd()
- Specified by:
- atEnd in interface oops.parser.Scanner
- Returns:
- true if positioned beyond tokens.
tokenSet
public oops.parser.Set tokenSet()
- Specified by:
- tokenSet in interface oops.parser.Scanner
- Returns:
- single-element lookahead set, null for unidentifiable token.
node
public java.lang.Object node()
- Specified by:
- node in interface oops.parser.Scanner
- Returns:
- node corresponding to token.
real
public void real(java.lang.String symbol)
- Specified by:
- real in interface JLexScanner.Action
integer
public void integer(java.lang.String symbol)
- Specified by:
- integer in interface JLexScanner.Action
character
public void character(java.lang.String symbol)
- Specified by:
- character in interface JLexScanner.Action