File 'parse.tcl' (part of 'ParseTools')


Home | Packages | Files | Procedures | Keywords


Written by
Andreas Kupries (a.kupries@westend.com)
Description
High level parsing functionality using the tcl-level tokenizer

::parsetools::TTT (node tokens)

Internal command. Used by ::parsetools::tokensToTree to do the main work. Recurses down into the implicit tree while building it explicitly.
Argument: node The handle / object command of the node the new found children are added to.
Argument: tokens The list of tokens to convert.

::parsetools::_compactTree (type obj op args)

See ::parsetools::compactTree.
Argument: type The type of the object we are processing, either 'tree' or 'node'.
Argument: obj The handle of the current object.
Argument: op Either 'enter' or 'leave', allowing us to distinguish between the two calls beforee and after processing the children of the object in question.
Argument: args Additional arguments. For nodes the first of them contains the nesting level of node in the tree.

::parsetools::_expandBrackets (type obj op args)

See ::parsetools::expandBrackets.
Argument: type The type of the object we are processing, either 'tree' or 'node'.
Argument: obj The handle of the current object.
Argument: op Either 'enter' or 'leave', allowing us to distinguish between the two calls beforee and after processing the children of the object in question.
Argument: args Additional arguments. For nodes the first of them contains the nesting level of node in the tree.

::parsetools::_treeToScript (type obj op args)

See ::parsetools::treeToScript.
Argument: type The type of the object we are processing, either 'tree' or 'node'.
Argument: obj The handle of the current object.
Argument: op Either 'enter' or 'leave', allowing us to distinguish between the two calls beforee and after processing the children of the object in question.
Argument: args Additional arguments. For nodes the first of them contains the nesting level of node in the tree.

::parsetools::_treeToTokens (type obj op args)

See ::parsetools::treeToTokens.
Argument: type The type of the object we are processing, either 'tree' or 'node'.
Argument: obj The handle of the current object.
Argument: op Either 'enter' or 'leave', allowing us to distinguish between the two calls beforee and after processing the children of the object in question.
Argument: args Additional arguments. For nodes the first of them contains the nesting level of node in the tree.

::parsetools::_varStructure (type obj op args)

See ::parsetools::varStructure.
Argument: type The type of the object we are processing, either 'tree' or 'node'.
Argument: obj The handle of the current object.
Argument: op Either 'enter' or 'leave', allowing us to distinguish between the two calls beforee and after processing the children of the object in question.
Argument: args Additional arguments. For nodes the first of them contains the nesting level of node in the tree.

::parsetools::compactTree (tree)

Takes a standard syntax tree as generated by ::parsetools::scriptToTree and removes redundant information. Afterward the tree contains less attributes and its size is reduced as much as possible without losing information.
Argument: tree The handle/name of the tree to manipulate.

::parsetools::expandBrackets (tree)

Takes a standard or compacted syntax tree as generated by ::parsetools::scriptToTree and expands any internal bracketed commands by parsing them too.
Argument: tree The name of the tree to manipulate.

::parsetools::scriptToTree (tree script)

Parses the script into a list of tokens and converts these then into the equivalent standard syntax tree.
Argument: tree The name of the new tree, the name of the object command to access the new tree. An existing tree of that name is deleted.
Argument: script The script to parse and store in the array.
Returns: tree.

::parsetools::tokensToTree (tree tokens)

Convert a list of tokens into an equivalent syntax tree. No changes are made to the tree.
Argument: tree The name of the new tree, the name of the object command to access the new tree. An existing tree of that name is deleted.
Argument: tokens The list of tokens to convert.
Returns: tree.

::parsetools::treeToScript (tree)

Traverses the specified tree and generates the original script form along the way. Uses the attribute 'scriptvalue' to associate intermediate results with the nodes in the tree thus obviating the need for separate state variables containing the state of the processor.
Argument: tree The handle/name of the tree we are working on.
Returns: a tcl script

::parsetools::treeToTokens (tree)

Traverses the specified tree and generates the original token form along the way. Uses the attribute 'tokens' to associate intermediate results with the nodes in the tree thus obviating the need for separate state variables containing the state of the processor.
Argument: tree The handle/name of the tree we are working on.
Returns: a list of tokens.

::parsetools::varStructure (tree)

Takes a standard syntax tree and adds more structure into variable references (better marking of base name and index parts).
Argument: tree The handle/name of the tree to manipulate.


Home | Packages | Files | Procedures | Keywords



Generated by AutoDoc 2.3 at 04/27/2001, invoked by Andreas Kupries,,,