Module Mlang.Parse_utils
Frontend variable names
type parse_val
=
|
ParseVar of Mast.variable
|
ParseInt of int
A parsed variable can be a regular variable or an integer literal
val mk_position : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> Pos.t
val parse_variable : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> string -> Mast.variable
Checks whether the variable contains parameters
val parse_variable_name : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> string -> string
Checks whether the string is entirely capitalized
val parse_variable_or_int : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> string -> parse_val
val parse_table_index : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> string -> Mast.table_index
Table index can be integer or
X
, the generic table index variable
Literal parsing
val parse_int : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> string -> int
Checks whether is it actually an integer
val parse_literal : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> string -> Mast.literal