Commit 7d4be12e authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

accept (*) in comments and in programs

parent a99c3c00
......@@ -219,6 +219,8 @@ rule token = parse
{ raise (IllegalCharacter c) }
and comment = parse
| "(*)"
{ comment lexbuf }
| "*)"
{ () }
| "(*"
......
......@@ -148,6 +148,8 @@ rule token = parse
|(hexadigit+ as i) ("" as f))
['p' 'P'] (['-' '+']? digit+ as e)
{ REAL (RConstHexa (i, f, remove_leading_plus e)) }
| "(*)"
{ LEFTPAR_STAR_RIGHTPAR }
| "(*"
{ comment lexbuf; token lexbuf }
| "'"
......
......@@ -116,7 +116,7 @@
%token UNDERSCORE QUOTE COMMA LEFTPAR RIGHTPAR COLON SEMICOLON
%token COLONEQUAL ARROW EQUAL LTGT AT DOT LEFTSQ RIGHTSQ
%token LEFTBLEFTB RIGHTBRIGHTB BAR BARBAR AMPAMP
%token EOF
%token LEFTPAR_STAR_RIGHTPAR EOF
/* Precedences */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment