Skip to content

Commit

Permalink
Version 1.4.2.
Browse files Browse the repository at this point in the history
Cleaning up the lex definitions.
  • Loading branch information
walter-weinmann committed Nov 18, 2017
1 parent 656d943 commit 7591a70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 39 deletions.
25 changes: 12 additions & 13 deletions include/ocparse_generator.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
%%%% ...................................
%% literal,
%% parameter,
%% wwe
%% parenthesizedExpression,
%% patternComprehension,
%% relationshipsPattern,
Expand Down Expand Up @@ -181,7 +180,7 @@

-define(GENERATE_COMPACTED, true). % true: compacted / false: detailed.
-define(GENERATE_CT, true).
-define(GENERATE_EUNIT, true).
-define(GENERATE_EUNIT, false).
-define(GENERATE_PERFORMANCE, true).

-define(LEFT_ARROW_HEAD, "<").
Expand Down Expand Up @@ -447,7 +446,7 @@
WHERE appearances > 1
RETURN person.name, appearances, movies
"},
%% wwe legacy
%% wwe legacy - CONSTRAINT / INDEX
%% % --------------------------------------------------------------------------
%% {"Chapter 4. Get started with Cypher", "4.5. Constraints and indexes", "4.5.1. Using constraints", cypher,
%% "
Expand Down Expand Up @@ -491,7 +490,7 @@
WHERE friendsCount > 3
RETURN n, friendsCount
"},
%% wwe SET ???
%% wwe - open issue
%% % --------------------------------------------------------------------------
%% {"Chapter 5. Introduction", "5.2. Querying and updating the graph", "5.2.1. The structure of update queries", cypher,
%% "
Expand Down Expand Up @@ -648,7 +647,7 @@
"
CALL db.resampleIndex($indexname)
"},
%% wwe legacy
%% wwe legacy - START
%% % --------------------------------------------------------------------------
%% {"Chapter 6. Syntax", "6.4. Parameters", "6.4.12. Index value (explicit indexes)", cypher,
%% "
Expand Down Expand Up @@ -952,8 +951,8 @@
"
RETURN { key: 'Value', listKey: [{ inner: 'Map1' }, { inner: 'Map2' }]}
"},
%% wwe
%% % --------------------------------------------------------------------------
%% wwe - open issue
%% % ------------------ --------------------------------------------------------
%% {"Chapter 6. Syntax", "6.9. Maps", "6.9.2. Map projection", cypher,
%% "
%% MATCH (actor:Person { name: 'Charlie Sheen' })-[:ACTED_IN]->(movie:Movie)
Expand Down Expand Up @@ -1091,7 +1090,7 @@ _______ WITH SPACE`]->()
WHERE id(r)= 0
RETURN a,b
"},
%% wwe legacy
%% wwe legacy - function_call with pattern as argument
%% % --------------------------------------------------------------------------
%% {"Chapter 7. Clauses", "7.1. MATCH", "7.1.5. Shortest path", cypher,
%% "
Expand Down Expand Up @@ -1750,7 +1749,7 @@ _______ WITH SPACE`]->()
MERGE (person)-[r:HAS_CHAUFFEUR]->(chauffeur:Chauffeur { name: person.chauffeurName })
RETURN person.name, person.chauffeurName, chauffeur
"},
%% wwe legacy
%% wwe legacy - CONSTRAINT
%% % --------------------------------------------------------------------------
%% {"Chapter 7. Clauses", "7.16. MERGE", "7.16.5. Using unique constraints with MERGE", cypher,
%% "
Expand Down Expand Up @@ -1792,7 +1791,7 @@ _______ WITH SPACE`]->()
"
CALL db.labels
"},
%% wwe legacy
%% wwe legacy - CALL
%% % --------------------------------------------------------------------------
%% {"Chapter 7. Clauses", "7.17. CALL[...YIELD]", "7.17.3. View the signature for a procedure", cypher,
%% "
Expand Down Expand Up @@ -1831,7 +1830,7 @@ _______ WITH SPACE`]->()
CALL db.labels() YIELD label
RETURN count(label) AS numLabels
"},
%% wwe legacy
%% wwe legacy - CALL
% --------------------------------------------------------------------------
%% {"Chapter 7. Clauses", "7.17. CALL[...YIELD]", "7.17.10. Call a procedure and filter its results", cypher,
%% "
Expand Down Expand Up @@ -2147,7 +2146,7 @@ _______ WITH SPACE`]->()
"
RETURN range(0, 10), range(2, 18, 3)
"},
%% wwe |
%% wwe legacy - argument in reduce function
%% % --------------------------------------------------------------------------
%% {"Chapter 8. Functions", "8.4. List functions", "8.4.7. reduce()", cypher,
%% "
Expand Down Expand Up @@ -2404,7 +2403,7 @@ _______ WITH SPACE`]->()
"
RETURN point({ x: 2.3, y: 4.5 }) AS point
"}
%% wwe user-defined functions
%% wwe legacy - function_name not schema_name
%% % --------------------------------------------------------------------------
%% {"Chapter 8. Functions", "8.10. User-defined functions", "8.10.1. Call a user-defined function", cypher,
%% "
Expand Down
27 changes: 1 addition & 26 deletions src/oclexer.xrl
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,17 @@ Erlang code.
-define(TOKEN_PATTERNS, [
{"^(?i)(ADD)$", 'ADD'},
{"^(?i)(ALL)$", 'ALL'},
{"^(?i)(ALLSHORTESTPATHS)$", 'ALLSHORTESTPATHS'},
{"^(?i)(AND)$", 'AND'},
{"^(?i)(ANY)$", 'ANY'},
{"^(?i)(AS)$", 'AS'},
{"^(?i)(ASC)$", 'ASC'},
{"^(?i)(ASCENDING)$", 'ASCENDING'},
{"^(?i)(ASSERT)$", 'ASSERT'},
{"^(?i)(BY)$", 'BY'},
{"^(?i)(CALL)$", 'CALL'},
{"^(?i)(CASE)$", 'CASE'},
{"^(?i)(COMMIT)$", 'COMMIT'},
{"^(?i)(CONSTRAINT)$", 'CONSTRAINT'},
{"^(?i)(CONTAINS)$", 'CONTAINS'},
{"^(?i)(COUNT)$", 'COUNT'},
{"^(?i)(CREATE)$", 'CREATE'},
{"^(?i)(CSV)$", 'CSV'},
{"^(?i)(CYPHER)$", 'CYPHER'},
{"^(?i)(DELETE)$", 'DELETE'},
{"^(?i)(DESC)$", 'DESC'},
{"^(?i)(DESCENDING)$", 'DESCENDING'},
Expand All @@ -125,26 +119,16 @@ Erlang code.
{"^(?i)(END)$", 'END'},
{"^(?i)(ENDS)$", 'ENDS'},
{"^(?i)(EXISTS)$", 'EXISTS'},
{"^(?i)(EXPLAIN)$", 'EXPLAIN'},
{"^(?i)(EXTRACT)$", 'EXTRACT'},
{"^(?i)(FALSE)$", 'FALSE'},
{"^(?i)(FIELDTERMINATOR)$", 'FIELDTERMINATOR'},
{"^(?i)(FILTER)$", 'FILTER'},
{"^(?i)(FOR)$", 'FOR'},
{"^(?i)(FROM)$", 'FROM'},
{"^(?i)(HEADERS)$", 'HEADERS'},
{"^(?i)(IN)$", 'IN'},
{"^(?i)(INDEX)$", 'INDEX'},
{"^(?i)(IS)$", 'IS'},
{"^(?i)(JOIN)$", 'JOIN'},
{"^(?i)(L_0X)$", 'L_0X'},
{"^(?i)(L_SKIP)$", 'L_SKIP'},
{"^(?i)(LIMIT)$", 'LIMIT'},
{"^(?i)(LOAD)$", 'LOAD'},
{"^(?i)(MANDATORY)$", 'MANDATORY'},
{"^(?i)(MATCH)$", 'MATCH'},
{"^(?i)(MERGE)$", 'MERGE'},
{"^(?i)(NODE)$", 'NODE'},
{"^(?i)(NONE)$", 'NONE'},
{"^(?i)(NOT)$", 'NOT'},
{"^(?i)(NULL)$", 'NULL'},
Expand All @@ -153,32 +137,23 @@ Erlang code.
{"^(?i)(OPTIONAL)$", 'OPTIONAL'},
{"^(?i)(OR)$", 'OR'},
{"^(?i)(ORDER)$", 'ORDER'},
{"^(?i)(PERIODIC)$", 'PERIODIC'},
{"^(?i)(PROFILE)$", 'PROFILE'},
{"^(?i)(REL)$", 'REL'},
{"^(?i)(RELATIONSHIP)$", 'RELATIONSHIP'},
{"^(?i)(REMOVE)$", 'REMOVE'},
{"^(?i)(REQUIRE)$", 'REQUIRE'},
{"^(?i)(RETURN)$", 'RETURN'},
{"^(?i)(SCALAR)$", 'SCALAR'},
{"^(?i)(SCAN)$", 'SCAN'},
{"^(?i)(SET)$", 'SET'},
{"^(?i)(SHORTESTPATH)$", 'SHORTESTPATH'},
{"^(?i)(SINGLE)$", 'SINGLE'},
{"^(?i)(SKIP)$", 'SKIP'},
{"^(?i)(START)$", 'START'},
{"^(?i)(STARTS)$", 'STARTS'},
{"^(?i)(THEN)$", 'THEN'},
{"^(?i)(TRUE)$", 'TRUE'},
{"^(?i)(UNION)$", 'UNION'},
{"^(?i)(UNIQUE)$", 'UNIQUE'},
{"^(?i)(UNWIND)$", 'UNWIND'},
{"^(?i)(USING)$", 'USING'},
{"^(?i)(WHEN)$", 'WHEN'},
{"^(?i)(WHERE)$", 'WHERE'},
{"^(?i)(WITH)$", 'WITH'},
{"^(?i)(XOR)$", 'XOR'},
{"^(?i)(YIELD)$", 'YIELD'}
{"^(?i)(XOR)$", 'XOR'}
]).
%-define(DEBUG, true).
Expand Down

0 comments on commit 7591a70

Please sign in to comment.