Skip to content
Snippets Groups Projects
Commit ee762ccd authored by Erwan Jahier's avatar Erwan Jahier
Browse files

src/lexer.mll:

	ident where not authorized to begin by "_"...
parent 36f22c50
No related branches found
Tags 6.1.2
No related merge requests found
......@@ -219,9 +219,9 @@ rule lexer = parse
| "<" { TK_LT ( Lxm.make lexbuf ) }
| ">" { TK_GT ( Lxm.make lexbuf ) }
(* identificateur point *)
| ['A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '\'' '_' '0'-'9'] *
| ['_' 'A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '\'' '_' '0'-'9'] *
':' ':'
['A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '\'' '_' '0'-'9'] *
['_' 'A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '\'' '_' '0'-'9'] *
{
let lxm = Lxm.make lexbuf in
TK_LONGIDENT (lxm)
......@@ -236,7 +236,7 @@ rule lexer = parse
| '.' chiffres (exposant)? { TK_RCONST (Lxm.make lexbuf ) }
(* mot-cl ou identificateur *)
| ['A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '\'' '_' '0'-'9'] *
| ['_' 'A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '\'' '_' '0'-'9'] *
{
let lxm = Lxm.make lexbuf in
let x = is_a_keyword ( Lxm.str lxm ) in
......
......@@ -55,7 +55,7 @@ test:
echo " " >> test.res; echo "====> $(LC) pfs.lus" >> test.res
$(LC) pfs.lus >> test.res 2>&1 || true
\
diff -u test.res.exp test.res > test.diff || cat test.diff ; echo "cf test.diff"
diff -u test.res.exp test.res > test.diff || (cat test.diff ; echo "cf test.diff")
utest:
cp test.res test.res.exp
......
......@@ -634,5 +634,5 @@ End of Syntax table dump.
const DELTA = 0.500000
====> ../lus2lic -vl 3 pfs.lus
Error. '_' (file:pfs.lus, line:39, col:7 to 7):
Error. '[' (file:pfs.lus, line:40, col:18 to 18):
---> syntax error
......@@ -634,5 +634,5 @@ End of Syntax table dump.
const DELTA = 0.500000
====> ../lus2lic -vl 3 pfs.lus
Error. '_' (file:pfs.lus, line:39, col:7 to 7):
Error. '[' (file:pfs.lus, line:40, col:18 to 18):
---> syntax error
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment