|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.sc3d.apt.sss.v3.Lex
public class Lex
Represents a lexical analysis of a Sentence. The analysis recognises comments, keywords (including punctuation strings and separator characters), constants, identifers, numbers and strings, which it wraps up as Tokens with appropriate types. All white-space is discarded.
| Field Summary | |
|---|---|
int |
numTokens
The number of lexographic Tokens found in 'sentence'. |
Sentence |
sentence
The Sentence of which this is the lexical analysis. |
| Constructor Summary | |
|---|---|
Lex(Sentence sentence)
Constructs a Lex representing the lexical structure of 'sentence'. |
|
| Method Summary | |
|---|---|
Token |
getToken(int index)
Returns one of the lexographic Tokens. |
static void |
main(java.lang.String[] args)
Takes one argument: a filename. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Sentence sentence
public final int numTokens
| Constructor Detail |
|---|
public Lex(Sentence sentence)
| Method Detail |
|---|
public Token getToken(int index)
index - the index of the Token, from '0' to 'numTokens-1'.
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||