Exemple #1
0
def p_var_decl_error(p):
    'var_decl :  error  SEMICON'
    SemanticLogger.error(
        p[1].lineno,
        f"Syntax error at token `{p[1].value}` in var definition.")
Exemple #2
0
def p_record_type_decl_error(p):
    'record_type_decl :  kRECORD  error  kEND'
    SemanticLogger.error(
        p[2].lineno,
        f"Syntax error at token `{p[2].value}` in record definition.")
Exemple #3
0
def p_field_decl_error(p):
    'field_decl :  error  SEMICON'
    SemanticLogger.error(
        p[1].lineno,
        f"Syntax error at token `{p[1].value}` in record member definition.")
Exemple #4
0
def p_type_definition_error(p):
    'type_definition :  ID  EQUAL  error  SEMICON'
    SemanticLogger.error(
        p[3].lineno,
        f"Syntax error at token `{p[3].value}` in type definition.")