mathlib documentation

core.​init.​meta.​lean.​parser

core.​init.​meta.​lean.​parser

meta constant lean.​parser_state  :
Type

meta def lean.​parser  :
Type u_1Type u_1

meta def lean.​parser_result  :
Type u_1Type u_1

Make sure the next token is an identifier, consume it, and produce the quoted name `t, where t is the identifier.

Make sure the next token is a small nat, consume it, and produce it

Check that the next token is tk and consume it. tk must be a registered token.

Parse an unelaborated expression using the given right-binding power. When pat := tt, the expression is parsed as a pattern, i.e. local constants are not checked.

a variable to local scope

meta def lean.​parser.​with_local_scope {α : Type} :

Run the parser in a local declaration scope.

Local declarations added via add_local do not propagate outside of this scope.

Parse an interactive tactic block: begin .. end

meta constant lean.​parser.​skip_info {α : Type} :

Do not report info from content parsed by p.

meta constant lean.​parser.​set_goal_info_pos {α : Type} :

Set goal info position of content parsed by p to current position. Nested calls take precedence.

Return the current parser position without consuming any input.

meta constant lean.​parser.​with_input {α : Type} :

Temporarily replace input of the parser state, run p, and return remaining input.

Parse a top-level command.

meta def lean.​parser.​parser_orelse {α : Type} :

meta def lean.​parser.​many {f : Type uType v} [monad f] [alternative f] {a : Type u} :
f af (list a)

meta def lean.​parser.​sep_by {α : Type} :

meta constant lean.​parser.​of_tactic {α : Type} :

@[instance]
meta def lean.​parser.​has_coe {α : Type} :

@[instance]

@[instance]

@[instance]

meta def lean.​parser.​reflect {α : Type} (p : lean.parser α) [r : p.reflectable] :