Skip to content

What is(are) the syntax(es) of FuncSug? #28

Answered by cl4cnam
cl4cnam asked this question in Q&A
Discussion options

You must be logged in to vote

For now, FuncSug has two syntaxes:

  • a lisp-like (named lispish) syntax managed by parser.js (which has been generated from funcSug.peggyjs on https://peggyjs.org/online.html, the parser variable is peg)
  • a python-like syntax (named pythonic) managed by parserPy.js (which has been generated from funcSugPy.peggyjs on https://peggyjs.org/online.html, the parser variable is pegPy)

Distinguish between a primitive and a function

The pythonic syntax does not allow you to distinguish between a primitive and a function. In the lispish one, it's possible (but not mandatory) to call a function differently from a primitive. The primitives are all the key of gDict_instructions in interpreter.js.

Which…

Replies: 1 comment

Comment options

cl4cnam
Apr 15, 2024
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by cl4cnam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant