|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GrammarInterface
Generic grammar interface.
Method Summary | |
---|---|
ParseTree |
parse(String... token)
Attempts to parse the given series of tokens using this grammar. |
ParseTree |
parse(String sentence)
Attempts to parse the given sentence using this grammar. |
Collection<ParseTree> |
parseAll(String... sentences)
Attempts to parse each of the given sentences using parse(String sentence) . |
boolean |
parses(String... token)
Determines if the given series of tokens can be successfully parsed by this grammar. |
boolean |
parses(String sentence)
Determines if the given sentence can be successfully parsed by this grammar. |
Method Detail |
---|
boolean parses(String sentence)
sentence
- The sentence to be parsed. Will be lowercased using the current locale and then tokenized prior to parsing.
true
if this grammar can parse the given sentence;
false
otherwise.boolean parses(String... token)
token
- Array of tokens specifying the sentence to be parsed. No lowercasing will be performed by this method.
true
if this grammar can parse the given sentence;
false
otherwise.ParseTree parse(String sentence)
sentence
- The sentence to be parsed. Will be lowercased using the current locale and then tokenized prior to parsing.
ParseTree.NULL_PARSE
otherwise.ParseTree parse(String... token)
token
- Array of tokens specifying the sentence to be parsed. No lowercasing will be performed by this method.
ParseTree.NULL_PARSE
otherwise.Collection<ParseTree> parseAll(String... sentences)
parse(String sentence)
.
sentences
- the sentences to be parsed.
ParseTree
per sentence
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |