ParseErrorclass | parser.t[5002] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
class
ParseError : Exception
ParseError
Exception
object
ParseError
BadMultiError
CommandError
EmptyNounError
RejectParseTreeError
NotUnderstoodError
OopsError
CantOopsError
ResolutionError
ActorResolutionError
InsufficientNounsError
NoneInLocationError
NoneInOwnerError
NoneWithContentsError
UnmatchedNounError
AmbiguousMultiDefiniteError
AmbiguousError
OrdinalRangeError
PronounError
AntecedentScopeError
NoAntecedentError
UnmatchedActorError
UnknownWordError
allowOnRespell
curable
errStage
Inherited from Exception
:
errmsg_
display
rankCorrection
tryCuring
Inherited from Exception
:
construct
displayException
getExceptionMessage
showStackTrace
allowOnRespell | parser.t[5035] |
curable | parser.t[5049] |
When we find more than one grammar match to an input string, the parser tries resolving each one, in order of the predicate match quality. If one resolves without an error, the parser stops and uses that match. But if *none* of the possible matches resolve without an error, the parser picks a match with a curable error over one with an incurable error.
errStage | parser.t[5075] |
display ( ) | parser.t[5006] |
rankCorrection (toks, idx, dict) | parser.t[5022] |
'toks' is the new token list, with the spelling correction applied; 'idx' is the index in the list of the corrected word. 'dict' is the Dictionary used for parsing.
Returns an integer value giving the ranking. The ranking is used for sorting, so the scale is arbitrary - we simply take the highest ranking item. The value 0 is special, though: it means that we should filter out the candidate and not consider it at all.
tryCuring (toks, dict) | parser.t[5066] |
If this new command is indeed a valid response to the error message, we return a CommandList with the "cured" version of the command. This new command list should supplement the command with the new information provided by the reply. If not, we simply return nil.