New data file parser #13
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace the LecFicDiffuse_JDD with a new DataFile parser/preprocessor.
The goal of this change is to provide more flexibility in data files, while providing better user feedback when an error occure.
The way it work is by parsing a first time the data file, do some action on it and feed to the interpreters a regular string (similar to the current LecFicDiffuse_JDD procedure).
This parser add the following functionality:
becomes
Limitations:
For those reasons, a bunch of reference test cases had to be modified to match this parser syntax.
I've suppress the LecFicDiffuse_JDD and EChaineJDD source code, and added DataFile, DataFileToken and DataFileExpression files.
Some change has also be made to Lire_Fichier to make it work with the new read tracker system. I also add a method to read one single character from an Entree object.
This implementation creates quite a few copy of strings and list, but make it more efficient on those aspects would generate quite a lot of unecessary complexity as data files do not contains millions of tokens.
Tests Incorrect_syntax and Macro have been added to check if the syntax error catching system works and to demonstrate the macro usage.
I've tried to catch all the possible invalid input a user could write, but I'm not 100% sure to have catch them all.
A few examples:


