Print warnings for deprecated grammar use

This commit is contained in:
Stefan Rueger 2023-01-13 23:26:26 +00:00
parent 09c4b670c7
commit 1fa34c58a7
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
2 changed files with 14 additions and 8 deletions

View File

@ -597,7 +597,7 @@ part_parm :
K_DEVICECODE TKN_EQUAL numexpr {
{
yyerror("devicecode is deprecated, use stk500_devcode instead");
yyerror("devicecode is deprecated, will be removed in v8.0, use stk500_devcode instead");
YYABORT;
}
} |
@ -780,6 +780,7 @@ part_parm :
K_HAS_JTAG TKN_EQUAL numexpr
{
yywarning("has_jtag is deprecated, will be removed in v8.0, use prog_modes");
if ($3->value.number == 1)
current_part->prog_modes |= PM_JTAG;
else if ($3->value.number == 0)
@ -789,6 +790,7 @@ part_parm :
K_HAS_DW TKN_EQUAL numexpr
{
yywarning("has_debugwire is deprecated, will be removed in v8.0, use prog_modes");
if ($3->value.number == 1)
current_part->prog_modes |= PM_debugWIRE;
else if ($3->value.number == 0)
@ -798,6 +800,7 @@ part_parm :
K_HAS_PDI TKN_EQUAL numexpr
{
yywarning("has_pdi is deprecated, will be removed in v8.0, use prog_modes");
if ($3->value.number == 1)
current_part->prog_modes |= PM_PDI;
else if ($3->value.number == 0)
@ -807,6 +810,7 @@ part_parm :
K_HAS_UPDI TKN_EQUAL numexpr
{
yywarning("has_updi is deprecated, will be removed in v8.0, use prog_modes");
if ($3->value.number == 1)
current_part->prog_modes |= PM_UPDI;
else if ($3->value.number == 0)
@ -816,6 +820,7 @@ part_parm :
K_HAS_TPI TKN_EQUAL numexpr
{
yywarning("has_tpi is deprecated, will be removed in v8.0, use prog_modes");
if ($3->value.number == 1)
current_part->prog_modes |= PM_TPI;
else if ($3->value.number == 0)
@ -830,7 +835,7 @@ part_parm :
else if ($3->value.number == 0)
current_part->flags &= ~AVRPART_IS_AT90S1200;
else {
yyerror("not a Boolean value");
yyerror("is_at90s1200 not a Boolean value");
free_token($3);
YYABORT;
}
@ -840,6 +845,7 @@ part_parm :
K_IS_AVR32 TKN_EQUAL numexpr
{
yywarning("is_avr32 is deprecated, will be removed in v8.0, use prog_modes");
if ($3->value.number == 1)
current_part->prog_modes |= PM_aWire;
else if ($3->value.number == 0)
@ -854,7 +860,7 @@ part_parm :
else if ($3->value.number == 0)
current_part->flags &= ~AVRPART_ALLOWFULLPAGEBITSTREAM;
else {
yyerror("not a Boolean value");
yyerror("allowfullpagebitstream not a Boolean value");
free_token($3);
YYABORT;
}
@ -869,7 +875,7 @@ part_parm :
else if ($3->value.number == 0)
current_part->flags &= ~AVRPART_ENABLEPAGEPROGRAMMING;
else {
yyerror("not a Boolean value");
yyerror("enablepageprogramming not a Boolean value");
free_token($3);
YYABORT;
}
@ -884,7 +890,7 @@ part_parm :
else if ($3->value.number == 0)
current_part->flags &= ~AVRPART_SERIALOK;
else {
yyerror("not a Boolean value");
yyerror("serial not a Boolean value");
free_token($3);
YYABORT;
}
@ -907,7 +913,7 @@ part_parm :
current_part->flags |= AVRPART_PSEUDOPARALLEL;
}
else {
yyerror("outside [0, 2] (yes/no/pseudo)");
yyerror("parallel outside [0, 2] (yes/no/pseudo)");
free_token($3);
YYABORT;
}

View File

@ -183,8 +183,8 @@ load_ext_addr { yylval=new_token(K_LOAD_EXT_ADDR); ccap(); return K_LOAD_EXT_
loadpage_hi { yylval=new_token(K_LOADPAGE_HI); ccap(); return K_LOADPAGE_HI; }
loadpage_lo { yylval=new_token(K_LOADPAGE_LO); ccap(); return K_LOADPAGE_LO; }
memory { yylval=NULL; ccap(); current_strct = COMP_AVRMEM; return K_MEMORY; }
miso { yylval=NULL; ccap(); return K_SDI; } // Deprecated
mosi { yylval=NULL; ccap(); return K_SDO; } // Deprecated
miso { yylval=NULL; ccap(); yywarning("miso is deprecated, will be removed in v8.0, use sdi"); return K_SDI; }
mosi { yylval=NULL; ccap(); yywarning("mosi is deprecated, will be removed in v8.0, use sdo"); return K_SDO; }
NULL { yylval=NULL; return K_NULL; }
page_size { yylval=NULL; ccap(); return K_PAGE_SIZE; }
parallel { yylval=NULL; ccap(); return K_PARALLEL; }