code: def t_prepro_ID(self, t):
          r'[_a-zA-Z][_a-zA-Z0-9]*'  # preprocessor directives
          t.type = reserved_directives.get(t.value.lower(), 'ID')
          states_ = {
              'DEFINE': 'define',
              'PRAGMA': 'pragma',
              'IF': 'if',
              'ERROR': 'msg',
              'WARNING': 'msg'
          }
  
          if t.type in states_:
              t.lexer.begin(states_[t.type])
          elif t.type == 'ID' and self.expectingDirective:
              self.error("invalid directive #%s" % t.value)
  
          self.expectingDirective = False
          return f t_prepro_ID(self, t):
          r'[_a-zA-Z][_a-zA-Z0-9]*'  # preprocessor directives
          t.type = reserved_directives.get(t.value.lower(), 'ID')
          states_ = {
              'DEFINE': 'define',
              'PRAGMA': 'pragma',
              'IF': 'if',
              'ERROR': 'msg',
              'WARNING': 'msg'
          }
  
          if t.type in states_:
              t.lexer.begin(states_[t.type])
          elif t.type == 'ID' and self.expectingDirective:
              self.error("invalid directive #%s" % t.value)
  
          self.expectingDirective = False
          return t
docs: r'[_a-zA-Z][_a-zA-Z0-9]*