diff --git a/lib/dsl/exemple.jh b/lib/dsl/exemple.jh index f37dbfd..dd1fc01 100644 --- a/lib/dsl/exemple.jh +++ b/lib/dsl/exemple.jh @@ -1,5 +1,5 @@ -sentity Departement{ - departementName String +entity Department{ + departmentName String } entity JobHistory{ @@ -21,7 +21,7 @@ entity Employee{ phoneNumber String, hireDAte DateTime, salary Long, - comissionPct Long + commissionPct Long } entity Location { @@ -42,7 +42,7 @@ entity Country{ relationship OneToMany{ - Departement{employee} to Employee{departement} + Department{employee} to Employee{departement} } relationship OneToMany{ @@ -66,5 +66,5 @@ relationship ManyToMany{ } relationship OneToOne{ - Departement{location} to Location{department} + Department{location} to Location{department} } \ No newline at end of file diff --git a/lib/dsl/grammar.txt b/lib/dsl/grammar.txt index be1bbc9..4fe03da 100644 --- a/lib/dsl/grammar.txt +++ b/lib/dsl/grammar.txt @@ -1,8 +1,8 @@ /* * - * This the grammar we used to generate the parser jhGrammar.js - * We use the online tool http://pegjs.org/online to generate the parser - * Modifying this file wont affect the program, this just to have a more readable grammar. + * This the grammar we use to generate the parser jhGrammar.js. + * We use the online tool http://pegjs.org/online to generate the parser. + * Modifying this file won't affect the program, this is just to have a more readable grammar. */ { @@ -89,7 +89,7 @@ ENUMNAME "an enum name" = head:[A-Z]tail:[a-zA-Z0-9]* {return makeString(concat([head],tail));} ENUMPROP "an enum property" - = word:[A-Z0-9]+ {return makeString(word);} + = underscore:[_]*head:[A-Z0-9]tail:[A-Z0-9_]* {return makeString(concat(concat(underscore,[head]), tail));} INTEGER "integer" = int:[0-9]+ {return parseInt(int.join(""), 10);} diff --git a/lib/dsl/jhGrammar.js b/lib/dsl/jhGrammar.js index 2fdd5d8..5e8e0ef 100644 --- a/lib/dsl/jhGrammar.js +++ b/lib/dsl/jhGrammar.js @@ -27,121 +27,126 @@ module.exports = (function() { function parse(input) { var options = arguments.length > 1 ? arguments[1] : {}, - peg$FAILED = {}, - - peg$startRuleFunctions = { start: peg$parsestart }, - peg$startRuleFunction = peg$parsestart, - - peg$c0 = function(p) {return p;}, - peg$c1 = peg$FAILED, - peg$c2 = [], - peg$c3 = function(ed, p) {return {"entities" : concat([ed],p.entities) , "relationships" : p.relationships, "enums" : p.enums};}, - peg$c4 = function(rd, p) {return {"entities" : p.entities, "relationships" : concat([rd],p.relationships), "enums" : p.enums};}, - peg$c5 = function(end, p) {return {"entities" : p.entities, "relationships" : p.relationships, "enums": concat([end], p.enums)};}, - peg$c6 = function() {return {"entities" : [],"relationships": [], "enums": []};}, - peg$c7 = "entity", - peg$c8 = { type: "literal", value: "entity", description: "\"entity\"" }, - peg$c9 = function(e, eb) {return {"name" : e, "body":eb};}, - peg$c10 = "{", - peg$c11 = { type: "literal", value: "{", description: "\"{\"" }, - peg$c12 = "}", - peg$c13 = { type: "literal", value: "}", description: "\"}\"" }, - peg$c14 = function(fdl) {return fdl;}, - peg$c15 = function() {return {};}, - peg$c16 = ",", - peg$c17 = { type: "literal", value: ",", description: "\",\"" }, - peg$c18 = function(f, t, vl, fdl) {return concat([{"name" : f, "type" : t, "validations" : vl}], fdl );}, - peg$c19 = function(f, t, vl) {return [{"name" : f, "type" : t, "validations" : vl}];}, - peg$c20 = function() {return [];}, - peg$c21 = function(v, vl) {return concat([v], vl);}, - peg$c22 = "relationship", - peg$c23 = { type: "literal", value: "relationship", description: "\"relationship\"" }, - peg$c24 = function(rt, rb) {rb.cardinality = rt; return rb;}, - peg$c25 = "to", - peg$c26 = { type: "literal", value: "to", description: "\"to\"" }, - peg$c27 = function(from, to) {return {"from" : from , "to" : to};}, - peg$c28 = function(e, i) {return {"name" :e, "injectedfield" : i};}, - peg$c29 = function(e) {return {"name" :e, "injectedfield" : ""};}, - peg$c30 = "enum", - peg$c31 = { type: "literal", value: "enum", description: "\"enum\"" }, - peg$c32 = function(e, el) {return {"name":e, "values" : el };}, - peg$c33 = function(e, el) {return concat([e],el);}, - peg$c34 = function(e) {return [e];}, - peg$c35 = "OneToOne", - peg$c36 = { type: "literal", value: "OneToOne", description: "\"OneToOne\"" }, - peg$c37 = function() {return "one-to-one";}, - peg$c38 = "OneToMany", - peg$c39 = { type: "literal", value: "OneToMany", description: "\"OneToMany\"" }, - peg$c40 = function() {return "one-to-many";}, - peg$c41 = "ManyToOne", - peg$c42 = { type: "literal", value: "ManyToOne", description: "\"ManyToOne\"" }, - peg$c43 = function() {return "many-to-one";}, - peg$c44 = "ManyToMany", - peg$c45 = { type: "literal", value: "ManyToMany", description: "\"ManyToMany\"" }, - peg$c46 = function() {return "many-to-many";}, - peg$c47 = { type: "other", description: "a type" }, - peg$c48 = /^[A-Z]/, - peg$c49 = { type: "class", value: "[A-Z]", description: "[A-Z]" }, - peg$c50 = /^[a-zA-Z0-9]/, - peg$c51 = { type: "class", value: "[a-zA-Z0-9]", description: "[a-zA-Z0-9]" }, - peg$c52 = function(head, tail) {return makeString(concat([head],tail));}, - peg$c53 = "required", - peg$c54 = { type: "literal", value: "required", description: "\"required\"" }, - peg$c55 = function() {return {key:'required', value:''};}, - peg$c56 = "minlength", - peg$c57 = { type: "literal", value: "minlength", description: "\"minlength\"" }, - peg$c58 = "(", - peg$c59 = { type: "literal", value: "(", description: "\"(\"" }, - peg$c60 = ")", - peg$c61 = { type: "literal", value: ")", description: "\")\"" }, - peg$c62 = function(int) {return {key:'minlength', value:int};}, - peg$c63 = "maxlength", - peg$c64 = { type: "literal", value: "maxlength", description: "\"maxlength\"" }, - peg$c65 = function(int) {return {key:'maxlength', value:int};}, - peg$c66 = "max", - peg$c67 = { type: "literal", value: "max", description: "\"max\"" }, - peg$c68 = function(int) {return {key:'max', value:int};}, - peg$c69 = "min", - peg$c70 = { type: "literal", value: "min", description: "\"min\"" }, - peg$c71 = function(int) {return {key:'min', value:int};}, - peg$c72 = "pattern", - peg$c73 = { type: "literal", value: "pattern", description: "\"pattern\"" }, - peg$c74 = function(regexp) {return {key:'pattern' , value:regexp};}, - peg$c75 = { type: "other", description: "apostrophe" }, - peg$c76 = /^["|']/, - peg$c77 = { type: "class", value: "[\"|']", description: "[\"|']" }, - peg$c78 = { type: "other", description: "a regular expression" }, - peg$c79 = /^[a-zA-Z0-9!@#$%\^&*()_+\-=[\]{};':\\|,.<>\/? ]/, - peg$c80 = { type: "class", value: "[a-zA-Z0-9!@#$%\\^&*()_+\\-=[\\]{};':\\\\|,.<>\\/? ]", description: "[a-zA-Z0-9!@#$%\\^&*()_+\\-=[\\]{};':\\\\|,.<>\\/? ]" }, - peg$c81 = function(word) {return makeString(word);}, - peg$c82 = { type: "other", description: "an enum name" }, - peg$c83 = { type: "other", description: "an enum property" }, - peg$c84 = /^[A-Z0-9]/, - peg$c85 = { type: "class", value: "[A-Z0-9]", description: "[A-Z0-9]" }, - peg$c86 = { type: "other", description: "integer" }, - peg$c87 = /^[0-9]/, - peg$c88 = { type: "class", value: "[0-9]", description: "[0-9]" }, - peg$c89 = function(int) {return parseInt(int.join(""), 10);}, - peg$c90 = { type: "other", description: "an injected field" }, - peg$c91 = /^[a-zA-Z]/, - peg$c92 = { type: "class", value: "[a-zA-Z]", description: "[a-zA-Z]" }, - peg$c93 = /^[a-zA-Z0-9()]/, - peg$c94 = { type: "class", value: "[a-zA-Z0-9()]", description: "[a-zA-Z0-9()]" }, - peg$c95 = { type: "other", description: "an entity name" }, - peg$c96 = { type: "other", description: "a field name" }, - peg$c97 = { type: "other", description: "a space" }, - peg$c98 = /^['\n'|'\t'|'\r'|' ']/, - peg$c99 = { type: "class", value: "['\\n'|'\\t'|'\\r'|' ']", description: "['\\n'|'\\t'|'\\r'|' ']" }, - - peg$currPos = 0, - peg$reportedPos = 0, - peg$cachedPos = 0, - peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, - peg$maxFailPos = 0, - peg$maxFailExpected = [], - peg$silentFails = 0, - - peg$result; + peg$FAILED = {}, + + peg$startRuleFunctions = { start: peg$parsestart }, + peg$startRuleFunction = peg$parsestart, + + peg$c0 = function(p) {return p;}, + peg$c1 = peg$FAILED, + peg$c2 = [], + peg$c3 = function(ed, p) {return {"entities" : concat([ed],p.entities) , "relationships" : p.relationships, "enums" : p.enums};}, + peg$c4 = function(rd, p) {return {"entities" : p.entities, "relationships" : concat([rd],p.relationships), "enums" : p.enums};}, + peg$c5 = function(end, p) {return {"entities" : p.entities, "relationships" : p.relationships, "enums": concat([end], p.enums)};}, + peg$c6 = function() {return {"entities" : [],"relationships": [], "enums": []};}, + peg$c7 = "entity", + peg$c8 = { type: "literal", value: "entity", description: "\"entity\"" }, + peg$c9 = function(e, eb) {return {"name" : e, "body":eb};}, + peg$c10 = "{", + peg$c11 = { type: "literal", value: "{", description: "\"{\"" }, + peg$c12 = "}", + peg$c13 = { type: "literal", value: "}", description: "\"}\"" }, + peg$c14 = function(fdl) {return fdl;}, + peg$c15 = function() {return {};}, + peg$c16 = ",", + peg$c17 = { type: "literal", value: ",", description: "\",\"" }, + peg$c18 = function(f, t, vl, fdl) {return concat([{"name" : f, "type" : t, "validations" : vl}], fdl );}, + peg$c19 = function(f, t, vl) {return [{"name" : f, "type" : t, "validations" : vl}];}, + peg$c20 = function() {return [];}, + peg$c21 = function(v, vl) {return concat([v], vl);}, + peg$c22 = "relationship", + peg$c23 = { type: "literal", value: "relationship", description: "\"relationship\"" }, + peg$c24 = function(rt, rb) {rb.cardinality = rt; return rb;}, + peg$c25 = "to", + peg$c26 = { type: "literal", value: "to", description: "\"to\"" }, + peg$c27 = function(from, to) {return {"from" : from , "to" : to};}, + peg$c28 = function(e, i) {return {"name" :e, "injectedfield" : i};}, + peg$c29 = function(e) {return {"name" :e, "injectedfield" : ""};}, + peg$c30 = "enum", + peg$c31 = { type: "literal", value: "enum", description: "\"enum\"" }, + peg$c32 = function(e, el) {return {"name":e, "values" : el };}, + peg$c33 = function(e, el) {return concat([e],el);}, + peg$c34 = function(e) {return [e];}, + peg$c35 = "OneToOne", + peg$c36 = { type: "literal", value: "OneToOne", description: "\"OneToOne\"" }, + peg$c37 = function() {return "one-to-one";}, + peg$c38 = "OneToMany", + peg$c39 = { type: "literal", value: "OneToMany", description: "\"OneToMany\"" }, + peg$c40 = function() {return "one-to-many";}, + peg$c41 = "ManyToOne", + peg$c42 = { type: "literal", value: "ManyToOne", description: "\"ManyToOne\"" }, + peg$c43 = function() {return "many-to-one";}, + peg$c44 = "ManyToMany", + peg$c45 = { type: "literal", value: "ManyToMany", description: "\"ManyToMany\"" }, + peg$c46 = function() {return "many-to-many";}, + peg$c47 = { type: "other", description: "a type" }, + peg$c48 = /^[A-Z]/, + peg$c49 = { type: "class", value: "[A-Z]", description: "[A-Z]" }, + peg$c50 = /^[a-zA-Z0-9]/, + peg$c51 = { type: "class", value: "[a-zA-Z0-9]", description: "[a-zA-Z0-9]" }, + peg$c52 = function(head, tail) {return makeString(concat([head],tail));}, + peg$c53 = "required", + peg$c54 = { type: "literal", value: "required", description: "\"required\"" }, + peg$c55 = function() {return {key:'required', value:''};}, + peg$c56 = "minlength", + peg$c57 = { type: "literal", value: "minlength", description: "\"minlength\"" }, + peg$c58 = "(", + peg$c59 = { type: "literal", value: "(", description: "\"(\"" }, + peg$c60 = ")", + peg$c61 = { type: "literal", value: ")", description: "\")\"" }, + peg$c62 = function(int) {return {key:'minlength', value:int};}, + peg$c63 = "maxlength", + peg$c64 = { type: "literal", value: "maxlength", description: "\"maxlength\"" }, + peg$c65 = function(int) {return {key:'maxlength', value:int};}, + peg$c66 = "max", + peg$c67 = { type: "literal", value: "max", description: "\"max\"" }, + peg$c68 = function(int) {return {key:'max', value:int};}, + peg$c69 = "min", + peg$c70 = { type: "literal", value: "min", description: "\"min\"" }, + peg$c71 = function(int) {return {key:'min', value:int};}, + peg$c72 = "pattern", + peg$c73 = { type: "literal", value: "pattern", description: "\"pattern\"" }, + peg$c74 = function(regexp) {return {key:'pattern' , value:regexp};}, + peg$c75 = { type: "other", description: "apostrophe" }, + peg$c76 = /^["|']/, + peg$c77 = { type: "class", value: "[\"|']", description: "[\"|']" }, + peg$c78 = { type: "other", description: "a regular expression" }, + peg$c79 = /^[a-zA-Z0-9!@#$%\^&*()_+\-=[\]{};':\\|,.<>\/? ]/, + peg$c80 = { type: "class", value: "[a-zA-Z0-9!@#$%\\^&*()_+\\-=[\\]{};':\\\\|,.<>\\/? ]", description: "[a-zA-Z0-9!@#$%\\^&*()_+\\-=[\\]{};':\\\\|,.<>\\/? ]" }, + peg$c81 = function(word) {return makeString(word);}, + peg$c82 = { type: "other", description: "an enum name" }, + peg$c83 = { type: "other", description: "an enum property" }, + peg$c84 = /^[_]/, + peg$c85 = { type: "class", value: "[_]", description: "[_]" }, + peg$c86 = /^[A-Z0-9]/, + peg$c87 = { type: "class", value: "[A-Z0-9]", description: "[A-Z0-9]" }, + peg$c88 = /^[A-Z0-9_]/, + peg$c89 = { type: "class", value: "[A-Z0-9_]", description: "[A-Z0-9_]" }, + peg$c90 = function(underscore, head, tail) {return makeString(concat(concat(underscore,[head]), tail));}, + peg$c91 = { type: "other", description: "integer" }, + peg$c92 = /^[0-9]/, + peg$c93 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c94 = function(int) {return parseInt(int.join(""), 10);}, + peg$c95 = { type: "other", description: "an injected field" }, + peg$c96 = /^[a-zA-Z]/, + peg$c97 = { type: "class", value: "[a-zA-Z]", description: "[a-zA-Z]" }, + peg$c98 = /^[a-zA-Z0-9()]/, + peg$c99 = { type: "class", value: "[a-zA-Z0-9()]", description: "[a-zA-Z0-9()]" }, + peg$c100 = { type: "other", description: "an entity name" }, + peg$c101 = { type: "other", description: "a field name" }, + peg$c102 = { type: "other", description: "a space" }, + peg$c103 = /^['\n'|'\t'|'\r'|' ']/, + peg$c104 = { type: "class", value: "['\\n'|'\\t'|'\\r'|' ']", description: "['\\n'|'\\t'|'\\r'|' ']" }, + + peg$currPos = 0, + peg$reportedPos = 0, + peg$cachedPos = 0, + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + + peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { @@ -265,7 +270,7 @@ module.exports = (function() { } var expectedDescs = new Array(expected.length), - expectedDesc, foundDesc, i; + expectedDesc, foundDesc, i; for (i = 0; i < expected.length; i++) { expectedDescs[i] = expected[i].description; @@ -273,8 +278,8 @@ module.exports = (function() { expectedDesc = expected.length > 1 ? expectedDescs.slice(0, -1).join(", ") - + " or " - + expectedDescs[expected.length - 1] + + " or " + + expectedDescs[expected.length - 1] : expectedDescs[0]; foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; @@ -283,7 +288,7 @@ module.exports = (function() { } var posDetails = peg$computePosDetails(pos), - found = pos < input.length ? input.charAt(pos) : null; + found = pos < input.length ? input.charAt(pos) : null; if (expected !== null) { cleanupExpected(expected); @@ -1820,7 +1825,7 @@ module.exports = (function() { } function peg$parseENUMPROP() { - var s0, s1, s2; + var s0, s1, s2, s3, s4; peg$silentFails++; s0 = peg$currPos; @@ -1832,25 +1837,59 @@ module.exports = (function() { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c85); } } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c84.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c84.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c85); } + } + } + if (s1 !== peg$FAILED) { + if (peg$c86.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c87); } + } + if (s2 !== peg$FAILED) { + s3 = []; + if (peg$c88.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); peg$currPos++; } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c85); } + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c89); } + } + while (s4 !== peg$FAILED) { + s3.push(s4); + if (peg$c88.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c89); } + } + } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c90(s1, s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c1; } + } else { + peg$currPos = s0; + s0 = peg$c1; } } else { - s1 = peg$c1; - } - if (s1 !== peg$FAILED) { - peg$reportedPos = s0; - s1 = peg$c81(s1); + peg$currPos = s0; + s0 = peg$c1; } - s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; @@ -1866,22 +1905,22 @@ module.exports = (function() { peg$silentFails++; s0 = peg$currPos; s1 = []; - if (peg$c87.test(input.charAt(peg$currPos))) { + if (peg$c92.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c88); } + if (peg$silentFails === 0) { peg$fail(peg$c93); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); - if (peg$c87.test(input.charAt(peg$currPos))) { + if (peg$c92.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c88); } + if (peg$silentFails === 0) { peg$fail(peg$c93); } } } } else { @@ -1889,13 +1928,13 @@ module.exports = (function() { } if (s1 !== peg$FAILED) { peg$reportedPos = s0; - s1 = peg$c89(s1); + s1 = peg$c94(s1); } s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } + if (peg$silentFails === 0) { peg$fail(peg$c91); } } return s0; @@ -1906,30 +1945,30 @@ module.exports = (function() { peg$silentFails++; s0 = peg$currPos; - if (peg$c91.test(input.charAt(peg$currPos))) { + if (peg$c96.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c92); } + if (peg$silentFails === 0) { peg$fail(peg$c97); } } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c93.test(input.charAt(peg$currPos))) { + if (peg$c98.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c94); } + if (peg$silentFails === 0) { peg$fail(peg$c99); } } while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c93.test(input.charAt(peg$currPos))) { + if (peg$c98.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c94); } + if (peg$silentFails === 0) { peg$fail(peg$c99); } } } if (s2 !== peg$FAILED) { @@ -1947,7 +1986,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c90); } + if (peg$silentFails === 0) { peg$fail(peg$c95); } } return s0; @@ -1999,7 +2038,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c95); } + if (peg$silentFails === 0) { peg$fail(peg$c100); } } return s0; @@ -2010,12 +2049,12 @@ module.exports = (function() { peg$silentFails++; s0 = peg$currPos; - if (peg$c91.test(input.charAt(peg$currPos))) { + if (peg$c96.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c92); } + if (peg$silentFails === 0) { peg$fail(peg$c97); } } if (s1 !== peg$FAILED) { s2 = []; @@ -2051,7 +2090,7 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c96); } + if (peg$silentFails === 0) { peg$fail(peg$c101); } } return s0; @@ -2062,22 +2101,22 @@ module.exports = (function() { peg$silentFails++; s0 = []; - if (peg$c98.test(input.charAt(peg$currPos))) { + if (peg$c103.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c99); } + if (peg$silentFails === 0) { peg$fail(peg$c104); } } if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); - if (peg$c98.test(input.charAt(peg$currPos))) { + if (peg$c103.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c99); } + if (peg$silentFails === 0) { peg$fail(peg$c104); } } } } else { @@ -2086,21 +2125,21 @@ module.exports = (function() { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c97); } + if (peg$silentFails === 0) { peg$fail(peg$c102); } } return s0; } - function concat(aray1, aray2){ - Array.prototype.push.apply(aray1, aray2); - return aray1; - } + function concat(aray1, aray2){ + Array.prototype.push.apply(aray1, aray2); + return aray1; + } - function makeString(o) { - return o.join(""); - } + function makeString(o) { + return o.join(""); + } peg$result = peg$startRuleFunction();