Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | The drop operation should only be permissive on choices (reflecting the realizability condition on choice). New expressions should not be constructed for expressions other than choice. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | pt-container-ssoberni |
Files: | files | file ages | folders |
SHA3-256: |
f70ef61b952a738698e5c08e0016dbe4 |
User & Date: | ssoberni 2018-06-14 14:31:51.627 |
Context
2018-06-27
| ||
17:16 | Update peg container transform work to latest trunk, including peg ffp fixes. check-in: 63282d761b user: aku tags: pt-container-ssoberni | |
2018-06-14
| ||
14:31 | The drop operation should only be permissive on choices (reflecting the realizability condition on choice). New expressions should not be constructed for expressions other than choice. check-in: f70ef61b95 user: ssoberni tags: pt-container-ssoberni | |
14:02 | Kleene star and optionals are better deemed realizable by definition. check-in: 8cd8a7435f user: ssoberni tags: pt-container-ssoberni | |
Changes
Changes to modules/pt/pt_pexpr_op.tcl.
︙ | ︙ | |||
61 62 63 64 65 66 67 | # # ## ### ##### ######## ############# ## Internals proc ::pt::pe::op::Drop {dropset pe op arguments} { if {$op eq "n"} { lassign $arguments symbol if {[struct::set contains $dropset $symbol]} { | < | < < | < < | | | | | < | | | | | | | | | | | | < < | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | # # ## ### ##### ######## ############# ## Internals proc ::pt::pe::op::Drop {dropset pe op arguments} { if {$op eq "n"} { lassign $arguments symbol if {[struct::set contains $dropset $symbol]} { set pe @@ } } elseif {$op in {/ x * + ? & !}} { set newarg {} foreach a $arguments { if {$a eq "@@"} continue lappend newarg $a } if {![llength $newarg]} { # Nothing remained, drop the whole expression set pe [pt::pe epsilon] } elseif {[llength $newarg] < [llength $arguments]} { # Some removed, construct a new expression if {$op eq "/"} { set pe [list $op {*}$newarg] } else { set pe @@ } } ; # None removed, no change. } return $pe } proc ::pt::pe::op::Rename {nt ntnew pe op arguments} { #puts R($op)/$arguments/ if {($op eq "n") && ([lindex $arguments 0] eq $nt)} { return [pt::pe nonterminal $ntnew] |
︙ | ︙ |