Hello,
Sorry for the lack of interaction this days, I have been very busy with
school assignments and also doing research about parsers and how to
implement them. Below is a brief description of what I have been doing :
First of all, I read about what a parser is, how it works, grammars (I don
t fully understand them yet, but I got a good concept of it).
Shortly after, I started working on a lemon re2c parser, as I understood
this type of parser is currently used in other BRL-CAD importers. I managed
to get the parser correctly identify and parse tokens like group() or other
functions( multimatrix() ) and correctly identify imbricated tokens. What I
haven't managed is to write a proper grammar for that. I have some errors
at the moment and I'm working towards fixing them and coming up with a
decent prototype of parser that could tokenize group() and every function
in it. This prototype (in my humble opinion) should be the starting point
of my project for the summer and also a good way to prove that I have the
necessary skills to succeed.
I have also read about the directed acyclic graph (dag) that BRL-CAD uses
to store its information. The direct acyclic graph is, in fact, a tree. As
suggested, I've looked in the intaval converter files to get a better idea
of the importing process structure (reading external format and writing .g
file parts) and I believe I could reproduce the given example in order to
accomplish the tasks I've proposed.
You can find here
<https://www.dropbox.com/s/2mqkn9y5wcj758h/re2c_parser.zip?dl=0> the re2c
lemon parser (that is based on
https://github.com/tokuhirom/re2c-lemon-tutorial ) that basically should
read the input stream from terminal and identify the group() function and
its containings. It's not functional yet (it was, before I added the
grammar) and it's not meant for review, but rather to give you guys a clear
marker on what's my progress so far. Hopefully, I'll get the grammar going.
I'm struggling with syntax, but I believe the grammar is the following:
expr -> group_begin token group_end
token -> group_content token | expr
where group_begin is "group() {"
token is [a-z]+ "("*")";
and group_end is "}"
Regards,
Andrei
On Thu, Mar 26, 2015 at 1:48 AM, Ilinca Andrei <andrei.ilinc...@gmail.com>
wrote:
> Hello,
>
> I have updated my proposal according to the last feedback I received.
> Here's a summary of what I have been doing:
> - I used OpenSCAD to create a form provided by them (door stopper) to
> better see the difference between actual .scad and .csg
> - I updated my timeline to reflect "implement .csg -> implement .scad
> development logic/timeline"
> - proposed a better use of community bonding period, research both about
> parsers (probably more specifically, yacc) as well as if there are any
> other major differences between .csg and .scad
>
> Thanks a lot for all the support I have been getting, it certainly helped
> me navigate to a feasible idea!
>
> You can find my proposal <here>
> <https://www.dropbox.com/s/yzsuib26q5x5rdz/OpenSCADImporterProposal%281%29.pdf?dl=0>
> as well as on Melange, any feedback is appreciated!
>
> Regards,
> Andrei
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel