|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectatt.grappa.Lexer
public class Lexer
A class for doing lexical analysis of dot formatted input.
| Constructor Summary | |
|---|---|
Lexer(java.io.Reader input,
java.io.PrintWriter error)
Create an instance of Lexer that reads from input and
sends error messages to error. |
|
| Method Summary | |
|---|---|
void |
advance()
Advance the scanner one character in the input stream. |
java.lang.String |
getLocation()
Get the current location in the form "[line_number(character_offser)]". |
static boolean |
id_char(char ch)
Check if character is a valid id character; |
static boolean |
id_char(int ch)
Check if character is a valid id character; |
void |
init()
Initialize internal tables and read two characters of input for look-ahead purposes. |
Symbol |
next_token(int debugLevel)
Return one Symbol. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Lexer(java.io.Reader input,
java.io.PrintWriter error)
throws java.lang.IllegalArgumentException
Lexer that reads from input and
sends error messages to error.
input - input Reader objecterror - error output Writer object
java.lang.IllegalArgumentException - whenever input is null| Method Detail |
|---|
public void init()
throws java.io.IOException
java.io.IOException - if advance() doesadvance()
public void advance()
throws java.io.IOException
java.io.IOException - whenever a problem reading from input is encounteredpublic java.lang.String getLocation()
public static boolean id_char(int ch)
ch - the character in question.public static boolean id_char(char ch)
ch - the character in question.
public Symbol next_token(int debugLevel)
throws java.io.IOException
java.io.IOException - if advance() does
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||