CommandListclass | parser.t[823]

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

`cmd` | `parser.t[1002]`

Our resolved Command. This is the first parsing in our list that (in priority order) we were able to resolve with no errors.

`cmdLst` | `parser.t[996]`

our list of Command objects

`curable` | `parser.t[1009]`

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

`acceptAny ( )` | `parser.t[945]`

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.

`acceptCurable ( )` | `parser.t[929]`

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.

`construct ([args])` | `parser.t[834]`

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.

`getBestCmd ( )` | `parser.t[957]`

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.

`getResErr ( )` | `parser.t[980]`

Get the resolution error, if any. If we parsed but didn't resolve, this returns the error from the first parsing in priority order.

`length ( )` | `parser.t[922]`

number of parsings in the list

Adv3Lite Library Reference Manual
Generated on 01/03/2024 from adv3Lite version 1.6.2