From 67472379b484475178f57dbf3189354e8d26674f Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 13 Sep 2000 16:32:26 +0000 Subject: [PATCH] Error message for invalid variable list. --- parse.y | 8 +++++++- pform.cc | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index cc38f9b38..04c04140f 100644 --- a/parse.y +++ b/parse.y @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: parse.y,v 1.104 2000/07/29 17:58:21 steve Exp $" +#ident "$Id: parse.y,v 1.105 2000/09/13 16:32:26 steve Exp $" #endif # include "parse_misc.h" @@ -1183,6 +1183,12 @@ module_item } delete $3; } + | port_type range_opt error ';' + { yyerror(@3, "error: Invalid variable list" + " in port declaration."); + if ($2) delete $2; + yyerrok; + } | block_item_decl | K_defparam defparam_assign_list ';' | K_event list_of_variables ';' diff --git a/pform.cc b/pform.cc index 0cde515c5..29c385ec2 100644 --- a/pform.cc +++ b/pform.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: pform.cc,v 1.63 2000/07/29 17:58:21 steve Exp $" +#ident "$Id: pform.cc,v 1.64 2000/09/13 16:32:26 steve Exp $" #endif # include "compiler.h" @@ -921,6 +921,7 @@ int pform_parse(const char*path, map&modules, int rc = VLparse(); if (rc) { cerr << "I give up." << endl; + error_count += 1; } modules = vl_modules; @@ -931,6 +932,9 @@ int pform_parse(const char*path, map&modules, /* * $Log: pform.cc,v $ + * Revision 1.64 2000/09/13 16:32:26 steve + * Error message for invalid variable list. + * * Revision 1.63 2000/07/29 17:58:21 steve * Introduce min:typ:max support. *