• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
        • Deftreeops
        • Defdefparse
        • Defgrammar
        • Tree-utilities
        • Notation
        • Grammar-parser
        • Meta-circular-validation
        • Parsing-primitives-defresult
        • Parsing-primitives-seq
        • Operations
          • In-terminal-set
            • Leaves-in-termset-when-match-alt/conc/rep/elem-in-termset
            • Symbol-in-termset-p
            • Rulelist-in-termset-p
            • String-in-termset-p
            • Char-insensitive-in-termset-p
            • Chars-sensitive-in-termset-p
            • Chars-insensitive-in-termset-p
            • Concatenation-in-termset-p
            • Char-val-in-termset-p
            • Alternation-in-termset-p
            • Prose-val-in-termset-p
            • Num-val-in-termset-p
            • Char-sensitive-in-termset-p
            • Rule-in-termset-p
            • Repetition-in-termset-p
            • Terminal-strings-in-termset-when-rules-in-termset
            • Element-in-termset-p
            • Nats-in-termset-when-match-sensitive-chars-in-termset
            • Nats-in-termset-when-match-insensitive-chars-in-termset
            • Leaves-in-termset-when-match-char-val-in-termset
            • Nat-in-termset-when-match-sensitive-char-in-termset
            • Nat-in-termset-when-match-insensitive-char-in-termset
            • Leaves-in-termset-when-match-num-val-in-termset
          • Well-formedness
          • Closure
          • Plugging
          • Ambiguity
          • Renaming
          • Numeric-range-retrieval
          • Rule-utilities
          • Removal
          • Character-value-retrieval
        • 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
  • Operations

In-terminal-set

ABNF grammars that generate only terminals in given sets.

If all the terminal value notations used in a rule list denote values that belong to a certain set of terminals (natural numbers), then the terminal strings of that rule list consist of only terminals that belong to that set. This is proved below.

For example, if all the terminal value notations are octets, the terminal strings consist of octets and can be parsed starting from character strings (since ACL2::characters are isomorphic to octets) instead of natural numbers.

Subtopics

Leaves-in-termset-when-match-alt/conc/rep/elem-in-termset
Alternations, concatenation, repetitions, and elements whose terminal value notations all denote values in a set, can be matched only by (lists of (lists of)) trees whose terminal leaves are in the set.
Symbol-in-termset-p
Check if a symbol is either a rule name or a natural number in a set.
Rulelist-in-termset-p
Check if all the terminal value notations in a list of rules denote values in a set.
String-in-termset-p
Check if a string consists of terminals in a set and rule names.
Char-insensitive-in-termset-p
Check if the code of a character, as well as the codes of its uppercase or lowercase counterparts, are in a set.
Chars-sensitive-in-termset-p
Lift char-sensitive-in-termset-p to lists.
Chars-insensitive-in-termset-p
Lift char-insensitive-in-termset-p to lists.
Concatenation-in-termset-p
Check if all the terminal value notations in a concatenation denote values in a set.
Char-val-in-termset-p
Check if a character value notation denotes values in a set.
Alternation-in-termset-p
Check if all the terminal value notations in an alternation denote values in a set.
Prose-val-in-termset-p
A prose value notation is unconstrained, so it cannot be guaranteed to denote values in a set.
Num-val-in-termset-p
Check if a numeric value notation denotes values in a set.
Char-sensitive-in-termset-p
Check if the code of a character is in a set.
Rule-in-termset-p
Check if all the terminal value notations in a rule denote values in a set.
Repetition-in-termset-p
Check if all the terminal value notations in a repetition denote values in a set, or the repetition consists of zero instances.
Terminal-strings-in-termset-when-rules-in-termset
Rules whose terminal value notations all denote values in a set, generate terminal strings consisting of terminals in the set.
Element-in-termset-p
Check if all the terminal value notations in an element denote values in a set.
Nats-in-termset-when-match-sensitive-chars-in-termset
Lemma to prove leaves-in-termset-when-match-char-val-in-termset.
Nats-in-termset-when-match-insensitive-chars-in-termset
Lemma to prove leaves-in-termset-when-match-char-val-in-termset.
Leaves-in-termset-when-match-char-val-in-termset
Character value notations that denote terminals in a set can be matched only by trees whose terminal leaves are in the set.
Nat-in-termset-when-match-sensitive-char-in-termset
Lemma to prove nats-in-termset-when-match-sensitive-chars-in-termset.
Nat-in-termset-when-match-insensitive-char-in-termset
Lemma to prove nats-in-termset-when-match-insensitive-chars-in-termset.
Leaves-in-termset-when-match-num-val-in-termset
Numeric value notations that denote values in a set can be matched only by trees whose terminal leaves are in the set.