From 395b01c2b19f31ac296b2fda7b4f8aefaa1506ee Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 9 Jan 2017 12:28:02 +0700 Subject: Not quite T245 but related: trim comments and allow more characters in identifiers. --- src/curly_lexer.mll | 2 +- src/curly_parser.mly | 2 +- 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 -- cgit v1.2.3