summaryrefslogtreecommitdiff
path: root/Lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'Lexer.l')
-rw-r--r--Lexer.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lexer.l b/Lexer.l
index e69ddb0..f2fdc9a 100644
--- a/Lexer.l
+++ b/Lexer.l
@@ -50,6 +50,10 @@ identifier [a-z_][0-9a-z_]*
white [\t\f\r ]
+comment1 \{((.|[\n\r])*?)\}
+comment2 \(\*((.|[\n\r])*?)\*\)
+comment {comment1}|{comment2}
+
%{
#define YY_USER_ACTION loc.columns(yyleng);
%}
@@ -169,6 +173,8 @@ white [\t\f\r ]
{white}+ {loc.step();}
\n+ {loc.lines(yyleng); loc.step();}
+{comment} {}
+
. {
std::cerr<<"ERROR";
}