This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"objects":{"id76q4bmj0blvfhe0":{"editingElement":{"__ref":"id7cwk5ej0bmw03v1u8"},"selectedParticularElement":null,"createPanelElements":[{"__ref":"Rectangle"},{"__ref":"Circle"},{"__ref":"Text"},{"__ref":"Image"},{"__ref":"idikabraj0blvfhe1"},{"__ref":"iddguqtej0bm17osdh"},{"__ref":"id23c44rj0bmdxmau0"},{"__ref":"idcbtfhxj0bmgqpg122"},{"__ref":"id0jctv6j0bmhhqg19r"},{"__ref":"id7cwk5ej0bmw03v1u8"},{"__ref":"iduy6mu2j0bofh8e77"},{"__ref":"idnma7i7j0bsiada86"}],"id":"id76q4bmj0blvfhe0","__proto":{"__ref":"Project"}},"id7cwk5ej0bmw03v1u8":{"_master":{"__ref":"Group"},"_head":{"__ref":"id7cwk5ej0bmw03v1u8"},"_variants":[{"__ref":"idskxudlj0bsihcz94"}],"_parent":null,"_children":[{"__ref":"idli3je4j0bmw05t1uf"},{"__ref":"id13ea62j0bmw05q1u9"},{"__ref":"idki6iwcj0bmw05r1uc"},{"__ref":"idcjkgjyj0bmwd2o1v6"},{"__ref":"id1ze4mzj0bmwht21v7"},{"__ref":"idejv7w8j0bmy9de1w3"},{"__ref":"idp0aacpj0bmyw5f1x8"},{"__ref":"id018i3ij0bn27kp1yv"},{"__ref":"ids49flwj0bncpo722d"},{"__ref":"idq0jznbj0bne4py2ns"},{"__ref":"idsw1e57j |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Star = \* | |
| Text = .+ | |
| Grammar = Star Star (Star Text Star)* Text Star Star | |
| | Star (Star Star Text Star Star)* Text Star |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const here = between( | |
| zeroOrMore(not(string('<here>'))), | |
| between( | |
| string('<here>'), | |
| zeroOrMore(not(string('</here>'))), | |
| string('</here>') | |
| ), | |
| always() | |
| ) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const here = between( | |
| zeroOrMore(not(string('<here>'))), | |
| between( | |
| string('<here>'), | |
| zeroOrMore(not(string('</here>'))), | |
| string('</here>') | |
| ), | |
| always() | |
| ) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const between = (l, p, r) => sequence([l, p, r]).map(v => v[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const not = parser => | |
| new Parser(stream => | |
| parser.run(stream) | |
| .fold( | |
| (value, s) => new Failure('not failed', stream), | |
| (value, s) => | |
| stream.length > 0 | |
| ? new Success(stream.head(), stream.move(1)) | |
| : new Failure('unexpected end', stream))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const string = str => sequence(str.split('').map(char)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const zeroOrMore = parser => | |
| new Parser(stream => | |
| parser.run(stream) | |
| .fold( | |
| (value, s) => zeroOrMore(parser).map(rest => [value].concat(rest)).run(s), | |
| (value, s) => new Success([], stream))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const lookahead = parser => | |
| new Parser(stream => | |
| parser.run(stream) | |
| .fold( | |
| (v) => new Success(v, stream), | |
| (v) => new Failure(v, stream))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const maybe = parser => | |
| new Parser(stream => | |
| parser.run(stream) | |
| .fold( | |
| (v, s) => new Success(v, s), | |
| (v, s) => new Success(null, stream))) |