Related articles |
---|
Bison grammar for .x files akirosspower@gmail.com (AkiRoss) (2006-08-03) |
Re: Bison grammar for .x files DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-08-04) |
Re: Bison grammar for .x files haberg@math.su.se (2006-08-04) |
From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | 4 Aug 2006 16:39:52 -0400 |
Organization: | Compilers Central |
References: | 06-08-009 |
Keywords: | yacc, parse |
Posted-Date: | 04 Aug 2006 16:39:52 EDT |
AkiRoss wrote:
> i'm trying to use flex+bison to build an interpreter for a file format
> (directx .x files). I hope this group is the right one.
> Quote from specs: "Use of commas and semicolons. This is perhaps the
> most complex syntax issue in the file format, but is very strict:
> Commas are used to separate array members; semicolons terminate every
> data item."
Can arrays be data items?
Can arrays be array members?
> For example, a structure like this:
> struct A { int, int, int[3] } in the .x file will be something like: A
> <name> { 1; 2; 3,4,5;; }
>
> a nested structure like: struct A {int, int}; struct B {A[3]; } will be
> something like: B {1;2;,3;4;,5;6;;}
I suspect something like this:
Item = SimpleItem ";" | Array ";" .
Array = Item { "," Item } .
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.