You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make DATAGEN tool strictly check the syntax of the input files and elements according to the documentation, so that errors are more informative and can be more easily solved.
Design:
A tree can be built with the possible child nodes that each directive can/should have.
OR:
Up to now, data input and checking in DATAGEN is separated from the data output functions. The data generation step is quite (completely?) segregated from the data input step.
We can ensure that the separation between data input and code generation is complete (if it is not)
We must also ensure that no die calls during code generations are due to data definition errors. It there are some cases of this, the checks and errors should be moved to the functions before code generation.
In the code generation stage, the only die's allowed are those for no write access, error writing files, etc. but we must be sure that the game data can be correctly generated with the data that has been read from the GDATA files.
Once we have ensured that the separation between data input and code generation is complete, we can add additional checks to the data input stage without disturbing the code generation stage. We will use the documentation to ensure that all the documented limits are also checked and enforced in the data input steps.
Then we can add a new flag to datagen.pl let's say, -v (for "verification"), or reuse -c (for "check") to indicate that we only want to check the syntax of the GDATA files
In datagen.pl we can check this flag just before the data generation functions, and end with a success message if it was supplied. If we reach that place, it means that GDATA file loading was successful, since if not we would have die'd in previous functions.
And if the "syntax check" is not supplied, continue as it is now, and generate all the code.
Tasks:
Ensure that no checks are done during code generation stage. If there are some, migrate the checks to the data input stage
Ensure that errors during code generation are only generated due to file conditions: no permissions, no disk space, etc.
Add "syntax check" flag and make DATAGEN stop with success message if the flag is supplied, instead of generating game code
Review DATAGEN documentation and ensure that all limitations mentioned there are also checked and reported by datagen.pl. Add new checks if needed to the data input stage.
The text was updated successfully, but these errors were encountered:
Make DATAGEN tool strictly check the syntax of the input files and elements according to the documentation, so that errors are more informative and can be more easily solved.
Design:
OR:
die
calls during code generations are due to data definition errors. It there are some cases of this, the checks and errors should be moved to the functions before code generation.die
's allowed are those for no write access, error writing files, etc. but we must be sure that the game data can be correctly generated with the data that has been read from the GDATA files.datagen.pl
let's say,-v
(for "verification"), or reuse-c
(for "check") to indicate that we only want to check the syntax of the GDATA filesdatagen.pl
we can check this flag just before the data generation functions, and end with a success message if it was supplied. If we reach that place, it means that GDATA file loading was successful, since if not we would havedie
'd in previous functions.Tasks:
datagen.pl
. Add new checks if needed to the data input stage.The text was updated successfully, but these errors were encountered: