1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134 |
- Terminals which are not used
- COLON
- MOD_OP
- FOR
- NOT
- State 25 conflicts: 1 shift/reduce
- Grammar
- 0 $accept: program $end
- 1 program: var_declarations statements
- 2 var_declarations: var_declarations var_declaration
- 3 | /* empty */
- 4 var_declaration: TYPE declaration_list SEMI
- 5 declaration_list: declaration_list COMMA declaration
- 6 | declaration
- 7 declaration: IDENTIFIER ASSIGN NUMBER
- 8 | IDENTIFIER LSQUARE NUMBER RSQUARE
- 9 | IDENTIFIER
- 10 code_block: statement
- 11 | LBRACE statements RBRACE
- 12 statements: statements statement
- 13 | statement
- 14 statement: assign_statement SEMI
- 15 | control_statement
- 16 | read_write_statement SEMI
- 17 | SEMI
- 18 control_statement: if_statement
- 19 | do_while_statement SEMI
- 20 | while_statement
- 21 | return_statement SEMI
- 22 read_write_statement: read_statement
- 23 | write_statement
- 24 assign_statement: IDENTIFIER LSQUARE exp RSQUARE ASSIGN exp
- 25 | IDENTIFIER ASSIGN exp
- 26 if_statement: if_stmt
- 27 @1: /* empty */
- 28 if_statement: if_stmt ELSE @1 code_block
- 29 return_statement: RETURN
- 30 read_statement: READ LPAR IDENTIFIER RPAR
- 31 write_statement: WRITE LPAR exp RPAR
- 32 @2: /* empty */
- 33 @3: /* empty */
- 34 while_statement: WHILE @2 LPAR exp RPAR @3 code_block
- 35 @4: /* empty */
- 36 do_while_statement: DO @4 code_block WHILE LPAR exp RPAR
- 37 @5: /* empty */
- 38 @6: /* empty */
- 39 if_stmt: IF @5 LPAR exp RPAR @6 code_block
- 40 exp: NUMBER
- 41 | IDENTIFIER
- 42 | IDENTIFIER LSQUARE exp RSQUARE
- 43 | NOT_OP NUMBER
- 44 | NOT_OP IDENTIFIER
- 45 | exp AND_OP exp
- 46 | exp OR_OP exp
- 47 | exp PLUS exp
- 48 | exp MINUS exp
- 49 | exp MUL_OP exp
- 50 | exp DIV_OP exp
- 51 | exp LT exp
- 52 | exp GT exp
- 53 | exp EQ exp
- 54 | exp NOTEQ exp
- 55 | exp LTEQ exp
- 56 | exp GTEQ exp
- 57 | exp SHL_OP exp
- 58 | exp SHR_OP exp
- 59 | exp ANDAND exp
- 60 | exp OROR exp
- 61 | LPAR exp RPAR
- 62 | MINUS exp
- Terminals, with rules where they appear
- $end (0) 0
- error (256)
- LBRACE (258) 11
- RBRACE (259) 11
- LPAR (260) 30 31 34 36 39 61
- RPAR (261) 30 31 34 36 39 61
- LSQUARE (262) 8 24 42
- RSQUARE (263) 8 24 42
- SEMI (264) 4 14 16 17 19 21
- COLON (265)
- PLUS (266) 47
- MINUS (267) 48 62
- MUL_OP (268) 49
- DIV_OP (269) 50
- MOD_OP (270)
- AND_OP (271) 45
- OR_OP (272) 46
- NOT_OP (273) 43 44
- ASSIGN (274) 7 24 25
- LT (275) 51
- GT (276) 52
- SHL_OP (277) 57
- SHR_OP (278) 58
- EQ (279) 53
- NOTEQ (280) 54
- LTEQ (281) 55
- GTEQ (282) 56
- ANDAND (283) 59
- OROR (284) 60
- COMMA (285) 5
- ELSE (286) 28
- FOR (287)
- RETURN (288) 29
- READ (289) 30
- WRITE (290) 31
- DO (291) 36
- WHILE (292) 34 36
- IF (293) 39
- TYPE (294) 4
- IDENTIFIER (295) 7 8 9 24 25 30 41 42 44
- NUMBER (296) 7 8 40 43
- NOT (297)
- Nonterminals, with rules where they appear
- $accept (43)
- on left: 0
- program (44)
- on left: 1, on right: 0
- var_declarations (45)
- on left: 2 3, on right: 1 2
- var_declaration (46)
- on left: 4, on right: 2
- declaration_list (47)
- on left: 5 6, on right: 4 5
- declaration (48)
- on left: 7 8 9, on right: 5 6
- code_block (49)
- on left: 10 11, on right: 28 34 36 39
- statements (50)
- on left: 12 13, on right: 1 11 12
- statement (51)
- on left: 14 15 16 17, on right: 10 12 13
- control_statement (52)
- on left: 18 19 20 21, on right: 15
- read_write_statement (53)
- on left: 22 23, on right: 16
- assign_statement (54)
- on left: 24 25, on right: 14
- if_statement (55)
- on left: 26 28, on right: 18
- @1 (56)
- on left: 27, on right: 28
- return_statement (57)
- on left: 29, on right: 21
- read_statement (58)
- on left: 30, on right: 22
- write_statement (59)
- on left: 31, on right: 23
- while_statement (60)
- on left: 34, on right: 20
- @2 (61)
- on left: 32, on right: 34
- @3 (62)
- on left: 33, on right: 34
- do_while_statement (63)
- on left: 36, on right: 19
- @4 (64)
- on left: 35, on right: 36
- if_stmt (65)
- on left: 39, on right: 26 28
- @5 (66)
- on left: 37, on right: 39
- @6 (67)
- on left: 38, on right: 39
- exp (68)
- on left: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
- 58 59 60 61 62, on right: 24 25 31 34 36 39 42 45 46 47 48 49 50
- 51 52 53 54 55 56 57 58 59 60 61 62
- state 0
- 0 $accept: . program $end
- $default reduce using rule 3 (var_declarations)
- program go to state 1
- var_declarations go to state 2
- state 1
- 0 $accept: program . $end
- $end shift, and go to state 3
- state 2
- 1 program: var_declarations . statements
- 2 var_declarations: var_declarations . var_declaration
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- TYPE shift, and go to state 11
- IDENTIFIER shift, and go to state 12
- var_declaration go to state 13
- statements go to state 14
- statement go to state 15
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 3
- 0 $accept: program $end .
- $default accept
- state 4
- 17 statement: SEMI .
- $default reduce using rule 17 (statement)
- state 5
- 29 return_statement: RETURN .
- $default reduce using rule 29 (return_statement)
- state 6
- 30 read_statement: READ . LPAR IDENTIFIER RPAR
- LPAR shift, and go to state 26
- state 7
- 31 write_statement: WRITE . LPAR exp RPAR
- LPAR shift, and go to state 27
- state 8
- 36 do_while_statement: DO . @4 code_block WHILE LPAR exp RPAR
- $default reduce using rule 35 (@4)
- @4 go to state 28
- state 9
- 34 while_statement: WHILE . @2 LPAR exp RPAR @3 code_block
- $default reduce using rule 32 (@2)
- @2 go to state 29
- state 10
- 39 if_stmt: IF . @5 LPAR exp RPAR @6 code_block
- $default reduce using rule 37 (@5)
- @5 go to state 30
- state 11
- 4 var_declaration: TYPE . declaration_list SEMI
- IDENTIFIER shift, and go to state 31
- declaration_list go to state 32
- declaration go to state 33
- state 12
- 24 assign_statement: IDENTIFIER . LSQUARE exp RSQUARE ASSIGN exp
- 25 | IDENTIFIER . ASSIGN exp
- LSQUARE shift, and go to state 34
- ASSIGN shift, and go to state 35
- state 13
- 2 var_declarations: var_declarations var_declaration .
- $default reduce using rule 2 (var_declarations)
- state 14
- 1 program: var_declarations statements .
- 12 statements: statements . statement
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- IDENTIFIER shift, and go to state 12
- $default reduce using rule 1 (program)
- statement go to state 36
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 15
- 13 statements: statement .
- $default reduce using rule 13 (statements)
- state 16
- 15 statement: control_statement .
- $default reduce using rule 15 (statement)
- state 17
- 16 statement: read_write_statement . SEMI
- SEMI shift, and go to state 37
- state 18
- 14 statement: assign_statement . SEMI
- SEMI shift, and go to state 38
- state 19
- 18 control_statement: if_statement .
- $default reduce using rule 18 (control_statement)
- state 20
- 21 control_statement: return_statement . SEMI
- SEMI shift, and go to state 39
- state 21
- 22 read_write_statement: read_statement .
- $default reduce using rule 22 (read_write_statement)
- state 22
- 23 read_write_statement: write_statement .
- $default reduce using rule 23 (read_write_statement)
- state 23
- 20 control_statement: while_statement .
- $default reduce using rule 20 (control_statement)
- state 24
- 19 control_statement: do_while_statement . SEMI
- SEMI shift, and go to state 40
- state 25
- 26 if_statement: if_stmt .
- 28 | if_stmt . ELSE @1 code_block
- ELSE shift, and go to state 41
- ELSE [reduce using rule 26 (if_statement)]
- $default reduce using rule 26 (if_statement)
- state 26
- 30 read_statement: READ LPAR . IDENTIFIER RPAR
- IDENTIFIER shift, and go to state 42
- state 27
- 31 write_statement: WRITE LPAR . exp RPAR
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 48
- state 28
- 36 do_while_statement: DO @4 . code_block WHILE LPAR exp RPAR
- LBRACE shift, and go to state 49
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- IDENTIFIER shift, and go to state 12
- code_block go to state 50
- statement go to state 51
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 29
- 34 while_statement: WHILE @2 . LPAR exp RPAR @3 code_block
- LPAR shift, and go to state 52
- state 30
- 39 if_stmt: IF @5 . LPAR exp RPAR @6 code_block
- LPAR shift, and go to state 53
- state 31
- 7 declaration: IDENTIFIER . ASSIGN NUMBER
- 8 | IDENTIFIER . LSQUARE NUMBER RSQUARE
- 9 | IDENTIFIER .
- LSQUARE shift, and go to state 54
- ASSIGN shift, and go to state 55
- $default reduce using rule 9 (declaration)
- state 32
- 4 var_declaration: TYPE declaration_list . SEMI
- 5 declaration_list: declaration_list . COMMA declaration
- SEMI shift, and go to state 56
- COMMA shift, and go to state 57
- state 33
- 6 declaration_list: declaration .
- $default reduce using rule 6 (declaration_list)
- state 34
- 24 assign_statement: IDENTIFIER LSQUARE . exp RSQUARE ASSIGN exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 58
- state 35
- 25 assign_statement: IDENTIFIER ASSIGN . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 59
- state 36
- 12 statements: statements statement .
- $default reduce using rule 12 (statements)
- state 37
- 16 statement: read_write_statement SEMI .
- $default reduce using rule 16 (statement)
- state 38
- 14 statement: assign_statement SEMI .
- $default reduce using rule 14 (statement)
- state 39
- 21 control_statement: return_statement SEMI .
- $default reduce using rule 21 (control_statement)
- state 40
- 19 control_statement: do_while_statement SEMI .
- $default reduce using rule 19 (control_statement)
- state 41
- 28 if_statement: if_stmt ELSE . @1 code_block
- $default reduce using rule 27 (@1)
- @1 go to state 60
- state 42
- 30 read_statement: READ LPAR IDENTIFIER . RPAR
- RPAR shift, and go to state 61
- state 43
- 61 exp: LPAR . exp RPAR
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 62
- state 44
- 62 exp: MINUS . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 63
- state 45
- 43 exp: NOT_OP . NUMBER
- 44 | NOT_OP . IDENTIFIER
- IDENTIFIER shift, and go to state 64
- NUMBER shift, and go to state 65
- state 46
- 41 exp: IDENTIFIER .
- 42 | IDENTIFIER . LSQUARE exp RSQUARE
- LSQUARE shift, and go to state 66
- $default reduce using rule 41 (exp)
- state 47
- 40 exp: NUMBER .
- $default reduce using rule 40 (exp)
- state 48
- 31 write_statement: WRITE LPAR exp . RPAR
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- RPAR shift, and go to state 67
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- state 49
- 11 code_block: LBRACE . statements RBRACE
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- IDENTIFIER shift, and go to state 12
- statements go to state 84
- statement go to state 15
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 50
- 36 do_while_statement: DO @4 code_block . WHILE LPAR exp RPAR
- WHILE shift, and go to state 85
- state 51
- 10 code_block: statement .
- $default reduce using rule 10 (code_block)
- state 52
- 34 while_statement: WHILE @2 LPAR . exp RPAR @3 code_block
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 86
- state 53
- 39 if_stmt: IF @5 LPAR . exp RPAR @6 code_block
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 87
- state 54
- 8 declaration: IDENTIFIER LSQUARE . NUMBER RSQUARE
- NUMBER shift, and go to state 88
- state 55
- 7 declaration: IDENTIFIER ASSIGN . NUMBER
- NUMBER shift, and go to state 89
- state 56
- 4 var_declaration: TYPE declaration_list SEMI .
- $default reduce using rule 4 (var_declaration)
- state 57
- 5 declaration_list: declaration_list COMMA . declaration
- IDENTIFIER shift, and go to state 31
- declaration go to state 90
- state 58
- 24 assign_statement: IDENTIFIER LSQUARE exp . RSQUARE ASSIGN exp
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- RSQUARE shift, and go to state 91
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- state 59
- 25 assign_statement: IDENTIFIER ASSIGN exp .
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- $default reduce using rule 25 (assign_statement)
- state 60
- 28 if_statement: if_stmt ELSE @1 . code_block
- LBRACE shift, and go to state 49
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- IDENTIFIER shift, and go to state 12
- code_block go to state 92
- statement go to state 51
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 61
- 30 read_statement: READ LPAR IDENTIFIER RPAR .
- $default reduce using rule 30 (read_statement)
- state 62
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- 61 | LPAR exp . RPAR
- RPAR shift, and go to state 93
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- state 63
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- 62 | MINUS exp .
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- $default reduce using rule 62 (exp)
- state 64
- 44 exp: NOT_OP IDENTIFIER .
- $default reduce using rule 44 (exp)
- state 65
- 43 exp: NOT_OP NUMBER .
- $default reduce using rule 43 (exp)
- state 66
- 42 exp: IDENTIFIER LSQUARE . exp RSQUARE
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 94
- state 67
- 31 write_statement: WRITE LPAR exp RPAR .
- $default reduce using rule 31 (write_statement)
- state 68
- 47 exp: exp PLUS . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 95
- state 69
- 48 exp: exp MINUS . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 96
- state 70
- 49 exp: exp MUL_OP . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 97
- state 71
- 50 exp: exp DIV_OP . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 98
- state 72
- 45 exp: exp AND_OP . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 99
- state 73
- 46 exp: exp OR_OP . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 100
- state 74
- 51 exp: exp LT . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 101
- state 75
- 52 exp: exp GT . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 102
- state 76
- 57 exp: exp SHL_OP . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 103
- state 77
- 58 exp: exp SHR_OP . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 104
- state 78
- 53 exp: exp EQ . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 105
- state 79
- 54 exp: exp NOTEQ . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 106
- state 80
- 55 exp: exp LTEQ . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 107
- state 81
- 56 exp: exp GTEQ . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 108
- state 82
- 59 exp: exp ANDAND . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 109
- state 83
- 60 exp: exp OROR . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 110
- state 84
- 11 code_block: LBRACE statements . RBRACE
- 12 statements: statements . statement
- RBRACE shift, and go to state 111
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- IDENTIFIER shift, and go to state 12
- statement go to state 36
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 85
- 36 do_while_statement: DO @4 code_block WHILE . LPAR exp RPAR
- LPAR shift, and go to state 112
- state 86
- 34 while_statement: WHILE @2 LPAR exp . RPAR @3 code_block
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- RPAR shift, and go to state 113
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- state 87
- 39 if_stmt: IF @5 LPAR exp . RPAR @6 code_block
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- RPAR shift, and go to state 114
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- state 88
- 8 declaration: IDENTIFIER LSQUARE NUMBER . RSQUARE
- RSQUARE shift, and go to state 115
- state 89
- 7 declaration: IDENTIFIER ASSIGN NUMBER .
- $default reduce using rule 7 (declaration)
- state 90
- 5 declaration_list: declaration_list COMMA declaration .
- $default reduce using rule 5 (declaration_list)
- state 91
- 24 assign_statement: IDENTIFIER LSQUARE exp RSQUARE . ASSIGN exp
- ASSIGN shift, and go to state 116
- state 92
- 28 if_statement: if_stmt ELSE @1 code_block .
- $default reduce using rule 28 (if_statement)
- state 93
- 61 exp: LPAR exp RPAR .
- $default reduce using rule 61 (exp)
- state 94
- 42 exp: IDENTIFIER LSQUARE exp . RSQUARE
- 45 | exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- RSQUARE shift, and go to state 117
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- state 95
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 47 | exp PLUS exp .
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- $default reduce using rule 47 (exp)
- state 96
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 48 | exp MINUS exp .
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- $default reduce using rule 48 (exp)
- state 97
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 49 | exp MUL_OP exp .
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- $default reduce using rule 49 (exp)
- state 98
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 50 | exp DIV_OP exp .
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- $default reduce using rule 50 (exp)
- state 99
- 45 exp: exp . AND_OP exp
- 45 | exp AND_OP exp .
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- $default reduce using rule 45 (exp)
- state 100
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 46 | exp OR_OP exp .
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- $default reduce using rule 46 (exp)
- state 101
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 51 | exp LT exp .
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- $default reduce using rule 51 (exp)
- state 102
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 52 | exp GT exp .
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- $default reduce using rule 52 (exp)
- state 103
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 57 | exp SHL_OP exp .
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- $default reduce using rule 57 (exp)
- state 104
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 58 | exp SHR_OP exp .
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- $default reduce using rule 58 (exp)
- state 105
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 53 | exp EQ exp .
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- $default reduce using rule 53 (exp)
- state 106
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 54 | exp NOTEQ exp .
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- $default reduce using rule 54 (exp)
- state 107
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 55 | exp LTEQ exp .
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- $default reduce using rule 55 (exp)
- state 108
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 56 | exp GTEQ exp .
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- $default reduce using rule 56 (exp)
- state 109
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 59 | exp ANDAND exp .
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- $default reduce using rule 59 (exp)
- state 110
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- 60 | exp OROR exp .
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- $default reduce using rule 60 (exp)
- state 111
- 11 code_block: LBRACE statements RBRACE .
- $default reduce using rule 11 (code_block)
- state 112
- 36 do_while_statement: DO @4 code_block WHILE LPAR . exp RPAR
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 118
- state 113
- 34 while_statement: WHILE @2 LPAR exp RPAR . @3 code_block
- $default reduce using rule 33 (@3)
- @3 go to state 119
- state 114
- 39 if_stmt: IF @5 LPAR exp RPAR . @6 code_block
- $default reduce using rule 38 (@6)
- @6 go to state 120
- state 115
- 8 declaration: IDENTIFIER LSQUARE NUMBER RSQUARE .
- $default reduce using rule 8 (declaration)
- state 116
- 24 assign_statement: IDENTIFIER LSQUARE exp RSQUARE ASSIGN . exp
- LPAR shift, and go to state 43
- MINUS shift, and go to state 44
- NOT_OP shift, and go to state 45
- IDENTIFIER shift, and go to state 46
- NUMBER shift, and go to state 47
- exp go to state 121
- state 117
- 42 exp: IDENTIFIER LSQUARE exp RSQUARE .
- $default reduce using rule 42 (exp)
- state 118
- 36 do_while_statement: DO @4 code_block WHILE LPAR exp . RPAR
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- RPAR shift, and go to state 122
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- state 119
- 34 while_statement: WHILE @2 LPAR exp RPAR @3 . code_block
- LBRACE shift, and go to state 49
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- IDENTIFIER shift, and go to state 12
- code_block go to state 123
- statement go to state 51
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 120
- 39 if_stmt: IF @5 LPAR exp RPAR @6 . code_block
- LBRACE shift, and go to state 49
- SEMI shift, and go to state 4
- RETURN shift, and go to state 5
- READ shift, and go to state 6
- WRITE shift, and go to state 7
- DO shift, and go to state 8
- WHILE shift, and go to state 9
- IF shift, and go to state 10
- IDENTIFIER shift, and go to state 12
- code_block go to state 124
- statement go to state 51
- control_statement go to state 16
- read_write_statement go to state 17
- assign_statement go to state 18
- if_statement go to state 19
- return_statement go to state 20
- read_statement go to state 21
- write_statement go to state 22
- while_statement go to state 23
- do_while_statement go to state 24
- if_stmt go to state 25
- state 121
- 24 assign_statement: IDENTIFIER LSQUARE exp RSQUARE ASSIGN exp .
- 45 exp: exp . AND_OP exp
- 46 | exp . OR_OP exp
- 47 | exp . PLUS exp
- 48 | exp . MINUS exp
- 49 | exp . MUL_OP exp
- 50 | exp . DIV_OP exp
- 51 | exp . LT exp
- 52 | exp . GT exp
- 53 | exp . EQ exp
- 54 | exp . NOTEQ exp
- 55 | exp . LTEQ exp
- 56 | exp . GTEQ exp
- 57 | exp . SHL_OP exp
- 58 | exp . SHR_OP exp
- 59 | exp . ANDAND exp
- 60 | exp . OROR exp
- PLUS shift, and go to state 68
- MINUS shift, and go to state 69
- MUL_OP shift, and go to state 70
- DIV_OP shift, and go to state 71
- AND_OP shift, and go to state 72
- OR_OP shift, and go to state 73
- LT shift, and go to state 74
- GT shift, and go to state 75
- SHL_OP shift, and go to state 76
- SHR_OP shift, and go to state 77
- EQ shift, and go to state 78
- NOTEQ shift, and go to state 79
- LTEQ shift, and go to state 80
- GTEQ shift, and go to state 81
- ANDAND shift, and go to state 82
- OROR shift, and go to state 83
- $default reduce using rule 24 (assign_statement)
- state 122
- 36 do_while_statement: DO @4 code_block WHILE LPAR exp RPAR .
- $default reduce using rule 36 (do_while_statement)
- state 123
- 34 while_statement: WHILE @2 LPAR exp RPAR @3 code_block .
- $default reduce using rule 34 (while_statement)
- state 124
- 39 if_stmt: IF @5 LPAR exp RPAR @6 code_block .
- $default reduce using rule 39 (if_stmt)
|