Author: coke
Date: Wed Nov 12 17:27:29 2008
New Revision: 32582
Modified:
trunk/compilers/pct/src/PAST/Compiler.pir
trunk/compilers/pge/PGE/Exp.pir
trunk/compilers/pge/PGE/OPTable.pir
trunk/compilers/pge/PGE/P5Regex.pir
trunk/compilers/pge/PGE/Perl6Regex.pir
trunk/runtime/parrot/library/P6object.pir
trunk/runtime/parrot/library/PGE/Dumper.pir
trunk/runtime/parrot/library/PGE/Glob.pir
trunk/runtime/parrot/library/PGE/Perl6Grammar.pir
trunk/runtime/parrot/library/PGE/Util.pir
trunk/runtime/parrot/library/Tcl/Glob.pir
trunk/runtime/parrot/library/Test/More.pir
Log:
use of bareword method names is [DEPRECATED]
This clears up all the usages present if you remove the feature and run 'make'
Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir (original)
+++ trunk/compilers/pct/src/PAST/Compiler.pir Wed Nov 12 17:27:29 2008
@@ -186,7 +186,7 @@
reg_void:
.return ('')
err_nortype:
- self.panic('rtype not set')
+ self.'panic'('rtype not set')
.end
=item coerce(post, rtype)
@@ -310,7 +310,7 @@
.return (post)
err_nortype:
- self.panic('rtype not set')
+ self.'panic'('rtype not set')
.end
@@ -434,11 +434,11 @@
.param pmc node
.param pmc options :slurpy :named
unless null node goto not_null_node
- self.panic("PAST::Compiler can't compile a null node")
+ self.'panic'("PAST::Compiler can't compile a null node")
not_null_node:
$S0 = typeof node
- self.panic("PAST::Compiler can't compile node of type ", $S0)
+ self.'panic'("PAST::Compiler can't compile node of type ", $S0)
.end
=item as_post(Undef)
@@ -624,7 +624,7 @@
$I0 = isa ctrlpast, ['PAST';'Node']
if $I0 goto control_past
if ctrlpast == 'return_pir' goto control_return
- self.panic("Unrecognized control handler '", ctrlpast, "'")
+ self.'panic'("Unrecognized control handler '", ctrlpast, "'")
control_return:
## handle 'return' exceptions
$S0 = self.'uniquereg'('P')
@@ -1538,7 +1538,7 @@
rpost = self.'coerce'(rpost, 'P')
ops.'push'(rpost)
- lpast.lvalue(1)
+ lpast.'lvalue'(1)
lpost = self.'as_post'(lpast, 'bindpost'=>rpost)
ops.'push'(lpost)
ops.'result'(lpost)
@@ -1872,7 +1872,7 @@
# if the keyed node is an lvalue, its base is an lvalue also
$I0 = node.'lvalue'()
unless $I0 goto have_lvalue
- basepast.lvalue($I0)
+ basepast.'lvalue'($I0)
have_lvalue:
basepost = self.'as_post'(basepast, 'rtype'=>'P')
Modified: trunk/compilers/pge/PGE/Exp.pir
==============================================================================
--- trunk/compilers/pge/PGE/Exp.pir (original)
+++ trunk/compilers/pge/PGE/Exp.pir Wed Nov 12 17:27:29 2008
@@ -134,7 +134,7 @@
.local string explabel
exp = self
set_hll_global ['PGE';'Exp'], '$!group', exp
- exp = exp.reduce(self)
+ exp = exp.'reduce'(self)
## we don't need a coroutine if :ratchet is set
.local int cutrule
@@ -145,13 +145,13 @@
.local pmc expcode
expcode = new 'CodeString'
explabel = 'R'
- exp.pir(expcode, explabel, 'succeed')
+ exp.'pir'(expcode, explabel, 'succeed')
if cutrule goto code_cutrule
## Generate the initial PIR code for a backtracking (uncut) rule.
.local string returnop
returnop = '.yield'
- code.emit(<<" CODE", name, namecorou, .INTERPINFO_CURRENT_SUB)
+ code.'emit'(<<" CODE", name, namecorou, .INTERPINFO_CURRENT_SUB)
.sub %0 :method
.param pmc adverbs :slurpy :named
.local pmc mob
@@ -180,7 +180,7 @@
code_cutrule:
## Initial code for a rule that cannot be backtracked into.
returnop = '.return'
- code.emit(<<" CODE", name)
+ code.'emit'(<<" CODE", name)
.sub %0 :method
.param pmc adverbs :unique_reg :slurpy :named
.local pmc mob
@@ -198,27 +198,27 @@
## generate the ustack only if we need it
.local string expstr
expstr = expcode
- code.emit(" .local pmc cstack :unique_reg")
- code.emit(" cstack = new 'ResizableIntegerArray'")
+ code.'emit'(" .local pmc cstack :unique_reg")
+ code.'emit'(" cstack = new 'ResizableIntegerArray'")
$I0 = index expstr, 'ustack'
if $I0 < 0 goto code_body_1
- code.emit(" .local pmc ustack :unique_reg")
- code.emit(" ustack = new 'ResizablePMCArray'")
+ code.'emit'(" .local pmc ustack :unique_reg")
+ code.'emit'(" ustack = new 'ResizablePMCArray'")
code_body_1:
## generate the gpad only if we need it
$I0 = index expstr, 'gpad'
if $I0 < 0 goto code_body_2
- code.emit(" .local pmc gpad :unique_reg")
- code.emit(" gpad = new 'ResizablePMCArray'")
+ code.'emit'(" .local pmc gpad :unique_reg")
+ code.'emit'(" gpad = new 'ResizablePMCArray'")
code_body_2:
## set the captscope if we need it
$I0 = index expstr, 'captscope'
if $I0 < 0 goto code_body_3
- code.emit(" .local pmc captscope, captob :unique_reg")
- code.emit(" captscope = mob")
+ code.'emit'(" .local pmc captscope, captob :unique_reg")
+ code.'emit'(" captscope = mob")
code_body_3:
- code.emit(<<" CODE", PGE_CUT_RULE, returnop)
+ code.'emit'(<<" CODE", PGE_CUT_RULE, returnop)
.local int pos, rep, cutmark :unique_reg
try_match:
if cpos > lastpos goto fail_rule
@@ -245,7 +245,7 @@
## add the "fail_match" target if we need it
$I0 = index expstr, 'fail_match'
if $I0 < 0 goto add_expcode
- code.emit(<<" CODE", PGE_CUT_MATCH)
+ code.'emit'(<<" CODE", PGE_CUT_MATCH)
fail_match:
cutmark = %0
goto fail_cut
@@ -254,7 +254,7 @@
add_expcode:
## add the expression code, then close off the sub
code .= expcode
- code.emit(" .end")
+ code.'emit'(" .end")
.return (code)
.end
@@ -308,13 +308,13 @@
captback = new 'CodeString'
if iscapture == 0 goto end
if isarray != 0 goto capt_array
- captsave.emit("captscope[%0] = captob", cname)
- captback.emit("delete captscope[%0]", cname)
+ captsave.'emit'("captscope[%0] = captob", cname)
+ captback.'emit'("delete captscope[%0]", cname)
goto end
capt_array:
- captsave.emit("$P2 = captscope[%0]\n push $P2, captob", cname)
- captback.emit("$P2 = captscope[%0]\n $P2 = pop $P2", cname)
- captgen.emit(<<" CODE", cname, label)
+ captsave.'emit'("$P2 = captscope[%0]\n push $P2, captob", cname)
+ captback.'emit'("$P2 = captscope[%0]\n $P2 = pop $P2", cname)
+ captgen.'emit'(<<" CODE", cname, label)
$I0 = defined captscope[%0]
if $I0 goto %1_cgen
$P0 = new 'ResizablePMCArray'
@@ -355,9 +355,9 @@
literal = downcase literal
ignorecase_end:
- literal = code.escape(literal)
+ literal = code.'escape'(literal)
- code.emit(<<" CODE", litlen, literal, args :named :flat)
+ code.'emit'(<<" CODE", litlen, literal, args :named :flat)
%L: # literal
$I0 = pos + %0
if $I0 > lastpos goto fail
@@ -384,7 +384,7 @@
if n <= 0 goto reduce_end
dec n
exp = self[n]
- exp = exp.reduce(next)
+ exp = exp.'reduce'(next)
self[n] = exp
next = exp
goto reduce_loop
@@ -433,21 +433,21 @@
.param string next
.local pmc iter, exp
- code.emit(' %0: # concat', label)
+ code.'emit'(' %0: # concat', label)
$P0 = self.'list'()
iter = new 'Iterator', $P0
exp = shift iter
- $S0 = code.unique('R')
+ $S0 = code.'unique'('R')
iter_loop:
unless iter goto iter_end
$P1 = shift iter
- $S1 = code.unique('R')
- exp.pir(code, $S0, $S1)
+ $S1 = code.'unique'('R')
+ exp.'pir'(code, $S0, $S1)
exp = $P1
$S0 = $S1
goto iter_loop
iter_end:
- exp.pir(code, $S0, next)
+ exp.'pir'(code, $S0, next)
.return ()
.end
@@ -466,7 +466,7 @@
if max != 1 goto reduce_exp0
if min != max goto reduce_max1
exp0['backtrack'] = backtrack
- exp0 = exp0.reduce(next)
+ exp0 = exp0.'reduce'(next)
.return (exp0)
reduce_max1:
@@ -477,7 +477,7 @@
exp0['backtrack'] = backtrack
reduce_exp0:
- exp0 = exp0.reduce(next)
+ exp0 = exp0.'reduce'(next)
self[0] = exp0
.return (self)
.end
@@ -504,7 +504,7 @@
.local int backtrack
backtrack = self['backtrack']
- explabel = code.unique('R')
+ explabel = code.'unique'('R')
replabel = concat label, '_repeat'
if backtrack == PGE_BACKTRACK_EAGER goto bt_eager
@@ -518,7 +518,7 @@
if $I0 != 0 goto bt_greedy_none
$I0 = self['max']
if $I0 != PGE_INF goto bt_greedy_none
- code.emit(<<" CODE", replabel, explabel, args :flat :named)
+ code.'emit'(<<" CODE", replabel, explabel, args :flat :named)
%L: # quant 0..Inf greedy
%0:
push ustack, pos
@@ -530,7 +530,7 @@
goto end
bt_none:
- $S0 = code.unique()
+ $S0 = code.'unique'()
args['c'] = $S0
args['C'] = ''
## handle 0..Inf as a special case
@@ -538,7 +538,7 @@
if $I0 != 0 goto bt_greedy_none
$I0 = self['max']
if $I0 != PGE_INF goto bt_greedy_none
- code.emit(<<" CODE", replabel, explabel, args :flat :named)
+ code.'emit'(<<" CODE", replabel, explabel, args :flat :named)
%L: # quant 0..Inf none
local_branch cstack, %0
if cutmark != %c goto fail
@@ -558,7 +558,7 @@
bt_greedy_none:
## handle greedy or none
- code.emit(<<" CODE", replabel, explabel, args :flat :named)
+ code.'emit'(<<" CODE", replabel, explabel, args :flat :named)
%L: # quant %Q greedy/none
push gpad, 0
local_branch cstack, %0
@@ -593,7 +593,7 @@
bt_eager:
## handle eager backtracking
- code.emit(<<" CODE", replabel, explabel, args :flat :named)
+ code.'emit'(<<" CODE", replabel, explabel, args :flat :named)
%L: # quant %Q eager
push gpad, 0
local_branch cstack, %0
@@ -617,7 +617,7 @@
CODE
end:
- exp.pir(code, explabel, replabel)
+ exp.'pir'(code, explabel, replabel)
.return ()
.end
@@ -646,7 +646,7 @@
group = get_hll_global ['PGE';'Exp'], '$!group'
set_hll_global ['PGE';'Exp'], '$!group', self
exp = self[0]
- exp = exp.reduce(next)
+ exp = exp.'reduce'(next)
set_hll_global ['PGE';'Exp'], '$!group', group
$I0 = self['cutmark']
if $I0 > 0 goto keep_group
@@ -673,8 +673,8 @@
has_cutmark:
.local string exp0label
- exp0label = code.unique('R')
- code.emit(<<" CODE", label, exp0label, cutmark)
+ exp0label = code.'unique'('R')
+ code.'emit'(<<" CODE", label, exp0label, cutmark)
%0: # group %2
local_branch cstack, %1
if cutmark != %2 goto fail
@@ -693,11 +693,11 @@
.param string next
.local string explabel, expnext
- explabel = code.unique('R')
+ explabel = code.'unique'('R')
expnext = concat label, '_close'
.local pmc args
- args = self.getargs(label, next)
+ args = self.'getargs'(label, next)
.local string captgen, captsave, captback
(captgen, captsave, captback) = self.'gencapture'(label)
@@ -717,7 +717,7 @@
args['X'] = '### '
isscope_end:
- code.emit(<<" CODE", captgen, captsave, captback, 'E'=>explabel,
args :flat :named)
+ code.'emit'(<<" CODE", captgen, captsave, captback, 'E'=>explabel,
args :flat :named)
%L: # capture
%0
captob = captscope.'new'(captscope, 'pos'=>pos)
@@ -748,7 +748,7 @@
CODE
.local pmc exp
exp = self[0]
- exp.pir(code, explabel, expnext)
+ exp.'pir'(code, explabel, expnext)
.return ()
.end
@@ -766,20 +766,20 @@
.param string next
.local pmc args
- args = self.getargs(label, next)
+ args = self.'getargs'(label, next)
.local string subarg
subarg = ''
$I0 = exists self['arg']
if $I0 == 0 goto subarg_end
subarg = self['arg']
- subarg = code.escape(subarg)
+ subarg = code.'escape'(subarg)
subarg = concat ', ', subarg
args['A'] = $S0
subarg_end:
.local string cname, captgen, captsave, captback
- (captgen, captsave, captback) = self.gencapture(label)
+ (captgen, captsave, captback) = self.'gencapture'(label)
.local string subname
subname = self['subname']
@@ -800,7 +800,7 @@
grammar = substr subname, 0, $I0
$P0 = split '::', grammar
$P0 = code.'key'($P0)
- code.emit(<<" CODE", grammar, rname, $P0, args :flat :named)
+ code.'emit'(<<" CODE", grammar, rname, $P0, args :flat :named)
%L: # grammar subrule %0::%1
captob = captscope.'new'(captscope, 'grammar'=>'%0')
captob.'to'(pos)
@@ -812,7 +812,7 @@
## The subrule is of the form <rule>, which means we first look
## for a method on the current match object, otherwise we do a
## normal name lookup.
- code.emit(<<" CODE", subname, args :flat :named)
+ code.'emit'(<<" CODE", subname, args :flat :named)
%L: # subrule %0
captob = captscope
$P0 = getattribute captob, '$.pos'
@@ -840,7 +840,7 @@
## We either branch directly to the next node (PGE_BACKTRACK_NONE)
## or to a small subroutine below that will keep backtracking into
## the subrule until it no longer produces a match.
- code.emit(<<" CODE", PGE_CUT_MATCH, $S0, captgen, captsave,
captback, subarg)
+ code.'emit'(<<" CODE", PGE_CUT_MATCH, $S0, captgen, captsave,
captback, subarg)
$P2 = adverbs['action']
captob = $P0(captob%5, 'action'=>$P2)
$P1 = getattribute captob, '$.pos'
@@ -855,7 +855,7 @@
CODE
if $I0 == PGE_BACKTRACK_NONE goto end
## Repeatedly backtrack into the subrule until there are no matches.
- code.emit(<<" CODE", PGE_CUT_MATCH, $S0, next)
+ code.'emit'(<<" CODE", PGE_CUT_MATCH, $S0, next)
%1:
pos = $P1
$P1 = getattribute captob, '&!corou'
@@ -864,7 +864,7 @@
local_branch cstack, %2
captob = pop ustack
if cutmark != 0 goto fail
- captob.next()
+ captob.'next'()
$P1 = getattribute captob, '$.pos'
if $P1 >= 0 goto %1
if $P1 <= %0 goto fail_match
@@ -882,7 +882,7 @@
unless $I0 goto have_test
test = 'unless'
have_test:
- code.emit(<<" CODE", PGE_CUT_MATCH, test, next, subarg)
+ code.'emit'(<<" CODE", PGE_CUT_MATCH, test, next, subarg)
captob = $P0(captob%3)
$P1 = getattribute captob, '$.pos'
if $P1 <= %0 goto fail_match
@@ -903,10 +903,10 @@
.param pmc next
.local pmc exp0, exp1
exp0 = self[0]
- exp0 = exp0.reduce(next)
+ exp0 = exp0.'reduce'(next)
self[0] = exp0
exp1 = self[1]
- exp1 = exp1.reduce(next)
+ exp1 = exp1.'reduce'(next)
self[1] = exp1
.return (self)
.end
@@ -918,9 +918,9 @@
.param string next
.local pmc exp0, exp1
.local string exp0label, exp1label
- exp0label = code.unique('R')
- exp1label = code.unique('R')
- code.emit(<<" CODE", label, exp0label, exp1label)
+ exp0label = code.'unique'('R')
+ exp1label = code.'unique'('R')
+ code.'emit'(<<" CODE", label, exp0label, exp1label)
%0: # alt %1, %2
push ustack, pos
local_branch cstack, %1
@@ -929,9 +929,9 @@
goto %2\n
CODE
exp0 = self[0]
- exp0.pir(code, exp0label, next)
+ exp0.'pir'(code, exp0label, next)
exp1 = self[1]
- exp1.pir(code, exp1label, next)
+ exp1.'pir'(code, exp1label, next)
.return ()
.end
@@ -965,19 +965,19 @@
anchor_bos:
- code.emit(" %0: # anchor bos", label)
- code.emit(" if pos == 0 goto %0", next)
- code.emit(" goto fail")
+ code.'emit'(" %0: # anchor bos", label)
+ code.'emit'(" if pos == 0 goto %0", next)
+ code.'emit'(" goto fail")
.return ()
anchor_eos:
- code.emit(" %0: # anchor eos", label)
- code.emit(" if pos == lastpos goto %0", next)
- code.emit(" goto fail")
+ code.'emit'(" %0: # anchor eos", label)
+ code.'emit'(" if pos == lastpos goto %0", next)
+ code.'emit'(" goto fail")
.return ()
anchor_bol:
- code.emit(<<" CODE", label, next, .CCLASS_NEWLINE)
+ code.'emit'(<<" CODE", label, next, .CCLASS_NEWLINE)
%0: # anchor bol
if pos == 0 goto %1
if pos == lastpos goto fail
@@ -989,7 +989,7 @@
.return ()
anchor_eol:
- code.emit(<<" CODE", label, next, .CCLASS_NEWLINE)
+ code.'emit'(<<" CODE", label, next, .CCLASS_NEWLINE)
%0: # anchor eol
$I1 = is_cclass %2, target, pos
if $I1 goto %1
@@ -1003,7 +1003,7 @@
.return ()
anchor_word:
- code.emit(<<" CODE", label, next, .CCLASS_WORD, test)
+ code.'emit'(<<" CODE", label, next, .CCLASS_WORD, test)
%0: # anchor word
$I0 = 0
if pos == 0 goto %0_1
@@ -1020,7 +1020,7 @@
.return ()
anchor_word_left:
- code.emit(<<" CODE", label, next, .CCLASS_WORD)
+ code.'emit'(<<" CODE", label, next, .CCLASS_WORD)
%0: # left word boundary
if pos >= lastpos goto fail
$I0 = is_cclass %2, target, pos
@@ -1034,7 +1034,7 @@
.return ()
anchor_word_right:
- code.emit(<<" CODE", label, next, .CCLASS_WORD)
+ code.'emit'(<<" CODE", label, next, .CCLASS_WORD)
%0: # right word boundary
if pos == 0 goto fail
$I0 = pos - 1
@@ -1092,16 +1092,16 @@
.local int cclass, negate
$S0 = self
- code.emit(" %0: # cclass %1", label, $S0)
- code.emit(" if pos >= lastpos goto fail")
+ code.'emit'(" %0: # cclass %1", label, $S0)
+ code.'emit'(" if pos >= lastpos goto fail")
cclass = self['cclass']
negate = self['negate']
if cclass == .CCLASS_ANY goto end
- code.emit(" $I0 = is_cclass %0, target, pos", cclass)
- code.emit(" if $I0 == %0 goto fail", negate)
+ code.'emit'(" $I0 = is_cclass %0, target, pos", cclass)
+ code.'emit'(" if $I0 == %0 goto fail", negate)
end:
- code.emit(" inc pos")
- code.emit(" goto %0", next)
+ code.'emit'(" inc pos")
+ code.'emit'(" goto %0", next)
.return ()
.end
@@ -1131,16 +1131,16 @@
if negate == 0 goto emit_find
negstr = ''
emit_find:
- code.emit(<<" CODE", negstr, cclass)
+ code.'emit'(<<" CODE", negstr, cclass)
$I0 = find%0_cclass %1, target, pos, lastpos
rep = $I0 - pos
CODE
goto emit_pir
emit_dot:
- code.emit(" rep = lastpos - pos")
+ code.'emit'(" rep = lastpos - pos")
emit_pir:
- code.emit(<<" CODE", args :flat :named)
+ code.'emit'(<<" CODE", args :flat :named)
%Mif rep < %m goto fail
%Nif rep <= %n goto %L_1
%Nrep = %n
@@ -1151,7 +1151,7 @@
if backtrack == PGE_BACKTRACK_EAGER goto bt_eager
bt_greedy:
- code.emit(<<" CODE", args :flat :named)
+ code.'emit'(<<" CODE", args :flat :named)
pos += rep
%L_2:
if rep <= %m goto %S
@@ -1168,11 +1168,11 @@
.return (1)
bt_none:
- code.emit(" pos += rep\n goto %0\n", next)
+ code.'emit'(" pos += rep\n goto %0\n", next)
.return (1)
bt_eager:
- code.emit(<<" CODE", args :flat :named)
+ code.'emit'(<<" CODE", args :flat :named)
%Mpos += %m
%Mrep -= %m
%L_2:
@@ -1206,7 +1206,7 @@
cutmark = group['cutmark']
if cutmark > 0 goto has_cutmark
$P1 = new 'CodeString'
- cutmark = $P1.unique()
+ cutmark = $P1.'unique'()
group['cutmark'] = cutmark
has_cutmark:
self['cutmark'] = cutmark
@@ -1223,7 +1223,7 @@
cutmark = self['cutmark']
if cutmark > 0 goto group_cutmark
- code.emit(<<" CODE", label, next, cutmark)
+ code.'emit'(<<" CODE", label, next, cutmark)
%0: # cut rule or match
local_branch cstack, %1
cutmark = %2
@@ -1232,7 +1232,7 @@
.return ()
group_cutmark:
- code.emit(<<" CODE", label, next, cutmark)
+ code.'emit'(<<" CODE", label, next, cutmark)
%0: # cut %2
local_branch cstack, %1
cutmark = %2
@@ -1256,7 +1256,7 @@
.local string cname
cname = self['cname']
- code.emit(<<" CODE", label, next, cname)
+ code.'emit'(<<" CODE", label, next, cname)
%0: # scalar %2
$P0 = mob[%2]
$I0 = does $P0, 'array'
@@ -1290,7 +1290,7 @@
.local string charlist
$S0 = self
- charlist = code.escape($S0)
+ charlist = code.'escape'($S0)
.local string test
test = '<'
@@ -1305,7 +1305,7 @@
incpos = '### zero width'
zerowidth_end:
- code.emit(<<" CODE", label, charlist, test, incpos, next)
+ code.'emit'(<<" CODE", label, charlist, test, incpos, next)
%0: # enumcharlist %1
if pos >= lastpos goto fail
$S0 = substr target, pos, 1
@@ -1329,7 +1329,7 @@
.param pmc code
.param string label
.param string next
- code.emit(<<" CODE", label, next, .CCLASS_NEWLINE)
+ code.'emit'(<<" CODE", label, next, .CCLASS_NEWLINE)
%0: # newline
$I0 = is_cclass %2, target, pos
if $I0 == 0 goto fail
@@ -1349,10 +1349,10 @@
.param pmc next
.local pmc exp0, exp1
exp0 = self[0]
- exp0 = exp0.reduce(next)
+ exp0 = exp0.'reduce'(next)
self[0] = exp0
exp1 = self[1]
- exp1 = exp1.reduce(next)
+ exp1 = exp1.'reduce'(next)
self[1] = exp1
.return (self)
.end
@@ -1363,11 +1363,11 @@
.param string next
.local string exp0label, exp1label, chk0label, chk1label
- exp0label = code.unique('R')
- exp1label = code.unique('R')
+ exp0label = code.'unique'('R')
+ exp1label = code.'unique'('R')
chk0label = concat label, '_chk0'
chk1label = concat label, '_chk1'
- code.emit(<<" CODE", label, next, exp0label, chk0label, exp1label,
chk1label)
+ code.'emit'(<<" CODE", label, next, exp0label, chk0label,
exp1label, chk1label)
%0: # conj %2, %4
push gpad, pos
push gpad, pos
@@ -1423,7 +1423,7 @@
## two different compilers. Also, if the sources can be lengthy
## we might be well served to use a hashed representation of
## the source.
- code.emit(<<" CODE", label, next, lang, value)
+ code.'emit'(<<" CODE", label, next, lang, value)
%0: # closure
$S1 = %3
$P0 = get_hll_global ['PGE';'Match'], '%!cache'
@@ -1459,7 +1459,7 @@
.param string label
.param string next
.local string actionname, actionkey
- code.emit(" %0: # action", label)
+ code.'emit'(" %0: # action", label)
actionname = self['actionname']
if actionname == '' goto end
actionname = code.'escape'(actionname)
@@ -1468,7 +1468,7 @@
actionkey = code.'escape'(actionkey)
actionkey = concat ', ', actionkey
have_actionkey:
- code.emit(<<" CODE", label, next, actionname, actionkey)
+ code.'emit'(<<" CODE", label, next, actionname, actionkey)
$P1 = adverbs['action']
if null $P1 goto %1
$I1 = can $P1, %2
Modified: trunk/compilers/pge/PGE/OPTable.pir
==============================================================================
--- trunk/compilers/pge/PGE/OPTable.pir (original)
+++ trunk/compilers/pge/PGE/OPTable.pir Wed Nov 12 17:27:29 2008
@@ -316,7 +316,7 @@
mpos = pos
$P0 = ws(mob)
unless $P0 goto token_next_1
- pos = $P0.to()
+ pos = $P0.'to'()
goto token_next_1
token_next_ws:
pos = find_not_cclass .CCLASS_WHITESPACE, target, pos, lastpos
@@ -453,7 +453,7 @@
## shift operator onto the operator stack
push tokenstack, token
push operstack, oper
- pos = oper.to()
+ pos = oper.'to'()
## for circumfix ops, increase the circumfix nesting level
$I0 = isgt tokencat, PGE_OPTABLE_POSTCIRCUMFIX
circumnest += $I0
@@ -463,7 +463,7 @@
term_shift:
push termstack, oper
- pos = oper.to()
+ pos = oper.'to'()
expect = token['expect']
expect = shr expect, 8
goto token_next
@@ -553,7 +553,7 @@
mpos = $I0
oper = $P0(mob, 'action'=>action)
delete mob['KEY']
- $P0 = oper.from()
+ $P0 = oper.'from'()
$P0 = pos
token_match_success:
$P0 = token["name"]
@@ -583,7 +583,7 @@
## somewhere we encountered an error that caused us to backtrack
## find the "real" ending position here
end_1a:
- $I0 = $P0.to()
+ $I0 = $P0.'to'()
if $I0 <= wspos goto end_1b
wspos = $I0
mpos = $I0
Modified: trunk/compilers/pge/PGE/P5Regex.pir
==============================================================================
--- trunk/compilers/pge/PGE/P5Regex.pir (original)
+++ trunk/compilers/pge/PGE/P5Regex.pir Wed Nov 12 17:27:29 2008
@@ -60,37 +60,37 @@
set_hll_global ["PGE";"P5Regex"], "$optable", optable
$P0 = get_hll_global ["PGE";"P5Regex"], "parse_lit"
- optable.newtok('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:\b', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:\B', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:^', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:$', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
-
- optable.newtok('term:\d', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\D', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\s', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\S', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\w', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\W', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\b', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:\B', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:^', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:$', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+
+ optable.'newtok'('term:\d', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\D', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\s', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\S', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\w', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\W', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('circumfix:( )', 'equiv'=>'term:', 'nows'=>1,
'nullterm'=>1, 'match'=>'PGE::Exp::CGroup')
- optable.newtok('circumfix:(?: )', 'equiv'=>'term:', 'nows'=>1,
'nullterm'=>1, 'match'=>'PGE::Exp::Group')
+ optable.'newtok'('circumfix:( )', 'equiv'=>'term:', 'nows'=>1,
'nullterm'=>1, 'match'=>'PGE::Exp::CGroup')
+ optable.'newtok'('circumfix:(?: )', 'equiv'=>'term:', 'nows'=>1,
'nullterm'=>1, 'match'=>'PGE::Exp::Group')
$P0 = get_hll_global ['PGE';'P5Regex'], 'parse_enumclass'
- optable.newtok('term:[', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:.', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:[', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:.', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
$P0 = get_hll_global ['PGE';'P5Regex'], 'parse_quant'
- optable.newtok('postfix:*', 'looser'=>'term:', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
- optable.newtok('postfix:+', 'equiv'=>'postfix:*', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
- optable.newtok('postfix:?', 'equiv'=>'postfix:*', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
- optable.newtok('postfix:{', 'equiv'=>'postfix:*', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
+ optable.'newtok'('postfix:*', 'looser'=>'term:', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
+ optable.'newtok'('postfix:+', 'equiv'=>'postfix:*', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
+ optable.'newtok'('postfix:?', 'equiv'=>'postfix:*', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
+ optable.'newtok'('postfix:{', 'equiv'=>'postfix:*', 'left'=>1, 'nows'=>1,
'parsed'=>$P0)
- optable.newtok('infix:', 'looser'=>'postfix:*', 'right'=>1, 'nows'=>1,
'match'=>'PGE::Exp::Concat')
- optable.newtok('infix:|', 'looser'=>'infix:', 'left'=>1, 'nows'=>1,
'match'=>'PGE::Exp::Alt')
+ optable.'newtok'('infix:', 'looser'=>'postfix:*', 'right'=>1, 'nows'=>1,
'match'=>'PGE::Exp::Concat')
+ optable.'newtok'('infix:|', 'looser'=>'infix:', 'left'=>1, 'nows'=>1,
'match'=>'PGE::Exp::Alt')
- optable.newtok('close:}', 'looser'=>'infix:|', 'nows'=>1) #
XXX: hack
+ optable.'newtok'('close:}', 'looser'=>'infix:|', 'nows'=>1) #
XXX: hack
$P0 = get_hll_global ["PGE";"P5Regex"], "compile_p5regex"
compreg "PGE::P5Regex", $P0
Modified: trunk/compilers/pge/PGE/Perl6Regex.pir
==============================================================================
--- trunk/compilers/pge/PGE/Perl6Regex.pir (original)
+++ trunk/compilers/pge/PGE/Perl6Regex.pir Wed Nov 12 17:27:29 2008
@@ -166,92 +166,92 @@
set_global '$optable', optable
$P0 = get_global 'parse_term'
- optable.newtok('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
$P0 = get_global 'parse_term_ws'
- optable.newtok('term:#', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:#', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = get_global 'parse_term_backslash'
- optable.newtok("term:\\", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'("term:\\", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:^', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:^^', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:$$', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:\b', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:\B', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:<<', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok('term:>>', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok(unicode:"term:\xab", 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
- optable.newtok(unicode:"term:\xbb", 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
-
- optable.newtok('term:.', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\d', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\D', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\s', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\S', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\w', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\W', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\N', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
- optable.newtok('term:\n', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Newline')
+ optable.'newtok'('term:^', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:^^', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:$$', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:\b', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:\B', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:<<', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:>>', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'(unicode:"term:\xab", 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'(unicode:"term:\xbb", 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Anchor')
+
+ optable.'newtok'('term:.', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\d', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\D', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\s', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\S', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\w', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\W', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\N', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CCShortcut')
+ optable.'newtok'('term:\n', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Newline')
$P0 = get_global 'parse_dollar'
- optable.newtok('term:$', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:$', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = get_global 'parse_subrule'
- optable.newtok('term:<', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:<?', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:<!', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:<.', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<?', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<!', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<.', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = get_global 'parse_enumcharclass'
- optable.newtok('term:<[', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:<+', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:<-', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:<![', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<[', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<+', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<-', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:<![', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = get_global 'parse_quoted_literal'
- optable.newtok("term:'", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'("term:'", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('term:::', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
- optable.newtok('term::::', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
- optable.newtok('term:<cut>', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
- optable.newtok('term:<commit>', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
+ optable.'newtok'('term:::', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
+ optable.'newtok'('term::::', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
+ optable.'newtok'('term:<cut>', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
+ optable.'newtok'('term:<commit>', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Cut')
$P0 = get_global 'parse_closure'
- optable.newtok("term:{{", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'("term:{{", 'equiv'=>'term:', 'nows'=>1,
'parsed'=>$P0)
$P0 = get_global 'parse_action'
- optable.newtok("term:{*}", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'("term:{*}", 'equiv'=>'term:', 'nows'=>1,
'parsed'=>$P0)
- optable.newtok('circumfix:[ ]', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Group')
- optable.newtok('circumfix:( )', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CGroup')
+ optable.'newtok'('circumfix:[ ]', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::Group')
+ optable.'newtok'('circumfix:( )', 'equiv'=>'term:', 'nows'=>1,
'match'=>'PGE::Exp::CGroup')
$P0 = get_global 'parse_quant'
- optable.newtok('postfix:*', 'looser'=>'term:', 'parsed'=>$P0)
- optable.newtok('postfix:+', 'equiv'=>'postfix:*', 'parsed'=>$P0)
- optable.newtok('postfix:?', 'equiv'=>'postfix:*', 'parsed'=>$P0)
- optable.newtok('postfix::', 'equiv'=>'postfix:*', 'parsed'=>$P0)
- optable.newtok('postfix:**', 'equiv'=>'postfix:*', 'parsed'=>$P0)
+ optable.'newtok'('postfix:*', 'looser'=>'term:', 'parsed'=>$P0)
+ optable.'newtok'('postfix:+', 'equiv'=>'postfix:*', 'parsed'=>$P0)
+ optable.'newtok'('postfix:?', 'equiv'=>'postfix:*', 'parsed'=>$P0)
+ optable.'newtok'('postfix::', 'equiv'=>'postfix:*', 'parsed'=>$P0)
+ optable.'newtok'('postfix:**', 'equiv'=>'postfix:*', 'parsed'=>$P0)
$P0 = get_global 'parse_quant_error'
- optable.newtok('term:*', 'equiv'=>'term:', 'parsed'=>$P0)
- optable.newtok('term:+', 'equiv'=>'term:', 'parsed'=>$P0)
- optable.newtok('term:?', 'equiv'=>'term:', 'parsed'=>$P0)
-
- optable.newtok('infix:', 'looser'=>'postfix:*', 'assoc'=>'list',
'nows'=>1, 'match'=>'PGE::Exp::Concat')
- optable.newtok('infix:&', 'looser'=>'infix:', 'nows'=>1,
'match'=>'PGE::Exp::Conj')
- optable.newtok('infix:|', 'looser'=>'infix:&', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
- optable.newtok('prefix:|', 'equiv'=>'infix:|', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
- optable.newtok('infix:||', 'equiv'=>'infix:|', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
- optable.newtok('prefix:||', 'equiv'=>'infix:|', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
+ optable.'newtok'('term:*', 'equiv'=>'term:', 'parsed'=>$P0)
+ optable.'newtok'('term:+', 'equiv'=>'term:', 'parsed'=>$P0)
+ optable.'newtok'('term:?', 'equiv'=>'term:', 'parsed'=>$P0)
+
+ optable.'newtok'('infix:', 'looser'=>'postfix:*', 'assoc'=>'list',
'nows'=>1, 'match'=>'PGE::Exp::Concat')
+ optable.'newtok'('infix:&', 'looser'=>'infix:', 'nows'=>1,
'match'=>'PGE::Exp::Conj')
+ optable.'newtok'('infix:|', 'looser'=>'infix:&', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
+ optable.'newtok'('prefix:|', 'equiv'=>'infix:|', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
+ optable.'newtok'('infix:||', 'equiv'=>'infix:|', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
+ optable.'newtok'('prefix:||', 'equiv'=>'infix:|', 'nows'=>1,
'match'=>'PGE::Exp::Alt')
- optable.newtok('infix::=', 'tighter'=>'infix:', 'assoc'=>'right',
'match'=>'PGE::Exp::Alias')
- optable.newtok('infix:=', 'tighter'=>'infix:', 'assoc'=>'right',
'match'=>'PGE::Exp::Alias')
+ optable.'newtok'('infix::=', 'tighter'=>'infix:', 'assoc'=>'right',
'match'=>'PGE::Exp::Alias')
+ optable.'newtok'('infix:=', 'tighter'=>'infix:', 'assoc'=>'right',
'match'=>'PGE::Exp::Alias')
$P0 = get_global 'parse_modifier'
- optable.newtok('prefix::', 'looser'=>'infix:|', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('prefix::', 'looser'=>'infix:|', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('close:}', 'precedence'=>'<', 'nows'=>1)
+ optable.'newtok'('close:}', 'precedence'=>'<', 'nows'=>1)
.local pmc esclist
esclist = new 'Hash'
@@ -840,7 +840,7 @@
$P0 = getattribute mob, '$.target'
target = $P0
- pos = mob.to()
+ pos = mob.'to'()
lastpos = length target
op = mob['KEY']
@@ -1464,9 +1464,9 @@
add_cgroup:
.local pmc cexp
cexp = self.'new'(self, 'grammar'=>'PGE::Exp::CGroup')
- $I0 = self.from()
+ $I0 = self.'from'()
cexp.'from'($I0)
- $I0 = self.to()
+ $I0 = self.'to'()
cexp.'to'($I0)
cexp[0] = exp1
cexp['isscope'] = 0
Modified: trunk/runtime/parrot/library/P6object.pir
==============================================================================
--- trunk/runtime/parrot/library/P6object.pir (original)
+++ trunk/runtime/parrot/library/P6object.pir Wed Nov 12 17:27:29 2008
@@ -263,7 +263,7 @@
if $I0, have_hll
$P0 = getinterp
$P0 = $P0['namespace';1]
- $P0 = $P0.get_name()
+ $P0 = $P0.'get_name'()
hll = shift $P0
options['hll'] = hll
have_hll:
@@ -413,7 +413,7 @@
if $I0, have_hll
$P0 = getinterp
$P0 = $P0['namespace';1]
- $P0 = $P0.get_name()
+ $P0 = $P0.'get_name'()
hll = shift $P0
options['hll'] = hll
have_hll:
@@ -456,7 +456,7 @@
$S0 = ns_item
$P0 = new 'NameSpace'
ns = get_root_namespace base_ns
- ns.add_namespace($S0, $P0)
+ ns.'add_namespace'($S0, $P0)
push base_ns, ns_item
goto create_ns_loop
create_ns_loop_end:
Modified: trunk/runtime/parrot/library/PGE/Dumper.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Dumper.pir (original)
+++ trunk/runtime/parrot/library/PGE/Dumper.pir Wed Nov 12 17:27:29 2008
@@ -33,7 +33,7 @@
$S0 = self
dumper."genericString"("", $S0)
print " @ "
- $I0 = self.from()
+ $I0 = self.'from'()
print $I0
hascapts = 0
hash = self.'hash'()
Modified: trunk/runtime/parrot/library/PGE/Glob.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Glob.pir (original)
+++ trunk/runtime/parrot/library/PGE/Glob.pir Wed Nov 12 17:27:29 2008
@@ -89,21 +89,21 @@
store_global '$optable', optable
$P0 = find_global 'glob_literal'
- optable.newtok('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
$P0 = find_global 'glob_quest'
- optable.newtok('term:?', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:?', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = find_global 'glob_star'
- optable.newtok('term:*', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:*', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = find_global 'glob_enum'
- optable.newtok('term:[', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:[', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = find_global 'glob_alt'
- optable.newtok('term:{', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:{', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('infix:', 'looser'=>'term:', 'assoc'=>'list', 'nows'=>1,
'match'=>'PGE::Exp::Concat')
+ optable.'newtok'('infix:', 'looser'=>'term:', 'assoc'=>'list', 'nows'=>1,
'match'=>'PGE::Exp::Concat')
.local pmc p6meta
p6meta = get_hll_global 'P6metaclass'
Modified: trunk/runtime/parrot/library/PGE/Perl6Grammar.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Perl6Grammar.pir (original)
+++ trunk/runtime/parrot/library/PGE/Perl6Grammar.pir Wed Nov 12 17:27:29 2008
@@ -180,8 +180,8 @@
if namespace == '' goto ns_optable
.local string inherit
inherit = ns['inherit']
- $S0 = initpir.unique('onload_')
- initpir.emit(<<' CODE', namespace, inherit, $S0)
+ $S0 = initpir.'unique'('onload_')
+ initpir.'emit'(<<' CODE', namespace, inherit, $S0)
## namespace %0
push_eh %2
.local pmc p6meta
@@ -193,11 +193,11 @@
ns_optable:
$P0 = ns['optable']
if $P0 == '' goto iter_loop
- initpir.emit(" optable = new ['PGE';'OPTable']")
+ initpir.'emit'(" optable = new ['PGE';'OPTable']")
$S0 = namespace
$P1 = split '::', $S0
$P1 = initpir.'key'($P1 :flat)
- initpir.emit(" set_hll_global %0, '$optable', optable", $P1)
+ initpir.'emit'(" set_hll_global %0, '$optable', optable", $P1)
initpir .= $P0
goto iter_loop
iter_end:
@@ -205,11 +205,11 @@
.local pmc out
out = new 'CodeString'
if initpir == '' goto out_rule
- out.emit(" .sub '__onload' :load :init")
- out.emit(" .local pmc optable")
+ out.'emit'(" .sub '__onload' :load :init")
+ out.'emit'(" .local pmc optable")
out .= initpir
- out.emit(" .return ()")
- out.emit(" .end")
+ out.'emit'(" .return ()")
+ out.'emit'(" .end")
out_rule:
out .= rulepir
@@ -298,7 +298,7 @@
$S0 = namespace
$P0 = split '::', $S0
$P0 = rulepir.'key'($P0 :flat)
- rulepir.emit(<<' END', $P0, name)
+ rulepir.'emit'(<<' END', $P0, name)
.namespace %0
.sub "%1"
.param pmc mob
@@ -313,7 +313,7 @@
.local pmc code
$P0 = nstable[namespace]
code = $P0['rule']
- code.emit("\n## <%0::%1>\n", namespace, name)
+ code.'emit'("\n## <%0::%1>\n", namespace, name)
code .= rulepir
.return ()
.end
@@ -381,7 +381,7 @@
$S0 = namespace
$P0 = split '::', $S0
$P0 = optable.'key'($P0 :flat)
- optable.emit(" $P0 = get_hll_global %0, '%1'", $P0, arg)
+ optable.'emit'(" $P0 = get_hll_global %0, '%1'", $P0, arg)
arg = '$P0'
goto trait_arg_done
trait_arg_null:
@@ -394,7 +394,7 @@
goto trait_loop
trait_end:
name = optable.'escape'(name)
- optable.emit(" optable.newtok(%0%1)", name, traitlist)
+ optable.'emit'(" optable.'newtok'(%0%1)", name, traitlist)
.return ()
.end
Modified: trunk/runtime/parrot/library/PGE/Util.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Util.pir (original)
+++ trunk/runtime/parrot/library/PGE/Util.pir Wed Nov 12 17:27:29 2008
@@ -205,11 +205,11 @@
unless match goto split_end
## save substring up to current match
- $I0 = match.from()
+ $I0 = match.'from'()
$I0 -= pos
$S0 = substr str, pos, $I0
push result, $S0
- pos = match.to()
+ pos = match.'to'()
.local pmc captures
captures = match.'list'()
Modified: trunk/runtime/parrot/library/Tcl/Glob.pir
==============================================================================
--- trunk/runtime/parrot/library/Tcl/Glob.pir (original)
+++ trunk/runtime/parrot/library/Tcl/Glob.pir Wed Nov 12 17:27:29 2008
@@ -89,18 +89,18 @@
store_global '$optable', optable
$P0 = find_global 'glob_literal'
- optable.newtok('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:', 'precedence'=>'=', 'nows'=>1, 'parsed'=>$P0)
$P0 = find_global 'glob_quest'
- optable.newtok('term:?', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:?', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = find_global 'glob_star'
- optable.newtok('term:*', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:*', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
$P0 = find_global 'glob_enum'
- optable.newtok('term:[', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+ optable.'newtok'('term:[', 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
- optable.newtok('infix:', 'looser'=>'term:', 'assoc'=>'list', 'nows'=>1,
'match'=>'PGE::Exp::Concat')
+ optable.'newtok'('infix:', 'looser'=>'term:', 'assoc'=>'list', 'nows'=>1,
'match'=>'PGE::Exp::Concat')
$P2 = newclass [ 'Tcl';'Glob';'Compiler' ]
addattribute $P2, '$!compsub'
@@ -325,7 +325,7 @@
.return (mob)
err_noclose:
- mob.to(-1)
+ mob.'to'(-1)
.return (mob)
.end
Modified: trunk/runtime/parrot/library/Test/More.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/More.pir (original)
+++ trunk/runtime/parrot/library/Test/More.pir Wed Nov 12 17:27:29 2008
@@ -85,7 +85,7 @@
.local pmc test
find_global test, [ 'Test'; 'More' ], '_test'
- test.plan( tests )
+ test.'plan'( tests )
.end
=item C<ok( passed, description )>
@@ -102,7 +102,7 @@
.local pmc test
find_global test, [ 'Test'; 'More' ], '_test'
- test.ok( passed, description )
+ test.'ok'( passed, description )
.end
=item C<nok( passed, description )>
@@ -122,7 +122,7 @@
.local int reverse_passed
reverse_passed = not passed
- test.ok( reverse_passed, description )
+ test.'ok'( reverse_passed, description )
.end
=item C<is( left, right, description )>
@@ -161,7 +161,7 @@
r = right
pass = iseq l, r
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -172,7 +172,7 @@
r_string = right
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -203,7 +203,7 @@
pass = isle diff, prec_num
report:
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -214,7 +214,7 @@
r_string = right
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -233,7 +233,7 @@
r = right
pass = iseq l, r
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -244,7 +244,7 @@
r_string = right
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -288,7 +288,7 @@
goto result
result:
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -299,7 +299,7 @@
r_string = right
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -328,7 +328,7 @@
pass = 1
report:
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -340,7 +340,7 @@
r_string = 'not ' . r_string
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -363,7 +363,7 @@
pass = 1
report:
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -375,7 +375,7 @@
r_string = 'not ' . r_string
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -398,7 +398,7 @@
pass = 1
report:
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -410,7 +410,7 @@
r_string = 'not ' . r_string
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -428,7 +428,7 @@
pass = isne left, right
report:
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
.local string diagnostic
@@ -440,7 +440,7 @@
r_string = 'not ' . r_string
diagnostic = _make_diagnostic( l_string, r_string )
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -455,7 +455,7 @@
.local pmc test
find_global test, [ 'Test'; 'More' ], '_test'
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
.end
@@ -868,10 +868,10 @@
pass = 1
report:
- test.ok( pass, description )
+ test.'ok'( pass, description )
if pass goto done
- test.diag( diagnostic )
+ test.'diag'( diagnostic )
done:
.end
@@ -927,7 +927,7 @@
.local pmc test
find_global test, [ 'Test'; 'More' ], '_test'
- test.todo( args :flat )
+ test.'todo'( args :flat )
.end
=item C<isa_ok( object, class_name, object_name )>