aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2016-08-14 17:42:07 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2016-08-14 18:20:05 +0200
commitdc5026c333049c76f80f38db58e09438c094ce3e (patch)
tree02e6de854acc4f63c4b66684ff9d68fa43024a17
parenta06167b963f39019112d7aa68dedcf2a1f30aed8 (diff)
downloadCompiler-dc5026c333049c76f80f38db58e09438c094ce3e.zip
Compiler-dc5026c333049c76f80f38db58e09438c094ce3e.tar.gz
Compiler-dc5026c333049c76f80f38db58e09438c094ce3e.tar.bz2
Llk: PP parser only accepts horizontal spaces…
… for line instructions.
-rw-r--r--Llk/Llk.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Llk/Llk.php b/Llk/Llk.php
index 97d3318..d8684e1 100644
--- a/Llk/Llk.php
+++ b/Llk/Llk.php
@@ -331,7 +331,7 @@ abstract class Llk
}
if ('%' == $line[0]) {
- if (0 !== preg_match('#^%pragma\s+([^\s]+)\s+(.*)$#u', $line, $matches)) {
+ if (0 !== preg_match('#^%pragma\h+([^\h]+)\h+(.*)$#u', $line, $matches)) {
switch ($matches[2]) {
case 'true':
$pragmaValue = true;
@@ -352,7 +352,7 @@ abstract class Llk
}
$pragmas[$matches[1]] = $pragmaValue;
- } elseif (0 !== preg_match('#^%skip\s+(?:([^:]+):)?([^\s]+)\s+(.*)$#u', $line, $matches)) {
+ } elseif (0 !== preg_match('#^%skip\h+(?:([^:]+):)?([^\h]+)\h+(.*)$#u', $line, $matches)) {
if (empty($matches[1])) {
$matches[1] = 'default';
}
@@ -370,7 +370,7 @@ abstract class Llk
$matches[3] .
')';
}
- } elseif (0 !== preg_match('#^%token\s+(?:([^:]+):)?([^\s]+)\s+(.*?)(?:\s+->\s+(.*))?$#u', $line, $matches)) {
+ } elseif (0 !== preg_match('#^%token\h+(?:([^:]+):)?([^\h]+)\h+(.*?)(?:\h+->\h+(.*))?$#u', $line, $matches)) {
if (empty($matches[1])) {
$matches[1] = 'default';
}