home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 754 of 2,753   
   Hans-Peter Diettrich to AkiRoss   
   Re: Bison grammar for .x files   
   04 Aug 06 16:39:52   
   
   From: DrDiettrich1@aol.com   
      
   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   
   >  { 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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca