Parse some more specify syntax.
This commit is contained in:
parent
37b60a4c52
commit
c01399fcda
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: lexor.lex,v 1.24 1999/06/16 03:13:29 steve Exp $"
|
#ident "$Id: lexor.lex,v 1.25 1999/06/19 03:21:21 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//# define YYSTYPE lexval
|
//# define YYSTYPE lexval
|
||||||
|
|
@ -75,6 +75,8 @@ static verinum*make_unsized_hex(const char*txt);
|
||||||
">>" { return K_RS; }
|
">>" { return K_RS; }
|
||||||
"<=" { return K_LE; }
|
"<=" { return K_LE; }
|
||||||
">=" { return K_GE; }
|
">=" { return K_GE; }
|
||||||
|
"=>" { return K_EG; }
|
||||||
|
"*>" { return K_SG; }
|
||||||
"==" { return K_EQ; }
|
"==" { return K_EQ; }
|
||||||
"!=" { return K_NE; }
|
"!=" { return K_NE; }
|
||||||
"===" { return K_CEQ; }
|
"===" { return K_CEQ; }
|
||||||
|
|
|
||||||
18
parse.y
18
parse.y
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: parse.y,v 1.44 1999/06/17 05:34:42 steve Exp $"
|
#ident "$Id: parse.y,v 1.45 1999/06/19 03:21:21 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "parse_misc.h"
|
# include "parse_misc.h"
|
||||||
|
|
@ -67,7 +67,7 @@ extern void lex_end_table();
|
||||||
%token <text> HIDENTIFIER IDENTIFIER PORTNAME SYSTEM_IDENTIFIER STRING
|
%token <text> HIDENTIFIER IDENTIFIER PORTNAME SYSTEM_IDENTIFIER STRING
|
||||||
%token <number> NUMBER
|
%token <number> NUMBER
|
||||||
%token <realtime> REALTIME
|
%token <realtime> REALTIME
|
||||||
%token K_LE K_GE K_EQ K_NE K_CEQ K_CNE K_LS K_RS
|
%token K_LE K_GE K_EG K_EQ K_NE K_CEQ K_CNE K_LS K_RS K_SG
|
||||||
%token K_LOR K_LAND K_NAND K_NOR K_NXOR
|
%token K_LOR K_LAND K_NAND K_NOR K_NXOR
|
||||||
%token K_always K_and K_assign K_begin K_buf K_bufif0 K_bufif1 K_case
|
%token K_always K_and K_assign K_begin K_buf K_bufif0 K_bufif1 K_case
|
||||||
%token K_casex K_casez K_cmos K_deassign K_default K_defparam K_disable
|
%token K_casex K_casez K_cmos K_deassign K_default K_defparam K_disable
|
||||||
|
|
@ -629,11 +629,14 @@ expr_primary
|
||||||
|
|
||||||
func_body
|
func_body
|
||||||
: function_item_list statement
|
: function_item_list statement
|
||||||
|
| function_item_list
|
||||||
|
{ yyerror(@1, "function body has no statement."); }
|
||||||
;
|
;
|
||||||
|
|
||||||
function_item
|
function_item
|
||||||
: K_input range_opt list_of_variables ';'
|
: K_input range_opt list_of_variables ';'
|
||||||
| K_reg range_opt list_of_variables ';'
|
| K_reg range_opt list_of_variables ';'
|
||||||
|
| K_integer list_of_variables ';'
|
||||||
;
|
;
|
||||||
|
|
||||||
function_item_list
|
function_item_list
|
||||||
|
|
@ -1207,6 +1210,10 @@ register_variable_list
|
||||||
|
|
||||||
specify_item
|
specify_item
|
||||||
: K_specparam specparam_list ';'
|
: K_specparam specparam_list ';'
|
||||||
|
| specify_simple_path '=' '(' expression_list ')' ';'
|
||||||
|
{ yyerror(@1, "Sorry, specify path declarations not supported.");
|
||||||
|
delete $4;
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
specify_item_list
|
specify_item_list
|
||||||
|
|
@ -1214,6 +1221,11 @@ specify_item_list
|
||||||
| specify_item_list specify_item
|
| specify_item_list specify_item
|
||||||
;
|
;
|
||||||
|
|
||||||
|
specify_simple_path
|
||||||
|
: '(' IDENTIFIER spec_polarity K_EG IDENTIFIER ')'
|
||||||
|
| '(' IDENTIFIER spec_polarity K_SG IDENTIFIER ')'
|
||||||
|
;
|
||||||
|
|
||||||
specparam
|
specparam
|
||||||
: IDENTIFIER '=' expression
|
: IDENTIFIER '=' expression
|
||||||
{ yyerror(@1, "Sorry, specparam assignments not supported.");
|
{ yyerror(@1, "Sorry, specparam assignments not supported.");
|
||||||
|
|
@ -1227,6 +1239,8 @@ specparam_list
|
||||||
| specparam_list ',' specparam
|
| specparam_list ',' specparam
|
||||||
;
|
;
|
||||||
|
|
||||||
|
spec_polarity: '+' | '-' | ;
|
||||||
|
|
||||||
statement
|
statement
|
||||||
: K_assign lavalue '=' expression ';'
|
: K_assign lavalue '=' expression ';'
|
||||||
{ yyerror(@1, "Sorry, procedural continuous assign not supported.");
|
{ yyerror(@1, "Sorry, procedural continuous assign not supported.");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue