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
I'm looking at:
/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/
On 09/02/2018 11:58 PM, NateTG wrote:
/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.
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.
On 2 September 2018 at 17:58, NateTG nate-openscadforum@pedantic.org
wrote:
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
I'm looking at:
/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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
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.
El dom., 2 sept. 2018 a las 23:59, NateTG (nate-openscadforum@pedantic.org)
escribió:
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
I'm looking at:
/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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Saludos,
Antonio
Oops, my local repo was out of date. "intersection_for" is now mentioned in
scadlexer.cpp.
On 2 September 2018 at 18:29, doug moen doug@moens.org wrote:
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.
On 2 September 2018 at 17:58, NateTG nate-openscadforum@pedantic.org
wrote:
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
I'm looking at:
/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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3 wrote
...
The actual built-ins can be found searching for Builtins::init(),
see:
https://github.com/openscad/openscad/blob/master/src/builtin.cc
...
ciao,
Torsten.
...
That's exactly the info I was looking for. Thanks.
--
Sent from: http://forum.openscad.org/