|DXF parser in lex/yacc? andrewe@technologyXchange.com (Andrew Ellerton) (1998-02-15)|
|Re: DXF parser in lex/yacc? email@example.com (Reini Urban) (1998-02-18)|
|From:||Reini Urban <firstname.lastname@example.org>|
|Date:||18 Feb 1998 23:07:35 -0500|
Andrew Ellerton <andrewe@technologyXchange.com> wrote:
>I've poked around news group archives, lists of freely available
>parsers/compiler tools and the Autocad site - if there is a lex/yacc parser
>for DXF available, I can't find it.
The DXF syntax is trivial. You may write your own yacc if you really
need it in 6 lines but I doubt. yacc is overkill for DXF.
I suggest writing your parser by hand:
There are always pairs of two lines, the first is a number, the second a
value according the number.
The whole mess is split up in 4 sections:
header, tables, blocks and entities
with some subsections.
I successfully wrote a parser in perl in 3 minutes which deletes all
the handles, for Forth there is DXFIX.DXT in your support dir, and in
the handbook are basic examples.
-- Reini Urban
AutoCAD stuff at http://xarch.tu-graz.ac.at/autocad/
Return to the
Search the comp.compilers archives again.