Terminals which are not used:

   T_GARBAGE
   T_ERR


Grammar

  Number, Line, Rule
    1  31 program -> assignment T_SEMIC
    2  33 program -> expression T_SEMIC
    3  36 assignment -> T_IDENT T_ASSIGN expression
    4  39 expression -> term
    5  41 expression -> expression weak_operator term
    6  44 term -> u_element
    7  46 term -> term strong_operator u_element
    8  49 u_element -> element
    9  51 u_element -> unary_operator element
   10  54 element -> T_INTCONST
   11  56 element -> T_REALCONST
   12  58 element -> T_IDENT
   13  60 element -> T_LPAREN expression T_RPAREN
   14  62 element -> T_LPAREN assignment T_RPAREN
   15  65 weak_operator -> T_ADD
   16  67 weak_operator -> T_SUB
   17  70 strong_operator -> T_MUL
   18  72 strong_operator -> T_DIV
   19  75 unary_operator -> T_SUB


Terminals, with rules where they appear

$ (-1)
error (256)
T_SEMIC (257) 1 2
T_ASSIGN (258) 3
T_IDENT (259) 3 12
T_INTCONST (260) 10
T_REALCONST (261) 11
T_LPAREN (262) 13 14
T_RPAREN (263) 13 14
T_ADD (264) 15
T_SUB (265) 16 19
T_MUL (266) 17
T_DIV (267) 18
T_GARBAGE (268)
T_ERR (269)


Nonterminals, with rules where they appear

program (16)
    on left: 1 2
assignment (17)
    on left: 3, on right: 1 14
expression (18)
    on left: 4 5, on right: 2 3 5 13
term (19)
    on left: 6 7, on right: 4 5 7
u_element (20)
    on left: 8 9, on right: 6 7
element (21)
    on left: 10 11 12 13 14, on right: 8 9
weak_operator (22)
    on left: 15 16, on right: 5
strong_operator (23)
    on left: 17 18, on right: 7
unary_operator (24)
    on left: 19, on right: 9


state 0

    T_IDENT	shift, and go to state 1
    T_INTCONST	shift, and go to state 2
    T_REALCONST	shift, and go to state 3
    T_LPAREN	shift, and go to state 4
    T_SUB	shift, and go to state 5

    program	go to state 30
    assignment	go to state 6
    expression	go to state 7
    term	go to state 8
    u_element	go to state 9
    element	go to state 10
    unary_operator	go to state 11



state 1

    assignment  ->  T_IDENT . T_ASSIGN expression   (rule 3)
    element  ->  T_IDENT .   (rule 12)

    T_ASSIGN	shift, and go to state 12

    $default	reduce using rule 12 (element)



state 2

    element  ->  T_INTCONST .   (rule 10)

    $default	reduce using rule 10 (element)



state 3

    element  ->  T_REALCONST .   (rule 11)

    $default	reduce using rule 11 (element)



state 4

    element  ->  T_LPAREN . expression T_RPAREN   (rule 13)
    element  ->  T_LPAREN . assignment T_RPAREN   (rule 14)

    T_IDENT	shift, and go to state 1
    T_INTCONST	shift, and go to state 2
    T_REALCONST	shift, and go to state 3
    T_LPAREN	shift, and go to state 4
    T_SUB	shift, and go to state 5

    assignment	go to state 13
    expression	go to state 14
    term	go to state 8
    u_element	go to state 9
    element	go to state 10
    unary_operator	go to state 11



state 5

    unary_operator  ->  T_SUB .   (rule 19)

    $default	reduce using rule 19 (unary_operator)



state 6

    program  ->  assignment . T_SEMIC   (rule 1)

    T_SEMIC	shift, and go to state 15



state 7

    program  ->  expression . T_SEMIC   (rule 2)
    expression  ->  expression . weak_operator term   (rule 5)

    T_SEMIC	shift, and go to state 16
    T_ADD	shift, and go to state 17
    T_SUB	shift, and go to state 18

    weak_operator	go to state 19



state 8

    expression  ->  term .   (rule 4)
    term  ->  term . strong_operator u_element   (rule 7)

    T_MUL	shift, and go to state 20
    T_DIV	shift, and go to state 21

    $default	reduce using rule 4 (expression)

    strong_operator	go to state 22



