• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
            • Dynamic-semantics
            • Concrete-syntax
              • Lexer
                • Lex-keyword
                • Lex-group-escape-sequence-single
                • Lex-symbol
                • Lex-rest-of-block-comment-fns
                • Lex-group-for-hex-string
                • Lex-hex-digit
                • Lex-group-escape-sequence-body
                • Lex-whitespace-char
                • Lex-string-literal
                • Lex-literal
                • Lex-identifier-start
                • Lex-hex-string
                • Lex-single-quoted-printable
                • Lex-double-quoted-printable
                • Lex-group-optional-underbar-and-two-hex-digits
                • Lex-escape-sequence
                • Lex-token
                • Lex-not-star-or-slash
                • Lex-not-lf-or-cr
                • Lex-group-squoted-or-escape
                • Lex-group-dquoted-or-escape
                • Lex-optional-sequence-of-2hex-digits
                • Lex-decimal-number
                • Lex-lexeme
                • Lex-identifier-rest
                • Lex-end-of-line-comment
                • Lex-nonzero-decimal-digit
                • Lex-repetition-*-optional-underbar-and-two-hex-digits
                • Lex-not-star
                • Lex-comment
                • Lex-boolean
                • Lex-block-comment
                • Lex-uppercase-letter
                • Lex-lowercase-letter
                • Lex-identifier
                • Lex-hex-number
                • Lex-decimal-digit
                • Lex-squote
                • Lex-repetition-4-hex-digits
                • Lex-optional-underbar
                • Lex-dquote
                • Lex-repetition-*-squoted-or-escape
                • Lex-repetition-*-dquoted-or-escape
                • Lex-repetition-*-whitespace-char
                • Lex-repetition-*-identifier-rest
                • Lex-repetition-2-hex-digits
                • Lex-lf
                • Lex-cr
                • Lex-repetition-*-not-lf-or-cr
                • Lex-repetition-*-decimal-digit
                • Lexemeize-yul
                • Lex-repetition-*-lexeme
                • Lex-repetition-*-hex-digit
                • *defparse-yul-group-table*
                • Lex-whitespace
                • Lexemeize-yul-bytes
                  • *defparse-yul-repetition-table*
                  • *defparse-yul-option-table*
                • Parser
                • Grammar-old
                • Grammar
                • Tokenizer
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Lexer

    Lexemeize-yul-bytes

    Lexes the bytes into a list of lexemes.

    Signature
    (lexemeize-yul-bytes yul-bytes) → (mv erp yul-lexemes)
    Arguments
    yul-bytes — Guard (nat-listp yul-bytes).
    Returns
    erp — Type (booleanp erp).
    yul-lexemes — Type (abnf::tree-listp yul-lexemes).
    This does the same thing as lexemeize-yul, but does not need to convert the string to bytes first.

    Definitions and Theorems

    Function: lexemeize-yul-bytes

    (defun lexemeize-yul-bytes (yul-bytes)
     (declare (xargs :guard (nat-listp yul-bytes)))
     (let ((__function__ 'lexemeize-yul-bytes))
      (declare (ignorable __function__))
      (b*
       (((mv trees rest-input)
         (lex-repetition-*-lexeme yul-bytes))
        ((when (reserrp trees))
         (prog2$ (cw "tokenize-yul: reserrp should not happen here")
                 (mv t nil)))
        ((unless (null rest-input))
         (prog2$
          (cw
           "tokenize-yul: bytes given cannot be fully tokenized; returning list of abnf trees found so far")
          (mv t trees))))
       (mv nil trees))))

    Theorem: booleanp-of-lexemeize-yul-bytes.erp

    (defthm booleanp-of-lexemeize-yul-bytes.erp
      (b* (((mv ?erp ?yul-lexemes)
            (lexemeize-yul-bytes yul-bytes)))
        (booleanp erp))
      :rule-classes :rewrite)

    Theorem: tree-listp-of-lexemeize-yul-bytes.yul-lexemes

    (defthm tree-listp-of-lexemeize-yul-bytes.yul-lexemes
      (b* (((mv ?erp ?yul-lexemes)
            (lexemeize-yul-bytes yul-bytes)))
        (abnf::tree-listp yul-lexemes))
      :rule-classes :rewrite)