• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
          • Defgrammar-implementation
            • Defgrammar-fn
            • Defgrammar-input-processing
              • Defgrammar-process-inputs
              • Defgrammar-process-name
                • *defgrammar-allowed-options*
              • Defgrammar-table
              • Defgrammar-event-generation
              • Defgrammar-macro-definition
          • Tree-utilities
          • Notation
          • Grammar-parser
          • Meta-circular-validation
          • Parsing-primitives-defresult
          • Parsing-primitives-seq
          • Operations
          • Examples
          • Differences-with-paper
          • Constructor-utilities
          • Grammar-printer
          • Parsing-tools
        • 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
        • 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
    • Defgrammar-input-processing

    Defgrammar-process-name

    Process the *name* input.

    Signature
    (defgrammar-process-name name ctx state) 
      → 
    (mv erp nothing state)
    Arguments
    ctx — Guard (ctxp ctx).

    Definitions and Theorems

    Function: defgrammar-process-name

    (defun defgrammar-process-name (name ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (ctxp ctx)))
     (let ((__function__ 'defgrammar-process-name))
      (declare (ignorable __function__))
      (b*
       (((unless (legal-constantp name))
         (er-soft+
          ctx t nil
          "The first input must be a legal constant name, ~
                       but ~x0 is not a legal constant name."
          name))
        ((er &)
         (ensure-symbol-is-fresh-event-name$
              name
              (msg "The constant name ~x0 specified as first input"
                   name)
              'acl2::const
              nil t nil)))
       (value nil))))

    Theorem: defgrammar-process-name-symbol-when-not-error

    (defthm defgrammar-process-name-symbol-when-not-error
      (b* (((mv acl2::?erp ?nothing acl2::?state)
            (defgrammar-process-name name ctx state)))
        (implies (not erp)
                 (common-lisp::symbolp name))))