lib/predicate/grammar.sexp.yml in predicate-2.4.0 vs lib/predicate/grammar.sexp.yml in predicate-2.5.0

- old
+ new

@@ -1,10 +1,12 @@ rules: predicate: - tautology - contradiction - identifier + - qualified_identifier + - var - not - and - or - eq - neq @@ -12,20 +14,27 @@ - lte - gt - gte - in - intersect + - subset + - superset - match - native + - empty + - has_size + #jeny(predicate) - ${op_name} tautology: - [ true ] contradiction: - [ false ] identifier: - [ name ] qualified_identifier: - [ name, name ] + var: + - [ formaldef, semantics ] not: - [ predicate ] and: - [ predicate+ ] or: @@ -44,20 +53,31 @@ - [ term, term ] in: - [ varref, term ] intersect: - [ term, term ] + subset: + - [ term, term ] + superset: + - [ term, term ] match: - [ term, term, options ] + empty: + - [ term ] + has_size: + - [ term, term ] +#jeny(predicate) ${op_name}: +#jeny(predicate) - [ TODO ] term: - varref - literal - placeholder - opaque varref: - qualified_identifier - identifier + - var native: - [ "::Proc" ] literal: - "::Object" placeholder: @@ -66,5 +86,14 @@ - "::Object" options: - "::Hash" name: !ruby/regexp /^[a-zA-Z0-9_]+[?!]?$/ + semantics: + !ruby/regexp /^(dig)$/ + formaldef: + - string_formaldef + - array_formaldef + string_formaldef: + - "::String" + array_formaldef: + - "::Array"