Ignore:
Timestamp:
Jun 29, 2024, 5:02:49 AM (3 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
115ac1ce
Parents:
5ccc733 (diff), 3c55fcd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r5ccc733 r4117761  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 26 09:37:28 2024
    13 // Update Count     : 6700
     12// Last Modified On : Thu Jun 27 14:45:57 2024
     13// Update Count     : 6705
    1414//
    1515
     
    224224#define UPDOWN( compop, left, right ) (compop == OperKinds::LThan || compop == OperKinds::LEThan ? left : right)
    225225#define MISSING_ANON_FIELD "illegal syntax, missing loop fields with an anonymous loop index is meaningless as loop index is unavailable in loop body."
    226 #define MISSING_LOW "illegal syntax, missing low value for up-to range so index is uninitialized."
    227 #define MISSING_HIGH "illegal syntax, missing high value for down-to range so index is uninitialized."
     226#define MISSING_LOW "illegal syntax, missing low value for ascanding range so index is uninitialized."
     227#define MISSING_HIGH "illegal syntax, missing high value for descending range so index is uninitialized."
    228228
    229229static ForCtrl * makeForCtrl( const CodeLocation & location, DeclarationNode * init, OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) {
     
    409409%token ANDassign        ERassign        ORassign                                // &=   ^=      |=
    410410
    411 %token ErangeUpEq       ErangeDown      ErangeDownEq                    // ~=   -~      -~=
     411%token ErangeUp         ErangeUpEq      ErangeDown      ErangeDownEq // +~      +~=/~=  -~      -~=
    412412%token ATassign                                                                                 // @=
    413413
     
    15261526                }
    15271527        | comma_expression ';' '@' updowneq '@'                         // CFA, invalid syntax rule
    1528                 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-to range so index is uninitialized." ); $$ = nullptr; }
     1528                { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; }
    15291529
    15301530        | comma_expression ';' comma_expression updowneq comma_expression '~' comma_expression // CFA
     
    15551555                }
    15561556        | comma_expression ';' '@' updowneq '@' '~' '@' // CFA
    1557                 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-to range so index is uninitialized." ); $$ = nullptr; }
     1557                { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; }
    15581558
    15591559        | declaration comma_expression                                          // CFA
     
    16031603                }
    16041604        | declaration '@' updowneq '@' '~' '@'                          // CFA, invalid syntax rule
    1605                 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-to range so index is uninitialized." ); $$ = nullptr; }
     1605                { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; }
    16061606
    16071607        | comma_expression ';' enum_key                                         // CFA, enum type
     
    16321632// it is not possible to just remove the '='. The entire '~=' must be removed.
    16331633downupdowneq:
    1634         ErangeDown
     1634        ErangeUp
     1635                { $$ = OperKinds::LThan; }
     1636        | ErangeDown
    16351637                { $$ = OperKinds::GThan; }
    16361638        | ErangeUpEq
     
    16411643
    16421644updown:
    1643         '~'
     1645        '~'                                                                                                     // shorthand 0 ~ 10 => 0 +~ 10
     1646                { $$ = OperKinds::LThan; }
     1647        | ErangeUp
    16441648                { $$ = OperKinds::LThan; }
    16451649        | ErangeDown
Note: See TracChangeset for help on using the changeset viewer.