Skip to content

Commit

Permalink
fix(prql.lark): match file names directly
Browse files Browse the repository at this point in the history
Provides a regex to directly match file names for parsing. I'm reasonably confident there is probably an edge case, but this seems to handle most path situations I can think of.
  • Loading branch information
rbpatt2019 committed Apr 11, 2022
1 parent 0c1f06e commit 259763b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyprql/lang/prql.lark
Expand Up @@ -16,7 +16,7 @@
right_join: "right"
outer_join: "outer"

to: "to" file_type name
to: "to" file_type /[a-zA-Z0-9_:~.\/\\\-\(\) ]+\.[a-zA-Z]+/
file_type: csv | tsv
csv: "csv"
tsv: "tsv"
Expand Down Expand Up @@ -115,6 +115,6 @@
OP_GE: ">="

%import python (NAME, STRING, INTEGER)
%import common (WS,INT,SIGNED_INT,NUMBER,SIGNED_NUMBER,FLOAT,SIGNED_FLOAT,ESCAPED_STRING)
%import common (WS,INT,SIGNED_INT,NUMBER,SIGNED_NUMBER,FLOAT,SIGNED_FLOAT,ESCAPED_STRING,CNAME)
%ignore WS
%ignore COMMENT

0 comments on commit 259763b

Please sign in to comment.