Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 05bb92ba authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

Parser: "(+)_spec" can be user-defined, "(+)'spec" can not.

parent a8f712d7
This diff is collapsed.
...@@ -239,8 +239,10 @@ rule token = parse ...@@ -239,8 +239,10 @@ rule token = parse
{ RIGHTSQ } { RIGHTSQ }
| "]" (quote+ as s) | "]" (quote+ as s)
{ RIGHTSQ_QUOTE s } { RIGHTSQ_QUOTE s }
| ")" (['\'' '_'] alpha suffix core_suffix* as s) | ")" ('\'' alpha suffix core_suffix* as s)
{ RIGHTPAR_QUOTE s } { RIGHTPAR_QUOTE s }
| ")" ('_' alpha suffix core_suffix* as s)
{ RIGHTPAR_USCORE s }
| op_char_pref op_char_4* quote* as s | op_char_pref op_char_4* quote* as s
{ OPPREF s } { OPPREF s }
| op_char_1234* op_char_1 op_char_1234* quote* as s | op_char_1234* op_char_1 op_char_1234* quote* as s
......
...@@ -151,6 +151,7 @@ ...@@ -151,6 +151,7 @@
%token <string> QUOTE_LIDENT %token <string> QUOTE_LIDENT
%token <string> RIGHTSQ_QUOTE (* ]'' *) %token <string> RIGHTSQ_QUOTE (* ]'' *)
%token <string> RIGHTPAR_QUOTE (* )'spec *) %token <string> RIGHTPAR_QUOTE (* )'spec *)
%token <string> RIGHTPAR_USCORE (* )_spec *)
(* keywords *) (* keywords *)
...@@ -1263,12 +1264,16 @@ lident_rich: ...@@ -1263,12 +1264,16 @@ lident_rich:
lident_op: lident_op:
| LEFTPAR lident_op_str RIGHTPAR | LEFTPAR lident_op_str RIGHTPAR
{ mk_id $2 $startpos($2) $endpos($2) } { mk_id $2 $startpos($2) $endpos($2) }
| LEFTPAR lident_op_str RIGHTPAR_USCORE
{ mk_id ($2^$3) $startpos $endpos }
| LEFTPAR lident_op_str RIGHTPAR_QUOTE | LEFTPAR lident_op_str RIGHTPAR_QUOTE
{ mk_id ($2^$3) $startpos $endpos } { mk_id ($2^$3) $startpos $endpos }
lident_op_nq: lident_op_nq:
| LEFTPAR lident_op_str RIGHTPAR | LEFTPAR lident_op_str RIGHTPAR
{ mk_id $2 $startpos($2) $endpos($2) } { mk_id $2 $startpos($2) $endpos($2) }
| LEFTPAR lident_op_str RIGHTPAR_USCORE
{ mk_id ($2^$3) $startpos $endpos }
| LEFTPAR lident_op_str RIGHTPAR_QUOTE | LEFTPAR lident_op_str RIGHTPAR_QUOTE
{ let loc = floc $startpos $endpos in { let loc = floc $startpos $endpos in
Loc.errorm ~loc "Symbol (%s)%s cannot be user-defined" $2 $3 } Loc.errorm ~loc "Symbol (%s)%s cannot be user-defined" $2 $3 }
......
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