• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
              • Compilation
              • Static-semantics
              • Concrete-syntax
                • Pretty-printer
                • Grammar
                • Lexing-and-parsing
                  • Lexer
                  • Parser
                  • Token-fringe
                  • Longest-lexp
                  • Parser-interface
                  • Grammar-lexp
                  • Identifier-lexp
                  • Output-file-parsep
                  • Input-file-parsep
                  • File-lex-parse-p
                  • Filter-tokens
                  • Lexp
                  • File-parsep
                  • Input-parser
                  • Output-file-lex-parse-p
                  • Input-file-lex-parse-p
                  • Parser-abstractor-interface
                  • Identifier-abnf-stringp
                  • Symbol-abnf-stringp
                  • Keyword-abnf-stringp
                  • Output-parser
                  • Tokenizer
                • Input-pretty-printer
                • Output-pretty-printer
                • Unicode-characters
                • Concrete-syntax-trees
                • Symbols
                • Keywords
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Concrete-syntax

Lexing-and-parsing

Lexing and parsing of Leo.

We formalize the requirements for lexing and parsing Unicode character sequences to Leo CSTs.

We formalize these requirements for Leo (code) files, for Leo input files, and for Leo putput files. We plan to extend this to cover Leo configuration files.

The lexing specification is common for code files, input files, and output files. The parsing specification differs between them.

We plan to prove that lexing and parsing are unambiguous.

Subtopics

Lexer
An executable lexer of Leo.
Parser
An executable parser of Leo.
Token-fringe
Token fringe.
Longest-lexp
Longest lexeme rule.
Parser-interface
API functions for parsing Leo programs.
Grammar-lexp
Grammatical lexing.
Identifier-lexp
Lexing of Identifiers.
Output-file-parsep
Parsing of Leo output files.
Input-file-parsep
Parsing of Leo input files.
File-lex-parse-p
Lexing and parsing of Leo files.
Filter-tokens
Token filtering.
Lexp
Declarative specification of lexing.
File-parsep
Parsing of Leo files.
Input-parser
An executable parser of Leo input files.
Output-file-lex-parse-p
Lexing and parsing of Leo output files.
Input-file-lex-parse-p
Lexing and parsing of Leo input files.
Parser-abstractor-interface
API functions for parsing and abstracting Leo programs from CST to AST.
Identifier-abnf-stringp
Check if an ABNF string (i.e. a list of natural numbers) is the fringe of a tree for an identifier.
Symbol-abnf-stringp
Check if an ABNF string (i.e. a list of natural numbers) is the fringe of a tree for a symbol.
Keyword-abnf-stringp
Check if an ABNF string (i.e. a list of natural numbers) is the fringe of a tree for a keyword.
Output-parser
An executable parser of Leo output files.
Tokenizer
Turn lexemes into tokens.