-
-
04 Aug 2017 08:05:34 UTC
- Distribution: Parse-Yapp
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (5968 / 0 / 0)
- Kwalitee
Bus factor: 1- 73.42% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (106.11KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
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)
Module Install Instructions
To install Parse::Yapp, copy and paste the appropriate command in to your terminal.
cpanm Parse::Yapp
perl -MCPAN -e shell install Parse::Yapp
For more information on module installation, please visit the detailed CPAN module installation guide.