Merge branch 'anri' of gaufre.informatique.univ-paris-diderot.fr:Anri/compilation-m1-2023 into anri
This commit is contained in:
commit
41fa9baedc
1 changed files with 9 additions and 4 deletions
|
@ -47,9 +47,9 @@ let blank = [' ' '\009' '\012']
|
||||||
let hex_dig = ['0'-'9' 'a'-'f' 'A'-'F']
|
let hex_dig = ['0'-'9' 'a'-'f' 'A'-'F']
|
||||||
|
|
||||||
let digit = ['0'-'9']
|
let digit = ['0'-'9']
|
||||||
let hexa = "0x" hex_dig
|
let hexa = "0x" hex_dig+
|
||||||
let bina = "0b" ['0'-'1']
|
let bina = "0b" ['0'-'1']+
|
||||||
let octa = "0o" ['0'-'7']
|
let octa = "0o" ['0'-'7']+
|
||||||
|
|
||||||
|
|
||||||
(* Définition d'un atom
|
(* Définition d'un atom
|
||||||
|
@ -71,7 +71,12 @@ let constr_id = ['A'-'Z']['A'-'Z' 'a'-'z' '0'-'9' '_']*
|
||||||
(* Identificateur de variables de type *)
|
(* Identificateur de variables de type *)
|
||||||
let type_variable = '`' ident
|
let type_variable = '`' ident
|
||||||
(* Littéraux entiers *)
|
(* Littéraux entiers *)
|
||||||
let int = '-'? (digit+ | hexa+ | bina+ | octa+)
|
|
||||||
|
let int ='-'? digit+
|
||||||
|
| hexa
|
||||||
|
| bina
|
||||||
|
| octa
|
||||||
|
|
||||||
(* Littéraux caractères *)
|
(* Littéraux caractères *)
|
||||||
let letter = (digit | ['A'-'Z'] | ['a'-'z'])
|
let letter = (digit | ['A'-'Z'] | ['a'-'z'])
|
||||||
|
|
||||||
|
|
Reference in a new issue