Module biodivine_sketchbook::algorithms::fo_logic::tokenizer

source Β·

EnumsΒ§

  • Enum of all possible tokens occurring in a FOL formula string.

FunctionsΒ§

  • Retrieve the arguments of a function, process everything from β€œ(” up to β€œ)”. Function name is consumed by caller.
  • collect_name πŸ”’
    Retrieve the name (of a proposition or variable) from the input. The first character of the name may or may not be already consumed by the caller.
  • is_false_const πŸ”’
    Predicate to decide if a given β€œname” represents false constant.
  • is_true_const πŸ”’
    Predicate to decide if a given β€œname” represents true constant.
  • is_valid_in_name πŸ”’
    Check if given char can appear in a name.
  • Check if given char can appear in a name.
  • Print the vector of tokens (for debug purposes).
  • Recursively display tokens.
  • Decide whether the name corresponds to a constant or a variable, and return the correct term token.
  • skip_whitespaces πŸ”’
    Check all whitespaces at the front of the iterator.
  • Try to tokenize given FOL formula string, turning it into a vector of FolToken instances.
  • Process a peekable iterator of characters into a vector of FolTokens. This function is used for both tokenizing a top-level formula an expression that is given as fn’s argument.