Discussion:
[OpenSCAD] Are All the Language Features in src/lexer.l and src/parsery.y
Torsten Paul
2018-09-02 22:27:48 UTC
Permalink
/src/lexer.l
/src/parser.y
Yep, that describes the full parser.

The actual built-ins can be found searching for Builtins::init(),
see:

https://github.com/openscad/openscad/blob/master/src/builtin.cc
/src/scadlexer.cpp > for a list of "built-in" capabilities.
That lexer is GUI only, it has no influence on the actual
language, but it *should* be in sync for most keywords.

ciao,
Torsten.
doug moen
2018-09-02 22:29:31 UTC
Permalink
scadlexer.cpp is not authoritative. I don't see "intersection_for", so at
least that is missing.

keywordSet[2] appears to be used for keywords used in doxygen comments, in
case you happen to process your openscad source code using doxygen. These
keywords are not part of openscad.
I've been wondering about the feasibility of writing an OpenSCAD converter
or
interpreter so I've been looking through the source to for the
specification
of the grammar and a comprehensive sense of built-in capabilities. So far
/src/lexer.l
/src/parser.y
for the grammar
and
/src/scadlexer.cpp
for a list of "built-in" capabilities.
Is that enough to give me a reasonably comprehensive list of stuff that's
in
the language?
Also, I'm wondering what keywordSet[2] is for. Can anyone tell me?
--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
doug moen
2018-09-02 22:42:07 UTC
Permalink
Oops, my local repo was out of date. "intersection_for" is now mentioned in
scadlexer.cpp.
Post by doug moen
scadlexer.cpp is not authoritative. I don't see "intersection_for", so at
least that is missing.
keywordSet[2] appears to be used for keywords used in doxygen comments, in
case you happen to process your openscad source code using doxygen. These
keywords are not part of openscad.
I've been wondering about the feasibility of writing an OpenSCAD
converter or
interpreter so I've been looking through the source to for the
specification
of the grammar and a comprehensive sense of built-in capabilities. So far
/src/lexer.l
/src/parser.y
for the grammar
and
/src/scadlexer.cpp
for a list of "built-in" capabilities.
Is that enough to give me a reasonably comprehensive list of stuff that's
in
the language?
Also, I'm wondering what keywordSet[2] is for. Can anyone tell me?
--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Antonio Bueno
2018-09-02 22:35:52 UTC
Permalink
I looked into this last february:
https://github.com/openscad/openscad/issues/2292 and scadlexer.cpp wasn't
enough

Maybe the first image in that link and the text below can help you.
I've been wondering about the feasibility of writing an OpenSCAD converter
or
interpreter so I've been looking through the source to for the
specification
of the grammar and a comprehensive sense of built-in capabilities. So far
/src/lexer.l
/src/parser.y
for the grammar
and
/src/scadlexer.cpp
for a list of "built-in" capabilities.
Is that enough to give me a reasonably comprehensive list of stuff that's
in
the language?
Also, I'm wondering what keywordSet[2] is for. Can anyone tell me?
--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Saludos,
Antonio
Loading...