Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
recompile with new pegex
  • Loading branch information
ingydotnet committed Mar 30, 2014
1 parent 4cd29ef commit fabf8a5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
23 changes: 16 additions & 7 deletions testml.pgx.json
@@ -1,5 +1,11 @@
{
"+grammar" : "testml",
"+include" : "atom",
"+toprule" : "testml_document",
"+version" : "0.0.1",
"__" : {
".rgx" : "(?:[\\ \\t]|\\r?\\n|\\#.*\\r?\\n)+"
},
"assertion_call" : {
".any" : [
{
Expand Down Expand Up @@ -114,6 +120,9 @@
"blank_line" : {
".rgx" : "[\\ \\t]*\\r?\\n"
},
"blanks" : {
".rgx" : "[\\ \\t]+"
},
"block_header" : {
".all" : [
{
Expand All @@ -123,15 +132,15 @@
"+max" : 1,
".all" : [
{
".rgx" : "[\\ \\t]+"
".ref" : "blanks"
},
{
".ref" : "block_label"
}
]
},
{
".rgx" : "[\\ \\t]*\\r?\\n"
".ref" : "blank_line"
}
]
},
Expand Down Expand Up @@ -243,7 +252,7 @@
"+min" : 0,
".any" : [
{
".rgx" : "(?:[\\ \\t]|\\r?\\n|\\#.*\\r?\\n)+"
".ref" : "__"
},
{
".ref" : "assignment_statement"
Expand Down Expand Up @@ -330,7 +339,7 @@
"+min" : 0,
".any" : [
{
".rgx" : "(?:[\\ \\t]|\\r?\\n|\\#.*\\r?\\n)+"
".ref" : "__"
},
{
".ref" : "assignment_statement"
Expand Down Expand Up @@ -378,13 +387,13 @@
".ref" : "point_marker"
},
{
".rgx" : "[\\ \\t]+"
".ref" : "blanks"
},
{
".ref" : "point_name"
},
{
".rgx" : "[\\ \\t]*\\r?\\n"
".ref" : "blank_line"
},
{
".ref" : "point_lines"
Expand All @@ -403,7 +412,7 @@
".ref" : "point_marker"
},
{
".rgx" : "[\\ \\t]+"
".ref" : "blanks"
},
{
".ref" : "point_name"
Expand Down
21 changes: 14 additions & 7 deletions testml.pgx.yaml
@@ -1,5 +1,10 @@
---
+grammar: testml
+include: atom
+toprule: testml_document
+version: 0.0.1
__:
.rgx: (?:[\ \t]|\r?\n|\#.*\r?\n)+
assertion_call:
.any:
- -wrap: 1
Expand Down Expand Up @@ -53,14 +58,16 @@ assignment_statement:
- .ref: ending
blank_line:
.rgx: '[\ \t]*\r?\n'
blanks:
.rgx: '[\ \t]+'
block_header:
.all:
- .ref: block_marker
- +max: 1
.all:
- .rgx: '[\ \t]+'
- .ref: blanks
- .ref: block_label
- .rgx: '[\ \t]*\r?\n'
- .ref: blank_line
block_label:
.ref: unquoted_string
block_marker:
Expand Down Expand Up @@ -111,7 +118,7 @@ code_object:
code_section:
+min: 0
.any:
- .rgx: (?:[\ \t]|\r?\n|\#.*\r?\n)+
- .ref: __
- .ref: assignment_statement
- .ref: code_statement
code_statement:
Expand Down Expand Up @@ -153,7 +160,7 @@ function_object:
- .ref: function_start
- +min: 0
.any:
- .rgx: (?:[\ \t]|\r?\n|\#.*\r?\n)+
- .ref: __
- .ref: assignment_statement
- .ref: code_statement
- .rgx: (?:[\ \t]|\r?\n|\#.*\r?\n)*\}
Expand All @@ -175,9 +182,9 @@ function_variables:
lines_point:
.all:
- .ref: point_marker
- .rgx: '[\ \t]+'
- .ref: blanks
- .ref: point_name
- .rgx: '[\ \t]*\r?\n'
- .ref: blank_line
- .ref: point_lines
number:
.rgx: ([0-9]+)
Expand All @@ -186,7 +193,7 @@ number_object:
phrase_point:
.all:
- .ref: point_marker
- .rgx: '[\ \t]+'
- .ref: blanks
- .ref: point_name
- .rgx: :[\ \t]
- .ref: point_phrase
Expand Down

0 comments on commit fabf8a5

Please sign in to comment.