Changeset 01afd8d
- Timestamp:
- Jun 28, 2024, 11:31:44 AM (4 months ago)
- Branches:
- master
- Children:
- 259012e
- Parents:
- 55ba259e
- Location:
- src/Parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
r55ba259e r01afd8d 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Thu Jun 2 0 16:54:05202413 * Update Count : 7 7812 * Last Modified On : Thu Jun 27 14:38:27 2024 13 * Update Count : 780 14 14 */ 15 15 … … 458 458 459 459 "@=" { NAMEDOP_RETURN(ATassign); } // CFA 460 "+~" { NAMEDOP_RETURN(ErangeUp); } // CFA 460 461 "~=" { NAMEDOP_RETURN(ErangeUpEq); } // CFA 462 "+~=" { NAMEDOP_RETURN(ErangeUpEq); } // CFA 461 463 "-~" { NAMEDOP_RETURN(ErangeDown); } // CFA 462 464 "-~=" { NAMEDOP_RETURN(ErangeDownEq); } // CFA -
src/Parser/parser.yy
r55ba259e r01afd8d 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 26 09:37:28202413 // Update Count : 670 012 // Last Modified On : Thu Jun 27 14:45:57 2024 13 // Update Count : 6705 14 14 // 15 15 … … 224 224 #define UPDOWN( compop, left, right ) (compop == OperKinds::LThan || compop == OperKinds::LEThan ? left : right) 225 225 #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-torange so index is uninitialized."227 #define MISSING_HIGH "illegal syntax, missing high value for d own-torange 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." 228 228 229 229 static ForCtrl * makeForCtrl( const CodeLocation & location, DeclarationNode * init, OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) { … … 409 409 %token ANDassign ERassign ORassign // &= ^= |= 410 410 411 %token ErangeUp Eq ErangeDown ErangeDownEq //~= -~ -~=411 %token ErangeUp ErangeUpEq ErangeDown ErangeDownEq // +~ +~=/~= -~ -~= 412 412 %token ATassign // @= 413 413 … … 1526 1526 } 1527 1527 | comma_expression ';' '@' updowneq '@' // CFA, invalid syntax rule 1528 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-torange so index is uninitialized." ); $$ = nullptr; }1528 { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; } 1529 1529 1530 1530 | comma_expression ';' comma_expression updowneq comma_expression '~' comma_expression // CFA … … 1555 1555 } 1556 1556 | comma_expression ';' '@' updowneq '@' '~' '@' // CFA 1557 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-torange so index is uninitialized." ); $$ = nullptr; }1557 { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; } 1558 1558 1559 1559 | declaration comma_expression // CFA … … 1603 1603 } 1604 1604 | declaration '@' updowneq '@' '~' '@' // CFA, invalid syntax rule 1605 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-torange so index is uninitialized." ); $$ = nullptr; }1605 { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; } 1606 1606 1607 1607 | comma_expression ';' enum_key // CFA, enum type … … 1632 1632 // it is not possible to just remove the '='. The entire '~=' must be removed. 1633 1633 downupdowneq: 1634 ErangeDown 1634 ErangeUp 1635 { $$ = OperKinds::LThan; } 1636 | ErangeDown 1635 1637 { $$ = OperKinds::GThan; } 1636 1638 | ErangeUpEq … … 1641 1643 1642 1644 updown: 1643 '~' 1645 '~' // shorthand 0 ~ 10 => 0 +~ 10 1646 { $$ = OperKinds::LThan; } 1647 | ErangeUp 1644 1648 { $$ = OperKinds::LThan; } 1645 1649 | ErangeDown
Note: See TracChangeset
for help on using the changeset viewer.