aboutsummaryrefslogtreecommitdiff
path: root/testlabel.lua
diff options
context:
space:
mode:
authorSergio Medeiros <sqmedeiros@gmail.com>2015-03-23 14:13:25 -0300
committerSergio Medeiros <sqmedeiros@gmail.com>2015-03-23 14:13:25 -0300
commit0e93d536ba2d312502737cce2ab0cc21393c4842 (patch)
tree7de1e3ae967c90a43e7086ccef61d1722881b20c /testlabel.lua
parenta5a4b257e626847be3be4878c603adb51cbb420f (diff)
downloadlpeglabel-0e93d536ba2d312502737cce2ab0cc21393c4842.tar.gz
lpeglabel-0e93d536ba2d312502737cce2ab0cc21393c4842.tar.bz2
lpeglabel-0e93d536ba2d312502737cce2ab0cc21393c4842.zip
Updating to lpeg 0.12.2
Diffstat (limited to 'testlabel.lua')
-rw-r--r--testlabel.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/testlabel.lua b/testlabel.lua
index ea18bf5..98d8f6c 100644
--- a/testlabel.lua
+++ b/testlabel.lua
@@ -279,7 +279,7 @@ local terror = { ['cmdSeq'] = "Missing ';' in CmdSeq",
279 ['factor'] = "Error matching 'Factor'", 279 ['factor'] = "Error matching 'Factor'",
280 ['openParExp'] = "Error matching expression after '('", 280 ['openParExp'] = "Error matching expression after '('",
281 ['closePar'] = "Error matching ')'", 281 ['closePar'] = "Error matching ')'",
282 ['undefined'] = "Error undefined'"} 282 ['undefined'] = "Undefined Error"}
283 283
284g = re.compile([[ 284g = re.compile([[
285 Tiny <- CmdSeq /{1} '' -> cmdSeq /{2} '' -> ifExp /{3} '' -> ifThen /{4} '' -> ifThenCmdSeq 285 Tiny <- CmdSeq /{1} '' -> cmdSeq /{2} '' -> ifExp /{3} '' -> ifThen /{4} '' -> ifThenCmdSeq
@@ -292,7 +292,7 @@ g = re.compile([[
292 Cmd <- IfCmd / RepeatCmd / ReadCmd / WriteCmd / AssignCmd 292 Cmd <- IfCmd / RepeatCmd / ReadCmd / WriteCmd / AssignCmd
293 IfCmd <- IF (Exp / %{2}) (THEN / %{3}) (CmdSeq / %{4}) (ELSE (CmdSeq / %{5}) / '') (END / %{6}) 293 IfCmd <- IF (Exp / %{2}) (THEN / %{3}) (CmdSeq / %{4}) (ELSE (CmdSeq / %{5}) / '') (END / %{6})
294 RepeatCmd <- REPEAT (CmdSeq / %{7}) (UNTIL / %{8}) (Exp / %{9}) 294 RepeatCmd <- REPEAT (CmdSeq / %{7}) (UNTIL / %{8}) (Exp / %{9})
295 AssignCmd <- !RESERVED NAME (ASSIGNMENT / %{10}) (Exp / %{11}) 295 AssignCmd <- NAME (ASSIGNMENT / %{10}) (Exp / %{11})
296 ReadCmd <- READ (NAME / %{12}) 296 ReadCmd <- READ (NAME / %{12})
297 WriteCmd <- WRITE (Exp / %{13}) 297 WriteCmd <- WRITE (Exp / %{13})
298 Exp <- SimpleExp ((LESS / EQUAL) (SimpleExp / %{14}) / '') 298 Exp <- SimpleExp ((LESS / EQUAL) (SimpleExp / %{14}) / '')
@@ -309,7 +309,7 @@ g = re.compile([[
309 EQUAL <- Sp '=' 309 EQUAL <- Sp '='
310 LESS <- Sp '<' 310 LESS <- Sp '<'
311 MUL <- Sp '*' 311 MUL <- Sp '*'
312 NAME <- Sp [a-z]+ 312 NAME <- !RESERVED Sp [a-z]+
313 NUMBER <- Sp [0-9]+ 313 NUMBER <- Sp [0-9]+
314 OPENPAR <- Sp '(' 314 OPENPAR <- Sp '('
315 READ <- Sp 'read' 315 READ <- Sp 'read'
@@ -319,7 +319,7 @@ g = re.compile([[
319 THEN <- Sp 'then' 319 THEN <- Sp 'then'
320 UNTIL <- Sp 'until' 320 UNTIL <- Sp 'until'
321 WRITE <- Sp 'write' 321 WRITE <- Sp 'write'
322 RESERVED <- IF / ELSE / END / READ / REPEAT / THEN / UNTIL / WRITE 322 RESERVED <- (IF / ELSE / END / READ / REPEAT / THEN / UNTIL / WRITE) ![a-z]+
323 Sp <- (%s / %nl)* 323 Sp <- (%s / %nl)*
324]], terror) 324]], terror)
325 325