Re: [graphviz-interest] Parsing DOT file with Perl + C

Ron Savage <[email protected]> Sun, 30 Nov 2014 06:27:13 +1100
Newsgroups gmane.comp.video.graphviz
Message-ID <[email protected]>
Hi Pander

On 30/11/14 00:47, Pander wrote:
> On 11/29/2014 10:05 AM, Ron Savage wrote:
>> Hi
>>
>> I've released GraphViz2::Marpa, V 2.01, my Marpa-based parser for DOT
>> files.
>>
>> It's shipped with 91 test files I created, and 264 copied from V 2.38 of
>> GraphViz2. Of my tests, about 8 are deliberate fails. All of the
>> Graphviz files pass.
>>
>> See (code): https://metacpan.org/release/GraphViz2-Marpa
>>
>> And (demo for my files):
>> http://savage.net.au/Perl-modules/html/graphviz2.marpa/index.html
>
> Nice.
>
> Do you want to ship this with Graphviz eventually?

No, I wasn't aiming for that. Gigabytes of Perl modules are on-line, and 
anyone googling for a Perl-based parser for DOT would (hopefully) find it.

Perhaps a patch to Graphviz's docs would simplify access to my code by 
mentioning the existence of the module.

I should also mention Marpa itself now has a dev stream called Kollos:
https://github.com/jeffreykegler/kollos/blob/master/about.md
which will put Lua inside Marpa, so a Lua-based interface to Marpa will 
be available in parallel with the Perl interface. That means C programs 
will be able to use Marpa without needing Perl.

>>
>> The huge page of demo images from the Graphviz distro files can be
>> reached from the demo file page above.
>>
>> Testing consists of:
>> o Use dot to convert *.gv into *.svg.
>> o Use GraphViz2::Marpa to parse *.gv.
>> o Render the parsed file back into *.gv (this is called round-tripping).
>> o Use dot to convert these rendered *.gv files into *.svg.
>> o Use diff to compare dot's output from the original *.gv with its
>> output from my rendered *.gv.
>>
>

-- 
Ron Savage - savage.net.au
_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest