Mlang.Parse_utils
Helpers for parsing
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
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
val parse_table_size : string -> Mast.table_size
Checks whether is it actually an integer
val parse_literal :
(Stdlib.Lexing.position * Stdlib.Lexing.position) ->
string ->
Mast.literal
val parse_const_value : string -> Mast.literal
val parse_if_then_etc :
(Mast.expression Pos.marked option * Mast.instruction Pos.marked list * Pos.t)
list ->
Mast.instruction