JS WAM: op/3 dynamic Pratt operator table - #4200
Open
s243a wants to merge 1 commit into
Open
Conversation
Clone the ISO default infix/prefix tables into live copies that op/3 mutates (xfx/xfy/yfx, fx/fy, xf/yf; priority 0 removes). Compile-time :- op/3 declarations seed the table via javascript_wam_ops/1. Co-authored-by: johns243a <johns243a@gmail.com>
s243a
marked this pull request as ready for review
August 30, 2026 18:22
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.
G-W2 follow-up: the JS WAM Pratt reader now consults a live operator table so
op/3(and compile-time:- op/3viajavascript_wam_ops/1) can add or override ISO defaults.What landed
xfx/xfy/yfx, prefixfx/fy, postfixxf/yfjavascript_wam_ops([op(P,T,N), ...])(aliasjs_op_decls/1) →Runtime.install_declared_opsTests
probe_op3/0: custom infix + prefix + postfix + list-of-names, parsed withread_term_from_atom/2, matching SWIemitted_op_decls: compile-timejavascript_wam_ops([op(700, xfx, likes)])without a runtimeop/3callBranched from
grok/wamjs-term-metaand extended it (net additions). NoINTEGRATION_PATCH.md(no shared files).Residuals
current_op/3not implemented