Esempio n. 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.")
Esempio n. 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.")
Esempio n. 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.")
Esempio n. 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.")