From 0c4bea473c8c1f2f8886019dd64930842b456852 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 6 Nov 2001 02:52:19 +0000 Subject: [PATCH] Parse specparam parsepulse assignments. --- lexor.lex | 9 ++++++--- parse.y | 12 +++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lexor.lex b/lexor.lex index 2699235cd..36ceea7d1 100644 --- a/lexor.lex +++ b/lexor.lex @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: lexor.lex,v 1.65 2001/10/30 21:46:56 steve Exp $" +#ident "$Id: lexor.lex,v 1.66 2001/11/06 02:52:19 steve Exp $" #endif # include "config.h" @@ -181,10 +181,13 @@ W [ \t\b\f\r]+ [a-zA-Z_][a-zA-Z0-9$_]* { int rc = lexor_keyword_code(yytext, yyleng); - if (rc == IDENTIFIER) + if (rc == IDENTIFIER) { yylval.text = strdup(yytext); - else + if (strncmp(yylval.text,"PATHPULSE$", 10) == 0) + rc = PATHPULSE_IDENTIFIER; + } else { yylval.text = 0; + } return rc; } diff --git a/parse.y b/parse.y index 7ef47642a..d30253a27 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.134 2001/11/03 04:09:10 steve Exp $" +#ident "$Id: parse.y,v 1.135 2001/11/06 02:52:19 steve Exp $" #endif # include "config.h" @@ -84,6 +84,7 @@ static struct str_pair_t decl_strength = { PGate::STRONG, PGate::STRONG }; }; %token HIDENTIFIER IDENTIFIER PORTNAME SYSTEM_IDENTIFIER STRING +%token PATHPULSE_IDENTIFIER %token NUMBER %token REALTIME %token K_LE K_GE K_EG K_EQ K_NE K_CEQ K_CNE K_LS K_RS K_SG @@ -1933,6 +1934,15 @@ specparam delete $5; delete $7; } + | PATHPULSE_IDENTIFIER '=' '(' expression ')' + { delete $1; + delete $4; + } + | PATHPULSE_IDENTIFIER '=' '(' expression ',' expression ')' + { delete $1; + delete $4; + delete $6; + } ; specparam_list