Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Clean up some debugging messages a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Oct 22, 2009
1 parent c206489 commit 29e11dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/NQP/Grammar.pm
@@ -1,6 +1,6 @@
grammar NQP::Grammar is HLL::Grammar;

token TOP { <statementlist> [ $ || <.panic: 'Confused'> ] }
token TOP { <?DEBUG> <statementlist> [ $ || <.panic: 'Confused'> ] }

rule statementlist {
| $
Expand Down
8 changes: 5 additions & 3 deletions src/Regex/Cursor-protoregex-peek.pir
Expand Up @@ -17,7 +17,7 @@ Perform a match for protoregex C<name>.
.sub '!protoregex' :method
.param string name

self.'!cursor_debug'('START ', name)
self.'!cursor_debug'('PROTO ', name)

.local pmc generation
generation = get_global '$!generation'
Expand Down Expand Up @@ -64,6 +64,9 @@ Perform a match for protoregex C<name>.
token1 = substr target, pos, 1
$I0 = toklen[token1]
token = substr target, pos, $I0
$S0 = escape token
$S1 = escape token1
self.'!cursor_debug'(' token1="', $S1, '", token="', $S0, '"')

# Create a hash to keep track of the methods we've already called,
# so that we don't end up calling it twice.
Expand All @@ -75,7 +78,6 @@ Perform a match for protoregex C<name>.
# match, then shorten the token by one character and try again
# until we either have a match or we've run out of candidates.
token_loop:
self.'!cursor_debug'('TOKEN token=', token, ', token1=', token1)
.local pmc rx, result
rx = tokrx[token]
if null rx goto token_next
Expand Down Expand Up @@ -187,7 +189,7 @@ called C<name>.
.param pmc prototable
.param string name
self.'!cursor_debug'('Generating protoregex table for ', name)
self.'!cursor_debug'(' Generating protoregex table for ', name)
.local pmc toklen, tokrx
toklen = new ['Hash']
Expand Down

0 comments on commit 29e11dd

Please sign in to comment.