Checkers are functions that receive a grammar specification and any kind of data, and return True or False


checker -> grammar_spec -> data -> bool


In a more pythonic way:

class Checker:

     def __init__(self, grammarspec):

          self.grammarspec = grammarspec



     def check (self, data):

          .....

          return True



right now there are implementations available for regular expressions and BNF grammars. This function/class belongs to the grammar tools family:

  • Checker
  • Lexer
  • Parser

that are the most basic functions for grammars.