--- - branch: MAIN date: Sun Jul 11 16:57:21 UTC 2021 files: - new: '1.307' old: '1.306' path: src/usr.bin/xlint/lint1/cgram.y pathrev: src/usr.bin/xlint/lint1/cgram.y@1.307 type: modified id: 20210711T165721Z.3e494336f2e985adef155c0d801e84a934dbfd1e log: "lint: resolve shift/reduce conflicts for unary expressions\n\nThe grammar rule 'term' was ambiguous since both the prefix and postfix\nincrement operators were listed with the same precedence. The\nexpression '++x++' was parsed as '++ (x++)', as expected, since\nconflicts resolve towards shift.\n\nResolve these conflicts by structuring the grammar as in C99, with the\nGCC extension of statement-expressions. \ The resolved conflicts are:\n\n134: shift/reduce conflict (shift 161, reduce 347) on T_LBRACK\n134: shift/reduce conflict (shift 162, reduce 347) on T_LPAREN\n134: shift/reduce conflict (shift 163, reduce 347) on T_POINT\n134: shift/reduce conflict (shift 164, reduce 347) on T_ARROW\n134: shift/reduce conflict (shift 165, reduce 347) on T_INCDEC\nstate 134\n\tterm : term . T_INCDEC (335)\n\tterm : term . T_LBRACK expr T_RBRACK (341)\n\tterm : term . T_LPAREN T_RPAREN (342)\n\tterm : term . T_LPAREN argument_expression_list T_RPAREN (343)\n\tterm : term . point_or_arrow T_NAME (344)\n\tterm : T_EXTENSION term . (347)\n\nNo functional change.\n" module: src subject: 'CVS commit: src/usr.bin/xlint/lint1' unixtime: '1626022641' user: rillig