lutaml / expressir

Ruby parser for the ISO EXPRESS language
3 stars 3 forks source link

Crash when encountering unsupported symbols #151

Open ronaldtse opened 6 months ago

ronaldtse commented 6 months ago

From https://github.com/metanorma/iso-10303-srl/issues/89

schemas/resources/ISO13584_expressions_schema/ISO13584_expressions_schema.exp The offending section is this:

ENTITY comparison_expression
ABSTRACT SUPERTYPE OF (ONEOF (comparison_equal,
                                comparison_greater,
                                comparison_greater_equal,
                                comparison_less,
                                comparison_less_equal,
                                comparison_not_equal,
                                like_expression))
SUBTYPE OF (boolean_expression, binary_generic_expression);
    SELF\binary_generic_expression.operands    : LIST [2:2] OF
expression;
WHERE
    WR1: ((‘ISO13584_EXPRESSIONS_SCHEMA.NUMERIC_EXPRESSION’
             IN TYPEOF(SELF\binary_generic_expression.operands[1]))
      AND
       ‘ISO13584_EXPRESSIONS_SCHEMA.NUMERIC_EXPRESSION’
             IN TYPEOF(SELF\binary_generic_expression.operands[2]))
   OR
        ((‘ISO13584_EXPRESSIONS_SCHEMA.BOOLEAN_EXPRESSION’
             IN TYPEOF(SELF\binary_generic_expression.operands[1]))
      AND
       (‘ISO13584_EXPRESSIONS_SCHEMA.BOOLEAN_EXPRESSION’
          IN TYPEOF(SELF\binary_generic_expression.operands[2])))
   OR
       ((‘ISO13584_EXPRESSIONS_SCHEMA.STRING_EXPRESSION’
             IN TYPEOF(SELF\binary_generic_expression.operands[1]))
      AND
       (‘ISO13584_EXPRESSIONS_SCHEMA.STRING_EXPRESSION’
             IN TYPEOF(SELF\binary_generic_expression.operands[2]))) ;
END_ENTITY;

The crash is due to these symbols:

‘
’