{"_id":"@atlassianlabs/jql-parser","_rev":"8-d7dd17a2223977e05d0ca262370565ae","name":"@atlassianlabs/jql-parser","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"@atlassianlabs/jql-parser","version":"0.0.1","keywords":["jql","antlr4","grammar","jira"],"author":{"name":"Atlassian"},"license":"Apache-2.0","_id":"@atlassianlabs/jql-parser@0.0.1","maintainers":[{"name":"doklovic","email":"doklovic@atlassian.com"},{"name":"prkb","email":"pramodkb@outlook.com"},{"name":"crumley","email":"crumley@gmail.com"},{"name":"nrundquist","email":"nrundquist@atlassian.com"},{"name":"dkolbly-atlassian","email":"dkolbly@atlassian.com"},{"name":"kpainter-atl","email":"kpainter@atlassian.com"},{"name":"soneymathew","email":"soney.mathew@gmail.com"}],"homepage":"https://bitbucket.org/atlassian/jql-grammar#readme","dist":{"shasum":"529bb5b05062f8e1953885e97b5b2de7a0804098","tarball":"https://registry.npmjs.org/@atlassianlabs/jql-parser/-/jql-parser-0.0.1.tgz","fileCount":38,"integrity":"sha512-ukuR58r6jNUSUiQ3F0rypVHPeYSwuLaLtjOcopWP8tRIPg65vLbTPbg3v1YSsKarx56m175UKJoN6y3QcZA+9A==","signatures":[{"sig":"MEQCIBcQqoO3iFlgOiwET4GmssSouRlnKzC2EFbbjeLNh2ibAiAjSepeS3zJDQ+dLbhtl/cEhDm8WYqyCBLKzJcrfjaBCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":930298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsqZzCRA9TVsSAnZWagAAmv0QAJT5ijDw9MlRBVVjd8qC\neSPCcX+Wt6CBRozewX/TH1CRW55hqSg60BL3O8DoQ9/6uveVJCWUI1RIecBF\nIM1tAqBpLY1RPBxy4NKPVr/PgCqGr5tycW6W/LoiFvrqCYskTqcDisNsXe7e\n6TbSffQnM6hXfjw7vM2AsvIFdfCiAE5RAnt1+o2aqlZjdKlc0RcNcSA2vE0w\nc9UkWLwql+N4ndK2XQYjkL61lKhDpglhethfKIDXMhhhQSkSyjD+4BETR/YG\naSd/Jj4AMZRI4hAI/GrMwe1ChUb+19pMq4SPi1J2Xf7c7XAIcLbtimyx/leI\n7tkc1pQ/0RrJNuqV+1LTA17q013rwZsTLaxj/TAoqndI9bbQ+TnNXeaBRXs9\nQYs/1yDLR1F9fLDuF3Uz3QVbW+fdXNRz7H8sLduHRE73Dix9MZdwaZEePxWT\n6PkVz7mzqMPfFUv90CweHGObLf/VkMR1w8f1k2S8ZyAIiDXRZJAS00dPm3Wt\n0SWNHM3wcY8BVi0uF/AaEYjEFBDLCfnKp41gGS3q8+nfx5/YnTai3nihoosU\nbjzx4a9w5C1rcHBsBYBBeiKwk5iG/GEmIVJWzlADsoRnjveLNXTgT/ELqjIS\n7AUTnl21Ig4aB0hdFx8+ycyg6CNltgyDctSiGm4cimyGucW88BQvzyZLKRyV\nCzCa\r\n=HBwr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","engines":{"node":">=6.0.0"},"typings":"dist/types/index.d.ts","_npmUser":{"name":"kpainter-atl","email":"kpainter@atlassian.com"},"repository":{"url":"git+https://bitbucket.org/atlassian/jql-grammar.git","type":"git"},"_npmVersion":"6.14.15","description":"JQL lexer, parser, listener and visitor","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"antlr4ts":"^0.5.0-alpha.3","@babel/runtime":"^7.15.4"},"module:es2019":"dist/es2019/index.js","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jql-parser_0.0.1_1639097971584_0.3752021159885912","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@atlassianlabs/jql-parser","version":"1.0.0","keywords":["jql","antlr4","grammar","jira"],"author":{"name":"Atlassian"},"license":"Apache-2.0","_id":"@atlassianlabs/jql-parser@1.0.0","maintainers":[{"name":"doklovic","email":"doklovic@atlassian.com"},{"name":"prkb","email":"pramodkb@outlook.com"},{"name":"crumley","email":"crumley@gmail.com"},{"name":"nrundquist","email":"nrundquist@atlassian.com"},{"name":"dkolbly-atlassian","email":"dkolbly@atlassian.com"},{"name":"kpainter-atl","email":"kpainter@atlassian.com"},{"name":"soneymathew","email":"soney.mathew@gmail.com"}],"homepage":"https://bitbucket.org/atlassian/jql-grammar#readme","dist":{"shasum":"ad01244fbaf5dfa760ee8e634f161ca0acbfdc1c","tarball":"https://registry.npmjs.org/@atlassianlabs/jql-parser/-/jql-parser-1.0.0.tgz","fileCount":38,"integrity":"sha512-GYuGBIm8QH38MezChDN1xvBY2lG1ZRFRnS4K37oJgK4jpWtcFUrpfizDn6SrxaiPFP/bC93nhH8aSLkr5cv+Kg==","signatures":[{"sig":"MEQCIH6rIczg8wDsr3Z9ZSbXnt4hJjBYxHPBfp7HqQkbOqTzAiBZTI/Ob0WRqHI2lCia7uZyvmZ3QbbBA/yv36g92moh+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":930312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEvJpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVSA//dhwmVFUuHvkLKGtvLxLrwyiDuTaTAvnLxrCeKVLcxOm6YUxU\r\nYJYy6LJk16ruqhbZ9L3ewWjAJZzyY114SIeUP7dyIugaDJuhbN+7uxzw4vQe\r\nQ9v8N+RBSjhXr/UEWKAjTd2zvaQrJ6eUbdcKknHN0Q4mbY/B08uxb2wNOvbJ\r\nsyKSNQ7feRNK4efQK4Id3c4044hu36ZH80+k2AC4U5+MiUw39sl/WxXWUSgg\r\nXif0vZes0jJbq+W2kuVRrT1HIYqtqpIqOAdIA8uq+Rcq/ct+1EtxuID8WpoV\r\nedo/lYvRckPuHGL7o3ionTC43kvpT1T0BoG2XS+TU+nIobeTEGVCmKuE4bsF\r\nOfh1tzebcMgwAkHMGpLZTfAyM6Zhyy7Fi0K+/CwhQZ8X9EI1rKeih/z08soR\r\nJYer2Kf/rkhTpwDgyyjpanRhTU7m/4SlvI8eL+EZSX8NFwNQ1PM7QNC84ypN\r\nXmUnLYXFKtb5F6xkaZCbVdtYH7Lkiiq5xgsCJmHeMdm21UKEiyKc/Bz+KiFb\r\nHpk/IlI6S0m+bUjpjXh25/fAzUlcc4oYLOisyQfiENuIqhDJ5CXL7rU15JFt\r\nK3zc9FvgF6PDVReRThjvtlOm9A+KwF6wKdfr16REc7aVsxNctzAccyy0vmei\r\nIgE+vG0RaVpUNUksiMfw59PCJJE/aSXZMYk=\r\n=yHdK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","engines":{"node":">=6.0.0"},"typings":"dist/types/index.d.ts","_npmUser":{"name":"kpainter-atl","email":"kpainter@atlassian.com"},"repository":{"url":"git+https://bitbucket.org/atlassian/jql-grammar.git","type":"git"},"_npmVersion":"6.14.12","description":"JQL lexer, parser, listener and visitor","directories":{},"sideEffects":false,"_nodeVersion":"12.22.1","dependencies":{"antlr4ts":"^0.5.0-alpha.3","@babel/runtime":"^7.15.4"},"module:es2019":"dist/es2019/index.js","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jql-parser_1.0.0_1645408872854_0.1786362749704069","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@atlassianlabs/jql-parser","version":"1.0.1","keywords":["jql","antlr4","grammar","jira"],"author":{"name":"Atlassian"},"license":"Apache-2.0","_id":"@atlassianlabs/jql-parser@1.0.1","maintainers":[{"name":"doklovic","email":"doklovic@atlassian.com"},{"name":"prkb","email":"pramodkb@outlook.com"},{"name":"crumley","email":"crumley@gmail.com"},{"name":"nrundquist","email":"nrundquist@atlassian.com"},{"name":"dkolbly-atlassian","email":"dkolbly@atlassian.com"},{"name":"kpainter-atl","email":"kpainter@atlassian.com"},{"name":"soneymathew","email":"soney.mathew@gmail.com"}],"homepage":"https://bitbucket.org/atlassian/jql-grammar#readme","bugs":{"url":"https://bitbucket.org/atlassian/jql-grammar/issues"},"dist":{"shasum":"e2adf8ede3936e03a8afd7b8cb0ab0ede26f54cd","tarball":"https://registry.npmjs.org/@atlassianlabs/jql-parser/-/jql-parser-1.0.1.tgz","fileCount":38,"integrity":"sha512-TmAjaabVebGv7hcffcdFqgBNIoPhuQ8F/NbcEZbRquIESltoftm4/3S+V6+hLMTUaOHs57A8Rd41o9XwgP+nFA==","signatures":[{"sig":"MEUCIGfcmYdWWiPNzTtMY6unzGi1UNEcpCtvHk/Q4HI36JZZAiEAtO0EQVCdW01Mn/zQWkfpMYpzVQ0qDh+LZqMzg59QqdQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":930311},"main":"dist/cjs/index.js","module":"dist/esm/index.js","engines":{"node":">=6.0.0"},"gitHead":"1b2160346fa1efdf2af13711aa9556e9cae056d4","typings":"dist/types/index.d.ts","_npmUser":{"name":"kpainter-atl","email":"kpainter@atlassian.com"},"repository":{"url":"git+https://bitbucket.org/atlassian/jql-grammar.git","type":"git"},"_npmVersion":"8.5.5","description":"JQL lexer, parser, listener and visitor","directories":{},"sideEffects":false,"_nodeVersion":"16.15.0","dependencies":{"antlr4ts":"0.5.0-alpha.4","@babel/runtime":"^7.15.4"},"module:es2019":"dist/es2019/index.js","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jql-parser_1.0.1_1689135497908_0.6496783770363674","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-12-10T00:59:31.524Z","modified":"2026-06-24T07:25:59.519Z","0.0.1":"2021-12-10T00:59:31.803Z","1.0.0":"2022-02-21T02:01:13.010Z","1.0.1":"2023-07-12T04:18:18.101Z"},"bugs":{"url":"https://bitbucket.org/atlassian/jql-grammar/issues"},"author":{"name":"Atlassian"},"license":"Apache-2.0","homepage":"https://bitbucket.org/atlassian/jql-grammar#readme","keywords":["jql","antlr4","grammar","jira"],"repository":{"url":"git+https://bitbucket.org/atlassian/jql-grammar.git","type":"git"},"description":"JQL lexer, parser, listener and visitor","maintainers":[{"email":"eng-development-tooling-artifacts@atlassian.com","name":"atlassianartifactteam"}],"readme":"# JQL Parser\n\n[![Atlassian license](https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square)](LICENSE)\n\nThis library contains auto-generated sources from the [antlr4ts](https://github.com/tunnelvisionlabs/antlr4ts) \nlibrary using the JQL ANTLR4 grammar. It enables consumers to parse a JQL query into a parse tree.\n\n## Usage\n\n```typescript\nimport { CharStreams, CommonTokenStream } from 'antlr4ts';\nimport { JQLLexer, JQLParser } from '@atlassianlabs/jql-parser';\n\n// Create the lexer and parser\nconst jqlText = \"project = JQL\";\nconst charStream = CharStreams.fromString(jqlText);\nconst lexer = new JQLLexer(charStream);\nconst tokenStream = new CommonTokenStream(lexer);\nconst parser = new JQLParser(tokenStream);\n\n// Parse the input, where `jqlQuery` is the entry point\nconst parsedJQLTree = parser.jqlQuery();\n```\n\n## Installation\n\n```sh\nyarn add @atlassianlabs/jql-parser\n```\n\n## Documentation\n\n### Inspecting the parse tree\n\nA JQL parse tree can be inspected using the `JQLParserListener` or `JQLParserVisitor`, you can read \nabout the differences between the visitor/listener approaches [here](https://github.com/antlr/antlr4/blob/master/doc/listeners.md).\n\n#### Listener Approach\n\n```typescript\nimport { JQLParserListener, JqlQueryContext } from '@atlassianlabs/jql-parser';\nimport { ParseTreeWalker } from 'antlr4ts/tree/ParseTreeWalker';\n\n\nclass EnterQueryListener implements JQLParserListener {\n    enterJqlQuery: (context: JqlQueryContext) {\n        console.log(`Query start line number ${context._start.line}`);\n        // ...\n    }\n\n    // other enterX functions...\n}\n\n// Create the listener\nconst listener: JQLParserListener = new EnterQueryListener();\n// Use the entry point for listeners on the parsed JQL tree\nParseTreeWalker.DEFAULT.walk(listener, parsedJQLTree);\n```\n\n#### Visitor Approach\n\n```typescript\nimport { JQLParserVisitor, JqlOperandContext } from '@atlassianlabs/jql-parser';\nimport { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor';\n\n// Extend the AbstractParseTreeVisitor to get default visitor behaviour\nclass CountOperandsVisitor extends AbstractParseTreeVisitor<number>\n  implements JQLParserVisitor<number> {\n  defaultResult() {\n    return 0;\n  }\n\n  aggregateResult(aggregate: number, nextResult: number) {\n    return aggregate + nextResult;\n  }\n\n  visitJqlOperand(context: JqlOperandContext): number {\n    return 1 + super.visitChildren(context);\n  }\n}\n\n// Create the visitor\nconst countOperandsVisitor = new CountOperandsVisitor()\n// Use the visitor entry point with the parsed JQL tree\nconst numberOfOperands = countOperandsVisitor.visit(parsedJQLTree);\n```\n\n## Support\n\nFor developers outside of Atlassian looking for help, or to report issues, [please make a post on the community forum](https://community.developer.atlassian.com/c/atlassian-ecosystem-design).\nWe will monitor the forums and redirect topics to the appropriate maintainers.\n\n## License\nCopyright (c) 2021 - 2022 Atlassian and others. Apache 2.0 licensed, see [LICENSE](LICENSE) file.\n","readmeFilename":"README.md"}