Skip to content

Commit

Permalink
Compile in new syntax grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed May 16, 2014
1 parent 2791d2f commit 3c215f9
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions lib/TestML/Compiler/Pegex/Grammar.pm
Expand Up @@ -176,11 +176,24 @@ sub make_tree {
'.rgx' => qr/\G\((?:[\ \t]|\r?\n|\#.*\r?\n)*/
},
{
'+min' => 0,
'.ref' => 'call_argument',
'.sep' => {
'.rgx' => qr/\G(?:[\ \t]|\r?\n|\#.*\r?\n)*,(?:[\ \t]|\r?\n|\#.*\r?\n)*/
}
'+max' => 1,
'-flat' => 1,
'.all' => [
{
'.ref' => 'call_argument'
},
{
'+min' => 0,
'.all' => [
{
'.rgx' => qr/\G(?:[\ \t]|\r?\n|\#.*\r?\n)*,(?:[\ \t]|\r?\n|\#.*\r?\n)*/
},
{
'.ref' => 'call_argument'
}
]
}
]
},
{
'.rgx' => qr/\G(?:[\ \t]|\r?\n|\#.*\r?\n)*\)/
Expand Down Expand Up @@ -382,11 +395,23 @@ sub make_tree {
'.rgx' => qr/\G([a-zA-Z]\w*)/
},
'function_variables' => {
'+min' => 1,
'.ref' => 'function_variable',
'.sep' => {
'.rgx' => qr/\G(?:[\ \t]|\r?\n|\#.*\r?\n)*,(?:[\ \t]|\r?\n|\#.*\r?\n)*/
}
'-flat' => 1,
'.all' => [
{
'.ref' => 'function_variable'
},
{
'+min' => 0,
'.all' => [
{
'.rgx' => qr/\G(?:[\ \t]|\r?\n|\#.*\r?\n)*,(?:[\ \t]|\r?\n|\#.*\r?\n)*/
},
{
'.ref' => 'function_variable'
}
]
}
]
},
'lines_point' => {
'.all' => [
Expand Down

0 comments on commit 3c215f9

Please sign in to comment.