state 9

    term  ->  u_element .   (rule 6)

    $default	reduce using rule 6 (term)



state 10

    u_element  ->  element .   (rule 8)

    $default	reduce using rule 8 (u_element)



state 11

    u_element  ->  unary_operator . element   (rule 9)

    T_IDENT	shift, and go to state 23
    T_INTCONST	shift, and go to state 2
    T_REALCONST	shift, and go to state 3
    T_LPAREN	shift, and go to state 4

    element	go to state 24



state 12

    assignment  ->  T_IDENT T_ASSIGN . expression   (rule 3)

    T_IDENT	shift, and go to state 23
    T_INTCONST	shift, and go to state 2
    T_REALCONST	shift, and go to state 3
    T_LPAREN	shift, and go to state 4
    T_SUB	shift, and go to state 5

    expression	go to state 25
    term	go to state 8
    u_element	go to state 9
    element	go to state 10
    unary_operator	go to state 11



state 13

    element  ->  T_LPAREN assignment . T_RPAREN   (rule 14)

    T_RPAREN	shift, and go to state 26



state 14

    expression  ->  expression . weak_operator term   (rule 5)
    element  ->  T_LPAREN expression . T_RPAREN   (rule 13)

    T_RPAREN	shift, and go to state 27
    T_ADD	shift, and go to state 17
    T_SUB	shift, and go to state 18

    weak_operator	go to state 19



state 15

    program  ->  assignment T_SEMIC .   (rule 1)

    $default	reduce using rule 1 (program)



state 16

    program  ->  expression T_SEMIC .   (rule 2)

    $default	reduce using rule 2 (program)



state 17

    weak_operator  ->  T_ADD .   (rule 15)

    $default	reduce using rule 15 (weak_operator)



state 18

    weak_operator  ->  T_SUB .   (rule 16)

    $default	reduce using rule 16 (weak_operator)



state 19

    expression  ->  expression weak_operator . term   (rule 5)

    T_IDENT	shift, and go to state 23
    T_INTCONST	shift, and go to state 2
    T_REALCONST	shift, and go to state 3
    T_LPAREN	shift, and go to state 4
    T_SUB	shift, and go to state 5

    term	go to state 28
    u_element	go to state 9
    element	go to state 10
    unary_operator	go to state 11



state 20

    strong_operator  ->  T_MUL .   (rule 17)

    $default	reduce using rule 17 (strong_operator)



state 21

    strong_operator  ->  T_DIV .   (rule 18)

    $default	reduce using rule 18 (strong_operator)



state 22

    term  ->  term strong_operator . u_element   (rule 7)

    T_IDENT	shift, and go to state 23
    T_INTCONST	shift, and go to state 2
    T_REALCONST	shift, and go to state 3
    T_LPAREN	shift, and go to state 4
    T_SUB	shift, and go to state 5

    u_element	go to state 29
    element	go to state 10
    unary_operator	go to state 11



state 23

    element  ->  T_IDENT .   (rule 12)

    $default	reduce using rule 12 (element)



state 24

    u_element  ->  unary_operator element .   (rule 9)

    $default	reduce using rule 9 (u_element)



state 25

    assignment  ->  T_IDENT T_ASSIGN expression .   (rule 3)
    expression  ->  expression . weak_operator term   (rule 5)

    T_ADD	shift, and go to state 17
    T_SUB	shift, and go to state 18

    $default	reduce using rule 3 (assignment)

    weak_operator	go to state 19



state 26

    element  ->  T_LPAREN assignment T_RPAREN .   (rule 14)

    $default	reduce using rule 14 (element)



state 27

    element  ->  T_LPAREN expression T_RPAREN .   (rule 13)

    $default	reduce using rule 13 (element)



state 28

    expression  ->  expression weak_operator term .   (rule 5)
    term  ->  term . strong_operator u_element   (rule 7)

    T_MUL	shift, and go to state 20
    T_DIV	shift, and go to state 21

    $default	reduce using rule 5 (expression)

    strong_operator	go to state 22



state 29

    term  ->  term strong_operator u_element .   (rule 7)

    $default	reduce using rule 7 (term)



state 30

    $   	go to state 31



state 31

    $   	go to state 32



state 32

    $default	accept


