AmpersandTarski / Ampersand

Build database applications faster than anyone else, and keep your data pollution free as a bonus.
http://ampersandtarski.github.io/
GNU General Public License v3.0
40 stars 8 forks source link

Give proper error messages when parsing improper AtlasImport file. #1495

Open hanjoosten opened 1 month ago

hanjoosten commented 1 month ago

For the Atlas import, a JSON file is generated by the Atlas. However, there can be issues with the generated file. I.e, the name of a concept cannot be any string. It must abide to the rules for a name. Currently, when this happens, a fatal is thrown. The JSON parser should be refactored, so it doesn't result in a P_Context, but in a Guarded P_Context.

hanjoosten commented 1 month ago

The parsing of the .json file, generated by the Atlas, has been modified. It now returns proper error messages. However, in doing so, the special command to cope with the .json file has been abandoned. Any file that is given to the parser of Ampersand, that has the extention .json, will be parsed by the conventions of the Atlas. Such file could now even be INCLUDE-d in other scripts. @SimonvRoozendaalOrdina , instead of using the AtlasImport utility, you now can use the check command and the export command. Use the .json file as the input script.