Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- assignment_statement
- : _ID
- {
- if( ($$ = lookup_id((char *)$1, GLOBAL_VAR|LOCAL_VAR|PARAMETER)) == -1 )
- syyerror("invalid lvalue in assignment");
- assign_type = $$;
- }
- numeric _SEMICOLON
- ;
- numeric
- : _ASSIGN num_exp
- {
- if(!check_types(assign_type, $2))
- syyerror("incompatible types in assignment");
- }
- | numeric _ASSIGN num_exp
- {
- if(!check_types(assign_type, $3))
- syyerror("incompatible types in assignment");
- }
- ;
Add Comment
Please, Sign In to add comment