Intermediate Representation (IR) grammar | My Assignment Tutor

1Intermediate Representation (IR) grammar( N* denotes 0, 1 or more repetitions of N ) IRProgram® StringsBlock IRStm*StringsBlock ® strings { StringDef* }®® id : STRINGStringDefIRStm® MOVE ( TEMP id , IRExp ) ® MOVE ( MEM ( IRExp ) , IRExp )® NOOP® JUMP ( IRExp )® CJUMP ( IRExp , op , IRExp , id , id )® EXP ( IRExp )® LABEL id® SEQ ( IRStm , IRStm )® PROLOGUE ( POSINT , POSINT )® EPILOGUE ( POSINT , POSINT )IRExp ® BINOP ( IRExp , op , IRExp )® CALL ( IRExp Arg* )® CONST IntLit® MEM ( IRExp )® TEMP id® NAME id® ESEQ ( IRStm , IRExp ) IntLit® POSINT® NEGINT® , IRExpArg Additional information about the terminal symbols:STRING is a sequence of arbitrary characters enclosed in quotation marks, forexample: “Th&_%$is 12is [email protected] STRING.” [Note: there is no syntaxfor escaping characters, so a STRING cannot include the ” character.]op is one of the following: LT LE EQ ADD SUB MUL DIVid is a non-empty sequence of letters, underscores, @ symbols, dots (the .character) and digits, starting with a non-digitPOSINT is a non-empty sequence of digits [Note: 0 is a POSINT!]NEGINT is a minus-sign followed by a non-empty sequence of digitsThere is no syntax for comments.

QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER

Leave a Reply

Your email address will not be published. Required fields are marked *