Ejemplo n.º 1
0
 def def_error_type(cls, _id, pattern, message, *args):
     from ezmlex.tokens import def_token, token
     from ezmlex.patterns import ccat
     tab = cls.error_types()
     def_token(tab, _id, pattern, _id, *args)
     token(tab, _id).is_error = lambda cls : True
     token(tab, _id).message = lambda cls : message
Ejemplo n.º 2
0
 def error_type(cls, _id):
     from ezmlex.tokens import token
     return token(cls.error_types(), _id)
Ejemplo n.º 3
0
 def token_type(cls, _id):
     from ezmlex.tokens import token
     return token(cls.token_types(), _id)