Changeset View
Changeset View
Standalone View
Standalone View
externals/jsonlint/src/Seld/JsonLint/Lexer.php
Show All 14 Lines | |||||
* Ported from https://github.com/zaach/jsonlint | * Ported from https://github.com/zaach/jsonlint | ||||
*/ | */ | ||||
class JsonLintLexer | class JsonLintLexer | ||||
{ | { | ||||
private $EOF = 1; | private $EOF = 1; | ||||
private $rules = array( | private $rules = array( | ||||
0 => '/^\s+/', | 0 => '/^\s+/', | ||||
1 => '/^-?([0-9]|[1-9][0-9]+)(\.[0-9]+)?([eE][+-]?[0-9]+)?\b/', | 1 => '/^-?([0-9]|[1-9][0-9]+)(\.[0-9]+)?([eE][+-]?[0-9]+)?\b/', | ||||
2 => '{^"(\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^\0-\x09\x0a-\x1f\\\\"])*"}', | 2 => '{^"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^\0-\x09\x0a-\x1f\\\\"]+)*"}', | ||||
3 => '/^\{/', | 3 => '/^\{/', | ||||
4 => '/^\}/', | 4 => '/^\}/', | ||||
5 => '/^\[/', | 5 => '/^\[/', | ||||
6 => '/^\]/', | 6 => '/^\]/', | ||||
7 => '/^,/', | 7 => '/^,/', | ||||
8 => '/^:/', | 8 => '/^:/', | ||||
9 => '/^true\b/', | 9 => '/^true\b/', | ||||
10 => '/^false\b/', | 10 => '/^false\b/', | ||||
▲ Show 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | private function performAction($avoiding_name_collisions, $YY_START) | ||||
return 8; | return 8; | ||||
case 12: | case 12: | ||||
return 14; | return 14; | ||||
case 13: | case 13: | ||||
return 'INVALID'; | return 'INVALID'; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |