diff --git a/alliance/src/vbl/src/vbl_bcomp_y.y b/alliance/src/vbl/src/vbl_bcomp_y.y index 0e55fe95..ffd10cec 100644 --- a/alliance/src/vbl/src/vbl_bcomp_y.y +++ b/alliance/src/vbl/src/vbl_bcomp_y.y @@ -48,9 +48,12 @@ # define my_fprintf fprintf( stdout, "%s %d : ", basename(__FILE__), __LINE__ ); fprintf # define my_vbl_error(N,V) \ do { fprintf( stderr, "%s %d : ", basename(__FILE__), __LINE__); vbl_error(N,V); } while(0) +# define my_vbl_warning(N,V) \ + do { fprintf( stderr, "%s %d : ", basename(__FILE__), __LINE__); vbl_warning(N,V); } while(0) #else # define my_fprintf fprintf # define my_vbl_error vbl_error +# define my_vbl_warning vbl_warning #endif #ifdef VBL_DEBUG @@ -6043,9 +6046,28 @@ signal_assignment_statement ; waveform_element - : expression - { $$ = $1; } - ; + : expression + .AFTER__delay_expression. + { + $$ = $1; + } + ; + +.AFTER__delay_expression. + : /*empty*/ + { } + | AFTER + delay_expression + { + my_vbl_warning( 0, "after clauses ignored !" ); + } + ; + +delay_expression + : AbstractLit + time_label + { } + ; if_statement : IF diff --git a/alliance/src/vbl/src/vbl_bspec.h b/alliance/src/vbl/src/vbl_bspec.h index 3e79117f..20903725 100644 --- a/alliance/src/vbl/src/vbl_bspec.h +++ b/alliance/src/vbl/src/vbl_bspec.h @@ -88,5 +88,6 @@ extern int vbl_intSize(); extern int vbl_vextonum(); extern vbtyp_list *vbl_getbasetype(); extern void vbl_error(); + extern void vbl_warning(); extern int vbl_tobin(); diff --git a/alliance/src/vbl/src/vbl_util.c b/alliance/src/vbl/src/vbl_util.c index 96045871..529a46de 100644 --- a/alliance/src/vbl/src/vbl_util.c +++ b/alliance/src/vbl/src/vbl_util.c @@ -502,6 +502,9 @@ char *str1; break; } + fprintf( stderr, + "Note that errors might also be due to unsupported statements\n" ); + if (VBL_ERRFLG > VBL_MXRDFN) { (void) fprintf (stderr,"Too many errors. Cannot continue further more\n"); @@ -512,6 +515,26 @@ char *str1; autexit(1); } +void vbl_warning (code,str1) + +int code; +char *str1; + +{ + (void)fprintf (stderr,"Warning %d line %ld in file %s :",code,VBL_LINNUM, VBL_FILENAME); + + switch (code) + { + case 0: + (void) fprintf (stderr," %s\n", str1); + break; + + default: + (void) fprintf (stderr, "unknown warning\n"); + break; + } +} + /* ###--------------------------------------------------------------### */ /* function : vbl_y_error */ /* ###--------------------------------------------------------------### */