Skip to content

expparse.y parser should raise syntax errors #354

@cshorler

Description

@cshorler

Whilst working on exp2py I decided to simplify the handling of the group operator by introducing a new enum value (OP_GROUP_DOT) for when you have either of these cases:

self\entity_ref.attr_id
expression\entity_ref.attr_id

This vastly simplifies the implementation for converting these expressions to Python

It was then I noticed:

  1. use cases for the plain expression\entity (no attribute id) are not enforced (||, =)
  2. the second form of qualified attribute is not in the grammar.

So then I started to fix these issues and encountered many other issues and started to fix these (tests yet to be run, and we will need more tests I think)

For example:
The query expression interval operators are given in the interval rule as rel_op, which includes many other operators. Then the interval is reduced to a unary expression, then an expression before finding it's way into the query expression. Presumably this means any number of query expressions with invalid syntax would be parsed without triggering a Syntax error?

Also when regenerating expparse.y /.c, the cmake rule causes make to clean the expparse.out on failure. I think this is due to LEMON_GEN_OUT being specified in the OUTPUTS of the add_custom_command in the cmake library file cmake/FindLEMON.cmake

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions