parser.output

来自「Shorthand是一个强大的脚本语言」· OUTPUT 代码 · 共 2,223 行 · 第 1/5 页

OUTPUT
2,223
字号
Terminals which are not used:   LEX_ERROR   FOO   BARE_HTML_EOF   ALL   MIN   MAX   LOWER_THAN_ELSE   EQ   UNOT   COMPARE   HIGHER_THAN_EXPRESSION   '!'Conflict in state 57 between rule 63 and token '&' resolved as reduce.Conflict in state 57 between rule 63 and token '+' resolved as reduce.Conflict in state 57 between rule 63 and token '-' resolved as reduce.Conflict in state 57 between rule 63 and token '%' resolved as reduce.Conflict in state 57 between rule 63 and token '*' resolved as reduce.Conflict in state 57 between rule 63 and token '/' resolved as reduce.Conflict in state 57 between rule 63 and token '.' resolved as shift.Conflict in state 57 between rule 63 and token '[' resolved as shift.Conflict in state 57 between rule 63 and token '{' resolved as shift.Conflict in state 79 between rule 78 and token OR resolved as reduce.Conflict in state 79 between rule 78 and token AND resolved as reduce.Conflict in state 100 between rule 16 and token '-' resolved as shift.Conflict in state 101 between rule 64 and token '&' resolved as reduce.Conflict in state 101 between rule 64 and token '+' resolved as shift.Conflict in state 101 between rule 64 and token '-' resolved as shift.Conflict in state 101 between rule 64 and token '%' resolved as shift.Conflict in state 101 between rule 64 and token '*' resolved as shift.Conflict in state 101 between rule 64 and token '/' resolved as shift.Conflict in state 101 between rule 64 and token '.' resolved as shift.Conflict in state 101 between rule 64 and token '[' resolved as shift.Conflict in state 101 between rule 64 and token '{' resolved as shift.Conflict in state 102 between rule 58 and token '&' resolved as reduce.Conflict in state 102 between rule 58 and token '+' resolved as reduce.Conflict in state 102 between rule 58 and token '-' resolved as reduce.Conflict in state 102 between rule 58 and token '%' resolved as shift.Conflict in state 102 between rule 58 and token '*' resolved as shift.Conflict in state 102 between rule 58 and token '/' resolved as shift.Conflict in state 102 between rule 58 and token '.' resolved as shift.Conflict in state 102 between rule 58 and token '[' resolved as shift.Conflict in state 102 between rule 58 and token '{' resolved as shift.Conflict in state 103 between rule 59 and token '&' resolved as reduce.Conflict in state 103 between rule 59 and token '+' resolved as reduce.Conflict in state 103 between rule 59 and token '-' resolved as reduce.Conflict in state 103 between rule 59 and token '%' resolved as shift.Conflict in state 103 between rule 59 and token '*' resolved as shift.Conflict in state 103 between rule 59 and token '/' resolved as shift.Conflict in state 103 between rule 59 and token '.' resolved as shift.Conflict in state 103 between rule 59 and token '[' resolved as shift.Conflict in state 103 between rule 59 and token '{' resolved as shift.Conflict in state 104 between rule 62 and token '&' resolved as reduce.Conflict in state 104 between rule 62 and token '+' resolved as reduce.Conflict in state 104 between rule 62 and token '-' resolved as reduce.Conflict in state 104 between rule 62 and token '%' resolved as an error.Conflict in state 104 between rule 62 and token '*' resolved as shift.Conflict in state 104 between rule 62 and token '/' resolved as shift.Conflict in state 104 between rule 62 and token '.' resolved as shift.Conflict in state 104 between rule 62 and token '[' resolved as shift.Conflict in state 104 between rule 62 and token '{' resolved as shift.Conflict in state 105 between rule 60 and token '&' resolved as reduce.Conflict in state 105 between rule 60 and token '+' resolved as reduce.Conflict in state 105 between rule 60 and token '-' resolved as reduce.Conflict in state 105 between rule 60 and token '%' resolved as reduce.Conflict in state 105 between rule 60 and token '*' resolved as reduce.Conflict in state 105 between rule 60 and token '/' resolved as reduce.Conflict in state 105 between rule 60 and token '.' resolved as shift.Conflict in state 105 between rule 60 and token '[' resolved as shift.Conflict in state 105 between rule 60 and token '{' resolved as shift.Conflict in state 106 between rule 61 and token '&' resolved as reduce.Conflict in state 106 between rule 61 and token '+' resolved as reduce.Conflict in state 106 between rule 61 and token '-' resolved as reduce.Conflict in state 106 between rule 61 and token '%' resolved as reduce.Conflict in state 106 between rule 61 and token '*' resolved as reduce.Conflict in state 106 between rule 61 and token '/' resolved as reduce.Conflict in state 106 between rule 61 and token '.' resolved as shift.Conflict in state 106 between rule 61 and token '[' resolved as shift.Conflict in state 106 between rule 61 and token '{' resolved as shift.Conflict in state 115 between rule 74 and token '-' resolved as shift.Conflict in state 116 between rule 72 and token '-' resolved as shift.Conflict in state 117 between rule 73 and token '-' resolved as shift.Conflict in state 118 between rule 69 and token '-' resolved as shift.Conflict in state 119 between rule 70 and token '-' resolved as shift.Conflict in state 120 between rule 71 and token '-' resolved as shift.Conflict in state 126 between rule 77 and token OR resolved as reduce.Conflict in state 126 between rule 77 and token AND resolved as shift.Conflict in state 127 between rule 76 and token OR resolved as reduce.Conflict in state 127 between rule 76 and token AND resolved as reduce.Conflict in state 135 between rule 30 and token '-' resolved as shift.Conflict in state 170 between rule 59 and token '&' resolved as reduce.Conflict in state 170 between rule 59 and token '+' resolved as reduce.Conflict in state 170 between rule 59 and token '-' resolved as reduce.Conflict in state 170 between rule 59 and token '%' resolved as shift.Conflict in state 170 between rule 59 and token '*' resolved as shift.Conflict in state 170 between rule 59 and token '/' resolved as shift.Conflict in state 170 between rule 59 and token '.' resolved as shift.Conflict in state 170 between rule 59 and token '[' resolved as shift.Conflict in state 170 between rule 59 and token '{' resolved as shift.Conflict in state 170 between rule 63 and token '%' resolved as reduce.Conflict in state 170 between rule 63 and token '*' resolved as reduce.Conflict in state 170 between rule 63 and token '/' resolved as reduce.Conflict in state 170 between rule 63 and token '.' resolved as shift.Conflict in state 170 between rule 63 and token '[' resolved as shift.Conflict in state 170 between rule 63 and token '{' resolved as shift.State 15 contains 8 shift/reduce conflicts.State 32 contains 1 shift/reduce conflict.State 37 contains 1 shift/reduce conflict.State 38 contains 1 shift/reduce conflict.State 42 contains 1 shift/reduce conflict.State 44 contains 1 shift/reduce conflict.State 45 contains 1 shift/reduce conflict.State 49 contains 1 shift/reduce conflict.State 51 contains 1 shift/reduce conflict.State 52 contains 1 shift/reduce conflict.State 80 contains 1 shift/reduce conflict.State 111 contains 1 shift/reduce conflict.State 112 contains 1 reduce/reduce conflict.State 170 contains 3 reduce/reduce conflicts.State 172 contains 1 reduce/reduce conflict.Grammarrule 1    input -> contentrule 2    content ->		/* empty */rule 3    content -> statementsrule 4    subst -> newlinesrule 5    subst -> statementrule 6    subst -> super_statementrule 7    subst -> ';'rule 8    statements -> substrule 9    statements -> statements substrule 10   super_statement -> BARE_HTMLrule 11   super_statement -> HTML_AND_PRINT expressionrule 12   statement -> if_blockrule 13   statement -> looprule 14   statement -> BREAKrule 15   statement -> CONTINUErule 16   statement -> expression '=' expressionrule 17   statement -> expression '.' IDENT '(' arguments ')'rule 18   statement -> PRINT expressionrule 19   statement -> PRINTLN expressionrule 20   statement -> INCLUDE expressionrule 21   statement -> JUMP expressionrule 22   statement -> callrule 23   statement -> FUNCTION IDENT '(' params ')' statements END FUNCTIONrule 24   statement -> K_RETURN expressionrule 25   statement -> K_RETURNrule 26   statement -> LOCAL localsrule 27   newlines -> '\n'rule 28   newlines -> newlines '\n'rule 29   local -> IDENTrule 30   local -> IDENT '=' expressionrule 31   locals -> localrule 32   locals -> locals ',' localrule 33   call -> IDENT '(' arguments ')'rule 34   loop -> GRID '(' IDENT ')' statements END GRIDrule 35   loop -> GRID '(' IDENT ',' expression ')' statements END GRIDrule 36   loop -> GRID '(' IDENT ',' expression ',' expression ')' statements END GRIDrule 37   loop -> WHILE condition statements END WHILErule 38   loop -> FOR IDENT '=' expression TO expression statements END FORrule 39   loop -> FOREACH expression AS expression statements END FORrule 40   loop -> FOREACH expression AS expression EQL expression statements END FORrule 41   arguments ->		/* empty */rule 42   arguments -> arglistrule 43   paramlist -> IDENTrule 44   paramlist -> paramlist ',' IDENTrule 45   params ->		/* empty */rule 46   params -> paramlistrule 47   arglist -> expressionrule 48   arglist -> arglist ',' expressionrule 49   expression -> NUMBERrule 50   expression -> _FLOATrule 51   expression -> K_NULLrule 52   expression -> STRINGrule 53   expression -> IDENT '(' arguments ')'rule 54   expression -> IDENTrule 55   expression -> expression '.' IDENTrule 56   expression -> expression '.' IDENT '(' arguments ')'rule 57   expression -> '(' expression ')'rule 58   expression -> expression '+' expressionrule 59   expression -> expression '-' expressionrule 60   expression -> expression '*' expressionrule 61   expression -> expression '/' expressionrule 62   expression -> expression '%' expressionrule 63   expression -> '-' expressionrule 64   expression -> expression '&' expressionrule 65   expression -> K_NEW OBJECT_IDENTrule 66   expression -> K_NEW callrule 67   expression -> expression '[' expression ']'rule 68   expression -> expression '{' expression '}'rule 69   condition -> expression '<' expressionrule 70   condition -> expression '>' expressionrule 71   condition -> expression '=' expressionrule 72   condition -> expression LE expressionrule 73   condition -> expression GE expressionrule 74   condition -> expression NE expressionrule 75   condition -> '(' condition ')'rule 76   condition -> condition AND conditionrule 77   condition -> condition OR conditionrule 78   condition -> NOT conditionrule 79   condition -> expressionrule 80   if_block -> IF condition THEN statements else_blockrule 81   if_block -> IF condition THEN else_blockrule 82   else_block -> END IFrule 83   else_block -> ELSE statements END IFrule 84   else_block -> ELSEIF condition THEN statements else_blockTerminals, with rules where they appear$ (-1)'\n' (10) 27 28'!' (33)'%' (37) 62'&' (38) 64'(' (40) 17 23 33 34 35 36 53 56 57 75')' (41) 17 23 33 34 35 36 53 56 57 75'*' (42) 60'+' (43) 58',' (44) 32 35 36 44 48'-' (45) 59 63'.' (46) 17 55 56'/' (47) 61';' (59) 7'<' (60) 69'=' (61) 16 30 38 71'>' (62) 70'[' (91) 67']' (93) 67'{' (123) 68'}' (125) 68error (256)LEX_ERROR (257)FOO (258)BARE_HTML (259) 10BARE_HTML_EOF (260)HTML_AND_PRINT (261) 11IDENT (262) 17 23 29 30 33 34 35 36 38 43 44 53 54 55 56OBJECT_IDENT (263) 65NUMBER (264) 49_FLOAT (265) 50STRING (266) 52IF (267) 80 81 82 83THEN (268) 80 81 84ELSE (269) 83ALL (270)END (271) 23 34 35 36 37 38 39 40 82 83PRINT (272) 18PRINTLN (273) 19GRID (274) 34 35 36WHILE (275) 37BREAK (276) 14CONTINUE (277) 15FOR (278) 38 39 40TO (279) 38K_RETURN (280) 24 25FUNCTION (281) 23K_NULL (282) 51INCLUDE (283) 20JUMP (284) 21LOCAL (285) 26AS (286) 39 40FOREACH (287) 39 40MIN (288)MAX (289)LOWER_THAN_ELSE (290)ELSEIF (291) 84EQL (292) 40OR (293) 77AND (294) 76EQ (295)NE (296) 74LE (297) 72GE (298) 73NOT (299) 78UNOT (300)COMPARE (301)HIGHER_THAN_EXPRESSION (302)UMINUS (303)K_NEW (304) 65 66Nonterminals, with rules where they appearinput (71)    on left: 1content (72)    on left: 2 3, on right: 1subst (73)    on left: 4 5 6 7, on right: 8 9statements (74)    on left: 8 9, on right: 3 9 23 34 35 36 37 38 39 40 80 83 84super_statement (75)    on left: 10 11, on right: 6statement (76)    on left: 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,    on right: 5newlines (77)    on left: 27 28, on right: 4 28local (78)    on left: 29 30, on right: 31 32locals (79)    on left: 31 32, on right: 26 32call (80)    on left: 33, on right: 22 66loop (81)    on left: 34 35 36 37 38 39 40, on right: 13arguments (82)    on left: 41 42, on right: 17 33 53 56paramlist (83)    on left: 43 44, on right: 44 46params (84)    on left: 45 46, on right: 23arglist (85)    on left: 47 48, on right: 42 48expression (86)    on left: 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66    67 68, on right: 11 16 17 18 19 20 21 24 30 35 36 38 39 40 47 48    55 56 57 58 59 60 61 62 63 64 67 68 69 70 71 72 73 74 79condition (87)    on left: 69 70 71 72 73 74 75 76 77 78 79, on right: 37 75 76 77    78 80 81 84if_block (88)    on left: 80 81, on right: 12else_block (89)    on left: 82 83 84, on right: 80 81 84state 0    BARE_HTML	shift, and go to state 1    HTML_AND_PRINT	shift, and go to state 2    IDENT	shift, and go to state 3    NUMBER	shift, and go to state 4    _FLOAT	shift, and go to state 5    STRING	shift, and go to state 6    IF  	shift, and go to state 7    PRINT	shift, and go to state 8    PRINTLN	shift, and go to state 9    GRID	shift, and go to state 10    WHILE	shift, and go to state 11    BREAK	shift, and go to state 12    CONTINUE	shift, and go to state 13    FOR 	shift, and go to state 14    K_RETURN	shift, and go to state 15    FUNCTION	shift, and go to state 16    K_NULL	shift, and go to state 17    INCLUDE	shift, and go to state 18    JUMP	shift, and go to state 19    LOCAL	shift, and go to state 20    FOREACH	shift, and go to state 21    '-' 	shift, and go to state 22    K_NEW	shift, and go to state 23    '(' 	shift, and go to state 24    ';' 	shift, and go to state 25    '\n'	shift, and go to state 26    $default	reduce using rule 2 (content)    input	go to state 195    content	go to state 27    subst	go to state 28    statements	go to state 29    super_statement	go to state 30    statement	go to state 31    newlines	go to state 32    call	go to state 33    loop	go to state 34    expression	go to state 35    if_block	go to state 36state 1    super_statement  ->  BARE_HTML .   (rule 10)    $default	reduce using rule 10 (super_statement)state 2    super_statement  ->  HTML_AND_PRINT . expression   (rule 11)    IDENT	shift, and go to state 37    NUMBER	shift, and go to state 4    _FLOAT	shift, and go to state 5    STRING	shift, and go to state 6    K_NULL	shift, and go to state 17    '-' 	shift, and go to state 22    K_NEW	shift, and go to state 23    '(' 	shift, and go to state 24    expression	go to state 38state 3    call  ->  IDENT . '(' arguments ')'   (rule 33)    expression  ->  IDENT . '(' arguments ')'   (rule 53)    expression  ->  IDENT .   (rule 54)    '(' 	shift, and go to state 39    $default	reduce using rule 54 (expression)state 4    expression  ->  NUMBER .   (rule 49)    $default	reduce using rule 49 (expression)state 5    expression  ->  _FLOAT .   (rule 50)    $default	reduce using rule 50 (expression)state 6    expression  ->  STRING .   (rule 52)    $default	reduce using rule 52 (expression)state 7    if_block  ->  IF . condition THEN statements else_block   (rule 80)    if_block  ->  IF . condition THEN else_block   (rule 81)    IDENT	shift, and go to state 37    NUMBER	shift, and go to state 4    _FLOAT	shift, and go to state 5

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?