A CommandList is a set of potential parsings for a given input with a given grammar.
class
CommandList : object
Superclass Tree (in declaration order)
CommandList
object
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
cmd
cmdLst
curable
Summary of Methods
acceptAny
acceptCurable
construct
getBestCmd
getResErr
length
Properties
Our resolved Command. This is the first parsing in our list that (in priority order) we were able to resolve with no errors.
our list of Command objects
Our semi-resolved Command. When we can't find a command that resolves without errors, we'll set this to the first one (in priority order) that resolves with a curable error.
Methods
Accept ANY command, with or without a resolution error, curable or not. We'll take the error-free resolution if we have one, otherwise the resolution with a curable error, otherwise just the first parsing in priority order.
Accept a curable resolution as the actual resolution. If we don't have an error-free resolution, we'll set 'cmd' to the curable resolution. Returns true if we have any resolution, nil if not.
new CommandList(prod, toks, dict, wrapper) - construct a new CommandList object by parsing an input token list. 'prod' is the GrammarProd to parse against; 'toks' is the token list; 'dict' is the main parser dictionary; 'wrapper' is a callback function that maps a parse tree to a Command object.
new CommandList(Command) - construct a CommandList containing a single pre-resolved Command object.
Get the most promising command from the available parsings. This returns the first successfully resolved command in priority order, if any; otherwise the first command with a curable error, if any; otherwise the first command in priority order.
Get the resolution error, if any. If we parsed but didn't resolve, this returns the error from the first parsing in priority order.
number of parsings in the list
Adv3Lite Library Reference Manual
Generated on 25/04/2024 from adv3Lite version 2.0