Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate parsing step #550

Open
tavmem opened this issue Sep 2, 2019 · 0 comments
Open

Separate parsing step #550

tavmem opened this issue Sep 2, 2019 · 0 comments

Comments

@tavmem
Copy link
Collaborator

tavmem commented Sep 2, 2019

@bakul suggested this in a comment on issue #521

My gut feeling is that a separate parsing step would simplify things. 
Such a parsing step would not require a dictionary. For example:

// input expression
// => parsed representation
a+2
=>      (+;`a;2)
+[a;2]
=>      (+;`a;2)
a:b+c
=>      (:;`a;(+;`b;`c))
a:x; if[x>0; f(a-1)]; a
=>      (";";  (:;`a;`x);  (`if; (>;`x;0); (`f;(-;`a;1)));  `a)

The parsed rep. can be directly interpreted and that is where you need 
a global and local dict. No idea how much work this change would be.

Setting it up as a separate issue so it doesn't get lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant