Parse::Yapp::Compile Object Structure: -------------------------------------- { GRAMMAR => Parse::Yapp::Grammar, STATES => [ { CORE => [ items... ], ACTIONS => { term => action } GOTOS => { nterm => stateno } }... ] CONFLICTS=>{ SOLVED => { stateno => [ ruleno, token, solved ] }, FORCED => { TOTAL => [ nbsr, nbrr ], DETAIL => { stateno => { TOTAL => [ nbsr, nbrr ] } LIST => [ ruleno, token ] } } } }
'items' are of form: [ ruleno, dotpos ] 'term' in ACTIONS is '' means default action 'action' may be: undef: explicit error (nonassociativity) 0 : accept >0 : shift and go to state 'action' <0 : reduce using rule -'action' 'solved' may have values of: 'shift' if solved as Shift 'reduce' if solved as Reduce 'error' if solved by discarding both Shift and Reduce (nonassoc)
SOLVED is a set of states containing Solved conflicts FORCED are forced conflict resolutions
nbsr and nbrr are number of shift/reduce and reduce/reduce conflicts
TOTAL is the total number of SR/RR conflicts for the parser
DETAIL is the detail of conflicts for each state TOTAL is the total number of SR/RR conflicts for a state LIST is the list of discarded reductions (for display purpose only)
CLOSE(A) = DCLOSE(A) u U (CLOSE(B) | A close B)
where:
DCLOSE(A) = { [ A -> alpha ] in P } A close B iff [ A -> B gamma ] in P
FIRST(A) = { a in T u { epsilon } | A l a } u U { FIRST(B) | B in V and A l B } where: A l x iff [ A -> X1 X2 .. Xn x alpha ] in P and Xi =>* epsilon, 1 <= i <= n
FOLLOW(p,A) = READ(p,A) u U { FOLLOW(q,B) | (p,A) include (q,B) where: READ(p,A) = U { FIRST(beta) | [ A -> alpha A . beta ] in KERNEL(GOTO(p,A)) } - { epsilon } (p,a) include (q,B) iff [ B -> alpha A . beta ] in KERNEL(GOTO(p,A), epsilon in FIRST(beta) and q in PRED(p,alpha)
To install Parse::Yapp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::Yapp
CPAN shell
perl -MCPAN -e shell install Parse::Yapp
For more information on module installation, please visit the detailed CPAN module installation guide.