summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2017-01-09 12:28:02 +0700
committerDaniil Baturin <daniil@baturin.org>2017-01-09 12:28:02 +0700
commit395b01c2b19f31ac296b2fda7b4f8aefaa1506ee (patch)
treedea265d687bb7812388e3bb759264b1561f4a876 /src
parent587757b94f221b40edacdd9d6494a62bab83a9a5 (diff)
downloadvyconf-395b01c2b19f31ac296b2fda7b4f8aefaa1506ee.tar.gz
vyconf-395b01c2b19f31ac296b2fda7b4f8aefaa1506ee.zip
Not quite T245 but related: trim comments and allow more characters in identifiers.
Diffstat (limited to 'src')
-rw-r--r--src/curly_lexer.mll2
-rw-r--r--src/curly_parser.mly2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/curly_lexer.mll b/src/curly_lexer.mll
index 8086648..6254358 100644
--- a/src/curly_lexer.mll
+++ b/src/curly_lexer.mll
@@ -19,7 +19,7 @@ rule token = parse
{ RIGHT_BRACKET }
| ';'
{ SEMI }
-| ['a' - 'z' 'A' - 'Z' '0' - '9' '-' '.' ]+ as s
+| ['a' -'z' 'A' - 'Z' '0' - '9' '.' '/' ':' '@' '$' '-' ]+ as s
{ IDENTIFIER s}
| eof
{ EOF }
diff --git a/src/curly_parser.mly b/src/curly_parser.mly
index 047277a..896f5c0 100644
--- a/src/curly_parser.mly
+++ b/src/curly_parser.mly
@@ -17,7 +17,7 @@
opt_comment:
| (* empty *) { None }
- | c = COMMENT { Some c }
+ | c = COMMENT { Some (String.trim c) }
value:
| v = STRING