Enhancing EQL Parser
Incoming changes description:
-
EntityQueryLanguage : Parses DSL strings like
AIRCRAFT()
.
-
Handling Multiple Argument : If an entity type (e.g.,
AIRCRAFT
) can take multiple sub‐entities of the same kind (e.g., multiple AIRLINE(...)
clauses), we accumulate them into a Python list internally.
-
Merging
__matches__
- In earlier code, merging two
__matches__
dictionaries used +=
, which failed (since you cannot +=
two dicts).
- Now I suggest
dict.update()
and, when the same argument name appears twice, we convert the existing value into a list and append the new one.
Examples
- How many aircrafts in the database. Expected dsl should be only AIRCRAFT()
- How many aircrafts for Air France and Brussel Airlines. Expected dsl should be only AIRCRAFT(AIRLINE("Air France"), AIRLINE("Brussels airlines"))
