User Tools

Site Tools


formats:zax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
formats:zax [2009-11-08 23:24] edheldilformats:zax [2010-10-17 21:51] (current) edheldil
Line 1: Line 1:
 ==== CObject Text File ==== ==== CObject Text File ====
 +
 +Most of the text data files in Lionheart are text dumps of classes. They are the same general format, so this page should suffice to describe them all.
  
 ==== Purpose: ==== ==== Purpose: ====
Line 12: Line 14:
 ==== EBNF specification ==== ==== EBNF specification ====
  
 +  (* FIXME: I have not tested this specification, so there are probably errors in it *)
 +  (* FIXME: Dynamic Properties are not handled in this description *)
 +  (* FIXME: DialogTree dash lines are not handled in this description *)
 +  (* FIXME: spurious empty lines and EOLs are not handled as well *)
 +  
   cobject = classname , [ init_args ] , EOL , cobject_data ;   cobject = classname , [ init_args ] , EOL , cobject_data ;
 +  
   init_args = "(" , int , { "," , int } , ")" ;   init_args = "(" , int , { "," , int } , ")" ;
- +   
-  cobject_data = "{" , EOL, ( keyvalue_data | raw_data ) , "}"+  cobject_data = indent, "{" , EOL, ( keyvalue_data | raw_data ) , indent, "}"
-  keyvalue_data = { key , "=" , value , EOL } ; +  keyvalue_data = { indent , key , "=" , value , EOL } ; 
-  raw_data = { value , EOL } ; +  raw_data = { indent , value , EOL } ; 
 +  
   key = limited string ;   key = limited string ;
   value = string | bool | int | float | cobject ;   value = string | bool | int | float | cobject ;
 +  indent = { whitespace } 
 +  
   bool = "0" | "1" ;   bool = "0" | "1" ;
   int = ( [ "-" ] , digit , { digit } ) | limited string ;   int = ( [ "-" ] , digit , { digit } ) | limited string ;
Line 29: Line 37:
   float exponential = float decimal , "e" , [ "-" ] , digit , { digit } ;   float exponential = float decimal , "e" , [ "-" ] , digit , { digit } ;
   string = { printable | whitespace } ;   string = { printable | whitespace } ;
-  limited string = printable | ( printable string printable } ; +  limited string = keychar | ( keychar { keychar | whitespace } keychar } ; 
 +  classname = letter , { letter | digit | "-" } ; 
 +  
   EOL = "\r" , "\n" ;   EOL = "\r" , "\n" ;
   digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;   digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
-  whitespace = " " ; +  whitespace = " " | "\t" ; 
-  printable = "\041" .. "\176" ; (* this is not EBNF, but what the heck *)+   
 +  (* meaning of these is hopefully clear *) 
 +  printable = "\041" .. "\176" ? ;  
 +  keychar = ? "\041" .. "\074" ? | ? "\076" .. "\176"; (* probably some other chars except "=" are banned as well *) 
 +  letter = ? "A" .. "Z" ? | ? "a" .. "z" ? ;
  
 ==== Classes ==== ==== Classes ====
 Activities/AIs, Actions, ... Activities/AIs, Actions, ...
  
formats/zax.1257722663.txt.gz · Last modified: 2009-11-08 23:24 by edheldil