lolo.scans
Class SimpleIdentifier
java.lang.Object
|
+--lolo.Scan
|
+--lolo.scans.Scan
|
+--lolo.scans.SimpleIdentifier
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- JavaIdentifier
- public class SimpleIdentifier
- extends Scan
Instances of this class scan for [_a-zA-Z][_a-zA-Z0-9]*.
- Author:
- Bernd Kühl
(bernd@informatik.uni-osnabrueck.de)
- See Also:
- Serialized Form
|
Field Summary |
protected boolean |
start
Marks if the first character is checked. |
|
Method Summary |
Scan.State |
nextChar(char ch)
Called by a Scanner for every new character. |
void |
reset()
Resets this instance. |
protected boolean |
testPart(char ch)
Tests the characters. |
protected boolean |
testStart(char ch)
Tests the first character. |
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
start
protected transient boolean start
- Marks if the first character is checked.
SimpleIdentifier
public SimpleIdentifier()
reset
public void reset()
- Description copied from class:
Scan
- Resets this instance.
- Overrides:
reset in class Scan
testStart
protected boolean testStart(char ch)
- Tests the first character.
- Parameters:
ch - the first charatcer of the symbol.- Returns:
- true if the character is a legal first character.
testPart
protected boolean testPart(char ch)
- Tests the characters.
- Parameters:
ch - the next charatcer of the symbol.- Returns:
- true if the characters are a legal characters.
nextChar
public Scan.State nextChar(char ch)
- Description copied from class:
Scan
- Called by a Scanner for every new character.
- Overrides:
nextChar in class Scan
- Following copied from class:
lolo.Scan
- Returns:
- a State object to signal whether more characters are wanted and whether a symbol is found.
- See Also:
Scan.State,
Scanner