regular-grammar
Advanced tools
Comparing version 0.1.4 to 0.1.5-b
{ | ||
"name": "regular-grammar", | ||
"version": "0.1.4", | ||
"version": "0.1.5b", | ||
"description": "A simple regular grammar/parser generator", | ||
@@ -5,0 +5,0 @@ "author": "Victor Grishchenko <victor.grishchenko@gmail.com>", |
@@ -182,3 +182,3 @@ /** The class generates regex _parsers for simple regular languages | ||
const m = parser.exec(text); | ||
if (!m) { throw new Error('grammar violation'); } | ||
if (!m) { return null; } | ||
for (let i = 0; i < triplets.length; i++) { | ||
@@ -212,5 +212,7 @@ const triplet = triplets[i]; | ||
function sterilize (pattern) { | ||
return pattern.replace(/\((\?:)?/g, '(?:'); | ||
// FIXME build sterilized, retire this hack | ||
return pattern.replace(/\((\?:)?/g, '(?:'). | ||
replace(/\\\(\?:/g, '\\('); | ||
} | ||
module.exports = Grammar; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52500
475
1