Content deleted Content added
Undid revision 483337387 by 70.253.84.210 (talk) Goofed; the original was correct. |
No edit summary |
||
Line 39:
Changes to ASTs can be accomplished by both procedural methods coded in PARLANSE and source-to-source tree transformations coded as rewrite rules using surface-syntax conditioned by any extracted program facts. The rewrite rule engine handles associative and commutative rules. A rewrite rule for C to replace a complex condition by the '''?:''' operator be written as:
rule simplify_conditional_assignment(v:left_hand_side,e1:expression,e2:expression,e3:expression)
:statement->statement
= " if (\e1) \v=\e2; else \v=e3; "
|