|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.ai.expertsystem.compiler.parser.Scanner
public class Scanner
Class used in the parsing of the rules file. It's the first step in the converting of the rules into Java classes.
| Field Summary |
|---|
| Fields inherited from interface org.jscience.computing.ai.expertsystem.compiler.parser.TokenConstants |
|---|
ACTIONS, ASTERISK, CLOSE_CURLY_BRACKET, COMMA, COMMENT, CONDITIONS, DECLARATIONS, DOT, EOF, EQUALS, ERROR, EXTENDS, IDENT, IMPLEMENTS, IMPORT, LOCALDECL, NONE_ABOVE, OPEN_CURLY_BRACKET, PACKAGE, PUBLIC, RULE, RULE_BASE, SEMICOLON, STRING, WHITE_SPACE |
| Constructor Summary | |
|---|---|
Scanner(java.lang.String ruleFileName)
Class constructor. |
|
| Method Summary | |
|---|---|
int |
getCurrentColumn()
Returns the current column from the file. |
int |
getCurrentLine()
Returns the current line from the file. |
Token |
getLastNonWhiteSpaceToken()
Returns the last non-whitespace token. |
static void |
main(java.lang.String[] args)
Test method for this class. |
Token |
nextToken()
Returns the next token from the file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Scanner(java.lang.String ruleFileName)
throws java.io.IOException
ruleFileName - the name of the rules file.
java.io.IOException - if some IO error occurs.| Method Detail |
|---|
public int getCurrentColumn()
public int getCurrentLine()
public Token getLastNonWhiteSpaceToken()
public static void main(java.lang.String[] args)
args - command-line arguments. None is needed, but one can pass the
rule file name for the scanning.
public Token nextToken()
throws java.io.IOException
java.io.IOException - if some IO error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||