package lambdapi
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=d01e5f13db2eaba6e4fe330667149e0059d4886c651ff9d6b672db2dfc9765ed
sha512=33b68c972aca37985ed73c527076198e7d4961c7e27c89cdabfe4d1cff97cd41ccfb85ae9499eb98ad9a0aefd920bc55555df6393fc441ac2429e4d99cddafa8
doc/lambdapi.parsing/Parsing/LpLexer/index.html
Module Parsing.LpLexerSource
Lexer for Lambdapi syntax, using Sedlex, a Utf8 lexer generator.
type token = | EOF| ABORT| ADMIT| ADMITTED| APPLY| AS| ASSERT of bool| ASSOCIATIVE| ASSUME| BEGIN| BUILTIN| COERCE_RULE| COMMUTATIVE| COMPUTE| CONSTANT| DEBUG| END| FAIL| FLAG| GENERALIZE| HAVE| IN| INDUCTION| INDUCTIVE| INFIX| INJECTIVE| LET| NOTATION| OPAQUE| OPEN| POSTFIX| PREFIX| PRINT| PRIVATE| PROOFTERM| PROTECTED| PROVER| PROVER_TIMEOUT| QUANTIFIER| REFINE| REFLEXIVITY| REMOVE| REQUIRE| REWRITE| RULE| SEARCH| SEQUENTIAL| SET| SIMPLIFY| SOLVE| SYMBOL| SYMMETRY| TRY| TYPE_QUERY| TYPE_TERM| UNIF_RULE| VERBOSE| WHY3| WITH| DEBUG_FLAGS of bool * string| INT of string| FLOAT of string| SIDE of Pratter.associativity| STRINGLIT of string| SWITCH of bool| ARROW| ASSIGN| BACKQUOTE| COMMA| COLON| DOT| EQUIV| HOOK_ARROW| LAMBDA| L_CU_BRACKET| L_PAREN| L_SQ_BRACKET| PI| R_CU_BRACKET| R_PAREN| R_SQ_BRACKET| SEMICOLON| TURNSTILE| UNDERSCORE| VBAR| UID of string| UID_EXPL of string| UID_META of int| UID_PATT of string| QID of Common.Path.t| QID_EXPL of Common.Path.t
Tokens.
Identifiers.
There are two kinds of identifiers: regular identifiers and escaped identifiers of the form "{|...|}".
Modulo those surrounding brackets, escaped identifiers allow to use as identifiers keywords or filenames that are not regular identifiers.
An escaped identifier denoting a filename or directory is unescaped before accessing to it. Hence, the module "{|a b|}" refers to the file "a b".
Identifiers need to be normalized so that an escaped identifier, once unescaped, is not regular. To this end, every identifier of the form "{|s|}" with s regular, is understood as "s" (function remove_useless_escape below).
Finally, identifiers must not be empty, so that we can use the empty string for the path of ghost signatures.
escape s converts a string s into an escaped identifier if it is not regular. We do not check whether s contains "|}". FIXME?
remove_useless_escape s replaces escaped regular identifiers by their unescape form.