• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
        • Transformations
        • Language
          • Abstract-syntax
          • Dynamic-semantics
          • Concrete-syntax
            • Lexer
            • Parser
            • Grammar-old
            • Grammar
            • Tokenizer
              • Tokenize-yul
              • Filter-and-reduce-lexeme-tree-to-subtoken-trees
              • Check-and-deref-tree-token?
              • Check-and-deref-tree-lexeme?
              • Tokenize-yul-bytes
                • Is-tree-rulename?
            • Static-soundness
            • Static-semantics
            • Errors
          • Yul-json
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Tokenizer

    Tokenize-yul-bytes

    Lexes the bytes of a Yul source program into a list of tokens.

    Signature
    (tokenize-yul-bytes yul-bytes) → yul-lexemes
    Arguments
    yul-bytes — Guard (nat-listp yul-bytes).
    Returns
    yul-lexemes — Type (abnf::tree-list-resultp yul-lexemes).

    This does the same thing as tokenize-yul, but does not need to convert the string to bytes first.

    Definitions and Theorems

    Function: tokenize-yul-bytes

    (defun tokenize-yul-bytes (yul-bytes)
     (declare (xargs :guard (nat-listp yul-bytes)))
     (let ((__function__ 'tokenize-yul-bytes))
      (declare (ignorable __function__))
      (b*
       (((mv erp lexeme-trees)
         (lexemeize-yul-bytes yul-bytes))
        ((when erp)
         (reserrf "problem lexing yul-bytes"))
        (subtoken-trees
         (filter-and-reduce-lexeme-tree-to-subtoken-trees lexeme-trees))
        ((when (reserrp subtoken-trees))
         (reserrf "problem with structure of lexeme tree")))
       subtoken-trees)))

    Theorem: tree-list-resultp-of-tokenize-yul-bytes

    (defthm tree-list-resultp-of-tokenize-yul-bytes
      (b* ((yul-lexemes (tokenize-yul-bytes yul-bytes)))
        (abnf::tree-list-resultp yul-lexemes))
      :rule-classes :rewrite)