|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.naturalcli.Syntax
public class Syntax
Implements a class with a syntax definition and parser.
| Constructor Summary | |
|---|---|
Syntax(java.lang.String definition)
Constructor for the Syntax class |
|
| Method Summary | |
|---|---|
java.lang.String |
getDefinition()
Gets the syntax definition |
ParseResult |
parse(java.lang.String[] candidates,
int first,
ParameterValidator pv)
Parse the tokens to see if match with the syntax |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Syntax(java.lang.String definition)
throws InvalidSyntaxException
definition - the syntax definition
InvalidSyntaxException| Method Detail |
|---|
public java.lang.String getDefinition()
public ParseResult parse(java.lang.String[] candidates,
int first,
ParameterValidator pv)
throws UnknownParameterType
candidates - the candidate tokens to matchfirst - the first item in the tokens listpv - the parameter validator
null if the candidate does not match,
or a ParseData object
UnknownParameterTypeParseResultpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||