Skip to content

Instantly share code, notes, and snippets.

@particle
Created August 2, 2010 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save particle/504714 to your computer and use it in GitHub Desktop.
Save particle/504714 to your computer and use it in GitHub Desktop.
C:\Rakudo\bin>type \tmp\order.p6
sub ord() { say(1) }
ord();
C:\Rakudo\bin>perl6 --target=parse \tmp\order.p6
===SORRY!===
Confused at line 1, near "sub ord() "
C:\Rakudo\bin>type \tmp\order.p6
sub ord() { say(1) };
ord();
C:\Rakudo\bin>perl6 --target=parse \tmp\order.p6
"parse" => PMC 'Regex;Match' => "sub ord() { say(1) };\nord();\n" @ 0 {
<statementlist> => PMC 'Regex;Match' => "sub ord() { say(1) };\nord();\n" @
0 {
<statement> => ResizablePMCArray (size:2) [
PMC 'Regex;Match' => "sub ord() { say(1) }" @ 0 {
<EXPR> => PMC 'Regex;Match' => "sub ord() { say(1) }" @ 0 {
<routine_declarator> => PMC 'Regex;Match' => "sub ord() { sa
y(1) }" @ 0 {
<routine_def> => PMC 'Regex;Match' => " ord() { say(1) }
" @ 3 {
<multisig> => ResizablePMCArray (size:1) [
PMC 'Regex;Match' => "" @ 8 {
<signature> => PMC 'Regex;Match' => "" @ 8 {
<typename> => ResizablePMCArray (size:0)
[
]
<parameter> => ResizablePMCArray (size:0
) [
]
}
}
]
<blockoid> => PMC 'Regex;Match' => "{ say(1) }" @ 10
{
<statementlist> => PMC 'Regex;Match' => " say(1)
" @ 11 {
<statement> => ResizablePMCArray (size:1) [
PMC 'Regex;Match' => "say(1) " @ 12 {
<EXPR> => PMC 'Regex;Match' => "say(
1)" @ 12 {
<identifier> => PMC 'Regex;Match
' => "say" @ 12
<args> => PMC 'Regex;Match' => "
(1)" @ 15 {
<semiarglist> => PMC 'Regex;
Match' => "1" @ 16 {
<arglist> => PMC 'Regex;
Match' => "1" @ 16 {
<EXPR> => PMC 'Regex
;Match' => "1" @ 16 {
<value> => PMC '
Regex;Match' => "1" @ 16 {
<number> =>
PMC 'Regex;Match' => "1" @ 16 {
<numish>
=> PMC 'Regex;Match' => "1" @ 16 {
<int
eger> => PMC 'Regex;Match' => "1" @ 16 {
<decint> => PMC 'Regex;Match' => "1" @ 16
<VALUE> => \parse[0][0]
}
}
}
}
}
}
}
}
}
<statement_mod_cond> => ResizablePMC
Array (size:0) [
]
<statement_mod_loop> => ResizablePMC
Array (size:0) [
]
}
]
}
}
<deflongname> => ResizablePMCArray (size:1) [
PMC 'Regex;Match' => "ord" @ 4 {
<colonpair> => ResizablePMCArray (size:0) [
]
<name> => PMC 'Regex;Match' => "ord" @ 4 {
<identifier> => PMC 'Regex;Match' => "or
d" @ 4
<morename> => ResizablePMCArray (size:0)
[
]
}
}
]
<trait> => ResizablePMCArray (size:0) [
]
}
<sym> => PMC 'Regex;Match' => "sub" @ 0
}
}
<statement_mod_cond> => ResizablePMCArray (size:0) [
]
<statement_mod_loop> => ResizablePMCArray (size:0) [
]
},
PMC 'Regex;Match' => "ord()" @ 22 {
<EXPR> => PMC 'Regex;Match' => "ord()" @ 22 {
<identifier> => PMC 'Regex;Match' => "ord" @ 22
<args> => PMC 'Regex;Match' => "()" @ 25 {
<semiarglist> => PMC 'Regex;Match' => "" @ 26 {
<arglist> => PMC 'Regex;Match' => "" @ 26
}
}
}
<statement_mod_cond> => ResizablePMCArray (size:0) [
]
<statement_mod_loop> => ResizablePMCArray (size:0) [
]
}
]
}
}
C:\Rakudo\bin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment