Repository navigation
Add original_node and controller_expressions bindings - #9
Merged
Merged
Conversation
Contributor
|
📖 Documentation preview for this PR: https://pals-project.github.io/PALSParserPy/previews/PR9/ Rebuilt on every push; removed automatically when the PR closes. |
original_node(lat, node) wraps PALSParserCpp's original_node: the node of lat.original a node of expanded, full_expanded, adjunct or combined came from, or None for a computed or controller-driven value. A program reads it to see the expression behind a number, for instance whether it was delayed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
controller_expressions(lat, node) wraps PALSParserCpp's call of that name: for each controls entry reaching a parameter, ABSOLUTE or RELATIVE, its `expression` node in lat.original, in evaluation order. A parameter may be driven by several controllers, hence a list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DavidSagan
force-pushed
the
original-node
branch
from
November 12, 2026 03:21
e21be1e to
5bfd8bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python bindings for
original_nodeandcontroller_expressionsfrom pals-project/PALSParserCpp#99.original_node(lat, node)returns the node oflat.originalthat one node oflat.expanded,lat.full_expanded,lat.adjunctorlat.combinedcame from. It returnsNonefor a value the parser computed and for one an ABSOLUTE controller drives. Every expanded value is a number; this leads back to the expression it was written as, so a program can tell whether it was delayed (expr(...)). A value written by asetleads to that set'svalue.Documented in
docs/src/guide/lattices.mdand listed indocs/src/api.md.controller_expressions(lat, node)lists every controller driving a parameter, ABSOLUTE or RELATIVE: eachcontrolsentry'sexpressionnode inlat.original, in evaluation order. Several controllers may drive one parameter, so this is a list. Threeget_parentsteps from an expression reach its controller.Tests: 124 pass (5 new) against PALSParserCpp
main.🤖 Generated with Claude Code