Changeset 7b3094 in git for Singular/grammar.y


Ignore:
Timestamp:
Jan 11, 2000, 6:51:15 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
3a62db15459fcfd405979f894c67de77e0ff1e84
Parents:
ba8c0bced42227f9c29f470c292a51ab29c2a405
Message:
*hannes: optimization of grammar


git-svn-id: file:///usr/local/Singular/svn/trunk@4072 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/grammar.y

    rba8c0b r7b3094  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: grammar.y,v 1.77 1999-12-21 11:44:01 Singular Exp $ */
     4/* $Id: grammar.y,v 1.78 2000-01-11 17:51:14 Singular Exp $ */
    55/*
    66* ABSTRACT: SINGULAR shell grammatik
     
    288288
    289289%type <i>    '=' '<' '>' '+' '-' COLONCOLON
    290 %type <i>    '*' '/' '[' ']' '^' ',' ';'
     290%type <i>    '/' '[' ']' '^' ',' ';'
    291291
    292292
     
    295295%nonassoc '=' DOTDOT
    296296%left ','
    297 %left '|' '&'
     297%left '&'
    298298%left EQUAL_EQUAL NOTEQUAL
    299 %left '<' '>' GE LE
     299%left '<'
    300300%left '+' '-'
    301 %left '*' '/' '%'
     301%left '/'
    302302%left UMINUS NOT
    303303%left  '^'
     
    744744            if(iiExprArith2(&$$,&$1,'-',&$3)) YYERROR;
    745745          }
    746         | expr '*' expr
    747           {
    748             if(iiExprArith2(&$$,&$1,'*',&$3)) YYERROR;
    749           }
    750746        | expr '/' expr
    751747          {
     
    756752            if(iiExprArith2(&$$,&$1,'^',&$3)) YYERROR;
    757753          }
    758         | expr '%' expr
     754        | expr '<' expr
    759755          {
    760756            if(iiExprArith2(&$$,&$1,$<i>2,&$3)) YYERROR;
    761757          }
    762         | expr '>' expr
    763           {
    764             if(iiExprArith2(&$$,&$1,'>',&$3)) YYERROR;
    765           }
    766         | expr '<' expr
    767           {
    768             if(iiExprArith2(&$$,&$1,'<',&$3)) YYERROR;
    769           }
    770758        | expr '&' expr
    771759          {
    772             if(iiExprArith2(&$$,&$1,'&',&$3)) YYERROR;
    773           }
    774         | expr '|' expr
    775           {
    776             if(iiExprArith2(&$$,&$1,'|',&$3)) YYERROR;
     760            if(iiExprArith2(&$$,&$1,$<i>2,&$3)) YYERROR;
    777761          }
    778762        | expr NOTEQUAL expr
     
    783767          {
    784768            if(iiExprArith2(&$$,&$1,EQUAL_EQUAL,&$3)) YYERROR;
    785           }
    786         | expr GE  expr
    787           {
    788             if(iiExprArith2(&$$,&$1,GE,&$3)) YYERROR;
    789           }
    790         | expr LE expr
    791           {
    792             if(iiExprArith2(&$$,&$1,LE,&$3)) YYERROR;
    793769          }
    794770        | expr DOTDOT expr
     
    10621038filecmd:
    10631039        '<' stringexpr
    1064           { if((feFilePending=feFopen($2,"r",NULL,TRUE))==NULL) YYERROR; }
     1040          { if ($<i>1 != '<') YYERROR;
     1041            if((feFilePending=feFopen($2,"r",NULL,TRUE))==NULL) YYERROR; }
    10651042        ';'
    10661043          { newFile($2,feFilePending); }
Note: See TracChangeset for help on using the changeset viewer.