vhdlpp: Boolean values handled without using keywords.

This commit is contained in:
Maciej Suminski 2015-04-24 13:37:04 +02:00
parent bed5ee4529
commit 5101b3b64b
2 changed files with 13 additions and 18 deletions

View File

@ -47,7 +47,6 @@ end, GN_KEYWORD_2008, K_end
entity, GN_KEYWORD_2008, K_entity
exit, GN_KEYWORD_2008, K_exit
fairness, GN_KEYWORD_2008, K_fairness
false, GN_KEYWORD_2008, K_false
file, GN_KEYWORD_2008, K_file
for, GN_KEYWORD_2008, K_for
force, GN_KEYWORD_2008, K_force
@ -115,7 +114,6 @@ subtype, GN_KEYWORD_2008, K_subtype
then, GN_KEYWORD_2008, K_then
to, GN_KEYWORD_2008, K_to
transport, GN_KEYWORD_2008, K_transport
true, GN_KEYWORD_2008, K_true
type, GN_KEYWORD_2008, K_type
unaffected, GN_KEYWORD_2008, K_unaffected
units, GN_KEYWORD_2008, K_units

View File

@ -272,7 +272,7 @@ static void touchup_interface_for_functions(std::list<InterfacePort*>*ports)
%token K_case K_component K_configuration K_constant K_context K_cover
%token K_default K_disconnect K_downto
%token K_else K_elsif K_end K_entity K_exit
%token K_fairness K_false K_file K_for K_force K_function
%token K_fairness K_file K_for K_force K_function
%token K_generate K_generic K_group K_guarded
%token K_if K_impure K_in K_inertial K_inout K_is
%token K_label K_library K_linkage K_literal K_loop
@ -285,7 +285,7 @@ static void touchup_interface_for_functions(std::list<InterfacePort*>*ports)
%token K_restrict K_restrict_guarantee K_return K_reverse_range K_rol K_ror
%token K_select K_sequence K_severity K_signal K_shared
%token K_sla K_sll K_sra K_srl K_strong K_subtype
%token K_then K_to K_transport K_true K_type
%token K_then K_to K_transport K_type
%token K_unaffected K_units K_until K_use
%token K_variable K_vmode K_vprop K_vunit
%token K_wait K_when K_while K_with
@ -1590,10 +1590,17 @@ mode_opt : mode {$$ = $1;} | {$$ = PORT_NONE;} ;
name /* IEEE 1076-2008 P8.1 */
: IDENTIFIER /* simple_name (IEEE 1076-2008 P8.2) */
{ ExpName*tmp = new ExpName(lex_strings.make($1));
FILE_NAME(tmp, @1);
delete[]$1;
$$ = tmp;
{ Expression*tmp;
if(!strcasecmp($1, "true"))
tmp = new ExpBitstring("1");
else if(!strcasecmp($1, "false"))
tmp = new ExpBitstring("0");
else
tmp = new ExpName(lex_strings.make($1));
FILE_NAME(tmp, @1);
delete[]$1;
$$ = tmp;
}
| selected_name
@ -1827,16 +1834,6 @@ primary
delete[]$1;
$$ = tmp;
}
| K_true
{ ExpBitstring*tmp = new ExpBitstring("1");
FILE_NAME(tmp, @1);
$$ = tmp;
}
| K_false
{ ExpBitstring*tmp = new ExpBitstring("0");
FILE_NAME(tmp, @1);
$$ = tmp;
}
/*XXXX Caught up in element_association_list?
| '(' expression ')'