Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use latest pegex changes
  • Loading branch information
ingydotnet committed Aug 26, 2011
1 parent f631a5e commit bf3545a
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions lib/TestML/Grammar.pm
Expand Up @@ -134,15 +134,15 @@ sub build_tree {
'.rul' => 'block_marker'
},
{
'+mod' => '?',
'.all' => [
{
'.rgx' => qr/(?-xism:\G[\ \t]+)/
},
{
'.rul' => 'block_label'
}
],
'<' => '?'
]
},
{
'.rgx' => qr/(?-xism:\G[\ \t]*\r?\n)/
Expand Down Expand Up @@ -174,8 +174,8 @@ sub build_tree {
'.rul' => 'code_object'
},
{
'.rul' => 'unit_call',
'<' => '*'
'+mod' => '*',
'.rul' => 'unit_call'
}
]
},
Expand All @@ -199,6 +199,7 @@ sub build_tree {
]
},
'code_section' => {
'+mod' => '*',
'.any' => [
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)+)/
Expand All @@ -209,17 +210,16 @@ sub build_tree {
{
'.rul' => 'code_statement'
}
],
'<' => '*'
]
},
'code_statement' => {
'.all' => [
{
'.rul' => 'code_expression'
},
{
'.rul' => 'assertion_call',
'<' => '?'
'+mod' => '?',
'.rul' => 'assertion_call'
},
{
'.rul' => 'semicolon'
Expand All @@ -238,39 +238,40 @@ sub build_tree {
'.rul' => 'block_header'
},
{
'+mod' => '*',
'.any' => [
{
'.rul' => 'blank_line'
},
{
'.rul' => 'comment'
}
],
'<' => '*'
]
},
{
'.rul' => 'block_point',
'<' => '*'
'+mod' => '*',
'.rul' => 'block_point'
}
]
},
'data_section' => {
'.rul' => 'data_block',
'<' => '*'
'+mod' => '*',
'.rul' => 'data_block'
},
'double_quoted_string' => {
'.rgx' => qr/(?-xism:\G(?:"(([^\n\\"]|\\"|\\\\|\\[0nt])*?)"))/
},
'function_object' => {
'.all' => [
{
'.rul' => 'function_signature',
'<' => '?'
'+mod' => '?',
'.rul' => 'function_signature'
},
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)*\{(?:[\ \t]|\r?\n|\#.*\r?\n)*)/
},
{
'+mod' => '*',
'.any' => [
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)+)/
Expand All @@ -281,8 +282,7 @@ sub build_tree {
{
'.rul' => 'code_statement'
}
],
'<' => '*'
]
},
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)*\})/
Expand All @@ -295,8 +295,8 @@ sub build_tree {
'.rgx' => qr/(?-xism:\G\((?:[\ \t]|\r?\n|\#.*\r?\n)*)/
},
{
'.rul' => 'function_variables',
'<' => '?'
'+mod' => '?',
'.rul' => 'function_variables'
},
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)*\))/
Expand All @@ -312,15 +312,15 @@ sub build_tree {
'.rul' => 'function_variable'
},
{
'+mod' => '*',
'.all' => [
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)*,(?:[\ \t]|\r?\n|\#.*\r?\n)*)/
},
{
'.rul' => 'function_variable'
}
],
'<' => '*'
]
}
]
},
Expand Down Expand Up @@ -424,8 +424,8 @@ sub build_tree {
'.rgx' => qr/(?-xism:\G\((?:[\ \t]|\r?\n|\#.*\r?\n)*)/
},
{
'.rul' => 'transform_arguments',
'<' => '?'
'+mod' => '?',
'.rul' => 'transform_arguments'
},
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)*\))/
Expand All @@ -438,15 +438,15 @@ sub build_tree {
'.rul' => 'transform_argument'
},
{
'+mod' => '*',
'.all' => [
{
'.rgx' => qr/(?-xism:\G(?:[\ \t]|\r?\n|\#.*\r?\n)*,(?:[\ \t]|\r?\n|\#.*\r?\n)*)/
},
{
'.rul' => 'transform_argument'
}
],
'<' => '*'
]
}
]
},
Expand All @@ -466,16 +466,16 @@ sub build_tree {
'.rul' => 'transform_name'
},
{
'.rul' => 'transform_argument_list',
'<' => '?'
'+mod' => '?',
'.rul' => 'transform_argument_list'
}
]
},
'unit_call' => {
'.all' => [
{
'.rul' => 'assertion_call_test',
'<' => '!'
'+mod' => '!',
'.rul' => 'assertion_call_test'
},
{
'.rul' => 'call_indicator'
Expand Down

0 comments on commit bf3545a

Please sign in to comment.