|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.importer.parser.iptables.parser.Lexer
public class Lexer
Lexer for a iptables -vnL command output. This class makes the lecical analysis, devides the String into tokens and creates the list of tokens.
| Nested Class Summary | |
|---|---|
class |
Lexer.CountingTokenizer
This tokenizer keeps track of the position of the words. |
| Field Summary | |
|---|---|
private static String |
EOF
End of file identifier. |
private int |
lineCounter
Current line in the input data. |
private int |
pos
Current reading position within the line. |
private Lexer.CountingTokenizer |
reader
The content to analyse. |
Vector |
tokens
The list of tokens |
private String |
word
Current word. |
| Constructor Summary | |
|---|---|
Lexer(String content)
Create a new lexer and analyser the content. |
|
| Method Summary | |
|---|---|
private void |
addList(String word,
String type)
Add the word and its type to the list of tokens. |
private void |
analyse()
|
private String |
typeLastToken()
Get the type of the last token in the list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static String EOF
public Vector tokens
private Lexer.CountingTokenizer reader
private String word
private int lineCounter
private int pos
| Constructor Detail |
|---|
public Lexer(String content)
content - The document to analyser.| Method Detail |
|---|
private void analyse()
private void addList(String word,
String type)
word - The text from the tokenizer.type - The type identifier.private String typeLastToken()
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||