From d9090aec61179d3b1fdce24fea724c8e346a5e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saulius=20Gra=C5=BEulis?= Date: Mon, 15 Jul 2019 16:04:56 +0300 Subject: [PATCH 1/7] Describing syntax and intended interpretation of the LIKE and UNLIKE operators. --- optimade.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/optimade.md b/optimade.md index ed529dd48..25aa5e2ce 100644 --- a/optimade.md +++ b/optimade.md @@ -1298,8 +1298,22 @@ In addition to the standard equality and inequality operators, matching of parti OPTIONAL features: +The following comparison operators are OPTIONAL: + +* `identfier LIKE x` + +* `identfier UNLIKE x` + * Support for x to be an identifier, rather than a string is OPTIONAL. +If implemented, the "LIKE" operator MUST behave as the correspoding standard SQL operator. In particular, +The `x` string MUST be interpreted as a pattern where an underscore character ('_', ASCII DEC 95, HEX 5F) +matches any single character and a percent character ('%', ASCII DEC 37, HEX 25) matches an arbitrary +sequence of characters (including zero characters). + +If operator "UNLIKE" is supported, the bahavior of this oprtator MUST be the negation of the "LIKE" operator; i.e. +an expression `(property UNLIKE "value")" must behave exactly as `(NOT (property LIKE "value"))`. + Examples: * `chemical_formula_anonymous CONTAINS "C2" AND chemical_formula_anonymous STARTS WITH "A2"` @@ -2218,7 +2232,8 @@ ValueOpRhs = Operator, Value ; KnownOpRhs = IS, ( KNOWN | UNKNOWN ) ; -FuzzyStringOpRhs = CONTAINS, String | STARTS, [ WITH ], String | ENDS, [ WITH ], String ; +FuzzyStringOpRhs = CONTAINS, String | STARTS, [ WITH ], String | ENDS, [ WITH ], String | + LIKE, String | NOT, LIKE, String | UNLIKE, String ; SetOpRhs = HAS, ( [ Operator ], Value | ALL, ValueList | ANY, ValueList | ONLY, ValueList ) ; (* Note: support for ONLY in SetOpRhs is OPTIONAL *) @@ -2266,6 +2281,9 @@ ALL = 'A', 'L', 'L', [Spaces] ; ONLY = 'O', 'N', 'L', 'Y', [Spaces] ; ANY = 'A', 'N', 'Y', [Spaces] ; +LIKE = 'L', 'I', 'K', 'E', [Spaces]; +UNLIKE = 'U', 'N', 'L', 'I', 'K', 'E', [Spaces]; + (* OperatorComparison operator tokens: *) Operator = ( '<', [ '=' ] | '>', [ '=' ] | '=' | '!', '=' ), [Spaces] ; From 260d25a9c2282ba8d27cf12833a2f1426ea0d22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saulius=20Gra=C5=BEulis?= Date: Mon, 15 Jul 2019 16:07:19 +0300 Subject: [PATCH 2/7] Updating test reference outputs using the new grammar diagnostics. --- tests/outputs/Filter_022.out | 9 ++++++--- tests/outputs/Filter_023.out | 2 +- tests/outputs/Filter_024.out | 2 +- tests/outputs/Filter_028.out | 8 +++++--- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/outputs/Filter_022.out b/tests/outputs/Filter_022.out index 1b2243481..1524b3163 100644 --- a/tests/outputs/Filter_022.out +++ b/tests/outputs/Filter_022.out @@ -44,9 +44,12 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 18 + FuzzyStringOpRhs(9999) + UNLIKE(9999) + TOKEN_53(9999): "U", line: 1, col: 19 + TOKEN_46(9999): "N", line: 1, col: 20 Error: in tests/cases/Filter_022.inp: line 1: - unexpected token "U", expected one of "<", ">", "=", "!", "I", - "C", "S", "E", "H", or ":" + unexpected token "K", expected "L" prototype_formula UNKNOWN - ^ + ^ diff --git a/tests/outputs/Filter_023.out b/tests/outputs/Filter_023.out index 0eb9ec94e..a1d5ca6b5 100644 --- a/tests/outputs/Filter_023.out +++ b/tests/outputs/Filter_023.out @@ -28,7 +28,7 @@ Filter(9999) TOKEN_1(9999): " ", line: 1, col: 9 Error: in tests/cases/Filter_023.inp: line 1: unexpected token "f", expected one of "<", ">", "=", "!", "I", - "C", "S", "E", "H", or ":" + "C", "S", "E", "L", "N", "U", "H", or ":" chemical formula IS KNOWN 42 ^ diff --git a/tests/outputs/Filter_024.out b/tests/outputs/Filter_024.out index ea3f41479..d277f62c1 100644 --- a/tests/outputs/Filter_024.out +++ b/tests/outputs/Filter_024.out @@ -44,7 +44,7 @@ Filter(9999) TOKEN_1(9999): " ", line: 1, col: 17 Error: in tests/cases/Filter_024.inp: line 1: unexpected token "K", expected one of "<", ">", "=", "!", "I", - "C", "S", "E", "H", or ":" + "C", "S", "E", "L", "N", "U", "H", or ":" chemical_formula KNOWN ^ diff --git a/tests/outputs/Filter_028.out b/tests/outputs/Filter_028.out index 2ba579809..ac8a8f9d4 100644 --- a/tests/outputs/Filter_028.out +++ b/tests/outputs/Filter_028.out @@ -26,9 +26,11 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 9 + FuzzyStringOpRhs(9999) + LIKE(9999) + TOKEN_44(9999): "L", line: 1, col: 10 Error: in tests/cases/Filter_028.inp: line 1: - unexpected token "L", expected one of "<", ">", "=", "!", "I", - "C", "S", "E", "H", or ":" + unexpected token "E", expected "I" elements LENGTH 42 - ^ + ^ From 2d6425a141fb5d3ecfb8e32e5926810d95235da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saulius=20Gra=C5=BEulis?= Date: Mon, 15 Jul 2019 16:12:38 +0300 Subject: [PATCH 3/7] Adding positive (working) test cases. --- tests/cases/Filter_072.inp | 1 + tests/cases/Filter_072.opt | 1 + tests/cases/Filter_073.inp | 1 + tests/cases/Filter_073.opt | 1 + tests/cases/Filter_074.inp | 1 + tests/cases/Filter_074.opt | 1 + tests/outputs/Filter_072.out | 82 +++++++++++++++++++++++++++ tests/outputs/Filter_073.out | 106 +++++++++++++++++++++++++++++++++++ tests/outputs/Filter_074.out | 101 +++++++++++++++++++++++++++++++++ 9 files changed, 295 insertions(+) create mode 100644 tests/cases/Filter_072.inp create mode 120000 tests/cases/Filter_072.opt create mode 100644 tests/cases/Filter_073.inp create mode 120000 tests/cases/Filter_073.opt create mode 100644 tests/cases/Filter_074.inp create mode 120000 tests/cases/Filter_074.opt create mode 100644 tests/outputs/Filter_072.out create mode 100644 tests/outputs/Filter_073.out create mode 100644 tests/outputs/Filter_074.out diff --git a/tests/cases/Filter_072.inp b/tests/cases/Filter_072.inp new file mode 100644 index 000000000..0cc254c0a --- /dev/null +++ b/tests/cases/Filter_072.inp @@ -0,0 +1 @@ +chemical_formula LIKE "H2 O2" diff --git a/tests/cases/Filter_072.opt b/tests/cases/Filter_072.opt new file mode 120000 index 000000000..e285e85c8 --- /dev/null +++ b/tests/cases/Filter_072.opt @@ -0,0 +1 @@ +Filter_001.opt \ No newline at end of file diff --git a/tests/cases/Filter_073.inp b/tests/cases/Filter_073.inp new file mode 100644 index 000000000..379a1f06d --- /dev/null +++ b/tests/cases/Filter_073.inp @@ -0,0 +1 @@ +chemical_formula NOT LIKE "C6 H12 O6" diff --git a/tests/cases/Filter_073.opt b/tests/cases/Filter_073.opt new file mode 120000 index 000000000..e285e85c8 --- /dev/null +++ b/tests/cases/Filter_073.opt @@ -0,0 +1 @@ +Filter_001.opt \ No newline at end of file diff --git a/tests/cases/Filter_074.inp b/tests/cases/Filter_074.inp new file mode 100644 index 000000000..c49de8f6f --- /dev/null +++ b/tests/cases/Filter_074.inp @@ -0,0 +1 @@ +chemical_formula UNLIKE "C6 H12 O6" diff --git a/tests/cases/Filter_074.opt b/tests/cases/Filter_074.opt new file mode 120000 index 000000000..e285e85c8 --- /dev/null +++ b/tests/cases/Filter_074.opt @@ -0,0 +1 @@ +Filter_001.opt \ No newline at end of file diff --git a/tests/outputs/Filter_072.out b/tests/outputs/Filter_072.out new file mode 100644 index 000000000..fa141c8d7 --- /dev/null +++ b/tests/outputs/Filter_072.out @@ -0,0 +1,82 @@ +Parse tree from tests/cases/Filter_072.inp: +Filter(9999) + Expression(9999) + ExpressionClause(9999) + ExpressionPhrase(9999) + Comparison(9999) + PropertyFirstComparison(9999) + Property(9999) + Identifier(9999) + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 1 + LowercaseLetter(9999) + TOKEN_72(9999): "h", line: 1, col: 2 + LowercaseLetter(9999) + TOKEN_69(9999): "e", line: 1, col: 3 + LowercaseLetter(9999) + TOKEN_77(9999): "m", line: 1, col: 4 + LowercaseLetter(9999) + TOKEN_73(9999): "i", line: 1, col: 5 + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 6 + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 7 + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 8 + LowercaseLetter(9999) + TOKEN_63(9999): "_", line: 1, col: 9 + LowercaseLetter(9999) + TOKEN_70(9999): "f", line: 1, col: 10 + LowercaseLetter(9999) + TOKEN_79(9999): "o", line: 1, col: 11 + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 12 + LowercaseLetter(9999) + TOKEN_77(9999): "m", line: 1, col: 13 + LowercaseLetter(9999) + TOKEN_85(9999): "u", line: 1, col: 14 + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 15 + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 16 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 17 + FuzzyStringOpRhs(9999) + LIKE(9999) + TOKEN_44(9999): "L", line: 1, col: 18 + TOKEN_41(9999): "I", line: 1, col: 19 + TOKEN_43(9999): "K", line: 1, col: 20 + TOKEN_37(9999): "E", line: 1, col: 21 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 22 + String(9999) + TOKEN_3(9999): """, line: 1, col: 23 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_40(9999): "H", line: 1, col: 24 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 25 + EscapedChar(9999) + UnescapedChar(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 26 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_47(9999): "O", line: 1, col: 27 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 28 + TOKEN_3(9999): """, line: 1, col: 29 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 30 diff --git a/tests/outputs/Filter_073.out b/tests/outputs/Filter_073.out new file mode 100644 index 000000000..a32fdcd53 --- /dev/null +++ b/tests/outputs/Filter_073.out @@ -0,0 +1,106 @@ +Parse tree from tests/cases/Filter_073.inp: +Filter(9999) + Expression(9999) + ExpressionClause(9999) + ExpressionPhrase(9999) + Comparison(9999) + PropertyFirstComparison(9999) + Property(9999) + Identifier(9999) + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 1 + LowercaseLetter(9999) + TOKEN_72(9999): "h", line: 1, col: 2 + LowercaseLetter(9999) + TOKEN_69(9999): "e", line: 1, col: 3 + LowercaseLetter(9999) + TOKEN_77(9999): "m", line: 1, col: 4 + LowercaseLetter(9999) + TOKEN_73(9999): "i", line: 1, col: 5 + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 6 + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 7 + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 8 + LowercaseLetter(9999) + TOKEN_63(9999): "_", line: 1, col: 9 + LowercaseLetter(9999) + TOKEN_70(9999): "f", line: 1, col: 10 + LowercaseLetter(9999) + TOKEN_79(9999): "o", line: 1, col: 11 + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 12 + LowercaseLetter(9999) + TOKEN_77(9999): "m", line: 1, col: 13 + LowercaseLetter(9999) + TOKEN_85(9999): "u", line: 1, col: 14 + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 15 + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 16 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 17 + FuzzyStringOpRhs(9999) + NOT(9999) + TOKEN_46(9999): "N", line: 1, col: 18 + TOKEN_47(9999): "O", line: 1, col: 19 + TOKEN_52(9999): "T", line: 1, col: 20 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 21 + LIKE(9999) + TOKEN_44(9999): "L", line: 1, col: 22 + TOKEN_41(9999): "I", line: 1, col: 23 + TOKEN_43(9999): "K", line: 1, col: 24 + TOKEN_37(9999): "E", line: 1, col: 25 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 26 + String(9999) + TOKEN_3(9999): """, line: 1, col: 27 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_35(9999): "C", line: 1, col: 28 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_22(9999): "6", line: 1, col: 29 + EscapedChar(9999) + UnescapedChar(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 30 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_40(9999): "H", line: 1, col: 31 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_17(9999): "1", line: 1, col: 32 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 33 + EscapedChar(9999) + UnescapedChar(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 34 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_47(9999): "O", line: 1, col: 35 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_22(9999): "6", line: 1, col: 36 + TOKEN_3(9999): """, line: 1, col: 37 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 38 diff --git a/tests/outputs/Filter_074.out b/tests/outputs/Filter_074.out new file mode 100644 index 000000000..05b247d3b --- /dev/null +++ b/tests/outputs/Filter_074.out @@ -0,0 +1,101 @@ +Parse tree from tests/cases/Filter_074.inp: +Filter(9999) + Expression(9999) + ExpressionClause(9999) + ExpressionPhrase(9999) + Comparison(9999) + PropertyFirstComparison(9999) + Property(9999) + Identifier(9999) + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 1 + LowercaseLetter(9999) + TOKEN_72(9999): "h", line: 1, col: 2 + LowercaseLetter(9999) + TOKEN_69(9999): "e", line: 1, col: 3 + LowercaseLetter(9999) + TOKEN_77(9999): "m", line: 1, col: 4 + LowercaseLetter(9999) + TOKEN_73(9999): "i", line: 1, col: 5 + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 6 + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 7 + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 8 + LowercaseLetter(9999) + TOKEN_63(9999): "_", line: 1, col: 9 + LowercaseLetter(9999) + TOKEN_70(9999): "f", line: 1, col: 10 + LowercaseLetter(9999) + TOKEN_79(9999): "o", line: 1, col: 11 + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 12 + LowercaseLetter(9999) + TOKEN_77(9999): "m", line: 1, col: 13 + LowercaseLetter(9999) + TOKEN_85(9999): "u", line: 1, col: 14 + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 15 + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 16 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 17 + FuzzyStringOpRhs(9999) + UNLIKE(9999) + TOKEN_53(9999): "U", line: 1, col: 18 + TOKEN_46(9999): "N", line: 1, col: 19 + TOKEN_44(9999): "L", line: 1, col: 20 + TOKEN_41(9999): "I", line: 1, col: 21 + TOKEN_43(9999): "K", line: 1, col: 22 + TOKEN_37(9999): "E", line: 1, col: 23 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 24 + String(9999) + TOKEN_3(9999): """, line: 1, col: 25 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_35(9999): "C", line: 1, col: 26 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_22(9999): "6", line: 1, col: 27 + EscapedChar(9999) + UnescapedChar(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 28 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_40(9999): "H", line: 1, col: 29 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_17(9999): "1", line: 1, col: 30 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 31 + EscapedChar(9999) + UnescapedChar(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 32 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_47(9999): "O", line: 1, col: 33 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_22(9999): "6", line: 1, col: 34 + TOKEN_3(9999): """, line: 1, col: 35 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 36 From dc3ac45d7019c50c10a6976038e2781f24070463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saulius=20Gra=C5=BEulis?= Date: Sat, 20 Jul 2019 15:33:40 +0300 Subject: [PATCH 4/7] Adding special syntax for Regexps. --- optimade.md | 40 +++++++++--- tests/outputs/Filter_019.out | 4 +- tests/outputs/Filter_020.out | 4 +- tests/outputs/Filter_021.out | 101 +++++++++++++++-------------- tests/outputs/Filter_022.out | 9 +-- tests/outputs/Filter_023.out | 2 +- tests/outputs/Filter_024.out | 2 +- tests/outputs/Filter_028.out | 8 +-- tests/outputs/Filter_059.out | 56 ++++++++-------- tests/outputs/Filter_060.out | 56 ++++++++-------- tests/outputs/Filter_064.out | 121 ++++++++++++++++++----------------- tests/outputs/Filter_065.out | 89 +++++++++++++------------- tests/outputs/Filter_070.out | 95 +++++++++++++-------------- tests/outputs/Filter_072.out | 44 ++----------- tests/outputs/Filter_073.out | 59 ++--------------- tests/outputs/Filter_074.out | 63 ++---------------- 16 files changed, 328 insertions(+), 425 deletions(-) diff --git a/optimade.md b/optimade.md index 89768028f..61bec39c8 100644 --- a/optimade.md +++ b/optimade.md @@ -2202,8 +2202,13 @@ ValueOpRhs = Operator, Value ; KnownOpRhs = IS, ( KNOWN | UNKNOWN ) ; -FuzzyStringOpRhs = CONTAINS, String | STARTS, [ WITH ], String | ENDS, [ WITH ], String | - LIKE, String | NOT, LIKE, String | UNLIKE, String ; +StringProperty = String | Property ; + +FuzzyStringOpRhs = CONTAINS, StringProperty | + STARTS, [ WITH ], StringProperty | + ENDS, [ WITH ], StringProperty | + MATCH, RegularExpression | + NOT, MATCH, RegularExpression ; SetOpRhs = HAS, ( [ Operator ], Value | ALL, ValueList | ANY, ValueList | ONLY, ValueList ) ; (* Note: support for ONLY in SetOpRhs is OPTIONAL *) @@ -2251,8 +2256,7 @@ ALL = 'A', 'L', 'L', [Spaces] ; ONLY = 'O', 'N', 'L', 'Y', [Spaces] ; ANY = 'A', 'N', 'Y', [Spaces] ; -LIKE = 'L', 'I', 'K', 'E', [Spaces]; -UNLIKE = 'U', 'N', 'L', 'I', 'K', 'E', [Spaces]; +MATCH = 'M', 'A', 'T', 'C', 'H', [Spaces]; (* OperatorComparison operator tokens: *) @@ -2280,16 +2284,34 @@ LowercaseLetter = String = '"', { EscapedChar }, '"', [Spaces] ; -EscapedChar = UnescapedChar | '\', '"' | '\', '\' ; +UnescapedChar = Letter | Digit | Space | '/' | + Punctuator | RegexpMetacharacter | + UnicodeHighChar ; -UnescapedChar = Letter | Digit | Space | Punctuator | UnicodeHighChar ; +EscapedChar = UnescapedChar | '\', '"' | '\', '\' ; Punctuator = - '!' | '#' | '$' | '%' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | - '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | - ']' | '^' | '`' | '{' | '|' | '}' | '~' + '!' | '#' | '%' | '&' | "'" | ',' | + '-' | ':' | ';' | '<' | '=' | '>' | '@' | + '`' | '~' +; + +RegexpMetacharacter = + '(' | ')' | '[' | ']' | '+' | '*' | '?' | '.' | '{' | '}' | + '|' | '^' | '$' ; +(* Regular expressions: *) + +UnescapedREChar = Letter | Digit | Space | '"' | + Punctuator | RegexpMetacharacter | + UnicodeHighChar ; + +EscapedREChar = UnescapedREChar | '\', '/' | '\', '\' | + '\', RegexpMetacharacter ; + +RegularExpression = '/', { EscapedREChar }, '/', [Spaces] ; + (* BEGIN EBNF GRAMMAR Number *) (* Number token syntax: *) diff --git a/tests/outputs/Filter_019.out b/tests/outputs/Filter_019.out index 22639ed0a..a689c04f6 100644 --- a/tests/outputs/Filter_019.out +++ b/tests/outputs/Filter_019.out @@ -56,7 +56,9 @@ Filter(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 26 Error: in tests/cases/Filter_019.inp: line 1: - unexpected token "4", expected """ + unexpected token "4", expected one of """, "a", "b", "c", "d", + "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", + "r", "s", "t", "u", "v", "w", "x", "y", "z", or "_" chemical_formula CONTAINS 42 ^ diff --git a/tests/outputs/Filter_020.out b/tests/outputs/Filter_020.out index 136055551..3c3a1ad42 100644 --- a/tests/outputs/Filter_020.out +++ b/tests/outputs/Filter_020.out @@ -56,7 +56,9 @@ Filter(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 26 Error: in tests/cases/Filter_020.inp: line 1: - unexpected token "S", expected """ + unexpected token "S", expected one of """, "a", "b", "c", "d", + "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", + "r", "s", "t", "u", "v", "w", "x", "y", "z", or "_" chemical_formula CONTAINS STARTS "Al" ^ diff --git a/tests/outputs/Filter_021.out b/tests/outputs/Filter_021.out index 5fc5d137a..fa91a4c61 100644 --- a/tests/outputs/Filter_021.out +++ b/tests/outputs/Filter_021.out @@ -55,22 +55,23 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 26 - String(9999) - TOKEN_3(9999): """, line: 1, col: 27 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 28 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 29 - TOKEN_3(9999): """, line: 1, col: 30 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 31 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 27 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 28 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 29 + TOKEN_3(9999): """, line: 1, col: 30 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 31 AND(9999) TOKEN_33(9999): "A", line: 1, col: 32 TOKEN_46(9999): "N", line: 1, col: 33 @@ -130,22 +131,23 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 59 - String(9999) - TOKEN_3(9999): """, line: 1, col: 60 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 61 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 62 - TOKEN_3(9999): """, line: 1, col: 63 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 64 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 60 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 61 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 62 + TOKEN_3(9999): """, line: 1, col: 63 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 64 AND(9999) TOKEN_33(9999): "A", line: 1, col: 65 TOKEN_46(9999): "N", line: 1, col: 66 @@ -203,20 +205,21 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 90 - String(9999) - TOKEN_3(9999): """, line: 1, col: 91 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 92 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 93 - TOKEN_3(9999): """, line: 1, col: 94 - Spaces(9999) - Space(9999) - nl(9999) - SPECIAL_1(9999): "(...)", line: 1, col: 95 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 91 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 92 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 93 + TOKEN_3(9999): """, line: 1, col: 94 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 95 diff --git a/tests/outputs/Filter_022.out b/tests/outputs/Filter_022.out index 1524b3163..805b11d65 100644 --- a/tests/outputs/Filter_022.out +++ b/tests/outputs/Filter_022.out @@ -44,12 +44,9 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 18 - FuzzyStringOpRhs(9999) - UNLIKE(9999) - TOKEN_53(9999): "U", line: 1, col: 19 - TOKEN_46(9999): "N", line: 1, col: 20 Error: in tests/cases/Filter_022.inp: line 1: - unexpected token "K", expected "L" + unexpected token "U", expected one of "<", ">", "=", "!", "I", + "C", "S", "E", "M", "N", "H", or ":" prototype_formula UNKNOWN - ^ + ^ diff --git a/tests/outputs/Filter_023.out b/tests/outputs/Filter_023.out index a1d5ca6b5..1e7bc4ba5 100644 --- a/tests/outputs/Filter_023.out +++ b/tests/outputs/Filter_023.out @@ -28,7 +28,7 @@ Filter(9999) TOKEN_1(9999): " ", line: 1, col: 9 Error: in tests/cases/Filter_023.inp: line 1: unexpected token "f", expected one of "<", ">", "=", "!", "I", - "C", "S", "E", "L", "N", "U", "H", or ":" + "C", "S", "E", "M", "N", "H", or ":" chemical formula IS KNOWN 42 ^ diff --git a/tests/outputs/Filter_024.out b/tests/outputs/Filter_024.out index d277f62c1..0019ce976 100644 --- a/tests/outputs/Filter_024.out +++ b/tests/outputs/Filter_024.out @@ -44,7 +44,7 @@ Filter(9999) TOKEN_1(9999): " ", line: 1, col: 17 Error: in tests/cases/Filter_024.inp: line 1: unexpected token "K", expected one of "<", ">", "=", "!", "I", - "C", "S", "E", "L", "N", "U", "H", or ":" + "C", "S", "E", "M", "N", "H", or ":" chemical_formula KNOWN ^ diff --git a/tests/outputs/Filter_028.out b/tests/outputs/Filter_028.out index ac8a8f9d4..f589a2bf7 100644 --- a/tests/outputs/Filter_028.out +++ b/tests/outputs/Filter_028.out @@ -26,11 +26,9 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 9 - FuzzyStringOpRhs(9999) - LIKE(9999) - TOKEN_44(9999): "L", line: 1, col: 10 Error: in tests/cases/Filter_028.inp: line 1: - unexpected token "E", expected "I" + unexpected token "L", expected one of "<", ">", "=", "!", "I", + "C", "S", "E", "M", "N", "H", or ":" elements LENGTH 42 - ^ + ^ diff --git a/tests/outputs/Filter_059.out b/tests/outputs/Filter_059.out index bab676b92..0d4e5e476 100644 --- a/tests/outputs/Filter_059.out +++ b/tests/outputs/Filter_059.out @@ -57,21 +57,22 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 27 - String(9999) - TOKEN_3(9999): """, line: 1, col: 28 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_35(9999): "C", line: 1, col: 29 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 30 - TOKEN_3(9999): """, line: 1, col: 31 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 32 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 28 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_35(9999): "C", line: 1, col: 29 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 30 + TOKEN_3(9999): """, line: 1, col: 31 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 32 AND(9999) TOKEN_33(9999): "A", line: 1, col: 33 TOKEN_46(9999): "N", line: 1, col: 34 @@ -141,15 +142,16 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 66 - String(9999) - TOKEN_3(9999): """, line: 1, col: 67 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 68 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 69 - TOKEN_3(9999): """, line: 1, col: 70 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 67 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 68 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 69 + TOKEN_3(9999): """, line: 1, col: 70 diff --git a/tests/outputs/Filter_060.out b/tests/outputs/Filter_060.out index 16f6a0721..053f2869e 100644 --- a/tests/outputs/Filter_060.out +++ b/tests/outputs/Filter_060.out @@ -55,21 +55,22 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 25 - String(9999) - TOKEN_3(9999): """, line: 1, col: 26 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_34(9999): "B", line: 1, col: 27 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 28 - TOKEN_3(9999): """, line: 1, col: 29 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 30 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 26 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_34(9999): "B", line: 1, col: 27 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 28 + TOKEN_3(9999): """, line: 1, col: 29 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 30 AND(9999) TOKEN_33(9999): "A", line: 1, col: 31 TOKEN_46(9999): "N", line: 1, col: 32 @@ -137,15 +138,16 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 62 - String(9999) - TOKEN_3(9999): """, line: 1, col: 63 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_36(9999): "D", line: 1, col: 64 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 65 - TOKEN_3(9999): """, line: 1, col: 66 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 63 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_36(9999): "D", line: 1, col: 64 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_18(9999): "2", line: 1, col: 65 + TOKEN_3(9999): """, line: 1, col: 66 diff --git a/tests/outputs/Filter_064.out b/tests/outputs/Filter_064.out index 4becc959a..055fb3e64 100644 --- a/tests/outputs/Filter_064.out +++ b/tests/outputs/Filter_064.out @@ -74,22 +74,23 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 35 - String(9999) - TOKEN_3(9999): """, line: 1, col: 36 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 37 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 38 - TOKEN_3(9999): """, line: 1, col: 39 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 40 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 36 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 37 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 38 + TOKEN_3(9999): """, line: 1, col: 39 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 40 AND(9999) TOKEN_33(9999): "A", line: 1, col: 41 TOKEN_46(9999): "N", line: 1, col: 42 @@ -149,22 +150,23 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 68 - String(9999) - TOKEN_3(9999): """, line: 1, col: 69 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 70 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 71 - TOKEN_3(9999): """, line: 1, col: 72 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 73 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 69 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 70 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 71 + TOKEN_3(9999): """, line: 1, col: 72 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 73 AND(9999) TOKEN_33(9999): "A", line: 1, col: 74 TOKEN_46(9999): "N", line: 1, col: 75 @@ -222,30 +224,31 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 99 - String(9999) - TOKEN_3(9999): """, line: 1, col: 100 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 101 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 102 - TOKEN_3(9999): """, line: 1, col: 103 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 104 - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 105 - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 106 - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 107 - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 108 - Space(9999) - nl(9999) - SPECIAL_1(9999): "(...)", line: 1, col: 109 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 100 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 101 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 102 + TOKEN_3(9999): """, line: 1, col: 103 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 104 + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 105 + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 106 + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 107 + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 108 + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 109 diff --git a/tests/outputs/Filter_065.out b/tests/outputs/Filter_065.out index 34b068b11..5258866be 100644 --- a/tests/outputs/Filter_065.out +++ b/tests/outputs/Filter_065.out @@ -49,19 +49,20 @@ Filter(9999) TOKEN_41(9999): "I", line: 1, col: 22 TOKEN_46(9999): "N", line: 1, col: 23 TOKEN_51(9999): "S", line: 1, col: 24 - String(9999) - TOKEN_3(9999): """, line: 1, col: 25 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 26 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 27 - TOKEN_3(9999): """, line: 1, col: 28 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 25 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 26 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 27 + TOKEN_3(9999): """, line: 1, col: 28 AND(9999) TOKEN_33(9999): "A", line: 1, col: 29 TOKEN_46(9999): "N", line: 1, col: 30 @@ -112,19 +113,20 @@ Filter(9999) TOKEN_50(9999): "R", line: 1, col: 51 TOKEN_52(9999): "T", line: 1, col: 52 TOKEN_51(9999): "S", line: 1, col: 53 - String(9999) - TOKEN_3(9999): """, line: 1, col: 54 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 55 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 56 - TOKEN_3(9999): """, line: 1, col: 57 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 54 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 55 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 56 + TOKEN_3(9999): """, line: 1, col: 57 AND(9999) TOKEN_33(9999): "A", line: 1, col: 58 TOKEN_46(9999): "N", line: 1, col: 59 @@ -173,20 +175,21 @@ Filter(9999) TOKEN_46(9999): "N", line: 1, col: 78 TOKEN_36(9999): "D", line: 1, col: 79 TOKEN_51(9999): "S", line: 1, col: 80 - String(9999) - TOKEN_3(9999): """, line: 1, col: 81 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_33(9999): "A", line: 1, col: 82 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_76(9999): "l", line: 1, col: 83 - TOKEN_3(9999): """, line: 1, col: 84 - Spaces(9999) - Space(9999) - nl(9999) - SPECIAL_1(9999): "(...)", line: 1, col: 85 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 81 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_33(9999): "A", line: 1, col: 82 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_76(9999): "l", line: 1, col: 83 + TOKEN_3(9999): """, line: 1, col: 84 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 85 diff --git a/tests/outputs/Filter_070.out b/tests/outputs/Filter_070.out index c34c89bba..13b8811d3 100644 --- a/tests/outputs/Filter_070.out +++ b/tests/outputs/Filter_070.out @@ -100,50 +100,51 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 47 - String(9999) - TOKEN_3(9999): """, line: 1, col: 48 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_36(9999): "D", line: 1, col: 49 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_73(9999): "i", line: 1, col: 50 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_74(9999): "j", line: 1, col: 51 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_75(9999): "k", line: 1, col: 52 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_83(9999): "s", line: 1, col: 53 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_84(9999): "t", line: 1, col: 54 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_82(9999): "r", line: 1, col: 55 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - LowercaseLetter(9999) - TOKEN_65(9999): "a", line: 1, col: 56 - TOKEN_3(9999): """, line: 1, col: 57 - Spaces(9999) - Space(9999) - nl(9999) - SPECIAL_1(9999): "(...)", line: 1, col: 58 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 48 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + UppercaseLetter(9999) + TOKEN_36(9999): "D", line: 1, col: 49 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_73(9999): "i", line: 1, col: 50 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_74(9999): "j", line: 1, col: 51 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_75(9999): "k", line: 1, col: 52 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_83(9999): "s", line: 1, col: 53 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_84(9999): "t", line: 1, col: 54 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 55 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 56 + TOKEN_3(9999): """, line: 1, col: 57 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 58 diff --git a/tests/outputs/Filter_072.out b/tests/outputs/Filter_072.out index fa141c8d7..971d82862 100644 --- a/tests/outputs/Filter_072.out +++ b/tests/outputs/Filter_072.out @@ -42,41 +42,9 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 17 - FuzzyStringOpRhs(9999) - LIKE(9999) - TOKEN_44(9999): "L", line: 1, col: 18 - TOKEN_41(9999): "I", line: 1, col: 19 - TOKEN_43(9999): "K", line: 1, col: 20 - TOKEN_37(9999): "E", line: 1, col: 21 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 22 - String(9999) - TOKEN_3(9999): """, line: 1, col: 23 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_40(9999): "H", line: 1, col: 24 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 25 - EscapedChar(9999) - UnescapedChar(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 26 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_47(9999): "O", line: 1, col: 27 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 28 - TOKEN_3(9999): """, line: 1, col: 29 - Spaces(9999) - Space(9999) - nl(9999) - SPECIAL_1(9999): "(...)", line: 1, col: 30 +Error: in tests/cases/Filter_072.inp: line 1: + unexpected token "L", expected one of "<", ">", "=", "!", "I", + "C", "S", "E", "M", "N", "H", or ":" + +chemical_formula LIKE "H2 O2" + ^ diff --git a/tests/outputs/Filter_073.out b/tests/outputs/Filter_073.out index a32fdcd53..6946e6162 100644 --- a/tests/outputs/Filter_073.out +++ b/tests/outputs/Filter_073.out @@ -50,57 +50,8 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 21 - LIKE(9999) - TOKEN_44(9999): "L", line: 1, col: 22 - TOKEN_41(9999): "I", line: 1, col: 23 - TOKEN_43(9999): "K", line: 1, col: 24 - TOKEN_37(9999): "E", line: 1, col: 25 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 26 - String(9999) - TOKEN_3(9999): """, line: 1, col: 27 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_35(9999): "C", line: 1, col: 28 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_22(9999): "6", line: 1, col: 29 - EscapedChar(9999) - UnescapedChar(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 30 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_40(9999): "H", line: 1, col: 31 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_17(9999): "1", line: 1, col: 32 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 33 - EscapedChar(9999) - UnescapedChar(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 34 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_47(9999): "O", line: 1, col: 35 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_22(9999): "6", line: 1, col: 36 - TOKEN_3(9999): """, line: 1, col: 37 - Spaces(9999) - Space(9999) - nl(9999) - SPECIAL_1(9999): "(...)", line: 1, col: 38 +Error: in tests/cases/Filter_073.inp: line 1: + unexpected token "L", expected "M" + +chemical_formula NOT LIKE "C6 H12 O6" + ^ diff --git a/tests/outputs/Filter_074.out b/tests/outputs/Filter_074.out index 05b247d3b..741c003b4 100644 --- a/tests/outputs/Filter_074.out +++ b/tests/outputs/Filter_074.out @@ -42,60 +42,9 @@ Filter(9999) Spaces(9999) Space(9999) TOKEN_1(9999): " ", line: 1, col: 17 - FuzzyStringOpRhs(9999) - UNLIKE(9999) - TOKEN_53(9999): "U", line: 1, col: 18 - TOKEN_46(9999): "N", line: 1, col: 19 - TOKEN_44(9999): "L", line: 1, col: 20 - TOKEN_41(9999): "I", line: 1, col: 21 - TOKEN_43(9999): "K", line: 1, col: 22 - TOKEN_37(9999): "E", line: 1, col: 23 - Spaces(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 24 - String(9999) - TOKEN_3(9999): """, line: 1, col: 25 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_35(9999): "C", line: 1, col: 26 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_22(9999): "6", line: 1, col: 27 - EscapedChar(9999) - UnescapedChar(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 28 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_40(9999): "H", line: 1, col: 29 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_17(9999): "1", line: 1, col: 30 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_18(9999): "2", line: 1, col: 31 - EscapedChar(9999) - UnescapedChar(9999) - Space(9999) - TOKEN_1(9999): " ", line: 1, col: 32 - EscapedChar(9999) - UnescapedChar(9999) - Letter(9999) - UppercaseLetter(9999) - TOKEN_47(9999): "O", line: 1, col: 33 - EscapedChar(9999) - UnescapedChar(9999) - Digit(9999) - TOKEN_22(9999): "6", line: 1, col: 34 - TOKEN_3(9999): """, line: 1, col: 35 - Spaces(9999) - Space(9999) - nl(9999) - SPECIAL_1(9999): "(...)", line: 1, col: 36 +Error: in tests/cases/Filter_074.inp: line 1: + unexpected token "U", expected one of "<", ">", "=", "!", "I", + "C", "S", "E", "M", "N", "H", or ":" + +chemical_formula UNLIKE "C6 H12 O6" + ^ From 6a197fba801aaa6c3f9282f489615807c8ef0b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saulius=20Gra=C5=BEulis?= Date: Sat, 20 Jul 2019 15:35:28 +0300 Subject: [PATCH 5/7] Adidng one RE parsing example. --- tests/cases/Filter_075.inp | 1 + tests/cases/Filter_075.opt | 1 + tests/outputs/Filter_075.out | 124 +++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 tests/cases/Filter_075.inp create mode 120000 tests/cases/Filter_075.opt create mode 100644 tests/outputs/Filter_075.out diff --git a/tests/cases/Filter_075.inp b/tests/cases/Filter_075.inp new file mode 100644 index 000000000..ef1a35ace --- /dev/null +++ b/tests/cases/Filter_075.inp @@ -0,0 +1 @@ +property MATCH /"^.?abc+[a-z0-9]*$"/ diff --git a/tests/cases/Filter_075.opt b/tests/cases/Filter_075.opt new file mode 120000 index 000000000..e285e85c8 --- /dev/null +++ b/tests/cases/Filter_075.opt @@ -0,0 +1 @@ +Filter_001.opt \ No newline at end of file diff --git a/tests/outputs/Filter_075.out b/tests/outputs/Filter_075.out new file mode 100644 index 000000000..318d98253 --- /dev/null +++ b/tests/outputs/Filter_075.out @@ -0,0 +1,124 @@ +Parse tree from tests/cases/Filter_075.inp: +Filter(9999) + Expression(9999) + ExpressionClause(9999) + ExpressionPhrase(9999) + Comparison(9999) + PropertyFirstComparison(9999) + Property(9999) + Identifier(9999) + LowercaseLetter(9999) + TOKEN_80(9999): "p", line: 1, col: 1 + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 2 + LowercaseLetter(9999) + TOKEN_79(9999): "o", line: 1, col: 3 + LowercaseLetter(9999) + TOKEN_80(9999): "p", line: 1, col: 4 + LowercaseLetter(9999) + TOKEN_69(9999): "e", line: 1, col: 5 + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 6 + LowercaseLetter(9999) + TOKEN_84(9999): "t", line: 1, col: 7 + LowercaseLetter(9999) + TOKEN_89(9999): "y", line: 1, col: 8 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 9 + FuzzyStringOpRhs(9999) + MATCH(9999) + TOKEN_45(9999): "M", line: 1, col: 10 + TOKEN_33(9999): "A", line: 1, col: 11 + TOKEN_52(9999): "T", line: 1, col: 12 + TOKEN_35(9999): "C", line: 1, col: 13 + TOKEN_40(9999): "H", line: 1, col: 14 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 15 + RegularExpression(9999) + TOKEN_15(9999): "/", line: 1, col: 16 + EscapedREChar(9999) + UnescapedREChar(9999) + TOKEN_3(9999): """, line: 1, col: 17 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_62(9999): "^", line: 1, col: 18 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_14(9999): ".", line: 1, col: 19 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_31(9999): "?", line: 1, col: 20 + EscapedREChar(9999) + UnescapedREChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 21 + EscapedREChar(9999) + UnescapedREChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_66(9999): "b", line: 1, col: 22 + EscapedREChar(9999) + UnescapedREChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 23 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_11(9999): "+", line: 1, col: 24 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_59(9999): "[", line: 1, col: 25 + EscapedREChar(9999) + UnescapedREChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 26 + EscapedREChar(9999) + UnescapedREChar(9999) + Punctuator(9999) + TOKEN_13(9999): "-", line: 1, col: 27 + EscapedREChar(9999) + UnescapedREChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_90(9999): "z", line: 1, col: 28 + EscapedREChar(9999) + UnescapedREChar(9999) + Digit(9999) + TOKEN_16(9999): "0", line: 1, col: 29 + EscapedREChar(9999) + UnescapedREChar(9999) + Punctuator(9999) + TOKEN_13(9999): "-", line: 1, col: 30 + EscapedREChar(9999) + UnescapedREChar(9999) + Digit(9999) + TOKEN_25(9999): "9", line: 1, col: 31 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_61(9999): "]", line: 1, col: 32 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_10(9999): "*", line: 1, col: 33 + EscapedREChar(9999) + UnescapedREChar(9999) + RegexpMetacharacter(9999) + TOKEN_5(9999): "$", line: 1, col: 34 + EscapedREChar(9999) + UnescapedREChar(9999) + TOKEN_3(9999): """, line: 1, col: 35 + TOKEN_15(9999): "/", line: 1, col: 36 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 37 From 2719559cca29adaa0c2c33137353c1ae109ab619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saulius=20Gra=C5=BEulis?= Date: Sat, 20 Jul 2019 15:45:19 +0300 Subject: [PATCH 6/7] Allowing both strings and regexps and MATCH targets. --- optimade.md | 4 +- tests/cases/Filter_076.inp | 1 + tests/cases/Filter_076.opt | 1 + tests/outputs/Filter_076.out | 128 +++++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 tests/cases/Filter_076.inp create mode 120000 tests/cases/Filter_076.opt create mode 100644 tests/outputs/Filter_076.out diff --git a/optimade.md b/optimade.md index 61bec39c8..334e7669a 100644 --- a/optimade.md +++ b/optimade.md @@ -2207,8 +2207,8 @@ StringProperty = String | Property ; FuzzyStringOpRhs = CONTAINS, StringProperty | STARTS, [ WITH ], StringProperty | ENDS, [ WITH ], StringProperty | - MATCH, RegularExpression | - NOT, MATCH, RegularExpression ; + MATCH, ( RegularExpression | StringProperty ) | + NOT, MATCH, ( RegularExpression | StringProperty ) ; SetOpRhs = HAS, ( [ Operator ], Value | ALL, ValueList | ANY, ValueList | ONLY, ValueList ) ; (* Note: support for ONLY in SetOpRhs is OPTIONAL *) diff --git a/tests/cases/Filter_076.inp b/tests/cases/Filter_076.inp new file mode 100644 index 000000000..5a7d04746 --- /dev/null +++ b/tests/cases/Filter_076.inp @@ -0,0 +1 @@ +property MATCH "\"^.?abc+[a-z0-9]\\*$\"" diff --git a/tests/cases/Filter_076.opt b/tests/cases/Filter_076.opt new file mode 120000 index 000000000..e285e85c8 --- /dev/null +++ b/tests/cases/Filter_076.opt @@ -0,0 +1 @@ +Filter_001.opt \ No newline at end of file diff --git a/tests/outputs/Filter_076.out b/tests/outputs/Filter_076.out new file mode 100644 index 000000000..e80dc3b92 --- /dev/null +++ b/tests/outputs/Filter_076.out @@ -0,0 +1,128 @@ +Parse tree from tests/cases/Filter_076.inp: +Filter(9999) + Expression(9999) + ExpressionClause(9999) + ExpressionPhrase(9999) + Comparison(9999) + PropertyFirstComparison(9999) + Property(9999) + Identifier(9999) + LowercaseLetter(9999) + TOKEN_80(9999): "p", line: 1, col: 1 + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 2 + LowercaseLetter(9999) + TOKEN_79(9999): "o", line: 1, col: 3 + LowercaseLetter(9999) + TOKEN_80(9999): "p", line: 1, col: 4 + LowercaseLetter(9999) + TOKEN_69(9999): "e", line: 1, col: 5 + LowercaseLetter(9999) + TOKEN_82(9999): "r", line: 1, col: 6 + LowercaseLetter(9999) + TOKEN_84(9999): "t", line: 1, col: 7 + LowercaseLetter(9999) + TOKEN_89(9999): "y", line: 1, col: 8 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 9 + FuzzyStringOpRhs(9999) + MATCH(9999) + TOKEN_45(9999): "M", line: 1, col: 10 + TOKEN_33(9999): "A", line: 1, col: 11 + TOKEN_52(9999): "T", line: 1, col: 12 + TOKEN_35(9999): "C", line: 1, col: 13 + TOKEN_40(9999): "H", line: 1, col: 14 + Spaces(9999) + Space(9999) + TOKEN_1(9999): " ", line: 1, col: 15 + StringProperty(9999) + String(9999) + TOKEN_3(9999): """, line: 1, col: 16 + EscapedChar(9999) + TOKEN_60(9999): "\", line: 1, col: 17 + TOKEN_3(9999): """, line: 1, col: 18 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_62(9999): "^", line: 1, col: 19 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_14(9999): ".", line: 1, col: 20 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_31(9999): "?", line: 1, col: 21 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 22 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_66(9999): "b", line: 1, col: 23 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_67(9999): "c", line: 1, col: 24 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_11(9999): "+", line: 1, col: 25 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_59(9999): "[", line: 1, col: 26 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_65(9999): "a", line: 1, col: 27 + EscapedChar(9999) + UnescapedChar(9999) + Punctuator(9999) + TOKEN_13(9999): "-", line: 1, col: 28 + EscapedChar(9999) + UnescapedChar(9999) + Letter(9999) + LowercaseLetter(9999) + TOKEN_90(9999): "z", line: 1, col: 29 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_16(9999): "0", line: 1, col: 30 + EscapedChar(9999) + UnescapedChar(9999) + Punctuator(9999) + TOKEN_13(9999): "-", line: 1, col: 31 + EscapedChar(9999) + UnescapedChar(9999) + Digit(9999) + TOKEN_25(9999): "9", line: 1, col: 32 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_61(9999): "]", line: 1, col: 33 + EscapedChar(9999) + TOKEN_60(9999): "\", line: 1, col: 34 + TOKEN_60(9999): "\", line: 1, col: 35 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_10(9999): "*", line: 1, col: 36 + EscapedChar(9999) + UnescapedChar(9999) + RegexpMetacharacter(9999) + TOKEN_5(9999): "$", line: 1, col: 37 + EscapedChar(9999) + TOKEN_60(9999): "\", line: 1, col: 38 + TOKEN_3(9999): """, line: 1, col: 39 + TOKEN_3(9999): """, line: 1, col: 40 + Spaces(9999) + Space(9999) + nl(9999) + SPECIAL_1(9999): "(...)", line: 1, col: 41 From 0ef147eaa0d53ca35b1850d172240e20a99d90de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saulius=20Gra=C5=BEulis?= Date: Mon, 30 Jan 2023 14:18:26 +0200 Subject: [PATCH 7/7] Accepting spelling corrections to the *LIKE descriptions Co-authored-by: Matthew Evans <7916000+ml-evs@users.noreply.github.com> --- optimade.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/optimade.md b/optimade.md index 334e7669a..030be713b 100644 --- a/optimade.md +++ b/optimade.md @@ -1300,7 +1300,8 @@ The `x` string MUST be interpreted as a pattern where an underscore character (' matches any single character and a percent character ('%', ASCII DEC 37, HEX 25) matches an arbitrary sequence of characters (including zero characters). -If operator "UNLIKE" is supported, the bahavior of this oprtator MUST be the negation of the "LIKE" operator; i.e. +If the `UNLIKE` operator is supported, the behavior of this operator MUST be the negation of the "LIKE" operator; i.e. + an expression `(property UNLIKE "value")" must behave exactly as `(NOT (property LIKE "value"))`. Examples: