- This qualifier allows overriding of CSV field numbers given in base classes
- This is required for the WEAPON stats because it differs from most other stats in that it doesn't have the "designable" field as the last CSV field
* Specify all CSV field numbers for the fields in struct WEAPON
* Generate SQL INSERT statements from weapons.txt
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6553 4a71c877-e1ca-e34f-864e-861f7616d084
- New enum-field level qualifier: `%string "<string to use>";`
* Use this to specify the custom strings for enum SENSOR_TYPE
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6335 4a71c877-e1ca-e34f-864e-861f7616d084
* Change the make rules for all files produced from the database meta language such that they have the language parser and code generator as dependency as well (i.e. if they change their files will be rebuilt)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6312 4a71c877-e1ca-e34f-864e-861f7616d084
* Include the filename of the currently being parsed file in error messages
* Make sure to reset Perl's line counter ($.) when we start parsing a new file (when using <> as file handle)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6101 4a71c877-e1ca-e34f-864e-861f7616d084
* User code can use this to provide code that the SQLite code generator can use to get a pointer to some other struct
* Make it so that you can only declare member fields with a `struct` type when the respective struct has a %fetchByRow directive in it
* Generate loading code for struct-type fields in the c_sqliteload codegenerator by means of the code provided by the %fetchByRow directive
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5523 4a71c877-e1ca-e34f-864e-861f7616d084
* Allows "linking" in the database to other struct instances
* Will be represented as a pointer to the target struct in the C datastructures
* Will be represented as an integer ID in tables
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5519 4a71c877-e1ca-e34f-864e-861f7616d084
* Generate macro definitions similar to our current "inheritance-like" structure as created by macros when the above %macro directive is used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5498 4a71c877-e1ca-e34f-864e-861f7616d084
- This directive adds a suffix to the names of structs (in the generated C code) and the subclasses that inherit from that struct
* Use %suffix instead of %prefix in test_code.tpl
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5483 4a71c877-e1ca-e34f-864e-861f7616d084
* This will add an enumerator to the end of the generated C enum code with "param" as its name (prefixed by the enum's name of course)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5482 4a71c877-e1ca-e34f-864e-861f7616d084
* This is a dummy type that causes the rest of the line to be included literally in the struct's definition
* Use this field type to add ppIMDList (member var of BODY_STATS in statsdef.h)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5460 4a71c877-e1ca-e34f-864e-861f7616d084
* Use these line numbers in the output of the SQLite C loading code generator to produce #line directives
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5443 4a71c877-e1ca-e34f-864e-861f7616d084
* Utilize these line numbers to generate #line directives in the output file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5438 4a71c877-e1ca-e34f-864e-861f7616d084
* %preLoadTable which specifies a code block to be executed just __before__ loading in all rows in a database
* %postLoadRow which specifies a code block to be executed after every row has been succesfully loaded in a struct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5433 4a71c877-e1ca-e34f-864e-861f7616d084
* Add a template file which is used by this new code generator as a file "header"
* Add a new struct-level directive to the mini database meta scheme language: %loadFunc which specifies that the above code generator should generate a loading function for this type plus what its name should be
* Add a new entry for this code generator to the Makefile for testing purposes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5432 4a71c877-e1ca-e34f-864e-861f7616d084
* "optional" which specfies that the given field is optional and can thus be NULL.
* Only allow this keyword for the string and IMD_model types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5381 4a71c877-e1ca-e34f-864e-861f7616d084
This will allow for adding multiple qualifiers to the same field later on.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5379 4a71c877-e1ca-e34f-864e-861f7616d084
Move the duplicated effort of looping over all structs and enums out of the code generators and into the code that invokes the code generator. Thus instead of invoking the code generator once to generate code for all structs and enums, we now invoke it once for every struct and enum.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5367 4a71c877-e1ca-e34f-864e-861f7616d084
Give the code generators the opportunity to print something at the start and the end of the file. E.g. header guards for C files, and some notice about the file being automatically generated for all types.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5363 4a71c877-e1ca-e34f-864e-861f7616d084
In addition we now also parse the "unique" keyword in set and enum lines and thus process it there as well.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5360 4a71c877-e1ca-e34f-864e-861f7616d084
Instead we now have a two phase process:
* First parse and build an abstract syntax tree (AST)
* Secondly loop over the generated AST to produce useable code for the target language.
NOTE: Currently only the C struct definition generator is rewritten to this new architecture.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5359 4a71c877-e1ca-e34f-864e-861f7616d084
This code generator is still in a prototyping phase. It'll probably get rewritten entirely.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5358 4a71c877-e1ca-e34f-864e-861f7616d084