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

parens don't nominalize a verb #36

Closed
ngn opened this issue Jan 2, 2016 · 1 comment
Closed

parens don't nominalize a verb #36

ngn opened this issue Jan 2, 2016 · 1 comment
Labels

Comments

@ngn
Copy link
Contributor

ngn commented Jan 2, 2016

According to k.txt a parenthesized expression always parses as a noun:

grammar: E:E;e|e e:nve|te| t:n|v v:tA|{E}|V n:t[E]|(E)|[E]|N

Therefore, I think the following should return 1:

 #,(+)
(#,+)
@JohnEarnest
Copy link
Owner

That grammar description should be taken with a grain of salt; it omits some details and edge cases which are definitely in the real parser. In the case you point out, though, you are correct. Arthur's interpreter:

 #,(+)
1

@JohnEarnest JohnEarnest added the bug label Jan 2, 2016
JohnEarnest added a commit that referenced this issue Jan 4, 2016
…AST node representing a quoted verb, and extend the prettyprinter/parser/evaluator to treat it properly. The tweak appears to work, but still may be missing certain cases.
refi64 pushed a commit to refi64/ok that referenced this issue Apr 28, 2016
… add a new AST node representing a quoted verb, and extend the prettyprinter/parser/evaluator to treat it properly. The tweak appears to work, but still may be missing certain cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants