• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
          • Defdefparse
          • Deftreeops
          • Defgrammar
          • Notation
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
            • Parse-schars
            • Parse-ichars
            • Parse-direct
            • Parse-range
            • Parse-next
          • Parsing-primitives-seq
          • Operations
          • Differences-with-paper
          • Examples
          • Grammar-printer
          • Parsing-tools
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Java
        • C
        • Syntheto
        • Number-theory
        • Cryptography
        • Lists-light
        • File-io-light
        • Json
        • Built-ins
        • Solidity
        • Axe
        • Std-extensions
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Execloader
      • Axe
    • Testing-utilities
    • Math
  • Abnf

Parsing-primitives-defresult

Some basic ABNF parsing functions for use with fty::defresult.

These functions may be be useful when writing fty::defresult-based parsers for languages specified via ABNF grammars. These functions take lists of natural numbers as inputs and return two outputs: (i) a fty::defresult value (e.g. tree or error) obtained from the consumed input natural numbers, and (ii) the remaining unconsumed input natural numbers.

These are somewhat similar to the Seq-based parsing primitives, but they have an interface suitable for fty::defresult instead of an interface suitable for Seq.

Subtopics

Parse-schars
Parse a case-sensitive character value consisting of a given string of characters.
Parse-ichars
Parse a case-insensitive character value consisting of a given string of characters.
Parse-direct
Parse a direct numeric value consisting of given natural numbers.
Parse-range
Parse a range numeric value consisting of given minimum and maximum.
Parse-next
Obtain the next natural number from the input.