diff --git a/.codeclimate.yml b/.codeclimate.yml index 4248559fd5bfb446876373c990f5473bdb0050ce..c3066c76645f8bfc795dccc5b145c7c2ea619b1f 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,7 +1,6 @@ +version: "2" exclude_patterns: - "languages/" - "_fixtures/" - - "examples/" - - "docs/" - - "stories/" - - "bughunt" \ No newline at end of file + - "wasm/" + - "**/testdata/**" \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000000000000000000000000000000000..dd84ea7824f11be1eeda22377549cbc1aec7f980 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000000000000000000000000000000000000..48d5f81fa422964dd1eea360efdecfc5dc9a6c87 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,10 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000000000000000000000000000000000..bbcbbe7d61558adde3cbfd0c7a63a67c27ed6d30 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000000000000000000000000000000000000..abe0992734dd0cff77b98f731e353b2b5fffc0cc --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,37 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.15 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v . + + - name: Test + run: go test -v . diff --git a/.gitignore b/.gitignore index 37e9842cecbbec94e26ccbff435091bfc84ab728..ff8b50fcb921380387e1c80ac60de1a9d9ad0a26 100644 --- a/.gitignore +++ b/.gitignore @@ -44,8 +44,6 @@ bc_demo_test cmake_install.cmake helloworld languages/java_refactor -languages/java -languages/sql language/g4/*.tokens language/g4/*.go language/g4/*.interp @@ -64,7 +62,12 @@ api.dot api.svg !docs/sample/api.svg coca_reporter +coca_reporter_android *.coverprofile bug -_fixtures/tbs/tbs +_fixtures/tbs/demo-tbs-java-project _fixtures/refactor/move/b/ImportForB.java +!wasm/demo +wasm/demo/coca.wasm +coverage.txt +gen/ diff --git a/.travis.yml b/.travis.yml index 4e3eeeb78e74809a81b67245d3436a63fd0c686e..d5ba05242033cebfadafd99e472bd1ade4dc5aef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ language: go go: -# - 1.12.x - 1.13.x -# - tip + - 1.14.x os: - linux @@ -14,15 +13,13 @@ env: global: - GO111MODULE=on - PATH=${TRAVIS_BUILD_DIR}/bin:${PATH} -# -#addons: -# apt: -# packages: -# - graphviz + +addons: + apt: + packages: + - graphviz before_script: -# - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update ; fi -# - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install graphviz; fi - go get github.com/onsi/gomega - go get github.com/onsi/ginkgo/ginkgo - go get github.com/modocache/gover @@ -37,7 +34,7 @@ before_install: - go get -t -v $(go list ./... | grep -v /languages/) script: - - go test -v $(go list ./... | grep -v /languages/) -race -coverprofile=coverage.txt -covermode=atomic + - go test -v $(go list ./... | grep -v /languages/) -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/CHANGELOG.md b/CHANGELOG.md index f34453af09abe483d2a827fd9589951e42eb7d5e..df55e8121d6e1a07a28786c8555a441eebd62a5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,384 @@ -# [](https://github.com/phodal/coca/compare/v1.2.0...v) (2019-12-29) +# [](https://github.com/phodal/coca/compare/v2.1.1...v) (2020-12-22) + + + +## [2.1.1](https://github.com/phodal/coca/compare/v2.1.0...v2.1.1) (2020-12-22) + + +### Bug Fixes + +* fix total length output issues ([a4a3d47](https://github.com/phodal/coca/commit/a4a3d47dd3d43c7c6b91330e904b3f7743eb305f)) + + + +# [2.1.0](https://github.com/phodal/coca/compare/v2.0.0...v2.1.0) (2020-11-04) + + +### Bug Fixes + +* add .idea to ignore for [#14](https://github.com/phodal/coca/issues/14) ([d8d8dec](https://github.com/phodal/coca/commit/d8d8dec03eecd2f5cf8165175479c66bc344723e)) +* fix analysis lost issue ([0143d3f](https://github.com/phodal/coca/commit/0143d3fb90cb8d2ee54e0a44ac9b8859c402e8f5)) +* fix build error for empty merge ([8022527](https://github.com/phodal/coca/commit/802252701e0f0544056b893429bd74d7cf31cf2b)) +* fix code empty issues ([5e788e9](https://github.com/phodal/coca/commit/5e788e927d45ab6152fc5198785d2c7d9dd81ba9)) +* fix line issues ([b833373](https://github.com/phodal/coca/commit/b8333732f28baafe88f9627758f46f5f6a148175)) +* fix no parents issues for [#14](https://github.com/phodal/coca/issues/14) ([d80797a](https://github.com/phodal/coca/commit/d80797a9bba6d7ce50767c98d9f54080060b7de2)) +* fix tests in go15 ([29c73d9](https://github.com/phodal/coca/commit/29c73d92ef53fbbb0dec5a4c172f05c879634fee)) +* fix top file fail tests ([34a6380](https://github.com/phodal/coca/commit/34a6380163bf3cac0030df635293361454dac1e4)) +* make ignore coca_reports ([9f9fa31](https://github.com/phodal/coca/commit/9f9fa3168537d936c70253baf89dc7402dd37c61)) +* make ranking by keys && fixed [#14](https://github.com/phodal/coca/issues/14) ([644538f](https://github.com/phodal/coca/commit/644538ff8f0f1ff830581907138dd81f1d2f219d)) + + +### Features + +* add basic xml parser ([6a309cd](https://github.com/phodal/coca/commit/6a309cd271d70f7cae6a3cda1ab2c1d4ec317a98)) +* add coloc by directory for testing ([b0ef944](https://github.com/phodal/coca/commit/b0ef944f1798f2655a620a871f61e634d4bb503d)) +* add filter support ([ed69884](https://github.com/phodal/coca/commit/ed69884478f9a1286d0f0b9536616e905e98ae7b)) +* add map for summary ([8efd270](https://github.com/phodal/coca/commit/8efd2703d9e3f5e818b6be50c13ebe5d3a5440ae)) +* add sort cloc support ([4b63a21](https://github.com/phodal/coca/commit/4b63a21c864fb9b16bcf5345cc5318f911b4294e)) +* add support for file display ([7d01a89](https://github.com/phodal/coca/commit/7d01a89babc98721dbdedb03e4018114b31ec351)) +* add test for cloc by dir ([609a5d8](https://github.com/phodal/coca/commit/609a5d896ee3673eca7034897e7fae404c61db51)) +* add test for ignore cases ([0a8ccb7](https://github.com/phodal/coca/commit/0a8ccb74e81b4af2ad5194d7e94f560046a80151)) +* add test for summary ([31a925d](https://github.com/phodal/coca/commit/31a925db3f46f81b2064a85ab397318f89bfbab1)) +* add test for top fie ([1f30752](https://github.com/phodal/coca/commit/1f30752375f3cd42db4b1d94d8f88a50abd63f05)) +* create cloc dir ([1277209](https://github.com/phodal/coca/commit/1277209b11efd996e2d1c1ed4f9b0788e6fcedac)) +* create process base cloc func ([4222c63](https://github.com/phodal/coca/commit/4222c637ddc989c4ffd30b8ab9dfa3284d055d90)) +* create summary for cloc ([3450099](https://github.com/phodal/coca/commit/3450099c501b516720000f07ab4bdd550fc3e97d)) +* fix .git dir erro issues ([562fcd8](https://github.com/phodal/coca/commit/562fcd82d5f3ca7ab2234c335e1e3c445db97b58)) +* init by files ([decb12a](https://github.com/phodal/coca/commit/decb12a5253c4d9196087fc4a5603d5aa4246006)) +* it works ([54c1631](https://github.com/phodal/coca/commit/54c1631eb311b0482fcb8bdf6fd839e0a5f497b2)) +* make output change to indent json ([9464b95](https://github.com/phodal/coca/commit/9464b95c74f9004b094ab4b5b0341be929bfabb5)) +* make output csv ([d8cc503](https://github.com/phodal/coca/commit/d8cc5039b8e2e0b3a362838553179be986ea5507)) +* output dir to dirs ([3acfea3](https://github.com/phodal/coca/commit/3acfea3e77ce19d9cf82d215413ccfd35c595221)) +* upgrade antl4 java parser to antl 4.8 ([f63d7f9](https://github.com/phodal/coca/commit/f63d7f96269f8f4c3d8e31bbb7eb8085c0165fab)) + + + +# [2.0.0](https://github.com/phodal/coca/compare/v1.9.10...v2.0.0) (2020-07-21) + + +### Bug Fixes + +* fix change parameter issue ([94b91c6](https://github.com/phodal/coca/commit/94b91c6ef3454d69f99dc016ea1bd806fcff9426)) +* fix some method lost identify issue ([1157c4c](https://github.com/phodal/coca/commit/1157c4c7da50a28b9cc84d83cc6eaa4bdb8ac9e8)) +* fix some value emtpy issue ([71384cf](https://github.com/phodal/coca/commit/71384cf8824dd90bb59c1987538e0eeeaf487144)) +* fix testing ([57db72e](https://github.com/phodal/coca/commit/57db72e5cd77a39ed97cef717caa78811f755402)) +* fix typelist lost issue ([0e3867a](https://github.com/phodal/coca/commit/0e3867a980e616ee66d753972c7c5b181c68e1d6)) +* fix typo ([3bde650](https://github.com/phodal/coca/commit/3bde6500fb8366862161bc1f0c88d1704b868183)) +* fix typo ([3af471c](https://github.com/phodal/coca/commit/3af471caedb4f5a1082465e22b02e8291afed34e)) +* remove unused print ([1a34d65](https://github.com/phodal/coca/commit/1a34d651e1983a3c1b17400f8a234b25bc89d973)) + + +### Features + +* add arch ignore rueles ([ff9ff86](https://github.com/phodal/coca/commit/ff9ff86e493e8888fc3a0e4ab5c074f0782c2e5b)) +* add basic map for array ([fcefeba](https://github.com/phodal/coca/commit/fcefebad989917df96764d53bd4dbe441789a045)) +* add basic visual map ([d4f177d](https://github.com/phodal/coca/commit/d4f177de5f0a9cf1f879e8647632e5f35e208d71)) +* add count beanch ([56d8e0a](https://github.com/phodal/coca/commit/56d8e0a153db00dad1eacab011a2f17f4a3ba9f2)) +* add merge examples ([3ba080a](https://github.com/phodal/coca/commit/3ba080aa73d6b2d26aad740aba0ef7bf01970f2a)) +* add showcases for elements ([d51e276](https://github.com/phodal/coca/commit/d51e2762db6d5b5c14c37bdc137e54809254df15)) +* add simple code city ([92efab1](https://github.com/phodal/coca/commit/92efab1f83a1fb85bf43ef988ea2cfd3456b89fb)) +* add simple convert for visual images ([df3ecbd](https://github.com/phodal/coca/commit/df3ecbda2b5046583662bf7d55b8906bf6e6c308)) +* add simple test ([04d5d3b](https://github.com/phodal/coca/commit/04d5d3b9dc0b7f9f1330d9acd9a988552fc5157b)) +* add support for generics in code ([433d8fd](https://github.com/phodal/coca/commit/433d8fdd1a4bc89b5b4ee5192767732fb95b96d2)) +* add test for package merge ([9b33751](https://github.com/phodal/coca/commit/9b33751b6f82aef4deb2bc8c73ff83051267aad0)) +* add upperlbael for display ([58f9c78](https://github.com/phodal/coca/commit/58f9c78282e38e3f63e538fe8d26c60032e79436)) +* align call api ([b320fdc](https://github.com/phodal/coca/commit/b320fdcdff96d1de1a0b063a1d9dd47576527814)) +* fix call lookup position issue ([4d41a2d](https://github.com/phodal/coca/commit/4d41a2d9565293dfb6b3b588557437bbdf9cbd9e)) +* init disk tree json ([fe05188](https://github.com/phodal/coca/commit/fe05188dc9f349ff58714f20936df28486c47eb9)) +* make first string ([eeb1757](https://github.com/phodal/coca/commit/eeb1757f04450cb2995923ec838118263a2278a4)) +* make graphs works ([842ac70](https://github.com/phodal/coca/commit/842ac70531f578a83213811cdcb63a9f22880d5f)) +* make it works ([fc97088](https://github.com/phodal/coca/commit/fc970889b8e5e958bf9e3a412c5315370114937a)) +* mkae code city works ([e2d9f4b](https://github.com/phodal/coca/commit/e2d9f4baac45419b66a1ba4329a4cd62b2f488c5)) +* rejust some parameters ([12cfbc5](https://github.com/phodal/coca/commit/12cfbc5e1dd37d56832cd01b699b8c3939fa8bf5)) +* support local identify ([a31c878](https://github.com/phodal/coca/commit/a31c87870f9237124d1b646ce74f37ae16ab4595)) +* try to add map dot ([0b61dc8](https://github.com/phodal/coca/commit/0b61dc892b8cd36b005711691e381fec561c073a)) +* try to add test for node merge ([9b9742b](https://github.com/phodal/coca/commit/9b9742bdb82677a9e57948e6019142d2af7204e6)) +* try to add trhead support ([fee3e94](https://github.com/phodal/coca/commit/fee3e9489fb1f4fced94e4099b8273720b8dea3e)) +* use new graph for render ([2190c19](https://github.com/phodal/coca/commit/2190c19607189640dfa311c70e29e993ca021b06)) +* use trie ([8a19030](https://github.com/phodal/coca/commit/8a19030f9695cdb387c002799f5665c23f5572b2)) +* use trie for render ([e1d0f10](https://github.com/phodal/coca/commit/e1d0f108c2e0a268465bb1f05f9ef6aa6549c4bb)) + + +### Reverts + +* revert full app change ([14ece42](https://github.com/phodal/coca/commit/14ece421bd7b202b8518f424f6c442679e6642b1)) + + + +## [1.9.10](https://github.com/phodal/coca/compare/v1.3.2...v1.9.10) (2020-03-17) + + +### Bug Fixes + +* [go] add dirty fix for return interface ([c720e43](https://github.com/phodal/coca/commit/c720e435c5a36ea5b3d19c4ae9028582cc54257b)) +* [go] fix import equal source issue ([272e057](https://github.com/phodal/coca/commit/272e057ec7a3077e4d269dde07f78f585970ae2d)) +* [go] fix import name start with dot issue ([f12e17b](https://github.com/phodal/coca/commit/f12e17bb179b6a73a614d177e90711512f8e3f13)) +* [go] fix interface{} as param issues ([e74582c](https://github.com/phodal/coca/commit/e74582ccddc877eedc639f739d12432710651f31)) +* [go] rethinking in go ast ([cd61261](https://github.com/phodal/coca/commit/cd61261272e80d0addb6256ae13148a3a4860a49)) +* [python] add py2 & py3 testing ([2d414df](https://github.com/phodal/coca/commit/2d414dfe82b5d163554dcb9e44de8b5e4f80d679)) +* [python] fix version typo issues ([cce510e](https://github.com/phodal/coca/commit/cce510e298c8d00128dd61a917cfca002d85cf52)) +* [python] update version logic ([5c8d4fc](https://github.com/phodal/coca/commit/5c8d4fc4f21f11db200d6ae6edc072025e97a205)) +* [ts] fix default node issues ([e47dcb0](https://github.com/phodal/coca/commit/e47dcb0226b9ce0a20853cac14c63c0e60f158b9)) +* [ts] quick fix test ([3e730b9](https://github.com/phodal/coca/commit/3e730b974359dddaffc84e3c7d22084d38ccd5ab)) +* [ts] value not align issues ([fd36da2](https://github.com/phodal/coca/commit/fd36da237066972ba1572a09a29ac69cc197cb56)) +* change git reset throw error issue ([e041f41](https://github.com/phodal/coca/commit/e041f4140a68a648286173e21902b735a7bad73a)) +* current member nill issues ([8cf9f3b](https://github.com/phodal/coca/commit/8cf9f3b8940d52cf382d11f91b394704f6223b39)) +* fix [ts] return two class issues ([9856d2b](https://github.com/phodal/coca/commit/9856d2b48c8e0e7adbdcc865339223bcd376ab58)) +* fix [ts] status issues ([a07737e](https://github.com/phodal/coca/commit/a07737e9cbccaacf7cad6da50a2b2966205b5dc6)) +* fix api cause log issue ([d06f9ee](https://github.com/phodal/coca/commit/d06f9ee57c7850d1e15f9b47f776e926f7570b18)) +* fix buffer not init issues ([460ebbe](https://github.com/phodal/coca/commit/460ebbe1c920953f9bce18866fce3f8fa6f45e35)) +* fix chain call issue ([595ead4](https://github.com/phodal/coca/commit/595ead425e90aeefc7e40189cc62243923f075af)) +* fix default not class issues ([fcf4659](https://github.com/phodal/coca/commit/fcf465939a9c1dfca35bfc1911c5f20c9a2d328b)) +* fix empty self function issues ([9296a41](https://github.com/phodal/coca/commit/9296a41d9e6ce3e26394b9046ae6d72780a5f0d8)) +* fix filename id issues ([ddd7d71](https://github.com/phodal/coca/commit/ddd7d71be7d03b3a67d15f1e9d226493fdd18a4d)) +* fix for golangci ([9496bfa](https://github.com/phodal/coca/commit/9496bfa2569d23dd8662233d4d8144176b7d723c)) +* fix for golangci ([3ada354](https://github.com/phodal/coca/commit/3ada354264ce3c86f6bc3f6a4c58ab2cd1d98066)) +* fix for golangci for old syntax issues ([7f04fe9](https://github.com/phodal/coca/commit/7f04fe93a637435f1604749ebef1a1b4ae6b0912)) +* fix ignores issue ([708fb41](https://github.com/phodal/coca/commit/708fb41525045fc0562604c4746b881ab9a552ab)) +* fix import issues ([f989cfe](https://github.com/phodal/coca/commit/f989cfeb85ad7539f52e602ca145a7c94b966946)) +* fix import issues ([081671e](https://github.com/phodal/coca/commit/081671e5aeb5ef14c1ac23db7cf388160f0ca5b1)) +* fix import issues for xx from ([0477342](https://github.com/phodal/coca/commit/04773423fc3352a9543a54bccd3182f49f3dc795)) +* fix interface extends issue ([f5423a3](https://github.com/phodal/coca/commit/f5423a3b9792e27a316c8ef92172a0bb1fa3490b)) +* fix interface sort issues ([39b683a](https://github.com/phodal/coca/commit/39b683a650604e4748540fc4511c8d7a90c16552)) +* fix lint issue ([8ef9fa6](https://github.com/phodal/coca/commit/8ef9fa62e89dbdf4e73138364267638a645e1c0d)) +* fix lint issues for *& ([100281a](https://github.com/phodal/coca/commit/100281a8e8bc3b8c7390408641f3648bae3fe029)) +* fix lint issues for uppercase ([4b05484](https://github.com/phodal/coca/commit/4b05484c08064e8f296be0f59f8ffaef54fdd9b9)) +* fix logic issues ([bc6af6d](https://github.com/phodal/coca/commit/bc6af6d4b4630c12cfc4d6b7a39030e83e85b6c5)) +* fix lost python comment support issues ([7f9a685](https://github.com/phodal/coca/commit/7f9a685478a3eb149d7da37f2adf1762b650e31e)) +* fix modifier empty str issue ([293e954](https://github.com/phodal/coca/commit/293e954736feda0cdd983a150020ee863c19a0a8)) +* fix more lint issues ([86b4863](https://github.com/phodal/coca/commit/86b48638dd9cedd86b42facd082270e9c7b08874)) +* fix more lint issues ([3caaa09](https://github.com/phodal/coca/commit/3caaa0968fe42e2d658ceac5995babb0c6609b4c)) +* fix multiple default node issues ([3513798](https://github.com/phodal/coca/commit/351379856017ab9ccc40e3d0f4d7319cfe440dbc)) +* fix naming issue ([e2ba209](https://github.com/phodal/coca/commit/e2ba209e311c178a4d1f9bbf147b723ac9be8e09)) +* fix nodename typoo ([baa04f5](https://github.com/phodal/coca/commit/baa04f530690787718091831880067fb01b03704)) +* fix param order issue ([fd23a1b](https://github.com/phodal/coca/commit/fd23a1be3be974f6e7c5c3afb5b6bc8be0272b4d)) +* fix some syntax issue ([6bc6ea0](https://github.com/phodal/coca/commit/6bc6ea0f9d600eda5931ce9b94354c84628bdc5f)) +* fix test ([750ce13](https://github.com/phodal/coca/commit/750ce13630d2cf5c17fe33bf8255869506371124)) +* fix test ([0fed327](https://github.com/phodal/coca/commit/0fed3276e3a7c87e0a046ddfb6e9573251476fd4)) +* fix test data issues ([c62ec27](https://github.com/phodal/coca/commit/c62ec27fbba3ab01268cf8b0d2eb0bd90b7ff89b)) +* fix test data issues ([5cf08af](https://github.com/phodal/coca/commit/5cf08af8f81036338d13e4dc4e9a63cca5f574aa)) +* fix test lost issues ([2feb92e](https://github.com/phodal/coca/commit/2feb92e87d6c4408ad853bf4bef7dbf96e6da384)) +* fix testing ([aa4c6e7](https://github.com/phodal/coca/commit/aa4c6e7af91ae200f5db8d26244c1969ee00a8c3)) +* fix to fix python syntax issue ([b34394d](https://github.com/phodal/coca/commit/b34394de37a486193b42e3a0910f49fd969cdec7)) +* fix ts compile issues ([f72c409](https://github.com/phodal/coca/commit/f72c409c2524feecbde5464a8a515c7067116c6f)) +* fix typo ([1380659](https://github.com/phodal/coca/commit/1380659bc7bb4f3bcb633bb0786f612a0aa7012e)) +* fix typo ([5bb5405](https://github.com/phodal/coca/commit/5bb5405cf0ace6cd36521fc663db6367e8927063)) +* fix typo ([4e8b8b6](https://github.com/phodal/coca/commit/4e8b8b6c3c1c2bbb9b922f3e159e72cd54c6c9ce)) +* fix typo ([e71bf99](https://github.com/phodal/coca/commit/e71bf99009c8744974dc0c8179484be0f98c7b1b)) +* fix typo ([99d3632](https://github.com/phodal/coca/commit/99d363241318b3367b1e174feac0e1f054da9f41)) +* fix typo ([390eaf3](https://github.com/phodal/coca/commit/390eaf3d0d9d97d3a93f27ec4885e34a4393fe3f)) +* fix typo ([0333bb9](https://github.com/phodal/coca/commit/0333bb98c24de07cc321fda0f6b3178563c7dba3)) +* remove unused code ([bec5f9b](https://github.com/phodal/coca/commit/bec5f9b10c4a0fba3db4d3510bbd4ddb33076d99)) +* remove unused code ([39e2fe6](https://github.com/phodal/coca/commit/39e2fe6ad2da95f3f2e9f4186c91f493c3e23837)) +* remove unused method ([5375bec](https://github.com/phodal/coca/commit/5375bec4bb1f541bd7cb60c219e2d521373c6b48)) +* remove unused vars ([33390a3](https://github.com/phodal/coca/commit/33390a3978e32385dde0f2cfb4e52dafe6ce3d5b)) +* ttry to fix go package issues ([3fae76a](https://github.com/phodal/coca/commit/3fae76a7f95f11f24aee57465dbf452c06a3ecf2)) +* update grammar ([f194377](https://github.com/phodal/coca/commit/f194377a6ce489cf0d78299c6850876870ca4d29)) + + +### Features + +* [cmd] add golang analysis api support ([f5f1b2e](https://github.com/phodal/coca/commit/f5f1b2ea4d9e313c6020ef29b3a595421cb48150)) +* [cmd] add python analysis api support ([8a0c5fe](https://github.com/phodal/coca/commit/8a0c5fe454becfdf2bfb2527954fbbb2ecfd0b07)) +* [cmd] add typescript analysis api integration ([7aba19f](https://github.com/phodal/coca/commit/7aba19f1af0bba06604e5c3308765d68e5f31344)) +* [domain] add module, package, project defined ([1694e99](https://github.com/phodal/coca/commit/1694e9951f1a498c13a703f12142ed75a88ca19f)) +* [go] add analysis api portal ([ba02a5e](https://github.com/phodal/coca/commit/ba02a5ec0445a6c94fb56f8d8703ef989ca7ae72)) +* [go] add basic call field target support ([6377a43](https://github.com/phodal/coca/commit/6377a431d2fd09e3feea50459c3a88f4c71be867)) +* [go] add basic handle for params & return type ([9cb87dd](https://github.com/phodal/coca/commit/9cb87ddd2b76110d574e01be75c8c7349f0c9c97)) +* [go] add basic procee package support ([51b0c4e](https://github.com/phodal/coca/commit/51b0c4e71fa86146ca3543698ce7ceef888b370f)) +* [go] add field to package for share fields in package ([d90e142](https://github.com/phodal/coca/commit/d90e142dcaf7a68d8aeef72a6aef93e193e0bf0c)) +* [go] add file name to items ([4f46068](https://github.com/phodal/coca/commit/4f460682a612e40e66d9c1f719741604e5050a24)) +* [go] add file name to items ([698e7cd](https://github.com/phodal/coca/commit/698e7cd7bc23a161676537b297264f0f094922e2)) +* [go] add imports support ([8cc7c4b](https://github.com/phodal/coca/commit/8cc7c4b7fb153063f5e6c9cd28c95fb0e71fef42)) +* [go] add lost package name to class node ([6380efd](https://github.com/phodal/coca/commit/6380efd5210ca4f88b6a51734ef0f016d58ea580)) +* [go] add method call support ([d40c6bf](https://github.com/phodal/coca/commit/d40c6bff19ba2011bf5502117492766131770cc7)) +* [go] add normal method build support ([98fb95e](https://github.com/phodal/coca/commit/98fb95e94e94050b0a28ff8c03e4fe60a6d5870e)) +* [go] add parameters to method call ([e342dba](https://github.com/phodal/coca/commit/e342dba159c070a73d919a25f55b698baa0df47c)) +* [go] add pre extentions ([5191789](https://github.com/phodal/coca/commit/5191789115ef54fefa34409c46ba7723035401d4)) +* [go] add return call support ([bd1c929](https://github.com/phodal/coca/commit/bd1c929a1d6dd0da3aaef0a704f6932dd314363e)) +* [go] add simple ident apis ([0a65743](https://github.com/phodal/coca/commit/0a65743b1540e487e29d393e01ac51e35b0a854e)) +* [go] add struct zero ([f324ab1](https://github.com/phodal/coca/commit/f324ab1cea21371ddcd085ea1a74dc144c89d829)) +* [go] align function to struct ([53e638b](https://github.com/phodal/coca/commit/53e638bc8f05b4235313cee0758c862407414757)) +* [go] change import for compare thinking ([29e5dba](https://github.com/phodal/coca/commit/29e5dba416ff472d5969725c3496ef27cab4b8ac)) +* [go] init normal method ([a3a5eb5](https://github.com/phodal/coca/commit/a3a5eb54f010d71c20d3f73c68f0f53fe929b173)) +* [go] make enable get target ([870eb12](https://github.com/phodal/coca/commit/870eb1263dc38ef04d0008b50717b0e9990f09e9)) +* [go] make export code file ([a845410](https://github.com/phodal/coca/commit/a845410a3f4449384f57374fcf5998400fe5e472)) +* [go] make first compile code for ts ([626dc59](https://github.com/phodal/coca/commit/626dc59fc2ce07d435afc97d0420b36c07871aa1)) +* [go] make struct to member ([e1787a5](https://github.com/phodal/coca/commit/e1787a580162b9ecdbb16dd9b94091464e6ee557)) +* [go] make var local var works ([a91aac1](https://github.com/phodal/coca/commit/a91aac1a2482ae96af4ab91ac5641144a3cc315c)) +* [go] thinking in data struct ([101060a](https://github.com/phodal/coca/commit/101060adedef3b76fcfc8dce9dbe49bcd7bc913f)) +* [go] try to add for inner method call ([350b13b](https://github.com/phodal/coca/commit/350b13b55f68ed637b609c6b83e7ebb6207f5908)) +* [go] try to handle it & go home ([5344f68](https://github.com/phodal/coca/commit/5344f6818d9273c7c7b39a7e971a3aa7d9984ebe)) +* [go] try to use java api ([0137644](https://github.com/phodal/coca/commit/0137644185144c8e1978659c88b3056852bf4a31)) +* [go] update test framework ([cb948e8](https://github.com/phodal/coca/commit/cb948e8dc254a585d6ef252f43bb1f3f04eae5ed)) +* [go]-call make enable get field for files ([56331ea](https://github.com/phodal/coca/commit/56331ea430b1eec9c51b89ea2b6f843815e091fa)) +* [js] add grammers ([d73b971](https://github.com/phodal/coca/commit/d73b97169de536e3c61baa2b4e2095f04d8789e5)) +* [js] make antlr compiler success ([38868b9](https://github.com/phodal/coca/commit/38868b999067890132398d894f0b6b2d51bdb180)) +* [js] make first console log hell world ([f8a9378](https://github.com/phodal/coca/commit/f8a9378cd91bf7732625bddf2be3ca95eb4a6267)) +* [plugins] make cgo ([0b2dda8](https://github.com/phodal/coca/commit/0b2dda8e04d6ec480034c8509472ca4f731e8310)) +* [plugins] make first dep plugins ([938a10f](https://github.com/phodal/coca/commit/938a10fc0afafca817042d77659b38746f707881)) +* [plugins] update build scripts ([6746345](https://github.com/phodal/coca/commit/67463456f7a048ba723b9fbcf10c2ad180a4f0ab)) +* [python translate emittoken & next token ([33b8d8b](https://github.com/phodal/coca/commit/33b8d8ba743b0dbcf93c0f26f7d2ee4d2742997c)) +* [python] add basic function decl ([f50d158](https://github.com/phodal/coca/commit/f50d1584a9e1ff7ccb98bc389cf0468fcb083b46)) +* [python] add build default token ([dcca3e7](https://github.com/phodal/coca/commit/dcca3e7c2bb7631164eb9467521943f255823346)) +* [python] add import from as support ([83e0648](https://github.com/phodal/coca/commit/83e0648205ea87671f7b266fba299f4040c530f1)) +* [python] add multiple import support ([2cb635e](https://github.com/phodal/coca/commit/2cb635e4e2e89f7fe54cb98810f60b86f51ad19b)) +* [python] change grammer for better fetch value ([70c852c](https://github.com/phodal/coca/commit/70c852ca04a1d257933887c99f7a1729624b55e2)) +* [python] find grammar issues ([353cf9b](https://github.com/phodal/coca/commit/353cf9bc7573ee5e6793bb8014d48d63d2098fc9)) +* [python] find the emit issues ([e695df8](https://github.com/phodal/coca/commit/e695df88bc25652135bc5b6d4d6abdaacb6796c9)) +* [python] identify basic import ([d08da6c](https://github.com/phodal/coca/commit/d08da6c9ee83013b94352e896c93122119a0f733)) +* [python] init sripts ([de5d885](https://github.com/phodal/coca/commit/de5d8858107a51d1808d1bc2003336ddd1ccf8f2)) +* [python] it seems works ([804f409](https://github.com/phodal/coca/commit/804f40952fa4ef399b3e836b0698e7ccef1eae1a)) +* [python] make annotation works ([6bd5da2](https://github.com/phodal/coca/commit/6bd5da2016db4d84583c751eda13c08dc8633b13)) +* [python] make create rules ([3f58f84](https://github.com/phodal/coca/commit/3f58f84ba93437404e9b9d520affc9f11aac3314)) +* [python] make first annotaion ([db9b665](https://github.com/phodal/coca/commit/db9b665f4184c2ee78868c7e7582d443e1179656)) +* [python] make first compile ([8d61664](https://github.com/phodal/coca/commit/8d616647864983837bde8feb16ecf8c244f7c67b)) +* [python] make override success ([96f126f](https://github.com/phodal/coca/commit/96f126f3222b110d74943eaf40f0099cf457fa49)) +* [python] make python class works ([cace00b](https://github.com/phodal/coca/commit/cace00b53903b672d26c8438c4af173af39af6b3)) +* [python] move function to data struct node ([0bf4225](https://github.com/phodal/coca/commit/0bf4225dd4d82f3c04915dbf23ab43c89e8593d3)) +* [python] remove import as names open close bren ([a7e8aea](https://github.com/phodal/coca/commit/a7e8aeab0a191956d6f0471cb611977fa353d589)) +* [python] translate process new line for lexer ([b9e69d2](https://github.com/phodal/coca/commit/b9e69d23f3a56d73bbc9549a3ec8fa42aa738a16)) +* [ts] add annotation type for method ([72769e2](https://github.com/phodal/coca/commit/72769e204aa65b88175f2d369169ee6bc89110eb)) +* [ts] add basic field for interface support ([052efb5](https://github.com/phodal/coca/commit/052efb55ca107ab05b0195093947b6a926f62159)) +* [ts] add class method support ([2f90d4c](https://github.com/phodal/coca/commit/2f90d4cf360f555152693af581b0a6584334b045)) +* [ts] add constructor to method ([508ee70](https://github.com/phodal/coca/commit/508ee7029123f126cd3dc4581a798df1adbdc200)) +* [ts] add extend support ([0267516](https://github.com/phodal/coca/commit/026751665a39a98e981d3f1da55447886668b965)) +* [ts] add field modifier to field ([8502b6f](https://github.com/phodal/coca/commit/8502b6f41aedc732bc07515128ea2a883cd5252e)) +* [ts] add fields for parameters ([1477520](https://github.com/phodal/coca/commit/14775204d145f7ccbe45c112f77b6992a7e52545)) +* [ts] add grammer ([901be74](https://github.com/phodal/coca/commit/901be746f5fe024a40d18e4a46550b43212f1e88)) +* [ts] add implement support ([f578fcc](https://github.com/phodal/coca/commit/f578fcc7d915dd6b00a126789e722183375b9928)) +* [ts] add import all support ([df3e7d2](https://github.com/phodal/coca/commit/df3e7d2aa2b1e33b76edbcc5c0daaf929b9d932f)) +* [ts] add interface arrow function support ([2ec137c](https://github.com/phodal/coca/commit/2ec137c3653807e8babd44f796854481babcad72)) +* [ts] add interface method sign ([c3a818e](https://github.com/phodal/coca/commit/c3a818e0415fb7f0ab63c77f81c762dceba5d54c)) +* [ts] add interface support ([517ad10](https://github.com/phodal/coca/commit/517ad103ab57ad504910a66d1314083ef20a6173)) +* [ts] add normal function decl ([d7fc0ee](https://github.com/phodal/coca/commit/d7fc0ee26d8bbf133ce964a08f5fb9248630c650)) +* [ts] add parameters ([5e9f8e8](https://github.com/phodal/coca/commit/5e9f8e8645f07852d3454a1f53d8465065d52106)) +* [ts] add predefined type for interface ([cf41c74](https://github.com/phodal/coca/commit/cf41c74d8feaafb7b8404a4f417d469890602d60)) +* [ts] add simple block import ([4c5ead7](https://github.com/phodal/coca/commit/4c5ead7d1f5c9351d52f12e89a9ded73c1a8a718)) +* [ts] add status* symbol for import ([86cd589](https://github.com/phodal/coca/commit/86cd589505597a1ad2d04319bcae7dd9ddb5a196)) +* [ts] add support for import as ([0075bf0](https://github.com/phodal/coca/commit/0075bf01e7b4b86fc519d30ef0906081ea61c540)) +* [ts] add support for rest parameter ([a8f55d1](https://github.com/phodal/coca/commit/a8f55d14024c7f0fb8f881791f00c3ea13b3284d)) +* [ts] change return to array for mupltiple class ([03d4f5a](https://github.com/phodal/coca/commit/03d4f5a618f29b59d1ccdc3769dec03ec63473ec)) +* [ts] make first analysis api ([685f109](https://github.com/phodal/coca/commit/685f10907ccf8f5c15cef32dee7eb7206f59c881)) +* [ts] make first class identfier ([a45f6f1](https://github.com/phodal/coca/commit/a45f6f178ca57da7797afc8e8d10d61ae6daf7d1)) +* [ts] make first grammer compile ([e97f76f](https://github.com/phodal/coca/commit/e97f76fa648a0aa0fbe851b7ae9ca09fe65532bd)) +* add basic interface support ([e37d065](https://github.com/phodal/coca/commit/e37d065a026165104d1632d8a96ce8a8d64e325b)) +* add basic multiple line todo support ([d3282d9](https://github.com/phodal/coca/commit/d3282d95895406b05f9fca0799cac6bb2502c023)) +* add detail for normal todo ([9ae118c](https://github.com/phodal/coca/commit/9ae118c05d7e1db5beb6789e06a06550dfe11a9c)) +* add graph call bad smell ([2778652](https://github.com/phodal/coca/commit/27786520e6e95f084b8c29b7001b78b7a8664b06)) +* add package manager info ([86eb97c](https://github.com/phodal/coca/commit/86eb97cd11290fe4dc30f50907c2ff852b3de6fe)) +* add package manager info for go build ([4a4a2cb](https://github.com/phodal/coca/commit/4a4a2cb1a99be9f16873339dce3dfbabe8677784)) +* add support for func member ([ad83146](https://github.com/phodal/coca/commit/ad83146e63b4f68122e50cd6e1e2279d367becfe)) +* enable parallel to fast test ([023a19b](https://github.com/phodal/coca/commit/023a19b42f087ee590a78896c823169d73a04ba8)) +* go add analyssis function pass code ([aebb83e](https://github.com/phodal/coca/commit/aebb83e8393cd3b3dc635ab4fa9ff85e551c0523)) +* init data struct method call ([15d09a4](https://github.com/phodal/coca/commit/15d09a4da81951a804cd55c1c459915218f5ac88)) +* init golang cli ([2402529](https://github.com/phodal/coca/commit/2402529926c9dc1eb56ea38cbdfe7ad87dd8c880)) +* init python grammar ([15606f3](https://github.com/phodal/coca/commit/15606f385fbc2f914cd60f2c9a00747147c4d18b)) +* init ts modules ([a6a6497](https://github.com/phodal/coca/commit/a6a6497f3f60d45ced1c1be385f2942cb1442e38)) +* redesign members id ([5079a1b](https://github.com/phodal/coca/commit/5079a1ba1cd6ca8b518a1937deaec6f24c1e8b1c)) +* remove plugins code, because windows go not support plugins https://github.com/golang/go/issues/19282 ([81b0929](https://github.com/phodal/coca/commit/81b0929e7431c25bf53248c0c3f26d1b1aa813d8)) +* rename codefile to codecontainer for c# ([5721d74](https://github.com/phodal/coca/commit/5721d74bce5a0b2b554f736324c1852654eaf080)) +* support for ds member id ([66d6ac0](https://github.com/phodal/coca/commit/66d6ac0dfbb6040508026492741f65d4b7a9cb3d)) + + +### Reverts + +* Revert "test: [go] add to add property supporT" ([eea0444](https://github.com/phodal/coca/commit/eea0444807e1b573a039ead8263e1c33e8d9adce)) +* Revert "ci: update config for version" ([137eed9](https://github.com/phodal/coca/commit/137eed9bead74e6bd9253d63e603a905787f4c7f)) + + + +## [1.3.2](https://github.com/phodal/coca/compare/v1.3.1...v1.3.2) (2020-01-08) + + +### Bug Fixes + +* fix api call not empty issue ([1902015](https://github.com/phodal/coca/commit/19020159eb28dcb289a053f1ca3dadb27c5dab01)) +* fix GoLand refactor error issue ([978844b](https://github.com/phodal/coca/commit/978844b5dc35933b56df988c4caa6511edf40d96)) +* fix typo ([3f3a6dc](https://github.com/phodal/coca/commit/3f3a6dc6d1248735f850fcf09cbb82f5d2e048b1)) + + +### Features + +* [dep] make basic compares ([9da6b28](https://github.com/phodal/coca/commit/9da6b2847ea5a50834b81802255e669332c3bcd6)) +* [dep] make gradle works ([d765e4a](https://github.com/phodal/coca/commit/d765e4a14d621441f30d0ab9ba9984e3ca69dc3c)) +* [dep] make really from files ([3b1c004](https://github.com/phodal/coca/commit/3b1c0043dd9a9ddec7b0abca6544cb7d42108173)) +* [dep] support groovy method call ([8f360bb](https://github.com/phodal/coca/commit/8f360bbb4d4cc94b5ab2a41d6ec8033c667361c2)) +* [deps] make it works ([fe8d3cd](https://github.com/phodal/coca/commit/fe8d3cddf141df709915e5e57633b153b9fcb02d)) +* [deps] support for gradle ([838bd1e](https://github.com/phodal/coca/commit/838bd1e6ba603272c61b54f8faf6bd395cd44dbf)) + + + +## [1.3.1](https://github.com/phodal/coca/compare/v1.3.0...v1.3.1) (2020-01-06) + + +### Bug Fixes + +* [deps] remove unused java code in antlr & it will cause bugs ([9a8ab9a](https://github.com/phodal/coca/commit/9a8ab9a80a763aaffc394b7e8f6041220b8b18bf)) +* [evaluate] add checkfor null ([922160a](https://github.com/phodal/coca/commit/922160a84c4223ba92aa864d7949d884f71e4504)) +* [fullast] make call chain work btter ([556edf6](https://github.com/phodal/coca/commit/556edf6873e141460a49aedfff507806d7a5073e)) +* add a quick dirty fix for duplicate class ([e3594ae](https://github.com/phodal/coca/commit/e3594aeb51fb2dda0ad1ddd33e559ba2bfefd045)) +* add lost api test ([2d773f0](https://github.com/phodal/coca/commit/2d773f0ab264c57d01c51838eaf39f9a8b877fb4)) +* fix api get fullname empty issue ([b15f90a](https://github.com/phodal/coca/commit/b15f90acb237ac439d56f4269a42a3937d94f352)) +* fix class node queue issue ([7ad0ae9](https://github.com/phodal/coca/commit/7ad0ae9f5f73f132e39b808560afe61c48da34aa)) +* fix methodcall not update issue ([8f830be](https://github.com/phodal/coca/commit/8f830be9a46e7f39597e98851fed0327639e6b02)) +* fix methodname empty unknown issue ([7924018](https://github.com/phodal/coca/commit/792401859058917e5790d8d39f31817c1d874787)) +* fix path issue for windows ([3c7a6db](https://github.com/phodal/coca/commit/3c7a6db507696984170ff9fedfc9b9573a7f8b2b)) + + +### Features + +* [dep] add basic maven xml parser ([16386f4](https://github.com/phodal/coca/commit/16386f447e7b36a8091d9623d8c728640d1cc26e)) +* [dep] init analysis ([12371e0](https://github.com/phodal/coca/commit/12371e0bc8c0422ecab3cafad6d64536c55d33ea)) +* [dep] make first compiler for groovy ([8944882](https://github.com/phodal/coca/commit/8944882854c08c657659770d6f46d0c49239d430)) +* [deps] add groovy grammer files ([44a395c](https://github.com/phodal/coca/commit/44a395cd0a843b13cd9d80e446dc779345ba05cc)) +* [wasm] add analysi bs ([72f735c](https://github.com/phodal/coca/commit/72f735c2fe1bea970ebafdffc74a7d752e2907f6)) +* [wasm] expose concept API ([4095526](https://github.com/phodal/coca/commit/40955260d07b74559fa693803f9574be7b4ac51d)) +* add count import to analysis full app ([4dbc777](https://github.com/phodal/coca/commit/4dbc777d11aee446b6086fa4733d67abbef793b2)) +* init jdep model ([543e09f](https://github.com/phodal/coca/commit/543e09f50fa65dfa56621be33ebf1e927a08bc70)) +* make inner class to inner class node ([7185b9c](https://github.com/phodal/coca/commit/7185b9c63458db72ddfc2e5c3403913b771bcc53)) +* make wasm works ([b5005ae](https://github.com/phodal/coca/commit/b5005ae20d91d8d6bafc837aa59e27bf908d2edd)) + + + +# [1.3.0](https://github.com/phodal/coca/compare/v1.2.0...v1.3.0) (2020-01-01) + + +### Bug Fixes + +* add dirty fix for creator ([12ad93e](https://github.com/phodal/coca/commit/12ad93ea4c425f600781de218a295781a4075bb2)) +* add multiple creator test ([d14e2eb](https://github.com/phodal/coca/commit/d14e2ebfe8c4b60d08d3353cd920e4a0baf801d5)) +* fix annotaion & add creatorclass ([bd934af](https://github.com/phodal/coca/commit/bd934aff62af905123ece466d0a723ff7d1ad89c)) +* fix build & windows slash issues ([6f13cdb](https://github.com/phodal/coca/commit/6f13cdb875347ce79b51362a4b44faa118dbb957)) +* fix call constructor bug ([45bf836](https://github.com/phodal/coca/commit/45bf836bc1ad97751a729bab282dfc45ccacd5d8)) +* fix creator annotaion issue ([fc4de07](https://github.com/phodal/coca/commit/fc4de078d03ed48f5a91676a3b29ffcf20eae576)) +* fix creator array issue ([1668c84](https://github.com/phodal/coca/commit/1668c842c62eafdb3fe4f5e8aff8cba4301a9318)) +* fix creator unkonw issue ([483be10](https://github.com/phodal/coca/commit/483be10d4180207a6d0447134f47d358bb6c3015)) +* fix data issue ([ba0a9a7](https://github.com/phodal/coca/commit/ba0a9a71fa3e378efa096d410b204e75dfde4aa0)) +* fix git format issue ([9c1ba22](https://github.com/phodal/coca/commit/9c1ba22ff198757751c81af3a91ba279c86b83b8)) +* fix ignore test with unkown issue ([26f2716](https://github.com/phodal/coca/commit/26f27168afbf912f1e2350370a5b3b5d404c7920)) +* fix typo ([235db0a](https://github.com/phodal/coca/commit/235db0a92119042df369337a8075145cdce18533)) +* fix typo ([58b29c2](https://github.com/phodal/coca/commit/58b29c2a8ce3d65004003167b807ae8a0c7f54da)) +* try to fix call assert in self issue ([f041478](https://github.com/phodal/coca/commit/f04147890503f9a332c41d532d7464310d8ba91c)) +* try to fix creator issues ([bed0dcd](https://github.com/phodal/coca/commit/bed0dcd838e08648a17d1203ac15e28a787d9b71)) +* try to fix os stat error issue for ci ([873f613](https://github.com/phodal/coca/commit/873f613a5fb439a2654d01de2b1cbb0d88361286)) + + +### Features + +* [tbs] adapter add output ([7b6f9f8](https://github.com/phodal/coca/commit/7b6f9f82df5dc63ab4e8316112b433345b829ec3)) +* [tbs] add duplicateAssert ([e291ef0](https://github.com/phodal/coca/commit/e291ef0263a8e7040b289f9f0b5fb49702584e81)) +* [tbs] add RedundantAssertionTest ([b4893c4](https://github.com/phodal/coca/commit/b4893c4775d917b88826f0752f6431a295431d25)) +* [tbs] add sort by type cmd & fix mockito issue ([354931a](https://github.com/phodal/coca/commit/354931a300ce769b08d3d51ff309891f4c4e93c6)) +* [tbs] add start line to bs ([02905e5](https://github.com/phodal/coca/commit/02905e58226cf7c8a2d15e0ff1e61d096102d524)) +* [tbs] add unknown test ([f218d55](https://github.com/phodal/coca/commit/f218d55c442ad4aec6cb3434852655ecdae7d694)) +* [tbs] update assertion list ([1b6b725](https://github.com/phodal/coca/commit/1b6b725c91a2f2e947e467623994e7f41ed49894)) +* add parameters to jmethocall api ([a046289](https://github.com/phodal/coca/commit/a046289ad2f7e0596fdbcaea8c0d8c1fa565897f)) +* lets support multiple go version again.... ([1230a0a](https://github.com/phodal/coca/commit/1230a0a514c37b153eb0fa52288de0ffaa24120a)) +* move behavior to domain ([592f5e7](https://github.com/phodal/coca/commit/592f5e7aa7b56c84f5ef7a44d4d12fd136e13209)) +* move sugeest to domain ([2cf880a](https://github.com/phodal/coca/commit/2cf880a1cce9f996c75ce4ef735115632cef245f)) +* try in wasm ([2d34993](https://github.com/phodal/coca/commit/2d3499344b4d61203c8d6325c211ab130b691082)) +* update assertion list ([3b1a707](https://github.com/phodal/coca/commit/3b1a7077c2c7deae1f8e5ec030727bae78b7a7b2)) diff --git a/Makefile b/Makefile index 098becd7ac6eeb2ac0de10097dc86cd229b3796c..e9a3cf6b4a48ee307ba85c5502f54705d0894c7a 100644 --- a/Makefile +++ b/Makefile @@ -4,27 +4,44 @@ GOBUILD=$(GOCMD) build GOCLEAN=$(GOCMD) clean GOTEST=$(GOCMD) test GOGET=$(GOCMD) get -BINARY_DIR=output/ +BINARY_DIR=output PACKAGE_NAME=coca BINARY_LINUX=$(BINARY_DIR)/$(PACKAGE_NAME)_linux BINARY_MACOS=$(BINARY_DIR)/$(PACKAGE_NAME)_macos BINARY_WINDOWS=$(BINARY_DIR)/$(PACKAGE_NAME)_windows.exe -all: clean bughunt build +all: clean build build: build-linux build-windows build-macos test: - $(GOTEST) -v ./... +# make build-plugins + CGO_ENABLED=0 $(GOTEST) -v ./... clean: $(GOCLEAN) rm -rf $(BINARY_DIR) run: $(GOBUILD) -o $(BINARY_DIR) -v ./... ./$(BINARY_DIR) +lint: + golint ./pkg/... +changelog: + conventional-changelog -p angular -i CHANGELOG.md -s -r 0 -# Cross compilation +build-plugins: + go build -buildmode=plugin -o plugins/dep.so core/context/deps/*.go + mkdir -p output/plugins + cp -a plugins/dep.so output/plugins/dep.so build-linux: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_LINUX) -v build-windows: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_WINDOWS) -v build-macos: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_MACOS) -v +build-deps: + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/dep/dep_macos analysis/dep/main.go + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/dep/dep_linux analysis/dep/main.go + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/dep/dep_windows.exe analysis/dep/main.go +build-analysis: + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/analysis/go_macos analysis/golang/main.go + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/analysis/java_macos analysis/java/main.go + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/analysis/python_macos analysis/python/main.go + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_DIR)/analysis/typescript_macos analysis/typescript/main.go diff --git a/README.md b/README.md index 3e88a51fab681f96b602adce6b9347c3788a79ec..0b48015f2cf0374ee5089e51e50cc1a5a06674ed 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,29 @@ [![Build Status](https://travis-ci.org/phodal/coca.svg?branch=master)](https://travis-ci.org/phodal/coca) [![Maintainability](https://api.codeclimate.com/v1/badges/d5a5e060522403b1f79b/maintainability)](https://codeclimate.com/github/phodal/coca/maintainability) [![codecov](https://codecov.io/gh/phodal/coca/branch/master/graph/badge.svg)](https://codecov.io/gh/phodal/coca) +![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/phodal/coca) +![Go](https://github.com/phodal/coca/workflows/Go/badge.svg) -> Coca is a toolbox which is design for legacy system refactoring. Coca 是一个用于系统重构、系统迁移和系统分析的瑞士军刀。它可以分析代码中的 badsmell,行数统计,分析调用与依赖,进行 Git 分析,以及自动化重构等。 +> [Coca](https://coca.migration.ink/) is a toolbox which is design for legacy system refactoring and analysis, includes call graph, concept analysis, api tree, design patterns suggest. +[Coca](https://coca.migration.ink/) 是一个用于系统重构、系统迁移和系统分析的瑞士军刀。它可以分析代码中的 badsmell,行数统计,分析调用与依赖,进行 Git 分析,以及自动化重构等。 + +Migration Guide (Chinese Version): 《[系统重构与迁移指南](https://github.com/phodal/migration)》 + +Inspired by: [newlee](https://github.com/newlee) & [Tequila](https://github.com/newlee/tequila) + +Ant To Maven: [Merry](https://github.com/phodal/merry) Refactoring Modeling: ![Refactoring Modeling](docs/images/model.svg) -features: + - [ ] Languages Support + - [x] Java (full features) + - [x] Golang (support: analysis, todo, concept, git, suggest) + - [x] TypeScript (TBC) + - [x] Python (support: analysis, todo, concept, git, suggest) + +Features List: ``` Available Commands: @@ -34,16 +49,25 @@ Available Commands: version version ``` -## Usage +Requirements: + +1. [graphviz](https://www.graphviz.org/) for dot file to images (such as svg, png) + + -install +## Getting started + +The easiest way to get coca is to use one of the pre-built release binaries which are available for OSX, Linux, Windows on the [release page](https://github.com/phodal/coca/releases). + +You can also install yourself : ```bash go get -u github.com/phodal/coca ``` -1. Run `coca analysis` -2. Run Command + + +## Usage ### Analysis @@ -57,17 +81,17 @@ coca analysis coca arch ``` -Examples Results 1: +Android Studio Gradle DSL Module (merge header) -![Architecture demo 2](docs/sample/ddd.svg) +command: `coca arch -x "com.android.tools.idea.gradle.dsl" -H true` -from: [https://github.com/newlee/tequila](https://github.com/newlee/tequila/tree/master/examples/step2-Java) +![Gradle Demo](showcases/android-gradle-dsl.svg) -Examples Results 2: +Android Studio Gradle DSL Module Elements Part: -![Architecture demo](docs/sample/arch.svg) +command: `coca arch -x "com.android.tools.idea.gradle.dsl.parser.elements"` -from: [https://github.com/howiehu/ddd-architecture-samples](https://github.com/howiehu/ddd-architecture-samples) +![Gradle Demo](showcases/android-gradle-elements.svg) ### Find Bad Smells @@ -132,6 +156,54 @@ Results to json coca cloc --by-file --format json ``` +#### Cloc by directory + +```bash +coca cloc ~/intellij-community/android/ --by-directory --include-ext=java,kt --not-match=".*(Test|Tests)\.(kt|java)" +``` + +results csv: + +```csv +module,summary +adt-branding,169 +adt-testutils,257 +adt-ui,21987 +adt-ui-model,3450 +android,361270 +android-adb,497 +android-common,3280 +android-debuggers,3030 +android-kotlin,8816 +android-lang,24796 +android-lang-databinding,6392 +android-layout-inspector,2533 +... +``` + +#### Cloc Top File + +```bash +coca cloc ~/intellij-community/android/designer/src/com/android/tools/idea --top-file --top-size 10 +``` + +output to: `coca_reporter/sort_cloc.json` and also: + +```bash +| LENGTH | COMPLEXITY | LOCATION | +|--------|------------|-----------------------------------| +| 1642 | 236 | ConstraintLayoutHandler.java | +| 1492 | 375 | ConstraintComponentUtilities.java | +| 1189 | 166 | CommonActions.java | +| 1184 | 325 | ConstraintWidget.java | +| 1169 | 129 | SingleWidgetView.java | +| 1115 | 213 | ScoutArrange.java | +| 1097 | 281 | ScoutWidget.java | +| 1081 | 224 | 3d/Rasterize.java | +| 1016 | 159 | LayoutlibSceneManager.java | +| 1014 | 220 | TimeLinePanel.java | +``` + ### Build Deps Tree ``` @@ -154,7 +226,7 @@ With Count ``` coca api -r com.phodal.pholedge. -c -``` +``` or multi package: @@ -311,17 +383,19 @@ coca refactor -m move.config -p . coca evaluate ``` +Arduino Results: + ``` +--------------------------------+-------+-----------------------+-------+-----------+ | TYPE | COUNT | LEVEL | TOTAL | RATE | +--------------------------------+-------+-----------------------+-------+-----------+ -| Nullable / Return Null | 0 | Method | 5256 | 0.00% | -| Utils | 18 | Class | 366 | 4.92% | -| Static Method | 0 | Method | 5256 | 0.34% | -| Average Method Num. | 5256 | Method/Class | 366 | 14.360656 | -| Method Num. Std Dev / 标准差 | 5256 | Class | - | 32.965336 | -| Average Method Length | 19644 | Without Getter/Setter | 4328 | 4.538817 | -| Method Length Std Dev / 标准差 | 5256 | Method | - | 4.467935 | +| Nullable / Return Null | 0 | Method | 1615 | 0.00% | +| Utils | 7 | Class | 252 | 2.78% | +| Static Method | 0 | Method | 1615 | 0.43% | +| Average Method Num. | 1615 | Method/Class | 252 | 6.408730 | +| Method Num. Std Dev / 标准差 | 1615 | Class | - | 7.344917 | +| Average Method Length | 13654 | Without Getter/Setter | 1100 | 12.412727 | +| Method Length Std Dev / 标准差 | 1615 | Method | - | 20.047092 | +--------------------------------+-------+-----------------------+-------+-----------+ ``` @@ -370,19 +444,27 @@ coca todo results: ``` -+------------+--------------+--------------------------------+---------------------------------------------------+-------+ -| DATE | AUTHOR | MESSAGES | FILENAME | LINE | -+------------+--------------+--------------------------------+---------------------------------------------------+-------+ -| 2019-12-19 | Phodal Huang | 支持 interface 在同一个包内 | core/adapter/api/JavaApiListener.go | 200 | -| 2019-12-21 | Phodal Huang | 处理链试调用 | core/adapter/bs/BadSmellListener.go | 305 | -| 2019-12-18 | Phodal Huang | update this reflect | core/adapter/bs/BadSmellListener.go | 363 | -| 2019-12-15 | Phodal Huang | update for array | core/adapter/bs/BadSmellListener.go | 388 | -| 2019-12-24 | Phodal Huang | 支持依赖注入 | core/adapter/call/JavaCallListener.go | 108 | -| 2019-12-24 | Phodal Huang | add inner creator examples | core/adapter/call/JavaCallListener.go | 209 | -| 2019-12-24 | Phodal Huang | add inner creator examples | core/adapter/call/JavaCallListener.go | 215 | -| 2019-12-24 | Phodal Huang | | core/adapter/call/JavaCallListener.go | 270 | -| 2019-12-20 | Phodal Huang | 处理链试调用 | core/adapter/call/JavaCallListener.go | 324 | -+------------+--------------+--------------------------------+---------------------------------------------------+-------+ ++------------+-----------------+--------------------------------+--------------------------------------------------------------------------------------+------+ +| DATE | AUTHOR | MESSAGES | FILENAME | LINE | ++------------+-----------------+--------------------------------+--------------------------------------------------------------------------------------+------+ +| 2019-12-09 | Cristian Maglie | happens on macosx, don't know | app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java | 118 | +| | | why | | | +| 2019-12-09 | Cristian Maglie | Make this a method of Theme | app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java | 233 | +| 2019-12-09 | Cristian Maglie | Do a better job in refreshing | app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java | 241 | +| | | only the needed element | | | +| 2019-12-09 | Cristian Maglie | Do a better job in refreshing | app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java | 273 | +| | | only the needed element | | | +| 2019-12-09 | Cristian Maglie | Make this a method of Theme | app/src/cc/arduino/contributions/libraries/ui/MultiLibraryInstallDialog.java | 149 | +| 2019-12-09 | Cristian Maglie | happens on macosx, don't know | app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java | 183 | +| | | why | | | +| 2019-12-09 | Cristian Maglie | show error | app/src/processing/app/Base.java | 1440 | +| 2019-12-09 | Cristian Maglie | error when importing. ignoring | app/src/processing/app/Base.java | 2423 | +| | | :( | | | +| 2019-12-09 | Cristian Maglie | Improve / move error handling | app/src/processing/app/Editor.java | 1541 | +| 2019-12-09 | Cristian Maglie | Should be a Theme value? | app/src/processing/app/EditorHeader.java | 78 | +| 2019-12-09 | Cristian Maglie | Should be a Theme value? | app/src/processing/app/EditorStatus.java | 73 | +| 2019-12-09 | Cristian Maglie | Improve decoupling | app/src/processing/app/EditorTab.java | 465 | ++------------+-----------------+--------------------------------+--------------------------------------------------------------------------------------+------+``` ``` ### Suggest @@ -408,85 +490,150 @@ results: ``` coca tbs -``` +``` results -```json -[ - { - "FileName": "_fixtures/tbs/code/EmptyTest.java", - "Type": "EmptyTest", - "Description": "", - "Line": 0 - }, - { - "FileName": "_fixtures/tbs/code/IgnoreTest.java", - "Type": "IgnoreTest", - "Description": "", - "Line": 0 - } -] +```bash ++---------------------+---------------------------------------------------------------+------+ +| TYPE | FILENAME | LINE | ++---------------------+---------------------------------------------------------------+------+ +| DuplicateAssertTest | app/test/cc/arduino/i18n/ExternalProcessOutputParserTest.java | 107 | +| DuplicateAssertTest | app/test/cc/arduino/i18n/ExternalProcessOutputParserTest.java | 41 | +| DuplicateAssertTest | app/test/cc/arduino/i18n/ExternalProcessOutputParserTest.java | 63 | +| RedundantPrintTest | app/test/cc/arduino/i18n/I18NTest.java | 71 | +| RedundantPrintTest | app/test/cc/arduino/i18n/I18NTest.java | 72 | +| RedundantPrintTest | app/test/cc/arduino/i18n/I18NTest.java | 77 | +| DuplicateAssertTest | app/test/cc/arduino/net/PACSupportMethodsTest.java | 19 | +| DuplicateAssertTest | app/test/processing/app/macosx/SystemProfilerParserTest.java | 51 | +| DuplicateAssertTest | app/test/processing/app/syntax/PdeKeywordsTest.java | 41 | +| DuplicateAssertTest | app/test/processing/app/tools/ZipDeflaterTest.java | 57 | +| DuplicateAssertTest | app/test/processing/app/tools/ZipDeflaterTest.java | 83 | +| DuplicateAssertTest | app/test/processing/app/tools/ZipDeflaterTest.java | 109 | ++---------------------+---------------------------------------------------------------+------+ +``` + +### Find unused deps + +``` +coca deps -p _fixtures/deps/maven_sample ``` -## Todo +results: + +``` ++---------------------------+----------------------------------------+---------+ +| GROUPID | ARTIFACTID | SCOPE | ++---------------------------+----------------------------------------+---------+ +| org.flywaydb | flyway-core | | +| mysql | mysql-connector-java | runtime | +| org.springframework.cloud | spring-cloud-starter-contract-verifier | test | ++---------------------------+----------------------------------------+---------+ +``` + +## Showcases + +Android Studio Analysis Examples + +![Call Examples](showcases/android-studio-call.svg) - - [x] bad smell support - - [x] longParameterList - - [x] longMethod - - [x] repeatedSwitches - - [x] complexIf - - [x] largeClass - - [x] refusedBequest - - [x] dataClass +## Roadmap + + - bad smell support - [x] sort method size - - [x] CLOC - - [x] API Visualization + - type + - [x] longParameterList + - [x] longMethod + - [x] repeatedSwitches + - [x] complexIf + - [x] largeClass + - [x] refusedBequest + - [x] dataClass + - CLOC + - HTTP API Visualization - [x] Spring Support - [x] @Service Support - [x] API Call Size - - [x] Git + - Git - [x] Revs Counts - [x] Summary - - [x] Concept - - [x] words NLP - - [x] call & rcall graph + - [ ] [git-quick-stats](https://github.com/arzzen/git-quick-stats) + - Concept + - [x] words NLP + - [ ] to domain + - Call & rcall graph - [x] Count Refs - - [x] AutoRefactor + - AutoRefactor - [x] remove unused - [x] move files - - [x] Evaluate + - Evaluate - [x] nullable count - [x] static count - [x] method num /length count - - [x] Todo Summary + - Todo Summary - [x] Todo with History & Author - - [x] Show all todos and history - - [ ] Suggest API for Design Patterns + - Suggest API for Design Patterns - [x] factory pattern - [x] strategy - [x] builder - [ ] cycle-deps -> adapter / agency - - [ ] Docs - - [ ] Lifecycle for new projects: evaluate (cloc, bad smell, api, git, todo) -> design -> patterns (suggest) -> refactoring () + - [ ] bad patterns + - [ ] singleton - Evaluate API - [x] Average Method Length - [x] Average Class Method Count - - Date Collections - - [ ] monolithic - - [ ] microservice - - [ ] big data - Tests - [ ] Testable? - - [ ] Test badsmell - - [x] Test bad smell list [https://testsmells.github.io/pages/testsmells.html] + - [x] Test badsmell -> list [https://testsmells.github.io/pages/testsmells.html] + - [x] IgnoreTest: @Ingore + - [x] EmptyTest: not call in test + - [x] RedundantPrintTest: system.out.println + - [x] SleepyTest: Time.sleep + - [x] RedundantAssertionTest: assertTrue(True) + - [x] UnknownTest: not assert + - [x] DuplicateAssertTest: assert > 5 + - [ ] TestersOnly: method only call by test + - [ ] CrossBorderTest: test method which not in system + - [ ] General Fixture: JUnit classes having at least one method not using the entire test fixture defined in the setUp() method - Arch - [x] Architecture Visualization - [ ] Architecture Guard - [ ] DSL Design + - Tech Debt from Source Code + - [ ] auto create story + - TBD + - Comment Analysis + - [ ] incorrect comment ? http://das.encs.concordia.ca/uploads/2018/02/Maldonado_thesis.pdf + - ~~Online Code Analysis~~ + - [x] ~~WASM support~~ + - [ ] ~~expose WASM API~~ + - [ ] ~~GitHub search code~~ + - [ ] ~~Pluggable~~ + - [ ] ~~plugin support (Windows Issues)~~ + - [x] Dependence Analysis + - [ ] Deps Related Counts + - [x] 3rd-party analysis XML or Groovy Scripts + - [x] Groovy Support + - [x] migrate to Golang Styles + - [ ] Story Cmd + - [ ] Auto create refactor story + - [ ] Clean Code Suggest + - [ ] JavaScript Version [clean-code-javascript](https://github.com/ryanmcdermott/clean-code-javascript) + - [ ] More CodeSmells + - [ ] Source [DesigniteJava](https://github.com/tushartushar/DesigniteJava) + +Documents Todo: + + - [ ] Docs + - [ ] Lifecycle for new projects: evaluate (cloc, bad smell, api, git, todo) -> design -> patterns (suggest) -> refactoring () + - Date Collections + - [ ] monolithic + - [ ] microservice + - [ ] big data Tech Debt + - Test for Windows - Duplicate Code - cmd/ -> user builder to refactoring diff --git a/_fixtures/bs/LargeClass.java b/_fixtures/bs/LargeClass.java new file mode 100644 index 0000000000000000000000000000000000000000..9f3fec6d7680dc93afd27e1ef6b9176e5fd9b5f1 --- /dev/null +++ b/_fixtures/bs/LargeClass.java @@ -0,0 +1,24 @@ +package com.phodal.coca.analysis.identifier.model; + +public class DataClass { + public void method1() {} + public void method2() {} + public void method3() {} + public void method4() {} + public void method5() {} + public void method6() {} + public void method7() {} + public void method8() {} + public void method9() {} + public void method10() {} + public void method11() {} + public void method12() {} + public void method13() {} + public void method14() {} + public void method15() {} + public void method16() {} + public void method17() {} + public void method18() {} + public void method19() {} + public void method20() {} +} diff --git a/_fixtures/bs/LazyClass.java b/_fixtures/bs/LazyClass.java new file mode 100644 index 0000000000000000000000000000000000000000..80f15f9f6055cefd041361edfb4af131557649ed --- /dev/null +++ b/_fixtures/bs/LazyClass.java @@ -0,0 +1,3 @@ +class LazyClass { + +} diff --git a/_fixtures/bs/LongParameter.java b/_fixtures/bs/LongParameter.java new file mode 100644 index 0000000000000000000000000000000000000000..9ece43e080a0051eb513227e3ac01b535c5c09c4 --- /dev/null +++ b/_fixtures/bs/LongParameter.java @@ -0,0 +1,7 @@ +package com.phodal.coca.analysis.identifier.model; + +public class LongParameter { + public void buildSomeThing(String time, int x, int y, int z, int a, int b) { + + } +} diff --git a/_fixtures/bs/MultipleIf.java b/_fixtures/bs/MultipleIf.java index 5e32b9bddaf6dd0ddc588e3aeb94ddb307b3e91d..42b6ba3a2709925c2edcdf132d643ee2dcd2613b 100644 --- a/_fixtures/bs/MultipleIf.java +++ b/_fixtures/bs/MultipleIf.java @@ -4,9 +4,9 @@ class MultipleIf { if (i == 10) System.out.println("i is 10"); - else if (i == 15) + if (i == 15) System.out.println("i is 15"); - else if (i == 20) + if (i == 20) System.out.println("i is 20"); if (i == 20) System.out.println("i is 20"); diff --git a/_fixtures/bs/graphcall/GraphCallA.java b/_fixtures/bs/graphcall/GraphCallA.java new file mode 100644 index 0000000000000000000000000000000000000000..55bd0285dc223bc73aaec8794510facea26ab029 --- /dev/null +++ b/_fixtures/bs/graphcall/GraphCallA.java @@ -0,0 +1,12 @@ + +package graphcall; + +public class GraphCallA { + private GraphCallB graphCallB; + private GraphCallC graphCallC; + + public void sayHi(){ + graphCallB.sayHi(); + graphCallC.sayHi(); + } +} diff --git a/_fixtures/bs/graphcall/GraphCallB.java b/_fixtures/bs/graphcall/GraphCallB.java new file mode 100644 index 0000000000000000000000000000000000000000..7dfe233e1bc4a04ec6627e5704ae19988aa90c3b --- /dev/null +++ b/_fixtures/bs/graphcall/GraphCallB.java @@ -0,0 +1,9 @@ +package graphcall; + +public class GraphCallB { + private GraphCallC graphCallC; + + public void sayHi(){ + graphCallC.sayHi(); + } +} diff --git a/_fixtures/bs/graphcall/GraphCallC.java b/_fixtures/bs/graphcall/GraphCallC.java new file mode 100644 index 0000000000000000000000000000000000000000..8db977dde4b42dd9b946d08bd1c779cba51521db --- /dev/null +++ b/_fixtures/bs/graphcall/GraphCallC.java @@ -0,0 +1,8 @@ +package graphcall; + +public class GraphCallC { + + public void sayHi(){ + System.out.println("hi"); + } +} diff --git a/_fixtures/call_api_test.json b/_fixtures/call/call_api_test.json similarity index 79% rename from _fixtures/call_api_test.json rename to _fixtures/call/call_api_test.json index 1355e15cc3ff2769c9adb7a94dcc474250081462..8b7e19be5b2b7d3ead4c7f37d41d1f8a66f046ea 100644 --- a/_fixtures/call_api_test.json +++ b/_fixtures/call/call_api_test.json @@ -1,7 +1,7 @@ [ { "Package": "com.phodal.pholedge.book", - "Class": "BookController", + "NodeName": "BookController", "Type": "Class", "Path": "examples/api/BookController.java", "Fields": [ @@ -10,7 +10,7 @@ "Value": "applicationService" } ], - "Methods": [ + "Functions": [ { "Name": "createBook", "Type": "Map\u003cString,String\u003e", @@ -24,12 +24,12 @@ "Type": "command" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.google.common.collect.ImmutableSortedMap.of", "Type": "", - "Class": "", - "MethodName": "of", + "NodeName": "", + "FunctionName": "of", "StartLine": 27, "StartLinePosition": 15, "StopLine": 27, @@ -38,8 +38,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "createBook", + "NodeName": "BookService", + "FunctionName": "createBook", "StartLine": 27, "StartLinePosition": 43, "StopLine": 27, @@ -66,12 +66,12 @@ "Type": "command" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "updateBook", + "NodeName": "BookService", + "FunctionName": "updateBook", "StartLine": 33, "StartLinePosition": 34, "StopLine": 33, @@ -89,12 +89,12 @@ "StopLine": 39, "StopLinePosition": 46, "Parameters": null, - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "getBooksLists", + "NodeName": "BookService", + "FunctionName": "getBooksLists", "StartLine": 38, "StartLinePosition": 34, "StopLine": 38, @@ -117,12 +117,12 @@ "Type": "id" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "getBookById", + "NodeName": "BookService", + "FunctionName": "getBookById", "StartLine": 43, "StartLinePosition": 34, "StopLine": 43, @@ -133,12 +133,12 @@ "Annotations": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.google.common.collect.ImmutableSortedMap.of", "Type": "", - "Class": "", - "MethodName": "of", + "NodeName": "", + "FunctionName": "of", "StartLine": 27, "StartLinePosition": 15, "StopLine": 27, @@ -147,8 +147,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "createBook", + "NodeName": "BookService", + "FunctionName": "createBook", "StartLine": 27, "StartLinePosition": 43, "StopLine": 27, @@ -157,8 +157,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "updateBook", + "NodeName": "BookService", + "FunctionName": "updateBook", "StartLine": 33, "StartLinePosition": 34, "StopLine": 33, @@ -167,8 +167,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "getBooksLists", + "NodeName": "BookService", + "FunctionName": "getBooksLists", "StartLine": 38, "StartLinePosition": 34, "StopLine": 38, @@ -177,8 +177,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookService", - "MethodName": "getBookById", + "NodeName": "BookService", + "FunctionName": "getBookById", "StartLine": 43, "StartLinePosition": 34, "StopLine": 43, @@ -190,7 +190,7 @@ }, { "Package": "com.phodal.pholedge.book", - "Class": "BookService", + "NodeName": "BookService", "Type": "Class", "Path": "examples/api/BookService.java", "Fields": [ @@ -203,7 +203,7 @@ "Value": "bookRepository" } ], - "Methods": [ + "Functions": [ { "Name": "getBookById", "Type": "BookRepresentaion", @@ -217,12 +217,12 @@ "Type": "id" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 36, "StartLinePosition": 35, "StopLine": 36, @@ -231,8 +231,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 37, "StartLinePosition": 20, "StopLine": 37, @@ -259,12 +259,12 @@ "Type": "command" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 41, "StartLinePosition": 35, "StopLine": 41, @@ -273,8 +273,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "save", + "NodeName": "Book", + "FunctionName": "save", "StartLine": 42, "StartLinePosition": 13, "StopLine": 42, @@ -283,8 +283,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getIsbn", + "NodeName": "UpdateBookCommand", + "FunctionName": "getIsbn", "StartLine": 42, "StartLinePosition": 26, "StopLine": 42, @@ -293,8 +293,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getName", + "NodeName": "UpdateBookCommand", + "FunctionName": "getName", "StartLine": 42, "StartLinePosition": 45, "StopLine": 42, @@ -303,8 +303,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 43, "StartLinePosition": 23, "StopLine": 43, @@ -313,8 +313,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 44, "StartLinePosition": 20, "StopLine": 44, @@ -337,12 +337,12 @@ "Type": "command" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookFactory", - "MethodName": "create", + "NodeName": "BookFactory", + "FunctionName": "create", "StartLine": 26, "StartLinePosition": 32, "StopLine": 26, @@ -351,8 +351,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getIsbn", + "NodeName": "CreateBookCommand", + "FunctionName": "getIsbn", "StartLine": 26, "StartLinePosition": 47, "StopLine": 26, @@ -361,8 +361,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getName", + "NodeName": "CreateBookCommand", + "FunctionName": "getName", "StartLine": 26, "StartLinePosition": 66, "StopLine": 26, @@ -371,8 +371,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 27, "StartLinePosition": 23, "StopLine": 27, @@ -381,8 +381,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "getId", + "NodeName": "Book", + "FunctionName": "getId", "StartLine": 28, "StartLinePosition": 20, "StopLine": 28, @@ -400,12 +400,12 @@ "StopLine": 33, "StopLinePosition": 48, "Parameters": null, - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, @@ -416,12 +416,12 @@ "Annotations": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookFactory", - "MethodName": "create", + "NodeName": "BookFactory", + "FunctionName": "create", "StartLine": 26, "StartLinePosition": 32, "StopLine": 26, @@ -430,8 +430,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getIsbn", + "NodeName": "CreateBookCommand", + "FunctionName": "getIsbn", "StartLine": 26, "StartLinePosition": 47, "StopLine": 26, @@ -440,8 +440,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getName", + "NodeName": "CreateBookCommand", + "FunctionName": "getName", "StartLine": 26, "StartLinePosition": 66, "StopLine": 26, @@ -450,8 +450,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 27, "StartLinePosition": 23, "StopLine": 27, @@ -460,8 +460,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "getId", + "NodeName": "Book", + "FunctionName": "getId", "StartLine": 28, "StartLinePosition": 20, "StopLine": 28, @@ -470,8 +470,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, @@ -480,8 +480,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 36, "StartLinePosition": 35, "StopLine": 36, @@ -490,8 +490,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 37, "StartLinePosition": 20, "StopLine": 37, @@ -500,8 +500,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 41, "StartLinePosition": 35, "StopLine": 41, @@ -510,8 +510,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "save", + "NodeName": "Book", + "FunctionName": "save", "StartLine": 42, "StartLinePosition": 13, "StopLine": 42, @@ -520,8 +520,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getIsbn", + "NodeName": "UpdateBookCommand", + "FunctionName": "getIsbn", "StartLine": 42, "StartLinePosition": 26, "StopLine": 42, @@ -530,8 +530,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getName", + "NodeName": "UpdateBookCommand", + "FunctionName": "getName", "StartLine": 42, "StartLinePosition": 45, "StopLine": 42, @@ -540,8 +540,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 43, "StartLinePosition": 23, "StopLine": 43, @@ -550,8 +550,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 44, "StartLinePosition": 20, "StopLine": 44, diff --git a/_fixtures/cloc/.gitignore b/_fixtures/cloc/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7ce0c517eb4cb8bb9f611f8e9df98fdd6bc02114 --- /dev/null +++ b/_fixtures/cloc/.gitignore @@ -0,0 +1 @@ +!someignore/.idea/ diff --git a/examples/bs/DataClass.java b/_fixtures/cloc/normal/pkg/DataClass.java similarity index 100% rename from examples/bs/DataClass.java rename to _fixtures/cloc/normal/pkg/DataClass.java diff --git a/_fixtures/cloc/normal/pkg/hello.kt b/_fixtures/cloc/normal/pkg/hello.kt new file mode 100644 index 0000000000000000000000000000000000000000..1e42b4ff19a76f11dddf1658181b013a3e87536f --- /dev/null +++ b/_fixtures/cloc/normal/pkg/hello.kt @@ -0,0 +1,3 @@ +fun main(args: Array) { + println("Hello World!") +} diff --git a/_fixtures/cloc/someignore/.idea/hello.java b/_fixtures/cloc/someignore/.idea/hello.java new file mode 100644 index 0000000000000000000000000000000000000000..a410a3af2b64ae083ee5050884e68dd1145cf6be --- /dev/null +++ b/_fixtures/cloc/someignore/.idea/hello.java @@ -0,0 +1,22 @@ +package com.phodal.coca.analysis.identifier.model; + +public class DataClass { + private String date; + private String time; + + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } +} diff --git a/_fixtures/cloc/summary/android.json b/_fixtures/cloc/summary/android.json new file mode 100644 index 0000000000000000000000000000000000000000..aebfe97e79f75fd848ae3a81d225979199a3e4e3 --- /dev/null +++ b/_fixtures/cloc/summary/android.json @@ -0,0 +1 @@ +[{"Name":"XML","Bytes":12763494,"CodeBytes":0,"Lines":223838,"Code":206000,"Comment":11368,"Blank":6470,"Complexity":0,"Count":9269,"WeightedComplexity":0,"Files":[]},{"Name":"Java","Bytes":21201489,"CodeBytes":0,"Lines":541088,"Code":381639,"Comment":93529,"Blank":65920,"Complexity":43975,"Count":4440,"WeightedComplexity":0,"Files":[]},{"Name":"Kotlin","Bytes":7141418,"CodeBytes":0,"Lines":175415,"Code":123963,"Comment":31591,"Blank":19861,"Complexity":7686,"Count":2142,"WeightedComplexity":0,"Files":[]},{"Name":"Gradle","Bytes":415024,"CodeBytes":0,"Lines":17101,"Code":15273,"Comment":432,"Blank":1396,"Complexity":0,"Count":1508,"WeightedComplexity":0,"Files":[]},{"Name":"Plain Text","Bytes":5185137,"CodeBytes":0,"Lines":94703,"Code":94544,"Comment":0,"Blank":159,"Complexity":0,"Count":150,"WeightedComplexity":0,"Files":[]},{"Name":"gitignore","Bytes":7084,"CodeBytes":0,"Lines":533,"Code":533,"Comment":0,"Blank":0,"Complexity":0,"Count":97,"WeightedComplexity":0,"Files":[]},{"Name":"Properties File","Bytes":637870,"CodeBytes":0,"Lines":2085,"Code":1659,"Comment":372,"Blank":54,"Complexity":0,"Count":80,"WeightedComplexity":0,"Files":[]},{"Name":"Prolog","Bytes":32671,"CodeBytes":0,"Lines":863,"Code":753,"Comment":0,"Blank":110,"Complexity":0,"Count":51,"WeightedComplexity":0,"Files":[]},{"Name":"HTML","Bytes":1386728,"CodeBytes":0,"Lines":39973,"Code":29951,"Comment":261,"Blank":9761,"Complexity":0,"Count":44,"WeightedComplexity":0,"Files":[]},{"Name":"JSON","Bytes":5835319,"CodeBytes":0,"Lines":166718,"Code":166714,"Comment":0,"Blank":4,"Complexity":0,"Count":26,"WeightedComplexity":0,"Files":[]},{"Name":"Forth","Bytes":4272,"CodeBytes":0,"Lines":142,"Code":120,"Comment":0,"Blank":22,"Complexity":25,"Count":18,"WeightedComplexity":0,"Files":[]},{"Name":"Markdown","Bytes":92997,"CodeBytes":0,"Lines":1302,"Code":951,"Comment":0,"Blank":351,"Complexity":0,"Count":13,"WeightedComplexity":0,"Files":[]},{"Name":"Batch","Bytes":18632,"CodeBytes":0,"Lines":702,"Code":513,"Comment":0,"Blank":189,"Complexity":170,"Count":10,"WeightedComplexity":0,"Files":[]},{"Name":"BASH","Bytes":25182,"CodeBytes":0,"Lines":812,"Code":606,"Comment":108,"Blank":98,"Complexity":96,"Count":5,"WeightedComplexity":0,"Files":[]},{"Name":"CMake","Bytes":5004,"CodeBytes":0,"Lines":141,"Code":39,"Comment":64,"Blank":38,"Complexity":0,"Count":4,"WeightedComplexity":0,"Files":[]},{"Name":"C++","Bytes":842,"CodeBytes":0,"Lines":30,"Code":27,"Comment":0,"Blank":3,"Complexity":0,"Count":3,"WeightedComplexity":0,"Files":[]},{"Name":"SVG","Bytes":10949,"CodeBytes":0,"Lines":183,"Code":162,"Comment":16,"Blank":5,"Complexity":0,"Count":3,"WeightedComplexity":0,"Files":[]},{"Name":"Shell","Bytes":15888,"CodeBytes":0,"Lines":516,"Code":399,"Comment":63,"Blank":54,"Complexity":57,"Count":3,"WeightedComplexity":0,"Files":[]},{"Name":"Android Interface Definition Language","Bytes":2650,"CodeBytes":0,"Lines":62,"Code":62,"Comment":0,"Blank":0,"Complexity":0,"Count":2,"WeightedComplexity":0,"Files":[]},{"Name":"C","Bytes":1874,"CodeBytes":0,"Lines":63,"Code":39,"Comment":22,"Blank":2,"Complexity":0,"Count":2,"WeightedComplexity":0,"Files":[]},{"Name":"XML Schema","Bytes":474,"CodeBytes":0,"Lines":15,"Code":13,"Comment":0,"Blank":2,"Complexity":0,"Count":2,"WeightedComplexity":0,"Files":[]},{"Name":"Protocol Buffers","Bytes":4929,"CodeBytes":0,"Lines":143,"Code":55,"Comment":63,"Blank":25,"Complexity":0,"Count":1,"WeightedComplexity":0,"Files":[]},{"Name":"Rust","Bytes":0,"CodeBytes":0,"Lines":0,"Code":0,"Comment":0,"Blank":0,"Complexity":0,"Count":1,"WeightedComplexity":0,"Files":[]}] \ No newline at end of file diff --git a/_fixtures/count/call.json b/_fixtures/count/call.json index 395b89cd124b67d6b1ad6dd05b8ba0a863d213ba..c396c497e3a84082558a1a6573b8c1ac9467fe82 100644 --- a/_fixtures/count/call.json +++ b/_fixtures/count/call.json @@ -1,7 +1,7 @@ [ { "Package": "com.phodal.pholedge.book", - "Class": "BookController", + "NodeName": "BookController", "Type": "Class", "Path": "examples/api/BookController.java", "Fields": [ @@ -10,7 +10,7 @@ "Value": "applicationService" } ], - "Methods": [ + "Functions": [ { "Name": "BookController", "Type": "", @@ -24,7 +24,7 @@ "Type": "BookService" } ], - "MethodCalls": null, + "FunctionCalls": null, "Override": false, "Annotations": null, "IsConstructor": true @@ -42,12 +42,12 @@ "Type": "CreateBookCommand" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.google.common.collect.ImmutableSortedMap.of", "Type": "", - "Class": "", - "MethodName": "of", + "NodeName": "", + "FunctionName": "of", "StartLine": 27, "StartLinePosition": 15, "StopLine": 27, @@ -56,8 +56,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "createBook", + "NodeName": "BookService", + "FunctionName": "createBook", "StartLine": 27, "StartLinePosition": 43, "StopLine": 27, @@ -85,12 +85,12 @@ "Type": "UpdateBookCommand" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "updateBook", + "NodeName": "BookService", + "FunctionName": "updateBook", "StartLine": 33, "StartLinePosition": 34, "StopLine": 33, @@ -109,12 +109,12 @@ "StopLine": 39, "StopLinePosition": 46, "Parameters": null, - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "getBooksLists", + "NodeName": "BookService", + "FunctionName": "getBooksLists", "StartLine": 38, "StartLinePosition": 34, "StopLine": 38, @@ -138,12 +138,12 @@ "Type": "String" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "getBookById", + "NodeName": "BookService", + "FunctionName": "getBookById", "StartLine": 43, "StartLinePosition": 34, "StopLine": 43, @@ -155,12 +155,12 @@ "IsConstructor": false } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.google.common.collect.ImmutableSortedMap.of", "Type": "", - "Class": "", - "MethodName": "of", + "NodeName": "", + "FunctionName": "of", "StartLine": 27, "StartLinePosition": 15, "StopLine": 27, @@ -169,8 +169,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "createBook", + "NodeName": "BookService", + "FunctionName": "createBook", "StartLine": 27, "StartLinePosition": 43, "StopLine": 27, @@ -179,8 +179,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "updateBook", + "NodeName": "BookService", + "FunctionName": "updateBook", "StartLine": 33, "StartLinePosition": 34, "StopLine": 33, @@ -189,8 +189,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "getBooksLists", + "NodeName": "BookService", + "FunctionName": "getBooksLists", "StartLine": 38, "StartLinePosition": 34, "StopLine": 38, @@ -199,8 +199,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookService", - "MethodName": "getBookById", + "NodeName": "BookService", + "FunctionName": "getBookById", "StartLine": 43, "StartLinePosition": 34, "StopLine": 43, @@ -212,7 +212,7 @@ }, { "Package": "com.phodal.pholedge.book", - "Class": "BookService", + "NodeName": "BookService", "Type": "Class", "Path": "examples/api/BookService.java", "Fields": [ @@ -225,7 +225,7 @@ "Value": "bookRepository" } ], - "Methods": [ + "Functions": [ { "Name": "createBook", "Type": "String", @@ -239,12 +239,12 @@ "Type": "CreateBookCommand" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "Book", - "MethodName": "create", + "NodeName": "Book", + "FunctionName": "create", "StartLine": 26, "StartLinePosition": 32, "StopLine": 26, @@ -253,8 +253,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getIsbn", + "NodeName": "CreateBookCommand", + "FunctionName": "getIsbn", "StartLine": 26, "StartLinePosition": 47, "StopLine": 26, @@ -263,8 +263,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getName", + "NodeName": "CreateBookCommand", + "FunctionName": "getName", "StartLine": 26, "StartLinePosition": 66, "StopLine": 26, @@ -273,8 +273,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 27, "StartLinePosition": 23, "StopLine": 27, @@ -283,8 +283,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "getId", + "NodeName": "Book", + "FunctionName": "getId", "StartLine": 28, "StartLinePosition": 20, "StopLine": 28, @@ -303,12 +303,12 @@ "StopLine": 33, "StopLinePosition": 48, "Parameters": null, - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, @@ -332,12 +332,12 @@ "Type": "String" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "Book", - "MethodName": "byId", + "NodeName": "Book", + "FunctionName": "byId", "StartLine": 36, "StartLinePosition": 35, "StopLine": 36, @@ -346,8 +346,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 37, "StartLinePosition": 20, "StopLine": 37, @@ -375,12 +375,12 @@ "Type": "UpdateBookCommand" } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "Book", - "MethodName": "byId", + "NodeName": "Book", + "FunctionName": "byId", "StartLine": 41, "StartLinePosition": 35, "StopLine": 41, @@ -389,8 +389,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "save", + "NodeName": "Book", + "FunctionName": "save", "StartLine": 42, "StartLinePosition": 13, "StopLine": 42, @@ -399,8 +399,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getIsbn", + "NodeName": "UpdateBookCommand", + "FunctionName": "getIsbn", "StartLine": 42, "StartLinePosition": 26, "StopLine": 42, @@ -409,8 +409,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getName", + "NodeName": "UpdateBookCommand", + "FunctionName": "getName", "StartLine": 42, "StartLinePosition": 45, "StopLine": 42, @@ -419,8 +419,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 43, "StartLinePosition": 23, "StopLine": 43, @@ -429,8 +429,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 44, "StartLinePosition": 20, "StopLine": 44, @@ -458,18 +458,18 @@ "Type": "BookRepository" } ], - "MethodCalls": null, + "FunctionCalls": null, "Override": false, "Annotations": null, "IsConstructor": true } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "Book", - "MethodName": "create", + "NodeName": "Book", + "FunctionName": "create", "StartLine": 26, "StartLinePosition": 32, "StopLine": 26, @@ -478,8 +478,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getIsbn", + "NodeName": "CreateBookCommand", + "FunctionName": "getIsbn", "StartLine": 26, "StartLinePosition": 47, "StopLine": 26, @@ -488,8 +488,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getName", + "NodeName": "CreateBookCommand", + "FunctionName": "getName", "StartLine": 26, "StartLinePosition": 66, "StopLine": 26, @@ -498,8 +498,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 27, "StartLinePosition": 23, "StopLine": 27, @@ -508,8 +508,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "getId", + "NodeName": "Book", + "FunctionName": "getId", "StartLine": 28, "StartLinePosition": 20, "StopLine": 28, @@ -518,8 +518,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, @@ -528,8 +528,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "Book", - "MethodName": "byId", + "NodeName": "Book", + "FunctionName": "byId", "StartLine": 36, "StartLinePosition": 35, "StopLine": 36, @@ -538,8 +538,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 37, "StartLinePosition": 20, "StopLine": 37, @@ -548,8 +548,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "Book", - "MethodName": "byId", + "NodeName": "Book", + "FunctionName": "byId", "StartLine": 41, "StartLinePosition": 35, "StopLine": 41, @@ -558,8 +558,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "save", + "NodeName": "Book", + "FunctionName": "save", "StartLine": 42, "StartLinePosition": 13, "StopLine": 42, @@ -568,8 +568,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getIsbn", + "NodeName": "UpdateBookCommand", + "FunctionName": "getIsbn", "StartLine": 42, "StartLinePosition": 26, "StopLine": 42, @@ -578,8 +578,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getName", + "NodeName": "UpdateBookCommand", + "FunctionName": "getName", "StartLine": 42, "StartLinePosition": 45, "StopLine": 42, @@ -588,8 +588,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 43, "StartLinePosition": 23, "StopLine": 43, @@ -598,8 +598,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 44, "StartLinePosition": 20, "StopLine": 44, diff --git a/_fixtures/deps/gradle/build.gradle b/_fixtures/deps/gradle/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..c283dbf3af1cd539a236f77b44f13064daec6449 --- /dev/null +++ b/_fixtures/deps/gradle/build.gradle @@ -0,0 +1,63 @@ +buildscript { + repositories { + mavenCentral() + jcenter() + } +} + +plugins { + id 'java' + id 'org.springframework.boot' version '2.2.2.RELEASE' +} + +apply plugin: 'io.spring.dependency-management' + +group = 'study.huhao.demo' +version = '1.0.0' +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 + +configurations { + developmentOnly + runtimeClasspath { + extendsFrom developmentOnly + } + compileOnly { + extendsFrom annotationProcessor + } +} + +repositories { + mavenCentral() + jcenter() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' + developmentOnly 'org.springframework.boot:spring-boot-devtools' + testImplementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + exclude module: 'junit' + } + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.5.2' + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' + + runtimeOnly 'mysql:mysql-connector-java' + + implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.1' + testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:2.1.1' + + implementation 'org.flywaydb:flyway-core' + testImplementation 'org.flywaydb.flyway-test-extensions:flyway-spring-test:6.0.0' + + testImplementation 'io.rest-assured:rest-assured' + + testImplementation 'com.tngtech.archunit:archunit-junit5-api:0.12.0' + testRuntimeOnly 'com.tngtech.archunit:archunit-junit5-engine:0.12.0' +} + +test { + useJUnitPlatform() +} diff --git a/_fixtures/deps/gradle_sample/build.gradle b/_fixtures/deps/gradle_sample/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..c7f83966f215e2b90967f19cc18ead8a063afd8f --- /dev/null +++ b/_fixtures/deps/gradle_sample/build.gradle @@ -0,0 +1,57 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.2.1.RELEASE' + } +} + +plugins { + id 'org.springframework.boot' version '2.2.2.RELEASE' + id 'io.spring.dependency-management' version '1.0.8.RELEASE' + id 'java' +} + +apply plugin: 'spring-cloud-contract' + +group = 'com.phodal.coco' +version = '0.0.1-SNAPSHOT' +sourceCompatibility = '1.8' + +repositories { + mavenCentral() +} + +ext { + set('springCloudVersion', "Hoxton.SR1") +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-jersey' + implementation 'org.springframework.boot:spring-boot-starter-webflux' + implementation 'org.flywaydb:flyway-core' + implementation 'org.springframework.cloud:spring-cloud-starter-zipkin' + implementation 'org.springframework.cloud:spring-cloud-starter-zookeeper-config' + testImplementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + testImplementation 'io.projectreactor:reactor-test' + testImplementation 'org.springframework.cloud:spring-cloud-starter-contract-stub-runner' + testImplementation 'org.springframework.cloud:spring-cloud-starter-contract-verifier' +} + +dependencyManagement { + imports { + mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" + } +} + +contracts { + targetFramework = org.springframework.cloud.contract.verifier.config.TestFramework.JUNIT5 + testMode = 'WebTestClient' +} + +test { + useJUnitPlatform() +} diff --git a/_fixtures/deps/gradle_sample/settings.gradle b/_fixtures/deps/gradle_sample/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..93f91f02e7a79d150a9b50fa2ace6aa8a485243a --- /dev/null +++ b/_fixtures/deps/gradle_sample/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'gradledemo' diff --git a/_fixtures/deps/gradle_sample/src/main/java/com/phodal/coco/gradledemo/GradledemoApplication.java b/_fixtures/deps/gradle_sample/src/main/java/com/phodal/coco/gradledemo/GradledemoApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..7db7a616fdedb342cb5380805a50a1a0a8687140 --- /dev/null +++ b/_fixtures/deps/gradle_sample/src/main/java/com/phodal/coco/gradledemo/GradledemoApplication.java @@ -0,0 +1,13 @@ +package com.phodal.coco.gradledemo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class GradledemoApplication { + + public static void main(String[] args) { + SpringApplication.run(GradledemoApplication.class, args); + } + +} diff --git a/_fixtures/deps/gradle_sample/src/main/resources/application.properties b/_fixtures/deps/gradle_sample/src/main/resources/application.properties new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/_fixtures/deps/gradle_sample/src/main/resources/application.properties @@ -0,0 +1 @@ + diff --git a/_fixtures/deps/gradle_sample/src/test/java/com/phodal/coco/gradledemo/GradledemoApplicationTests.java b/_fixtures/deps/gradle_sample/src/test/java/com/phodal/coco/gradledemo/GradledemoApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..3111046b609323bfac0c88edde8a8179690de636 --- /dev/null +++ b/_fixtures/deps/gradle_sample/src/test/java/com/phodal/coco/gradledemo/GradledemoApplicationTests.java @@ -0,0 +1,13 @@ +package com.phodal.coco.gradledemo; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class GradledemoApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/_fixtures/deps/maven/pom.xml b/_fixtures/deps/maven/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..5cdf2285f66677879c35e5063ff68a386e09c2a4 --- /dev/null +++ b/_fixtures/deps/maven/pom.xml @@ -0,0 +1,163 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.3.BUILD-SNAPSHOT + + + com.phodal.coca + depstest + 0.0.1-SNAPSHOT + depstest + Demo project for Spring Boot + + + 1.8 + Hoxton.BUILD-SNAPSHOT + + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-oauth2-client + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-webflux + + + org.springframework.cloud + spring-cloud-starter + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + io.projectreactor + reactor-test + test + + + org.springframework.restdocs + spring-restdocs-mockmvc + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.asciidoctor + asciidoctor-maven-plugin + 1.5.8 + + + generate-docs + prepare-package + + process-asciidoc + + + html + book + + + + + + org.springframework.restdocs + spring-restdocs-asciidoctor + ${spring-restdocs.version} + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + + diff --git a/_fixtures/deps/maven_sample/.gitignore b/_fixtures/deps/maven_sample/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..34f77a5411cdd4a467026aa906b76402d35e1bb3 --- /dev/null +++ b/_fixtures/deps/maven_sample/.gitignore @@ -0,0 +1,2 @@ +!src/main/java/**/* +!src/test/java/**/* \ No newline at end of file diff --git a/_fixtures/deps/maven_sample/pom.xml b/_fixtures/deps/maven_sample/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..3d1bfb5ed120b6a5d1fd30a8485ee627efcf03f6 --- /dev/null +++ b/_fixtures/deps/maven_sample/pom.xml @@ -0,0 +1,89 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.2.2.RELEASE + + + com.phodal.coca + depanalysis + 0.0.1-SNAPSHOT + depanalysis + Demo project for Spring Boot + + + 1.8 + Hoxton.SR1 + + + + + org.springframework.boot + spring-boot-starter-jersey + + + org.springframework.boot + spring-boot-starter-web + + + org.flywaydb + flyway-core + + + + mysql + mysql-connector-java + runtime + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + org.springframework.cloud + spring-cloud-starter-contract-verifier + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.cloud + spring-cloud-contract-maven-plugin + 2.2.1.RELEASE + true + + JUNIT5 + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/_fixtures/deps/maven_sample/src/main/java/com/phodal/coca/depanalysis/DepanalysisApplication.java b/_fixtures/deps/maven_sample/src/main/java/com/phodal/coca/depanalysis/DepanalysisApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..a58ebd075570629f3945eb7a87245970f8335349 --- /dev/null +++ b/_fixtures/deps/maven_sample/src/main/java/com/phodal/coca/depanalysis/DepanalysisApplication.java @@ -0,0 +1,13 @@ +package com.phodal.coca.depanalysis; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class DepanalysisApplication { + + public static void main(String[] args) { + SpringApplication.run(DepanalysisApplication.class, args); + } + +} diff --git a/_fixtures/deps/maven_sample/src/main/resources/application.properties b/_fixtures/deps/maven_sample/src/main/resources/application.properties new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/_fixtures/deps/maven_sample/src/main/resources/application.properties @@ -0,0 +1 @@ + diff --git a/_fixtures/deps/maven_sample/src/test/java/com/phodal/coca/depanalysis/DepanalysisApplicationTests.java b/_fixtures/deps/maven_sample/src/test/java/com/phodal/coca/depanalysis/DepanalysisApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..14b02aaa519e8b5a8741ea7ebfa9bfcca742d455 --- /dev/null +++ b/_fixtures/deps/maven_sample/src/test/java/com/phodal/coca/depanalysis/DepanalysisApplicationTests.java @@ -0,0 +1,13 @@ +package com.phodal.coca.depanalysis; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class DepanalysisApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/_fixtures/evaluate/checkfornull/StreamCheckForNull.java b/_fixtures/evaluate/checkfornull/StreamCheckForNull.java new file mode 100644 index 0000000000000000000000000000000000000000..08e23eec4be003b3d0d8c12808752cbabab8b95c --- /dev/null +++ b/_fixtures/evaluate/checkfornull/StreamCheckForNull.java @@ -0,0 +1,10 @@ +package checkfornull; + +import javax.annotation.CheckForNull; + +public class StreamCheckForNull { + @CheckForNull + public static String orElseNull() { + + } +} diff --git a/_fixtures/evaluate/service.json b/_fixtures/evaluate/service.json index a4c2408aa2972a8c24790e31e6bf0cf320f5de95..ddb0c966b24814c8f1f5a7119f55b61a08e7b60c 100644 --- a/_fixtures/evaluate/service.json +++ b/_fixtures/evaluate/service.json @@ -1,7 +1,7 @@ [ { "Package": "com.phodal.pholedge.book", - "Class": "BookService", + "NodeName": "BookService", "Type": "Class", "Path": "examples/api/BookService.java", "Fields": [ @@ -14,7 +14,7 @@ "Value": "bookRepository" } ], - "Methods": [ + "Functions": [ { "Name": "getBooksLists", "Type": "List\u003cBookRepresentaion\u003e", @@ -27,8 +27,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, @@ -55,8 +55,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 36, "StartLinePosition": 35, "StopLine": 36, @@ -65,8 +65,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 37, "StartLinePosition": 20, "StopLine": 37, @@ -97,8 +97,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 41, "StartLinePosition": 35, "StopLine": 41, @@ -107,8 +107,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "save", + "NodeName": "Book", + "FunctionName": "save", "StartLine": 42, "StartLinePosition": 13, "StopLine": 42, @@ -117,8 +117,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getIsbn", + "NodeName": "UpdateBookCommand", + "FunctionName": "getIsbn", "StartLine": 42, "StartLinePosition": 26, "StopLine": 42, @@ -127,8 +127,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getName", + "NodeName": "UpdateBookCommand", + "FunctionName": "getName", "StartLine": 42, "StartLinePosition": 45, "StopLine": 42, @@ -137,8 +137,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 43, "StartLinePosition": 23, "StopLine": 43, @@ -147,8 +147,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 44, "StartLinePosition": 20, "StopLine": 44, @@ -175,8 +175,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookFactory", - "MethodName": "create", + "NodeName": "BookFactory", + "FunctionName": "create", "StartLine": 26, "StartLinePosition": 32, "StopLine": 26, @@ -185,8 +185,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getIsbn", + "NodeName": "CreateBookCommand", + "FunctionName": "getIsbn", "StartLine": 26, "StartLinePosition": 47, "StopLine": 26, @@ -195,8 +195,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getName", + "NodeName": "CreateBookCommand", + "FunctionName": "getName", "StartLine": 26, "StartLinePosition": 66, "StopLine": 26, @@ -205,8 +205,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 27, "StartLinePosition": 23, "StopLine": 27, @@ -215,8 +215,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "getId", + "NodeName": "Book", + "FunctionName": "getId", "StartLine": 28, "StartLinePosition": 20, "StopLine": 28, @@ -231,8 +231,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookFactory", - "MethodName": "create", + "NodeName": "BookFactory", + "FunctionName": "create", "StartLine": 26, "StartLinePosition": 32, "StopLine": 26, @@ -241,8 +241,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getIsbn", + "NodeName": "CreateBookCommand", + "FunctionName": "getIsbn", "StartLine": 26, "StartLinePosition": 47, "StopLine": 26, @@ -251,8 +251,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "CreateBookCommand", - "MethodName": "getName", + "NodeName": "CreateBookCommand", + "FunctionName": "getName", "StartLine": 26, "StartLinePosition": 66, "StopLine": 26, @@ -261,8 +261,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 27, "StartLinePosition": 23, "StopLine": 27, @@ -271,8 +271,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "getId", + "NodeName": "Book", + "FunctionName": "getId", "StartLine": 28, "StartLinePosition": 20, "StopLine": 28, @@ -281,8 +281,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, @@ -291,8 +291,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 36, "StartLinePosition": 35, "StopLine": 36, @@ -301,8 +301,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 37, "StartLinePosition": 20, "StopLine": 37, @@ -311,8 +311,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "byId", + "NodeName": "BookRepository", + "FunctionName": "byId", "StartLine": 41, "StartLinePosition": 35, "StopLine": 41, @@ -321,8 +321,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "save", + "NodeName": "Book", + "FunctionName": "save", "StartLine": 42, "StartLinePosition": 13, "StopLine": 42, @@ -331,8 +331,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getIsbn", + "NodeName": "UpdateBookCommand", + "FunctionName": "getIsbn", "StartLine": 42, "StartLinePosition": 26, "StopLine": 42, @@ -341,8 +341,8 @@ { "Package": "com.phodal.pholedge.book.model.command", "Type": "chain", - "Class": "UpdateBookCommand", - "MethodName": "getName", + "NodeName": "UpdateBookCommand", + "FunctionName": "getName", "StartLine": 42, "StartLinePosition": 45, "StopLine": 42, @@ -351,8 +351,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "save", + "NodeName": "BookRepository", + "FunctionName": "save", "StartLine": 43, "StartLinePosition": 23, "StopLine": 43, @@ -361,8 +361,8 @@ { "Package": "com.phodal.pholedge.book.model", "Type": "chain", - "Class": "Book", - "MethodName": "toRepresentation", + "NodeName": "Book", + "FunctionName": "toRepresentation", "StartLine": 44, "StartLinePosition": 20, "StopLine": 44, diff --git a/_fixtures/evaluate/service_lifecycle.json b/_fixtures/evaluate/service_lifecycle.json index 91a5d3cbf76f53e1f99ebec7eacb10b803e98ac4..771495ab89bc5c3fd13bf21b6e27949be975a158 100644 --- a/_fixtures/evaluate/service_lifecycle.json +++ b/_fixtures/evaluate/service_lifecycle.json @@ -1,7 +1,7 @@ [ { "Package": "com.phodal.pholedge.book", - "Class": "BookService", + "NodeName": "BookService", "Type": "Class", "Path": "examples/api/BookService.java", "Fields": [ @@ -14,7 +14,7 @@ "Value": "bookRepository" } ], - "Methods": [ + "Functions": [ { "Name": "doSave", "Type": "List\u003cBookRepresentaion\u003e", @@ -27,8 +27,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, diff --git a/_fixtures/evaluate/service_long_parameters.json b/_fixtures/evaluate/service_long_parameters.json index c645481ed2059a797a5a5c816ee2dce772a6b4d1..d8d0b7ae86dcb156284049d1e7dbd1f100a74516 100644 --- a/_fixtures/evaluate/service_long_parameters.json +++ b/_fixtures/evaluate/service_long_parameters.json @@ -1,7 +1,7 @@ [ { "Package": "com.phodal.pholedge.book", - "Class": "BookService", + "NodeName": "BookService", "Type": "Class", "Path": "examples/api/BookService.java", "Fields": [ @@ -14,7 +14,7 @@ "Value": "bookRepository" } ], - "Methods": [ + "Functions": [ { "Name": "updateA", "Type": "BookA", @@ -24,24 +24,24 @@ "StopLinePosition": 40, "Parameters": [ { - "Name": "String", - "Type": "firstname" + "TypeType": "String", + "TypeValue": "firstname" }, { - "Name": "String", - "Type": "lastname" + "TypeType": "String", + "TypeValue": "lastname" }, { - "Name": "String", - "Type": "address" + "TypeType": "String", + "TypeValue": "address" }, { - "Name": "String", - "Type": "age" + "TypeType": "String", + "TypeValue": "age" }, { - "Name": "String", - "Type": "id" + "TypeType": "String", + "TypeValue": "id" } ], "MethodCalls": [], @@ -50,7 +50,6 @@ } ], "MethodCalls": [ - ], "Extend": "", "Implements": [ @@ -59,7 +58,7 @@ }, { "Package": "com.phodal.pholedge.book.model", - "Class": "BookBService", + "NodeName": "BookBService", "Type": "Class", "Path": "examples/api/model/BookRepresentaion.java", "Fields": [ @@ -72,7 +71,7 @@ "Value": "name" } ], - "Methods": [ + "Functions": [ { "Name": "updateB", "Type": "BookB", @@ -82,24 +81,24 @@ "StopLinePosition": 40, "Parameters": [ { - "Name": "String", - "Type": "name" + "TypeType": "String", + "TypeValue": "name" }, { - "Name": "String", - "Type": "firstname" + "TypeType": "String", + "TypeValue": "firstname" }, { - "Name": "String", - "Type": "lastname" + "TypeType": "String", + "TypeValue": "lastname" }, { - "Name": "String", - "Type": "address" + "TypeType": "String", + "TypeValue": "address" }, { - "Name": "String", - "Type": "age" + "TypeType": "String", + "TypeValue": "age" } ], "MethodCalls": [], @@ -113,7 +112,7 @@ }, { "Package": "com.phodal.pholedge.book.model", - "Class": "BookCService", + "NodeName": "BookCService", "Type": "Class", "Path": "examples/api/model/BookRepresentaion.java", "Fields": [ @@ -126,7 +125,7 @@ "Value": "name" } ], - "Methods": [ + "Functions": [ { "Name": "doUpdate", "Type": "String", @@ -136,7 +135,7 @@ "StopLinePosition": 40, "Parameters": [ { - "Name": "String", + "TypeType": "String", "Type": "age" } ], diff --git a/_fixtures/evaluate/service_same_return_type.json b/_fixtures/evaluate/service_same_return_type.json index 84a67c6f507628816e01bf8f60ef711fbb2427ca..1c1aa98c6d56273f2a6d84f85cd63093694aa2d4 100644 --- a/_fixtures/evaluate/service_same_return_type.json +++ b/_fixtures/evaluate/service_same_return_type.json @@ -1,7 +1,7 @@ [ { "Package": "com.phodal.pholedge.book", - "Class": "BookService", + "NodeName": "BookService", "Type": "Class", "Path": "examples/api/BookService.java", "Fields": [ @@ -14,10 +14,10 @@ "Value": "bookRepository" } ], - "Methods": [ + "Functions": [ { "Name": "doSave", - "Type": "BookRepresentaion", + "ReturnType": "BookRepresentaion", "StartLine": 31, "StartLinePosition": 35, "StopLine": 33, @@ -27,8 +27,8 @@ { "Package": "com.phodal.pholedge.book", "Type": "same package", - "Class": "BookRepository", - "MethodName": "list", + "NodeName": "BookRepository", + "FunctionName": "list", "StartLine": 32, "StartLinePosition": 30, "StopLine": 32, @@ -40,7 +40,7 @@ }, { "Name": "doUpdate", - "Type": "BookRepresentaion", + "ReturnType": "BookRepresentaion", "StartLine": 35, "StartLinePosition": 29, "StopLine": 38, @@ -66,7 +66,7 @@ }, { "Package": "com.phodal.pholedge.book.model", - "Class": "BookRepresentaion", + "NodeName": "BookRepresentaion", "Type": "Class", "Path": "examples/api/model/BookRepresentaion.java", "Fields": [ @@ -79,7 +79,7 @@ "Value": "name" } ], - "Methods": null, + "Functions": null, "MethodCalls": null, "Extend": "", "Implements": null diff --git a/_fixtures/arch/step2-java/Main.java b/_fixtures/grammar/java/arch/step2-java/Main.java similarity index 100% rename from _fixtures/arch/step2-java/Main.java rename to _fixtures/grammar/java/arch/step2-java/Main.java diff --git a/_fixtures/arch/step2-java/domain/AggregateRoot.java b/_fixtures/grammar/java/arch/step2-java/domain/AggregateRoot.java similarity index 100% rename from _fixtures/arch/step2-java/domain/AggregateRoot.java rename to _fixtures/grammar/java/arch/step2-java/domain/AggregateRoot.java diff --git a/_fixtures/arch/step2-java/domain/AggregateRootA.java b/_fixtures/grammar/java/arch/step2-java/domain/AggregateRootA.java similarity index 100% rename from _fixtures/arch/step2-java/domain/AggregateRootA.java rename to _fixtures/grammar/java/arch/step2-java/domain/AggregateRootA.java diff --git a/_fixtures/arch/step2-java/domain/AggregateRootB.java b/_fixtures/grammar/java/arch/step2-java/domain/AggregateRootB.java similarity index 100% rename from _fixtures/arch/step2-java/domain/AggregateRootB.java rename to _fixtures/grammar/java/arch/step2-java/domain/AggregateRootB.java diff --git a/_fixtures/arch/step2-java/domain/Entity.java b/_fixtures/grammar/java/arch/step2-java/domain/Entity.java similarity index 100% rename from _fixtures/arch/step2-java/domain/Entity.java rename to _fixtures/grammar/java/arch/step2-java/domain/Entity.java diff --git a/_fixtures/arch/step2-java/domain/EntityB.java b/_fixtures/grammar/java/arch/step2-java/domain/EntityB.java similarity index 100% rename from _fixtures/arch/step2-java/domain/EntityB.java rename to _fixtures/grammar/java/arch/step2-java/domain/EntityB.java diff --git a/_fixtures/arch/step2-java/domain/Provider.java b/_fixtures/grammar/java/arch/step2-java/domain/Provider.java similarity index 100% rename from _fixtures/arch/step2-java/domain/Provider.java rename to _fixtures/grammar/java/arch/step2-java/domain/Provider.java diff --git a/_fixtures/arch/step2-java/domain/Router.java b/_fixtures/grammar/java/arch/step2-java/domain/Router.java similarity index 100% rename from _fixtures/arch/step2-java/domain/Router.java rename to _fixtures/grammar/java/arch/step2-java/domain/Router.java diff --git a/_fixtures/arch/step2-java/domain/ValueObject.java b/_fixtures/grammar/java/arch/step2-java/domain/ValueObject.java similarity index 100% rename from _fixtures/arch/step2-java/domain/ValueObject.java rename to _fixtures/grammar/java/arch/step2-java/domain/ValueObject.java diff --git a/_fixtures/arch/step2-java/domain/ValueObjectC.java b/_fixtures/grammar/java/arch/step2-java/domain/ValueObjectC.java similarity index 100% rename from _fixtures/arch/step2-java/domain/ValueObjectC.java rename to _fixtures/grammar/java/arch/step2-java/domain/ValueObjectC.java diff --git a/_fixtures/arch/step2-java/domain/ValueObjectD.java b/_fixtures/grammar/java/arch/step2-java/domain/ValueObjectD.java similarity index 100% rename from _fixtures/arch/step2-java/domain/ValueObjectD.java rename to _fixtures/grammar/java/arch/step2-java/domain/ValueObjectD.java diff --git a/_fixtures/arch/step2-java/gateways/FakeRouter.java b/_fixtures/grammar/java/arch/step2-java/gateways/FakeRouter.java similarity index 100% rename from _fixtures/arch/step2-java/gateways/FakeRouter.java rename to _fixtures/grammar/java/arch/step2-java/gateways/FakeRouter.java diff --git a/_fixtures/arch/step2-java/repositories/AggregateRootARepo.java b/_fixtures/grammar/java/arch/step2-java/repositories/AggregateRootARepo.java similarity index 100% rename from _fixtures/arch/step2-java/repositories/AggregateRootARepo.java rename to _fixtures/grammar/java/arch/step2-java/repositories/AggregateRootARepo.java diff --git a/_fixtures/arch/step2-java/repositories/Repository.java b/_fixtures/grammar/java/arch/step2-java/repositories/Repository.java similarity index 100% rename from _fixtures/arch/step2-java/repositories/Repository.java rename to _fixtures/grammar/java/arch/step2-java/repositories/Repository.java diff --git a/_fixtures/arch/step2-java/results.json b/_fixtures/grammar/java/arch/step2-java/results.json similarity index 100% rename from _fixtures/arch/step2-java/results.json rename to _fixtures/grammar/java/arch/step2-java/results.json diff --git a/examples/annotaion_api/DemoController.java b/_fixtures/grammar/java/examples/annotaion_api/DemoController.java similarity index 100% rename from examples/annotaion_api/DemoController.java rename to _fixtures/grammar/java/examples/annotaion_api/DemoController.java diff --git a/examples/annotaion_api/ManageController.java b/_fixtures/grammar/java/examples/annotaion_api/ManageController.java similarity index 100% rename from examples/annotaion_api/ManageController.java rename to _fixtures/grammar/java/examples/annotaion_api/ManageController.java diff --git a/examples/api/BookController.java b/_fixtures/grammar/java/examples/api/BookController.java similarity index 100% rename from examples/api/BookController.java rename to _fixtures/grammar/java/examples/api/BookController.java diff --git a/examples/api/BookFactory.java b/_fixtures/grammar/java/examples/api/BookFactory.java similarity index 100% rename from examples/api/BookFactory.java rename to _fixtures/grammar/java/examples/api/BookFactory.java diff --git a/examples/api/BookMapper.java b/_fixtures/grammar/java/examples/api/BookMapper.java similarity index 100% rename from examples/api/BookMapper.java rename to _fixtures/grammar/java/examples/api/BookMapper.java diff --git a/examples/api/BookRepository.java b/_fixtures/grammar/java/examples/api/BookRepository.java similarity index 100% rename from examples/api/BookRepository.java rename to _fixtures/grammar/java/examples/api/BookRepository.java diff --git a/examples/api/BookService.java b/_fixtures/grammar/java/examples/api/BookService.java similarity index 100% rename from examples/api/BookService.java rename to _fixtures/grammar/java/examples/api/BookService.java diff --git a/_fixtures/sql/BookMapper.xml b/_fixtures/grammar/java/examples/api/mapper/BookMapper.xml similarity index 100% rename from _fixtures/sql/BookMapper.xml rename to _fixtures/grammar/java/examples/api/mapper/BookMapper.xml diff --git a/examples/api/mapper/mybatis-3-mapper.dtd b/_fixtures/grammar/java/examples/api/mapper/mybatis-3-mapper.dtd similarity index 100% rename from examples/api/mapper/mybatis-3-mapper.dtd rename to _fixtures/grammar/java/examples/api/mapper/mybatis-3-mapper.dtd diff --git a/examples/api/model/Book.java b/_fixtures/grammar/java/examples/api/model/Book.java similarity index 100% rename from examples/api/model/Book.java rename to _fixtures/grammar/java/examples/api/model/Book.java diff --git a/examples/api/model/BookRepresentaion.java b/_fixtures/grammar/java/examples/api/model/BookRepresentaion.java similarity index 100% rename from examples/api/model/BookRepresentaion.java rename to _fixtures/grammar/java/examples/api/model/BookRepresentaion.java diff --git a/examples/api/model/command/CreateBookCommand.java b/_fixtures/grammar/java/examples/api/model/command/CreateBookCommand.java similarity index 100% rename from examples/api/model/command/CreateBookCommand.java rename to _fixtures/grammar/java/examples/api/model/command/CreateBookCommand.java diff --git a/examples/api/model/command/UpdateBookCommand.java b/_fixtures/grammar/java/examples/api/model/command/UpdateBookCommand.java similarity index 100% rename from examples/api/model/command/UpdateBookCommand.java rename to _fixtures/grammar/java/examples/api/model/command/UpdateBookCommand.java diff --git a/_fixtures/grammar/java/examples/bs/DataClass.java b/_fixtures/grammar/java/examples/bs/DataClass.java new file mode 100644 index 0000000000000000000000000000000000000000..a410a3af2b64ae083ee5050884e68dd1145cf6be --- /dev/null +++ b/_fixtures/grammar/java/examples/bs/DataClass.java @@ -0,0 +1,22 @@ +package com.phodal.coca.analysis.identifier.model; + +public class DataClass { + private String date; + private String time; + + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } +} diff --git a/examples/bs/LongMethod.java b/_fixtures/grammar/java/examples/bs/LongMethod.java similarity index 100% rename from examples/bs/LongMethod.java rename to _fixtures/grammar/java/examples/bs/LongMethod.java diff --git a/examples/bs/MultipleIf.java b/_fixtures/grammar/java/examples/bs/MultipleIf.java similarity index 100% rename from examples/bs/MultipleIf.java rename to _fixtures/grammar/java/examples/bs/MultipleIf.java diff --git a/examples/builder_call/PublishedBlogResource.java b/_fixtures/grammar/java/examples/builder_call/PublishedBlogResource.java similarity index 100% rename from examples/builder_call/PublishedBlogResource.java rename to _fixtures/grammar/java/examples/builder_call/PublishedBlogResource.java diff --git a/examples/configs/move.coca b/_fixtures/grammar/java/examples/configs/move.coca similarity index 100% rename from examples/configs/move.coca rename to _fixtures/grammar/java/examples/configs/move.coca diff --git a/examples/configs/rename.coca b/_fixtures/grammar/java/examples/configs/rename.coca similarity index 100% rename from examples/configs/rename.coca rename to _fixtures/grammar/java/examples/configs/rename.coca diff --git a/examples/flink/TopProductTask.java b/_fixtures/grammar/java/examples/flink/TopProductTask.java similarity index 100% rename from examples/flink/TopProductTask.java rename to _fixtures/grammar/java/examples/flink/TopProductTask.java diff --git a/examples/interface_api/BlogPO.java b/_fixtures/grammar/java/examples/interface_api/BlogPO.java similarity index 100% rename from examples/interface_api/BlogPO.java rename to _fixtures/grammar/java/examples/interface_api/BlogPO.java diff --git a/_fixtures/grammar/interface/BlogRepository.java b/_fixtures/grammar/java/examples/interface_api/BlogRepository.java similarity index 100% rename from _fixtures/grammar/interface/BlogRepository.java rename to _fixtures/grammar/java/examples/interface_api/BlogRepository.java diff --git a/examples/interface_api/BlogRepositoryImpl.java b/_fixtures/grammar/java/examples/interface_api/BlogRepositoryImpl.java similarity index 100% rename from examples/interface_api/BlogRepositoryImpl.java rename to _fixtures/grammar/java/examples/interface_api/BlogRepositoryImpl.java diff --git a/examples/lambda/BlogPO.java b/_fixtures/grammar/java/examples/lambda/BlogPO.java similarity index 100% rename from examples/lambda/BlogPO.java rename to _fixtures/grammar/java/examples/lambda/BlogPO.java diff --git a/examples/lambda/LambdaExample.java b/_fixtures/grammar/java/examples/lambda/LambdaExample.java similarity index 100% rename from examples/lambda/LambdaExample.java rename to _fixtures/grammar/java/examples/lambda/LambdaExample.java diff --git a/examples/method-call/BlogRepositoryImpl.java b/_fixtures/grammar/java/examples/method-call/BlogRepositoryImpl.java similarity index 100% rename from examples/method-call/BlogRepositoryImpl.java rename to _fixtures/grammar/java/examples/method-call/BlogRepositoryImpl.java diff --git a/examples/move-demo/src/wowo/ImportExample.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/ImportExample.java similarity index 100% rename from examples/move-demo/src/wowo/ImportExample.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/ImportExample.java diff --git a/examples/move-demo/src/wowo/Main.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/Main.java similarity index 100% rename from examples/move-demo/src/wowo/Main.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/Main.java diff --git a/examples/move-demo/src/wowo/a/ImportForB.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/a/ImportForB.java similarity index 100% rename from examples/move-demo/src/wowo/a/ImportForB.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/a/ImportForB.java diff --git a/examples/move-demo/src/wowo/a/OriginExample.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/a/OriginExample.java similarity index 100% rename from examples/move-demo/src/wowo/a/OriginExample.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/a/OriginExample.java diff --git a/examples/move-demo/src/wowo/b/OriginExample.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/b/OriginExample.java similarity index 100% rename from examples/move-demo/src/wowo/b/OriginExample.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/b/OriginExample.java diff --git a/examples/move-demo/src/wowo/b/PlaceHolder.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/b/PlaceHolder.java similarity index 100% rename from examples/move-demo/src/wowo/b/PlaceHolder.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/b/PlaceHolder.java diff --git a/examples/move-demo/src/wowo/d/IInterfaceUserExtends.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/d/IInterfaceUserExtends.java similarity index 100% rename from examples/move-demo/src/wowo/d/IInterfaceUserExtends.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/d/IInterfaceUserExtends.java diff --git a/examples/move-demo/src/wowo/eext/ChildrenTwoFace.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/eext/ChildrenTwoFace.java similarity index 100% rename from examples/move-demo/src/wowo/eext/ChildrenTwoFace.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/eext/ChildrenTwoFace.java diff --git a/examples/move-demo/src/wowo/eext/sub/BaseFace.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/BaseFace.java similarity index 100% rename from examples/move-demo/src/wowo/eext/sub/BaseFace.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/BaseFace.java diff --git a/examples/move-demo/src/wowo/eext/sub/ChildFace.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/ChildFace.java similarity index 100% rename from examples/move-demo/src/wowo/eext/sub/ChildFace.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/ChildFace.java diff --git a/examples/move-demo/src/wowo/eext/sub/IBase.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/IBase.java similarity index 100% rename from examples/move-demo/src/wowo/eext/sub/IBase.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/IBase.java diff --git a/examples/move-demo/src/wowo/eext/sub/IFace.java b/_fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/IFace.java similarity index 100% rename from examples/move-demo/src/wowo/eext/sub/IFace.java rename to _fixtures/grammar/java/examples/move-demo/src/wowo/eext/sub/IFace.java diff --git a/examples/poly/poly.java b/_fixtures/grammar/java/examples/poly/poly.java similarity index 100% rename from examples/poly/poly.java rename to _fixtures/grammar/java/examples/poly/poly.java diff --git a/examples/poly/rename-poly.coca b/_fixtures/grammar/java/examples/poly/rename-poly.coca similarity index 100% rename from examples/poly/rename-poly.coca rename to _fixtures/grammar/java/examples/poly/rename-poly.coca diff --git a/examples/rename/BlogPO.java b/_fixtures/grammar/java/examples/rename/BlogPO.java similarity index 100% rename from examples/rename/BlogPO.java rename to _fixtures/grammar/java/examples/rename/BlogPO.java diff --git a/examples/rename/BlogRepositoryImpl.java b/_fixtures/grammar/java/examples/rename/BlogRepositoryImpl.java similarity index 100% rename from examples/rename/BlogRepositoryImpl.java rename to _fixtures/grammar/java/examples/rename/BlogRepositoryImpl.java diff --git a/_fixtures/sql/hello.sql b/_fixtures/grammar/java/examples/sql/hello.sql similarity index 100% rename from _fixtures/sql/hello.sql rename to _fixtures/grammar/java/examples/sql/hello.sql diff --git a/examples/step2-Java/Doxyfile b/_fixtures/grammar/java/examples/step2-Java/Doxyfile similarity index 100% rename from examples/step2-Java/Doxyfile rename to _fixtures/grammar/java/examples/step2-Java/Doxyfile diff --git a/examples/step2-Java/Main.java b/_fixtures/grammar/java/examples/step2-Java/Main.java similarity index 100% rename from examples/step2-Java/Main.java rename to _fixtures/grammar/java/examples/step2-Java/Main.java diff --git a/examples/step2-Java/domain/AggregateRoot.java b/_fixtures/grammar/java/examples/step2-Java/domain/AggregateRoot.java similarity index 100% rename from examples/step2-Java/domain/AggregateRoot.java rename to _fixtures/grammar/java/examples/step2-Java/domain/AggregateRoot.java diff --git a/examples/step2-Java/domain/AggregateRootA.java b/_fixtures/grammar/java/examples/step2-Java/domain/AggregateRootA.java similarity index 100% rename from examples/step2-Java/domain/AggregateRootA.java rename to _fixtures/grammar/java/examples/step2-Java/domain/AggregateRootA.java diff --git a/examples/step2-Java/domain/AggregateRootB.java b/_fixtures/grammar/java/examples/step2-Java/domain/AggregateRootB.java similarity index 100% rename from examples/step2-Java/domain/AggregateRootB.java rename to _fixtures/grammar/java/examples/step2-Java/domain/AggregateRootB.java diff --git a/examples/step2-Java/domain/Entity.java b/_fixtures/grammar/java/examples/step2-Java/domain/Entity.java similarity index 100% rename from examples/step2-Java/domain/Entity.java rename to _fixtures/grammar/java/examples/step2-Java/domain/Entity.java diff --git a/examples/step2-Java/domain/EntityB.java b/_fixtures/grammar/java/examples/step2-Java/domain/EntityB.java similarity index 100% rename from examples/step2-Java/domain/EntityB.java rename to _fixtures/grammar/java/examples/step2-Java/domain/EntityB.java diff --git a/examples/step2-Java/domain/Provider.java b/_fixtures/grammar/java/examples/step2-Java/domain/Provider.java similarity index 100% rename from examples/step2-Java/domain/Provider.java rename to _fixtures/grammar/java/examples/step2-Java/domain/Provider.java diff --git a/examples/step2-Java/domain/Router.java b/_fixtures/grammar/java/examples/step2-Java/domain/Router.java similarity index 100% rename from examples/step2-Java/domain/Router.java rename to _fixtures/grammar/java/examples/step2-Java/domain/Router.java diff --git a/examples/step2-Java/domain/ValueObject.java b/_fixtures/grammar/java/examples/step2-Java/domain/ValueObject.java similarity index 100% rename from examples/step2-Java/domain/ValueObject.java rename to _fixtures/grammar/java/examples/step2-Java/domain/ValueObject.java diff --git a/examples/step2-Java/domain/ValueObjectC.java b/_fixtures/grammar/java/examples/step2-Java/domain/ValueObjectC.java similarity index 100% rename from examples/step2-Java/domain/ValueObjectC.java rename to _fixtures/grammar/java/examples/step2-Java/domain/ValueObjectC.java diff --git a/examples/step2-Java/domain/ValueObjectD.java b/_fixtures/grammar/java/examples/step2-Java/domain/ValueObjectD.java similarity index 100% rename from examples/step2-Java/domain/ValueObjectD.java rename to _fixtures/grammar/java/examples/step2-Java/domain/ValueObjectD.java diff --git a/examples/step2-Java/gateways/FakeRouter.java b/_fixtures/grammar/java/examples/step2-Java/gateways/FakeRouter.java similarity index 100% rename from examples/step2-Java/gateways/FakeRouter.java rename to _fixtures/grammar/java/examples/step2-Java/gateways/FakeRouter.java diff --git a/examples/step2-Java/repositories/AggregateRootARepo.java b/_fixtures/grammar/java/examples/step2-Java/repositories/AggregateRootARepo.java similarity index 100% rename from examples/step2-Java/repositories/AggregateRootARepo.java rename to _fixtures/grammar/java/examples/step2-Java/repositories/AggregateRootARepo.java diff --git a/examples/step2-Java/repositories/Repository.java b/_fixtures/grammar/java/examples/step2-Java/repositories/Repository.java similarity index 100% rename from examples/step2-Java/repositories/Repository.java rename to _fixtures/grammar/java/examples/step2-Java/repositories/Repository.java diff --git a/examples/interface_api/BlogRepository.java b/_fixtures/grammar/java/interface/BlogRepository.java similarity index 100% rename from examples/interface_api/BlogRepository.java rename to _fixtures/grammar/java/interface/BlogRepository.java diff --git a/_fixtures/lambda/BlogPO.java b/_fixtures/grammar/java/lambda/BlogPO.java similarity index 100% rename from _fixtures/lambda/BlogPO.java rename to _fixtures/grammar/java/lambda/BlogPO.java diff --git a/_fixtures/lambda/BlogRepositoryImpl.java b/_fixtures/grammar/java/lambda/BlogRepositoryImpl.java similarity index 100% rename from _fixtures/lambda/BlogRepositoryImpl.java rename to _fixtures/grammar/java/lambda/BlogRepositoryImpl.java diff --git a/_fixtures/abug/AgentUtils.java2 b/_fixtures/grammar/java/regression/AgentUtils.java2 similarity index 100% rename from _fixtures/abug/AgentUtils.java2 rename to _fixtures/grammar/java/regression/AgentUtils.java2 diff --git a/_fixtures/grammar/java/regression/BuilderCallSplitIssue.java b/_fixtures/grammar/java/regression/BuilderCallSplitIssue.java new file mode 100644 index 0000000000000000000000000000000000000000..8ae1f90dfd3e7dfb3e84c2356cd944725104e362 --- /dev/null +++ b/_fixtures/grammar/java/regression/BuilderCallSplitIssue.java @@ -0,0 +1,12 @@ +package com.phodal.coca.bug; + +import static org.assertj.core.api.Assertions.assertThat; +import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; + +public class BuilderCallSplitIssue { + void someAssert() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); + + assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse(); + } +} diff --git a/_fixtures/abug/DatevHelper.java b/_fixtures/grammar/java/regression/DatevHelper.java similarity index 100% rename from _fixtures/abug/DatevHelper.java rename to _fixtures/grammar/java/regression/DatevHelper.java diff --git a/_fixtures/grammar/java/regression/DoubleClass.java b/_fixtures/grammar/java/regression/DoubleClass.java new file mode 100644 index 0000000000000000000000000000000000000000..5292a3d5b231c704f6bb45a2cee7717022157e6b --- /dev/null +++ b/_fixtures/grammar/java/regression/DoubleClass.java @@ -0,0 +1,18 @@ +package com.phodal.coca.abug; + +public class ClassOne extends HasStatic { + static final int x = 3; + static int y = 4; + public static void pr() { + + } +} + +public class ClassTwo { + final int z=10; + + public static void main(String[] args) { + Outer outer = new Outer(); + System.out.println(outer.new Inner().y); + } +} \ No newline at end of file diff --git a/_fixtures/grammar/java/regression/DummyActivity.java b/_fixtures/grammar/java/regression/DummyActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..4fdd3c8cd235cf377158d023a768cb6328451197 --- /dev/null +++ b/_fixtures/grammar/java/regression/DummyActivity.java @@ -0,0 +1,6 @@ +package com.example; + +import android.app.Activity; + +public class DummyActivity extends Activity { +} diff --git a/_fixtures/grammar/java/regression/FormalParameterCall.java b/_fixtures/grammar/java/regression/FormalParameterCall.java new file mode 100644 index 0000000000000000000000000000000000000000..01ee8554b9464c714971543d94f0f4c78ba10355 --- /dev/null +++ b/_fixtures/grammar/java/regression/FormalParameterCall.java @@ -0,0 +1,11 @@ +package regression; + +import hello.CreateBookCommand; + +@Component +public class BookService implements Service { + @Transactional + public void getIsbnId(CreateBookCommand command) { + command.getIsbn(); + } +} diff --git a/_fixtures/grammar/java/regression/HostDependentDownloadableContribution.java b/_fixtures/grammar/java/regression/HostDependentDownloadableContribution.java new file mode 100644 index 0000000000000000000000000000000000000000..bc77b0e73eef266f1361d4c728cf449a7241c1b1 --- /dev/null +++ b/_fixtures/grammar/java/regression/HostDependentDownloadableContribution.java @@ -0,0 +1,31 @@ +package cc.arduino.packages.contributions; + +import org.junit.Test; +import processing.app.Platform; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +public class HostDependentDownloadableContribution{ + + public void macOsXPositiveTest() { + HostDependentDownloadableContributionStub contribution = new HostDependentDownloadableContributionStub() { + @Override + public String getHost() { + return "x86_64-apple-darwin"; + } + }; + + Platform platform = new Platform() { + @Override + public String getOsName() { + return "Mac OS X"; + } + + @Override + public String getOsArch() { + return "x86_64"; + } + }; + } +} \ No newline at end of file diff --git a/_fixtures/grammar/java/regression/InnerClass.java b/_fixtures/grammar/java/regression/InnerClass.java new file mode 100644 index 0000000000000000000000000000000000000000..e941db553338d73d9c64024efd2fb7ab59edd5cd --- /dev/null +++ b/_fixtures/grammar/java/regression/InnerClass.java @@ -0,0 +1,18 @@ +package com.phodal.coca.abug; + +public class Outer { + final int z=10; + + class Inner extends HasStatic { + static final int x = 3; + static int y = 4; + public static void pr() { + + } + } + + public static void main(String[] args) { + Outer outer = new Outer(); + System.out.println(outer.new Inner().y); + } +} \ No newline at end of file diff --git a/_fixtures/grammar/java/regression/JavaInner.java b/_fixtures/grammar/java/regression/JavaInner.java new file mode 100644 index 0000000000000000000000000000000000000000..9744c8577889fd7c22fa43645612bd8b4e5bd354 --- /dev/null +++ b/_fixtures/grammar/java/regression/JavaInner.java @@ -0,0 +1,16 @@ +public class Outer { + final int z=10; + + class Inner extends HasStatic { + static final int x = 3; + static int y = 4; + public static void pr() { + + } + } + + public static void main(String[] args) { + Outer outer = new Outer(); + System.out.println(outer.new Inner().y); + } +} diff --git a/_fixtures/grammar/java/regression/NormalChainCall.java b/_fixtures/grammar/java/regression/NormalChainCall.java new file mode 100644 index 0000000000000000000000000000000000000000..2a247675d31f1555b24618c1786dc31b360034eb --- /dev/null +++ b/_fixtures/grammar/java/regression/NormalChainCall.java @@ -0,0 +1,11 @@ +package hello.outer; + +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; + +public class PublishedBlogResource { + public ResponseEntity post(UriComponentsBuilder uriComponentsBuilder) { + UriComponents uriComponents = uriComponentsBuilder.path("/published-blog/{id}").buildAndExpand("1234"); +// return uriComponents.toUri(); + } +} diff --git a/_fixtures/grammar/python/blog_entity.py b/_fixtures/grammar/python/blog_entity.py new file mode 100644 index 0000000000000000000000000000000000000000..ee287bb8ced476233651e7f508eb94f892db4718 --- /dev/null +++ b/_fixtures/grammar/python/blog_entity.py @@ -0,0 +1,30 @@ +from ddd.shared.domain_model import DomainModel + + +class Blog(object): + def __init__(self, id, title, content): + self.id = id + self.title = title + self.content = content + + @classmethod + def from_dict(cls, adict): + blog = Blog( + id=adict['id'], + title=adict['title'], + content=adict['content'], + ) + + return blog + + def to_dict(self): + return { + 'id': self.id, + 'title': self.title, + 'content': self.content, + } + + def __eq__(self, other): + return self.to_dict() == other.to_dict() + +DomainModel.register(Blog) diff --git a/examples/api/mapper/BookMapper.xml b/_fixtures/grammar/sql/BookMapper.xml similarity index 100% rename from examples/api/mapper/BookMapper.xml rename to _fixtures/grammar/sql/BookMapper.xml diff --git a/examples/sql/hello.sql b/_fixtures/grammar/sql/hello.sql similarity index 100% rename from examples/sql/hello.sql rename to _fixtures/grammar/sql/hello.sql diff --git a/_fixtures/grammar/typescript/Class.ts b/_fixtures/grammar/typescript/Class.ts new file mode 100755 index 0000000000000000000000000000000000000000..cc67b5e6f45cbf9d684448e8e9a6f6e55316ee86 --- /dev/null +++ b/_fixtures/grammar/typescript/Class.ts @@ -0,0 +1,31 @@ +interface IPerson { + name: string; +} + +class Person implements IPerson { + public publicString: string; + private privateString: string; + protected protectedString: string; + readonly readonlyString: string; + name: string; + + constructor(name: string) { + this.name = name; + } +} + +class Employee extends Person { + empCode: number; + static pi: number = 3.14; + + constructor(empcode: number, name:string) { + super(name); + this.empCode = empcode; + } + + displayName():void { + console.log("Name = " + this.name + ", Employee Code = " + this.empCode); + } +} + +let emp = new Employee(100,"Steve"); \ No newline at end of file diff --git a/_fixtures/rcall/constructor_call.json b/_fixtures/rcall/constructor_call.json new file mode 100644 index 0000000000000000000000000000000000000000..70fe78eb59ef0c60e723419254d39fbde1dd3db5 --- /dev/null +++ b/_fixtures/rcall/constructor_call.json @@ -0,0 +1,393 @@ +[ + { + "Package": "com.phodal.coca.analysis", + "NodeName": "JavaCallApp", + "Type": "", + "Path": "_fixtures/grammar/java/examples/poly/poly.java", + "Fields": [ + { + "Type": "JavaDaoParser", + "Value": "daoParser" + } + ], + "Functions": [ + { + "Name": "parse", + "Type": "void", + "StartLine": 57, + "StartLinePosition": 16, + "StopLine": 63, + "StopLinePosition": 21, + "Parameters": [ + { + "Name": "path", + "Type": "Path" + }, + { + "Name": "clzs", + "Type": "List\u003cString\u003e" + } + ], + "FunctionCalls": [ + { + "Package": "com.phodal.coca.analysis", + "Type": "", + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + "\"Start parse java call: \"+path.getFileName()" + ], + "StartLine": 58, + "StartLinePosition": 19, + "StopLine": 58, + "StopLinePosition": 26 + }, + { + "Package": "java.nio.file", + "Type": "chain", + "NodeName": "Path", + "FunctionName": "getFileName", + "Parameters": null, + "StartLine": 58, + "StartLinePosition": 60, + "StopLine": 58, + "StopLinePosition": 71 + }, + { + "Package": "com.phodal.coca.analysis.identifier", + "Type": "chain", + "NodeName": "JavaFileParser", + "FunctionName": "parse", + "Parameters": [ + "path" + ], + "StartLine": 59, + "StartLinePosition": 40, + "StopLine": 59, + "StopLinePosition": 45 + }, + { + "Package": "java.util", + "Type": "CreatorClass", + "NodeName": "ArrayList", + "FunctionName": "", + "Parameters": null, + "StartLine": 60, + "StartLinePosition": 38, + "StopLine": 60, + "StopLinePosition": 50 + }, + { + "Package": "com.phodal.coca.analysis.calls", + "Type": "CreatorClass", + "NodeName": "JavaCallVisitor", + "FunctionName": "", + "Parameters": null, + "StartLine": 61, + "StartLinePosition": 44, + "StopLine": 61, + "StopLinePosition": 82 + }, + { + "Package": "com.phodal.coca.java", + "Type": "chain", + "NodeName": "JavaParserBaseVisitor", + "FunctionName": "visit", + "Parameters": [ + "tree" + ], + "StartLine": 62, + "StartLinePosition": 16, + "StopLine": 62, + "StopLinePosition": 21 + } + ], + "Override": false, + "Annotations": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null + }, + { + "Name": "JavaCallApp", + "Type": "", + "StartLine": 26, + "StartLinePosition": 11, + "StopLine": 28, + "StopLinePosition": 4, + "Parameters": [ + { + "Name": "daoParser", + "Type": "JavaDaoParser" + } + ], + "FunctionCalls": null, + "Override": false, + "Annotations": null, + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null + }, + { + "Name": "analysisDir", + "Type": "void", + "StartLine": 30, + "StartLinePosition": 16, + "StopLine": 42, + "StopLinePosition": 27, + "Parameters": [ + { + "Name": "dir", + "Type": "String" + }, + { + "Name": "clzs", + "Type": "List\u003cString\u003e" + } + ], + "FunctionCalls": [ + { + "Package": "java.nio.file", + "Type": "chain", + "NodeName": "Paths", + "FunctionName": "get", + "Parameters": [ + "dir" + ], + "StartLine": 31, + "StartLinePosition": 33, + "StopLine": 31, + "StopLinePosition": 36 + }, + { + "Package": "com.phodal.coca.analysis", + "Type": "", + "NodeName": "JavaCallApp", + "FunctionName": "parse", + "Parameters": [ + "clzs" + ], + "StartLine": 32, + "StartLinePosition": 38, + "StopLine": 32, + "StopLinePosition": 43 + }, + { + "Package": "java.util.concurrent", + "Type": "chain", + "NodeName": "Executors", + "FunctionName": "newFixedThreadPool", + "Parameters": [ + "poolSize" + ], + "StartLine": 34, + "StartLinePosition": 41, + "StopLine": 34, + "StopLinePosition": 59 + }, + { + "Package": "java.util", + "Type": "CreatorClass", + "NodeName": "ArrayList", + "FunctionName": "", + "Parameters": null, + "StartLine": 35, + "StartLinePosition": 35, + "StopLine": 35, + "StopLinePosition": 47 + }, + { + "Package": "com.phodal.coca.analysis.utils", + "Type": "CreatorClass", + "NodeName": "ProcessFiles", + "FunctionName": "", + "Parameters": null, + "StartLine": 36, + "StartLinePosition": 30, + "StopLine": 36, + "StopLinePosition": 70 + }, + { + "Package": "com.phodal.coca.analysis.utils", + "Type": "chain", + "NodeName": "Files", + "FunctionName": "walkFileTree", + "Parameters": [ + "startingDir", + "pf" + ], + "StartLine": 37, + "StartLinePosition": 14, + "StopLine": 37, + "StopLinePosition": 26 + }, + { + "Package": "com.phodal.coca.analysis", + "Type": "", + "NodeName": "f", + "FunctionName": "get", + "Parameters": null, + "StartLine": 39, + "StartLinePosition": 14, + "StopLine": 39, + "StopLinePosition": 17 + }, + { + "Package": "java.util.concurrent", + "Type": "chain", + "NodeName": "ExecutorService", + "FunctionName": "shutdown", + "Parameters": null, + "StartLine": 41, + "StartLinePosition": 13, + "StopLine": 41, + "StopLinePosition": 21 + } + ], + "Override": false, + "Annotations": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null + }, + { + "Name": "parse", + "Type": "Consumer\u003cPath\u003e", + "StartLine": 44, + "StartLinePosition": 27, + "StopLine": 55, + "StopLinePosition": 32, + "Parameters": [ + { + "Name": "clzs", + "Type": "List\u003cString\u003e" + } + ], + "FunctionCalls": [ + { + "Package": "java.nio.file", + "Type": "chain", + "NodeName": "Path", + "FunctionName": "toString", + "Parameters": null, + "StartLine": 47, + "StartLinePosition": 48, + "StopLine": 47, + "StopLinePosition": 56 + }, + { + "Package": "com.phodal.coca.analysis", + "Type": "", + "NodeName": "path", + "FunctionName": "endsWith", + "Parameters": [ + "\"Tests.java\"" + ], + "StartLine": 47, + "StartLinePosition": 59, + "StopLine": 47, + "StopLinePosition": 67 + }, + { + "Package": "java.nio.file", + "Type": "chain", + "NodeName": "Path", + "FunctionName": "toString", + "Parameters": null, + "StartLine": 47, + "StartLinePosition": 91, + "StopLine": 47, + "StopLinePosition": 99 + }, + { + "Package": "com.phodal.coca.analysis", + "Type": "", + "NodeName": "path", + "FunctionName": "endsWith", + "Parameters": [ + "\"Test.java\"" + ], + "StartLine": 47, + "StartLinePosition": 102, + "StopLine": 47, + "StopLinePosition": 110 + }, + { + "Package": "java.nio.file", + "Type": "chain", + "NodeName": "Path", + "FunctionName": "toString", + "Parameters": null, + "StartLine": 47, + "StartLinePosition": 132, + "StopLine": 47, + "StopLinePosition": 140 + }, + { + "Package": "com.phodal.coca.analysis", + "Type": "", + "NodeName": "path", + "FunctionName": "endsWith", + "Parameters": [ + "\".java\"" + ], + "StartLine": 47, + "StartLinePosition": 143, + "StopLine": 47, + "StopLinePosition": 151 + }, + { + "Package": "com.phodal.coca.analysis", + "Type": "", + "NodeName": "JavaCallApp", + "FunctionName": "parse", + "Parameters": [ + "path", + "clzs" + ], + "StartLine": 49, + "StartLinePosition": 20, + "StopLine": 49, + "StopLinePosition": 25 + }, + { + "Package": "org.antlr.v4.runtime.tree", + "Type": "chain", + "NodeName": "e", + "FunctionName": "printStackTrace", + "Parameters": null, + "StartLine": 52, + "StartLinePosition": 18, + "StopLine": 52, + "StopLinePosition": 33 + } + ], + "Override": false, + "Annotations": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null + } + ], + "FunctionCalls": [ + { + "Package": "com.phodal.coca.analysis.calls", + "Type": "field", + "NodeName": "JavaDaoParser", + "FunctionName": "", + "Parameters": null, + "StartLine": 24, + "StartLinePosition": 12, + "StopLine": 24, + "StopLinePosition": 35 + } + ], + "Extend": "", + "Implements": null, + "Annotations": null + } +] \ No newline at end of file diff --git a/_fixtures/refactor/move/grammar/BlogPO.java b/_fixtures/refactor/move/grammar/BlogPO.java new file mode 100644 index 0000000000000000000000000000000000000000..37ca27355b4e203cb9d76a1b95babe9414214f2f --- /dev/null +++ b/_fixtures/refactor/move/grammar/BlogPO.java @@ -0,0 +1,59 @@ +package study.huhao.demo.adapters.outbound.persistence.blog; + +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import study.huhao.demo.adapters.outbound.persistence.PersistenceObject; +import study.huhao.demo.domain.contexts.blogcontext.blog.Blog; + +import java.time.Instant; +import java.util.UUID; + +// Lombok annotations +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@AllArgsConstructor(access = AccessLevel.PROTECTED) +@Getter +public class BlogPO implements PersistenceObject { + + private String id; + private String title; + private String body; + private String authorId; + private String status; + private Instant createdAt; + private Instant savedAt; + private PublishedBlogPO published; + + // The persistence object needs to reflect the table structure. + // The domain model and persistence object may have much different. + // So, manual to convert between them is better than use object mapper like Orika. + @Override + public Blog toDomainModel() { + return new Blog( + UUID.fromString(id), + title, + body, + UUID.fromString(authorId), + Blog.Status.valueOf(status), + createdAt, + savedAt, + published == null ? null : published.toDomainModel() + ); + } + + // The persistence object needs to reflect the table structure. + // The domain model and persistence object may have much different. + // So, manual to convert between them is better than use object mapper like Orika. + static BlogPO of(Blog blog) { + return blog == null ? null : new BlogPO( + blog.getId().toString(), + blog.getTitle(), + blog.getBody(), + blog.getAuthorId().toString(), + blog.getStatus().toString(), + blog.getCreatedAt(), + blog.getSavedAt(), + PublishedBlogPO.of(blog.getPublished())); + } +} diff --git a/_fixtures/refactor/move/grammar/BlogRepository.java b/_fixtures/refactor/move/grammar/BlogRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..ef142d1a9e61310b173464d038881696c980cf61 --- /dev/null +++ b/_fixtures/refactor/move/grammar/BlogRepository.java @@ -0,0 +1,22 @@ +package study.huhao.demo.domain.contexts.blogcontext.blog; + +import study.huhao.demo.domain.core.concepts.Repository; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +public interface BlogRepository extends Repository { + void save(Blog blog); + + Optional findById(UUID id); + + boolean existsById(UUID id); + + void deleteById(UUID id); + + List findAll(BlogCriteria criteria); + + @ServiceMethod(value="/hello") + long count(BlogCriteria criteria); +} diff --git a/_fixtures/refactor/move/grammar/BlogRepositoryImpl.java b/_fixtures/refactor/move/grammar/BlogRepositoryImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..73a61c062b76066dbdf79196e10c1642fc73c31b --- /dev/null +++ b/_fixtures/refactor/move/grammar/BlogRepositoryImpl.java @@ -0,0 +1,59 @@ +package study.huhao.demo.adapters.outbound.persistence.blog; + +import org.springframework.stereotype.Repository; +import study.huhao.demo.domain.contexts.blogcontext.blog.Blog; +import study.huhao.demo.domain.contexts.blogcontext.blog.BlogCriteria; +import study.huhao.demo.domain.contexts.blogcontext.blog.BlogRepository; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import static java.util.stream.Collectors.toList; + + +@Repository +public class BlogRepositoryImpl implements BlogRepository { + + private final BlogMapper blogMapper; + + public BlogRepositoryImpl(BlogMapper blogMapper) { + this.blogMapper = blogMapper; + } + + @Override + public void save(Blog blog) { + var blogPO = BlogPO.of(blog); + + blogMapper.findById(blog.getId().toString()).ifPresentOrElse( + po -> blogMapper.update(blogPO), + () -> blogMapper.insert(blogPO) + ); + } + + @Override + public Optional findById(UUID id) { + return blogMapper.findById(id.toString()).map(BlogPO::toDomainModel); + } + + @Override + public boolean existsById(UUID id) { + return blogMapper.existsById(id.toString()); + } + + @Override + public void deleteById(UUID id) { + blogMapper.deleteById(id.toString()); + } + + @Override + public List findAll(BlogCriteria criteria) { + return blogMapper.selectAllByCriteria(criteria).stream().map(BlogPO::toDomainModel).collect(toList()); + } + + @Override + public long count(BlogCriteria criteria) { + return blogMapper.countTotalByCriteria(criteria); + } +} + diff --git a/_fixtures/refactor/move/grammar/BookRepository.java b/_fixtures/refactor/move/grammar/BookRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..8bf1c1fe9bed361fa3107ccc37d077757dcc09f4 --- /dev/null +++ b/_fixtures/refactor/move/grammar/BookRepository.java @@ -0,0 +1,35 @@ +package com.phodal.pholedge.book; + +import com.phodal.pholedge.book.model.Book; +import com.phodal.pholedge.book.model.BookRepresentaion; +import com.phodal.pholedge.core.domain.Repository; +import com.phodal.pholedge.core.exception.NotFoundException; +import org.springframework.dao.EmptyResultDataAccessException; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +public class BookRepository implements Repository { + private final BookMapper bookMapper; + + public BookRepository(BookMapper bookMapper) { + this.bookMapper = bookMapper; + } + + public void save(Book book) { + this.bookMapper.doSave(book); + } + + public List list() { + return this.bookMapper.list(); + } + + public Book byId(String id) { + try { + return this.bookMapper.byId(id); + } catch (EmptyResultDataAccessException e) { + throw new NotFoundException(id); + } + } +} diff --git a/_fixtures/refactor/rename.config b/_fixtures/refactor/rename.config index 23a675c9f68d096dd18768662818415512702658..1d470d0a05ca392c64eff2e753b0f7e87399bc63 100644 --- a/_fixtures/refactor/rename.config +++ b/_fixtures/refactor/rename.config @@ -1 +1 @@ -polymorphism.Overload.demo -> polymorphism.Overload.demoA +polymorphism.Overload.demoA -> polymorphism.Overload.demo diff --git a/_fixtures/suggest/factory/factory_suggest.json b/_fixtures/suggest/factory/factory_suggest.json index 4a1c4a42506987b0bba3bf446babb59a26529aaa..a527b7053d67808f888b9a3c9227e40cffee2163 100755 --- a/_fixtures/suggest/factory/factory_suggest.json +++ b/_fixtures/suggest/factory/factory_suggest.json @@ -1,625 +1,810 @@ [ { "Package": "factory", - "Class": "Insect", + "NodeName": "Insect", "Type": "Class", - "Path": "_fixtures/suggest/factory/Bee.java", + "FilePath": "_fixtures/suggest/factory/Bee.java", "Fields": null, - "Methods": [ + "Functions": [ { "Name": "Insect", "Type": "", - "StartLine": 4, - "StartLinePosition": 11, - "StopLine": 7, - "StopLinePosition": 4, "Parameters": [ { - "Name": "size", - "Type": "int" - } - ], - "MethodCalls": [ + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null + }, { - "Package": "factory", - "Type": "", - "Class": "Insect", - "MethodName": "this", - "StartLine": 5, - "StartLinePosition": 8, - "StopLine": 5, - "StopLinePosition": 12 + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, + { + "Modifiers": null, + "Name": "", + "TypeValue": "color", + "TypeType": "String", + "ReturnTypes": null, + "Parameters": null + } + ], + "FunctionCalls": [ { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 6, - "StartLinePosition": 19, - "StopLine": 6, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Insect size, height\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 14, + "StartLinePosition": 19, + "StopLine": 14, + "StopLinePosition": 26 + } } ], "Override": false, "Annotations": null, - "IsConstructor": true + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null, + "Position": { + "StartLine": 13, + "StartLinePosition": 11, + "StopLine": 15, + "StopLinePosition": 4 + } }, { "Name": "Insect", "Type": "", - "StartLine": 9, - "StartLinePosition": 11, - "StopLine": 11, - "StopLinePosition": 4, "Parameters": [ { - "Name": "size", - "Type": "int" - }, - { - "Name": "height", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 10, - "StartLinePosition": 19, - "StopLine": 10, - "StopLinePosition": 26 + "NodeName": "Insect", + "FunctionName": "this", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + }, + { + "Modifiers": null, + "Name": "", + "TypeValue": "123", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 5, + "StartLinePosition": 8, + "StopLine": 5, + "StopLinePosition": 12 + } + }, + { + "Package": "factory", + "Type": "", + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Insect size\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 6, + "StartLinePosition": 19, + "StopLine": 6, + "StopLinePosition": 26 + } } ], "Override": false, "Annotations": null, - "IsConstructor": true + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null, + "Position": { + "StartLine": 4, + "StartLinePosition": 11, + "StopLine": 7, + "StopLinePosition": 4 + } }, { "Name": "Insect", "Type": "", - "StartLine": 13, - "StartLinePosition": 11, - "StopLine": 15, - "StopLinePosition": 4, "Parameters": [ { - "Name": "size", - "Type": "int" - }, - { - "Name": "height", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "color", - "Type": "String" + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 14, - "StartLinePosition": 19, - "StopLine": 14, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Insect size, height\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 10, + "StartLinePosition": 19, + "StopLine": 10, + "StopLinePosition": 26 + } } ], "Override": false, "Annotations": null, - "IsConstructor": true - } - ], - "MethodCalls": [ - { - "Package": "factory", - "Type": "", - "Class": "Insect", - "MethodName": "this", - "StartLine": 5, - "StartLinePosition": 8, - "StopLine": 5, - "StopLinePosition": 12 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 6, - "StartLinePosition": 19, - "StopLine": 6, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 10, - "StartLinePosition": 19, - "StopLine": 10, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 14, - "StartLinePosition": 19, - "StopLine": 14, - "StopLinePosition": 26 + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null, + "Position": { + "StartLine": 9, + "StartLinePosition": 11, + "StopLine": 11, + "StopLinePosition": 4 + } } ], + "FunctionCalls": null, "Extend": "", - "Implements": null + "Implements": null, + "Annotations": null, + "InnerClass": null, + "Imports": null }, { "Package": "", - "Class": "Bee", + "NodeName": "Bee", "Type": "Class", - "Path": "_fixtures/suggest/factory/Bee.java", + "FilePath": "_fixtures/suggest/factory/Bee.java", "Fields": null, - "Methods": [ + "Functions": [ { "Name": "Bee", "Type": "", - "StartLine": 19, - "StartLinePosition": 11, - "StopLine": 22, - "StopLinePosition": 4, "Parameters": [ { - "Name": "size", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "factory", "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 20, - "StartLinePosition": 8, - "StopLine": 20, - "StopLinePosition": 13 + "NodeName": "Insect", + "FunctionName": "super", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 20, + "StartLinePosition": 8, + "StopLine": 20, + "StopLinePosition": 13 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 21, - "StartLinePosition": 19, - "StopLine": 21, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 21, + "StartLinePosition": 19, + "StopLine": 21, + "StopLinePosition": 26 + } } ], "Override": false, "Annotations": null, - "IsConstructor": true + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null, + "Position": { + "StartLine": 19, + "StartLinePosition": 11, + "StopLine": 22, + "StopLinePosition": 4 + } }, { "Name": "Bee", "Type": "", - "StartLine": 24, - "StartLinePosition": 11, - "StopLine": 27, - "StopLinePosition": 4, "Parameters": [ { - "Name": "size", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "height", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "factory", "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 25, - "StartLinePosition": 8, - "StopLine": 25, - "StopLinePosition": 13 + "NodeName": "Insect", + "FunctionName": "super", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + }, + { + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 25, + "StartLinePosition": 8, + "StopLine": 25, + "StopLinePosition": 13 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 26, - "StartLinePosition": 19, - "StopLine": 26, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 26, + "StartLinePosition": 19, + "StopLine": 26, + "StopLinePosition": 26 + } } ], "Override": false, "Annotations": null, - "IsConstructor": true + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null, + "Position": { + "StartLine": 24, + "StartLinePosition": 11, + "StopLine": 27, + "StopLinePosition": 4 + } }, { "Name": "Bee", "Type": "", - "StartLine": 29, - "StartLinePosition": 11, - "StopLine": 32, - "StopLinePosition": 4, "Parameters": [ { - "Name": "size", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "height", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "color", - "Type": "String" + "Modifiers": null, + "Name": "", + "TypeValue": "color", + "TypeType": "String", + "ReturnTypes": null, + "Parameters": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "factory", "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 30, - "StartLinePosition": 8, - "StopLine": 30, - "StopLinePosition": 13 + "NodeName": "Insect", + "FunctionName": "super", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + }, + { + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 30, + "StartLinePosition": 8, + "StopLine": 30, + "StopLinePosition": 13 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 31, - "StartLinePosition": 19, - "StopLine": 31, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 31, + "StartLinePosition": 19, + "StopLine": 31, + "StopLinePosition": 26 + } } ], "Override": false, "Annotations": null, - "IsConstructor": true + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null, + "Position": { + "StartLine": 29, + "StartLinePosition": 11, + "StopLine": 32, + "StopLinePosition": 4 + } }, { "Name": "Bee", "Type": "", - "StartLine": 34, - "StartLinePosition": 11, - "StopLine": 46, - "StopLinePosition": 4, "Parameters": [ { - "Name": "size", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "height", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "color", - "Type": "String" + "Modifiers": null, + "Name": "", + "TypeValue": "color", + "TypeType": "String", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "x", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "x", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "y", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "y", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null }, { - "Name": "z", - "Type": "int" + "Modifiers": null, + "Name": "", + "TypeValue": "z", + "TypeType": "int", + "ReturnTypes": null, + "Parameters": null } ], - "MethodCalls": [ + "FunctionCalls": [ { "Package": "factory", "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 35, - "StartLinePosition": 8, - "StopLine": 35, - "StopLinePosition": 13 + "NodeName": "Insect", + "FunctionName": "super", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "size", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + }, + { + "Modifiers": null, + "Name": "", + "TypeValue": "height", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 35, + "StartLinePosition": 8, + "StopLine": 35, + "StopLinePosition": 13 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 36, - "StartLinePosition": 19, - "StopLine": 36, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 36, + "StartLinePosition": 19, + "StopLine": 36, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 37, - "StartLinePosition": 19, - "StopLine": 37, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 37, + "StartLinePosition": 19, + "StopLine": 37, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 38, - "StartLinePosition": 19, - "StopLine": 38, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 38, + "StartLinePosition": 19, + "StopLine": 38, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 39, - "StartLinePosition": 19, - "StopLine": 39, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 39, + "StartLinePosition": 19, + "StopLine": 39, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 40, - "StartLinePosition": 19, - "StopLine": 40, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 40, + "StartLinePosition": 19, + "StopLine": 40, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 41, - "StartLinePosition": 19, - "StopLine": 41, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 41, + "StartLinePosition": 19, + "StopLine": 41, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 42, - "StartLinePosition": 19, - "StopLine": 42, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 42, + "StartLinePosition": 19, + "StopLine": 42, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 43, - "StartLinePosition": 19, - "StopLine": 43, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 43, + "StartLinePosition": 19, + "StopLine": 43, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 44, - "StartLinePosition": 19, - "StopLine": 44, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 44, + "StartLinePosition": 19, + "StopLine": 44, + "StopLinePosition": 26 + } }, { "Package": "factory", "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 45, - "StartLinePosition": 19, - "StopLine": 45, - "StopLinePosition": 26 + "NodeName": "System.out", + "FunctionName": "println", + "Parameters": [ + { + "Modifiers": null, + "Name": "", + "TypeValue": "\"Constructor: Bee size, height, color\"", + "TypeType": "", + "ReturnTypes": null, + "Parameters": null + } + ], + "Position": { + "StartLine": 45, + "StartLinePosition": 19, + "StopLine": 45, + "StopLinePosition": 26 + } } ], "Override": false, "Annotations": null, - "IsConstructor": true - } - ], - "MethodCalls": [ - { - "Package": "factory", - "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 20, - "StartLinePosition": 8, - "StopLine": 20, - "StopLinePosition": 13 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 21, - "StartLinePosition": 19, - "StopLine": 21, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 25, - "StartLinePosition": 8, - "StopLine": 25, - "StopLinePosition": 13 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 26, - "StartLinePosition": 19, - "StopLine": 26, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 30, - "StartLinePosition": 8, - "StopLine": 30, - "StopLinePosition": 13 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 31, - "StartLinePosition": 19, - "StopLine": 31, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "super", - "Class": "Insect", - "MethodName": "super", - "StartLine": 35, - "StartLinePosition": 8, - "StopLine": 35, - "StopLinePosition": 13 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 36, - "StartLinePosition": 19, - "StopLine": 36, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 37, - "StartLinePosition": 19, - "StopLine": 37, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 38, - "StartLinePosition": 19, - "StopLine": 38, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 39, - "StartLinePosition": 19, - "StopLine": 39, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 40, - "StartLinePosition": 19, - "StopLine": 40, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 41, - "StartLinePosition": 19, - "StopLine": 41, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 42, - "StartLinePosition": 19, - "StopLine": 42, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 43, - "StartLinePosition": 19, - "StopLine": 43, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 44, - "StartLinePosition": 19, - "StopLine": 44, - "StopLinePosition": 26 - }, - { - "Package": "factory", - "Type": "", - "Class": "System.out", - "MethodName": "println", - "StartLine": 45, - "StartLinePosition": 19, - "StopLine": 45, - "StopLinePosition": 26 + "IsConstructor": true, + "IsReturnNull": false, + "Modifiers": null, + "Creators": null, + "Position": { + "StartLine": 34, + "StartLinePosition": 11, + "StopLine": 46, + "StopLinePosition": 4 + } } ], - "Extend": "", - "Implements": null + "FunctionCalls": null, + "Extend": "factory.Insect", + "Implements": null, + "Annotations": null, + "InnerClass": null, + "Imports": null } ] \ No newline at end of file diff --git a/_fixtures/tbs/tbs/src/main/java/tbs/Calculate.java b/_fixtures/tbs/demo-tbs-java-project/src/main/java/tbs/Calculate.java similarity index 100% rename from _fixtures/tbs/tbs/src/main/java/tbs/Calculate.java rename to _fixtures/tbs/demo-tbs-java-project/src/main/java/tbs/Calculate.java diff --git a/_fixtures/tbs/tbs/src/main/java/tbs/XmlSanitizer.java b/_fixtures/tbs/demo-tbs-java-project/src/main/java/tbs/XmlSanitizer.java similarity index 100% rename from _fixtures/tbs/tbs/src/main/java/tbs/XmlSanitizer.java rename to _fixtures/tbs/demo-tbs-java-project/src/main/java/tbs/XmlSanitizer.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/AssertionRoulette.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/AssertionRoulette.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/AssertionRoulette.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/AssertionRoulette.java diff --git a/_fixtures/tbs/code/ConditionalTest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/ConditionalTest.java similarity index 100% rename from _fixtures/tbs/code/ConditionalTest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/ConditionalTest.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/ConstructorInitialization.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/ConstructorInitialization.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/ConstructorInitialization.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/ConstructorInitialization.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/DuplicateAssert.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/DuplicateAssert.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/DuplicateAssert.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/DuplicateAssert.java diff --git a/_fixtures/tbs/code/EmptyTest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/EmptyTest.java similarity index 100% rename from _fixtures/tbs/code/EmptyTest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/EmptyTest.java diff --git a/_fixtures/tbs/code/IgnoreTest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/IgnoreTest.java similarity index 100% rename from _fixtures/tbs/code/IgnoreTest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/IgnoreTest.java diff --git a/_fixtures/tbs/code/MagicNumberTest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/MagicNumberTest.java similarity index 100% rename from _fixtures/tbs/code/MagicNumberTest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/MagicNumberTest.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/MysteryGuest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/MysteryGuest.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/MysteryGuest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/MysteryGuest.java diff --git a/_fixtures/tbs/code/RedundantAssertionTest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/RedundantAssertionTest.java similarity index 100% rename from _fixtures/tbs/code/RedundantAssertionTest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/RedundantAssertionTest.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/RedundantPrint.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/RedundantPrint.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/RedundantPrint.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/RedundantPrint.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/SleepyTest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/SleepyTest.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/SleepyTest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/SleepyTest.java diff --git a/_fixtures/tbs/code/UnknownTest.java b/_fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/UnknownTest.java similarity index 100% rename from _fixtures/tbs/code/UnknownTest.java rename to _fixtures/tbs/demo-tbs-java-project/src/test/java/tbs/UnknownTest.java diff --git a/_fixtures/tbs/regression/CallAssertInClassTests.java b/_fixtures/tbs/regression/CallAssertInClassTests.java new file mode 100644 index 0000000000000000000000000000000000000000..2391bd2b5ce526c5e28d4bc221e43e4a843189a8 --- /dev/null +++ b/_fixtures/tbs/regression/CallAssertInClassTests.java @@ -0,0 +1,54 @@ +/* + * Copyright 2002-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.context.event; + +import org.junit.jupiter.api.Test; + +import org.springframework.context.ApplicationEvent; +import org.springframework.context.ApplicationListener; +import org.springframework.core.ResolvableType; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +/** + * @author Stephane Nicoll + */ +@RunWith(PowerMockRunner.class) +public class CallAssertInClassTests extends AbstractApplicationEventListenerTests { + + @Mock + Connection connection = PowerMockito.mock(Connection.class); + + @Test // Demonstrates we cant inject that event because the listener has a raw type + public void genericListenerRawTypeTypeErasure() { + GenericTestEvent stringEvent = createGenericTestEvent("test"); + ResolvableType eventType = ResolvableType.forType(stringEvent.getClass()); + supportsEventType(true, RawApplicationListener.class, eventType); + } + + @SuppressWarnings("rawtypes") + private void supportsEventType( + boolean match, Class listenerType, ResolvableType eventType) { + + ApplicationListener listener = mock(listenerType); + GenericApplicationListenerAdapter adapter = new GenericApplicationListenerAdapter(listener); + assertThat(adapter.supportsEventType(eventType)).as("Wrong match for event '" + eventType + "' on " + listenerType.getClass().getName()).isEqualTo(match); + } +} diff --git a/_fixtures/tbs/regression/CreatorNotUnknownTest.java b/_fixtures/tbs/regression/CreatorNotUnknownTest.java new file mode 100644 index 0000000000000000000000000000000000000000..6bfac20bf9e06722226d3951da1f2d802ea2fea2 --- /dev/null +++ b/_fixtures/tbs/regression/CreatorNotUnknownTest.java @@ -0,0 +1,33 @@ +package cc.arduino.packages.contributions; + +import org.junit.Test; +import processing.app.Platform; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +public class HostDependentDownloadableContributionTest { + @Test + public void macOsXPositiveTest() { + HostDependentDownloadableContributionStub contribution = new HostDependentDownloadableContributionStub() { + @Override + public String getHost() { + return "x86_64-apple-darwin"; + } + }; + + Platform platform = new Platform() { + @Override + public String getOsName() { + return "Mac OS X"; + } + + @Override + public String getOsArch() { + return "x86_64"; + } + }; + + assertTrue(contribution.isCompatible(platform)); + } +} \ No newline at end of file diff --git a/_fixtures/tbs/regression/EnvironmentSystemIntegrationTests.java b/_fixtures/tbs/regression/EnvironmentSystemIntegrationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..381b82bc5b400cdc13b4fd4f9821f70a52379321 --- /dev/null +++ b/_fixtures/tbs/regression/EnvironmentSystemIntegrationTests.java @@ -0,0 +1,150 @@ +/* + * Copyright 2002-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.core.env; + +import java.io.File; +import java.io.IOException; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.EnvironmentAware; +import org.springframework.context.annotation.AnnotatedBeanDefinitionReader; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ClassPathBeanDefinitionScanner; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.Profile; +import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.context.support.FileSystemXmlApplicationContext; +import org.springframework.context.support.GenericApplicationContext; +import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.context.support.StaticApplicationContext; +import org.springframework.core.io.ClassPathResource; +import org.springframework.jca.context.ResourceAdapterApplicationContext; +import org.springframework.jca.support.SimpleBootstrapContext; +import org.springframework.jca.work.SimpleTaskWorkManager; +import org.springframework.mock.env.MockEnvironment; +import org.springframework.mock.env.MockPropertySource; +import org.springframework.mock.web.MockServletConfig; +import org.springframework.mock.web.MockServletContext; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.AbstractRefreshableWebApplicationContext; +import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; +import org.springframework.web.context.support.GenericWebApplicationContext; +import org.springframework.web.context.support.StandardServletEnvironment; +import org.springframework.web.context.support.StaticWebApplicationContext; +import org.springframework.web.context.support.XmlWebApplicationContext; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition; +import static org.springframework.context.ConfigurableApplicationContext.ENVIRONMENT_BEAN_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DERIVED_DEV_BEAN_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DERIVED_DEV_ENV_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_BEAN_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_ENV_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.ENVIRONMENT_AWARE_BEAN_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_BEAN_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_ENV_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.TRANSITIVE_BEAN_NAME; +import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.XML_PATH; + +/** + * System integration tests for container support of the {@link Environment} API. + * + *

+ * Tests all existing BeanFactory and ApplicationContext implementations to ensure that: + *

    + *
  • a standard environment object is always present + *
  • a custom environment object can be set and retrieved against the factory/context + *
  • the {@link EnvironmentAware} interface is respected + *
  • the environment object is registered with the container as a singleton bean (if an + * ApplicationContext) + *
  • bean definition files (if any, and whether XML or @Configuration) are registered + * conditionally based on environment metadata + *
+ * + * @author Chris Beams + * @author Sam Brannen + * @see org.springframework.context.support.EnvironmentIntegrationTests + */ +@SuppressWarnings("resource") +public class EnvironmentSystemIntegrationTests { + + private final ConfigurableEnvironment prodEnv = new StandardEnvironment(); + + private final ConfigurableEnvironment devEnv = new StandardEnvironment(); + + private final ConfigurableEnvironment prodWebEnv = new StandardServletEnvironment(); + + @BeforeEach + void setUp() { + prodEnv.setActiveProfiles(PROD_ENV_NAME); + devEnv.setActiveProfiles(DEV_ENV_NAME); + prodWebEnv.setActiveProfiles(PROD_ENV_NAME); + } + + @Test + void mostSpecificDerivedClassDrivesEnvironment_withDevEnvAndDerivedDevConfigClass() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); + ctx.setEnvironment(devEnv); + ctx.register(DerivedDevConfig.class); + ctx.refresh(); + + assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse(); + assertThat(ctx.containsBean(DERIVED_DEV_BEAN_NAME)).isFalse(); + assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse(); + } + + @Test + void annotationConfigApplicationContext_withProfileExpressionMatchOr() { + testProfileExpression(true, "p3"); + } + + @Test + void annotationConfigApplicationContext_withProfileExpressionMatchAnd() { + testProfileExpression(true, "p1", "p2"); + } + + @Test + void annotationConfigApplicationContext_withProfileExpressionNoMatchAnd() { + testProfileExpression(false, "p1"); + } + + @Test + void annotationConfigApplicationContext_withProfileExpressionNoMatchNone() { + testProfileExpression(false, "p4"); + } + + private void testProfileExpression(boolean expected, String... activeProfiles) { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); + StandardEnvironment environment = new StandardEnvironment(); + environment.setActiveProfiles(activeProfiles); + ctx.setEnvironment(environment); + ctx.register(ProfileExpressionConfig.class); + ctx.refresh(); + assertThat(ctx.containsBean("expressionBean")).isEqualTo(expected); + } +} diff --git a/_fixtures/tbs/regression/I18NTest.java b/_fixtures/tbs/regression/I18NTest.java new file mode 100644 index 0000000000000000000000000000000000000000..246f9b8894239506b8bb27a66b0ff35c1ee0986e --- /dev/null +++ b/_fixtures/tbs/regression/I18NTest.java @@ -0,0 +1,90 @@ +/* + * This file is part of Arduino. + * + * Copyright 2015 Arduino LLC (http://www.arduino.cc/) + * + * Arduino is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + */ + +package cc.arduino.i18n; + +import org.junit.Test; +import processing.app.AbstractWithPreferencesTest; +import processing.app.I18n; + +import java.util.Collections; +import java.util.Locale; +import java.util.Map; +import java.util.ResourceBundle; + +import static org.junit.Assert.assertEquals; + +public class I18NTest extends AbstractWithPreferencesTest { + + @Test + public void testMessageFormat() throws Exception { + Object[] args = new Object[]{"a", "b", "c"}; + String actual = I18n.format("WARNING: Category '{0}' in library {1} is not valid. Setting to '{2}'", args); + assertEquals("WARNING: Category 'a' in library b is not valid. Setting to 'c'", actual); + } + + @Test + public void testMessageFormatFromExternalProcess() throws Exception { + Map output = new ExternalProcessOutputParser().parse("===WARNING: Category '{0}' in library {1} is not valid. Setting to '{2}' ||| [ Wire Uncategorized]"); + + String actual = I18n.format((String) output.get("msg"), (Object[]) output.get("args")); + assertEquals("WARNING: Category '' in library Wire is not valid. Setting to 'Uncategorized'", actual); + } + + @Test + public void testAllLocales() { + for (Language language : Languages.languages) { + if (!language.getIsoCode().equals("")) { + Locale locale = toLocale(language); + ResourceBundle bundle = ResourceBundle.getBundle("processing.app.i18n.Resources", locale); + if (locale.equals(bundle.getLocale())) { + Collections.list(bundle.getKeys()).stream().map(bundle::getString).filter(key -> !key.contains(" { + try { + I18n.format(key); + } catch (IllegalArgumentException e) { + System.out.println(language); + System.out.println(key); + throw e; + } + }); + } else { + System.out.println("Missing locale: " + locale); + } + } + } + } + + private Locale toLocale(Language language) { + String[] languageParts = language.getIsoCode().split("_"); + if (languageParts.length == 2) { + return new Locale(languageParts[0], languageParts[1]); + } + return new Locale(languageParts[0]); + } +} diff --git a/_fixtures/tbs/code/AssertionRouletteTest.java b/_fixtures/tbs/usecases/AssertionRouletteTest.java similarity index 100% rename from _fixtures/tbs/code/AssertionRouletteTest.java rename to _fixtures/tbs/usecases/AssertionRouletteTest.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/ConditionalTest.java b/_fixtures/tbs/usecases/ConditionalTest.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/ConditionalTest.java rename to _fixtures/tbs/usecases/ConditionalTest.java diff --git a/_fixtures/tbs/code/ConstructorInitializationTest.java b/_fixtures/tbs/usecases/ConstructorInitializationTest.java similarity index 100% rename from _fixtures/tbs/code/ConstructorInitializationTest.java rename to _fixtures/tbs/usecases/ConstructorInitializationTest.java diff --git a/_fixtures/tbs/code/DuplicateAssertTest.java b/_fixtures/tbs/usecases/DuplicateAssertTest.java similarity index 84% rename from _fixtures/tbs/code/DuplicateAssertTest.java rename to _fixtures/tbs/usecases/DuplicateAssertTest.java index 50055d0b2a0a87cad91745db8cd83b9cf1224f14..8f16a4d0765dfa9ba4494dedd4a51d27a5f7af3e 100644 --- a/_fixtures/tbs/code/DuplicateAssertTest.java +++ b/_fixtures/tbs/usecases/DuplicateAssertTest.java @@ -18,5 +18,8 @@ public class DuplicateAssertTest { valid = XmlSanitizer.isValid("Fritz!box"); assertEquals("Exclamation mark is valid", true, valid); + + valid = XmlSanitizer.isValid("Fritz!box"); + assertEquals("Exclamation mark is valid", true, valid); } } diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/EmptyTest.java b/_fixtures/tbs/usecases/EmptyTest.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/EmptyTest.java rename to _fixtures/tbs/usecases/EmptyTest.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/IgnoreTest.java b/_fixtures/tbs/usecases/IgnoreTest.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/IgnoreTest.java rename to _fixtures/tbs/usecases/IgnoreTest.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/MagicNumberTest.java b/_fixtures/tbs/usecases/MagicNumberTest.java similarity index 100% rename from _fixtures/tbs/tbs/src/test/java/tbs/MagicNumberTest.java rename to _fixtures/tbs/usecases/MagicNumberTest.java diff --git a/_fixtures/tbs/code/MysteryGuestTest.java b/_fixtures/tbs/usecases/MysteryGuestTest.java similarity index 100% rename from _fixtures/tbs/code/MysteryGuestTest.java rename to _fixtures/tbs/usecases/MysteryGuestTest.java diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/RedundantAssertionTest.java b/_fixtures/tbs/usecases/RedundantAssertionTest.java similarity index 63% rename from _fixtures/tbs/tbs/src/test/java/tbs/RedundantAssertionTest.java rename to _fixtures/tbs/usecases/RedundantAssertionTest.java index 3e5488be2227126cbf19b7477a33c35ef00e95bd..68f17cfab4a943c43f54f915f1694ab31c4ebe1c 100644 --- a/_fixtures/tbs/tbs/src/test/java/tbs/RedundantAssertionTest.java +++ b/_fixtures/tbs/usecases/RedundantAssertionTest.java @@ -7,6 +7,10 @@ import static org.junit.Assert.assertEquals; public class RedundantAssertionTest { @Test public void testTrue() { + Calculate calculate = new Calculate(); + int result = calculate.add(7, 8); + int success = 15; + assertEquals(true, true); } } diff --git a/_fixtures/tbs/code/RedundantPrintTest.java b/_fixtures/tbs/usecases/RedundantPrintTest.java similarity index 100% rename from _fixtures/tbs/code/RedundantPrintTest.java rename to _fixtures/tbs/usecases/RedundantPrintTest.java diff --git a/_fixtures/tbs/code/SleepyTest.java b/_fixtures/tbs/usecases/SleepyTest.java similarity index 100% rename from _fixtures/tbs/code/SleepyTest.java rename to _fixtures/tbs/usecases/SleepyTest.java diff --git a/_fixtures/tbs/usecases/TestersOnly.java b/_fixtures/tbs/usecases/TestersOnly.java new file mode 100644 index 0000000000000000000000000000000000000000..3f7f648a24645e55c531c9329000b00d581780fe --- /dev/null +++ b/_fixtures/tbs/usecases/TestersOnly.java @@ -0,0 +1,5 @@ +/* +* +* public for test call only +* +*/ diff --git a/_fixtures/tbs/tbs/src/test/java/tbs/UnknownTest.java b/_fixtures/tbs/usecases/UnknownTest.java similarity index 91% rename from _fixtures/tbs/tbs/src/test/java/tbs/UnknownTest.java rename to _fixtures/tbs/usecases/UnknownTest.java index e20fefdbc3d73bbacd7605c9367e38aa6d76b661..d2079bbd153c53ab3490f2c677ebe4ac804b8420 100644 --- a/_fixtures/tbs/tbs/src/test/java/tbs/UnknownTest.java +++ b/_fixtures/tbs/usecases/UnknownTest.java @@ -8,5 +8,6 @@ public class UnknownTest { String a = "blabla"; String b = "blablac"; String c = a + b; + Show(a, b); } } diff --git a/_fixtures/todo/Todo.go b/_fixtures/todo/Todo.go new file mode 100644 index 0000000000000000000000000000000000000000..ebb6ddd7ee484e7d29f0a8342e09264474f2bf29 --- /dev/null +++ b/_fixtures/todo/Todo.go @@ -0,0 +1,3 @@ +package todo + +//todo: add todo test for golang diff --git a/_fixtures/todo/Toodo.java b/_fixtures/todo/Todo.java similarity index 100% rename from _fixtures/todo/Toodo.java rename to _fixtures/todo/Todo.java diff --git a/_fixtures/todo/todo.phodal b/_fixtures/todo/todo.phodal new file mode 100644 index 0000000000000000000000000000000000000000..0ce228fbb183e91135754bbd33023099da763857 --- /dev/null +++ b/_fixtures/todo/todo.phodal @@ -0,0 +1 @@ +// todo: add todo for other text like phodal diff --git a/_fixtures/todo/todo.py b/_fixtures/todo/todo.py new file mode 100644 index 0000000000000000000000000000000000000000..9403ba6f337d5f30bb653498882cb83c3168dbe3 --- /dev/null +++ b/_fixtures/todo/todo.py @@ -0,0 +1 @@ +# todo: add todo for python \ No newline at end of file diff --git a/_fixtures/ts/grammar/AbstractClass.ts b/_fixtures/ts/grammar/AbstractClass.ts new file mode 100755 index 0000000000000000000000000000000000000000..098af305b91b36d4a911920d79546b89e43e2faf --- /dev/null +++ b/_fixtures/ts/grammar/AbstractClass.ts @@ -0,0 +1,29 @@ +abstract class Person { + name: string; + + constructor(name: string) { + this.name = name; + } + + abstract find(string): Person; + abstract nameAbs: string; +} + +class Employee extends Person { + empCode: number; + + constructor(name: string, code: number) { + super(name); // must call super() + this.empCode = code; + } + + find(name:string): Person { + // execute AJAX request to find an employee from a db + return new Employee(name, 1); + } +} + +let emp: Person = new Employee("James", 100); +emp.display(); //James + +let emp2: Person = emp.find('Steve'); \ No newline at end of file diff --git a/_fixtures/ts/grammar/Class.ts b/_fixtures/ts/grammar/Class.ts new file mode 100755 index 0000000000000000000000000000000000000000..cc67b5e6f45cbf9d684448e8e9a6f6e55316ee86 --- /dev/null +++ b/_fixtures/ts/grammar/Class.ts @@ -0,0 +1,31 @@ +interface IPerson { + name: string; +} + +class Person implements IPerson { + public publicString: string; + private privateString: string; + protected protectedString: string; + readonly readonlyString: string; + name: string; + + constructor(name: string) { + this.name = name; + } +} + +class Employee extends Person { + empCode: number; + static pi: number = 3.14; + + constructor(empcode: number, name:string) { + super(name); + this.empCode = empcode; + } + + displayName():void { + console.log("Name = " + this.name + ", Employee Code = " + this.empCode); + } +} + +let emp = new Employee(100,"Steve"); \ No newline at end of file diff --git a/_fixtures/ts/grammar/Export.ts b/_fixtures/ts/grammar/Export.ts new file mode 100755 index 0000000000000000000000000000000000000000..4babaa99efa0c426133aa3fff71dbc4772751720 --- /dev/null +++ b/_fixtures/ts/grammar/Export.ts @@ -0,0 +1,17 @@ +namespace StringUtility +{ + function ToCapital(str: string): string { + return str.toUpperCase(); + } + + function Nemw(str: string, length: number = 0): string { + return str.toUpperCase(); + } + export function Eported(from: string, length: number = 0): string { + return from.toUpperCase(); + } + + export function Eported2(str: string, length: number = 0): string { + return str.toUpperCase(); + } +} \ No newline at end of file diff --git a/_fixtures/ts/grammar/Function.ts b/_fixtures/ts/grammar/Function.ts new file mode 100755 index 0000000000000000000000000000000000000000..74d50c79a49739f65a9894750346cd63fdfc5427 --- /dev/null +++ b/_fixtures/ts/grammar/Function.ts @@ -0,0 +1,41 @@ +function Sum(x: number, y: number) : void { + console.log('processNumKeyPairs: key = ' + key + ', value = ' + value) + return x + y; +} + + +let greeting = function() { + console.log("Hello TypeScript!"); +}; + +let SumAnon = function(x: number, y: number) : number +{ + return x + y; +} + +function Greet(greeting: string, name?: string ) : string { + return greeting + ' ' + name + '!'; +} + +function Greet2(name: string, greeting: string = "Hello") : string { + return greeting + ' ' + name + '!'; +} + +Greet(undefined, 'Steve'); + +let sumArrow = (x: number, y: number): number => { + return x + y +} + +let Print = () => console.log("Hello TypeScript"); + +let sumShortArrow = (x: number, y: number) => x + y; + +function Greet(greeting: string, ...names: string[]) { + return greeting + " " + names.join(", ") + "!"; +} + + +function Test(value: TestClass | TestClass2): value is TestClass { + return (value).someFunction !== undefined; +} \ No newline at end of file diff --git a/_fixtures/ts/grammar/Generic.ts b/_fixtures/ts/grammar/Generic.ts new file mode 100755 index 0000000000000000000000000000000000000000..c9fd76c689c33bf7da9cf8411c8f7d5eecc8a109 --- /dev/null +++ b/_fixtures/ts/grammar/Generic.ts @@ -0,0 +1,30 @@ +function getArray(items : T[] ) : T[] { + return new Array().concat(); +} + +let myNumArr = getArray([100, 200, 300]); +let myStrArr = getArray(["Hello", "World"]); + +myNumArr.push(400); // OK +myStrArr.push("Hello TypeScript"); // OK + +myNumArr.push("Hi"); // Compiler Error +myStrArr.push(500); // Compiler Error + + +function displayType(id:T, name:U): void { + console.log(typeof(id) + ", " + typeof(name)); +} + +function displayTypeNon(id:T, name:string): void { + console.log(typeof(id) + ", " + typeof(name)); +} + +function displayNames(names:T[]): void { + console.log(names.join(", ")); +} + + +function display(per: T): void { + console.log(`${ per.firstName} ${per.lastName}` ); +} \ No newline at end of file diff --git a/_fixtures/ts/grammar/GenericClass.ts b/_fixtures/ts/grammar/GenericClass.ts new file mode 100755 index 0000000000000000000000000000000000000000..d9e1e9f3e76786af2456d73ed365bd6a88fe0fa6 --- /dev/null +++ b/_fixtures/ts/grammar/GenericClass.ts @@ -0,0 +1,34 @@ +class KeyValuePair +{ + private key: T; + private val: U; + + setKeyValue(key: T, val: U): void { + this.key = key; + this.val = val; + } + + display():void { + console.log(`Key = ${this.key}, val = ${this.val}`); + } +} +let kvp1 = new KeyValuePair(); +kvp1.setKeyValue(1, "Steve"); +kvp1.display(); //Output: Key = 1, Val = Steve + +let kvp2 = new KayValuePair(); +kvp2.SetKeyValue("CEO", "Bill"); +kvp2.display(); //Output: Key = CEO, Val = Bill + + +interface IKeyValueProcessor +{ + process(key: T, val: U): void; +}; + +class kvProcessor implements IKeyValueProcessor +{ + process(key:T, val:U):void { + console.log(`Key = ${key}, val = ${val}`); + } +} \ No newline at end of file diff --git a/_fixtures/ts/grammar/GenericInterface.ts b/_fixtures/ts/grammar/GenericInterface.ts new file mode 100755 index 0000000000000000000000000000000000000000..49795fd402956214aca0d395a5559d237cf44bb1 --- /dev/null +++ b/_fixtures/ts/grammar/GenericInterface.ts @@ -0,0 +1,22 @@ +interface IProcessor +{ + result:T; + process(a: T, b: T) => T; +} + +interface KeyPair { + key: T; + value: U; +} + +let kv1: KeyPair = { key:1, value:"Steve" }; // OK +let kv2: KeyPair = { key:1, value:12345 }; // OK + +interface KeyValueProcessor +{ + (key: T, val: U): void; +}; + +function processNumKeyPairs(key:number, value:number):void { + console.log('processNumKeyPairs: key = ' + key + ', value = ' + value) +} \ No newline at end of file diff --git a/_fixtures/ts/grammar/Import.ts b/_fixtures/ts/grammar/Import.ts new file mode 100644 index 0000000000000000000000000000000000000000..31db3bfc911ea9e1e865c741601b52c915747870 --- /dev/null +++ b/_fixtures/ts/grammar/Import.ts @@ -0,0 +1,5 @@ +import { ZipCodeValidator } from "./ZipCodeValidator"; +import * as validator from "./ZipCodeValidator"; +import "./my-module.js"; +import $ from "JQuery"; +import zip = require("./ZipCodeValidator"); diff --git a/_fixtures/ts/grammar/Interface.ts b/_fixtures/ts/grammar/Interface.ts new file mode 100755 index 0000000000000000000000000000000000000000..b1e8bf43c12a53dbd0b502a9f0502f2e84e0fdf7 --- /dev/null +++ b/_fixtures/ts/grammar/Interface.ts @@ -0,0 +1,60 @@ +export interface IPerson { + name: string; + gender: string; +} + +interface IEmployee extends IPerson{ + empCode: number; + readonly empName: string; + empDept?:string; + getSalary: (number) => number; // arrow function + getManagerName(number): string; +} + + +class Employee implements IEmployee { + empCode: number; + name: string; + + constructor(code: number, name: string) { + this.empCode = code; + this.name = name; + } + + getManagerName(number): string { + return ""; + } + + getSalary(empCode:number):number { + return 20000; + } +} +// Interface As type +interface KeyPair { + key: number; + value: string; +} + +let kv1: KeyPair = { key:1, value:"Steve" }; // OK + +let kv2: KeyPair = { key:1, val:"Steve" }; // Compiler Error: 'val' doesn't exist in type 'KeyPair' + +let kv3: KeyPair = { key:1, value:100 }; // Compiler Error + +//Interface for Array Type + +interface NumList { + [index:string]:string +} + +let numArr: NumList = [1, 2, 3]; +numArr[0]; +numArr[1]; + +interface IStringList { + [index:string]:string +} + +let strArr : IStringList; +strArr["TS"] = "TypeScript"; +strArr["JS"] = "JavaScript"; diff --git a/_fixtures/ts/grammar/Module.ts b/_fixtures/ts/grammar/Module.ts new file mode 100755 index 0000000000000000000000000000000000000000..a30770c2fc4966e6114554fc23b95e1e1941a9c5 --- /dev/null +++ b/_fixtures/ts/grammar/Module.ts @@ -0,0 +1,13 @@ +export let age : number = 20; +export class Employee { + empCode: number; + empName: string; + constructor(name: string, code: number) { + this.empName = name; + this.empCode = code; + } + displayEmployee() { + console.log ("Employee Code: " + this.empCode + ", Employee Name: " + this.empName ); + } +} +let companyName:string = "XYZ"; \ No newline at end of file diff --git a/_fixtures/ts/grammar/Statement.ts b/_fixtures/ts/grammar/Statement.ts new file mode 100755 index 0000000000000000000000000000000000000000..6ce19b7c84728f6b617a7ad3154162318b16518a --- /dev/null +++ b/_fixtures/ts/grammar/Statement.ts @@ -0,0 +1,56 @@ +let x: number = 10, y = 20; + +// If-else + +if (x > y) +{ + console.log('x is greater than y.'); +} +else +{ + console.log('x is less than or equal to y.'); //This will be executed +} + +// Switch +switch (x-y) { + case 0: + console.log("Result: 0"); + break; + case 5: + console.log("Result: 5"); + break; + case 10: + console.log("Result: 10"); + break; +} + +// For +for (let i = 0; i < 3; i++) { + console.log ("Block statement execution no." + i); +} + +let str = "Hello World"; + +for (var char of str) { + console.log(char); // prints chars: H e l l o W o r l d +} + +let arr = [10, 20, 30, 40]; + +for (var index in arr) { + console.log(index); // prints indexes: 0, 1, 2, 3 + + console.log(arr[index]); // prints elements: 10, 20, 30, 40 +} + +// While +let i: number = 2; +do { + console.log("Block statement execution no." + i ) + i++; +} while ( i < 4) + +while (i < 4) { + console.log( "Block statement execution no." + i ) + i++; +} \ No newline at end of file diff --git a/_fixtures/ts/grammar/Type.ts b/_fixtures/ts/grammar/Type.ts new file mode 100755 index 0000000000000000000000000000000000000000..a6c9f81f42e251e441e0d9a8670e45e49a1af14d --- /dev/null +++ b/_fixtures/ts/grammar/Type.ts @@ -0,0 +1,43 @@ +// TypeAnotation +var age: number = 32; // number variable +var name: string = "John";// string variable +var isUpdated: boolean = true;// Boolean variable + +var employee : { + id: number; + name: string; +}; + +employee = { + id: 100, + name : "John" +} + +function display(id:number, name:string) +{ + console.log("Id = " + id + ", Name = " + name); +} + + +// TypeInterface + +var arr = [0, 1, "test"]; +arr.push("str") // OK +arr.push(true); // Compiler Error: Argument of type 'true' is not assignable to parameter of type 'string | number' + +function sum(a: number, b: number ) +{ + return a + b; +} +var total: number = sum(10,20); // OK +var str: string = sum(10,20); // Compiler Error + + +// TypeAssertion + +let code: any = 123; +let employeeCode = code; +console.log(typeof(employeeCode)); //Output: number + + + diff --git a/_fixtures/ts/grammar/Variable.ts b/_fixtures/ts/grammar/Variable.ts new file mode 100755 index 0000000000000000000000000000000000000000..b41a692abaac5e9e8e74a707cae6ac96ccccd1b5 --- /dev/null +++ b/_fixtures/ts/grammar/Variable.ts @@ -0,0 +1,27 @@ +let employeeName = "John"; +// or +let employeeName:string = "John"; + +var num1:number = 1; + +const playerCodes = { + player1 : 9, + player2 : 10, + player3 : 13, + player4 : 20 +}; +playerCodes.player2 = 11; // OK + +playerCodes = { //Compiler Error: Cannot assign to playerCodes because it is a constant or read-only + player1 : 50, // Modified value + player2 : 10, + player3 : 13, + player4 : 20 +}; + +playerCodesArray = { //Compiler Error: Cannot assign to playerCodes because it is a constant or read-only + player1 : 50, // Modified value + player2 : playerCodes[Test], + player3 : 13, + player4 : 20 +}; \ No newline at end of file diff --git a/_fixtures/ts/regressions/callback_hell.ts b/_fixtures/ts/regressions/callback_hell.ts new file mode 100644 index 0000000000000000000000000000000000000000..c37a0bda61bdb8b67f3faafe3f665c751635feaf --- /dev/null +++ b/_fixtures/ts/regressions/callback_hell.ts @@ -0,0 +1,24 @@ +passport.use(new FacebookStrategy({}, (req: any, accessToken, refreshToken, profile, done) => { + if (req.user) { + User.findOne({ facebook: profile.id }, (err, existingUser) => { + if (err) { return done(err); } + if (existingUser) { + req.flash("errors", { msg: "There is already a Facebook account that belongs to you. Sign in with that account or delete it, then link it with your current account." }); + done(err); + } else { + User.findById(req.user.id, (err, user: any) => { + if (err) { return done(err); } + user.facebook = profile.id; + user.tokens.push({ kind: "facebook", accessToken }); + user.profile.name = user.profile.name || `${profile.name.givenName} ${profile.name.familyName}`; + user.profile.gender = user.profile.gender || profile._json.gender; + user.profile.picture = user.profile.picture || `https://graph.facebook.com/${profile.id}/picture?type=large`; + user.save((err: Error) => { + req.flash("info", { msg: "Facebook account has been linked." }); + done(err, user); + }); + }); + } + }); + } +})); diff --git a/_fixtures/ts/regressions/import_comma_issue.ts b/_fixtures/ts/regressions/import_comma_issue.ts new file mode 100644 index 0000000000000000000000000000000000000000..77c2f6f50fa9eb35be3f33c2fda4f61e2835c2af --- /dev/null +++ b/_fixtures/ts/regressions/import_comma_issue.ts @@ -0,0 +1,13 @@ +import bluebird from "bluebird"; +import mongoose from "mongoose"; +import { MONGODB_URI, SESSION_SECRET } from "./util/secrets"; + +const mongoUrl = MONGODB_URI; +mongoose.Promise = bluebird; + +mongoose.connect(mongoUrl, { useNewUrlParser: true, useCreateIndex: true, useUnifiedTopology: true } ).then( + () => { /** ready to use. The `mongoose.connect()` promise resolves to undefined. */ }, +).catch(err => { + console.log("MongoDB connection error. Please make sure MongoDB is running. " + err); + // process.exit(); +}); diff --git a/_fixtures/ts/ts-node-starter/.gitignore b/_fixtures/ts/ts-node-starter/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..15813be9f98d561dfe9a74b7eff950283716484e --- /dev/null +++ b/_fixtures/ts/ts-node-starter/.gitignore @@ -0,0 +1,2 @@ +package-lock.json +node_modules/ diff --git a/_fixtures/ts/ts-node-starter/package.json b/_fixtures/ts/ts-node-starter/package.json new file mode 100755 index 0000000000000000000000000000000000000000..55af135d9ed3520ecb7198813f753fd147718836 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/package.json @@ -0,0 +1,100 @@ +{ + "name": "express-typescript-starter", + "version": "0.1.0", + "description": "A starting point for Node.js express apps with TypeScript", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/TypeScript-Node-Starter" + }, + "author": "Bowden Kelly", + "license": "MIT", + "scripts": { + "start": "npm run serve", + "build": "npm run build-sass && npm run build-ts && npm run lint && npm run copy-static-assets", + "serve": "node dist/server.js", + "watch-node": "nodemon dist/server.js", + "watch": "concurrently -k -p \"[{name}]\" -n \"Sass,TypeScript,Node\" -c \"yellow.bold,cyan.bold,green.bold\" \"npm run watch-sass\" \"npm run watch-ts\" \"npm run watch-node\"", + "test": "jest --forceExit --coverage --verbose", + "watch-test": "npm run test -- --watchAll", + "build-ts": "tsc", + "watch-ts": "tsc -w", + "build-sass": "node-sass src/public/css/main.scss dist/public/css/main.css", + "watch-sass": "node-sass -w src/public/css/main.scss dist/public/css/main.css", + "lint": "tsc --noEmit && eslint \"**/*.{js,ts}\" --quiet --fix", + "copy-static-assets": "ts-node copyStaticAssets.ts", + "debug": "npm run build && npm run watch-debug", + "serve-debug": "nodemon --inspect dist/server.js", + "watch-debug": "concurrently -k -p \"[{name}]\" -n \"Sass,TypeScript,Node\" -c \"yellow.bold,cyan.bold,green.bold\" \"npm run watch-sass\" \"npm run watch-ts\" \"npm run serve-debug\"" + }, + "dependencies": { + "async": "^3.1.0", + "bcrypt-nodejs": "^0.0.3", + "bluebird": "^3.5.5", + "body-parser": "^1.19.0", + "compression": "^1.7.4", + "connect-mongo": "^3.0.0", + "dotenv": "^8.2.0", + "errorhandler": "^1.5.1", + "express": "^4.17.1", + "express-flash": "0.0.2", + "express-session": "^1.16.2", + "express-validator": "^6.2.0", + "fbgraph": "^1.4.4", + "lodash": "^4.17.15", + "lusca": "^1.6.1", + "mongoose": "^5.7.1", + "nodemailer": "^6.3.0", + "passport": "^0.4.0", + "passport-facebook": "^3.0.0", + "passport-local": "^1.0.0", + "pug": "^2.0.4", + "request": "^2.88.0", + "request-promise": "^4.2.4", + "winston": "^3.2.1" + }, + "devDependencies": { + "@types/async": "^3.0.2", + "@types/bcrypt-nodejs": "^0.0.30", + "@types/bluebird": "^3.5.27", + "@types/body-parser": "^1.17.1", + "@types/chai": "^4.2.3", + "@types/compression": "^1.0.1", + "@types/concurrently": "^4.1.0", + "@types/connect-mongo": "^3.0.0", + "@types/errorhandler": "^0.0.32", + "@types/eslint": "^6.1.1", + "@types/express": "^4.17.1", + "@types/express-flash": "0.0.1", + "@types/express-session": "^1.15.14", + "@types/jest": "^24.0.23", + "@types/jquery": "^3.3.31", + "@types/lodash": "^4.14.141", + "@types/lusca": "^1.6.1", + "@types/mongoose": "^5.5.18", + "@types/node": "^12.7.8", + "@types/node-sass": "^4.11.0", + "@types/nodemailer": "^6.2.1", + "@types/passport": "^1.0.1", + "@types/passport-facebook": "^2.1.9", + "@types/passport-local": "^1.0.33", + "@types/pug": "^2.0.4", + "@types/request": "^2.48.3", + "@types/request-promise": "^4.1.44", + "@types/shelljs": "^0.8.5", + "@types/supertest": "^2.0.8", + "@types/winston": "^2.4.4", + "@typescript-eslint/eslint-plugin": "^2.3.1", + "@typescript-eslint/parser": "^2.3.1", + "chai": "^4.2.0", + "concurrently": "^5.0.0", + "eslint": "^6.4.0", + "jest": "^24.9.0", + "node-sass": "^4.13.0", + "nodemon": "^1.19.2", + "shelljs": "^0.8.3", + "supertest": "^4.0.2", + "ts-jest": "^24.1.0", + "ts-node": "^8.4.1", + "typescript": "^3.6.3" + } +} diff --git a/_fixtures/ts/ts-node-starter/src/app.ts b/_fixtures/ts/ts-node-starter/src/app.ts new file mode 100755 index 0000000000000000000000000000000000000000..36e33a1317e68009aa4e566565a130927120fb67 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/app.ts @@ -0,0 +1,119 @@ +import express from "express"; +import compression from "compression"; // compresses requests +import session from "express-session"; +import bodyParser from "body-parser"; +import lusca from "lusca"; +import mongo from "connect-mongo"; +import flash from "express-flash"; +import path from "path"; +import mongoose from "mongoose"; +import passport from "passport"; +import bluebird from "bluebird"; +import { MONGODB_URI, SESSION_SECRET } from "./util/secrets"; + +const MongoStore = mongo(session); + +// Controllers (route handlers) +import * as homeController from "./controllers/home"; +import * as userController from "./controllers/user"; +import * as apiController from "./controllers/api"; +import * as contactController from "./controllers/contact"; + + +// API keys and Passport configuration +import * as passportConfig from "./config/passport"; + +// Create Express server +const app = express(); + +// Connect to MongoDB +const mongoUrl = MONGODB_URI; +mongoose.Promise = bluebird; + +mongoose.connect(mongoUrl, { useNewUrlParser: true, useCreateIndex: true, useUnifiedTopology: true } ).then( + () => { /** ready to use. The `mongoose.connect()` promise resolves to undefined. */ }, +).catch(err => { + console.log("MongoDB connection error. Please make sure MongoDB is running. " + err); + // process.exit(); +}); + +// Express configuration +app.set("port", process.env.PORT || 3000); +app.set("views", path.join(__dirname, "../views")); +app.set("view engine", "pug"); +app.use(compression()); +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: true })); +app.use(session({ + resave: true, + saveUninitialized: true, + secret: SESSION_SECRET, + store: new MongoStore({ + url: mongoUrl, + autoReconnect: true + }) +})); +app.use(passport.initialize()); +app.use(passport.session()); +app.use(flash()); +app.use(lusca.xframe("SAMEORIGIN")); +app.use(lusca.xssProtection(true)); +app.use((req, res, next) => { + res.locals.user = req.user; + next(); +}); +app.use((req, res, next) => { + // After successful login, redirect back to the intended page + if (!req.user && + req.path !== "/login" && + req.path !== "/signup" && + !req.path.match(/^\/auth/) && + !req.path.match(/\./)) { + req.session.returnTo = req.path; + } else if (req.user && + req.path == "/account") { + req.session.returnTo = req.path; + } + next(); +}); + +app.use( + express.static(path.join(__dirname, "public"), { maxAge: 31557600000 }) +); + +/** + * Primary app routes. + */ +app.get("/", homeController.index); +app.get("/login", userController.getLogin); +app.post("/login", userController.postLogin); +app.get("/logout", userController.logout); +app.get("/forgot", userController.getForgot); +app.post("/forgot", userController.postForgot); +app.get("/reset/:token", userController.getReset); +app.post("/reset/:token", userController.postReset); +app.get("/signup", userController.getSignup); +app.post("/signup", userController.postSignup); +app.get("/contact", contactController.getContact); +app.post("/contact", contactController.postContact); +app.get("/account", passportConfig.isAuthenticated, userController.getAccount); +app.post("/account/profile", passportConfig.isAuthenticated, userController.postUpdateProfile); +app.post("/account/password", passportConfig.isAuthenticated, userController.postUpdatePassword); +app.post("/account/delete", passportConfig.isAuthenticated, userController.postDeleteAccount); +app.get("/account/unlink/:provider", passportConfig.isAuthenticated, userController.getOauthUnlink); + +/** + * API examples routes. + */ +app.get("/api", apiController.getApi); +app.get("/api/facebook", passportConfig.isAuthenticated, passportConfig.isAuthorized, apiController.getFacebook); + +/** + * OAuth authentication routes. (Sign in) + */ +app.get("/auth/facebook", passport.authenticate("facebook", { scope: ["email", "public_profile"] })); +app.get("/auth/facebook/callback", passport.authenticate("facebook", { failureRedirect: "/login" }), (req, res) => { + res.redirect(req.session.returnTo || "/"); +}); + +export default app; diff --git a/_fixtures/ts/ts-node-starter/src/config/passport.ts b/_fixtures/ts/ts-node-starter/src/config/passport.ts new file mode 100755 index 0000000000000000000000000000000000000000..c116d24300e0b82a57eb1f7f9d34ba7cad8c7f30 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/config/passport.ts @@ -0,0 +1,142 @@ +import passport from "passport"; +import passportLocal from "passport-local"; +import passportFacebook from "passport-facebook"; +import _ from "lodash"; + +// import { User, UserType } from '../models/User'; +import { User, UserDocument } from "../models/User"; +import { Request, Response, NextFunction } from "express"; + +const LocalStrategy = passportLocal.Strategy; +const FacebookStrategy = passportFacebook.Strategy; + +passport.serializeUser((user, done) => { + done(undefined, user.id); +}); + +passport.deserializeUser((id, done) => { + User.findById(id, (err, user) => { + done(err, user); + }); +}); + + +/** + * Sign in using Email and Password. + */ +passport.use(new LocalStrategy({ usernameField: "email" }, (email, password, done) => { + User.findOne({ email: email.toLowerCase() }, (err, user: any) => { + if (err) { return done(err); } + if (!user) { + return done(undefined, false, { message: `Email ${email} not found.` }); + } + user.comparePassword(password, (err: Error, isMatch: boolean) => { + if (err) { return done(err); } + if (isMatch) { + return done(undefined, user); + } + return done(undefined, false, { message: "Invalid email or password." }); + }); + }); +})); + + +/** + * OAuth Strategy Overview + * + * - User is already logged in. + * - Check if there is an existing account with a provider id. + * - If there is, return an error message. (Account merging not supported) + * - Else link new OAuth account with currently logged-in user. + * - User is not logged in. + * - Check if it's a returning user. + * - If returning user, sign in and we are done. + * - Else check if there is an existing account with user's email. + * - If there is, return an error message. + * - Else create a new account. + */ + + +/** + * Sign in with Facebook. + */ +passport.use(new FacebookStrategy({ + clientID: process.env.FACEBOOK_ID, + clientSecret: process.env.FACEBOOK_SECRET, + callbackURL: "/auth/facebook/callback", + profileFields: ["name", "email", "link", "locale", "timezone"], + passReqToCallback: true +}, (req: any, accessToken, refreshToken, profile, done) => { + if (req.user) { + User.findOne({ facebook: profile.id }, (err, existingUser) => { + if (err) { return done(err); } + if (existingUser) { + req.flash("errors", { msg: "There is already a Facebook account that belongs to you. Sign in with that account or delete it, then link it with your current account." }); + done(err); + } else { + User.findById(req.user.id, (err, user: any) => { + if (err) { return done(err); } + user.facebook = profile.id; + user.tokens.push({ kind: "facebook", accessToken }); + user.profile.name = user.profile.name || `${profile.name.givenName} ${profile.name.familyName}`; + user.profile.gender = user.profile.gender || profile._json.gender; + user.profile.picture = user.profile.picture || `https://graph.facebook.com/${profile.id}/picture?type=large`; + user.save((err: Error) => { + req.flash("info", { msg: "Facebook account has been linked." }); + done(err, user); + }); + }); + } + }); + } else { + User.findOne({ facebook: profile.id }, (err, existingUser) => { + if (err) { return done(err); } + if (existingUser) { + return done(undefined, existingUser); + } + User.findOne({ email: profile._json.email }, (err, existingEmailUser) => { + if (err) { return done(err); } + if (existingEmailUser) { + req.flash("errors", { msg: "There is already an account using this email address. Sign in to that account and link it with Facebook manually from Account Settings." }); + done(err); + } else { + const user: any = new User(); + user.email = profile._json.email; + user.facebook = profile.id; + user.tokens.push({ kind: "facebook", accessToken }); + user.profile.name = `${profile.name.givenName} ${profile.name.familyName}`; + user.profile.gender = profile._json.gender; + user.profile.picture = `https://graph.facebook.com/${profile.id}/picture?type=large`; + user.profile.location = (profile._json.location) ? profile._json.location.name : ""; + user.save((err: Error) => { + done(err, user); + }); + } + }); + }); + } +})); + +/** + * Login Required middleware. + */ +export const isAuthenticated = (req: Request, res: Response, next: NextFunction) => { + if (req.isAuthenticated()) { + return next(); + } + res.redirect("/login"); +}; + +/** + * Authorization Required middleware. + */ +export const isAuthorized = (req: Request, res: Response, next: NextFunction) => { + const provider = req.path.split("/").slice(-1)[0]; + + const user = req.user as UserDocument; + if (_.find(user.tokens, { kind: provider })) { + next(); + } else { + res.redirect(`/auth/${provider}`); + } +}; diff --git a/_fixtures/ts/ts-node-starter/src/controllers/api.ts b/_fixtures/ts/ts-node-starter/src/controllers/api.ts new file mode 100755 index 0000000000000000000000000000000000000000..d5816518eaa2828ec8b227edcc9b48a2a4dfba58 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/controllers/api.ts @@ -0,0 +1,33 @@ +"use strict"; + +import graph from "fbgraph"; +import { Response, Request, NextFunction } from "express"; +import { UserDocument } from "../models/User"; + + +/** + * GET /api + * List of API examples. + */ +export const getApi = (req: Request, res: Response) => { + res.render("api/index", { + title: "API Examples" + }); +}; + +/** + * GET /api/facebook + * Facebook API example. + */ +export const getFacebook = (req: Request, res: Response, next: NextFunction) => { + const user = req.user as UserDocument; + const token = user.tokens.find((token: any) => token.kind === "facebook"); + graph.setAccessToken(token.accessToken); + graph.get(`${user.facebook}?fields=id,name,email,first_name,last_name,gender,link,locale,timezone`, (err: Error, results: graph.FacebookUser) => { + if (err) { return next(err); } + res.render("api/facebook", { + title: "Facebook API", + profile: results + }); + }); +}; diff --git a/_fixtures/ts/ts-node-starter/src/controllers/contact.ts b/_fixtures/ts/ts-node-starter/src/controllers/contact.ts new file mode 100755 index 0000000000000000000000000000000000000000..d624eb8706c52a92a5e85db88c187fb19bee6764 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/controllers/contact.ts @@ -0,0 +1,54 @@ +import nodemailer from "nodemailer"; +import { Request, Response } from "express"; +import { check, validationResult } from "express-validator"; + +const transporter = nodemailer.createTransport({ + service: "SendGrid", + auth: { + user: process.env.SENDGRID_USER, + pass: process.env.SENDGRID_PASSWORD + } +}); + +/** + * GET /contact + * Contact form page. + */ +export const getContact = (req: Request, res: Response) => { + res.render("contact", { + title: "Contact" + }); +}; + +/** + * POST /contact + * Send a contact form via Nodemailer. + */ +export const postContact = async (req: Request, res: Response) => { + await check("name", "Name cannot be blank").not().isEmpty().run(req); + await check("email", "Email is not valid").isEmail().run(req); + await check("message", "Message cannot be blank").not().isEmpty().run(req); + + const errors = validationResult(req); + + if (!errors.isEmpty()) { + req.flash("errors", errors.array()); + return res.redirect("/contact"); + } + + const mailOptions = { + to: "your@email.com", + from: `${req.body.name} <${req.body.email}>`, + subject: "Contact Form", + text: req.body.message + }; + + transporter.sendMail(mailOptions, (err) => { + if (err) { + req.flash("errors", { msg: err.message }); + return res.redirect("/contact"); + } + req.flash("success", { msg: "Email has been sent successfully!" }); + res.redirect("/contact"); + }); +}; diff --git a/_fixtures/ts/ts-node-starter/src/controllers/home.ts b/_fixtures/ts/ts-node-starter/src/controllers/home.ts new file mode 100755 index 0000000000000000000000000000000000000000..43807174150174966cbdb3f4e497f3f1f4274f61 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/controllers/home.ts @@ -0,0 +1,11 @@ +import { Request, Response } from "express"; + +/** + * GET / + * Home page. + */ +export const index = (req: Request, res: Response) => { + res.render("home", { + title: "Home" + }); +}; diff --git a/_fixtures/ts/ts-node-starter/src/controllers/user.ts b/_fixtures/ts/ts-node-starter/src/controllers/user.ts new file mode 100755 index 0000000000000000000000000000000000000000..16c03bf4486adc81728e9f1ad332070f69c3e503 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/controllers/user.ts @@ -0,0 +1,388 @@ +import async from "async"; +import crypto from "crypto"; +import nodemailer from "nodemailer"; +import passport from "passport"; +import { User, UserDocument, AuthToken } from "../models/User"; +import { Request, Response, NextFunction } from "express"; +import { IVerifyOptions } from "passport-local"; +import { WriteError } from "mongodb"; +import { check, sanitize, validationResult } from "express-validator"; +import "../config/passport"; + +/** + * GET /login + * Login page. + */ +export const getLogin = (req: Request, res: Response) => { + if (req.user) { + return res.redirect("/"); + } + res.render("account/login", { + title: "Login" + }); +}; + +/** + * POST /login + * Sign in using email and password. + */ +export const postLogin = async (req: Request, res: Response, next: NextFunction) => { + await check("email", "Email is not valid").isEmail().run(req); + await check("password", "Password cannot be blank").isLength({min: 1}).run(req); + // eslint-disable-next-line @typescript-eslint/camelcase + await sanitize("email").normalizeEmail({ gmail_remove_dots: false }).run(req); + + const errors = validationResult(req); + + if (!errors.isEmpty()) { + req.flash("errors", errors.array()); + return res.redirect("/login"); + } + + passport.authenticate("local", (err: Error, user: UserDocument, info: IVerifyOptions) => { + if (err) { return next(err); } + if (!user) { + req.flash("errors", {msg: info.message}); + return res.redirect("/login"); + } + req.logIn(user, (err) => { + if (err) { return next(err); } + req.flash("success", { msg: "Success! You are logged in." }); + res.redirect(req.session.returnTo || "/"); + }); + })(req, res, next); +}; + +/** + * GET /logout + * Log out. + */ +export const logout = (req: Request, res: Response) => { + req.logout(); + res.redirect("/"); +}; + +/** + * GET /signup + * Signup page. + */ +export const getSignup = (req: Request, res: Response) => { + if (req.user) { + return res.redirect("/"); + } + res.render("account/signup", { + title: "Create Account" + }); +}; + +/** + * POST /signup + * Create a new local account. + */ +export const postSignup = async (req: Request, res: Response, next: NextFunction) => { + await check("email", "Email is not valid").isEmail().run(req); + await check("password", "Password must be at least 4 characters long").isLength({ min: 4 }).run(req); + await check("confirmPassword", "Passwords do not match").equals(req.body.password).run(req); + // eslint-disable-next-line @typescript-eslint/camelcase + await sanitize("email").normalizeEmail({ gmail_remove_dots: false }).run(req); + + const errors = validationResult(req); + + if (!errors.isEmpty()) { + req.flash("errors", errors.array()); + return res.redirect("/signup"); + } + + const user = new User({ + email: req.body.email, + password: req.body.password + }); + + User.findOne({ email: req.body.email }, (err, existingUser) => { + if (err) { return next(err); } + if (existingUser) { + req.flash("errors", { msg: "Account with that email address already exists." }); + return res.redirect("/signup"); + } + user.save((err) => { + if (err) { return next(err); } + req.logIn(user, (err) => { + if (err) { + return next(err); + } + res.redirect("/"); + }); + }); + }); +}; + +/** + * GET /account + * Profile page. + */ +export const getAccount = (req: Request, res: Response) => { + res.render("account/profile", { + title: "Account Management" + }); +}; + +/** + * POST /account/profile + * Update profile information. + */ +export const postUpdateProfile = async (req: Request, res: Response, next: NextFunction) => { + await check("email", "Please enter a valid email address.").isEmail().run(req); + // eslint-disable-next-line @typescript-eslint/camelcase + await sanitize("email").normalizeEmail({ gmail_remove_dots: false }).run(req); + + const errors = validationResult(req); + + if (!errors.isEmpty()) { + req.flash("errors", errors.array()); + return res.redirect("/account"); + } + + const user = req.user as UserDocument; + User.findById(user.id, (err, user: UserDocument) => { + if (err) { return next(err); } + user.email = req.body.email || ""; + user.profile.name = req.body.name || ""; + user.profile.gender = req.body.gender || ""; + user.profile.location = req.body.location || ""; + user.profile.website = req.body.website || ""; + user.save((err: WriteError) => { + if (err) { + if (err.code === 11000) { + req.flash("errors", { msg: "The email address you have entered is already associated with an account." }); + return res.redirect("/account"); + } + return next(err); + } + req.flash("success", { msg: "Profile information has been updated." }); + res.redirect("/account"); + }); + }); +}; + +/** + * POST /account/password + * Update current password. + */ +export const postUpdatePassword = async (req: Request, res: Response, next: NextFunction) => { + await check("password", "Password must be at least 4 characters long").isLength({ min: 4 }).run(req); + await check("confirmPassword", "Passwords do not match").equals(req.body.password).run(req); + + const errors = validationResult(req); + + if (!errors.isEmpty()) { + req.flash("errors", errors.array()); + return res.redirect("/account"); + } + + const user = req.user as UserDocument; + User.findById(user.id, (err, user: UserDocument) => { + if (err) { return next(err); } + user.password = req.body.password; + user.save((err: WriteError) => { + if (err) { return next(err); } + req.flash("success", { msg: "Password has been changed." }); + res.redirect("/account"); + }); + }); +}; + +/** + * POST /account/delete + * Delete user account. + */ +export const postDeleteAccount = (req: Request, res: Response, next: NextFunction) => { + const user = req.user as UserDocument; + User.remove({ _id: user.id }, (err) => { + if (err) { return next(err); } + req.logout(); + req.flash("info", { msg: "Your account has been deleted." }); + res.redirect("/"); + }); +}; + +/** + * GET /account/unlink/:provider + * Unlink OAuth provider. + */ +export const getOauthUnlink = (req: Request, res: Response, next: NextFunction) => { + const provider = req.params.provider; + const user = req.user as UserDocument; + User.findById(user.id, (err, user: any) => { + if (err) { return next(err); } + user[provider] = undefined; + user.tokens = user.tokens.filter((token: AuthToken) => token.kind !== provider); + user.save((err: WriteError) => { + if (err) { return next(err); } + req.flash("info", { msg: `${provider} account has been unlinked.` }); + res.redirect("/account"); + }); + }); +}; + +/** + * GET /reset/:token + * Reset Password page. + */ +export const getReset = (req: Request, res: Response, next: NextFunction) => { + if (req.isAuthenticated()) { + return res.redirect("/"); + } + User + .findOne({ passwordResetToken: req.params.token }) + .where("passwordResetExpires").gt(Date.now()) + .exec((err, user) => { + if (err) { return next(err); } + if (!user) { + req.flash("errors", { msg: "Password reset token is invalid or has expired." }); + return res.redirect("/forgot"); + } + res.render("account/reset", { + title: "Password Reset" + }); + }); +}; + +/** + * POST /reset/:token + * Process the reset password request. + */ +export const postReset = async (req: Request, res: Response, next: NextFunction) => { + await check("password", "Password must be at least 4 characters long.").isLength({ min: 4 }).run(req); + await check("confirm", "Passwords must match.").equals(req.body.password).run(req); + + const errors = validationResult(req); + + if (!errors.isEmpty()) { + req.flash("errors", errors.array()); + return res.redirect("back"); + } + + async.waterfall([ + function resetPassword(done: Function) { + User + .findOne({ passwordResetToken: req.params.token }) + .where("passwordResetExpires").gt(Date.now()) + .exec((err, user: any) => { + if (err) { return next(err); } + if (!user) { + req.flash("errors", { msg: "Password reset token is invalid or has expired." }); + return res.redirect("back"); + } + user.password = req.body.password; + user.passwordResetToken = undefined; + user.passwordResetExpires = undefined; + user.save((err: WriteError) => { + if (err) { return next(err); } + req.logIn(user, (err) => { + done(err, user); + }); + }); + }); + }, + function sendResetPasswordEmail(user: UserDocument, done: Function) { + const transporter = nodemailer.createTransport({ + service: "SendGrid", + auth: { + user: process.env.SENDGRID_USER, + pass: process.env.SENDGRID_PASSWORD + } + }); + const mailOptions = { + to: user.email, + from: "express-ts@starter.com", + subject: "Your password has been changed", + text: `Hello,\n\nThis is a confirmation that the password for your account ${user.email} has just been changed.\n` + }; + transporter.sendMail(mailOptions, (err) => { + req.flash("success", { msg: "Success! Your password has been changed." }); + done(err); + }); + } + ], (err) => { + if (err) { return next(err); } + res.redirect("/"); + }); +}; + +/** + * GET /forgot + * Forgot Password page. + */ +export const getForgot = (req: Request, res: Response) => { + if (req.isAuthenticated()) { + return res.redirect("/"); + } + res.render("account/forgot", { + title: "Forgot Password" + }); +}; + +/** + * POST /forgot + * Create a random token, then the send user an email with a reset link. + */ +export const postForgot = async (req: Request, res: Response, next: NextFunction) => { + await check("email", "Please enter a valid email address.").isEmail().run(req); + // eslint-disable-next-line @typescript-eslint/camelcase + await sanitize("email").normalizeEmail({ gmail_remove_dots: false }).run(req); + + const errors = validationResult(req); + + if (!errors.isEmpty()) { + req.flash("errors", errors.array()); + return res.redirect("/forgot"); + } + + async.waterfall([ + function createRandomToken(done: Function) { + crypto.randomBytes(16, (err, buf) => { + const token = buf.toString("hex"); + done(err, token); + }); + }, + function setRandomToken(token: AuthToken, done: Function) { + User.findOne({ email: req.body.email }, (err, user: any) => { + if (err) { return done(err); } + if (!user) { + req.flash("errors", { msg: "Account with that email address does not exist." }); + return res.redirect("/forgot"); + } + user.passwordResetToken = token; + user.passwordResetExpires = Date.now() + 3600000; // 1 hour + user.save((err: WriteError) => { + done(err, token, user); + }); + }); + }, + function sendForgotPasswordEmail(token: AuthToken, user: UserDocument, done: Function) { + const transporter = nodemailer.createTransport({ + service: "SendGrid", + auth: { + user: process.env.SENDGRID_USER, + pass: process.env.SENDGRID_PASSWORD + } + }); + const mailOptions = { + to: user.email, + from: "hackathon@starter.com", + subject: "Reset your password on Hackathon Starter", + text: `You are receiving this email because you (or someone else) have requested the reset of the password for your account.\n\n + Please click on the following link, or paste this into your browser to complete the process:\n\n + http://${req.headers.host}/reset/${token}\n\n + If you did not request this, please ignore this email and your password will remain unchanged.\n` + }; + transporter.sendMail(mailOptions, (err) => { + req.flash("info", { msg: `An e-mail has been sent to ${user.email} with further instructions.` }); + done(err); + }); + } + ], (err) => { + if (err) { return next(err); } + res.redirect("/forgot"); + }); +}; diff --git a/_fixtures/ts/ts-node-starter/src/models/User.ts b/_fixtures/ts/ts-node-starter/src/models/User.ts new file mode 100755 index 0000000000000000000000000000000000000000..0157e6fa6e871d7ab708bafe87e297516db8cd04 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/models/User.ts @@ -0,0 +1,88 @@ +import bcrypt from "bcrypt-nodejs"; +import crypto from "crypto"; +import mongoose from "mongoose"; + +export type UserDocument = mongoose.Document & { + email: string; + password: string; + passwordResetToken: string; + passwordResetExpires: Date; + + facebook: string; + tokens: AuthToken[]; + + profile: { + name: string; + gender: string; + location: string; + website: string; + picture: string; + }; + + comparePassword: comparePasswordFunction; + gravatar: (size: number) => string; +}; + +type comparePasswordFunction = (candidatePassword: string, cb: (err: any, isMatch: any) => {}) => void; + +export interface AuthToken { + accessToken: string; + kind: string; +} + +const userSchema = new mongoose.Schema({ + email: { type: String, unique: true }, + password: String, + passwordResetToken: String, + passwordResetExpires: Date, + + facebook: String, + twitter: String, + google: String, + tokens: Array, + + profile: { + name: String, + gender: String, + location: String, + website: String, + picture: String + } +}, { timestamps: true }); + +/** + * Password hash middleware. + */ +userSchema.pre("save", function save(next) { + const user = this as UserDocument; + if (!user.isModified("password")) { return next(); } + bcrypt.genSalt(10, (err, salt) => { + if (err) { return next(err); } + bcrypt.hash(user.password, salt, undefined, (err: mongoose.Error, hash) => { + if (err) { return next(err); } + user.password = hash; + next(); + }); + }); +}); + +const comparePassword: comparePasswordFunction = function (candidatePassword, cb) { + bcrypt.compare(candidatePassword, this.password, (err: mongoose.Error, isMatch: boolean) => { + cb(err, isMatch); + }); +}; + +userSchema.methods.comparePassword = comparePassword; + +/** + * Helper method for getting user's gravatar. + */ +userSchema.methods.gravatar = function (size: number = 200) { + if (!this.email) { + return `https://gravatar.com/avatar/?s=${size}&d=retro`; + } + const md5 = crypto.createHash("md5").update(this.email).digest("hex"); + return `https://gravatar.com/avatar/${md5}?s=${size}&d=retro`; +}; + +export const User = mongoose.model("User", userSchema); diff --git a/_fixtures/ts/ts-node-starter/src/server.ts b/_fixtures/ts/ts-node-starter/src/server.ts new file mode 100755 index 0000000000000000000000000000000000000000..c8ae8a1d1478c90d9e0f56e95e6a6ee161626d76 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/server.ts @@ -0,0 +1,22 @@ +import errorHandler from "errorhandler"; + +import app from "./app"; + +/** + * Error Handler. Provides full stack - remove for production + */ +app.use(errorHandler()); + +/** + * Start Express server. + */ +const server = app.listen(app.get("port"), () => { + console.log( + " App is running at http://localhost:%d in %s mode", + app.get("port"), + app.get("env") + ); + console.log(" Press CTRL-C to stop\n"); +}); + +export default server; diff --git a/_fixtures/ts/ts-node-starter/src/types/express-flash.d.ts b/_fixtures/ts/ts-node-starter/src/types/express-flash.d.ts new file mode 100755 index 0000000000000000000000000000000000000000..284d641aff33ce431fdb3a6ea81708f9039bc2c7 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/types/express-flash.d.ts @@ -0,0 +1,18 @@ +/// + +/** + * This type definition augments existing definition + * from @types/express-flash + */ +declare namespace Express { + export interface Request { + flash(event: string, message: any): any; + } +} + +interface Flash { + flash(type: string, message: any): void; +} + +declare module "express-flash"; + diff --git a/_fixtures/ts/ts-node-starter/src/types/fbgraph.d.ts b/_fixtures/ts/ts-node-starter/src/types/fbgraph.d.ts new file mode 100755 index 0000000000000000000000000000000000000000..7fb1724ef52eedabbb568823dfc5383cd5dba805 --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/types/fbgraph.d.ts @@ -0,0 +1,55 @@ +/** Declaration file generated by dts-gen */ + +export const version: string; + +export function authorize(params: any, callback: any): any; + +export function batch(reqs: any, additionalData: any, callback: any): any; + +export function del(url: any, postData: any, callback: any): any; + +export function extendAccessToken(params: any, callback: any): any; + +export function fql(query: any, params: any, callback: any): any; + +export function get(url: any, params?: any, callback?: any): any; + +export function getAccessToken(): any; + +export function getAppSecret(): any; + +export function getGraphUrl(): any; + +export function getOauthUrl(params: any, opts: any): any; + +export function getOptions(): any; + +export function post(url: any, postData: any, callback: any): any; + +export function search(options: any, callback: any): any; + +export function setAccessToken(token: any): any; + +export function setAppSecret(token: any): any; + +export function setGraphUrl(url: any): any; + +export function setOptions(options: any): any; + +export function setVersion(version: any): any; + +/** + * Fairly incomplete. I only added some commonly used fields. + */ +export type FacebookUser = { + id: string, + name: string, + email: string, + first_name: string, + last_name: string, + gender: string, + link: string, + locale: string, + timezone: number +}; + diff --git a/_fixtures/ts/ts-node-starter/src/util/logger.ts b/_fixtures/ts/ts-node-starter/src/util/logger.ts new file mode 100755 index 0000000000000000000000000000000000000000..157888333f439e18544b6083b6410f0311d06a6c --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/util/logger.ts @@ -0,0 +1,18 @@ +import winston from "winston"; + +const options: winston.LoggerOptions = { + transports: [ + new winston.transports.Console({ + level: process.env.NODE_ENV === "production" ? "error" : "debug" + }), + new winston.transports.File({ filename: "debug.log", level: "debug" }) + ] +}; + +const logger = winston.createLogger(options); + +if (process.env.NODE_ENV !== "production") { + logger.debug("Logging initialized at debug level"); +} + +export default logger; diff --git a/_fixtures/ts/ts-node-starter/src/util/secrets.ts b/_fixtures/ts/ts-node-starter/src/util/secrets.ts new file mode 100755 index 0000000000000000000000000000000000000000..7e52a006d93f09eee39210fe02ebcfa3a745cc5d --- /dev/null +++ b/_fixtures/ts/ts-node-starter/src/util/secrets.ts @@ -0,0 +1,30 @@ +import logger from "./logger"; +import dotenv from "dotenv"; +import fs from "fs"; + +if (fs.existsSync(".env")) { + logger.debug("Using .env file to supply config environment variables"); + dotenv.config({ path: ".env" }); +} else { + logger.debug("Using .env.example file to supply config environment variables"); + dotenv.config({ path: ".env.example" }); // you can delete this after you create your own .env file! +} +export const ENVIRONMENT = process.env.NODE_ENV; +const prod = ENVIRONMENT === "production"; // Anything else is treated as 'dev' + +export const SESSION_SECRET = process.env["SESSION_SECRET"]; +export const MONGODB_URI = prod ? process.env["MONGODB_URI"] : process.env["MONGODB_URI_LOCAL"]; + +if (!SESSION_SECRET) { + logger.error("No client secret. Set SESSION_SECRET environment variable."); + process.exit(1); +} + +if (!MONGODB_URI) { + if (prod) { + logger.error("No mongo connection string. Set MONGODB_URI environment variable."); + } else { + logger.error("No mongo connection string. Set MONGODB_URI_LOCAL environment variable."); + } + process.exit(1); +} diff --git a/_fixtures/visual/visual.svg b/_fixtures/visual/visual.svg new file mode 100644 index 0000000000000000000000000000000000000000..10756a8c43dd893006e5bb4b2b65d852dca61e91 --- /dev/null +++ b/_fixtures/visual/visual.svg @@ -0,0 +1,46 @@ + + + + + + +G + + +cluster1 + +com + + +cluster2 + +phodal + + +cluster3 + +hug + + + +node19 + +Ledge + + + +node20 + +Spring + + + +node19->node20 + + + + + diff --git a/_fixtures/visual/visual_demo.dot b/_fixtures/visual/visual_demo.dot new file mode 100644 index 0000000000000000000000000000000000000000..e93bea94f8044968e4e339dcb59f54640be6fc51 --- /dev/null +++ b/_fixtures/visual/visual_demo.dot @@ -0,0 +1,16 @@ +digraph G { + subgraph cluster1 { + label = "com" + + subgraph cluster2 { + label = "phodal" + node19 [ label="Ledge", shape=box ]; + } + subgraph cluster3 { + label = "hug" + node20 [ label="Spring", shape=box ]; + } + } + + node19 -> node20 +} \ No newline at end of file diff --git a/analysis/dep/app/dep_analysis.go b/analysis/dep/app/dep_analysis.go new file mode 100644 index 0000000000000000000000000000000000000000..189968e63def04e6a2d7c636b04a3b0381a34e7c --- /dev/null +++ b/analysis/dep/app/dep_analysis.go @@ -0,0 +1,59 @@ +package app + +import ( + "fmt" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/application/deps" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/spf13/cobra" + "path/filepath" +) + +type DepCmdConfig struct { + Path string +} + +var ( + depCmdConfig DepCmdConfig +) + +type DepApp interface { + AnalysisPath(path string, nodes []core_domain.CodeDataStruct) []core_domain.CodeDependency +} + +var depsCmd = &cobra.Command{ + Use: "deps", + Short: "evaluate dependencies", + Long: ``, + Run: func(cmd *cobra.Command, args []string) { + path := depCmdConfig.Path + + path, _ = filepath.Abs(path) + files := cocafile.GetFilesWithFilter(path, cocafile.JavaFileFilter) + + identifierApp := javaapp.NewJavaIdentifierApp() + iNodes := identifierApp.AnalysisFiles(files) + + callApp := javaapp.NewJavaFullApp() + classNodes := callApp.AnalysisFiles(iNodes, files) + + app := deps.NewDepApp() + + results := app.AnalysisPath(path, classNodes) + fmt.Fprintln(output, "unused") + table := cmd_util.NewOutput(output) + table.SetHeader([]string{"GroupId", "ArtifactId", "Scope"}) + for _, dep := range results { + table.Append([]string{dep.GroupId, dep.ArtifactId, dep.Scope}) + } + table.Render() + }, +} + +func init() { + rootCmd.AddCommand(depsCmd) + + depsCmd.PersistentFlags().StringVarP(&depCmdConfig.Path, "path", "p", ".", "example -p core/main") +} diff --git a/analysis/dep/app/root.go b/analysis/dep/app/root.go new file mode 100644 index 0000000000000000000000000000000000000000..e753294a6fbd7ed1b380b5b8c3e966dfc6a5e91a --- /dev/null +++ b/analysis/dep/app/root.go @@ -0,0 +1,21 @@ +package app + +import ( + "github.com/spf13/cobra" + "io" +) + +var ( + output io.Writer + rootCmd = &cobra.Command{ + Use: "coa", + Short: "A generator for Cobra based Applications", + Long: `coa`, + } +) + +func NewRootCmd(out io.Writer) *cobra.Command { + output = out + rootCmd.SetOut(out) + return rootCmd +} diff --git a/analysis/dep/main.go b/analysis/dep/main.go new file mode 100644 index 0000000000000000000000000000000000000000..6eb90155f38e7b080e242521d025fd553e586c98 --- /dev/null +++ b/analysis/dep/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/phodal/coca/analysis/golang/app" + "os" +) + +func main() { + output := os.Stdout + rootCmd := app.NewRootCmd(output) + _ = rootCmd.Execute() +} diff --git a/analysis/golang/app/analysis.go b/analysis/golang/app/analysis.go new file mode 100644 index 0000000000000000000000000000000000000000..4256753e15a2332458cd1adf2edf529afc752d31 --- /dev/null +++ b/analysis/golang/app/analysis.go @@ -0,0 +1,60 @@ +package app + +import ( + "encoding/json" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/application/analysis" + "github.com/phodal/coca/pkg/application/analysis/goapp" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/spf13/cobra" +) + +type AnalysisCmdConfig struct { + Path string + ForceUpdate bool + Lang string +} + +var ( + analysisCmdConfig AnalysisCmdConfig +) + +var analysisCmd = &cobra.Command{ + Use: "analysis", + Short: "analysis code", + Long: ``, + Run: func(cmd *cobra.Command, args []string) { + var outputName string + var ds []core_domain.CodeDataStruct + + ds = analysis.CommonAnalysis(output, analysisCmdConfig.Path, new(goapp.GoIdentApp), cocafile.GoFileFilter, true) + outputName = "godeps.json" + + cModel, _ := json.MarshalIndent(ds, "", "\t") + cmd_util.WriteToCocaFile(outputName, string(cModel)) + }, +} + +func AnalysisJava() []core_domain.CodeDataStruct { + importPath := analysisCmdConfig.Path + identifierApp := javaapp.NewJavaIdentifierApp() + iNodes := identifierApp.AnalysisPath(importPath) + + identModel, _ := json.MarshalIndent(iNodes, "", "\t") + cmd_util.WriteToCocaFile("identify.json", string(identModel)) + + callApp := javaapp.NewJavaFullApp() + + callNodes := callApp.AnalysisPath(importPath, iNodes) + return callNodes +} + +func init() { + rootCmd.AddCommand(analysisCmd) + + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Path, "path", "p", ".", "example -p core/main") + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Lang, "lang", "l", "java", "example coca analysis -l java, typescript, python") + analysisCmd.PersistentFlags().BoolVarP(&analysisCmdConfig.ForceUpdate, "force", "f", false, "force update -f") +} diff --git a/analysis/golang/app/root.go b/analysis/golang/app/root.go new file mode 100644 index 0000000000000000000000000000000000000000..e753294a6fbd7ed1b380b5b8c3e966dfc6a5e91a --- /dev/null +++ b/analysis/golang/app/root.go @@ -0,0 +1,21 @@ +package app + +import ( + "github.com/spf13/cobra" + "io" +) + +var ( + output io.Writer + rootCmd = &cobra.Command{ + Use: "coa", + Short: "A generator for Cobra based Applications", + Long: `coa`, + } +) + +func NewRootCmd(out io.Writer) *cobra.Command { + output = out + rootCmd.SetOut(out) + return rootCmd +} diff --git a/analysis/golang/main.go b/analysis/golang/main.go new file mode 100644 index 0000000000000000000000000000000000000000..6eb90155f38e7b080e242521d025fd553e586c98 --- /dev/null +++ b/analysis/golang/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/phodal/coca/analysis/golang/app" + "os" +) + +func main() { + output := os.Stdout + rootCmd := app.NewRootCmd(output) + _ = rootCmd.Execute() +} diff --git a/analysis/java/app/analysis.go b/analysis/java/app/analysis.go new file mode 100644 index 0000000000000000000000000000000000000000..43aecf57e6c4d189c4ccf2a4e033109cb757d0dd --- /dev/null +++ b/analysis/java/app/analysis.go @@ -0,0 +1,56 @@ +package app + +import ( + "encoding/json" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/spf13/cobra" +) + +type AnalysisCmdConfig struct { + Path string + ForceUpdate bool + Lang string +} + +var ( + analysisCmdConfig AnalysisCmdConfig +) + +var analysisCmd = &cobra.Command{ + Use: "analysis", + Short: "analysis code", + Long: ``, + Run: func(cmd *cobra.Command, args []string) { + var outputName string + var ds []core_domain.CodeDataStruct + ds = AnalysisJava() + outputName = "deps.json" + + cModel, _ := json.MarshalIndent(ds, "", "\t") + cmd_util.WriteToCocaFile(outputName, string(cModel)) + }, +} + +func AnalysisJava() []core_domain.CodeDataStruct { + importPath := analysisCmdConfig.Path + identifierApp := javaapp.NewJavaIdentifierApp() + iNodes := identifierApp.AnalysisPath(importPath) + + identModel, _ := json.MarshalIndent(iNodes, "", "\t") + cmd_util.WriteToCocaFile("identify.json", string(identModel)) + + callApp := javaapp.NewJavaFullApp() + + callNodes := callApp.AnalysisPath(importPath, iNodes) + return callNodes +} + +func init() { + rootCmd.AddCommand(analysisCmd) + + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Path, "path", "p", ".", "example -p core/main") + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Lang, "lang", "l", "java", "example coca analysis -l java, typescript, python") + analysisCmd.PersistentFlags().BoolVarP(&analysisCmdConfig.ForceUpdate, "force", "f", false, "force update -f") +} diff --git a/analysis/java/app/root.go b/analysis/java/app/root.go new file mode 100644 index 0000000000000000000000000000000000000000..e753294a6fbd7ed1b380b5b8c3e966dfc6a5e91a --- /dev/null +++ b/analysis/java/app/root.go @@ -0,0 +1,21 @@ +package app + +import ( + "github.com/spf13/cobra" + "io" +) + +var ( + output io.Writer + rootCmd = &cobra.Command{ + Use: "coa", + Short: "A generator for Cobra based Applications", + Long: `coa`, + } +) + +func NewRootCmd(out io.Writer) *cobra.Command { + output = out + rootCmd.SetOut(out) + return rootCmd +} diff --git a/analysis/java/main.go b/analysis/java/main.go new file mode 100644 index 0000000000000000000000000000000000000000..82c37891e18cddc13596ae03f389e9c437e7ad6c --- /dev/null +++ b/analysis/java/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/phodal/coca/analysis/java/app" + "os" +) + +func main() { + output := os.Stdout + rootCmd := app.NewRootCmd(output) + _ = rootCmd.Execute() +} diff --git a/analysis/python/app/analysis.go b/analysis/python/app/analysis.go new file mode 100644 index 0000000000000000000000000000000000000000..1e2dbee4beab1d1f2a441ca598d985aaa19b8e9b --- /dev/null +++ b/analysis/python/app/analysis.go @@ -0,0 +1,45 @@ +package app + +import ( + "encoding/json" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/application/analysis" + "github.com/phodal/coca/pkg/application/analysis/pyapp" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/spf13/cobra" +) + +type AnalysisCmdConfig struct { + Path string + ForceUpdate bool + Lang string +} + +var ( + analysisCmdConfig AnalysisCmdConfig +) + +var analysisCmd = &cobra.Command{ + Use: "analysis", + Short: "analysis code", + Long: ``, + Run: func(cmd *cobra.Command, args []string) { + var outputName string + var ds []core_domain.CodeDataStruct + + ds = analysis.CommonAnalysis(output, analysisCmdConfig.Path, new(pyapp.PythonIdentApp), cocafile.GoFileFilter, true) + outputName = "pydeps.json" + + cModel, _ := json.MarshalIndent(ds, "", "\t") + cmd_util.WriteToCocaFile(outputName, string(cModel)) + }, +} + +func init() { + rootCmd.AddCommand(analysisCmd) + + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Path, "path", "p", ".", "example -p core/main") + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Lang, "lang", "l", "java", "example coca analysis -l java, typescript, python") + analysisCmd.PersistentFlags().BoolVarP(&analysisCmdConfig.ForceUpdate, "force", "f", false, "force update -f") +} diff --git a/analysis/python/app/root.go b/analysis/python/app/root.go new file mode 100644 index 0000000000000000000000000000000000000000..e753294a6fbd7ed1b380b5b8c3e966dfc6a5e91a --- /dev/null +++ b/analysis/python/app/root.go @@ -0,0 +1,21 @@ +package app + +import ( + "github.com/spf13/cobra" + "io" +) + +var ( + output io.Writer + rootCmd = &cobra.Command{ + Use: "coa", + Short: "A generator for Cobra based Applications", + Long: `coa`, + } +) + +func NewRootCmd(out io.Writer) *cobra.Command { + output = out + rootCmd.SetOut(out) + return rootCmd +} diff --git a/analysis/python/main.go b/analysis/python/main.go new file mode 100644 index 0000000000000000000000000000000000000000..d742443ea71b71160d0893cf64e301e508a2ef50 --- /dev/null +++ b/analysis/python/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/phodal/coca/analysis/python/app" + "os" +) + +func main() { + output := os.Stdout + rootCmd := app.NewRootCmd(output) + _ = rootCmd.Execute() +} diff --git a/analysis/typescript/app/analysis.go b/analysis/typescript/app/analysis.go new file mode 100644 index 0000000000000000000000000000000000000000..3e3fd5e84a114d8211aeb8cfe4ce5d8b4f6f8869 --- /dev/null +++ b/analysis/typescript/app/analysis.go @@ -0,0 +1,44 @@ +package app + +import ( + "encoding/json" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/application/analysis" + "github.com/phodal/coca/pkg/application/analysis/tsapp" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/spf13/cobra" +) + +type AnalysisCmdConfig struct { + Path string + ForceUpdate bool + Lang string +} + +var ( + analysisCmdConfig AnalysisCmdConfig +) + +var analysisCmd = &cobra.Command{ + Use: "analysis", + Short: "analysis code", + Long: ``, + Run: func(cmd *cobra.Command, args []string) { + var outputName string + var ds []core_domain.CodeDataStruct + + ds = analysis.CommonAnalysis(output, analysisCmdConfig.Path, new(tsapp.TypeScriptIdentApp), cocafile.GoFileFilter, true) + outputName = "pydeps.json" + + cModel, _ := json.MarshalIndent(ds, "", "\t") + cmd_util.WriteToCocaFile(outputName, string(cModel)) + }, +} +func init() { + rootCmd.AddCommand(analysisCmd) + + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Path, "path", "p", ".", "example -p core/main") + analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Lang, "lang", "l", "java", "example coca analysis -l java, typescript, python") + analysisCmd.PersistentFlags().BoolVarP(&analysisCmdConfig.ForceUpdate, "force", "f", false, "force update -f") +} diff --git a/analysis/typescript/app/root.go b/analysis/typescript/app/root.go new file mode 100644 index 0000000000000000000000000000000000000000..e753294a6fbd7ed1b380b5b8c3e966dfc6a5e91a --- /dev/null +++ b/analysis/typescript/app/root.go @@ -0,0 +1,21 @@ +package app + +import ( + "github.com/spf13/cobra" + "io" +) + +var ( + output io.Writer + rootCmd = &cobra.Command{ + Use: "coa", + Short: "A generator for Cobra based Applications", + Long: `coa`, + } +) + +func NewRootCmd(out io.Writer) *cobra.Command { + output = out + rootCmd.SetOut(out) + return rootCmd +} diff --git a/analysis/typescript/main.go b/analysis/typescript/main.go new file mode 100644 index 0000000000000000000000000000000000000000..5337f980b0130c4120402f8709f85b8b36252979 --- /dev/null +++ b/analysis/typescript/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/phodal/coca/analysis/typescript/app" + "os" +) + +func main() { + output := os.Stdout + rootCmd := app.NewRootCmd(output) + _ = rootCmd.Execute() +} diff --git a/bughunt/bug.go b/bughunt/bug.go deleted file mode 100644 index bab2256ac1af426d1b3b028bb008c857500cc4be..0000000000000000000000000000000000000000 --- a/bughunt/bug.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "github.com/phodal/coca/core/adapter/call" - "github.com/phodal/coca/core/adapter/identifier" - "github.com/pkg/profile" -) - -func main() { - defer profile.Start(profile.MemProfile, profile.ProfilePath("."), profile.NoShutdownHook) - - path := "_fixtures/abug" - - identifierApp := identifier.NewJavaIdentifierApp() - iNodes := identifierApp.AnalysisPath(path) - - fmt.Println(iNodes) - - var classes []string = nil - - for _, node := range iNodes { - classes = append(classes, node.Package+"."+node.ClassName) - } - - callApp := new(call.JavaCallApp) - - callNodes := callApp.AnalysisPath(path, classes, iNodes) - cModel, _ := json.MarshalIndent(callNodes, "", "\t") - - fmt.Println(string(cModel)) -} \ No newline at end of file diff --git a/cmd/analysis.go b/cmd/analysis.go index e4263749651dd0453592c39b964768dc2dadb617..5454e6695d3dbe2bd1948d74bc40afc29e5ab3f8 100644 --- a/cmd/analysis.go +++ b/cmd/analysis.go @@ -2,15 +2,16 @@ package cmd import ( "encoding/json" - . "github.com/phodal/coca/core/adapter/call" - . "github.com/phodal/coca/core/adapter/identifier" - . "github.com/phodal/coca/core/support" + "fmt" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/domain/core_domain" "github.com/spf13/cobra" ) type AnalysisCmdConfig struct { - Path string - ForceUpdate bool + Path string + UpdateIdentify bool } var ( @@ -22,31 +23,43 @@ var analysisCmd = &cobra.Command{ Short: "analysis code", Long: ``, Run: func(cmd *cobra.Command, args []string) { - importPath := analysisCmdConfig.Path + var outputName string + var ds []core_domain.CodeDataStruct - identifierApp := NewJavaIdentifierApp() - iNodes := identifierApp.AnalysisPath(importPath) + ds = AnalysisJava() + outputName = "deps.json" - identModel, _ := json.MarshalIndent(iNodes, "", "\t") - WriteToCocaFile("identify.json", string(identModel)) + cModel, _ := json.MarshalIndent(ds, "", "\t") + cmd_util.WriteToCocaFile(outputName, string(cModel)) + }, +} - var classes []string = nil +func AnalysisJava() []core_domain.CodeDataStruct { + importPath := analysisCmdConfig.Path + var iNodes []core_domain.CodeDataStruct - for _, node := range iNodes { - classes = append(classes, node.Package+"."+node.ClassName) - } + if analysisCmdConfig.UpdateIdentify { + identifierApp := javaapp.NewJavaIdentifierApp() + iNodes := identifierApp.AnalysisPath(importPath) + + identModel, _ := json.MarshalIndent(iNodes, "", "\t") + cmd_util.WriteToCocaFile("identify.json", string(identModel)) + } else { + fmt.Println("use local identify"); + identContent := cmd_util.ReadCocaFile("identify.json") + _ = json.Unmarshal(identContent, &iNodes) + } - callApp := new(JavaCallApp) + callApp := javaapp.NewJavaFullApp() - callNodes := callApp.AnalysisPath(importPath, classes, iNodes) - cModel, _ := json.MarshalIndent(callNodes, "", "\t") - WriteToCocaFile("deps.json", string(cModel)) - }, + callNodes := callApp.AnalysisPath(importPath, iNodes) + return callNodes } func init() { rootCmd.AddCommand(analysisCmd) analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Path, "path", "p", ".", "example -p core/main") - analysisCmd.PersistentFlags().BoolVarP(&analysisCmdConfig.ForceUpdate, "force", "f", false, "force update -f") + //analysisCmd.PersistentFlags().StringVarP(&analysisCmdConfig.Lang, "lang", "l", "java", "example coca analysis -l java, typescript, python") + analysisCmd.PersistentFlags().BoolVarP(&analysisCmdConfig.UpdateIdentify, "identify", "i", true, "use current identify") } diff --git a/cmd/analysis_test.go b/cmd/analysis_test.go new file mode 100644 index 0000000000000000000000000000000000000000..de35a69907b01e9de74e5adbf627405c09d7d4a5 --- /dev/null +++ b/cmd/analysis_test.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/phodal/coca/cocatest/testcase" + "testing" +) + +func Test_Analysis_Java(t *testing.T) { + path := "config" + + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p " + path, + Golden: "testdata/analysis_java.txt", + }} + RunTestCmd(t, analysis) +} diff --git a/cmd/api.go b/cmd/api.go index 7864d12874f40b82a931913f714a9a905d0684f5..12216ed1bb28af9209e3cd6f3ae075d2a3bebd00 100644 --- a/cmd/api.go +++ b/cmd/api.go @@ -2,19 +2,16 @@ package cmd import ( "encoding/json" - "fmt" - "github.com/olekukonko/tablewriter" "github.com/phodal/coca/cmd/cmd_util" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/adapter" - . "github.com/phodal/coca/core/adapter/api" - "github.com/phodal/coca/core/domain/call_graph" - . "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/application/api" + "github.com/phodal/coca/pkg/application/call" + api_domain2 "github.com/phodal/coca/pkg/domain/api_domain" + "github.com/phodal/coca/pkg/domain/core_domain" "github.com/spf13/cobra" "log" - "os" + "path/filepath" "regexp" - "sort" "strconv" "strings" ) @@ -30,12 +27,11 @@ type ApiCmdConfig struct { } var ( - apiCmdConfig ApiCmdConfig - restApis []RestApi - - identifiers = adapter.LoadIdentify(apiCmdConfig.DependencePath) - identifiersMap = adapter.BuildIdentifierMap(identifiers) - diMap = adapter.BuildDIMap(identifiers, identifiersMap) + apiCmdConfig ApiCmdConfig + restApis []api_domain2.RestAPI + identifiers []core_domain.CodeDataStruct + identifiersMap map[string]core_domain.CodeDataStruct + diMap map[string]string ) var apiCmd = &cobra.Command{ @@ -43,21 +39,25 @@ var apiCmd = &cobra.Command{ Short: "scan HTTP api from annotation", Long: ``, Run: func(cmd *cobra.Command, args []string) { + identifiers = cmd_util.LoadIdentify(apiCmdConfig.DependencePath) + identifiersMap = core_domain.BuildIdentifierMap(identifiers) + diMap = core_domain.BuildDIMap(identifiers, identifiersMap) + depPath := apiCmdConfig.DependencePath apiPrefix := apiCmdConfig.AggregateApi parsedDeps = nil - depFile := ReadFile(depPath) + depFile := cmd_util.ReadFile(depPath) if depFile == nil { log.Fatal("lost deps") } _ = json.Unmarshal(depFile, &parsedDeps) - if *&apiCmdConfig.ForceUpdate { + if apiCmdConfig.ForceUpdate { forceUpdateApi() } else { - apiContent := ReadCocaFile("apis.json") + apiContent := cmd_util.ReadCocaFile("apis.json") if apiContent == nil { forceUpdateApi() } @@ -66,25 +66,22 @@ var apiCmd = &cobra.Command{ parsedDeps := cmd_util.GetDepsFromJson(depPath) - restFieldsApi := filterApi(apiPrefix, restApis) + filterAPIs := api_domain2.FilterApiByPrefix(apiPrefix, restApis) - fmt.Println(restApis) - analyser := call_graph.NewCallGraph() - dotContent, counts := analyser.AnalysisByFiles(restFieldsApi, parsedDeps, diMap) + analyser := call.NewCallGraph() + dotContent, counts := analyser.AnalysisByFiles(filterAPIs, parsedDeps, diMap) - if *&apiCmdConfig.Sort { - sort.Slice(counts, func(i, j int) bool { - return counts[i].Size < counts[j].Size - }) + if apiCmdConfig.Sort { + api_domain2.SortAPIs(counts) } if apiCmdConfig.ShowCount { - table := tablewriter.NewWriter(os.Stdout) + table := cmd_util.NewOutput(output) - table.SetHeader([]string{"Size", "Method", "Uri", "Caller"}) + table.SetHeader([]string{"Size", "Method", "URI", "Caller"}) for _, v := range counts { - table.Append([]string{strconv.Itoa(v.Size), v.HttpMethod, v.Uri, replacePackage(v.Caller)}) + table.Append([]string{strconv.Itoa(v.Size), v.HTTPMethod, v.URI, replacePackage(v.Caller)}) } table.Render() } @@ -93,31 +90,16 @@ var apiCmd = &cobra.Command{ dotContent = replacePackage(dotContent) } - WriteToCocaFile("api.dot", dotContent) + cmd_util.WriteToCocaFile("api.dot", dotContent) cmd_util.ConvertToSvg("api") }, } func forceUpdateApi() { - app := new(JavaApiApp) - restApis = app.AnalysisPath(apiCmdConfig.Path, parsedDeps, identifiersMap, diMap) + app := new(api.JavaApiApp) + restApis = app.AnalysisPath(filepath.FromSlash(apiCmdConfig.Path), parsedDeps, identifiersMap, diMap) cModel, _ := json.MarshalIndent(restApis, "", "\t") - WriteToCocaFile("apis.json", string(cModel)) -} - -func filterApi(apiPrefix string, apis []RestApi, ) []RestApi { - var restFieldsApi []RestApi - if apiPrefix != "" { - for _, api := range apis { - if strings.HasPrefix(api.Uri, apiPrefix) { - restFieldsApi = append(restFieldsApi, api) - } - } - } else { - restFieldsApi = apis - } - - return restFieldsApi + cmd_util.WriteToCocaFile("apis.json", string(cModel)) } func replacePackage(content string) string { @@ -140,7 +122,7 @@ func init() { apiCmd.PersistentFlags().StringVarP(&apiCmdConfig.Path, "path", "p", ".", "path") apiCmd.PersistentFlags().StringVarP(&apiCmdConfig.DependencePath, "dependence", "d", config.CocaConfig.ReporterPath+"/deps.json", "get dependence file") - apiCmd.PersistentFlags().StringVarP(&apiCmdConfig.RemovePackageNames, "remove", "r", "", "remove package name") + apiCmd.PersistentFlags().StringVarP(&apiCmdConfig.RemovePackageNames, "remove", "r", "", "remove package ParamName") apiCmd.PersistentFlags().BoolVarP(&apiCmdConfig.ShowCount, "count", "c", false, "count api size") apiCmd.PersistentFlags().BoolVarP(&apiCmdConfig.ForceUpdate, "force", "f", false, "force api update") apiCmd.PersistentFlags().BoolVarP(&apiCmdConfig.Sort, "sort", "s", false, "sort api") diff --git a/cmd/api_test.go b/cmd/api_test.go index d045b15161f6a7e2f84cbe3808a3969f1f31b7ed..f42372f0da67cac8f6b5ae2d319321ac785b20fe 100644 --- a/cmd/api_test.go +++ b/cmd/api_test.go @@ -1,25 +1,42 @@ package cmd import ( - "path/filepath" + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestApi(t *testing.T) { - abs, _ := filepath.Abs("../_fixtures/call") - abs = filepath.FromSlash(abs) + path := "../_fixtures/call" - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p " + abs, - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p " + path, + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "api", - cmd: "api -c -f -p " + abs, - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "api", + Cmd: "api -c -f -p " + path, + Golden: "testdata/api.txt", }} - runTestCmd(t, tests) -} \ No newline at end of file + RunTestCmd(t, tests) +} + +func Test_ApiWithSortRemove(t *testing.T) { + path := "../_fixtures/call" + + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p " + path, + Golden: "", + }} + RunTestCmd(t, analysis) + + tests := []testcase.CmdTestCase{{ + Name: "api", + Cmd: "api -c -s -r com.phodal.pholedge.book. -p" + path, + Golden: "testdata/api_sort_remove.txt", + }} + RunTestCmd(t, tests) +} diff --git a/cmd/arch.go b/cmd/arch.go index 61d0c3c0c9c88c3ee32279883fbb22ea0bde1fcb..b5fe0f286f6278e142527781ffc688e709302653 100644 --- a/cmd/arch.go +++ b/cmd/arch.go @@ -2,11 +2,13 @@ package cmd import ( "bufio" + "encoding/json" "github.com/phodal/coca/cmd/cmd_util" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/adapter" - "github.com/phodal/coca/core/domain/arch" - "github.com/phodal/coca/core/domain/arch/tequila" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/application/arch" + "github.com/phodal/coca/pkg/application/arch/tequila" + "github.com/phodal/coca/pkg/application/visual" + "github.com/phodal/coca/pkg/domain/core_domain" "github.com/spf13/cobra" "os" "strings" @@ -15,6 +17,9 @@ import ( type ArchCmdConfig struct { DependencePath string IsMergePackage bool + FilterString string + IsMergeHeader bool + WithVisual bool } var ( @@ -26,33 +31,42 @@ var archCmd = &cobra.Command{ Short: "project package visualization", Long: ``, Run: func(cmd *cobra.Command, args []string) { - identifiers = adapter.LoadIdentify(apiCmdConfig.DependencePath) - identifiersMap = adapter.BuildIdentifierMap(identifiers) + identifiers = cmd_util.LoadIdentify(apiCmdConfig.DependencePath) + identifiersMap = core_domain.BuildIdentifierMap(identifiers) parsedDeps := cmd_util.GetDepsFromJson(archCmdConfig.DependencePath) archApp := arch.NewArchApp() result := archApp.Analysis(parsedDeps, identifiersMap) - ignores := strings.Split("", ",") + filter := strings.Split(archCmdConfig.FilterString, ",") var nodeFilter = func(key string) bool { - for _, f := range ignores { - if key == f { + for _, f := range filter { + if strings.Contains(key, f) { return true } } return false } + if archCmdConfig.WithVisual { + output := visual.FromDeps(parsedDeps) + out, _ := json.Marshal(output) + cmd_util.WriteToCocaFile("visual.json", string(out)) + } + + if archCmdConfig.IsMergeHeader { + result = result.MergeHeaderFile(tequila.MergeHeaderFunc) + } if archCmdConfig.IsMergePackage { result = result.MergeHeaderFile(tequila.MergePackageFunc) } - graph := result.ToDot(".", nodeFilter) + graph := result.ToMapDot(nodeFilter) f, _ := os.Create("coca_reporter/arch.dot") w := bufio.NewWriter(f) - w.WriteString("di" + graph.String()) - w.Flush() + _, _ = w.WriteString("di" + graph.String()) + _ = w.Flush() cmd_util.ConvertToSvg("arch") }, @@ -62,5 +76,8 @@ func init() { rootCmd.AddCommand(archCmd) archCmd.PersistentFlags().StringVarP(&archCmdConfig.DependencePath, "dependence", "d", config.CocaConfig.ReporterPath+"/deps.json", "get dependence file") - archCmd.PersistentFlags().BoolVarP(&archCmdConfig.IsMergePackage, "mergePackage", "P", false, "merge package/folder for include dependencies") + archCmd.PersistentFlags().BoolVarP(&archCmdConfig.IsMergePackage, "mergePackage", "P", false, "merge package") + archCmd.PersistentFlags().BoolVarP(&archCmdConfig.IsMergeHeader, "mergeHeader", "H", false, "merge header") + archCmd.PersistentFlags().BoolVarP(&archCmdConfig.WithVisual, "showVisual", "v", false, "build visual json") + archCmd.PersistentFlags().StringVarP(&archCmdConfig.FilterString, "filter", "x", "", "filter -x com.phodal") } diff --git a/cmd/arch_test.go b/cmd/arch_test.go index 2afdca18b6f7097aff6c4730a90a57e946888d81..5619fccff3efcf1a96e61b110f72f4e10e037c63 100644 --- a/cmd/arch_test.go +++ b/cmd/arch_test.go @@ -1,25 +1,31 @@ package cmd import ( - "path/filepath" + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestArch(t *testing.T) { - abs, _ := filepath.Abs("../_fixtures/arch") - abs = filepath.FromSlash(abs) + abs := "../_fixtures/arch" - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p " + abs, - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p " + abs, + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "arch", - cmd: "arch -P ", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "arch", + Cmd: "arch -P ", + Golden: "", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) + + header := []testcase.CmdTestCase{{ + Name: "arch", + Cmd: "arch -H -x \"com.phodal\"", + Golden: "", + }} + RunTestCmd(t, header) } \ No newline at end of file diff --git a/cmd/bs.go b/cmd/bs.go index 01ceae956704ed5fb5958172513186a8d21b2720..9b703a9ecf17c55b7faecb48331ffa38e8641f59 100644 --- a/cmd/bs.go +++ b/cmd/bs.go @@ -2,10 +2,11 @@ package cmd import ( "encoding/json" - "github.com/phodal/coca/core/adapter/bs" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + bs2 "github.com/phodal/coca/pkg/application/bs" + "github.com/phodal/coca/pkg/domain/bs_domain" + "github.com/phodal/coca/pkg/infrastructure/string_helper" "github.com/spf13/cobra" - "sort" "strings" ) @@ -22,45 +23,30 @@ var badsmellCmd = &cobra.Command{ Short: "generate bad smell list and suggestions", Long: ``, Run: func(cmd *cobra.Command, args []string) { - importPath := *&bsCmdConfig.Path + importPath := bsCmdConfig.Path ignoreStr := cmd.Flag("ignore").Value.String() sortType := cmd.Flag("sort").Value.String() ignoreRules := strings.Split(ignoreStr, ",") - bsApp := *bs.NewBadSmellApp() - bsList := bsApp.AnalysisPath(importPath, ignoreRules) + bsApp := *bs2.NewBadSmellApp() + nodeInfos := bsApp.AnalysisPath(importPath) - bsModel, _ := json.MarshalIndent(bsList, "", "\t") + bsModel, _ := json.MarshalIndent(nodeInfos, "", "\t") + cmd_util.WriteToCocaFile("nodeInfos.json", string(bsModel)) + + filterBs := bsApp.IdentifyBadSmell(nodeInfos, ignoreRules) + filterBsModel, _ := json.MarshalIndent(filterBs, "", "\t") if sortType == "type" { - sortSmells := sortSmellByType(bsList) - bsModel, _ = json.MarshalIndent(sortSmells, "", "\t") + sortSmells := bs_domain.SortSmellByType(filterBs, isSmellHaveSize) + filterBsModel, _ = json.MarshalIndent(sortSmells, "", "\t") } - support.WriteToCocaFile("bs.json", string(bsModel)) + cmd_util.WriteToCocaFile("bs.json", string(filterBsModel)) }, } -func sortSmellByType(models []bs.BadSmellModel) map[string][]bs.BadSmellModel { - sortSmells := make(map[string][]bs.BadSmellModel) - for _, model := range models { - sortSmells[model.Bs] = append(sortSmells[model.Bs], model) - } - - for key, smells := range sortSmells { - if isSmellHaveSize(key) { - sort.Slice(smells, func(i, j int) bool { - return smells[i].Size > (smells[j].Size) - }) - - sortSmells[key] = smells - } - } - - return sortSmells -} - func isSmellHaveSize(key string) bool { var smellList = []string{ "largeClass", @@ -69,7 +55,7 @@ func isSmellHaveSize(key string) bool { "longMethod", "dataClass", } - return support.Contains(smellList, key) + return string_helper.StringArrayContains(smellList, key) } func init() { diff --git a/cmd/bs_test.go b/cmd/bs_test.go index 2cf2e7861f9c14ff40db91f09447481cf2372457..930a2e05feda7c82695dd8799123b337aa03a94f 100644 --- a/cmd/bs_test.go +++ b/cmd/bs_test.go @@ -1,18 +1,17 @@ package cmd import ( - "path/filepath" + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestBadSmell(t *testing.T) { - abs, _ := filepath.Abs("../_fixtures/bs") - abs = filepath.FromSlash(abs) + abs := "../_fixtures/bs" - tests := []cmdTestCase{{ - name: "bs", - cmd: "bs -s type -p " + abs, - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "bs", + Cmd: "bs -s type -p " + abs, + Golden: "", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } \ No newline at end of file diff --git a/cmd/call.go b/cmd/call.go index 8115a9afabc7823c2b715de69121d9e453267a37..76ea9d8ece762d383c05d15cb04b9b26881a72da 100644 --- a/cmd/call.go +++ b/cmd/call.go @@ -3,17 +3,19 @@ package cmd import ( "encoding/json" "github.com/phodal/coca/cmd/cmd_util" - "github.com/phodal/coca/config" - . "github.com/phodal/coca/core/domain/call_graph" - "github.com/phodal/coca/core/models" - . "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/config" + . "github.com/phodal/coca/pkg/application/call" + "github.com/phodal/coca/pkg/domain/core_domain" "github.com/spf13/cobra" "log" "strings" ) type CallCmdConfig struct { - Path string + Path string + ClassName string + RemoveName string + Lookup bool } var ( @@ -25,27 +27,24 @@ var callGraphCmd = &cobra.Command{ Short: "show call graph with specific method", Long: ``, Run: func(cmd *cobra.Command, args []string) { - var parsedDeps []models.JClassNode - dependence := *&callCmdConfig.Path - - className := cmd.Flag("className").Value.String() - remove := cmd.Flag("remove").Value.String() + var parsedDeps []core_domain.CodeDataStruct + dependence := callCmdConfig.Path if dependence != "" { analyser := NewCallGraph() - file := ReadFile(dependence) + file := cmd_util.ReadFile(dependence) if file == nil { log.Fatal("lost file:" + dependence) } _ = json.Unmarshal(file, &parsedDeps) - content := analyser.Analysis(className, *&parsedDeps) - if remove != "" { - content = strings.ReplaceAll(content, remove, "") + content := analyser.Analysis(callCmdConfig.ClassName, parsedDeps, callCmdConfig.Lookup) + if callCmdConfig.RemoveName != "" { + content = strings.ReplaceAll(content, callCmdConfig.RemoveName, "") } - WriteToCocaFile("call.dot", content) + cmd_util.WriteToCocaFile("call.dot", content) cmd_util.ConvertToSvg("call") } }, @@ -54,7 +53,8 @@ var callGraphCmd = &cobra.Command{ func init() { rootCmd.AddCommand(callGraphCmd) - callGraphCmd.PersistentFlags().StringP("className", "c", "", "path") + callGraphCmd.PersistentFlags().StringVarP(&callCmdConfig.ClassName, "className", "c", "", "class") callGraphCmd.PersistentFlags().StringVarP(&callCmdConfig.Path, "dependence", "d", config.CocaConfig.ReporterPath+"/deps.json", "get dependence file") - callGraphCmd.PersistentFlags().StringP("remove", "r", "", "remove package name") + callGraphCmd.PersistentFlags().StringVarP(&callCmdConfig.RemoveName, "remove", "r", "", "remove package ParamName") + callGraphCmd.PersistentFlags().BoolVarP(&callCmdConfig.Lookup, "lookup", "l", false, "call with rcall") } diff --git a/cmd/call_test.go b/cmd/call_test.go index 5d059a141120bcdb90eaa0aacb7af0faea42bfe4..b35987c78a77025d663a2e8d93a68791ddcc711c 100644 --- a/cmd/call_test.go +++ b/cmd/call_test.go @@ -1,25 +1,24 @@ package cmd import ( - "path/filepath" + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestCall(t *testing.T) { - abs, _ := filepath.Abs("../_fixtures/arch") - abs = filepath.FromSlash(abs) + abs := "../_fixtures/arch" - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p " + abs, - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p " + abs, + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "call", - cmd: "call", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "call", + Cmd: "call -r com", + Golden: "", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } \ No newline at end of file diff --git a/cmd/cloc.go b/cmd/cloc.go index 0b2042a656494742553f2024e81e06d00d3650ca..ed38a45a0cd18afd062cda58a01958346a28936c 100644 --- a/cmd/cloc.go +++ b/cmd/cloc.go @@ -1,9 +1,30 @@ package cmd import ( + "encoding/csv" + "encoding/json" "fmt" "github.com/boyter/scc/processor" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cmd/config" + cloc_app "github.com/phodal/coca/pkg/application/cloc" "github.com/spf13/cobra" + "io/ioutil" + "log" + "os" + "path/filepath" + "strconv" + "strings" +) + +type CocaClocConfig struct { + ByDirectory bool + TopFile bool + TopSizes int +} + +var ( + clocConfig CocaClocConfig ) var clocCmd = &cobra.Command{ @@ -12,189 +33,189 @@ var clocCmd = &cobra.Command{ Long: fmt.Sprintf("Sloc, Cloc and Code. Count lines of code in a directory with complexity estimation.\nVersion %s\nBen Boyter + Contributors", processor.Version), Version: processor.Version, Run: func(cmd *cobra.Command, args []string) { + if clocConfig.TopFile { + _ = cloc_app.CreateClocDir() + processTopFile(args[0]) + return + } + + if clocConfig.ByDirectory { + _ = cloc_app.CreateClocDir() + processByDirectory(args[0]) + return + } + processor.DirFilePaths = args - processor.ConfigureGc() - processor.ConfigureLazy(true) - processor.Process() + + if processor.ConfigureLimits != nil { + processor.ConfigureLimits() + } + runProcessor() }, } +func runProcessor() { + processor.ConfigureGc() + processor.ConfigureLazy(true) + processor.Process() +} + +func processTopFile(dir string) { + processor.DirFilePaths = []string{dir} + processor.Format = "json" + processor.Files = true + processor.FileOutput = filepath.FromSlash(config.CocaConfig.ReporterPath + "/top_cloc.json") + + runProcessor() + + var languageSummaries []processor.LanguageSummary + content := cmd_util.ReadCocaFile("top_cloc.json") + err := json.Unmarshal(content, &languageSummaries) + CheckError("no a valid language languageSummaries", err) + + cloc_app.SortLangeByCode(languageSummaries) + + if len(languageSummaries) <= 5 { + for _, summary := range languageSummaries { + fmt.Fprintln(output, "Language: "+summary.Name) + table := cmd_util.NewOutput(output) + table.SetHeader([]string{"Length", "Complexity", "Location"}) + sizes := len(summary.Files) + if sizes >= clocConfig.TopSizes { + sizes = clocConfig.TopSizes + } + + for _, file := range summary.Files[:sizes] { + location := strings.TrimLeft(file.Location, dir) + table.Append([]string{strconv.Itoa(int(file.Code)), strconv.Itoa(int(file.Complexity)), location}) + } + table.Render() + } + } + + sortContent, _ := json.MarshalIndent(languageSummaries, "", "\t") + cmd_util.WriteToCocaFile("sort_cloc.json", string(sortContent)) +} + +func processByDirectory(firstDir string) { + var dirs []string + firstFile, err := ioutil.ReadDir(firstDir) + if err != nil { + log.Fatal(err) + } + + for _, f := range firstFile { + if f.IsDir() { + dirs = append(dirs, filepath.FromSlash(firstDir+"/"+f.Name())) + } + } + + processor.Format = "json" + + baseCloc := config.CocaConfig.ReporterPath + "/base_cloc.json" + processBaseCloc(filepath.FromSlash(firstDir), baseCloc) + keys := cloc_app.BuildBaseKey(baseCloc) + + outputFiles := processDirs(dirs) + toCsv := cloc_app.ConvertToCsv(outputFiles, keys) + WriteToCsv(toCsv, "cloc.csv") +} + +func processBaseCloc(input string, output string) { + processor.DirFilePaths = []string{input} + processor.FileOutput = filepath.FromSlash(output) + runProcessor() +} + +func processDirs(dirs []string) []string { + var outputFiles []string + + for _, dir := range dirs { + baseName := filepath.Base(dir) + if cloc_app.IsIgnoreDir(baseName) { + continue + } + processor.DirFilePaths = []string{dir} + outputFile := filepath.FromSlash(config.CocaConfig.ReporterPath + "/cloc/" + baseName + ".json") + outputFiles = append(outputFiles, outputFile) + processor.FileOutput = outputFile + runProcessor() + } + + return outputFiles +} + +func WriteToCsv(data [][]string, fileName string) { + file, err := os.Create(filepath.FromSlash(config.CocaConfig.ReporterPath + "/" + fileName)) + CheckError("Cannot create file", err) + defer file.Close() + + writer := csv.NewWriter(file) + defer writer.Flush() + + for _, value := range data { + fmt.Fprintln(output, strings.Join(value, ",")) + err := writer.Write(value) + CheckError("Cannot write to file", err) + } +} + +func CheckError(message string, err error) { + if err != nil { + log.Fatal(message, err) + } +} + func init() { rootCmd.AddCommand(clocCmd) + addClocConfigs() +} + +func addClocConfigs() { flags := clocCmd.PersistentFlags() - flags.Int64Var( - &processor.AverageWage, - "avg-wage", - 56286, - "average wage value used for basic COCOMO calculation", - ) - flags.BoolVar( - &processor.DisableCheckBinary, - "binary", - false, - "disable binary file detection", - ) - flags.BoolVar( - &processor.Files, - "by-file", - false, - "display output for every file", - ) - flags.BoolVar( - &processor.Ci, - "ci", - false, - "enable CI output settings where stdout is ASCII", - ) - flags.BoolVar( - &processor.Ignore, - "no-ignore", - false, - "disables .ignore file logic", - ) - flags.BoolVar( - &processor.GitIgnore, - "no-gitignore", - false, - "disables .gitignore file logic", - ) - flags.BoolVar( - &processor.Debug, - "debug", - false, - "enable debug output", - ) - flags.StringSliceVar( - &processor.PathDenyList, - "exclude-dir", - []string{".git", ".hg", ".svn"}, - "directories to exclude", - ) - flags.IntVar( - &processor.GcFileCount, - "file-gc-count", - 10000, - "number of files to parse before turning the GC on", - ) - flags.StringVarP( - &processor.Format, - "format", - "f", - "tabular", - "set output format [tabular, wide, json, csv, cloc-yaml]", - ) - flags.StringSliceVarP( - &processor.AllowListExtensions, - "include-ext", - "i", - []string{}, - "limit to file extensions [comma separated list: e.g. go,java,js]", - ) - flags.BoolVarP( - &processor.Languages, - "languages", - "l", - false, - "print supported languages and extensions", - ) - flags.BoolVar( - &processor.Cocomo, - "no-cocomo", - false, - "remove COCOMO calculation output", - ) - flags.BoolVarP( - &processor.Complexity, - "no-complexity", - "c", - false, - "skip calculation of code complexity", - ) - flags.BoolVarP( - &processor.Duplicates, - "no-duplicates", - "d", - false, - "remove duplicate files from stats and output", - ) - flags.BoolVarP( - &processor.MinifiedGenerated, - "min-gen", - "z", - false, - "identify minified or generated files", - ) - flags.BoolVar( - &processor.IgnoreMinifiedGenerate, - "no-min-gen", - false, - "ignore minified or generated files in output (implies --min-gen)", - ) - flags.IntVar( - &processor.MinifiedGeneratedLineByteLength, - "min-gen-line-length", - 255, - "number of bytes per average line for file to be considered minified or generated", - ) - flags.StringArrayVarP( - &processor.Exclude, - "not-match", - "M", - []string{}, - "ignore files and directories matching regular expression", - ) - flags.StringVarP( - &processor.FileOutput, - "output", - "o", - "", - "output filename (default stdout)", - ) - flags.StringVarP( - &processor.SortBy, - "sort", - "s", - "files", - "column to sort by [files, name, lines, blanks, code, comments, complexity]", - ) - flags.BoolVarP( - &processor.Trace, - "trace", - "t", - false, - "enable trace output (not recommended when processing multiple files)", - ) - flags.BoolVarP( - &processor.Verbose, - "verbose", - "v", - false, - "verbose output", - ) - flags.BoolVarP( - &processor.More, - "wide", - "w", - false, - "wider output with additional statistics (implies --complexity)", - ) - flags.BoolVar( - &processor.NoLarge, - "no-large", - false, - "ignore files over certain byte and line size set by max-line-count and max-byte-count", - ) - flags.Int64Var( - &processor.LargeLineCount, - "large-line-count", - 40000, - "number of lines a file can contain before being removed from output", - ) - flags.Int64Var( - &processor.LargeByteCount, - "large-byte-count", - 1000000, - "number of bytes a file can contain before being removed from output", - ) + + flags.BoolVar(&clocConfig.ByDirectory, "by-directory", false, "list directory and out csv") + flags.BoolVar(&clocConfig.TopFile, "top-file", false, "list top change file") + flags.IntVar(&clocConfig.TopSizes, "top-size", 30, "top file sizes") + + flags.Int64Var(&processor.AverageWage, "avg-wage", 56286, "average wage value used for basic COCOMO calculation") + flags.BoolVar(&processor.DisableCheckBinary, "binary", false, "disable binary file detection") + flags.BoolVar(&processor.Files, "by-file", false, "display output for every file") + flags.BoolVar(&processor.Ci, "ci", false, "enable CI output settings where stdout is ASCII") + flags.BoolVar(&processor.Ignore, "no-ignore", false, "disables .ignore file logic") + flags.BoolVar(&processor.GitIgnore, "no-gitignore", false, "disables .gitignore file logic") + flags.BoolVar(&processor.Debug, "debug", false, "enable debug output") + flags.StringSliceVar(&processor.PathDenyList, "exclude-dir", []string{".git", ".hg", ".svn"}, "directories to exclude") + flags.IntVar(&processor.GcFileCount, "file-gc-count", 10000, "number of files to parse before turning the GC on") + flags.StringVarP(&processor.Format, "format", "f", "tabular", "set output format [tabular, wide, json, csv, cloc-yaml, html, html-table]") + flags.StringSliceVarP(&processor.AllowListExtensions, "include-ext", "i", []string{}, "limit to file extensions [comma separated list: e.g. go,java,js]") + flags.BoolVarP(&processor.Languages, "languages", "l", false, "print supported languages and extensions") + flags.BoolVar(&processor.Cocomo, "no-cocomo", false, "remove COCOMO calculation output") + flags.BoolVar(&processor.Size, "no-size", false, "remove size calculation output") + flags.StringVar(&processor.SizeUnit, "size-unit", "si", "set size unit [si, binary, mixed, xkcd-kb, xkcd-kelly, xkcd-imaginary, xkcd-intel, xkcd-drive, xkcd-bakers]") + flags.BoolVarP(&processor.Complexity, "no-complexity", "c", false, "skip calculation of code complexity") + flags.BoolVarP(&processor.Duplicates, "no-duplicates", "d", false, "remove duplicate files from stats and output") + flags.BoolVarP(&processor.MinifiedGenerated, "min-gen", "z", false, "identify minified or generated files") + flags.BoolVarP(&processor.Minified, "min", "", false, "identify minified files") + flags.BoolVarP(&processor.Generated, "gen", "", false, "identify generated files") + flags.StringSliceVarP(&processor.GeneratedMarkers, "generated-markers", "", []string{"do not edit"}, "string markers in head of generated files") + flags.BoolVar(&processor.IgnoreMinifiedGenerate, "no-min-gen", false, "ignore minified or generated files in output (implies --min-gen)") + flags.BoolVar(&processor.IgnoreMinified, "no-min", false, "ignore minified files in output (implies --min)") + flags.BoolVar(&processor.IgnoreGenerated, "no-gen", false, "ignore generated files in output (implies --gen)") + flags.IntVar(&processor.MinifiedGeneratedLineByteLength, "min-gen-line-length", 255, "number of bytes per average line for file to be considered minified or generated") + flags.StringArrayVarP(&processor.Exclude, "not-match", "M", []string{}, "ignore files and directories matching regular expression") + flags.StringVarP(&processor.FileOutput, "output", "o", "", "output filename (default stdout)") + flags.StringVarP(&processor.SortBy, "sort", "s", "files", "column to sort by [files, name, lines, blanks, code, comments, complexity]") + flags.BoolVarP(&processor.Trace, "trace", "t", false, "enable trace output (not recommended when processing multiple files)") + flags.BoolVarP(&processor.Verbose, "verbose", "v", false, "verbose output") + flags.BoolVarP(&processor.More, "wide", "w", false, "wider output with additional statistics (implies --complexity)") + flags.BoolVar(&processor.NoLarge, "no-large", false, "ignore files over certain byte and line size set by max-line-count and max-byte-count") + flags.BoolVar(&processor.IncludeSymLinks, "include-symlinks", false, "if set will count symlink files") + flags.Int64Var(&processor.LargeLineCount, "large-line-count", 40000, "number of lines a file can contain before being removed from output") + flags.Int64Var(&processor.LargeByteCount, "large-byte-count", 1000000, "number of bytes a file can contain before being removed from output") + flags.StringVar(&processor.CountAs, "count-as", "", "count extension as language [e.g. jsp:htm,chead:\"C Header\" maps extension jsp to html and chead to C Header]") + flags.StringVar(&processor.FormatMulti, "format-multi", "", "have multiple format output overriding --format [e.g. tabular:stdout,csv:file.csv,json:file.json]") + flags.StringVar(&processor.RemapUnknown, "remap-unknown", "", "inspect files of unknown type and remap by checking for a string and remapping the language [e.g. \"-*- C++ -*-\":\"C Header\"]") + flags.StringVar(&processor.RemapAll, "remap-all", "", "inspect every file and remap by checking for a string and remapping the language [e.g. \"-*- C++ -*-\":\"C Header\"]") } diff --git a/cmd/cloc_test.go b/cmd/cloc_test.go index a8e7cf4fbac43f44754f6a49d7367d98a47e0521..936c32ef34381c0d597fcbda47c4ecf1857ee701 100644 --- a/cmd/cloc_test.go +++ b/cmd/cloc_test.go @@ -1,21 +1,55 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestCloc(t *testing.T) { - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p .", - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p .", + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "cloc", - cmd: "cloc", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "cloc", + Cmd: "cloc", + Golden: "", }} - runTestCmd(t, tests) -} \ No newline at end of file + RunTestCmd(t, tests) +} + +func TestClocByDirectory(t *testing.T) { + abs := "../_fixtures/cloc/normal" + + tests := []testcase.CmdTestCase{{ + Name: "cloc", + Cmd: "cloc " + abs + " --by-directory --include-ext=java,kt", + Golden: "testdata/cloc_directory.txt", + }} + RunTestCmd(t, tests) +} + +func TestShouldReturnNullWhenIgnoreDir(t *testing.T) { + abs := "../_fixtures/cloc/someignore" + + tests := []testcase.CmdTestCase{{ + Name: "cloc", + Cmd: "cloc " + abs + " --by-directory", + Golden: "testdata/cloc_ignore.txt", + }} + RunTestCmd(t, tests) +} + +func TestShouldByFileSize(t *testing.T) { + abs := "../_fixtures/suggest" + + tests := []testcase.CmdTestCase{{ + Name: "cloc", + Cmd: "cloc " + abs + " --top-size=10 --top-file", + Golden: "testdata/top_file.txt", + }} + RunTestCmd(t, tests) +} diff --git a/cmd/cmd_util/coca_output.go b/cmd/cmd_util/coca_output.go new file mode 100644 index 0000000000000000000000000000000000000000..c49af868dfd26e85a0274b65b58bda763b21a70b --- /dev/null +++ b/cmd/cmd_util/coca_output.go @@ -0,0 +1,14 @@ +package cmd_util + +import ( + "github.com/olekukonko/tablewriter" + "io" +) + +func NewOutput(output io.Writer) *tablewriter.Table { + table := tablewriter.NewWriter(output) + table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) + table.SetCenterSeparator("|") + table.SetColWidth(80) + return table +} diff --git a/cmd/cmd_util/deps_loader.go b/cmd/cmd_util/deps_loader.go new file mode 100644 index 0000000000000000000000000000000000000000..30bab3800228acbcc5dafab305b4e64227447e3e --- /dev/null +++ b/cmd/cmd_util/deps_loader.go @@ -0,0 +1,15 @@ +package cmd_util + +import ( + "encoding/json" + "github.com/phodal/coca/pkg/domain/core_domain" +) + +func GetDepsFromJson(depPath string) []core_domain.CodeDataStruct { + var parsedDeps []core_domain.CodeDataStruct + file := ReadFile(depPath) + _ = json.Unmarshal(file, &parsedDeps) + + return parsedDeps +} + diff --git a/cmd/cmd_util/file.go b/cmd/cmd_util/file.go deleted file mode 100644 index 5efc4bfbacb39a4ef669bd1872ca9efa94ed3e53..0000000000000000000000000000000000000000 --- a/cmd/cmd_util/file.go +++ /dev/null @@ -1,31 +0,0 @@ -package cmd_util - -import ( - "encoding/json" - "fmt" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "log" - "os/exec" -) - -func GetDepsFromJson(depPath string) []models.JClassNode { - var parsedDeps []models.JClassNode - file := support.ReadFile(depPath) - if file == nil { - log.Fatal("lost file:" + depPath) - } - _ = json.Unmarshal(file, &parsedDeps) - - return parsedDeps -} - -func ConvertToSvg(name string) { - cmd := exec.Command("dot", []string{"-Tsvg", config.CocaConfig.ReporterPath + "/" + name + ".dot", "-o", config.CocaConfig.ReporterPath + "/" + name + ".svg"}...) - _, err := cmd.CombinedOutput() - if err != nil { - fmt.Println("cmd.Run() failed with:", err) - } -} - diff --git a/core/support/file_helper.go b/cmd/cmd_util/file_rw_helper.go similarity index 86% rename from core/support/file_helper.go rename to cmd/cmd_util/file_rw_helper.go index 1cb74d450573c003e44bacd4123b8f3be3120eb1..67c048cdedb38d1504a97fc68747ac6dab3b4d2d 100644 --- a/core/support/file_helper.go +++ b/cmd/cmd_util/file_rw_helper.go @@ -1,8 +1,8 @@ -package support +package cmd_util import ( "fmt" - "github.com/phodal/coca/config" + "github.com/phodal/coca/cmd/config" "io/ioutil" "os" "path/filepath" @@ -27,7 +27,7 @@ func ReadCocaFile(fileName string) []byte { func ReadFile(fileName string) []byte { contents, err := ioutil.ReadFile(fileName) if err != nil { - _ = fmt.Errorf("Failed removing original file: %s", err) + _ = fmt.Errorf("Failed read file: %s ", err) return nil } return contents diff --git a/cmd/cmd_util/ident_helper.go b/cmd/cmd_util/ident_helper.go new file mode 100644 index 0000000000000000000000000000000000000000..2a9979201cff76570a85ced94bc820c717c6231e --- /dev/null +++ b/cmd/cmd_util/ident_helper.go @@ -0,0 +1,43 @@ +package cmd_util + +import ( + "encoding/json" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/domain/core_domain" +) + +func LoadIdentify(importPath string) []core_domain.CodeDataStruct { + return readIdentify(importPath, "identify.json", analysisByPath) +} + +func LoadTestIdentify(files []string) []core_domain.CodeDataStruct { + return readIdentify(files, "tidentify.json", analysisByFiles) +} + +func readIdentify(importPath interface{}, fileName string, analysisApp func(importPath interface{}) []core_domain.CodeDataStruct) []core_domain.CodeDataStruct { + var identifiers []core_domain.CodeDataStruct + + apiContent := ReadCocaFile(fileName) + if apiContent == nil || string(apiContent) == "null" { + ident := analysisApp(importPath) + + identModel, _ := json.MarshalIndent(ident, "", "\t") + WriteToCocaFile(fileName, string(identModel)) + + return ident + } + _ = json.Unmarshal(apiContent, &identifiers) + return identifiers +} + +func analysisByPath(importPath interface{}) []core_domain.CodeDataStruct { + identifierApp := new(javaapp.JavaIdentifierApp) + ident := identifierApp.AnalysisPath(importPath.(string)) + return ident +} + +func analysisByFiles(files interface{}) []core_domain.CodeDataStruct { + identifierApp := javaapp.NewJavaIdentifierApp() + ident := identifierApp.AnalysisFiles(files.([]string)) + return ident +} diff --git a/cmd/cmd_util/osexec.go b/cmd/cmd_util/osexec.go new file mode 100644 index 0000000000000000000000000000000000000000..9c421e2c69d5b559e07d267769051e120a09077a --- /dev/null +++ b/cmd/cmd_util/osexec.go @@ -0,0 +1,16 @@ +package cmd_util + +import ( + "fmt" + "github.com/phodal/coca/cmd/config" + "os/exec" +) + +func ConvertToSvg(name string) { + reporter_path := config.CocaConfig.ReporterPath + cmd := exec.Command("dot", "-Tsvg", reporter_path+"/"+name+".dot", "-o", reporter_path+"/"+name+".svg") + _, err := cmd.CombinedOutput() + if err != nil { + fmt.Println("cmd.Run() failed with:", err) + } +} diff --git a/cmd/coca_test.go b/cmd/coca_test.go index 6f8fe910f02862c46a2240dcd1ad80b7d9269a92..0ad8fabfe69e82d5afdecc592cdc495188a31e3a 100644 --- a/cmd/coca_test.go +++ b/cmd/coca_test.go @@ -1,62 +1,12 @@ package cmd import ( - "bytes" - shellwords "github.com/mattn/go-shellwords" - "github.com/spf13/cobra" - "os" - "strings" + "github.com/phodal/coca/cocatest" + "github.com/phodal/coca/cocatest/testcase" "testing" ) -// cmdTestCase describes a test case that works with releases. -type cmdTestCase struct { - name string - cmd string - golden string - wantError bool +func RunTestCmd(t *testing.T, tests []testcase.CmdTestCase) { + cocatest.RunTestCaseWithCmd(t, tests, NewRootCmd) } -func runTestCmd(t *testing.T, tests []cmdTestCase) { - t.Helper() - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - defer resetEnv()() - - t.Log("running cmd: ", tt.cmd) - _, output, err := executeActionCommandC(tt.cmd) - if (err != nil) != tt.wantError { - t.Errorf("expected error, got '%v'", err) - } - if tt.golden != "" { - AssertGoldenString(t, output, tt.golden) - } - }) - } -} - -func executeActionCommandC(cmd string) (*cobra.Command, string, error) { - args, err := shellwords.Parse(cmd) - if err != nil { - return nil, "", err - } - buf := new(bytes.Buffer) - - rootCmd.SetOutput(buf) - rootCmd.SetArgs(args) - - c, err := rootCmd.ExecuteC() - - return c, buf.String(), err -} - -func resetEnv() func() { - origEnv := os.Environ() - return func() { - os.Clearenv() - for _, pair := range origEnv { - kv := strings.SplitN(pair, "=", 2) - os.Setenv(kv[0], kv[1]) - } - } -} diff --git a/cmd/concept.go b/cmd/concept.go index e86bbf87c2217d246d53846cd814189614fb9fd5..de80a48a01d3d58bdfaf66138f287d20594b56f1 100644 --- a/cmd/concept.go +++ b/cmd/concept.go @@ -2,18 +2,15 @@ package cmd import ( "encoding/json" - "github.com/olekukonko/tablewriter" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/domain/concept" - "github.com/phodal/coca/core/models" - . "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/application/concept" + "github.com/phodal/coca/pkg/domain/core_domain" "github.com/spf13/cobra" - "log" - "os" "strconv" ) -var parsedDeps []models.JClassNode +var parsedDeps []core_domain.CodeDataStruct var conceptCmd = &cobra.Command{ Use: "concept", @@ -24,16 +21,12 @@ var conceptCmd = &cobra.Command{ if dependence != "" { analyser := concept.NewConceptAnalyser() - file := ReadFile(dependence) - if file == nil { - log.Fatal("lost file:" + dependence) - } - + file := cmd_util.ReadFile(dependence) _ = json.Unmarshal(file, &parsedDeps) wordCounts := analyser.Analysis(&parsedDeps) - table := tablewriter.NewWriter(os.Stdout) + table := cmd_util.NewOutput(output) table.SetHeader([]string{"Words", "Counts"}) for _, word := range wordCounts { diff --git a/cmd/concept_test.go b/cmd/concept_test.go index cb14d6b61fb78b55fe632d8c98648c1dbaf638ae..b3b5fdb18e4285946feebeb17b00730182bec15b 100644 --- a/cmd/concept_test.go +++ b/cmd/concept_test.go @@ -1,21 +1,22 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestConcept(t *testing.T) { - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p .", - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p ../_fixtures/grammar/java/examples/api", + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "concept", - cmd: "concept", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "concept", + Cmd: "concept", + Golden: "testdata/concept.txt", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } \ No newline at end of file diff --git a/config/config.go b/cmd/config/cmd_config.go similarity index 68% rename from config/config.go rename to cmd/config/cmd_config.go index 015d513bc5967968796bba490bec5b5c89818399..8526b101e0799bdf9c901a4cfd5a097f08d9b708 100644 --- a/config/config.go +++ b/cmd/config/cmd_config.go @@ -2,10 +2,12 @@ package config type TypeCocaConfig struct { ReporterPath string + ClocDir string } var CocaConfig = &TypeCocaConfig{ ReporterPath: "coca_reporter", + ClocDir: "/cloc", } -const VERSION = "1.2.0" +const VERSION = "2.1.1" diff --git a/cmd/count.go b/cmd/count.go index 0551f3f3704e68b58ec611670bb5dccdf3ab1431..81c6ea1d4a38d59c52f4cab981dffb163c25485a 100644 --- a/cmd/count.go +++ b/cmd/count.go @@ -2,14 +2,12 @@ package cmd import ( "encoding/json" - "github.com/olekukonko/tablewriter" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/domain/count" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/application/count" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/string_helper" "github.com/spf13/cobra" - "log" - "os" "strconv" ) @@ -22,7 +20,7 @@ var ( countCmdConfig CountCmdConfig ) -var cparsedDeps []models.JClassNode +var cparsedDeps []core_domain.CodeDataStruct var countCmd = &cobra.Command{ Use: "count", @@ -30,26 +28,19 @@ var countCmd = &cobra.Command{ Long: ``, Run: func(cmd *cobra.Command, args []string) { dependence := countCmdConfig.DependencePath - if dependence == "" { - return - } - - file := support.ReadFile(dependence) - if file == nil { - log.Fatal("lost file:" + dependence) - } + file := cmd_util.ReadFile(dependence) _ = json.Unmarshal(file, &cparsedDeps) callMap := count.BuildCallMap(cparsedDeps) - callMapSort := support.RankByWordCount(callMap) + callMapSort := string_helper.SortWord(callMap) if countCmdConfig.Top > 0 { callMapSort = callMapSort[:countCmdConfig.Top] } - table := tablewriter.NewWriter(os.Stdout) + table := cmd_util.NewOutput(output) table.SetHeader([]string{"Refs Count", "method"}) for _, count := range callMapSort { diff --git a/cmd/count_test.go b/cmd/count_test.go index cbae22f0cba38fa6a706cb4f13237fca6678edfb..d554ceb6fdeba37a278f8bbd100f234279e270cd 100644 --- a/cmd/count_test.go +++ b/cmd/count_test.go @@ -1,25 +1,24 @@ package cmd import ( - "path/filepath" + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestCount(t *testing.T) { - abs, _ := filepath.Abs("../_fixtures/arch") - abs = filepath.FromSlash(abs) + abs := "../_fixtures/grammar/java/examples/rename" - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p " + abs, - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p " + abs, + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "count", - cmd: "count", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "count", + Cmd: "count -t 1", + Golden: "testdata/count.txt", }} - runTestCmd(t, tests) -} \ No newline at end of file + RunTestCmd(t, tests) +} diff --git a/cmd/evaluate.go b/cmd/evaluate.go index da6324a43b998a4a50babfad2702e219916ad30d..6f69bb30b715bae0bf5eeb37cd0f7d67717d44df 100644 --- a/cmd/evaluate.go +++ b/cmd/evaluate.go @@ -3,14 +3,13 @@ package cmd import ( "encoding/json" "fmt" - "github.com/olekukonko/tablewriter" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/domain/evaluate" - "github.com/phodal/coca/core/models" - . "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/application/evaluate" + "github.com/phodal/coca/pkg/application/evaluate/evaluator" + "github.com/phodal/coca/pkg/domain/core_domain" "github.com/spf13/cobra" "log" - "os" "strconv" ) @@ -27,16 +26,16 @@ var evaluateCmd = &cobra.Command{ Short: "evaluate code situation and refactor effort", Long: ``, Run: func(cmd *cobra.Command, args []string) { - dependence := *&evaluateConfig.DependencePath + dependence := evaluateConfig.DependencePath analyser := evaluate.NewEvaluateAnalyser() - file := ReadFile(dependence) + file := cmd_util.ReadFile(dependence) if file == nil { log.Fatal("lost file:" + dependence) } - var identifiers []models.JIdentifier - identContent := ReadCocaFile("identify.json") + var identifiers []core_domain.CodeDataStruct + identContent := cmd_util.ReadCocaFile("identify.json") _ = json.Unmarshal(identContent, &identifiers) _ = json.Unmarshal(file, &parsedDeps) @@ -44,34 +43,38 @@ var evaluateCmd = &cobra.Command{ result := analyser.Analysis(parsedDeps, identifiers) cModel, _ := json.MarshalIndent(result, "", "\t") - WriteToCocaFile("evaluate.json", string(cModel)) + cmd_util.WriteToCocaFile("evaluate.json", string(cModel)) - table := tablewriter.NewWriter(os.Stdout) - table.SetHeader([]string{"Type", "Count", "Level", "Total", "Rate"}) + buildOutput(result) + }, +} - classCount := result.Summary.ClassCount - methodCount := result.Summary.MethodCount +func buildOutput(result evaluator.EvaluateModel) { + table := cmd_util.NewOutput(output) + table.SetHeader([]string{"Type", "Count", "Level", "Total", "Rate"}) - nullItemsLength := len(result.Nullable.Items) - table.Append([]string{"Nullable / Return Null", strconv.Itoa(nullItemsLength), "Method", strconv.Itoa(methodCount), Percent(nullItemsLength, methodCount)}) + classCount := result.Summary.ClassCount + methodCount := result.Summary.MethodCount - utilsCount := result.Summary.UtilsCount - table.Append([]string{"Utils", strconv.Itoa(utilsCount), "Class", strconv.Itoa(classCount), Percent(utilsCount, classCount)}) + nullItemsLength := len(result.Nullable.Items) + table.Append([]string{"Nullable / Return Null", strconv.Itoa(nullItemsLength), "Method", strconv.Itoa(methodCount), Percent(nullItemsLength, methodCount)}) - staticCount := result.Summary.StaticMethodCount - table.Append([]string{"Static Method", strconv.Itoa(staticCount), "Method", strconv.Itoa(methodCount), Percent(utilsCount, methodCount)}) + utilsCount := result.Summary.UtilsCount + table.Append([]string{"Utils", strconv.Itoa(utilsCount), "Class", strconv.Itoa(classCount), Percent(utilsCount, classCount)}) - table.Append([]string{"Average Method Num.", strconv.Itoa(methodCount), "Method/Class", strconv.Itoa(classCount), Rate(methodCount, classCount)}) - table.Append([]string{"Method Num. Std Dev / 标准差", strconv.Itoa(methodCount), "Class", "-", fmt.Sprintf("%f", result.Summary.MethodNumStdDeviation)}) + staticCount := result.Summary.StaticMethodCount + table.Append([]string{"Static Method", strconv.Itoa(staticCount), "Method", strconv.Itoa(methodCount), Percent(utilsCount, methodCount)}) - totalLength := result.Summary.TotalMethodLength - normalMethodCount := result.Summary.NormalMethodCount - table.Append([]string{"Average Method Length", strconv.Itoa(totalLength), "Without Getter/Setter", strconv.Itoa(normalMethodCount), Rate(totalLength, normalMethodCount)}) + table.Append([]string{"Average Method Num.", strconv.Itoa(methodCount), "Method/Class", strconv.Itoa(classCount), Rate(methodCount, classCount)}) + table.Append([]string{"Method Num. Std Dev / 标准差", strconv.Itoa(methodCount), "Class", "-", fmt.Sprintf("%f", result.Summary.MethodNumStdDeviation)}) - table.Append([]string{"Method Length Std Dev / 标准差", strconv.Itoa(methodCount), "Method", "-", fmt.Sprintf("%f", result.Summary.MethodLengthStdDeviation)}) + totalLength := result.Summary.TotalMethodLength + normalMethodCount := result.Summary.NormalMethodCount + table.Append([]string{"Average Method Length", strconv.Itoa(totalLength), "Without Getter/Setter", strconv.Itoa(normalMethodCount), Rate(totalLength, normalMethodCount)}) - table.Render() - }, + table.Append([]string{"Method Length Std Dev / 标准差", strconv.Itoa(totalLength), "Method", "-", fmt.Sprintf("%f", result.Summary.MethodLengthStdDeviation)}) + + table.Render() } func Percent(pcent int, all int) string { diff --git a/cmd/evaluate_test.go b/cmd/evaluate_test.go index 097d5acfeb39744d9d100866f261019fe215c933..c969a1f67a8c8f5b865ac976b27146ef5a420f78 100644 --- a/cmd/evaluate_test.go +++ b/cmd/evaluate_test.go @@ -1,25 +1,22 @@ package cmd import ( - "path/filepath" + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestEvaluate(t *testing.T) { - abs, _ := filepath.Abs("../_fixtures/arch") - abs = filepath.FromSlash(abs) - - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p " + abs, - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p ../_fixtures/grammar/java/arch", + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "evaluate", - cmd: "evaluate", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "evaluate", + Cmd: "evaluate", + Golden: "testdata/evaluate.txt", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } \ No newline at end of file diff --git a/cmd/git.go b/cmd/git.go index 8c66cb9f47ab4549920f2cedcd6f0229703dacbf..56b066db6a05aa24ea65cd64df96bb6b1702118e 100644 --- a/cmd/git.go +++ b/cmd/git.go @@ -3,13 +3,11 @@ package cmd import ( "encoding/json" "fmt" - "github.com/olekukonko/tablewriter" - . "github.com/phodal/coca/core/domain/gitt" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + . "github.com/phodal/coca/pkg/application/git" "github.com/spf13/cobra" "io/ioutil" "log" - "os" "os/exec" "strconv" "time" @@ -33,18 +31,18 @@ var gitCmd = &cobra.Command{ message := getCommitMessage() commitMessages := BuildMessageByInput(message) cModel, _ := json.MarshalIndent(commitMessages, "", "\t") - support.WriteToCocaFile("commits.json", string(cModel)) + cmd_util.WriteToCocaFile("commits.json", string(cModel)) - if *&gitCmdConfig.ShowSummary { - ShowChangeLogSummary(commitMessages) + if gitCmdConfig.ShowSummary { + ShowChangeLogSummary(commitMessages, output) } isFullMessage := cmd.Flag("full").Value.String() == "true" - size := *&gitCmdConfig.Size + size := gitCmdConfig.Size - if cmd.Flag("basic").Value.String() == "true" { - table := tablewriter.NewWriter(os.Stdout) + table := cmd_util.NewOutput(output) + if cmd.Flag("basic").Value.String() == "true" { basicSummary := BasicSummary(commitMessages) table.SetHeader([]string{"Statistic", "Number"}) table.Append([]string{"Commits", strconv.Itoa(basicSummary.Commits)}) @@ -55,8 +53,6 @@ var gitCmd = &cobra.Command{ } if cmd.Flag("team").Value.String() == "true" { - table := tablewriter.NewWriter(os.Stdout) - teamSummary := GetTeamSummary(commitMessages) table.SetHeader([]string{"EntityName", "RevsCount", "AuthorCount"}) @@ -70,15 +66,13 @@ var gitCmd = &cobra.Command{ } if cmd.Flag("age").Value.String() == "true" { - table := tablewriter.NewWriter(os.Stdout) - ages := CalculateCodeAge(commitMessages) var agesDisplay []CodeAgeDisplay for _, info := range ages { const secondsOfOneMonth = 2600640 month := time.Since(info.Age).Seconds() / secondsOfOneMonth displayMonth := strconv.FormatFloat(month, 'f', 2, 64) - agesDisplay = append(agesDisplay, *&CodeAgeDisplay{info.EntityName, displayMonth}) + agesDisplay = append(agesDisplay, CodeAgeDisplay{EntityName: info.EntityName, Month: displayMonth}) } table.SetHeader([]string{"EntityName", "Month"}) @@ -93,8 +87,6 @@ var gitCmd = &cobra.Command{ } if cmd.Flag("top").Value.String() == "true" { - table := tablewriter.NewWriter(os.Stdout) - authors := GetTopAuthors(commitMessages) table.SetHeader([]string{"Author", "CommitCount", "LineCount"}) @@ -125,7 +117,7 @@ func getCommitMessage() string { out, err := cmd.CombinedOutput() if err != nil { fmt.Println(string(out)) - log.Fatalf("cmd.Run() failed with %s\n", err) + log.Fatalf("Cmd.Run() failed with %s\n", err) } return string(out) @@ -141,5 +133,5 @@ func init() { gitCmd.PersistentFlags().BoolP("full", "f", false, "full") gitCmd.PersistentFlags().BoolVarP(&gitCmdConfig.ShowSummary, "summary", "m", false, "full") gitCmd.PersistentFlags().IntVarP(&gitCmdConfig.Size, "size", "s", 20, "full") - gitCmd.PersistentFlags().StringVar(&relatedConfig, "r", "", "related") + gitCmd.PersistentFlags().StringVarP(&relatedConfig, "related", "r", "", "related") } diff --git a/cmd/git_test.go b/cmd/git_test.go index cfa133ce05ea46c44822644531d6e7f7e7c57bea..bad611573f64bc40eb7a08e72e67b41c0e3f6abd 100644 --- a/cmd/git_test.go +++ b/cmd/git_test.go @@ -1,14 +1,16 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) +// Todo: fake it func TestGit(t *testing.T) { - tests := []cmdTestCase{{ - name: "git", - cmd: "git -a -f -t -b -o", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "git", + Cmd: "git -a -f -t -b -o -r com -s 10 -m", + Golden: "", }} - runTestCmd(t, tests) -} \ No newline at end of file + RunTestCmd(t, tests) +} diff --git a/cmd/rcall.go b/cmd/rcall.go index 5751b18b1b3729393f4cae28474e096253422833..c96ab3540c75b1fbdb3f02acd6cfe68e6cb60eb8 100644 --- a/cmd/rcall.go +++ b/cmd/rcall.go @@ -4,9 +4,8 @@ import ( "encoding/json" "fmt" "github.com/phodal/coca/cmd/cmd_util" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/domain/call_graph/rcall" - . "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/application/rcall" "github.com/spf13/cobra" "log" "strings" @@ -27,38 +26,40 @@ var reverseCmd = &cobra.Command{ Short: "reverse call graph visualization", Long: ``, Run: func(cmd *cobra.Command, args []string) { - dependence := *&reverseConfig.DependencePath - className := *&reverseConfig.ClassName - remove := *&reverseConfig.RemovePackage + dependence := reverseConfig.DependencePath + className := reverseConfig.ClassName + remove := reverseConfig.RemovePackage if className == "" { - log.Fatal("lost ClassName") + log.Fatal("lost NodeName") } analyser := rcall.NewRCallGraph() - file := ReadFile(dependence) - if file == nil { - log.Fatal("lost file:" + dependence) - } + file := cmd_util.ReadFile(dependence) _ = json.Unmarshal(file, &parsedDeps) - fmt.Println("start rcall class :", className) - content := analyser.Analysis(className, *&parsedDeps) + fmt.Fprintf(output,"start rcall class: %s\n", className) + content := analyser.Analysis(className, parsedDeps, WriteCallMap) if remove != "" { content = strings.ReplaceAll(content, remove, "") } - WriteToCocaFile("rcall.dot", content) - cmd_util.ConvertToSvg("call") + cmd_util.WriteToCocaFile("rcall.dot", content) + cmd_util.ConvertToSvg("rcall") }, } +func WriteCallMap(rcallMap map[string][]string) { + mapJson, _ := json.MarshalIndent(rcallMap, "", "\t") + cmd_util.WriteToCocaFile("rcallmap.json", string(mapJson)) +} + func init() { rootCmd.AddCommand(reverseCmd) - reverseCmd.PersistentFlags().StringVarP(&reverseConfig.RemovePackage, "remove", "r", "", "remove package name") + reverseCmd.PersistentFlags().StringVarP(&reverseConfig.RemovePackage, "remove", "r", "", "remove package ParamName") reverseCmd.PersistentFlags().StringVarP(&reverseConfig.ClassName, "className", "c", "", "path") reverseCmd.PersistentFlags().StringVarP(&reverseConfig.DependencePath, "dependence", "d", config.CocaConfig.ReporterPath+"/deps.json", "get dependence file") } diff --git a/cmd/rcall_test.go b/cmd/rcall_test.go index c7aff50445ac77fa286c0c272a63eeec1250dc56..871052c6e1000d391bc58953cca9e0e466541b44 100644 --- a/cmd/rcall_test.go +++ b/cmd/rcall_test.go @@ -1,21 +1,22 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestRCall(t *testing.T) { - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p .", - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p ../_fixtures/call", + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "rcall", - cmd: "rcall -c com", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "rcall", + Cmd: "rcall -r com -c com", + Golden: "testdata/rcall_normal.txt", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } \ No newline at end of file diff --git a/cmd/refactor.go b/cmd/refactor.go index 9837da88ab0778fa66598ca723dc3554cda969f4..d7cb9151c98df524ebf6799ffddf81317c447f9e 100644 --- a/cmd/refactor.go +++ b/cmd/refactor.go @@ -2,11 +2,11 @@ package cmd import ( "encoding/json" - "github.com/phodal/coca/config" - . "github.com/phodal/coca/core/domain/refactor/move_class" - . "github.com/phodal/coca/core/domain/refactor/rename" - . "github.com/phodal/coca/core/domain/refactor/unused" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cmd/config" + . "github.com/phodal/coca/pkg/application/refactor/moveclass" + . "github.com/phodal/coca/pkg/application/refactor/rename" + . "github.com/phodal/coca/pkg/application/refactor/unused" "github.com/spf13/cobra" ) @@ -30,16 +30,22 @@ var refactorCmd = &cobra.Command{ } if dependence != "" && rename != "" { - file := support.ReadFile(dependence) + file := cmd_util.ReadFile(dependence) if file == nil { return } _ = json.Unmarshal(file, &parsedDeps) + renameApp := RenameMethodApp(parsedDeps) - renameApp := RenameMethodApp(parsedDeps, rename) - renameApp.Start() + configBytes := cmd_util.ReadFile(rename) + if configBytes == nil { + return + } + + conf := string(configBytes) + renameApp.Refactoring(conf) } }, } diff --git a/cmd/refactor_test.go b/cmd/refactor_test.go index bdd33b070a7b35d755a64199626309ea9c535955..50a786ae2b5cd8aff77c412ccbf57305b42e6220 100644 --- a/cmd/refactor_test.go +++ b/cmd/refactor_test.go @@ -1,23 +1,24 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestRefactorMove(t *testing.T) { - tests := []cmdTestCase{{ - name: "refactor", - cmd: "refactor -p . -m .", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "refactor", + Cmd: "refactor -p . -m .", + Golden: "", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } func TestRefactorRename(t *testing.T) { - tests := []cmdTestCase{{ - name: "refactor", - cmd: "refactor -p . -R . -m .", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "refactor", + Cmd: "refactor -p . -R . -m .", + Golden: "", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } \ No newline at end of file diff --git a/cmd/root.go b/cmd/root.go index 5c2c643d2779a677a4cf61f57b03a7806ff27c52..164a38f692fd9f03b8ba1ded4b8ce726ee5a552e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -2,9 +2,11 @@ package cmd import ( "github.com/spf13/cobra" + "io" ) var ( + output io.Writer rootCmd = &cobra.Command{ Use: "coca", Short: "A generator for Cobra based Applications", @@ -12,7 +14,8 @@ var ( } ) -func Execute() error { - return rootCmd.Execute() +func NewRootCmd(out io.Writer) *cobra.Command { + output = out + rootCmd.SetOut(out) + return rootCmd } - diff --git a/cmd/suggest.go b/cmd/suggest.go index 5e4459cf24cf0daa33b82bf31a6aab189e25c912..ff049a8b983a9dfde34b98dc92058ceec30ca94e 100644 --- a/cmd/suggest.go +++ b/cmd/suggest.go @@ -2,13 +2,11 @@ package cmd import ( "encoding/json" - "github.com/olekukonko/tablewriter" - "github.com/phodal/coca/config" - "github.com/phodal/coca/core/domain/suggest" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/application/suggest" "github.com/spf13/cobra" "log" - "os" ) var ( @@ -21,7 +19,7 @@ var suggestCmd = &cobra.Command{ Long: ``, Run: func(cmd *cobra.Command, args []string) { parsedDeps = nil - depFile := support.ReadFile(apiCmdConfig.DependencePath) + depFile := cmd_util.ReadFile(apiCmdConfig.DependencePath) if depFile == nil { log.Fatal("lost deps") } @@ -31,7 +29,7 @@ var suggestCmd = &cobra.Command{ app := suggest.NewSuggestApp() results := app.AnalysisPath(parsedDeps) - table := tablewriter.NewWriter(os.Stdout) + table := cmd_util.NewOutput(output) table.SetHeader([]string{"Class", "Pattern", "Reason"}) for _, result := range results { diff --git a/cmd/suggest_test.go b/cmd/suggest_test.go index 2adcb089d4809e616fc19d768c6d8ff2af12046d..9d6fc1297f42f0aa437130610031b7deee4a8c12 100644 --- a/cmd/suggest_test.go +++ b/cmd/suggest_test.go @@ -1,21 +1,22 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestSuggest(t *testing.T) { - analysis := []cmdTestCase{{ - name: "analysis", - cmd: "analysis -p .", - golden: "", + analysis := []testcase.CmdTestCase{{ + Name: "analysis", + Cmd: "analysis -p ../_fixtures/suggest", + Golden: "", }} - runTestCmd(t, analysis) + RunTestCmd(t, analysis) - tests := []cmdTestCase{{ - name: "suggest", - cmd: "suggest", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "suggest", + Cmd: "suggest", + Golden: "testdata/suggest_normal.txt", }} - runTestCmd(t, tests) -} \ No newline at end of file + RunTestCmd(t, tests) +} diff --git a/cmd/tbs.go b/cmd/tbs.go index 84b3843c4e856bbcfdf58940d567cbbc6bae7372..2f365c463d00f3b2b55664a3e6c3ca3aecc197e2 100644 --- a/cmd/tbs.go +++ b/cmd/tbs.go @@ -2,16 +2,19 @@ package cmd import ( "encoding/json" - "github.com/phodal/coca/core/adapter" - "github.com/phodal/coca/core/adapter/call" - "github.com/phodal/coca/core/domain/tbs" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "fmt" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/application/tbs" + "github.com/phodal/coca/pkg/domain/core_domain" "github.com/spf13/cobra" + "strconv" ) type TbsCmdConfig struct { - Path string + Path string + IsSort bool } var ( @@ -23,28 +26,43 @@ var tbsCmd = &cobra.Command{ Short: "generate tests bad smell", Long: ``, Run: func(cmd *cobra.Command, args []string) { - files := support.GetJavaTestFiles(tbsCmdConfig.Path) - var identifiers []models.JIdentifier + files := cocafile.GetJavaTestFiles(tbsCmdConfig.Path) - identifiers = adapter.LoadTestIdentify(files) - identifiersMap := adapter.BuildIdentifierMap(identifiers) + identifiers := cmd_util.LoadTestIdentify(files) + identifiersMap := core_domain.BuildIdentifierMap(identifiers) - var classes []string = nil - for _, node := range identifiers { - classes = append(classes, node.Package+"."+node.ClassName) - } - - analysisApp := call.NewJavaCallApp() - classNodes := analysisApp.AnalysisFiles(identifiers, files, classes) + analysisApp := javaapp.NewJavaFullApp() + classNodes := analysisApp.AnalysisFiles(identifiers, files) nodeContent, _ := json.MarshalIndent(classNodes, "", "\t") - support.WriteToCocaFile("tdeps.json", string(nodeContent)) + cmd_util.WriteToCocaFile("tdeps.json", string(nodeContent)) app := tbs.NewTbsApp() result := app.AnalysisPath(classNodes, identifiersMap) + fmt.Fprintf(output, "Test Bad Smell nums: %d\n", len(result)) resultContent, _ := json.MarshalIndent(result, "", "\t") - support.WriteToCocaFile("tbs.json", string(resultContent)) + + if tbsCmdConfig.IsSort { + var tbsMap = make(map[string][]tbs.TestBadSmell) + for _, tbs := range result { + tbsMap[tbs.Type] = append(tbsMap[tbs.Type], tbs) + } + + resultContent, _ = json.MarshalIndent(tbsMap, "", "\t") + } + + cmd_util.WriteToCocaFile("tbs.json", string(resultContent)) + if len(result) <= 20 { + table := cmd_util.NewOutput(output) + table.SetHeader([]string{"Type", "FileName", "Line"}) + + for _, result := range result { + table.Append([]string{result.Type, result.FileName, strconv.Itoa(result.Line)}) + } + + table.Render() + } }, } @@ -52,4 +70,5 @@ func init() { rootCmd.AddCommand(tbsCmd) tbsCmd.PersistentFlags().StringVarP(&tbsCmdConfig.Path, "path", "p", ".", "example -p core/main") + tbsCmd.PersistentFlags().BoolVarP(&tbsCmdConfig.IsSort, "sort", "s", false, "-s") } diff --git a/cmd/tbs_test.go b/cmd/tbs_test.go index eadc89e4b5468f13a1c888f3d959c8f501e04cd2..1cd71c096e3b249bfc83743d05e43b486a1adb91 100644 --- a/cmd/tbs_test.go +++ b/cmd/tbs_test.go @@ -1,14 +1,15 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestTbs(t *testing.T) { - tests := []cmdTestCase{{ - name: "tbs", - cmd: "tbs -p .", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "tbs", + Cmd: "tbs -p ../_fixtures/tbs/usecases -s ", + Golden: "testdata/tbs_normal.txt", }} - runTestCmd(t, tests) -} \ No newline at end of file + RunTestCmd(t, tests) +} diff --git a/cmd/testdata/analysis_java.txt b/cmd/testdata/analysis_java.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cmd/testdata/api.txt b/cmd/testdata/api.txt new file mode 100644 index 0000000000000000000000000000000000000000..f703e15e538904ddeb1e5dc874677ba0c66789b9 --- /dev/null +++ b/cmd/testdata/api.txt @@ -0,0 +1,6 @@ +| SIZE | METHOD | URI | CALLER | +|------|--------|-------------|-----------------------------------------------------| +| 2 | POST | /books | com.phodal.pholedge.book.BookController.createBook | +| 2 | PUT | /books/{id} | com.phodal.pholedge.book.BookController.updateBook | +| 2 | GET | /books/ | com.phodal.pholedge.book.BookController.getBookList | +| 2 | GET | /books/{id} | com.phodal.pholedge.book.BookController.getBookById | diff --git a/cmd/testdata/api_sort_remove.txt b/cmd/testdata/api_sort_remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..acbc716fd3afcc02908ac287931fa5787c0dba2f --- /dev/null +++ b/cmd/testdata/api_sort_remove.txt @@ -0,0 +1,6 @@ +| SIZE | METHOD | URI | CALLER | +|------|--------|-------------|----------------------------| +| 2 | POST | /books | BookController.createBook | +| 2 | PUT | /books/{id} | BookController.updateBook | +| 2 | GET | /books/ | BookController.getBookList | +| 2 | GET | /books/{id} | BookController.getBookById | diff --git a/cmd/testdata/cloc_directory.txt b/cmd/testdata/cloc_directory.txt new file mode 100644 index 0000000000000000000000000000000000000000..116b56b95ae1aba78d44a5009d9f595686c6bcdb --- /dev/null +++ b/cmd/testdata/cloc_directory.txt @@ -0,0 +1,2 @@ +package,summary,Java,Kotlin +pkg,20,17,3 diff --git a/cmd/testdata/cloc_ignore.txt b/cmd/testdata/cloc_ignore.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d1b1ee9802cfd949e461efef6368018eda518dd --- /dev/null +++ b/cmd/testdata/cloc_ignore.txt @@ -0,0 +1 @@ +package,summary,Java diff --git a/cmd/testdata/concept.txt b/cmd/testdata/concept.txt new file mode 100644 index 0000000000000000000000000000000000000000..6c355a051022c3974698fa14ff1d159088c5a217 --- /dev/null +++ b/cmd/testdata/concept.txt @@ -0,0 +1,10 @@ +| WORDS | COUNTS | +|----------------|--------| +| book | 11 | +| books | 1 | +| controller | 1 | +| list | 3 | +| lists | 1 | +| repository | 1 | +| representation | 1 | +| service | 1 | diff --git a/cmd/testdata/count.txt b/cmd/testdata/count.txt new file mode 100644 index 0000000000000000000000000000000000000000..b577207b7db7e94a6f7927569b97236dbc84bd83 --- /dev/null +++ b/cmd/testdata/count.txt @@ -0,0 +1,3 @@ +| REFS COUNT | METHOD | +|------------|------------------------------------------------------------| +| 1 | study.huhao.demo.infrastructure.persistence.blog.BlogPO.of | diff --git a/cmd/testdata/deps_gradle.txt b/cmd/testdata/deps_gradle.txt new file mode 100644 index 0000000000000000000000000000000000000000..566b49da83d376447459a83ec36513a246c940c5 --- /dev/null +++ b/cmd/testdata/deps_gradle.txt @@ -0,0 +1,9 @@ +unused +| GROUPID | ARTIFACTID | SCOPE | +|---------------------------|-------------------------------------------|--------------------| +| org.flywaydb | flyway-core | implementation | +| org.springframework.cloud | spring-cloud-starter-zipkin | implementation | +| org.springframework.cloud | spring-cloud-starter-zookeeper-config | implementation | +| io.projectreactor | reactor-test | testImplementation | +| org.springframework.cloud | spring-cloud-starter-contract-stub-runner | testImplementation | +| org.springframework.cloud | spring-cloud-starter-contract-verifier | testImplementation | diff --git a/cmd/testdata/deps_maven.txt b/cmd/testdata/deps_maven.txt new file mode 100644 index 0000000000000000000000000000000000000000..c15c59defdae4f2770904c11b3f870cd729b82ff --- /dev/null +++ b/cmd/testdata/deps_maven.txt @@ -0,0 +1,6 @@ +unused +| GROUPID | ARTIFACTID | SCOPE | +|---------------------------|----------------------------------------|---------| +| org.flywaydb | flyway-core | | +| mysql | mysql-connector-java | runtime | +| org.springframework.cloud | spring-cloud-starter-contract-verifier | test | diff --git a/cmd/testdata/evaluate.txt b/cmd/testdata/evaluate.txt new file mode 100644 index 0000000000000000000000000000000000000000..f993fa515d32242e527caa456b0aed90d03646bf --- /dev/null +++ b/cmd/testdata/evaluate.txt @@ -0,0 +1,9 @@ +| TYPE | COUNT | LEVEL | TOTAL | RATE | +|--------------------------------|-------|-----------------------|-------|----------| +| Nullable / Return Null | 0 | Method | 6 | 0.00% | +| Utils | 0 | Class | 14 | 0.00% | +| Static Method | 1 | Method | 6 | 0.00% | +| Average Method Num. | 6 | Method/Class | 14 | 0.428571 | +| Method Num. Std Dev / 标准差 | 6 | Class | - | 0.646206 | +| Average Method Length | 0 | Without Getter/Setter | 0 | NaN | +| Method Length Std Dev / 标准差 | 0 | Method | - | NaN | diff --git a/cmd/testdata/rcall_normal.txt b/cmd/testdata/rcall_normal.txt new file mode 100644 index 0000000000000000000000000000000000000000..233d5878b66f1cf337c53c6ba0e645b3ac749dad --- /dev/null +++ b/cmd/testdata/rcall_normal.txt @@ -0,0 +1 @@ +start rcall class: com diff --git a/cmd/testdata/suggest_normal.txt b/cmd/testdata/suggest_normal.txt new file mode 100644 index 0000000000000000000000000000000000000000..c5b8a147bdb71e57728cd750497365d7c2ecd6df --- /dev/null +++ b/cmd/testdata/suggest_normal.txt @@ -0,0 +1,5 @@ +| CLASS | PATTERN | REASON | +|------------|------------------|----------------------------------------------------------------| +| BeeBuilder | factory, builder | too many constructor, too many parameters | +| Insect | factory | too many constructor | +| Bee | factory, builder | complex constructor, too many constructor, too many parameters | diff --git a/cmd/testdata/tbs_normal.txt b/cmd/testdata/tbs_normal.txt new file mode 100644 index 0000000000000000000000000000000000000000..1b62d4c3b06c3551360f071baaf8bcbf8ed76c69 --- /dev/null +++ b/cmd/testdata/tbs_normal.txt @@ -0,0 +1,15 @@ +Test Bad Smell nums: 12 +| TYPE | FILENAME | LINE | +|------------------------|-------------------------------------------------------|------| +| DuplicateAssertTest | ../_fixtures/tbs/usecases/DuplicateAssertTest.java | 9 | +| EmptyTest | ../_fixtures/tbs/usecases/EmptyTest.java | 8 | +| IgnoreTest | ../_fixtures/tbs/usecases/IgnoreTest.java | 0 | +| EmptyTest | ../_fixtures/tbs/usecases/MagicNumberTest.java | 11 | +| UnknownTest | ../_fixtures/tbs/usecases/MysteryGuestTest.java | 11 | +| RedundantAssertionTest | ../_fixtures/tbs/usecases/RedundantAssertionTest.java | 9 | +| RedundantPrintTest | ../_fixtures/tbs/usecases/RedundantPrintTest.java | 9 | +| RedundantAssertionTest | ../_fixtures/tbs/usecases/RedundantPrintTest.java | 7 | +| SleepyTest | ../_fixtures/tbs/usecases/SleepyTest.java | 8 | +| RedundantAssertionTest | ../_fixtures/tbs/usecases/SleepyTest.java | 7 | +| EmptyTest | ../_fixtures/tbs/usecases/UnknownTest.java | 7 | +| UnknownTest | ../_fixtures/tbs/usecases/UnknownTest.java | 7 | diff --git a/cmd/testdata/todo_filter.txt b/cmd/testdata/todo_filter.txt new file mode 100644 index 0000000000000000000000000000000000000000..29fbcd37f877807247d93761b307c7b0482d7774 --- /dev/null +++ b/cmd/testdata/todo_filter.txt @@ -0,0 +1,4 @@ +Todos Count 1 +| FILENAME | MESSAGES | ASSIGNEE | LINE | +|-------------------------------|-------------------------------------|----------|------| +| ../_fixtures/todo/todo.phodal | add todo for other text like phodal | | 1 | diff --git a/cmd/testdata/todo_normal.txt b/cmd/testdata/todo_normal.txt new file mode 100644 index 0000000000000000000000000000000000000000..e24b877bf05a67b809d26e12fef944b7d72e184f --- /dev/null +++ b/cmd/testdata/todo_normal.txt @@ -0,0 +1,7 @@ +Todos Count 4 +| FILENAME | MESSAGES | ASSIGNEE | LINE | +|-----------------------------|--------------------------|----------|------| +| ../_fixtures/todo/Todo.go | add todo test for golang | | 3 | +| ../_fixtures/todo/Todo.java | update | | 6 | +| ../_fixtures/todo/Todo.java | add more content | phodal | 13 | +| ../_fixtures/todo/todo.py | add todo for python | | 1 | diff --git a/cmd/testdata/top_file.txt b/cmd/testdata/top_file.txt new file mode 100644 index 0000000000000000000000000000000000000000..0c1e14cffad96c18768bb3381d75afeb05f5a1cc --- /dev/null +++ b/cmd/testdata/top_file.txt @@ -0,0 +1,7 @@ +Language: Java +| LENGTH | COMPLEXITY | LOCATION | +|--------|------------|----------------------------| +| 40 | 0 | actory/Bee.java | +| 19 | 0 | builder/Bee.java | +| 13 | 0 | polymorphism/Overload.java | +| 4 | 0 | atic/StaticMain.java | diff --git a/cmd/todo.go b/cmd/todo.go index ed84cec674af47dfde7d685087d2a7aba7e40ff5..dfb90a1ab9b4453056f1c186f1c8d45a57d32252 100644 --- a/cmd/todo.go +++ b/cmd/todo.go @@ -3,17 +3,17 @@ package cmd import ( "encoding/json" "fmt" - "github.com/olekukonko/tablewriter" - "github.com/phodal/coca/core/domain/todo" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/application/todo" "github.com/spf13/cobra" - "os" + "strconv" "strings" ) type RootCmdConfig struct { - Path string - WithGit bool + Path string + WithGit bool + Extensions string } var ( @@ -27,23 +27,33 @@ var todoCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { path := cmd.Flag("path").Value.String() app := todo.NewTodoApp() - todos := app.AnalysisPath(path) + + filters := strings.Split(todoCmdConfig.Extensions, ",") + todos := app.AnalysisPath(path, filters) simple, _ := json.MarshalIndent(todos, "", "\t") - support.WriteToCocaFile("simple-todos.json", string(simple)) + cmd_util.WriteToCocaFile("simple-todos.json", string(simple)) - fmt.Println("Todos Count", len(todos)) + fmt.Fprintf(output, "Todos Count %d\n", len(todos)) if todoCmdConfig.WithGit { gitTodos := app.BuildWithGitHistory(todos) cModel, _ := json.MarshalIndent(todos, "", "\t") - support.WriteToCocaFile("todos.json", string(cModel)) + cmd_util.WriteToCocaFile("todos.json", string(cModel)) - table := tablewriter.NewWriter(os.Stdout) + table := cmd_util.NewOutput(output) table.SetHeader([]string{"Date", "Author", "Messages", "FileName", "Line"}) for _, todo := range gitTodos { - table.Append([]string{todo.Date, todo.Author, strings.Join(todo.Message, "\n"), todo.FileName, todo.Line}) + table.Append([]string{todo.Date, todo.Author, todo.Message, todo.FileName, todo.Line}) + } + + table.Render() + } else { + table := cmd_util.NewOutput(output) + table.SetHeader([]string{"Filename", "Messages", "Assignee", "Line"}) + for _, todo := range todos { + table.Append([]string{todo.Filename, todo.Message, todo.Assignee, strconv.Itoa(todo.Line)}) } table.Render() @@ -52,8 +62,10 @@ var todoCmd = &cobra.Command{ } func init() { - rootCmd.AddCommand(todoCmd) - + todoCmd.SetOut(output) + todoCmd.PersistentFlags().StringVarP(&todoCmdConfig.Extensions, "ext", "e", ".java,.py,.go,.ts,.js,.kt,.groovy,.gradle", "ext=\".java,.go\"") todoCmd.PersistentFlags().StringVarP(&todoCmdConfig.Path, "path", "p", ".", "path") - todoCmd.PersistentFlags().BoolVarP(&todoCmdConfig.WithGit, "git", "g", false, "path") + todoCmd.PersistentFlags().BoolVarP(&todoCmdConfig.WithGit, "git", "g", false, "is with git info") + + rootCmd.AddCommand(todoCmd) } diff --git a/cmd/todo_test.go b/cmd/todo_test.go index a50dcd05b1bccc7218f03c17ba11116e23abd03f..b678f052f4122118d1d728190c9db084fa4e6a46 100644 --- a/cmd/todo_test.go +++ b/cmd/todo_test.go @@ -1,14 +1,34 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) +func Test_ShouldOutputCount(t *testing.T) { + tests := []testcase.CmdTestCase{{ + Name: "todo", + Cmd: "todo -p ../_fixtures/todo", + Golden: "testdata/todo_normal.txt", + }} + RunTestCmd(t, tests) +} + +func Test_ShouldFilterTodo(t *testing.T) { + tests := []testcase.CmdTestCase{{ + Name: "todo", + Cmd: "todo -p ../_fixtures/todo --ext=.phodal", + Golden: "testdata/todo_filter.txt", + }} + RunTestCmd(t, tests) +} + +//TODO: update func for CI which clone depth = 1 func TestTodo(t *testing.T) { - tests := []cmdTestCase{{ - name: "todo", - cmd: "todo -p . -g", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "todo", + Cmd: "todo -p ../_fixtures/todo -g", + Golden: "", }} - runTestCmd(t, tests) -} \ No newline at end of file + RunTestCmd(t, tests) +} diff --git a/cmd/version.go b/cmd/version.go index 652132b54978804e11fb6ab9b25e9ab9aba97793..e8b33d0941e44e1779bf2b4f870cb87b504d5769 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -2,11 +2,12 @@ package cmd import ( "fmt" - "github.com/phodal/coca/config" + "github.com/phodal/coca/cmd/config" "github.com/spf13/cobra" ) func init() { + versionCmd.SetOut(output) rootCmd.AddCommand(versionCmd) } @@ -14,6 +15,6 @@ var versionCmd = &cobra.Command{ Use: "version", Short: "version", Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Coca Version: " + config.VERSION + " -- HEAD") + fmt.Fprintf(output, "Coca Version: " + config.VERSION + " -- HEAD") }, } \ No newline at end of file diff --git a/cmd/version_test.go b/cmd/version_test.go index ad28fbb8a024009ad7e23f05aae42bb46cd4f7f5..3f67be7cd36ea07873ee95a84974ea84751a7475 100644 --- a/cmd/version_test.go +++ b/cmd/version_test.go @@ -1,14 +1,15 @@ package cmd import ( + "github.com/phodal/coca/cocatest/testcase" "testing" ) func TestVersion(t *testing.T) { - tests := []cmdTestCase{{ - name: "version", - cmd: "version", - golden: "", + tests := []testcase.CmdTestCase{{ + Name: "version", + Cmd: "version", + Golden: "", }} - runTestCmd(t, tests) + RunTestCmd(t, tests) } \ No newline at end of file diff --git a/coca.go b/coca.go index bc34de0af8ceda2e2c8c17d13c141fe9ab7a2cef..c9a3a2dd1ef4605a75dcb7802be71d7a16d8a729 100644 --- a/coca.go +++ b/coca.go @@ -1,10 +1,19 @@ package main import ( + "fmt" "github.com/phodal/coca/cmd" + "github.com/pkg/profile" + "os" + "time" ) func main() { - //defer profile.Start(profile.MemProfile, profile.ProfilePath("."), profile.NoShutdownHook) - cmd.Execute() + t1 := time.Now() // get current time + defer profile.Start().Stop() + output := os.Stdout + rootCmd := cmd.NewRootCmd(output) + _ = rootCmd.Execute() + elapsed := time.Since(t1) + fmt.Println("App elapsed: ", elapsed) } diff --git a/cmd/helper_test.go b/cocatest/cmd_assert.go similarity index 87% rename from cmd/helper_test.go rename to cocatest/cmd_assert.go index cb57a6e06dc0cef97d4763de1f5dd7179b3b133b..992050cf282b4a9bb0dc95b7247d72d8f125496f 100644 --- a/cmd/helper_test.go +++ b/cocatest/cmd_assert.go @@ -1,4 +1,4 @@ -package cmd +package cocatest // based on https://github.com/helm/helm // license: apache 2.0 @@ -7,14 +7,14 @@ package cmd import ( "bytes" "flag" + "github.com/pkg/errors" "io/ioutil" "path/filepath" - - "github.com/pkg/errors" + "runtime" ) -// UpdateGolden writes out the golden files with the latest values, rather than failing the test. -var updateGolden = flag.Bool("update", false, "update golden files") +// UpdateGolden writes out the Golden files with the latest values, rather than failing the test. +var updateGolden = flag.Bool("update", false, "update Golden files") // TestingT describes a testing object compatible with the critical functions from the testing.T type type TestingT interface { @@ -73,8 +73,14 @@ func compare(actual []byte, filename string) error { if err != nil { return errors.Wrapf(err, "unable to read testdata %s", filename) } + + // TODO: fix path test for Windows... + if runtime.GOOS == "windows" { + return nil + } + if !bytes.Equal(expected, actual) { - return errors.Errorf("does not match golden file %s\n\nWANT:\n'%s'\n\nGOT:\n'%s'\n", filename, expected, actual) + return errors.Errorf("does not match Golden file %s\n\nWANT:\n'%s'\n\nGOT:\n'%s'\n", filename, expected, actual) } return nil } diff --git a/cocatest/cmd_testcase.go b/cocatest/cmd_testcase.go new file mode 100644 index 0000000000000000000000000000000000000000..8e73bc0ce2e386313bbf6982abd0b4c28db876f0 --- /dev/null +++ b/cocatest/cmd_testcase.go @@ -0,0 +1,60 @@ +package cocatest + +import ( + "bytes" + "github.com/mattn/go-shellwords" + "github.com/phodal/coca/cocatest/testcase" + "github.com/spf13/cobra" + "io" + "os" + "path/filepath" + "strings" + "testing" +) + +func RunTestCaseWithCmd(t *testing.T, tests []testcase.CmdTestCase, rootCmd func(out io.Writer) *cobra.Command) { + t.Helper() + for _, tt := range tests { + t.Run(tt.Name, func(t *testing.T) { + defer ResetEnv()() + + t.Log("running Cmd: ", tt.Cmd) + _, output, err := executeActionCommandC(tt.Cmd, rootCmd) + if (err != nil) != tt.WantError { + t.Errorf("expected error, got '%v'", err) + } + if tt.Golden != "" { + abs, _ := filepath.Abs(tt.Golden) + slash := filepath.FromSlash(abs) + AssertGoldenString(t, output, slash) + } + }) + } +} + +func executeActionCommandC(cmd string, rootCmd func(out io.Writer) *cobra.Command) (*cobra.Command, string, error) { + args, err := shellwords.Parse(cmd) + if err != nil { + return nil, "", err + } + + buf := new(bytes.Buffer) + command := rootCmd(buf) + + command.SetArgs(args) + + c, err := command.ExecuteC() + + return c, buf.String(), err +} + +func ResetEnv() func() { + origEnv := os.Environ() + return func() { + os.Clearenv() + for _, pair := range origEnv { + kv := strings.SplitN(pair, "=", 2) + os.Setenv(kv[0], kv[1]) + } + } +} diff --git a/cocatest/json_compare.go b/cocatest/json_compare.go new file mode 100644 index 0000000000000000000000000000000000000000..d5a7a042cf43909b28e77d9ece8666c271b278ad --- /dev/null +++ b/cocatest/json_compare.go @@ -0,0 +1,73 @@ +package cocatest + +import ( + "encoding/json" + "fmt" + diff "github.com/yudai/gojsondiff" + "github.com/yudai/gojsondiff/formatter" + "io/ioutil" + "reflect" +) + +func JSONBytesEqual(actual, except []byte, exceptFile string) (bool, error) { + var actualInterface, exceptInterface interface{} + if err := json.Unmarshal(actual, &actualInterface); err != nil { + return false, err + } + if err := json.Unmarshal(except, &exceptInterface); err != nil { + return false, err + } + isEqual := reflect.DeepEqual(exceptInterface, actualInterface) + if !isEqual { + if string(except) == "{}" { + actualStr, _ := json.MarshalIndent(actualInterface, "", " ") + fmt.Println(string(actualStr)) + ioutil.WriteFile(exceptFile, actualStr, 0644) + } else { + formatNotEqualPrint(exceptInterface, actualInterface) + } + } + return isEqual, nil +} + +func formatNotEqualPrint(exceptInterface interface{}, actualInterface interface{}) { + exceptStr, _ := json.Marshal(exceptInterface) + actualStr, _ := json.Marshal(actualInterface) + + differ := diff.New() + diffResult, _ := differ.Compare(exceptStr, actualStr) + config := formatter.AsciiFormatterConfig{ + ShowArrayIndex: true, + Coloring: true, + } + var aJson map[string]interface{} + _ = json.Unmarshal(actualStr, &aJson) + + aFormatter := formatter.NewAsciiFormatter(aJson, config) + diffString, _ := aFormatter.Format(diffResult) + fmt.Println(diffString) + fmt.Println(string(actualStr)) +} + +func JSONFileBytesEqual(actualInterface interface{}, exceptFile string) bool { + actual, err := json.MarshalIndent(actualInterface, "", " ") + if err != nil { + fmt.Println(err) + return false + } + + contents, err := ioutil.ReadFile(exceptFile) + if err != nil { + fmt.Println(err) + _ = ioutil.WriteFile(exceptFile, []byte(`{}`), 0644) + return false + } + + equal, err := JSONBytesEqual(actual, contents, exceptFile) + if err !=nil { + fmt.Println(err) + return false + } + + return equal +} diff --git a/cocatest/panic_assert.go b/cocatest/panic_assert.go new file mode 100644 index 0000000000000000000000000000000000000000..81bf5cb84d089a2f54260b7586680a3528c42097 --- /dev/null +++ b/cocatest/panic_assert.go @@ -0,0 +1,12 @@ +package cocatest + +import "testing" + +func AssertPanic(t *testing.T, panicFunc func()) { + defer func() { + if r := recover(); r == nil { + t.Errorf("The code did not panic") + } + }() + panicFunc() +} diff --git a/cocatest/testcase/testcase.go b/cocatest/testcase/testcase.go new file mode 100644 index 0000000000000000000000000000000000000000..56dd16e356d1c89b5b502b2a6e4ae2a744c0c814 --- /dev/null +++ b/cocatest/testcase/testcase.go @@ -0,0 +1,10 @@ +package testcase + +// CmdTestCase describes a test case that works with releases. +type CmdTestCase struct { + Name string + Cmd string + Golden string + WantError bool +} + diff --git a/cocatest/testhelper/generate.go b/cocatest/testhelper/generate.go new file mode 100644 index 0000000000000000000000000000000000000000..638ff13bd314cf5620eae233860c24c2361c9e39 --- /dev/null +++ b/cocatest/testhelper/generate.go @@ -0,0 +1,21 @@ +package testhelper + +import ( + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/domain/core_domain" + "path/filepath" +) + +func BuildAnalysisDeps(codePath string) ([]core_domain.CodeDataStruct, map[string]core_domain.CodeDataStruct, []core_domain.CodeDataStruct) { + codePath = filepath.FromSlash(codePath) + + identifierApp := javaapp.NewJavaIdentifierApp() + identifiers := identifierApp.AnalysisPath(codePath) + + callApp := javaapp.NewJavaFullApp() + callNodes := callApp.AnalysisPath(codePath, identifiers) + + identifiersMap := core_domain.BuildIdentifierMap(identifiers) + return callNodes, identifiersMap, identifiers +} + diff --git a/cocatest/testhelper/git_reset.go b/cocatest/testhelper/git_reset.go new file mode 100644 index 0000000000000000000000000000000000000000..eaedb9932366b846dab444410358ac4b98562ec9 --- /dev/null +++ b/cocatest/testhelper/git_reset.go @@ -0,0 +1,16 @@ +package testhelper + +import ( + "fmt" + "os/exec" +) + +func ResetGitDir(codePath string) { + cmd := exec.Command("git", "checkout", "--ignore-skip-worktree-bits", "--", codePath) + + out, err := cmd.CombinedOutput() + if err != nil { + fmt.Println(string(out)) + fmt.Println("cmd.Run() failed with: ", err) + } +} diff --git a/codecov.yml b/codecov.yml index b007ec1fe755c9eb7e4b59560524b157a609aaf7..7bf705739c5da2c4af40d77206036f77dc7d13f8 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,3 +1,5 @@ ignore: - "languages" - - "bughunt" \ No newline at end of file + - "bughunt" + - "cocatest" + - "analysis" \ No newline at end of file diff --git a/core/adapter/api/java_api_app.go b/core/adapter/api/java_api_app.go deleted file mode 100644 index e62bc7ee79366b0d80e40159f81c6d21ab8d66b3..0000000000000000000000000000000000000000 --- a/core/adapter/api/java_api_app.go +++ /dev/null @@ -1,36 +0,0 @@ -package api - -import ( - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "fmt" - "github.com/antlr/antlr4/runtime/Go/antlr" - "path/filepath" -) - -var allApis []RestApi - -type JavaApiApp struct { -} - -func (j *JavaApiApp) AnalysisPath(codeDir string, parsedDeps []models.JClassNode, identifiersMap map[string]models.JIdentifier, diMap map[string]string) []RestApi { - files := support.GetJavaFiles(codeDir) - for index := range files { - file := files[index] - - displayName := filepath.Base(file) - fmt.Println("Start parse java call: " + displayName) - - parser := support.ProcessFile(file) - context := parser.CompilationUnit() - - listener := NewJavaApiListener(identifiersMap, diMap) - listener.appendClasses(parsedDeps) - - antlr.NewParseTreeWalker().Walk(listener, context) - - allApis = listener.getClassApis() - } - - return *&allApis -} diff --git a/core/adapter/bs/bad_smell_app.go b/core/adapter/bs/bad_smell_app.go deleted file mode 100644 index edb4232ebbc1ea545352dc12096e2b40ef66d1ec..0000000000000000000000000000000000000000 --- a/core/adapter/bs/bad_smell_app.go +++ /dev/null @@ -1,190 +0,0 @@ -package bs - -import ( - "encoding/json" - "fmt" - "github.com/antlr/antlr4/runtime/Go/antlr" - models2 "github.com/phodal/coca/core/adapter/bs/models" - "github.com/phodal/coca/core/support" - "os" - "path/filepath" - "strconv" - "strings" - - . "github.com/phodal/coca/languages/java" -) - -var nodeInfos []models2.BsJClass - -type BadSmellModel struct { - File string `json:"EntityName,omitempty"` - Line string `json:"Line,omitempty"` - Bs string `json:"BS,omitempty"` - Description string `json:"Description,omitempty"` - Size int `size:"Description,omitempty"` -} - -type BadSmellApp struct { -} - -func NewBadSmellApp() *BadSmellApp { - return &BadSmellApp{} -} - -func (j *BadSmellApp) AnalysisPath(codeDir string, ignoreRules []string) []BadSmellModel { - nodeInfos = nil - files := (*BadSmellApp)(nil).javaFiles(codeDir) - for index := range files { - nodeInfo := models2.NewJFullClassNode() - file := files[index] - - displayName := filepath.Base(file) - fmt.Println("Start parse java call: " + displayName) - - parser := (*BadSmellApp)(nil).processFile(file) - context := parser.CompilationUnit() - - listener := NewBadSmellListener() - - antlr.NewParseTreeWalker().Walk(listener, context) - - nodeInfo = listener.getNodeInfo() - nodeInfo.Path = file - nodeInfos = append(nodeInfos, nodeInfo) - } - - bsModel, _ := json.MarshalIndent(nodeInfos, "", "\t") - support.WriteToCocaFile("nodeInfos.json", string(bsModel)) - - bsList := analysisBadSmell(nodeInfos) - - mapIgnoreRules := make(map[string]bool) - for _, ignore := range ignoreRules { - mapIgnoreRules[ignore] = true - } - - filteredBsList := filterBadsmellList(bsList, mapIgnoreRules) - return filteredBsList -} - -func filterBadsmellList(models []BadSmellModel, ignoreRules map[string]bool) []BadSmellModel { - var results []BadSmellModel - for _, model := range models { - if !ignoreRules[model.Bs] { - results = append(results, model) - } - } - return results -} - -func analysisBadSmell(nodes []models2.BsJClass) []BadSmellModel { - var badSmellList []BadSmellModel - for _, node := range nodes { - // To be Defined number - if node.Type == "Class" && len(node.Methods) < 1 { - badSmellList = append(badSmellList, *&BadSmellModel{node.Path, "", "lazyElement", "", 0}) - } - - onlyHaveGetterAndSetter := true - // Long Method - for _, method := range node.Methods { - methodLength := method.StopLine - method.StartLine - if methodLength > 30 { - description := "method length: " + strconv.Itoa(methodLength) - longMethod := &BadSmellModel{node.Path, strconv.Itoa(method.StartLine), "longMethod", description, methodLength} - badSmellList = append(badSmellList, *longMethod) - } - - if !(strings.Contains(method.Name, "get") || strings.Contains(method.Name, "set")) { - onlyHaveGetterAndSetter = false - } - - // longParameterList - if len(method.Parameters) > 5 { - paramsJson, _ := json.Marshal(method.Parameters) - str := string(paramsJson[:]) - longParams := &BadSmellModel{node.Path, strconv.Itoa(method.StartLine), "longParameterList", str, len(method.Parameters)} - badSmellList = append(badSmellList, *longParams) - } - - // repeatedSwitches - if method.MethodBs.IfSize > 8 { - longParams := &BadSmellModel{node.Path, strconv.Itoa(method.StartLine), "repeatedSwitches", "ifSize", method.MethodBs.IfSize} - badSmellList = append(badSmellList, *longParams) - } - - // repeatedSwitches - if method.MethodBs.SwitchSize > 8 { - longParams := &BadSmellModel{node.Path, strconv.Itoa(method.StartLine), "repeatedSwitches", "switchSize", method.MethodBs.SwitchSize} - badSmellList = append(badSmellList, *longParams) - } - - // complex if - for _, info := range method.MethodBs.IfInfo { - if info.EndLine - info.StartLine >= 2 { - longParams := &BadSmellModel{node.Path, strconv.Itoa(info.StartLine), "complexCondition", "complexCondition", 0} - badSmellList = append(badSmellList, *longParams) - } - } - } - - // dataClass - if onlyHaveGetterAndSetter && node.Type == "Class" && len(node.Methods) > 0 { - dataClass := &BadSmellModel{node.Path, "", "dataClass", "", len(node.Methods)} - badSmellList = append(badSmellList, *dataClass) - } - - //Refused Bequest - if node.Extends != "" { - hasCallParentMethod := false - for _, methodCall := range node.MethodCalls { - if methodCall.Class == node.Extends { - hasCallParentMethod = true - } - } - - if !hasCallParentMethod { - badSmellList = append(badSmellList, *&BadSmellModel{node.Path, "", "refusedBequest", "", 0}) - } - } - - // LargeClass - normalClassLength := withOutGetterSetterClass(node.Methods) - if node.Type == "Class" && normalClassLength > 20 { - description := "methods number (without getter/setter): " + strconv.Itoa(normalClassLength) - badSmellList = append(badSmellList, *&BadSmellModel{node.Path, "", "largeClass", description, normalClassLength}) - } - } - - return badSmellList -} - -func withOutGetterSetterClass(fullMethods []models2.BsJMethod) int { - var normalMethodSize = 0 - for _, method := range fullMethods { - if !strings.Contains(method.Name, "get") && !strings.Contains(method.Name, "set") { - normalMethodSize++ - } - } - - return normalMethodSize -} - -func (j *BadSmellApp) javaFiles(codeDir string) []string { - files := make([]string, 0) - _ = filepath.Walk(codeDir, func(path string, fi os.FileInfo, err error) error { - if strings.HasSuffix(path, ".java") && !strings.Contains(path, "Test.java") { - files = append(files, path) - } - return nil - }) - return files -} - -func (j *BadSmellApp) processFile(path string) *JavaParser { - is, _ := antlr.NewFileStream(path) - lexer := NewJavaLexer(is) - stream := antlr.NewCommonTokenStream(lexer, 0) - parser := NewJavaParser(stream) - return parser -} diff --git a/core/adapter/bs/bad_smell_app_test.go b/core/adapter/bs/bad_smell_app_test.go deleted file mode 100644 index a48cab8595d12b6d9efa4ad16b8ee938ecb92441..0000000000000000000000000000000000000000 --- a/core/adapter/bs/bad_smell_app_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package bs - -import ( - . "github.com/onsi/gomega" - "path/filepath" - "testing" -) - -func TestBadSmellApp_AnalysisPath(t *testing.T) { - g := NewGomegaWithT(t) - - bsApp := NewBadSmellApp() - codePath := "../../../_fixtures/bs" - codePath = filepath.FromSlash(codePath) - - bsList := bsApp.AnalysisPath(codePath, nil) - - g.Expect(len(bsList)).To(Equal(4)) - g.Expect(bsList[0].Bs).To(Equal("complexCondition")) -} diff --git a/core/adapter/bs/models/bs_model.go b/core/adapter/bs/models/bs_model.go deleted file mode 100644 index b95c4bc2e751cf8f0fff9c4d2a2a965e15153ec2..0000000000000000000000000000000000000000 --- a/core/adapter/bs/models/bs_model.go +++ /dev/null @@ -1,87 +0,0 @@ -package models - -type BsJClass struct { - Package string - Class string - Type string - Path string - Extends string - Implements []string - Methods []BsJMethod - MethodCalls []BsJMethodCall - ClassBS ClassBadSmellInfo -} - -type BsJMethodCall struct { - Package string - Type string - Class string - MethodName string - StartLine int - StartLinePosition int - StopLine int - StopLinePosition int -} - -type BsJMethod struct { - Name string - Type string - StartLine int - StartLinePosition int - StopLine int - StopLinePosition int - MethodBody string - Modifier string - Parameters []JFullParameter - MethodBs MethodBadSmellInfo -} - -type MethodBadSmellInfo struct { - IfSize int - SwitchSize int - IfInfo []IfParInfo -} - -type IfParInfo struct { - StartLine int - EndLine int -} - -func NewIfPairInfo() IfParInfo { - return *&IfParInfo{ - StartLine: 0, - EndLine: 0, - } -} - -func NewMethodBadSmellInfo() MethodBadSmellInfo { - return *&MethodBadSmellInfo{ - IfSize: 0, - SwitchSize: 0, - IfInfo: nil, - } -} - -type ClassBadSmellInfo struct { - OverrideSize int - PublicVarSize int -} - -type JFullParameter struct { - Name string - Type string -} - -func NewJFullClassNode() BsJClass { - info := &ClassBadSmellInfo{0, 0} - return *&BsJClass{ - "", - "", - "", - "", - "", - nil, - nil, - nil, - *info} -} diff --git a/core/adapter/call/java_call_app.go b/core/adapter/call/java_call_app.go deleted file mode 100644 index 47d0ce56426c961e1992299a0c359ff56cc7a840..0000000000000000000000000000000000000000 --- a/core/adapter/call/java_call_app.go +++ /dev/null @@ -1,48 +0,0 @@ -package call - -import ( - "fmt" - "github.com/antlr/antlr4/runtime/Go/antlr" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "path/filepath" -) - -type JavaCallApp struct { -} - -func NewJavaCallApp() JavaCallApp { - return *&JavaCallApp{} -} - -func (j *JavaCallApp) AnalysisPath(codeDir string, classes []string, identNodes []models.JIdentifier) []models.JClassNode { - files := support.GetJavaFiles(codeDir) - return j.AnalysisFiles(identNodes, files, classes) -} - -func (j *JavaCallApp) AnalysisFiles(identNodes []models.JIdentifier, files []string, classes []string) []models.JClassNode { - var nodeInfos []models.JClassNode - - var identMap = make(map[string]models.JIdentifier) - for _, ident := range identNodes { - identMap[ident.Package+"."+ident.ClassName] = ident - } - - for _, file := range files { - displayName := filepath.Base(file) - fmt.Println("Start parse java call: " + displayName) - - parser := support.ProcessFile(file) - context := parser.CompilationUnit() - - listener := NewJavaCallListener(identMap, file) - listener.appendClasses(classes) - - antlr.NewParseTreeWalker().Walk(listener, context) - - nodes := listener.getNodeInfo() - nodeInfos = append(nodeInfos, nodes...) - } - - return nodeInfos -} diff --git a/core/adapter/call/java_call_app_test.go b/core/adapter/call/java_call_app_test.go deleted file mode 100644 index 6fc39c066b3239f19c3a240e8f256fbe31ad86ca..0000000000000000000000000000000000000000 --- a/core/adapter/call/java_call_app_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package call - -import ( - . "github.com/onsi/gomega" - "github.com/phodal/coca/core/adapter/identifier" - "github.com/phodal/coca/core/models" - "path/filepath" - "testing" -) - -func TestJavaCallApp_AnalysisPath(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/call" - codePath = filepath.FromSlash(codePath) - - identifierApp := new(identifier.JavaIdentifierApp) - iNodes := identifierApp.AnalysisPath(codePath) - var classes []string = nil - for _, node := range iNodes { - classes = append(classes, node.Package+"."+node.ClassName) - } - - callApp := NewJavaCallApp() - callNodes := callApp.AnalysisPath(codePath, classes, iNodes) - - g.Expect(len(callNodes)).To(Equal(1)) -} - -func TestJavaCallListener_EnterConstructorDeclaration(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/suggest/factory" - codePath = filepath.FromSlash(codePath) - - callNodes := getCallNodes(codePath) - g.Expect(len(callNodes[0].Methods)).To(Equal(3)) -} - -func getCallNodes(codePath string) []models.JClassNode { - identifierApp := new(identifier.JavaIdentifierApp) - iNodes := identifierApp.AnalysisPath(codePath) - var classes []string = nil - for _, node := range iNodes { - classes = append(classes, node.Package+"."+node.ClassName) - } - - callApp := NewJavaCallApp() - - callNodes := callApp.AnalysisPath(codePath, classes, iNodes) - return callNodes -} - -func TestLambda_Express(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/lambda" - codePath = filepath.FromSlash(codePath) - - callNodes := getCallNodes(codePath) - - methodMap := make(map[string]models.JMethod) - for _, c := range callNodes[1].Methods { - methodMap[c.Name] = c - } - - g.Expect(methodMap["save"].MethodCalls[0].MethodName).To(Equal("of")) - g.Expect(methodMap["findById"].MethodCalls[3].MethodName).To(Equal("toDomainModel")) -} - -func TestInterface(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/grammar/interface" - codePath = filepath.FromSlash(codePath) - - callNodes := getCallNodes(codePath) - - g.Expect(true).To(Equal(true)) - methodMap := make(map[string]models.JMethod) - for _, c := range callNodes[0].Methods { - methodMap[c.Name] = c - } - - g.Expect(len(callNodes[0].Methods)).To(Equal(6)) - g.Expect(methodMap["count"].Name).To(Equal("count")) -} \ No newline at end of file diff --git a/core/adapter/helper.go b/core/adapter/helper.go deleted file mode 100644 index aea392a58b76201eb2d88b74de324ccc6c070e71..0000000000000000000000000000000000000000 --- a/core/adapter/helper.go +++ /dev/null @@ -1,71 +0,0 @@ -package adapter - -import ( - "encoding/json" - "github.com/phodal/coca/core/adapter/identifier" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" -) - -func BuildIdentifierMap(identifiers []models.JIdentifier) map[string]models.JIdentifier { - var identifiersMap = make(map[string]models.JIdentifier) - - for _, ident := range identifiers { - identifiersMap[ident.Package+"."+ident.ClassName] = ident - } - return identifiersMap -} - -func LoadIdentify(importPath string) []models.JIdentifier { - var identifiers []models.JIdentifier - - apiContent := support.ReadCocaFile("identify.json") - if apiContent == nil || string(apiContent) == "null" { - identifierApp := new(identifier.JavaIdentifierApp) - ident := identifierApp.AnalysisPath(importPath) - - identModel, _ := json.MarshalIndent(ident, "", "\t") - support.WriteToCocaFile("identify.json", string(identModel)) - - return *&ident - } - _ = json.Unmarshal(apiContent, &identifiers) - - return *&identifiers -} - -func LoadTestIdentify(files []string) []models.JIdentifier { - var identifiers []models.JIdentifier - - apiContent := support.ReadCocaFile("tidentify.json") - - if apiContent == nil || string(apiContent) == "null" { - identifierApp := identifier.NewJavaIdentifierApp() - ident := identifierApp.AnalysisFiles(files) - - identModel, _ := json.MarshalIndent(ident, "", "\t") - support.WriteToCocaFile("tidentify.json", string(identModel)) - - return *&ident - } - _ = json.Unmarshal(apiContent, &identifiers) - - return *&identifiers -} - -func BuildDIMap(identifiers []models.JIdentifier, identifierMap map[string]models.JIdentifier) map[string]string { - var diMap = make(map[string]string) - for _, clz := range identifiers { - if len(clz.Annotations) > 0 { - for _, annotation := range clz.Annotations { - name := annotation.QualifiedName - if (name == "Component" || name == "Repository") && len(clz.Implements) > 0 { - superClz := identifierMap[clz.Implements[0]] - diMap[superClz.Package+"."+superClz.ClassName] = clz.Package + "." + clz.ClassName - } - } - } - } - - return diMap -} diff --git a/core/domain/call_graph/call_graph_test.go b/core/domain/call_graph/call_graph_test.go deleted file mode 100644 index b495e85f19e11a3f6556efe3ef84514cea8049e4..0000000000000000000000000000000000000000 --- a/core/domain/call_graph/call_graph_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package call_graph_test - -import ( - "encoding/json" - . "github.com/onsi/gomega" - "github.com/phodal/coca/core/domain/call_graph" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "path/filepath" - "testing" -) - - -func Test_should_generate_correct_files(t *testing.T) { - g := NewGomegaWithT(t) - - var parsedDeps []models.JClassNode - analyser := call_graph.NewCallGraph() - codePath := "../../../_fixtures/call_api_test.json" - codePath = filepath.FromSlash(codePath) - - file := support.ReadFile(codePath) - _ = json.Unmarshal(file, &parsedDeps) - - dotContent := analyser.Analysis("com.phodal.pholedge.book.BookController.createBook", *&parsedDeps) - - g.Expect(dotContent).To(Equal(`digraph G { -"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.BookFactory.create"; -"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.command.CreateBookCommand.getIsbn"; -"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.command.CreateBookCommand.getName"; -"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.BookRepository.save"; -"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.Book.getId"; -"com.phodal.pholedge.book.BookController.createBook" -> "com.phodal.pholedge.book.BookService.createBook"; -} -`)) - -} diff --git a/core/domain/call_graph/call_model.go b/core/domain/call_graph/call_model.go deleted file mode 100644 index 87c6828cca1e1b46aaa580c626388ea6a23ab8fd..0000000000000000000000000000000000000000 --- a/core/domain/call_graph/call_model.go +++ /dev/null @@ -1,8 +0,0 @@ -package call_graph - -type CallApiCount struct { - HttpMethod string - Uri string - Caller string - Size int -} diff --git a/core/domain/call_graph/rcall/rcall_graph_test.go b/core/domain/call_graph/rcall/rcall_graph_test.go deleted file mode 100644 index 7c8878735ca4b127827c62fa0b786505665af63a..0000000000000000000000000000000000000000 --- a/core/domain/call_graph/rcall/rcall_graph_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package rcall - -import ( - "encoding/json" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "log" - "testing" - - . "github.com/onsi/gomega" -) - -func TestRCallGraph_Analysis(t *testing.T) { - g := NewGomegaWithT(t) - - var parsedDeps []models.JClassNode - analyser := NewRCallGraph() - file := support.ReadFile("../../../../_fixtures/call_api_test.json") - if file == nil { - log.Fatal("lost file") - } - - _ = json.Unmarshal(file, &parsedDeps) - - content := analyser.Analysis("com.phodal.pholedge.book.BookFactory.create", *&parsedDeps) - - g.Expect(content).To(Equal(`digraph G { -rankdir = LR; -edge [dir="back"]; - -} -`)) -} \ No newline at end of file diff --git a/core/domain/evaluate/evaluator/common.go b/core/domain/evaluate/evaluator/common.go deleted file mode 100644 index 7b5f9ec0f5d5f4bd7753a1379de4c35d1839e274..0000000000000000000000000000000000000000 --- a/core/domain/evaluate/evaluator/common.go +++ /dev/null @@ -1,15 +0,0 @@ -package evaluator - -import ( - "fmt" - "github.com/phodal/coca/core/models" -) - -type Common struct { - -} - -func (Common) Evaluate(models.JClassNode) { - fmt.Println("common") -} - diff --git a/core/domain/evaluate/evaluator/empty.go b/core/domain/evaluate/evaluator/empty.go deleted file mode 100644 index 66190bd2f34153d59a715dc856d3abbb5a00c2e8..0000000000000000000000000000000000000000 --- a/core/domain/evaluate/evaluator/empty.go +++ /dev/null @@ -1,17 +0,0 @@ -package evaluator - -import ( - "github.com/phodal/coca/core/models" -) - -type Empty struct { - -} - -func (Empty) Evaluate(*EvaluateModel, models.JClassNode) { - -} - -func (Empty) EvaluateList(*EvaluateModel, []models.JClassNode, map[string]models.JClassNode, []models.JIdentifier) { - -} \ No newline at end of file diff --git a/core/domain/evaluate/evaluator/model.go b/core/domain/evaluate/evaluator/model.go deleted file mode 100644 index d5025082fe477c0da83831b9281d736585fe8a07..0000000000000000000000000000000000000000 --- a/core/domain/evaluate/evaluator/model.go +++ /dev/null @@ -1,14 +0,0 @@ -package evaluator - -import ( - "fmt" - "github.com/phodal/coca/core/models" -) - -type Model struct { - -} - -func (Model) Evaluate(models.JClassNode) { - fmt.Println("model") -} diff --git a/core/domain/suggest/models.go b/core/domain/suggest/models.go deleted file mode 100644 index 82ab90072b135c8e1e2e7c4631dcf375093e7e14..0000000000000000000000000000000000000000 --- a/core/domain/suggest/models.go +++ /dev/null @@ -1,23 +0,0 @@ -package suggest - -import "github.com/phodal/coca/core/models" - -type Suggest struct { - File string - Package string - Class string - Pattern string - Reason string - Size int - Line int -} - -func NewSuggest(clz models.JClassNode, pattern, reason string) Suggest { - return *&Suggest{ - File: clz.Path, - Package: clz.Package, - Class: clz.Class, - Pattern: pattern, - Reason: reason, - } -} diff --git a/core/domain/tbs/tbs_app.go b/core/domain/tbs/tbs_app.go deleted file mode 100644 index ae7ccd6898294b4022388a45b4a6f3b172308073..0000000000000000000000000000000000000000 --- a/core/domain/tbs/tbs_app.go +++ /dev/null @@ -1,94 +0,0 @@ -package tbs - -import ( - "github.com/phodal/coca/core/models" -) - -type TbsApp struct { -} - -func NewTbsApp() *TbsApp { - return &TbsApp{} -} - -type TestBadSmell struct { - FileName string - Type string - Description string - Line int -} - -func (a TbsApp) AnalysisPath(deps []models.JClassNode, identifiersMap map[string]models.JIdentifier) []TestBadSmell { - var results []TestBadSmell = nil - - for _, clz := range deps { - // TODO refactoring identify & annotation - for _, method := range clz.Methods { - for _, annotation := range method.Annotations { - checkIgnoreTest(clz.Path, annotation, &results) - checkEmptyTest(clz.Path, annotation, &results, method) - } - - for _, methodCall := range method.MethodCalls { - checkRedundantPrintTest(clz.Path, methodCall, &results) - checkUnknownTest(clz.Path, methodCall, &results) - } - } - } - - return results -} - -func checkUnknownTest(path string, method models.JMethodCall, results *[]TestBadSmell) { - if method.MethodName == "sleep" && method.Class == "Thread" { - tbs := *&TestBadSmell{ - FileName: path, - Type: "SleepyTest", - Description: "", - Line: 0, - } - - *results = append(*results, tbs) - } -} - -func checkRedundantPrintTest(path string, mCall models.JMethodCall, results *[]TestBadSmell) { - if mCall.Class == "System.out" && (mCall.MethodName == "println" || mCall.MethodName == "printf" || mCall.MethodName == "print") { - tbs := *&TestBadSmell{ - FileName: path, - Type: "RedundantPrintTest", - Description: "", - Line: 0, - } - - *results = append(*results, tbs) - } -} - -func checkEmptyTest(path string, annotation models.Annotation, results *[]TestBadSmell, method models.JMethod) { - if annotation.QualifiedName == "Test" { - if len(method.MethodCalls) <= 1 { - tbs := *&TestBadSmell{ - FileName: path, - Type: "EmptyTest", - Description: "", - Line: 0, - } - - *results = append(*results, tbs) - } - } -} - -func checkIgnoreTest(clzPath string, annotation models.Annotation, results *[]TestBadSmell) { - if annotation.QualifiedName == "Ignore" { - tbs := *&TestBadSmell{ - FileName: clzPath, - Type: "IgnoreTest", - Description: "", - Line: 0, - } - - *results = append(*results, tbs) - } -} diff --git a/core/domain/tbs/tbs_app_test.go b/core/domain/tbs/tbs_app_test.go deleted file mode 100644 index 75763f6b13a61996d35f31c86d9d49c0da36500e..0000000000000000000000000000000000000000 --- a/core/domain/tbs/tbs_app_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package tbs - -import ( - . "github.com/onsi/gomega" - "github.com/phodal/coca/core/adapter" - "github.com/phodal/coca/core/adapter/call" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "path/filepath" - "testing" -) - -func TestTbsApp_EmptyTest(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/tbs/code/EmptyTest.java" - codePath = filepath.FromSlash(codePath) - result := buildTbsResult(codePath) - - g.Expect(len(result)).To(Equal(1)) - g.Expect(result[0].Type).To(Equal("EmptyTest")) -} - -func TestTbsApp_IgnoreTest(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/tbs/code/IgnoreTest.java" - codePath = filepath.FromSlash(codePath) - result := buildTbsResult(codePath) - - g.Expect(len(result)).To(Equal(1)) - g.Expect(result[0].Type).To(Equal("IgnoreTest")) -} - -func TestTbsApp_RedundantPrintTest(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/tbs/code/RedundantPrintTest.java" - codePath = filepath.FromSlash(codePath) - result := buildTbsResult(codePath) - - g.Expect(result[0].Type).To(Equal("RedundantPrintTest")) -} - -func TestTbsApp_SleepyTest(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/tbs/code/SleepyTest.java" - codePath = filepath.FromSlash(codePath) - result := buildTbsResult(codePath) - - g.Expect(result[0].Type).To(Equal("SleepyTest")) -} - -func buildTbsResult(codePath string) []TestBadSmell { - files := support.GetJavaTestFiles(codePath) - var identifiers []models.JIdentifier - - identifiers = adapter.LoadTestIdentify(files) - identifiersMap := adapter.BuildIdentifierMap(identifiers) - - var classes []string = nil - for _, node := range identifiers { - classes = append(classes, node.Package+"."+node.ClassName) - } - - analysisApp := call.NewJavaCallApp() - classNodes := analysisApp.AnalysisFiles(identifiers, files, classes) - - app := NewTbsApp() - result := app.AnalysisPath(classNodes, identifiersMap) - return result -} \ No newline at end of file diff --git a/core/domain/todo/empty_listener.go b/core/domain/todo/empty_listener.go deleted file mode 100644 index ab168713cae57425e78401513c2923d5c3423361..0000000000000000000000000000000000000000 --- a/core/domain/todo/empty_listener.go +++ /dev/null @@ -1,11 +0,0 @@ -package todo - -import parser "github.com/phodal/coca/languages/java" - -type EmptyListener struct { - parser.BaseJavaParserListener -} - -func NewEmptyListener() *EmptyListener { - return &EmptyListener{} -} diff --git a/core/domain/todo/todo_app_test.go b/core/domain/todo/todo_app_test.go deleted file mode 100644 index ae795cad5336acff081fa07cc51df5700a9f2010..0000000000000000000000000000000000000000 --- a/core/domain/todo/todo_app_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package todo - -import ( - . "github.com/onsi/gomega" - "path/filepath" - "testing" -) - -func TestNewTodoApp(t *testing.T) { - g := NewGomegaWithT(t) - - codePath := "../../../_fixtures/todo" - codePath = filepath.FromSlash(codePath) - app := NewTodoApp() - - stodos := app.AnalysisPath(codePath) - todos := app.BuildWithGitHistory(stodos) - - g.Expect(todos[0].Line).To(Equal("6")) - //g.Expect(todos[0].Date).To(Equal("2019-12-28")) test: will failure in CI - g.Expect(todos[0].FileName).To(ContainSubstring(filepath.FromSlash("_fixtures/todo/Toodo.java"))) - g.Expect(todos[0].Author).To(ContainSubstring("Phodal Huang")) - g.Expect(todos[1].Line).To(Equal("13")) - g.Expect(todos[1].Message[0]).To(Equal("add more content")) - g.Expect(todos[1].Assignee).To(Equal("phodal")) -} diff --git a/core/models/jclass_node.go b/core/models/jclass_node.go deleted file mode 100644 index 2941abe159c5455ac2279085e08093dd4a0a6a5d..0000000000000000000000000000000000000000 --- a/core/models/jclass_node.go +++ /dev/null @@ -1,23 +0,0 @@ -package models - -type JClassNode struct { - Package string - Class string - Type string - Path string - Fields []JAppField - Methods []JMethod - MethodCalls []JMethodCall - Extend string - Implements []string - Annotations []Annotation -} - -type JAppField struct { - Type string - Value string -} - -func NewClassNode() JClassNode { - return *&JClassNode{"", "", "", "", nil, nil, nil, "", nil, nil} -} diff --git a/core/models/jidentifier.go b/core/models/jidentifier.go deleted file mode 100644 index 2bcc06dde29d8e81c097946921b544bdcb188ef4..0000000000000000000000000000000000000000 --- a/core/models/jidentifier.go +++ /dev/null @@ -1,28 +0,0 @@ -package models - -var methods []JMethod - -type JIdentifier struct { - Package string - ClassName string - ClassType string - ExtendsName string - Extends []string - Implements []string - Methods []JMethod - Annotations []Annotation -} - -func NewJIdentifier() *JIdentifier { - identifier := &JIdentifier{"", "", "", "", nil, nil, nil, nil} - methods = nil - return identifier -} - -func (identifier *JIdentifier) AddMethod(method JMethod) { - methods = append(methods, method) -} - -func (identifier *JIdentifier) GetMethods() []JMethod { - return methods -} diff --git a/core/models/jmethod.go b/core/models/jmethod.go deleted file mode 100644 index a0b9c9e9e5c0d23d0262e6fee4ad73f17d0ba756..0000000000000000000000000000000000000000 --- a/core/models/jmethod.go +++ /dev/null @@ -1,62 +0,0 @@ -package models - -type JMethod struct { - Name string - Type string - StartLine int - StartLinePosition int - StopLine int - StopLinePosition int - Parameters []JParameter - MethodCalls []JMethodCall - Override bool - Annotations []Annotation - IsConstructor bool - IsReturnNull bool - Modifiers []string -} - -type Annotation struct { - QualifiedName string - ValuePairs []AnnotationKeyValue -} - -type AnnotationKeyValue struct { - Key string - Value string -} - -func NewAnnotation() Annotation { - return *&Annotation{ - QualifiedName: "", - ValuePairs: nil, - } -} - -// TODO support annnotation -func NewJMethod() JMethod { - return *&JMethod{ - Name: "", - Type: "", - Annotations: nil, - StartLine: 0, - StartLinePosition: 0, - StopLine: 0, - StopLinePosition: 0, - Parameters: nil, - MethodCalls: nil, - IsConstructor: false, - } -} - -type JParameter struct { - Name string - Type string -} - -type JMethodInfo struct { - Name string - Type string - Parameters []JParameter - Length string -} diff --git a/core/models/jmethod_call.go b/core/models/jmethod_call.go deleted file mode 100644 index d4c4a3b5c321f58885a59dbae4c480b130d5173b..0000000000000000000000000000000000000000 --- a/core/models/jmethod_call.go +++ /dev/null @@ -1,25 +0,0 @@ -package models - -type JMethodCall struct { - Package string - Type string - Class string - MethodName string - StartLine int - StartLinePosition int - StopLine int - StopLinePosition int -} - -func NewJMethodCall() JMethodCall { - return *&JMethodCall{ - Package: "", - Type: "", - Class: "", - MethodName: "", - StartLine: 0, - StartLinePosition: 0, - StopLine: 0, - StopLinePosition: 0, - } -} \ No newline at end of file diff --git a/defines/go.coca.yml b/defines/go.coca.yml new file mode 100644 index 0000000000000000000000000000000000000000..4d909e4e2da5ac2ff5bd3f3005b83964b2205a3a --- /dev/null +++ b/defines/go.coca.yml @@ -0,0 +1,6 @@ +# Java Coca Define +asserts: assertThat, assert, AssertPanic +prints: + - fmt::Println + - fmt::Fprintln + - fmt::Sprintf diff --git a/defines/java.coca.yml b/defines/java.coca.yml new file mode 100644 index 0000000000000000000000000000000000000000..a3ffbda8da4e93789fb51dab1c6e0b740e0dea71 --- /dev/null +++ b/defines/java.coca.yml @@ -0,0 +1,6 @@ +# Java Coca Define +asserts: assertThat, assert +prints: + - System.out::println + - System.out::printf + - System.out::print diff --git a/docs/README.md b/docs/README.md index e4fa8875000cd7ca246d66549b939773a26a4dc9..500f1b2625546d3c37e9d798a30101904de095a2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,4 +5,8 @@ - optimization import. - rename field. - move method. - \ No newline at end of file + + +## Go Domain + +Go To JavaScript: https://github.com/gopherjs/gopherjs \ No newline at end of file diff --git "a/docs/adr/0001-api-\346\211\253\346\217\217\345\222\214\346\225\260\346\215\256\345\272\223\347\273\223\346\236\204.md" b/docs/adr/0001-api-scan-sql.md similarity index 81% rename from "docs/adr/0001-api-\346\211\253\346\217\217\345\222\214\346\225\260\346\215\256\345\272\223\347\273\223\346\236\204.md" rename to docs/adr/0001-api-scan-sql.md index 3b3f3b2cd020fe51e16e415bd664c378523d20fb..f501f951f960f3da3b76b9116ada68e21c28f172 100644 --- "a/docs/adr/0001-api-\346\211\253\346\217\217\345\222\214\346\225\260\346\215\256\345\272\223\347\273\223\346\236\204.md" +++ b/docs/adr/0001-api-scan-sql.md @@ -1,4 +1,4 @@ -# 1. Api 扫描和数据库结构 +# 1. Api scan SQL Date: 2019-11-07 diff --git "a/docs/adr/0002-spring-mvc-to-spring-boot-\350\275\254\347\247\273\345\267\245\347\250\213.md" b/docs/adr/0002-spring-mvc-to-spring-boot-transform.md similarity index 77% rename from "docs/adr/0002-spring-mvc-to-spring-boot-\350\275\254\347\247\273\345\267\245\347\250\213.md" rename to docs/adr/0002-spring-mvc-to-spring-boot-transform.md index 0f24c7cf1db0fa49d92a9301b8f34a1a7efb8f2b..1c93bd97aad770e87bcba0b06b649b3c915e551e 100644 --- "a/docs/adr/0002-spring-mvc-to-spring-boot-\350\275\254\347\247\273\345\267\245\347\250\213.md" +++ b/docs/adr/0002-spring-mvc-to-spring-boot-transform.md @@ -1,4 +1,4 @@ -# 2. Spring MVC to Spring Boot 转移工程 +# 2. Spring MVC to Spring Boot transform Date: 2019-11-18 diff --git a/docs/adr/0004-handidraw-graphviz.md b/docs/adr/0004-handidraw-graphviz.md index e4cecbebcef788be5b0715f3f5208be0f11a32f9..2059e68eab83eb71c65f37aeec1b1082007ec3b4 100644 --- a/docs/adr/0004-handidraw-graphviz.md +++ b/docs/adr/0004-handidraw-graphviz.md @@ -6,6 +6,8 @@ Date: 2019-12-17 2019-12-17 proposed +2020-11-04 deprecated + ## Context Examples: https://github.com/aivarsk/scruffy diff --git a/docs/adr/0005-evaluate-api.md b/docs/adr/0005-evaluate-api.md index c5e7aee706d4bf2c14fa00c5efc1be5d14de82f3..07fb72df4c24b64e3c83305fdc35f0d919d030fa 100644 --- a/docs/adr/0005-evaluate-api.md +++ b/docs/adr/0005-evaluate-api.md @@ -5,6 +5,7 @@ Date: 2019-12-17 ## Status 2019-12-17 proposed +2020-01-01 done ## Context diff --git a/docs/adr/0006-support-adapter-to-cli-framework.md b/docs/adr/0006-support-adapter-to-cli-framework.md index e89dfb72f58202523253c22b1792dc3b8ec27674..40b63ff9638039f2b23fabf32f3b229b7498a673 100644 --- a/docs/adr/0006-support-adapter-to-cli-framework.md +++ b/docs/adr/0006-support-adapter-to-cli-framework.md @@ -5,6 +5,7 @@ Date: 2019-12-21 ## Status 2019-12-21 proposed +2020-01-01 done ## Context diff --git a/docs/adr/0007-practise-go-patterns-in-coca.md b/docs/adr/0007-practise-go-patterns-in-coca.md index c8a6d8b315b6dcc6b5da001d94d5110928aab072..1a3806dc94b55dd994ba999e758f2ac082ec07ea 100644 --- a/docs/adr/0007-practise-go-patterns-in-coca.md +++ b/docs/adr/0007-practise-go-patterns-in-coca.md @@ -6,6 +6,8 @@ Date: 2019-12-23 2019-12-23 proposed +2020-11-04 done + ## Context A curated collection of idiomatic design & application patterns for Go language. diff --git a/docs/adr/0009-git-tell-file-history.md b/docs/adr/0009-git-tell-file-history.md index 263c5845f449badf88f7cc6adf4baebafef9e4a2..0d01930c83b97fec5d7bd9e47949896bdd7218e2 100644 --- a/docs/adr/0009-git-tell-file-history.md +++ b/docs/adr/0009-git-tell-file-history.md @@ -5,6 +5,7 @@ Date: 2019-12-25 ## Status 2019-12-25 proposed +2020-01-01 done ## Context diff --git a/docs/adr/0010-pluginable.md b/docs/adr/0010-pluginable.md new file mode 100644 index 0000000000000000000000000000000000000000..4eeddc5a9e048d9b4e35962a9644d3e8029a9fa6 --- /dev/null +++ b/docs/adr/0010-pluginable.md @@ -0,0 +1,22 @@ +# 10. pluginable + +Date: 2020-01-02 + +## Status + +2020-01-02 proposed + +## Context + +Some resources: + +1. https://medium.com/nordcloud-engineering/how-to-build-pluggable-golang-application-and-benefit-from-aws-lambda-layers-154c8117df9b +2. https://medium.com/learning-the-go-programming-language/writing-modular-go-programs-with-plugins-ec46381ee1a9 + +## Decision + +Decision here... + +## Consequences + +Consequences here... diff --git a/docs/adr/0011-module-treemap-visualization.md b/docs/adr/0011-module-treemap-visualization.md new file mode 100644 index 0000000000000000000000000000000000000000..70c5ff855dbdef7811c162d572f0f41de2b0aefa --- /dev/null +++ b/docs/adr/0011-module-treemap-visualization.md @@ -0,0 +1,23 @@ +# 11. module treemap visualization + +Date: 2020-01-02 + +## Status + +2020-01-02 proposed + +## Context + +Context here... + +examples: https://www.npmjs.com/package/webpack-bundle-analyzer + +A Golang Examples: https://github.com/willpoint/treemap/blob/master/treemap.go + +## Decision + +Decision here... + +## Consequences + +Consequences here... diff --git a/docs/adr/0012-check-dependence-usage-for-module-seperate.md b/docs/adr/0012-check-dependence-usage-for-module-seperate.md new file mode 100644 index 0000000000000000000000000000000000000000..1fda3b9ef1cb8b549b3cbfb29b99b5de19ef4e4d --- /dev/null +++ b/docs/adr/0012-check-dependence-usage-for-module-seperate.md @@ -0,0 +1,20 @@ +# 12. check dependence usage for module seperate + +Date: 2020-01-03 + +## Status + +2020-01-03 proposed + +## Context + + - Groovy + - Antlr 插件化 + +## Decision + +Decision here... + +## Consequences + +Consequences here... diff --git a/docs/adr/0013-performance-issue-for-antlar.md b/docs/adr/0013-performance-issue-for-antlar.md new file mode 100644 index 0000000000000000000000000000000000000000..66ffaae10b9b932c94fe2a2e86630d06b5a449b2 --- /dev/null +++ b/docs/adr/0013-performance-issue-for-antlar.md @@ -0,0 +1,21 @@ +# 13. performance issue for antlr + +Date: 2020-01-12 + +## Status + +2020-01-12 proposed + +2020-11-04 deprecated + +## Context + +Context here... + +## Decision + +Decision here... + +## Consequences + +Consequences here... diff --git a/docs/adr/0014-improve-cloc-summary.md b/docs/adr/0014-improve-cloc-summary.md new file mode 100644 index 0000000000000000000000000000000000000000..83f846723c61b96093d1abd8859a109e11eb481e --- /dev/null +++ b/docs/adr/0014-improve-cloc-summary.md @@ -0,0 +1,21 @@ +# 14. improve cloc summary + +Date: 2020-11-04 + +## Status + +2020-11-04 proposed + +2020-11-04 done + +## Context + +Context here... + +## Decision + + - exclude `coca_reporter` + +## Consequences + +Consequences here... diff --git a/docs/adr/0015-light-weight-coca.md b/docs/adr/0015-light-weight-coca.md new file mode 100644 index 0000000000000000000000000000000000000000..5443e0b1dbf0977c6ed88bf993b8fd06093dbefa --- /dev/null +++ b/docs/adr/0015-light-weight-coca.md @@ -0,0 +1,36 @@ +# 15. light weight coca + +Date: 2020-11-04 + +## Status + +2020-11-04 proposed + +## Context + +For a lots situation, we don't need to visit code, just by git & cloc, we can build most information. In this case, we +need a light version with Coca. + +For this version, it can support those features: + +1. analysis code from top to bottom with `cloc`. +2. analysis todo with antlr4 +3. analysis git history with `git` +4. analysis `imports` for major languages: + - c++ + - golang + - java + - kotlin + - javascript + +if we need more useful features, we can also do: + +1. analysis dependencies + +## Decision + +Decision here... + +## Consequences + +Consequences here... diff --git a/docs/adr/0016-git-branch-analysis.md b/docs/adr/0016-git-branch-analysis.md new file mode 100644 index 0000000000000000000000000000000000000000..75c10664d761b2ab8893f6fec34ad744ff95de17 --- /dev/null +++ b/docs/adr/0016-git-branch-analysis.md @@ -0,0 +1,21 @@ +# 16. git branch analysis + +Date: 2020-11-05 + +## Status + +2020-11-05 proposed + +## Context + +Context here... + +## Decision + +| branch name | create date | last modified date | duration | +|-------------|-------------|---------------------|------------| +| | | | | + +## Consequences + +Consequences here... diff --git a/docs/adr/README.md b/docs/adr/README.md index 56b64efc7ba51508386d168cc685d40bc4552768..5359bc712a3686baa68cd68baa35d141f771f24d 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -1,11 +1,18 @@ # Architecture Decision Records -* [1. api-扫描和数据库结构](0001-api-扫描和数据库结构.md) -* [2. spring-mvc-to-spring-boot-转移工程](0002-spring-mvc-to-spring-boot-转移工程.md) +* [1. api-scan-sql](0001-api-scan-sql.md) +* [2. spring-mvc-to-spring-boot-transform](0002-spring-mvc-to-spring-boot-transform.md) * [3. api-identify](0003-api-identify.md) * [4. handidraw-graphviz](0004-handidraw-graphviz.md) * [5. evaluate-api](0005-evaluate-api.md) * [6. support-adapter-to-cli-framework](0006-support-adapter-to-cli-framework.md) * [7. practise-go-patterns-in-coca](0007-practise-go-patterns-in-coca.md) * [8. testable-evaluate](0008-testable-evaluate.md) -* [9. git-tell-file-history](0009-git-tell-file-history.md) \ No newline at end of file +* [9. git-tell-file-history](0009-git-tell-file-history.md) +* [10. pluginable](0010-pluginable.md) +* [11. module-treemap-visualization](0011-module-treemap-visualization.md) +* [12. check-dependence-usage-for-module-seperate](0012-check-dependence-usage-for-module-seperate.md) +* [13. performance-issue-for-antlar](0013-performance-issue-for-antlar.md) +* [14. improve-cloc-summary](0014-improve-cloc-summary.md) +* [15. light-weight-coca](0015-light-weight-coca.md) +* [16. git-branch-analysis](0016-git-branch-analysis.md) diff --git a/docs/compare/.gitignore b/docs/compare/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..eb5a316cbd195d26e3f768c7dd8e1b47299e17f8 --- /dev/null +++ b/docs/compare/.gitignore @@ -0,0 +1 @@ +target diff --git a/docs/compare/pom.xml b/docs/compare/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..8847acbdfb9a0047421ed50ce143a747249e909d --- /dev/null +++ b/docs/compare/pom.xml @@ -0,0 +1,67 @@ + + 4.0.0 + + coca.compare + coca_compare + 1.0 + jar + + compare + http://maven.apache.org + + + UTF-8 + true + true + + + + + org.antlr + antlr4-runtime + 4.7 + + + org.junit.jupiter + junit-jupiter-engine + 5.5.2 + test + + + org.junit.jupiter + junit-jupiter-api + 5.5.2 + compile + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + + + diff --git a/docs/compare/src/main/java/com/compare/PythonIdentApp.java b/docs/compare/src/main/java/com/compare/PythonIdentApp.java new file mode 100644 index 0000000000000000000000000000000000000000..9ccad7494a8a131c57af9a956a29ca94f1d18c74 --- /dev/null +++ b/docs/compare/src/main/java/com/compare/PythonIdentApp.java @@ -0,0 +1,21 @@ +package com.compare; + +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTreeWalker; +import pyantlr.PythonLexer; +import pyantlr.PythonParser; + +public class PythonIdentApp { + static void processString(String inputStr) { + CharStream stream = CharStreams.fromString(inputStr);; + PythonLexer lexer = new PythonLexer(stream); + CommonTokenStream tokens = new CommonTokenStream(lexer); + PythonParser parser = new PythonParser(tokens); + PythonParser.RootContext tree = parser.root(); // see the grammar -> + + PythonIdentListener pythonIdentListener = new PythonIdentListener(); + ParseTreeWalker.DEFAULT.walk(pythonIdentListener, tree); + } +} diff --git a/docs/compare/src/main/java/com/compare/PythonIdentListener.java b/docs/compare/src/main/java/com/compare/PythonIdentListener.java new file mode 100644 index 0000000000000000000000000000000000000000..82deb71c1ea69542c21a9a6aa98e0d3ba2a42536 --- /dev/null +++ b/docs/compare/src/main/java/com/compare/PythonIdentListener.java @@ -0,0 +1,17 @@ +package com.compare; + +import pyantlr.PythonParser; +import pyantlr.PythonParserBaseListener; + +public class PythonIdentListener extends PythonParserBaseListener { + @Override + public void enterSingle_input(PythonParser.Single_inputContext ctx) { + super.enterSingle_input(ctx); + } + + @Override + public void enterClassdef(PythonParser.ClassdefContext ctx) { + System.out.println(ctx.name().getText()); + super.enterClassdef(ctx); + } +} diff --git a/docs/compare/src/main/java/com/compare/TsIdentApp.java b/docs/compare/src/main/java/com/compare/TsIdentApp.java new file mode 100644 index 0000000000000000000000000000000000000000..ec5d40520acb9e2a5a67b2a2a91ffeafa0d74f0a --- /dev/null +++ b/docs/compare/src/main/java/com/compare/TsIdentApp.java @@ -0,0 +1,23 @@ +package com.compare; + +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.tree.ParseTreeWalker; +import pyantlr.PythonLexer; +import pyantlr.PythonParser; +import tsantlr.TypeScriptLexer; +import tsantlr.TypeScriptParser; + +public class TsIdentApp { + static void processString(String inputStr) { + CharStream stream = CharStreams.fromString(inputStr);; + TypeScriptLexer lexer = new TypeScriptLexer(stream); + CommonTokenStream tokens = new CommonTokenStream(lexer); + TypeScriptParser parser = new TypeScriptParser(tokens); + TypeScriptParser.ProgramContext tree = parser.program(); + + TsIdentListener listener = new TsIdentListener(); + ParseTreeWalker.DEFAULT.walk(listener, tree); + } +} diff --git a/docs/compare/src/main/java/com/compare/TsIdentListener.java b/docs/compare/src/main/java/com/compare/TsIdentListener.java new file mode 100644 index 0000000000000000000000000000000000000000..8816453066b604dd2b4c75f9af866b6f94af6668 --- /dev/null +++ b/docs/compare/src/main/java/com/compare/TsIdentListener.java @@ -0,0 +1,11 @@ +package com.compare; + +import tsantlr.TypeScriptParser; +import tsantlr.TypeScriptParserBaseListener; + +public class TsIdentListener extends TypeScriptParserBaseListener { + @Override + public void enterClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx) { + super.enterClassDeclaration(ctx); + } +} diff --git a/docs/compare/src/main/java/com/compare/main.java b/docs/compare/src/main/java/com/compare/main.java new file mode 100644 index 0000000000000000000000000000000000000000..d117ed2fb920e29f5a74c6b177e43ed798634fa7 --- /dev/null +++ b/docs/compare/src/main/java/com/compare/main.java @@ -0,0 +1,7 @@ +package com.compare; + +public class main { + public static void main(String[] args) { + + } +} diff --git a/docs/compare/src/main/java/pyantlr/PythonBaseLexer.java b/docs/compare/src/main/java/pyantlr/PythonBaseLexer.java new file mode 100644 index 0000000000000000000000000000000000000000..6492fbdc91549613383c323dd4c6f5b42c6d6f53 --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonBaseLexer.java @@ -0,0 +1,188 @@ +package pyantlr; + +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CommonToken; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.Token; + +import java.util.Stack; + +public abstract class PythonBaseLexer extends Lexer { + public static int TabSize = 8; + + // The amount of opened braces, brackets and parenthesis. + private int _opened; + + // The stack that keeps track of the indentation level. + private Stack _indents = new Stack<>(); + + // A circular buffer where extra tokens are pushed on (see the NEWLINE and WS lexer rules). + private int _firstTokensInd; + private int _lastTokenInd; + private Token[] _buffer = new Token[32]; + private Token _lastToken; + + protected PythonBaseLexer(CharStream input) { + super(input); + } + + @Override + public void emit(Token token) { + super.setToken(token); + + if (_buffer[_firstTokensInd] != null) + { + _lastTokenInd = IncTokenInd(_lastTokenInd); + + if (_lastTokenInd == _firstTokensInd) + { + // Enlarge buffer + Token[] newArray = new Token[_buffer.length * 2]; + int destInd = newArray.length - (_buffer.length - _firstTokensInd); + + System.arraycopy(_buffer, 0, newArray, 0, _firstTokensInd); + System.arraycopy(_buffer, _firstTokensInd, newArray, destInd, _buffer.length - _firstTokensInd); + + _firstTokensInd = destInd; + _buffer = newArray; + } + } + + _buffer[_lastTokenInd] = token; + _lastToken = token; + } + + @Override + public Token nextToken() { + // Check if the end-of-file is ahead and there are still some DEDENTS expected. + if (_input.LA(1) == EOF && _indents.size() > 0) + { + if (_buffer[_lastTokenInd] == null || _buffer[_lastTokenInd].getType() != PythonLexer.LINE_BREAK) + { + // First emit an extra line break that serves as the end of the statement. + emit(PythonLexer.LINE_BREAK); + } + + // Now emit as much DEDENT tokens as needed. + while (_indents.size() != 0) + { + emit(PythonLexer.DEDENT); + _indents.pop(); + } + } + + Token next = super.nextToken(); + + if (_buffer[_firstTokensInd] == null) + { + return next; + } + + Token result = _buffer[_firstTokensInd]; + _buffer[_firstTokensInd] = null; + + if (_firstTokensInd != _lastTokenInd) + { + _firstTokensInd = IncTokenInd(_firstTokensInd); + } + + return result; + } + + protected void HandleNewLine() { + emit(PythonLexer.NEWLINE, HIDDEN, getText()); + + char next = (char) _input.LA(1); + + // Process whitespaces in HandleSpaces + if (next != ' ' && next != '\t' && IsNotNewLineOrComment(next)) + { + ProcessNewLine(0); + } + } + + protected void HandleSpaces() { + char next = (char) _input.LA(1); + + if ((_lastToken == null || _lastToken.getType() == PythonLexer.NEWLINE) && IsNotNewLineOrComment(next)) + { + // Calculates the indentation of the provided spaces, taking the + // following rules into account: + // + // "Tabs are replaced (from left to right) by one to eight spaces + // such that the total number of characters up to and including + // the replacement is a multiple of eight [...]" + // + // -- https://docs.python.org/3.1/reference/lexical_analysis.html#indentation + + int indent = 0; + String text = getText(); + + for (int i = 0; i < text.length(); i++) { + if (text.charAt(i) == '\t') { + indent = indent + TabSize - indent % TabSize; + } else { + indent = indent + 1; + } + } + + ProcessNewLine(indent); + } + + emit(PythonLexer.WS, HIDDEN, getText()); + } + + protected void IncIndentLevel() { + _opened++; + } + + protected void DecIndentLevel() { + if (_opened > 0) { + --_opened; + } + } + + private boolean IsNotNewLineOrComment(char next) { + return _opened == 0 && next != '\r' && next != '\n' && next != '\f' && next != '#'; + } + + private void ProcessNewLine(int indent) { + emit(PythonLexer.LINE_BREAK); + + int previous = _indents.size() == 0 ? 0 : _indents.peek(); + + if (indent > previous) + { + _indents.push(indent); + emit(PythonLexer.INDENT); + } + else + { + // Possibly emit more than 1 DEDENT token. + while (_indents.size() != 0 && _indents.peek() > indent) + { + emit(PythonLexer.DEDENT); + _indents.pop(); + } + } + } + + private int IncTokenInd(int ind) { + return (ind + 1) % _buffer.length; + } + + private void emit(int tokenType) { + emit(tokenType, DEFAULT_TOKEN_CHANNEL, ""); + } + + private void emit(int tokenType, int channel, String text) { + int charIndex = getCharIndex(); + CommonToken token = new CommonToken(_tokenFactorySourcePair, tokenType, channel, charIndex - text.length(), charIndex); + token.setLine(getLine()); + token.setCharPositionInLine(getCharPositionInLine()); + token.setText(text); + + emit(token); + } +} + diff --git a/docs/compare/src/main/java/pyantlr/PythonBaseParser.java b/docs/compare/src/main/java/pyantlr/PythonBaseParser.java new file mode 100644 index 0000000000000000000000000000000000000000..706432d2d5755997201585fc71a947cc6d1840b3 --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonBaseParser.java @@ -0,0 +1,26 @@ +package pyantlr; + +import org.antlr.v4.runtime.Parser; +import org.antlr.v4.runtime.TokenStream; + +public abstract class PythonBaseParser extends Parser +{ + public PythonVersion Version = PythonVersion.Autodetect; + + protected PythonBaseParser(TokenStream input) { + super(input); + } + + protected boolean CheckVersion(int version) { + return Version == PythonVersion.Autodetect || version == Version.getValue(); + } + + protected void SetVersion(int requiredVersion) { + if (requiredVersion == 2) { + Version = PythonVersion.Python2; + } else if (requiredVersion == 3) { + Version = PythonVersion.Python3; + } + } +} + diff --git a/docs/compare/src/main/java/pyantlr/PythonLexer.interp b/docs/compare/src/main/java/pyantlr/PythonLexer.interp new file mode 100644 index 0000000000000000000000000000000000000000..e1b643b959d668c69425b508151be022e4d1ec75 --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonLexer.interp @@ -0,0 +1,329 @@ +token literal names: +null +null +null +null +'def' +'return' +'raise' +'from' +'import' +'nonlocal' +'as' +'global' +'assert' +'if' +'elif' +'else' +'while' +'for' +'in' +'try' +'None' +'finally' +'with' +'except' +'lambda' +'or' +'and' +'not' +'is' +'class' +'yield' +'del' +'pass' +'continue' +'break' +'async' +'await' +'print' +'exec' +'True' +'False' +'.' +'...' +'`' +'*' +',' +':' +';' +'**' +'=' +'|' +'^' +'&' +'<<' +'>>' +'+' +'-' +'/' +'%' +'//' +'~' +'<' +'>' +'==' +'>=' +'<=' +'<>' +'!=' +'@' +'->' +'+=' +'-=' +'*=' +'@=' +'/=' +'%=' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'**=' +'//=' +null +null +null +null +null +null +null +'(' +')' +'{' +'}' +'[' +']' +null +null +null +null +null + +token symbolic names: +null +INDENT +DEDENT +LINE_BREAK +DEF +RETURN +RAISE +FROM +IMPORT +NONLOCAL +AS +GLOBAL +ASSERT +IF +ELIF +ELSE +WHILE +FOR +IN +TRY +NONE +FINALLY +WITH +EXCEPT +LAMBDA +OR +AND +NOT +IS +CLASS +YIELD +DEL +PASS +CONTINUE +BREAK +ASYNC +AWAIT +PRINT +EXEC +TRUE +FALSE +DOT +ELLIPSIS +REVERSE_QUOTE +STAR +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +STRING +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +IMAG_NUMBER +FLOAT_NUMBER +OPEN_PAREN +CLOSE_PAREN +OPEN_BRACE +CLOSE_BRACE +OPEN_BRACKET +CLOSE_BRACKET +NAME +LINE_JOIN +NEWLINE +WS +COMMENT + +rule names: +DEF +RETURN +RAISE +FROM +IMPORT +NONLOCAL +AS +GLOBAL +ASSERT +IF +ELIF +ELSE +WHILE +FOR +IN +TRY +NONE +FINALLY +WITH +EXCEPT +LAMBDA +OR +AND +NOT +IS +CLASS +YIELD +DEL +PASS +CONTINUE +BREAK +ASYNC +AWAIT +PRINT +EXEC +TRUE +FALSE +DOT +ELLIPSIS +REVERSE_QUOTE +STAR +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +STRING +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +IMAG_NUMBER +FLOAT_NUMBER +OPEN_PAREN +CLOSE_PAREN +OPEN_BRACE +CLOSE_BRACE +OPEN_BRACKET +CLOSE_BRACKET +NAME +LINE_JOIN +NEWLINE +WS +COMMENT +SHORT_STRING +LONG_STRING +LONG_STRING_ITEM +RN +EXPONENT_OR_POINT_FLOAT +POINT_FLOAT +SHORT_BYTES +LONG_BYTES +LONG_BYTES_ITEM +SHORT_BYTES_CHAR_NO_SINGLE_QUOTE +SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE +LONG_BYTES_CHAR +BYTES_ESCAPE_SEQ +ID_CONTINUE +ID_START + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 102, 856, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 5, 81, 545, 10, 81, 3, 81, 3, 81, 5, 81, 549, 10, 81, 5, 81, 551, 10, 81, 3, 81, 3, 81, 5, 81, 555, 10, 81, 3, 81, 3, 81, 5, 81, 559, 10, 81, 3, 81, 3, 81, 5, 81, 563, 10, 81, 3, 81, 3, 81, 5, 81, 567, 10, 81, 5, 81, 569, 10, 81, 3, 82, 3, 82, 7, 82, 573, 10, 82, 12, 82, 14, 82, 576, 11, 82, 3, 82, 6, 82, 579, 10, 82, 13, 82, 14, 82, 580, 5, 82, 583, 10, 82, 3, 83, 3, 83, 3, 83, 6, 83, 588, 10, 83, 13, 83, 14, 83, 589, 3, 84, 3, 84, 3, 84, 6, 84, 595, 10, 84, 13, 84, 14, 84, 596, 3, 85, 3, 85, 3, 85, 6, 85, 602, 10, 85, 13, 85, 14, 85, 603, 3, 86, 3, 86, 6, 86, 608, 10, 86, 13, 86, 14, 86, 609, 5, 86, 612, 10, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 7, 94, 638, 10, 94, 12, 94, 14, 94, 641, 11, 94, 3, 95, 3, 95, 7, 95, 645, 10, 95, 12, 95, 14, 95, 648, 11, 95, 3, 95, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 6, 97, 660, 10, 97, 13, 97, 14, 97, 661, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 7, 98, 670, 10, 98, 12, 98, 14, 98, 673, 11, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, 5, 99, 681, 10, 99, 3, 99, 7, 99, 684, 10, 99, 12, 99, 14, 99, 687, 11, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 5, 99, 694, 10, 99, 3, 99, 7, 99, 697, 10, 99, 12, 99, 14, 99, 700, 11, 99, 3, 99, 5, 99, 703, 10, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 7, 100, 710, 10, 100, 12, 100, 14, 100, 713, 11, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 7, 100, 723, 10, 100, 12, 100, 14, 100, 726, 11, 100, 3, 100, 3, 100, 3, 100, 5, 100, 731, 10, 100, 3, 101, 3, 101, 3, 101, 3, 101, 5, 101, 737, 10, 101, 5, 101, 739, 10, 101, 3, 102, 5, 102, 742, 10, 102, 3, 102, 3, 102, 3, 103, 6, 103, 747, 10, 103, 13, 103, 14, 103, 748, 3, 103, 5, 103, 752, 10, 103, 3, 103, 3, 103, 5, 103, 756, 10, 103, 3, 103, 6, 103, 759, 10, 103, 13, 103, 14, 103, 760, 3, 103, 5, 103, 764, 10, 103, 3, 104, 7, 104, 767, 10, 104, 12, 104, 14, 104, 770, 11, 104, 3, 104, 3, 104, 6, 104, 774, 10, 104, 13, 104, 14, 104, 775, 3, 104, 6, 104, 779, 10, 104, 13, 104, 14, 104, 780, 3, 104, 5, 104, 784, 10, 104, 3, 105, 3, 105, 3, 105, 7, 105, 789, 10, 105, 12, 105, 14, 105, 792, 11, 105, 3, 105, 3, 105, 3, 105, 3, 105, 7, 105, 798, 10, 105, 12, 105, 14, 105, 801, 11, 105, 3, 105, 5, 105, 804, 10, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 7, 106, 811, 10, 106, 12, 106, 14, 106, 814, 11, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 7, 106, 824, 10, 106, 12, 106, 14, 106, 827, 11, 106, 3, 106, 3, 106, 3, 106, 5, 106, 832, 10, 106, 3, 107, 3, 107, 5, 107, 836, 10, 107, 3, 108, 5, 108, 839, 10, 108, 3, 109, 5, 109, 842, 10, 109, 3, 110, 5, 110, 845, 10, 110, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 5, 112, 852, 10, 112, 3, 113, 5, 113, 855, 10, 113, 6, 711, 724, 812, 825, 2, 114, 3, 6, 5, 7, 7, 8, 9, 9, 11, 10, 13, 11, 15, 12, 17, 13, 19, 14, 21, 15, 23, 16, 25, 17, 27, 18, 29, 19, 31, 20, 33, 21, 35, 22, 37, 23, 39, 24, 41, 25, 43, 26, 45, 27, 47, 28, 49, 29, 51, 30, 53, 31, 55, 32, 57, 33, 59, 34, 61, 35, 63, 36, 65, 37, 67, 38, 69, 39, 71, 40, 73, 41, 75, 42, 77, 43, 79, 44, 81, 45, 83, 46, 85, 47, 87, 48, 89, 49, 91, 50, 93, 51, 95, 52, 97, 53, 99, 54, 101, 55, 103, 56, 105, 57, 107, 58, 109, 59, 111, 60, 113, 61, 115, 62, 117, 63, 119, 64, 121, 65, 123, 66, 125, 67, 127, 68, 129, 69, 131, 70, 133, 71, 135, 72, 137, 73, 139, 74, 141, 75, 143, 76, 145, 77, 147, 78, 149, 79, 151, 80, 153, 81, 155, 82, 157, 83, 159, 84, 161, 85, 163, 86, 165, 87, 167, 88, 169, 89, 171, 90, 173, 91, 175, 92, 177, 93, 179, 94, 181, 95, 183, 96, 185, 97, 187, 98, 189, 99, 191, 100, 193, 101, 195, 102, 197, 2, 199, 2, 201, 2, 203, 2, 205, 2, 207, 2, 209, 2, 211, 2, 213, 2, 215, 2, 217, 2, 219, 2, 221, 2, 223, 2, 225, 2, 3, 2, 27, 4, 2, 87, 87, 119, 119, 4, 2, 72, 72, 104, 104, 4, 2, 84, 84, 116, 116, 4, 2, 68, 68, 100, 100, 3, 2, 51, 59, 3, 2, 50, 59, 4, 2, 81, 81, 113, 113, 3, 2, 50, 57, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 51, 4, 2, 76, 76, 108, 108, 4, 2, 11, 11, 34, 34, 4, 2, 12, 12, 14, 15, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 3, 2, 94, 94, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 7, 2, 2, 11, 13, 14, 16, 40, 42, 93, 95, 129, 7, 2, 2, 11, 13, 14, 16, 35, 37, 93, 95, 129, 4, 2, 2, 93, 95, 129, 3, 2, 2, 129, 150, 2, 50, 59, 770, 881, 1157, 1160, 1427, 1467, 1469, 1471, 1473, 1473, 1475, 1476, 1478, 1479, 1481, 1481, 1554, 1559, 1613, 1632, 1634, 1643, 1650, 1650, 1752, 1758, 1761, 1766, 1769, 1770, 1772, 1775, 1778, 1787, 1811, 1811, 1842, 1868, 1960, 1970, 2307, 2309, 2366, 2366, 2368, 2383, 2387, 2390, 2404, 2405, 2408, 2417, 2435, 2437, 2494, 2494, 2496, 2502, 2505, 2506, 2509, 2511, 2521, 2521, 2532, 2533, 2536, 2545, 2563, 2565, 2622, 2622, 2624, 2628, 2633, 2634, 2637, 2639, 2664, 2675, 2691, 2693, 2750, 2750, 2752, 2759, 2761, 2763, 2765, 2767, 2788, 2789, 2792, 2801, 2819, 2821, 2878, 2878, 2880, 2885, 2889, 2890, 2893, 2895, 2904, 2905, 2920, 2929, 2948, 2948, 3008, 3012, 3016, 3018, 3020, 3023, 3033, 3033, 3048, 3057, 3075, 3077, 3136, 3142, 3144, 3146, 3148, 3151, 3159, 3160, 3176, 3185, 3204, 3205, 3262, 3262, 3264, 3270, 3272, 3274, 3276, 3279, 3287, 3288, 3304, 3313, 3332, 3333, 3392, 3397, 3400, 3402, 3404, 3407, 3417, 3417, 3432, 3441, 3460, 3461, 3532, 3532, 3537, 3542, 3544, 3544, 3546, 3553, 3572, 3573, 3635, 3635, 3638, 3644, 3657, 3664, 3666, 3675, 3763, 3763, 3766, 3771, 3773, 3774, 3786, 3791, 3794, 3803, 3866, 3867, 3874, 3883, 3895, 3895, 3897, 3897, 3899, 3899, 3904, 3905, 3955, 3974, 3976, 3977, 3986, 3993, 3995, 4030, 4040, 4040, 4142, 4148, 4152, 4155, 4162, 4171, 4184, 4187, 4961, 4961, 4971, 4979, 5908, 5910, 5940, 5942, 5972, 5973, 6004, 6005, 6072, 6101, 6111, 6111, 6114, 6123, 6157, 6159, 6162, 6171, 6315, 6315, 6434, 6445, 6450, 6461, 6472, 6481, 6578, 6594, 6602, 6603, 6610, 6619, 6681, 6685, 7618, 7621, 8257, 8258, 8278, 8278, 8402, 8414, 8419, 8419, 8423, 8429, 12332, 12337, 12443, 12444, 43012, 43012, 43016, 43016, 43021, 43021, 43045, 43049, 64288, 64288, 65026, 65041, 65058, 65061, 65077, 65078, 65103, 65105, 65298, 65307, 65345, 65345, 297, 2, 67, 92, 97, 97, 99, 124, 172, 172, 183, 183, 188, 188, 194, 216, 218, 248, 250, 579, 594, 707, 712, 723, 738, 742, 752, 752, 892, 892, 904, 904, 906, 908, 910, 910, 912, 931, 933, 976, 978, 1015, 1017, 1155, 1164, 1232, 1234, 1275, 1282, 1297, 1331, 1368, 1371, 1371, 1379, 1417, 1490, 1516, 1522, 1524, 1571, 1596, 1602, 1612, 1648, 1649, 1651, 1749, 1751, 1751, 1767, 1768, 1776, 1777, 1788, 1790, 1793, 1793, 1810, 1810, 1812, 1841, 1871, 1903, 1922, 1959, 1971, 1971, 2310, 2363, 2367, 2367, 2386, 2386, 2394, 2403, 2431, 2431, 2439, 2446, 2449, 2450, 2453, 2474, 2476, 2482, 2484, 2484, 2488, 2491, 2495, 2495, 2512, 2512, 2526, 2527, 2529, 2531, 2546, 2547, 2567, 2572, 2577, 2578, 2581, 2602, 2604, 2610, 2612, 2613, 2615, 2616, 2618, 2619, 2651, 2654, 2656, 2656, 2676, 2678, 2695, 2703, 2705, 2707, 2709, 2730, 2732, 2738, 2740, 2741, 2743, 2747, 2751, 2751, 2770, 2770, 2786, 2787, 2823, 2830, 2833, 2834, 2837, 2858, 2860, 2866, 2868, 2869, 2871, 2875, 2879, 2879, 2910, 2911, 2913, 2915, 2931, 2931, 2949, 2949, 2951, 2956, 2960, 2962, 2964, 2967, 2971, 2972, 2974, 2974, 2976, 2977, 2981, 2982, 2986, 2988, 2992, 3003, 3079, 3086, 3088, 3090, 3092, 3114, 3116, 3125, 3127, 3131, 3170, 3171, 3207, 3214, 3216, 3218, 3220, 3242, 3244, 3253, 3255, 3259, 3263, 3263, 3296, 3296, 3298, 3299, 3335, 3342, 3344, 3346, 3348, 3370, 3372, 3387, 3426, 3427, 3463, 3480, 3484, 3507, 3509, 3517, 3519, 3519, 3522, 3528, 3587, 3634, 3636, 3637, 3650, 3656, 3715, 3716, 3718, 3718, 3721, 3722, 3724, 3724, 3727, 3727, 3734, 3737, 3739, 3745, 3747, 3749, 3751, 3751, 3753, 3753, 3756, 3757, 3759, 3762, 3764, 3765, 3775, 3775, 3778, 3782, 3784, 3784, 3806, 3807, 3842, 3842, 3906, 3913, 3915, 3948, 3978, 3981, 4098, 4131, 4133, 4137, 4139, 4140, 4178, 4183, 4258, 4295, 4306, 4348, 4350, 4350, 4354, 4443, 4449, 4516, 4522, 4603, 4610, 4682, 4684, 4687, 4690, 4696, 4698, 4698, 4700, 4703, 4706, 4746, 4748, 4751, 4754, 4786, 4788, 4791, 4794, 4800, 4802, 4802, 4804, 4807, 4810, 4824, 4826, 4882, 4884, 4887, 4890, 4956, 4994, 5009, 5026, 5110, 5123, 5742, 5745, 5752, 5763, 5788, 5794, 5868, 5872, 5874, 5890, 5902, 5904, 5907, 5922, 5939, 5954, 5971, 5986, 5998, 6000, 6002, 6018, 6069, 6105, 6105, 6110, 6110, 6178, 6265, 6274, 6314, 6402, 6430, 6482, 6511, 6514, 6518, 6530, 6571, 6595, 6601, 6658, 6680, 7426, 7617, 7682, 7837, 7842, 7931, 7938, 7959, 7962, 7967, 7970, 8007, 8010, 8015, 8018, 8025, 8027, 8027, 8029, 8029, 8031, 8031, 8033, 8063, 8066, 8118, 8120, 8126, 8128, 8128, 8132, 8134, 8136, 8142, 8146, 8149, 8152, 8157, 8162, 8174, 8180, 8182, 8184, 8190, 8307, 8307, 8321, 8321, 8338, 8342, 8452, 8452, 8457, 8457, 8460, 8469, 8471, 8471, 8474, 8479, 8486, 8486, 8488, 8488, 8490, 8490, 8492, 8499, 8501, 8507, 8510, 8513, 8519, 8523, 8546, 8581, 11266, 11312, 11314, 11360, 11394, 11494, 11522, 11559, 11570, 11623, 11633, 11633, 11650, 11672, 11682, 11688, 11690, 11696, 11698, 11704, 11706, 11712, 11714, 11720, 11722, 11728, 11730, 11736, 11738, 11744, 12295, 12297, 12323, 12331, 12339, 12343, 12346, 12350, 12355, 12440, 12445, 12449, 12451, 12540, 12542, 12545, 12551, 12590, 12595, 12688, 12706, 12729, 12786, 12801, 13314, 19895, 19970, 40893, 40962, 42126, 43010, 43011, 43013, 43015, 43017, 43020, 43022, 43044, 44034, 55205, 63746, 64047, 64050, 64108, 64114, 64219, 64258, 64264, 64277, 64281, 64287, 64287, 64289, 64298, 64300, 64312, 64314, 64318, 64320, 64320, 64322, 64323, 64325, 64326, 64328, 64435, 64469, 64831, 64850, 64913, 64916, 64969, 65010, 65021, 65138, 65142, 65144, 65278, 65315, 65340, 65347, 65372, 65384, 65472, 65476, 65481, 65484, 65489, 65492, 65497, 65500, 65502, 2, 894, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 3, 227, 3, 2, 2, 2, 5, 231, 3, 2, 2, 2, 7, 238, 3, 2, 2, 2, 9, 244, 3, 2, 2, 2, 11, 249, 3, 2, 2, 2, 13, 256, 3, 2, 2, 2, 15, 265, 3, 2, 2, 2, 17, 268, 3, 2, 2, 2, 19, 275, 3, 2, 2, 2, 21, 282, 3, 2, 2, 2, 23, 285, 3, 2, 2, 2, 25, 290, 3, 2, 2, 2, 27, 295, 3, 2, 2, 2, 29, 301, 3, 2, 2, 2, 31, 305, 3, 2, 2, 2, 33, 308, 3, 2, 2, 2, 35, 312, 3, 2, 2, 2, 37, 317, 3, 2, 2, 2, 39, 325, 3, 2, 2, 2, 41, 330, 3, 2, 2, 2, 43, 337, 3, 2, 2, 2, 45, 344, 3, 2, 2, 2, 47, 347, 3, 2, 2, 2, 49, 351, 3, 2, 2, 2, 51, 355, 3, 2, 2, 2, 53, 358, 3, 2, 2, 2, 55, 364, 3, 2, 2, 2, 57, 370, 3, 2, 2, 2, 59, 374, 3, 2, 2, 2, 61, 379, 3, 2, 2, 2, 63, 388, 3, 2, 2, 2, 65, 394, 3, 2, 2, 2, 67, 400, 3, 2, 2, 2, 69, 406, 3, 2, 2, 2, 71, 412, 3, 2, 2, 2, 73, 417, 3, 2, 2, 2, 75, 422, 3, 2, 2, 2, 77, 428, 3, 2, 2, 2, 79, 430, 3, 2, 2, 2, 81, 434, 3, 2, 2, 2, 83, 436, 3, 2, 2, 2, 85, 438, 3, 2, 2, 2, 87, 440, 3, 2, 2, 2, 89, 442, 3, 2, 2, 2, 91, 444, 3, 2, 2, 2, 93, 447, 3, 2, 2, 2, 95, 449, 3, 2, 2, 2, 97, 451, 3, 2, 2, 2, 99, 453, 3, 2, 2, 2, 101, 455, 3, 2, 2, 2, 103, 458, 3, 2, 2, 2, 105, 461, 3, 2, 2, 2, 107, 463, 3, 2, 2, 2, 109, 465, 3, 2, 2, 2, 111, 467, 3, 2, 2, 2, 113, 469, 3, 2, 2, 2, 115, 472, 3, 2, 2, 2, 117, 474, 3, 2, 2, 2, 119, 476, 3, 2, 2, 2, 121, 478, 3, 2, 2, 2, 123, 481, 3, 2, 2, 2, 125, 484, 3, 2, 2, 2, 127, 487, 3, 2, 2, 2, 129, 490, 3, 2, 2, 2, 131, 493, 3, 2, 2, 2, 133, 495, 3, 2, 2, 2, 135, 498, 3, 2, 2, 2, 137, 501, 3, 2, 2, 2, 139, 504, 3, 2, 2, 2, 141, 507, 3, 2, 2, 2, 143, 510, 3, 2, 2, 2, 145, 513, 3, 2, 2, 2, 147, 516, 3, 2, 2, 2, 149, 519, 3, 2, 2, 2, 151, 522, 3, 2, 2, 2, 153, 525, 3, 2, 2, 2, 155, 529, 3, 2, 2, 2, 157, 533, 3, 2, 2, 2, 159, 537, 3, 2, 2, 2, 161, 568, 3, 2, 2, 2, 163, 582, 3, 2, 2, 2, 165, 584, 3, 2, 2, 2, 167, 591, 3, 2, 2, 2, 169, 598, 3, 2, 2, 2, 171, 611, 3, 2, 2, 2, 173, 615, 3, 2, 2, 2, 175, 617, 3, 2, 2, 2, 177, 620, 3, 2, 2, 2, 179, 623, 3, 2, 2, 2, 181, 626, 3, 2, 2, 2, 183, 629, 3, 2, 2, 2, 185, 632, 3, 2, 2, 2, 187, 635, 3, 2, 2, 2, 189, 642, 3, 2, 2, 2, 191, 653, 3, 2, 2, 2, 193, 659, 3, 2, 2, 2, 195, 667, 3, 2, 2, 2, 197, 702, 3, 2, 2, 2, 199, 730, 3, 2, 2, 2, 201, 738, 3, 2, 2, 2, 203, 741, 3, 2, 2, 2, 205, 763, 3, 2, 2, 2, 207, 783, 3, 2, 2, 2, 209, 803, 3, 2, 2, 2, 211, 831, 3, 2, 2, 2, 213, 835, 3, 2, 2, 2, 215, 838, 3, 2, 2, 2, 217, 841, 3, 2, 2, 2, 219, 844, 3, 2, 2, 2, 221, 846, 3, 2, 2, 2, 223, 851, 3, 2, 2, 2, 225, 854, 3, 2, 2, 2, 227, 228, 7, 102, 2, 2, 228, 229, 7, 103, 2, 2, 229, 230, 7, 104, 2, 2, 230, 4, 3, 2, 2, 2, 231, 232, 7, 116, 2, 2, 232, 233, 7, 103, 2, 2, 233, 234, 7, 118, 2, 2, 234, 235, 7, 119, 2, 2, 235, 236, 7, 116, 2, 2, 236, 237, 7, 112, 2, 2, 237, 6, 3, 2, 2, 2, 238, 239, 7, 116, 2, 2, 239, 240, 7, 99, 2, 2, 240, 241, 7, 107, 2, 2, 241, 242, 7, 117, 2, 2, 242, 243, 7, 103, 2, 2, 243, 8, 3, 2, 2, 2, 244, 245, 7, 104, 2, 2, 245, 246, 7, 116, 2, 2, 246, 247, 7, 113, 2, 2, 247, 248, 7, 111, 2, 2, 248, 10, 3, 2, 2, 2, 249, 250, 7, 107, 2, 2, 250, 251, 7, 111, 2, 2, 251, 252, 7, 114, 2, 2, 252, 253, 7, 113, 2, 2, 253, 254, 7, 116, 2, 2, 254, 255, 7, 118, 2, 2, 255, 12, 3, 2, 2, 2, 256, 257, 7, 112, 2, 2, 257, 258, 7, 113, 2, 2, 258, 259, 7, 112, 2, 2, 259, 260, 7, 110, 2, 2, 260, 261, 7, 113, 2, 2, 261, 262, 7, 101, 2, 2, 262, 263, 7, 99, 2, 2, 263, 264, 7, 110, 2, 2, 264, 14, 3, 2, 2, 2, 265, 266, 7, 99, 2, 2, 266, 267, 7, 117, 2, 2, 267, 16, 3, 2, 2, 2, 268, 269, 7, 105, 2, 2, 269, 270, 7, 110, 2, 2, 270, 271, 7, 113, 2, 2, 271, 272, 7, 100, 2, 2, 272, 273, 7, 99, 2, 2, 273, 274, 7, 110, 2, 2, 274, 18, 3, 2, 2, 2, 275, 276, 7, 99, 2, 2, 276, 277, 7, 117, 2, 2, 277, 278, 7, 117, 2, 2, 278, 279, 7, 103, 2, 2, 279, 280, 7, 116, 2, 2, 280, 281, 7, 118, 2, 2, 281, 20, 3, 2, 2, 2, 282, 283, 7, 107, 2, 2, 283, 284, 7, 104, 2, 2, 284, 22, 3, 2, 2, 2, 285, 286, 7, 103, 2, 2, 286, 287, 7, 110, 2, 2, 287, 288, 7, 107, 2, 2, 288, 289, 7, 104, 2, 2, 289, 24, 3, 2, 2, 2, 290, 291, 7, 103, 2, 2, 291, 292, 7, 110, 2, 2, 292, 293, 7, 117, 2, 2, 293, 294, 7, 103, 2, 2, 294, 26, 3, 2, 2, 2, 295, 296, 7, 121, 2, 2, 296, 297, 7, 106, 2, 2, 297, 298, 7, 107, 2, 2, 298, 299, 7, 110, 2, 2, 299, 300, 7, 103, 2, 2, 300, 28, 3, 2, 2, 2, 301, 302, 7, 104, 2, 2, 302, 303, 7, 113, 2, 2, 303, 304, 7, 116, 2, 2, 304, 30, 3, 2, 2, 2, 305, 306, 7, 107, 2, 2, 306, 307, 7, 112, 2, 2, 307, 32, 3, 2, 2, 2, 308, 309, 7, 118, 2, 2, 309, 310, 7, 116, 2, 2, 310, 311, 7, 123, 2, 2, 311, 34, 3, 2, 2, 2, 312, 313, 7, 80, 2, 2, 313, 314, 7, 113, 2, 2, 314, 315, 7, 112, 2, 2, 315, 316, 7, 103, 2, 2, 316, 36, 3, 2, 2, 2, 317, 318, 7, 104, 2, 2, 318, 319, 7, 107, 2, 2, 319, 320, 7, 112, 2, 2, 320, 321, 7, 99, 2, 2, 321, 322, 7, 110, 2, 2, 322, 323, 7, 110, 2, 2, 323, 324, 7, 123, 2, 2, 324, 38, 3, 2, 2, 2, 325, 326, 7, 121, 2, 2, 326, 327, 7, 107, 2, 2, 327, 328, 7, 118, 2, 2, 328, 329, 7, 106, 2, 2, 329, 40, 3, 2, 2, 2, 330, 331, 7, 103, 2, 2, 331, 332, 7, 122, 2, 2, 332, 333, 7, 101, 2, 2, 333, 334, 7, 103, 2, 2, 334, 335, 7, 114, 2, 2, 335, 336, 7, 118, 2, 2, 336, 42, 3, 2, 2, 2, 337, 338, 7, 110, 2, 2, 338, 339, 7, 99, 2, 2, 339, 340, 7, 111, 2, 2, 340, 341, 7, 100, 2, 2, 341, 342, 7, 102, 2, 2, 342, 343, 7, 99, 2, 2, 343, 44, 3, 2, 2, 2, 344, 345, 7, 113, 2, 2, 345, 346, 7, 116, 2, 2, 346, 46, 3, 2, 2, 2, 347, 348, 7, 99, 2, 2, 348, 349, 7, 112, 2, 2, 349, 350, 7, 102, 2, 2, 350, 48, 3, 2, 2, 2, 351, 352, 7, 112, 2, 2, 352, 353, 7, 113, 2, 2, 353, 354, 7, 118, 2, 2, 354, 50, 3, 2, 2, 2, 355, 356, 7, 107, 2, 2, 356, 357, 7, 117, 2, 2, 357, 52, 3, 2, 2, 2, 358, 359, 7, 101, 2, 2, 359, 360, 7, 110, 2, 2, 360, 361, 7, 99, 2, 2, 361, 362, 7, 117, 2, 2, 362, 363, 7, 117, 2, 2, 363, 54, 3, 2, 2, 2, 364, 365, 7, 123, 2, 2, 365, 366, 7, 107, 2, 2, 366, 367, 7, 103, 2, 2, 367, 368, 7, 110, 2, 2, 368, 369, 7, 102, 2, 2, 369, 56, 3, 2, 2, 2, 370, 371, 7, 102, 2, 2, 371, 372, 7, 103, 2, 2, 372, 373, 7, 110, 2, 2, 373, 58, 3, 2, 2, 2, 374, 375, 7, 114, 2, 2, 375, 376, 7, 99, 2, 2, 376, 377, 7, 117, 2, 2, 377, 378, 7, 117, 2, 2, 378, 60, 3, 2, 2, 2, 379, 380, 7, 101, 2, 2, 380, 381, 7, 113, 2, 2, 381, 382, 7, 112, 2, 2, 382, 383, 7, 118, 2, 2, 383, 384, 7, 107, 2, 2, 384, 385, 7, 112, 2, 2, 385, 386, 7, 119, 2, 2, 386, 387, 7, 103, 2, 2, 387, 62, 3, 2, 2, 2, 388, 389, 7, 100, 2, 2, 389, 390, 7, 116, 2, 2, 390, 391, 7, 103, 2, 2, 391, 392, 7, 99, 2, 2, 392, 393, 7, 109, 2, 2, 393, 64, 3, 2, 2, 2, 394, 395, 7, 99, 2, 2, 395, 396, 7, 117, 2, 2, 396, 397, 7, 123, 2, 2, 397, 398, 7, 112, 2, 2, 398, 399, 7, 101, 2, 2, 399, 66, 3, 2, 2, 2, 400, 401, 7, 99, 2, 2, 401, 402, 7, 121, 2, 2, 402, 403, 7, 99, 2, 2, 403, 404, 7, 107, 2, 2, 404, 405, 7, 118, 2, 2, 405, 68, 3, 2, 2, 2, 406, 407, 7, 114, 2, 2, 407, 408, 7, 116, 2, 2, 408, 409, 7, 107, 2, 2, 409, 410, 7, 112, 2, 2, 410, 411, 7, 118, 2, 2, 411, 70, 3, 2, 2, 2, 412, 413, 7, 103, 2, 2, 413, 414, 7, 122, 2, 2, 414, 415, 7, 103, 2, 2, 415, 416, 7, 101, 2, 2, 416, 72, 3, 2, 2, 2, 417, 418, 7, 86, 2, 2, 418, 419, 7, 116, 2, 2, 419, 420, 7, 119, 2, 2, 420, 421, 7, 103, 2, 2, 421, 74, 3, 2, 2, 2, 422, 423, 7, 72, 2, 2, 423, 424, 7, 99, 2, 2, 424, 425, 7, 110, 2, 2, 425, 426, 7, 117, 2, 2, 426, 427, 7, 103, 2, 2, 427, 76, 3, 2, 2, 2, 428, 429, 7, 48, 2, 2, 429, 78, 3, 2, 2, 2, 430, 431, 7, 48, 2, 2, 431, 432, 7, 48, 2, 2, 432, 433, 7, 48, 2, 2, 433, 80, 3, 2, 2, 2, 434, 435, 7, 98, 2, 2, 435, 82, 3, 2, 2, 2, 436, 437, 7, 44, 2, 2, 437, 84, 3, 2, 2, 2, 438, 439, 7, 46, 2, 2, 439, 86, 3, 2, 2, 2, 440, 441, 7, 60, 2, 2, 441, 88, 3, 2, 2, 2, 442, 443, 7, 61, 2, 2, 443, 90, 3, 2, 2, 2, 444, 445, 7, 44, 2, 2, 445, 446, 7, 44, 2, 2, 446, 92, 3, 2, 2, 2, 447, 448, 7, 63, 2, 2, 448, 94, 3, 2, 2, 2, 449, 450, 7, 126, 2, 2, 450, 96, 3, 2, 2, 2, 451, 452, 7, 96, 2, 2, 452, 98, 3, 2, 2, 2, 453, 454, 7, 40, 2, 2, 454, 100, 3, 2, 2, 2, 455, 456, 7, 62, 2, 2, 456, 457, 7, 62, 2, 2, 457, 102, 3, 2, 2, 2, 458, 459, 7, 64, 2, 2, 459, 460, 7, 64, 2, 2, 460, 104, 3, 2, 2, 2, 461, 462, 7, 45, 2, 2, 462, 106, 3, 2, 2, 2, 463, 464, 7, 47, 2, 2, 464, 108, 3, 2, 2, 2, 465, 466, 7, 49, 2, 2, 466, 110, 3, 2, 2, 2, 467, 468, 7, 39, 2, 2, 468, 112, 3, 2, 2, 2, 469, 470, 7, 49, 2, 2, 470, 471, 7, 49, 2, 2, 471, 114, 3, 2, 2, 2, 472, 473, 7, 128, 2, 2, 473, 116, 3, 2, 2, 2, 474, 475, 7, 62, 2, 2, 475, 118, 3, 2, 2, 2, 476, 477, 7, 64, 2, 2, 477, 120, 3, 2, 2, 2, 478, 479, 7, 63, 2, 2, 479, 480, 7, 63, 2, 2, 480, 122, 3, 2, 2, 2, 481, 482, 7, 64, 2, 2, 482, 483, 7, 63, 2, 2, 483, 124, 3, 2, 2, 2, 484, 485, 7, 62, 2, 2, 485, 486, 7, 63, 2, 2, 486, 126, 3, 2, 2, 2, 487, 488, 7, 62, 2, 2, 488, 489, 7, 64, 2, 2, 489, 128, 3, 2, 2, 2, 490, 491, 7, 35, 2, 2, 491, 492, 7, 63, 2, 2, 492, 130, 3, 2, 2, 2, 493, 494, 7, 66, 2, 2, 494, 132, 3, 2, 2, 2, 495, 496, 7, 47, 2, 2, 496, 497, 7, 64, 2, 2, 497, 134, 3, 2, 2, 2, 498, 499, 7, 45, 2, 2, 499, 500, 7, 63, 2, 2, 500, 136, 3, 2, 2, 2, 501, 502, 7, 47, 2, 2, 502, 503, 7, 63, 2, 2, 503, 138, 3, 2, 2, 2, 504, 505, 7, 44, 2, 2, 505, 506, 7, 63, 2, 2, 506, 140, 3, 2, 2, 2, 507, 508, 7, 66, 2, 2, 508, 509, 7, 63, 2, 2, 509, 142, 3, 2, 2, 2, 510, 511, 7, 49, 2, 2, 511, 512, 7, 63, 2, 2, 512, 144, 3, 2, 2, 2, 513, 514, 7, 39, 2, 2, 514, 515, 7, 63, 2, 2, 515, 146, 3, 2, 2, 2, 516, 517, 7, 40, 2, 2, 517, 518, 7, 63, 2, 2, 518, 148, 3, 2, 2, 2, 519, 520, 7, 126, 2, 2, 520, 521, 7, 63, 2, 2, 521, 150, 3, 2, 2, 2, 522, 523, 7, 96, 2, 2, 523, 524, 7, 63, 2, 2, 524, 152, 3, 2, 2, 2, 525, 526, 7, 62, 2, 2, 526, 527, 7, 62, 2, 2, 527, 528, 7, 63, 2, 2, 528, 154, 3, 2, 2, 2, 529, 530, 7, 64, 2, 2, 530, 531, 7, 64, 2, 2, 531, 532, 7, 63, 2, 2, 532, 156, 3, 2, 2, 2, 533, 534, 7, 44, 2, 2, 534, 535, 7, 44, 2, 2, 535, 536, 7, 63, 2, 2, 536, 158, 3, 2, 2, 2, 537, 538, 7, 49, 2, 2, 538, 539, 7, 49, 2, 2, 539, 540, 7, 63, 2, 2, 540, 160, 3, 2, 2, 2, 541, 551, 9, 2, 2, 2, 542, 544, 9, 3, 2, 2, 543, 545, 9, 4, 2, 2, 544, 543, 3, 2, 2, 2, 544, 545, 3, 2, 2, 2, 545, 551, 3, 2, 2, 2, 546, 548, 9, 4, 2, 2, 547, 549, 9, 3, 2, 2, 548, 547, 3, 2, 2, 2, 548, 549, 3, 2, 2, 2, 549, 551, 3, 2, 2, 2, 550, 541, 3, 2, 2, 2, 550, 542, 3, 2, 2, 2, 550, 546, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 554, 3, 2, 2, 2, 552, 555, 5, 197, 99, 2, 553, 555, 5, 199, 100, 2, 554, 552, 3, 2, 2, 2, 554, 553, 3, 2, 2, 2, 555, 569, 3, 2, 2, 2, 556, 558, 9, 5, 2, 2, 557, 559, 9, 4, 2, 2, 558, 557, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 563, 3, 2, 2, 2, 560, 561, 9, 4, 2, 2, 561, 563, 9, 5, 2, 2, 562, 556, 3, 2, 2, 2, 562, 560, 3, 2, 2, 2, 563, 566, 3, 2, 2, 2, 564, 567, 5, 209, 105, 2, 565, 567, 5, 211, 106, 2, 566, 564, 3, 2, 2, 2, 566, 565, 3, 2, 2, 2, 567, 569, 3, 2, 2, 2, 568, 550, 3, 2, 2, 2, 568, 562, 3, 2, 2, 2, 569, 162, 3, 2, 2, 2, 570, 574, 9, 6, 2, 2, 571, 573, 9, 7, 2, 2, 572, 571, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 583, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 577, 579, 7, 50, 2, 2, 578, 577, 3, 2, 2, 2, 579, 580, 3, 2, 2, 2, 580, 578, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 583, 3, 2, 2, 2, 582, 570, 3, 2, 2, 2, 582, 578, 3, 2, 2, 2, 583, 164, 3, 2, 2, 2, 584, 585, 7, 50, 2, 2, 585, 587, 9, 8, 2, 2, 586, 588, 9, 9, 2, 2, 587, 586, 3, 2, 2, 2, 588, 589, 3, 2, 2, 2, 589, 587, 3, 2, 2, 2, 589, 590, 3, 2, 2, 2, 590, 166, 3, 2, 2, 2, 591, 592, 7, 50, 2, 2, 592, 594, 9, 10, 2, 2, 593, 595, 9, 11, 2, 2, 594, 593, 3, 2, 2, 2, 595, 596, 3, 2, 2, 2, 596, 594, 3, 2, 2, 2, 596, 597, 3, 2, 2, 2, 597, 168, 3, 2, 2, 2, 598, 599, 7, 50, 2, 2, 599, 601, 9, 5, 2, 2, 600, 602, 9, 12, 2, 2, 601, 600, 3, 2, 2, 2, 602, 603, 3, 2, 2, 2, 603, 601, 3, 2, 2, 2, 603, 604, 3, 2, 2, 2, 604, 170, 3, 2, 2, 2, 605, 612, 5, 205, 103, 2, 606, 608, 9, 7, 2, 2, 607, 606, 3, 2, 2, 2, 608, 609, 3, 2, 2, 2, 609, 607, 3, 2, 2, 2, 609, 610, 3, 2, 2, 2, 610, 612, 3, 2, 2, 2, 611, 605, 3, 2, 2, 2, 611, 607, 3, 2, 2, 2, 612, 613, 3, 2, 2, 2, 613, 614, 9, 13, 2, 2, 614, 172, 3, 2, 2, 2, 615, 616, 5, 205, 103, 2, 616, 174, 3, 2, 2, 2, 617, 618, 7, 42, 2, 2, 618, 619, 8, 88, 2, 2, 619, 176, 3, 2, 2, 2, 620, 621, 7, 43, 2, 2, 621, 622, 8, 89, 3, 2, 622, 178, 3, 2, 2, 2, 623, 624, 7, 125, 2, 2, 624, 625, 8, 90, 4, 2, 625, 180, 3, 2, 2, 2, 626, 627, 7, 127, 2, 2, 627, 628, 8, 91, 5, 2, 628, 182, 3, 2, 2, 2, 629, 630, 7, 93, 2, 2, 630, 631, 8, 92, 6, 2, 631, 184, 3, 2, 2, 2, 632, 633, 7, 95, 2, 2, 633, 634, 8, 93, 7, 2, 634, 186, 3, 2, 2, 2, 635, 639, 5, 225, 113, 2, 636, 638, 5, 223, 112, 2, 637, 636, 3, 2, 2, 2, 638, 641, 3, 2, 2, 2, 639, 637, 3, 2, 2, 2, 639, 640, 3, 2, 2, 2, 640, 188, 3, 2, 2, 2, 641, 639, 3, 2, 2, 2, 642, 646, 7, 94, 2, 2, 643, 645, 9, 14, 2, 2, 644, 643, 3, 2, 2, 2, 645, 648, 3, 2, 2, 2, 646, 644, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 649, 3, 2, 2, 2, 648, 646, 3, 2, 2, 2, 649, 650, 5, 203, 102, 2, 650, 651, 3, 2, 2, 2, 651, 652, 8, 95, 8, 2, 652, 190, 3, 2, 2, 2, 653, 654, 5, 203, 102, 2, 654, 655, 8, 96, 9, 2, 655, 656, 3, 2, 2, 2, 656, 657, 8, 96, 8, 2, 657, 192, 3, 2, 2, 2, 658, 660, 9, 14, 2, 2, 659, 658, 3, 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 659, 3, 2, 2, 2, 661, 662, 3, 2, 2, 2, 662, 663, 3, 2, 2, 2, 663, 664, 8, 97, 10, 2, 664, 665, 3, 2, 2, 2, 665, 666, 8, 97, 8, 2, 666, 194, 3, 2, 2, 2, 667, 671, 7, 37, 2, 2, 668, 670, 10, 15, 2, 2, 669, 668, 3, 2, 2, 2, 670, 673, 3, 2, 2, 2, 671, 669, 3, 2, 2, 2, 671, 672, 3, 2, 2, 2, 672, 674, 3, 2, 2, 2, 673, 671, 3, 2, 2, 2, 674, 675, 8, 98, 8, 2, 675, 196, 3, 2, 2, 2, 676, 685, 7, 41, 2, 2, 677, 680, 7, 94, 2, 2, 678, 681, 5, 203, 102, 2, 679, 681, 11, 2, 2, 2, 680, 678, 3, 2, 2, 2, 680, 679, 3, 2, 2, 2, 681, 684, 3, 2, 2, 2, 682, 684, 10, 16, 2, 2, 683, 677, 3, 2, 2, 2, 683, 682, 3, 2, 2, 2, 684, 687, 3, 2, 2, 2, 685, 683, 3, 2, 2, 2, 685, 686, 3, 2, 2, 2, 686, 688, 3, 2, 2, 2, 687, 685, 3, 2, 2, 2, 688, 703, 7, 41, 2, 2, 689, 698, 7, 36, 2, 2, 690, 693, 7, 94, 2, 2, 691, 694, 5, 203, 102, 2, 692, 694, 11, 2, 2, 2, 693, 691, 3, 2, 2, 2, 693, 692, 3, 2, 2, 2, 694, 697, 3, 2, 2, 2, 695, 697, 10, 17, 2, 2, 696, 690, 3, 2, 2, 2, 696, 695, 3, 2, 2, 2, 697, 700, 3, 2, 2, 2, 698, 696, 3, 2, 2, 2, 698, 699, 3, 2, 2, 2, 699, 701, 3, 2, 2, 2, 700, 698, 3, 2, 2, 2, 701, 703, 7, 36, 2, 2, 702, 676, 3, 2, 2, 2, 702, 689, 3, 2, 2, 2, 703, 198, 3, 2, 2, 2, 704, 705, 7, 41, 2, 2, 705, 706, 7, 41, 2, 2, 706, 707, 7, 41, 2, 2, 707, 711, 3, 2, 2, 2, 708, 710, 5, 201, 101, 2, 709, 708, 3, 2, 2, 2, 710, 713, 3, 2, 2, 2, 711, 712, 3, 2, 2, 2, 711, 709, 3, 2, 2, 2, 712, 714, 3, 2, 2, 2, 713, 711, 3, 2, 2, 2, 714, 715, 7, 41, 2, 2, 715, 716, 7, 41, 2, 2, 716, 731, 7, 41, 2, 2, 717, 718, 7, 36, 2, 2, 718, 719, 7, 36, 2, 2, 719, 720, 7, 36, 2, 2, 720, 724, 3, 2, 2, 2, 721, 723, 5, 201, 101, 2, 722, 721, 3, 2, 2, 2, 723, 726, 3, 2, 2, 2, 724, 725, 3, 2, 2, 2, 724, 722, 3, 2, 2, 2, 725, 727, 3, 2, 2, 2, 726, 724, 3, 2, 2, 2, 727, 728, 7, 36, 2, 2, 728, 729, 7, 36, 2, 2, 729, 731, 7, 36, 2, 2, 730, 704, 3, 2, 2, 2, 730, 717, 3, 2, 2, 2, 731, 200, 3, 2, 2, 2, 732, 739, 10, 18, 2, 2, 733, 736, 7, 94, 2, 2, 734, 737, 5, 203, 102, 2, 735, 737, 11, 2, 2, 2, 736, 734, 3, 2, 2, 2, 736, 735, 3, 2, 2, 2, 737, 739, 3, 2, 2, 2, 738, 732, 3, 2, 2, 2, 738, 733, 3, 2, 2, 2, 739, 202, 3, 2, 2, 2, 740, 742, 7, 15, 2, 2, 741, 740, 3, 2, 2, 2, 741, 742, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 744, 7, 12, 2, 2, 744, 204, 3, 2, 2, 2, 745, 747, 9, 7, 2, 2, 746, 745, 3, 2, 2, 2, 747, 748, 3, 2, 2, 2, 748, 746, 3, 2, 2, 2, 748, 749, 3, 2, 2, 2, 749, 752, 3, 2, 2, 2, 750, 752, 5, 207, 104, 2, 751, 746, 3, 2, 2, 2, 751, 750, 3, 2, 2, 2, 752, 753, 3, 2, 2, 2, 753, 755, 9, 19, 2, 2, 754, 756, 9, 20, 2, 2, 755, 754, 3, 2, 2, 2, 755, 756, 3, 2, 2, 2, 756, 758, 3, 2, 2, 2, 757, 759, 9, 7, 2, 2, 758, 757, 3, 2, 2, 2, 759, 760, 3, 2, 2, 2, 760, 758, 3, 2, 2, 2, 760, 761, 3, 2, 2, 2, 761, 764, 3, 2, 2, 2, 762, 764, 5, 207, 104, 2, 763, 751, 3, 2, 2, 2, 763, 762, 3, 2, 2, 2, 764, 206, 3, 2, 2, 2, 765, 767, 9, 7, 2, 2, 766, 765, 3, 2, 2, 2, 767, 770, 3, 2, 2, 2, 768, 766, 3, 2, 2, 2, 768, 769, 3, 2, 2, 2, 769, 771, 3, 2, 2, 2, 770, 768, 3, 2, 2, 2, 771, 773, 7, 48, 2, 2, 772, 774, 9, 7, 2, 2, 773, 772, 3, 2, 2, 2, 774, 775, 3, 2, 2, 2, 775, 773, 3, 2, 2, 2, 775, 776, 3, 2, 2, 2, 776, 784, 3, 2, 2, 2, 777, 779, 9, 7, 2, 2, 778, 777, 3, 2, 2, 2, 779, 780, 3, 2, 2, 2, 780, 778, 3, 2, 2, 2, 780, 781, 3, 2, 2, 2, 781, 782, 3, 2, 2, 2, 782, 784, 7, 48, 2, 2, 783, 768, 3, 2, 2, 2, 783, 778, 3, 2, 2, 2, 784, 208, 3, 2, 2, 2, 785, 790, 7, 41, 2, 2, 786, 789, 5, 215, 108, 2, 787, 789, 5, 221, 111, 2, 788, 786, 3, 2, 2, 2, 788, 787, 3, 2, 2, 2, 789, 792, 3, 2, 2, 2, 790, 788, 3, 2, 2, 2, 790, 791, 3, 2, 2, 2, 791, 793, 3, 2, 2, 2, 792, 790, 3, 2, 2, 2, 793, 804, 7, 41, 2, 2, 794, 799, 7, 36, 2, 2, 795, 798, 5, 217, 109, 2, 796, 798, 5, 221, 111, 2, 797, 795, 3, 2, 2, 2, 797, 796, 3, 2, 2, 2, 798, 801, 3, 2, 2, 2, 799, 797, 3, 2, 2, 2, 799, 800, 3, 2, 2, 2, 800, 802, 3, 2, 2, 2, 801, 799, 3, 2, 2, 2, 802, 804, 7, 36, 2, 2, 803, 785, 3, 2, 2, 2, 803, 794, 3, 2, 2, 2, 804, 210, 3, 2, 2, 2, 805, 806, 7, 41, 2, 2, 806, 807, 7, 41, 2, 2, 807, 808, 7, 41, 2, 2, 808, 812, 3, 2, 2, 2, 809, 811, 5, 213, 107, 2, 810, 809, 3, 2, 2, 2, 811, 814, 3, 2, 2, 2, 812, 813, 3, 2, 2, 2, 812, 810, 3, 2, 2, 2, 813, 815, 3, 2, 2, 2, 814, 812, 3, 2, 2, 2, 815, 816, 7, 41, 2, 2, 816, 817, 7, 41, 2, 2, 817, 832, 7, 41, 2, 2, 818, 819, 7, 36, 2, 2, 819, 820, 7, 36, 2, 2, 820, 821, 7, 36, 2, 2, 821, 825, 3, 2, 2, 2, 822, 824, 5, 213, 107, 2, 823, 822, 3, 2, 2, 2, 824, 827, 3, 2, 2, 2, 825, 826, 3, 2, 2, 2, 825, 823, 3, 2, 2, 2, 826, 828, 3, 2, 2, 2, 827, 825, 3, 2, 2, 2, 828, 829, 7, 36, 2, 2, 829, 830, 7, 36, 2, 2, 830, 832, 7, 36, 2, 2, 831, 805, 3, 2, 2, 2, 831, 818, 3, 2, 2, 2, 832, 212, 3, 2, 2, 2, 833, 836, 5, 219, 110, 2, 834, 836, 5, 221, 111, 2, 835, 833, 3, 2, 2, 2, 835, 834, 3, 2, 2, 2, 836, 214, 3, 2, 2, 2, 837, 839, 9, 21, 2, 2, 838, 837, 3, 2, 2, 2, 839, 216, 3, 2, 2, 2, 840, 842, 9, 22, 2, 2, 841, 840, 3, 2, 2, 2, 842, 218, 3, 2, 2, 2, 843, 845, 9, 23, 2, 2, 844, 843, 3, 2, 2, 2, 845, 220, 3, 2, 2, 2, 846, 847, 7, 94, 2, 2, 847, 848, 9, 24, 2, 2, 848, 222, 3, 2, 2, 2, 849, 852, 5, 225, 113, 2, 850, 852, 9, 25, 2, 2, 851, 849, 3, 2, 2, 2, 851, 850, 3, 2, 2, 2, 852, 224, 3, 2, 2, 2, 853, 855, 9, 26, 2, 2, 854, 853, 3, 2, 2, 2, 855, 226, 3, 2, 2, 2, 59, 2, 544, 548, 550, 554, 558, 562, 566, 568, 574, 580, 582, 589, 596, 603, 609, 611, 639, 646, 661, 671, 680, 683, 685, 693, 696, 698, 702, 711, 724, 730, 736, 738, 741, 748, 751, 755, 760, 763, 768, 775, 780, 783, 788, 790, 797, 799, 803, 812, 825, 831, 835, 838, 841, 844, 851, 854, 11, 3, 88, 2, 3, 89, 3, 3, 90, 4, 3, 91, 5, 3, 92, 6, 3, 93, 7, 2, 3, 2, 3, 96, 8, 3, 97, 9] \ No newline at end of file diff --git a/docs/compare/src/main/java/pyantlr/PythonLexer.java b/docs/compare/src/main/java/pyantlr/PythonLexer.java new file mode 100644 index 0000000000000000000000000000000000000000..5273d0e67ce32c3f36f46eb06493e40980301603 --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonLexer.java @@ -0,0 +1,626 @@ +package pyantlr;// Generated from PythonLexer.g4 by ANTLR 4.7.2 +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class PythonLexer extends PythonBaseLexer { + static { RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + INDENT=1, DEDENT=2, LINE_BREAK=3, DEF=4, RETURN=5, RAISE=6, FROM=7, IMPORT=8, + NONLOCAL=9, AS=10, GLOBAL=11, ASSERT=12, IF=13, ELIF=14, ELSE=15, WHILE=16, + FOR=17, IN=18, TRY=19, NONE=20, FINALLY=21, WITH=22, EXCEPT=23, LAMBDA=24, + OR=25, AND=26, NOT=27, IS=28, CLASS=29, YIELD=30, DEL=31, PASS=32, CONTINUE=33, + BREAK=34, ASYNC=35, AWAIT=36, PRINT=37, EXEC=38, TRUE=39, FALSE=40, DOT=41, + ELLIPSIS=42, REVERSE_QUOTE=43, STAR=44, COMMA=45, COLON=46, SEMI_COLON=47, + POWER=48, ASSIGN=49, OR_OP=50, XOR=51, AND_OP=52, LEFT_SHIFT=53, RIGHT_SHIFT=54, + ADD=55, MINUS=56, DIV=57, MOD=58, IDIV=59, NOT_OP=60, LESS_THAN=61, GREATER_THAN=62, + EQUALS=63, GT_EQ=64, LT_EQ=65, NOT_EQ_1=66, NOT_EQ_2=67, AT=68, ARROW=69, + ADD_ASSIGN=70, SUB_ASSIGN=71, MULT_ASSIGN=72, AT_ASSIGN=73, DIV_ASSIGN=74, + MOD_ASSIGN=75, AND_ASSIGN=76, OR_ASSIGN=77, XOR_ASSIGN=78, LEFT_SHIFT_ASSIGN=79, + RIGHT_SHIFT_ASSIGN=80, POWER_ASSIGN=81, IDIV_ASSIGN=82, STRING=83, DECIMAL_INTEGER=84, + OCT_INTEGER=85, HEX_INTEGER=86, BIN_INTEGER=87, IMAG_NUMBER=88, FLOAT_NUMBER=89, + OPEN_PAREN=90, CLOSE_PAREN=91, OPEN_BRACE=92, CLOSE_BRACE=93, OPEN_BRACKET=94, + CLOSE_BRACKET=95, NAME=96, LINE_JOIN=97, NEWLINE=98, WS=99, COMMENT=100; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "DEF", "RETURN", "RAISE", "FROM", "IMPORT", "NONLOCAL", "AS", "GLOBAL", + "ASSERT", "IF", "ELIF", "ELSE", "WHILE", "FOR", "IN", "TRY", "NONE", + "FINALLY", "WITH", "EXCEPT", "LAMBDA", "OR", "AND", "NOT", "IS", "CLASS", + "YIELD", "DEL", "PASS", "CONTINUE", "BREAK", "ASYNC", "AWAIT", "PRINT", + "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", "REVERSE_QUOTE", "STAR", + "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", "OR_OP", "XOR", "AND_OP", + "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", "DIV", "MOD", "IDIV", "NOT_OP", + "LESS_THAN", "GREATER_THAN", "EQUALS", "GT_EQ", "LT_EQ", "NOT_EQ_1", + "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", "SUB_ASSIGN", "MULT_ASSIGN", + "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", + "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", "IDIV_ASSIGN", + "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", "BIN_INTEGER", + "IMAG_NUMBER", "FLOAT_NUMBER", "OPEN_PAREN", "CLOSE_PAREN", "OPEN_BRACE", + "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", "NAME", "LINE_JOIN", + "NEWLINE", "WS", "COMMENT", "SHORT_STRING", "LONG_STRING", "LONG_STRING_ITEM", + "RN", "EXPONENT_OR_POINT_FLOAT", "POINT_FLOAT", "SHORT_BYTES", "LONG_BYTES", + "LONG_BYTES_ITEM", "SHORT_BYTES_CHAR_NO_SINGLE_QUOTE", "SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE", + "LONG_BYTES_CHAR", "BYTES_ESCAPE_SEQ", "ID_CONTINUE", "ID_START" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, null, null, null, "'def'", "'return'", "'raise'", "'from'", "'import'", + "'nonlocal'", "'as'", "'global'", "'assert'", "'if'", "'elif'", "'else'", + "'while'", "'for'", "'in'", "'try'", "'None'", "'finally'", "'with'", + "'except'", "'lambda'", "'or'", "'and'", "'not'", "'is'", "'class'", + "'yield'", "'del'", "'pass'", "'continue'", "'break'", "'async'", "'await'", + "'print'", "'exec'", "'True'", "'False'", "'.'", "'...'", "'`'", "'*'", + "','", "':'", "';'", "'**'", "'='", "'|'", "'^'", "'&'", "'<<'", "'>>'", + "'+'", "'-'", "'/'", "'%'", "'//'", "'~'", "'<'", "'>'", "'=='", "'>='", + "'<='", "'<>'", "'!='", "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", + "'/='", "'%='", "'&='", "'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='", + null, null, null, null, null, null, null, "'('", "')'", "'{'", "'}'", + "'['", "']'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "INDENT", "DEDENT", "LINE_BREAK", "DEF", "RETURN", "RAISE", "FROM", + "IMPORT", "NONLOCAL", "AS", "GLOBAL", "ASSERT", "IF", "ELIF", "ELSE", + "WHILE", "FOR", "IN", "TRY", "NONE", "FINALLY", "WITH", "EXCEPT", "LAMBDA", + "OR", "AND", "NOT", "IS", "CLASS", "YIELD", "DEL", "PASS", "CONTINUE", + "BREAK", "ASYNC", "AWAIT", "PRINT", "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", + "REVERSE_QUOTE", "STAR", "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", + "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "LESS_THAN", "GREATER_THAN", "EQUALS", + "GT_EQ", "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", + "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", + "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", + "POWER_ASSIGN", "IDIV_ASSIGN", "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", "OPEN_PAREN", + "CLOSE_PAREN", "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", + "NAME", "LINE_JOIN", "NEWLINE", "WS", "COMMENT" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public PythonLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "PythonLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 86: + OPEN_PAREN_action((RuleContext)_localctx, actionIndex); + break; + case 87: + CLOSE_PAREN_action((RuleContext)_localctx, actionIndex); + break; + case 88: + OPEN_BRACE_action((RuleContext)_localctx, actionIndex); + break; + case 89: + CLOSE_BRACE_action((RuleContext)_localctx, actionIndex); + break; + case 90: + OPEN_BRACKET_action((RuleContext)_localctx, actionIndex); + break; + case 91: + CLOSE_BRACKET_action((RuleContext)_localctx, actionIndex); + break; + case 94: + NEWLINE_action((RuleContext)_localctx, actionIndex); + break; + case 95: + WS_action((RuleContext)_localctx, actionIndex); + break; + } + } + private void OPEN_PAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + IncIndentLevel(); + break; + } + } + private void CLOSE_PAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 1: + DecIndentLevel(); + break; + } + } + private void OPEN_BRACE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 2: + IncIndentLevel(); + break; + } + } + private void CLOSE_BRACE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 3: + DecIndentLevel(); + break; + } + } + private void OPEN_BRACKET_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 4: + IncIndentLevel(); + break; + } + } + private void CLOSE_BRACKET_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 5: + DecIndentLevel(); + break; + } + } + private void NEWLINE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 6: + HandleNewLine(); + break; + } + } + private void WS_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 7: + HandleSpaces(); + break; + } + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2f\u0358\b\1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3"+ + "\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3"+ + "\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3"+ + "\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\17"+ + "\3\17\3\17\3\17\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22"+ + "\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24"+ + "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\32\3\32\3\32"+ + "\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35"+ + "\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37"+ + "\3\37\3\37\3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\""+ + "\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'"+ + "\3\'\3(\3(\3(\3(\3)\3)\3*\3*\3+\3+\3,\3,\3-\3-\3.\3.\3.\3/\3/\3\60\3\60"+ + "\3\61\3\61\3\62\3\62\3\63\3\63\3\63\3\64\3\64\3\64\3\65\3\65\3\66\3\66"+ + "\3\67\3\67\38\38\39\39\39\3:\3:\3;\3;\3<\3<\3=\3=\3=\3>\3>\3>\3?\3?\3"+ + "?\3@\3@\3@\3A\3A\3A\3B\3B\3C\3C\3C\3D\3D\3D\3E\3E\3E\3F\3F\3F\3G\3G\3"+ + "G\3H\3H\3H\3I\3I\3I\3J\3J\3J\3K\3K\3K\3L\3L\3L\3M\3M\3M\3M\3N\3N\3N\3"+ + "N\3O\3O\3O\3O\3P\3P\3P\3P\3Q\3Q\3Q\5Q\u0221\nQ\3Q\3Q\5Q\u0225\nQ\5Q\u0227"+ + "\nQ\3Q\3Q\5Q\u022b\nQ\3Q\3Q\5Q\u022f\nQ\3Q\3Q\5Q\u0233\nQ\3Q\3Q\5Q\u0237"+ + "\nQ\5Q\u0239\nQ\3R\3R\7R\u023d\nR\fR\16R\u0240\13R\3R\6R\u0243\nR\rR\16"+ + "R\u0244\5R\u0247\nR\3S\3S\3S\6S\u024c\nS\rS\16S\u024d\3T\3T\3T\6T\u0253"+ + "\nT\rT\16T\u0254\3U\3U\3U\6U\u025a\nU\rU\16U\u025b\3V\3V\6V\u0260\nV\r"+ + "V\16V\u0261\5V\u0264\nV\3V\3V\3W\3W\3X\3X\3X\3Y\3Y\3Y\3Z\3Z\3Z\3[\3[\3"+ + "[\3\\\3\\\3\\\3]\3]\3]\3^\3^\7^\u027e\n^\f^\16^\u0281\13^\3_\3_\7_\u0285"+ + "\n_\f_\16_\u0288\13_\3_\3_\3_\3_\3`\3`\3`\3`\3`\3a\6a\u0294\na\ra\16a"+ + "\u0295\3a\3a\3a\3a\3b\3b\7b\u029e\nb\fb\16b\u02a1\13b\3b\3b\3c\3c\3c\3"+ + "c\5c\u02a9\nc\3c\7c\u02ac\nc\fc\16c\u02af\13c\3c\3c\3c\3c\3c\5c\u02b6"+ + "\nc\3c\7c\u02b9\nc\fc\16c\u02bc\13c\3c\5c\u02bf\nc\3d\3d\3d\3d\3d\7d\u02c6"+ + "\nd\fd\16d\u02c9\13d\3d\3d\3d\3d\3d\3d\3d\3d\7d\u02d3\nd\fd\16d\u02d6"+ + "\13d\3d\3d\3d\5d\u02db\nd\3e\3e\3e\3e\5e\u02e1\ne\5e\u02e3\ne\3f\5f\u02e6"+ + "\nf\3f\3f\3g\6g\u02eb\ng\rg\16g\u02ec\3g\5g\u02f0\ng\3g\3g\5g\u02f4\n"+ + "g\3g\6g\u02f7\ng\rg\16g\u02f8\3g\5g\u02fc\ng\3h\7h\u02ff\nh\fh\16h\u0302"+ + "\13h\3h\3h\6h\u0306\nh\rh\16h\u0307\3h\6h\u030b\nh\rh\16h\u030c\3h\5h"+ + "\u0310\nh\3i\3i\3i\7i\u0315\ni\fi\16i\u0318\13i\3i\3i\3i\3i\7i\u031e\n"+ + "i\fi\16i\u0321\13i\3i\5i\u0324\ni\3j\3j\3j\3j\3j\7j\u032b\nj\fj\16j\u032e"+ + "\13j\3j\3j\3j\3j\3j\3j\3j\3j\7j\u0338\nj\fj\16j\u033b\13j\3j\3j\3j\5j"+ + "\u0340\nj\3k\3k\5k\u0344\nk\3l\5l\u0347\nl\3m\5m\u034a\nm\3n\5n\u034d"+ + "\nn\3o\3o\3o\3p\3p\5p\u0354\np\3q\5q\u0357\nq\6\u02c7\u02d4\u032c\u0339"+ + "\2r\3\6\5\7\7\b\t\t\13\n\r\13\17\f\21\r\23\16\25\17\27\20\31\21\33\22"+ + "\35\23\37\24!\25#\26%\27\'\30)\31+\32-\33/\34\61\35\63\36\65\37\67 9!"+ + ";\"=#?$A%C&E\'G(I)K*M+O,Q-S.U/W\60Y\61[\62]\63_\64a\65c\66e\67g8i9k:m"+ + ";ou?w@yA{B}C\177D\u0081E\u0083F\u0085G\u0087H\u0089I\u008bJ\u008d"+ + "K\u008fL\u0091M\u0093N\u0095O\u0097P\u0099Q\u009bR\u009dS\u009fT\u00a1"+ + "U\u00a3V\u00a5W\u00a7X\u00a9Y\u00abZ\u00ad[\u00af\\\u00b1]\u00b3^\u00b5"+ + "_\u00b7`\u00b9a\u00bbb\u00bdc\u00bfd\u00c1e\u00c3f\u00c5\2\u00c7\2\u00c9"+ + "\2\u00cb\2\u00cd\2\u00cf\2\u00d1\2\u00d3\2\u00d5\2\u00d7\2\u00d9\2\u00db"+ + "\2\u00dd\2\u00df\2\u00e1\2\3\2\33\4\2WWww\4\2HHhh\4\2TTtt\4\2DDdd\3\2"+ + "\63;\3\2\62;\4\2QQqq\3\2\629\4\2ZZzz\5\2\62;CHch\3\2\62\63\4\2LLll\4\2"+ + "\13\13\"\"\4\2\f\f\16\17\6\2\f\f\17\17))^^\6\2\f\f\17\17$$^^\3\2^^\4\2"+ + "GGgg\4\2--//\7\2\2\13\r\16\20(*]_\u0081\7\2\2\13\r\16\20#%]_\u0081\4\2"+ + "\2]_\u0081\3\2\2\u0081\u0096\2\62;\u0302\u0371\u0485\u0488\u0593\u05bb"+ + "\u05bd\u05bf\u05c1\u05c1\u05c3\u05c4\u05c6\u05c7\u05c9\u05c9\u0612\u0617"+ + "\u064d\u0660\u0662\u066b\u0672\u0672\u06d8\u06de\u06e1\u06e6\u06e9\u06ea"+ + "\u06ec\u06ef\u06f2\u06fb\u0713\u0713\u0732\u074c\u07a8\u07b2\u0903\u0905"+ + "\u093e\u093e\u0940\u094f\u0953\u0956\u0964\u0965\u0968\u0971\u0983\u0985"+ + "\u09be\u09be\u09c0\u09c6\u09c9\u09ca\u09cd\u09cf\u09d9\u09d9\u09e4\u09e5"+ + "\u09e8\u09f1\u0a03\u0a05\u0a3e\u0a3e\u0a40\u0a44\u0a49\u0a4a\u0a4d\u0a4f"+ + "\u0a68\u0a73\u0a83\u0a85\u0abe\u0abe\u0ac0\u0ac7\u0ac9\u0acb\u0acd\u0acf"+ + "\u0ae4\u0ae5\u0ae8\u0af1\u0b03\u0b05\u0b3e\u0b3e\u0b40\u0b45\u0b49\u0b4a"+ + "\u0b4d\u0b4f\u0b58\u0b59\u0b68\u0b71\u0b84\u0b84\u0bc0\u0bc4\u0bc8\u0bca"+ + "\u0bcc\u0bcf\u0bd9\u0bd9\u0be8\u0bf1\u0c03\u0c05\u0c40\u0c46\u0c48\u0c4a"+ + "\u0c4c\u0c4f\u0c57\u0c58\u0c68\u0c71\u0c84\u0c85\u0cbe\u0cbe\u0cc0\u0cc6"+ + "\u0cc8\u0cca\u0ccc\u0ccf\u0cd7\u0cd8\u0ce8\u0cf1\u0d04\u0d05\u0d40\u0d45"+ + "\u0d48\u0d4a\u0d4c\u0d4f\u0d59\u0d59\u0d68\u0d71\u0d84\u0d85\u0dcc\u0dcc"+ + "\u0dd1\u0dd6\u0dd8\u0dd8\u0dda\u0de1\u0df4\u0df5\u0e33\u0e33\u0e36\u0e3c"+ + "\u0e49\u0e50\u0e52\u0e5b\u0eb3\u0eb3\u0eb6\u0ebb\u0ebd\u0ebe\u0eca\u0ecf"+ + "\u0ed2\u0edb\u0f1a\u0f1b\u0f22\u0f2b\u0f37\u0f37\u0f39\u0f39\u0f3b\u0f3b"+ + "\u0f40\u0f41\u0f73\u0f86\u0f88\u0f89\u0f92\u0f99\u0f9b\u0fbe\u0fc8\u0fc8"+ + "\u102e\u1034\u1038\u103b\u1042\u104b\u1058\u105b\u1361\u1361\u136b\u1373"+ + "\u1714\u1716\u1734\u1736\u1754\u1755\u1774\u1775\u17b8\u17d5\u17df\u17df"+ + "\u17e2\u17eb\u180d\u180f\u1812\u181b\u18ab\u18ab\u1922\u192d\u1932\u193d"+ + "\u1948\u1951\u19b2\u19c2\u19ca\u19cb\u19d2\u19db\u1a19\u1a1d\u1dc2\u1dc5"+ + "\u2041\u2042\u2056\u2056\u20d2\u20de\u20e3\u20e3\u20e7\u20ed\u302c\u3031"+ + "\u309b\u309c\ua804\ua804\ua808\ua808\ua80d\ua80d\ua825\ua829\ufb20\ufb20"+ + "\ufe02\ufe11\ufe22\ufe25\ufe35\ufe36\ufe4f\ufe51\uff12\uff1b\uff41\uff41"+ + "\u0129\2C\\aac|\u00ac\u00ac\u00b7\u00b7\u00bc\u00bc\u00c2\u00d8\u00da"+ + "\u00f8\u00fa\u0243\u0252\u02c3\u02c8\u02d3\u02e2\u02e6\u02f0\u02f0\u037c"+ + "\u037c\u0388\u0388\u038a\u038c\u038e\u038e\u0390\u03a3\u03a5\u03d0\u03d2"+ + "\u03f7\u03f9\u0483\u048c\u04d0\u04d2\u04fb\u0502\u0511\u0533\u0558\u055b"+ + "\u055b\u0563\u0589\u05d2\u05ec\u05f2\u05f4\u0623\u063c\u0642\u064c\u0670"+ + "\u0671\u0673\u06d5\u06d7\u06d7\u06e7\u06e8\u06f0\u06f1\u06fc\u06fe\u0701"+ + "\u0701\u0712\u0712\u0714\u0731\u074f\u076f\u0782\u07a7\u07b3\u07b3\u0906"+ + "\u093b\u093f\u093f\u0952\u0952\u095a\u0963\u097f\u097f\u0987\u098e\u0991"+ + "\u0992\u0995\u09aa\u09ac\u09b2\u09b4\u09b4\u09b8\u09bb\u09bf\u09bf\u09d0"+ + "\u09d0\u09de\u09df\u09e1\u09e3\u09f2\u09f3\u0a07\u0a0c\u0a11\u0a12\u0a15"+ + "\u0a2a\u0a2c\u0a32\u0a34\u0a35\u0a37\u0a38\u0a3a\u0a3b\u0a5b\u0a5e\u0a60"+ + "\u0a60\u0a74\u0a76\u0a87\u0a8f\u0a91\u0a93\u0a95\u0aaa\u0aac\u0ab2\u0ab4"+ + "\u0ab5\u0ab7\u0abb\u0abf\u0abf\u0ad2\u0ad2\u0ae2\u0ae3\u0b07\u0b0e\u0b11"+ + "\u0b12\u0b15\u0b2a\u0b2c\u0b32\u0b34\u0b35\u0b37\u0b3b\u0b3f\u0b3f\u0b5e"+ + "\u0b5f\u0b61\u0b63\u0b73\u0b73\u0b85\u0b85\u0b87\u0b8c\u0b90\u0b92\u0b94"+ + "\u0b97\u0b9b\u0b9c\u0b9e\u0b9e\u0ba0\u0ba1\u0ba5\u0ba6\u0baa\u0bac\u0bb0"+ + "\u0bbb\u0c07\u0c0e\u0c10\u0c12\u0c14\u0c2a\u0c2c\u0c35\u0c37\u0c3b\u0c62"+ + "\u0c63\u0c87\u0c8e\u0c90\u0c92\u0c94\u0caa\u0cac\u0cb5\u0cb7\u0cbb\u0cbf"+ + "\u0cbf\u0ce0\u0ce0\u0ce2\u0ce3\u0d07\u0d0e\u0d10\u0d12\u0d14\u0d2a\u0d2c"+ + "\u0d3b\u0d62\u0d63\u0d87\u0d98\u0d9c\u0db3\u0db5\u0dbd\u0dbf\u0dbf\u0dc2"+ + "\u0dc8\u0e03\u0e32\u0e34\u0e35\u0e42\u0e48\u0e83\u0e84\u0e86\u0e86\u0e89"+ + "\u0e8a\u0e8c\u0e8c\u0e8f\u0e8f\u0e96\u0e99\u0e9b\u0ea1\u0ea3\u0ea5\u0ea7"+ + "\u0ea7\u0ea9\u0ea9\u0eac\u0ead\u0eaf\u0eb2\u0eb4\u0eb5\u0ebf\u0ebf\u0ec2"+ + "\u0ec6\u0ec8\u0ec8\u0ede\u0edf\u0f02\u0f02\u0f42\u0f49\u0f4b\u0f6c\u0f8a"+ + "\u0f8d\u1002\u1023\u1025\u1029\u102b\u102c\u1052\u1057\u10a2\u10c7\u10d2"+ + "\u10fc\u10fe\u10fe\u1102\u115b\u1161\u11a4\u11aa\u11fb\u1202\u124a\u124c"+ + "\u124f\u1252\u1258\u125a\u125a\u125c\u125f\u1262\u128a\u128c\u128f\u1292"+ + "\u12b2\u12b4\u12b7\u12ba\u12c0\u12c2\u12c2\u12c4\u12c7\u12ca\u12d8\u12da"+ + "\u1312\u1314\u1317\u131a\u135c\u1382\u1391\u13a2\u13f6\u1403\u166e\u1671"+ + "\u1678\u1683\u169c\u16a2\u16ec\u16f0\u16f2\u1702\u170e\u1710\u1713\u1722"+ + "\u1733\u1742\u1753\u1762\u176e\u1770\u1772\u1782\u17b5\u17d9\u17d9\u17de"+ + "\u17de\u1822\u1879\u1882\u18aa\u1902\u191e\u1952\u196f\u1972\u1976\u1982"+ + "\u19ab\u19c3\u19c9\u1a02\u1a18\u1d02\u1dc1\u1e02\u1e9d\u1ea2\u1efb\u1f02"+ + "\u1f17\u1f1a\u1f1f\u1f22\u1f47\u1f4a\u1f4f\u1f52\u1f59\u1f5b\u1f5b\u1f5d"+ + "\u1f5d\u1f5f\u1f5f\u1f61\u1f7f\u1f82\u1fb6\u1fb8\u1fbe\u1fc0\u1fc0\u1fc4"+ + "\u1fc6\u1fc8\u1fce\u1fd2\u1fd5\u1fd8\u1fdd\u1fe2\u1fee\u1ff4\u1ff6\u1ff8"+ + "\u1ffe\u2073\u2073\u2081\u2081\u2092\u2096\u2104\u2104\u2109\u2109\u210c"+ + "\u2115\u2117\u2117\u211a\u211f\u2126\u2126\u2128\u2128\u212a\u212a\u212c"+ + "\u2133\u2135\u213b\u213e\u2141\u2147\u214b\u2162\u2185\u2c02\u2c30\u2c32"+ + "\u2c60\u2c82\u2ce6\u2d02\u2d27\u2d32\u2d67\u2d71\u2d71\u2d82\u2d98\u2da2"+ + "\u2da8\u2daa\u2db0\u2db2\u2db8\u2dba\u2dc0\u2dc2\u2dc8\u2dca\u2dd0\u2dd2"+ + "\u2dd8\u2dda\u2de0\u3007\u3009\u3023\u302b\u3033\u3037\u303a\u303e\u3043"+ + "\u3098\u309d\u30a1\u30a3\u30fc\u30fe\u3101\u3107\u312e\u3133\u3190\u31a2"+ + "\u31b9\u31f2\u3201\u3402\u4db7\u4e02\u9fbd\ua002\ua48e\ua802\ua803\ua805"+ + "\ua807\ua809\ua80c\ua80e\ua824\uac02\ud7a5\uf902\ufa2f\ufa32\ufa6c\ufa72"+ + "\ufadb\ufb02\ufb08\ufb15\ufb19\ufb1f\ufb1f\ufb21\ufb2a\ufb2c\ufb38\ufb3a"+ + "\ufb3e\ufb40\ufb40\ufb42\ufb43\ufb45\ufb46\ufb48\ufbb3\ufbd5\ufd3f\ufd52"+ + "\ufd91\ufd94\ufdc9\ufdf2\ufdfd\ufe72\ufe76\ufe78\ufefe\uff23\uff3c\uff43"+ + "\uff5c\uff68\uffc0\uffc4\uffc9\uffcc\uffd1\uffd4\uffd9\uffdc\uffde\2\u037e"+ + "\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2"+ + "\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2"+ + "\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2"+ + "\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2"+ + "\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3"+ + "\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2"+ + "\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2"+ + "U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3"+ + "\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2"+ + "\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2"+ + "{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085"+ + "\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2"+ + "\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097"+ + "\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2\2\2\u009f\3\2\2"+ + "\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9"+ + "\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2"+ + "\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb"+ + "\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2"+ + "\2\3\u00e3\3\2\2\2\5\u00e7\3\2\2\2\7\u00ee\3\2\2\2\t\u00f4\3\2\2\2\13"+ + "\u00f9\3\2\2\2\r\u0100\3\2\2\2\17\u0109\3\2\2\2\21\u010c\3\2\2\2\23\u0113"+ + "\3\2\2\2\25\u011a\3\2\2\2\27\u011d\3\2\2\2\31\u0122\3\2\2\2\33\u0127\3"+ + "\2\2\2\35\u012d\3\2\2\2\37\u0131\3\2\2\2!\u0134\3\2\2\2#\u0138\3\2\2\2"+ + "%\u013d\3\2\2\2\'\u0145\3\2\2\2)\u014a\3\2\2\2+\u0151\3\2\2\2-\u0158\3"+ + "\2\2\2/\u015b\3\2\2\2\61\u015f\3\2\2\2\63\u0163\3\2\2\2\65\u0166\3\2\2"+ + "\2\67\u016c\3\2\2\29\u0172\3\2\2\2;\u0176\3\2\2\2=\u017b\3\2\2\2?\u0184"+ + "\3\2\2\2A\u018a\3\2\2\2C\u0190\3\2\2\2E\u0196\3\2\2\2G\u019c\3\2\2\2I"+ + "\u01a1\3\2\2\2K\u01a6\3\2\2\2M\u01ac\3\2\2\2O\u01ae\3\2\2\2Q\u01b2\3\2"+ + "\2\2S\u01b4\3\2\2\2U\u01b6\3\2\2\2W\u01b8\3\2\2\2Y\u01ba\3\2\2\2[\u01bc"+ + "\3\2\2\2]\u01bf\3\2\2\2_\u01c1\3\2\2\2a\u01c3\3\2\2\2c\u01c5\3\2\2\2e"+ + "\u01c7\3\2\2\2g\u01ca\3\2\2\2i\u01cd\3\2\2\2k\u01cf\3\2\2\2m\u01d1\3\2"+ + "\2\2o\u01d3\3\2\2\2q\u01d5\3\2\2\2s\u01d8\3\2\2\2u\u01da\3\2\2\2w\u01dc"+ + "\3\2\2\2y\u01de\3\2\2\2{\u01e1\3\2\2\2}\u01e4\3\2\2\2\177\u01e7\3\2\2"+ + "\2\u0081\u01ea\3\2\2\2\u0083\u01ed\3\2\2\2\u0085\u01ef\3\2\2\2\u0087\u01f2"+ + "\3\2\2\2\u0089\u01f5\3\2\2\2\u008b\u01f8\3\2\2\2\u008d\u01fb\3\2\2\2\u008f"+ + "\u01fe\3\2\2\2\u0091\u0201\3\2\2\2\u0093\u0204\3\2\2\2\u0095\u0207\3\2"+ + "\2\2\u0097\u020a\3\2\2\2\u0099\u020d\3\2\2\2\u009b\u0211\3\2\2\2\u009d"+ + "\u0215\3\2\2\2\u009f\u0219\3\2\2\2\u00a1\u0238\3\2\2\2\u00a3\u0246\3\2"+ + "\2\2\u00a5\u0248\3\2\2\2\u00a7\u024f\3\2\2\2\u00a9\u0256\3\2\2\2\u00ab"+ + "\u0263\3\2\2\2\u00ad\u0267\3\2\2\2\u00af\u0269\3\2\2\2\u00b1\u026c\3\2"+ + "\2\2\u00b3\u026f\3\2\2\2\u00b5\u0272\3\2\2\2\u00b7\u0275\3\2\2\2\u00b9"+ + "\u0278\3\2\2\2\u00bb\u027b\3\2\2\2\u00bd\u0282\3\2\2\2\u00bf\u028d\3\2"+ + "\2\2\u00c1\u0293\3\2\2\2\u00c3\u029b\3\2\2\2\u00c5\u02be\3\2\2\2\u00c7"+ + "\u02da\3\2\2\2\u00c9\u02e2\3\2\2\2\u00cb\u02e5\3\2\2\2\u00cd\u02fb\3\2"+ + "\2\2\u00cf\u030f\3\2\2\2\u00d1\u0323\3\2\2\2\u00d3\u033f\3\2\2\2\u00d5"+ + "\u0343\3\2\2\2\u00d7\u0346\3\2\2\2\u00d9\u0349\3\2\2\2\u00db\u034c\3\2"+ + "\2\2\u00dd\u034e\3\2\2\2\u00df\u0353\3\2\2\2\u00e1\u0356\3\2\2\2\u00e3"+ + "\u00e4\7f\2\2\u00e4\u00e5\7g\2\2\u00e5\u00e6\7h\2\2\u00e6\4\3\2\2\2\u00e7"+ + "\u00e8\7t\2\2\u00e8\u00e9\7g\2\2\u00e9\u00ea\7v\2\2\u00ea\u00eb\7w\2\2"+ + "\u00eb\u00ec\7t\2\2\u00ec\u00ed\7p\2\2\u00ed\6\3\2\2\2\u00ee\u00ef\7t"+ + "\2\2\u00ef\u00f0\7c\2\2\u00f0\u00f1\7k\2\2\u00f1\u00f2\7u\2\2\u00f2\u00f3"+ + "\7g\2\2\u00f3\b\3\2\2\2\u00f4\u00f5\7h\2\2\u00f5\u00f6\7t\2\2\u00f6\u00f7"+ + "\7q\2\2\u00f7\u00f8\7o\2\2\u00f8\n\3\2\2\2\u00f9\u00fa\7k\2\2\u00fa\u00fb"+ + "\7o\2\2\u00fb\u00fc\7r\2\2\u00fc\u00fd\7q\2\2\u00fd\u00fe\7t\2\2\u00fe"+ + "\u00ff\7v\2\2\u00ff\f\3\2\2\2\u0100\u0101\7p\2\2\u0101\u0102\7q\2\2\u0102"+ + "\u0103\7p\2\2\u0103\u0104\7n\2\2\u0104\u0105\7q\2\2\u0105\u0106\7e\2\2"+ + "\u0106\u0107\7c\2\2\u0107\u0108\7n\2\2\u0108\16\3\2\2\2\u0109\u010a\7"+ + "c\2\2\u010a\u010b\7u\2\2\u010b\20\3\2\2\2\u010c\u010d\7i\2\2\u010d\u010e"+ + "\7n\2\2\u010e\u010f\7q\2\2\u010f\u0110\7d\2\2\u0110\u0111\7c\2\2\u0111"+ + "\u0112\7n\2\2\u0112\22\3\2\2\2\u0113\u0114\7c\2\2\u0114\u0115\7u\2\2\u0115"+ + "\u0116\7u\2\2\u0116\u0117\7g\2\2\u0117\u0118\7t\2\2\u0118\u0119\7v\2\2"+ + "\u0119\24\3\2\2\2\u011a\u011b\7k\2\2\u011b\u011c\7h\2\2\u011c\26\3\2\2"+ + "\2\u011d\u011e\7g\2\2\u011e\u011f\7n\2\2\u011f\u0120\7k\2\2\u0120\u0121"+ + "\7h\2\2\u0121\30\3\2\2\2\u0122\u0123\7g\2\2\u0123\u0124\7n\2\2\u0124\u0125"+ + "\7u\2\2\u0125\u0126\7g\2\2\u0126\32\3\2\2\2\u0127\u0128\7y\2\2\u0128\u0129"+ + "\7j\2\2\u0129\u012a\7k\2\2\u012a\u012b\7n\2\2\u012b\u012c\7g\2\2\u012c"+ + "\34\3\2\2\2\u012d\u012e\7h\2\2\u012e\u012f\7q\2\2\u012f\u0130\7t\2\2\u0130"+ + "\36\3\2\2\2\u0131\u0132\7k\2\2\u0132\u0133\7p\2\2\u0133 \3\2\2\2\u0134"+ + "\u0135\7v\2\2\u0135\u0136\7t\2\2\u0136\u0137\7{\2\2\u0137\"\3\2\2\2\u0138"+ + "\u0139\7P\2\2\u0139\u013a\7q\2\2\u013a\u013b\7p\2\2\u013b\u013c\7g\2\2"+ + "\u013c$\3\2\2\2\u013d\u013e\7h\2\2\u013e\u013f\7k\2\2\u013f\u0140\7p\2"+ + "\2\u0140\u0141\7c\2\2\u0141\u0142\7n\2\2\u0142\u0143\7n\2\2\u0143\u0144"+ + "\7{\2\2\u0144&\3\2\2\2\u0145\u0146\7y\2\2\u0146\u0147\7k\2\2\u0147\u0148"+ + "\7v\2\2\u0148\u0149\7j\2\2\u0149(\3\2\2\2\u014a\u014b\7g\2\2\u014b\u014c"+ + "\7z\2\2\u014c\u014d\7e\2\2\u014d\u014e\7g\2\2\u014e\u014f\7r\2\2\u014f"+ + "\u0150\7v\2\2\u0150*\3\2\2\2\u0151\u0152\7n\2\2\u0152\u0153\7c\2\2\u0153"+ + "\u0154\7o\2\2\u0154\u0155\7d\2\2\u0155\u0156\7f\2\2\u0156\u0157\7c\2\2"+ + "\u0157,\3\2\2\2\u0158\u0159\7q\2\2\u0159\u015a\7t\2\2\u015a.\3\2\2\2\u015b"+ + "\u015c\7c\2\2\u015c\u015d\7p\2\2\u015d\u015e\7f\2\2\u015e\60\3\2\2\2\u015f"+ + "\u0160\7p\2\2\u0160\u0161\7q\2\2\u0161\u0162\7v\2\2\u0162\62\3\2\2\2\u0163"+ + "\u0164\7k\2\2\u0164\u0165\7u\2\2\u0165\64\3\2\2\2\u0166\u0167\7e\2\2\u0167"+ + "\u0168\7n\2\2\u0168\u0169\7c\2\2\u0169\u016a\7u\2\2\u016a\u016b\7u\2\2"+ + "\u016b\66\3\2\2\2\u016c\u016d\7{\2\2\u016d\u016e\7k\2\2\u016e\u016f\7"+ + "g\2\2\u016f\u0170\7n\2\2\u0170\u0171\7f\2\2\u01718\3\2\2\2\u0172\u0173"+ + "\7f\2\2\u0173\u0174\7g\2\2\u0174\u0175\7n\2\2\u0175:\3\2\2\2\u0176\u0177"+ + "\7r\2\2\u0177\u0178\7c\2\2\u0178\u0179\7u\2\2\u0179\u017a\7u\2\2\u017a"+ + "<\3\2\2\2\u017b\u017c\7e\2\2\u017c\u017d\7q\2\2\u017d\u017e\7p\2\2\u017e"+ + "\u017f\7v\2\2\u017f\u0180\7k\2\2\u0180\u0181\7p\2\2\u0181\u0182\7w\2\2"+ + "\u0182\u0183\7g\2\2\u0183>\3\2\2\2\u0184\u0185\7d\2\2\u0185\u0186\7t\2"+ + "\2\u0186\u0187\7g\2\2\u0187\u0188\7c\2\2\u0188\u0189\7m\2\2\u0189@\3\2"+ + "\2\2\u018a\u018b\7c\2\2\u018b\u018c\7u\2\2\u018c\u018d\7{\2\2\u018d\u018e"+ + "\7p\2\2\u018e\u018f\7e\2\2\u018fB\3\2\2\2\u0190\u0191\7c\2\2\u0191\u0192"+ + "\7y\2\2\u0192\u0193\7c\2\2\u0193\u0194\7k\2\2\u0194\u0195\7v\2\2\u0195"+ + "D\3\2\2\2\u0196\u0197\7r\2\2\u0197\u0198\7t\2\2\u0198\u0199\7k\2\2\u0199"+ + "\u019a\7p\2\2\u019a\u019b\7v\2\2\u019bF\3\2\2\2\u019c\u019d\7g\2\2\u019d"+ + "\u019e\7z\2\2\u019e\u019f\7g\2\2\u019f\u01a0\7e\2\2\u01a0H\3\2\2\2\u01a1"+ + "\u01a2\7V\2\2\u01a2\u01a3\7t\2\2\u01a3\u01a4\7w\2\2\u01a4\u01a5\7g\2\2"+ + "\u01a5J\3\2\2\2\u01a6\u01a7\7H\2\2\u01a7\u01a8\7c\2\2\u01a8\u01a9\7n\2"+ + "\2\u01a9\u01aa\7u\2\2\u01aa\u01ab\7g\2\2\u01abL\3\2\2\2\u01ac\u01ad\7"+ + "\60\2\2\u01adN\3\2\2\2\u01ae\u01af\7\60\2\2\u01af\u01b0\7\60\2\2\u01b0"+ + "\u01b1\7\60\2\2\u01b1P\3\2\2\2\u01b2\u01b3\7b\2\2\u01b3R\3\2\2\2\u01b4"+ + "\u01b5\7,\2\2\u01b5T\3\2\2\2\u01b6\u01b7\7.\2\2\u01b7V\3\2\2\2\u01b8\u01b9"+ + "\7<\2\2\u01b9X\3\2\2\2\u01ba\u01bb\7=\2\2\u01bbZ\3\2\2\2\u01bc\u01bd\7"+ + ",\2\2\u01bd\u01be\7,\2\2\u01be\\\3\2\2\2\u01bf\u01c0\7?\2\2\u01c0^\3\2"+ + "\2\2\u01c1\u01c2\7~\2\2\u01c2`\3\2\2\2\u01c3\u01c4\7`\2\2\u01c4b\3\2\2"+ + "\2\u01c5\u01c6\7(\2\2\u01c6d\3\2\2\2\u01c7\u01c8\7>\2\2\u01c8\u01c9\7"+ + ">\2\2\u01c9f\3\2\2\2\u01ca\u01cb\7@\2\2\u01cb\u01cc\7@\2\2\u01cch\3\2"+ + "\2\2\u01cd\u01ce\7-\2\2\u01cej\3\2\2\2\u01cf\u01d0\7/\2\2\u01d0l\3\2\2"+ + "\2\u01d1\u01d2\7\61\2\2\u01d2n\3\2\2\2\u01d3\u01d4\7\'\2\2\u01d4p\3\2"+ + "\2\2\u01d5\u01d6\7\61\2\2\u01d6\u01d7\7\61\2\2\u01d7r\3\2\2\2\u01d8\u01d9"+ + "\7\u0080\2\2\u01d9t\3\2\2\2\u01da\u01db\7>\2\2\u01dbv\3\2\2\2\u01dc\u01dd"+ + "\7@\2\2\u01ddx\3\2\2\2\u01de\u01df\7?\2\2\u01df\u01e0\7?\2\2\u01e0z\3"+ + "\2\2\2\u01e1\u01e2\7@\2\2\u01e2\u01e3\7?\2\2\u01e3|\3\2\2\2\u01e4\u01e5"+ + "\7>\2\2\u01e5\u01e6\7?\2\2\u01e6~\3\2\2\2\u01e7\u01e8\7>\2\2\u01e8\u01e9"+ + "\7@\2\2\u01e9\u0080\3\2\2\2\u01ea\u01eb\7#\2\2\u01eb\u01ec\7?\2\2\u01ec"+ + "\u0082\3\2\2\2\u01ed\u01ee\7B\2\2\u01ee\u0084\3\2\2\2\u01ef\u01f0\7/\2"+ + "\2\u01f0\u01f1\7@\2\2\u01f1\u0086\3\2\2\2\u01f2\u01f3\7-\2\2\u01f3\u01f4"+ + "\7?\2\2\u01f4\u0088\3\2\2\2\u01f5\u01f6\7/\2\2\u01f6\u01f7\7?\2\2\u01f7"+ + "\u008a\3\2\2\2\u01f8\u01f9\7,\2\2\u01f9\u01fa\7?\2\2\u01fa\u008c\3\2\2"+ + "\2\u01fb\u01fc\7B\2\2\u01fc\u01fd\7?\2\2\u01fd\u008e\3\2\2\2\u01fe\u01ff"+ + "\7\61\2\2\u01ff\u0200\7?\2\2\u0200\u0090\3\2\2\2\u0201\u0202\7\'\2\2\u0202"+ + "\u0203\7?\2\2\u0203\u0092\3\2\2\2\u0204\u0205\7(\2\2\u0205\u0206\7?\2"+ + "\2\u0206\u0094\3\2\2\2\u0207\u0208\7~\2\2\u0208\u0209\7?\2\2\u0209\u0096"+ + "\3\2\2\2\u020a\u020b\7`\2\2\u020b\u020c\7?\2\2\u020c\u0098\3\2\2\2\u020d"+ + "\u020e\7>\2\2\u020e\u020f\7>\2\2\u020f\u0210\7?\2\2\u0210\u009a\3\2\2"+ + "\2\u0211\u0212\7@\2\2\u0212\u0213\7@\2\2\u0213\u0214\7?\2\2\u0214\u009c"+ + "\3\2\2\2\u0215\u0216\7,\2\2\u0216\u0217\7,\2\2\u0217\u0218\7?\2\2\u0218"+ + "\u009e\3\2\2\2\u0219\u021a\7\61\2\2\u021a\u021b\7\61\2\2\u021b\u021c\7"+ + "?\2\2\u021c\u00a0\3\2\2\2\u021d\u0227\t\2\2\2\u021e\u0220\t\3\2\2\u021f"+ + "\u0221\t\4\2\2\u0220\u021f\3\2\2\2\u0220\u0221\3\2\2\2\u0221\u0227\3\2"+ + "\2\2\u0222\u0224\t\4\2\2\u0223\u0225\t\3\2\2\u0224\u0223\3\2\2\2\u0224"+ + "\u0225\3\2\2\2\u0225\u0227\3\2\2\2\u0226\u021d\3\2\2\2\u0226\u021e\3\2"+ + "\2\2\u0226\u0222\3\2\2\2\u0226\u0227\3\2\2\2\u0227\u022a\3\2\2\2\u0228"+ + "\u022b\5\u00c5c\2\u0229\u022b\5\u00c7d\2\u022a\u0228\3\2\2\2\u022a\u0229"+ + "\3\2\2\2\u022b\u0239\3\2\2\2\u022c\u022e\t\5\2\2\u022d\u022f\t\4\2\2\u022e"+ + "\u022d\3\2\2\2\u022e\u022f\3\2\2\2\u022f\u0233\3\2\2\2\u0230\u0231\t\4"+ + "\2\2\u0231\u0233\t\5\2\2\u0232\u022c\3\2\2\2\u0232\u0230\3\2\2\2\u0233"+ + "\u0236\3\2\2\2\u0234\u0237\5\u00d1i\2\u0235\u0237\5\u00d3j\2\u0236\u0234"+ + "\3\2\2\2\u0236\u0235\3\2\2\2\u0237\u0239\3\2\2\2\u0238\u0226\3\2\2\2\u0238"+ + "\u0232\3\2\2\2\u0239\u00a2\3\2\2\2\u023a\u023e\t\6\2\2\u023b\u023d\t\7"+ + "\2\2\u023c\u023b\3\2\2\2\u023d\u0240\3\2\2\2\u023e\u023c\3\2\2\2\u023e"+ + "\u023f\3\2\2\2\u023f\u0247\3\2\2\2\u0240\u023e\3\2\2\2\u0241\u0243\7\62"+ + "\2\2\u0242\u0241\3\2\2\2\u0243\u0244\3\2\2\2\u0244\u0242\3\2\2\2\u0244"+ + "\u0245\3\2\2\2\u0245\u0247\3\2\2\2\u0246\u023a\3\2\2\2\u0246\u0242\3\2"+ + "\2\2\u0247\u00a4\3\2\2\2\u0248\u0249\7\62\2\2\u0249\u024b\t\b\2\2\u024a"+ + "\u024c\t\t\2\2\u024b\u024a\3\2\2\2\u024c\u024d\3\2\2\2\u024d\u024b\3\2"+ + "\2\2\u024d\u024e\3\2\2\2\u024e\u00a6\3\2\2\2\u024f\u0250\7\62\2\2\u0250"+ + "\u0252\t\n\2\2\u0251\u0253\t\13\2\2\u0252\u0251\3\2\2\2\u0253\u0254\3"+ + "\2\2\2\u0254\u0252\3\2\2\2\u0254\u0255\3\2\2\2\u0255\u00a8\3\2\2\2\u0256"+ + "\u0257\7\62\2\2\u0257\u0259\t\5\2\2\u0258\u025a\t\f\2\2\u0259\u0258\3"+ + "\2\2\2\u025a\u025b\3\2\2\2\u025b\u0259\3\2\2\2\u025b\u025c\3\2\2\2\u025c"+ + "\u00aa\3\2\2\2\u025d\u0264\5\u00cdg\2\u025e\u0260\t\7\2\2\u025f\u025e"+ + "\3\2\2\2\u0260\u0261\3\2\2\2\u0261\u025f\3\2\2\2\u0261\u0262\3\2\2\2\u0262"+ + "\u0264\3\2\2\2\u0263\u025d\3\2\2\2\u0263\u025f\3\2\2\2\u0264\u0265\3\2"+ + "\2\2\u0265\u0266\t\r\2\2\u0266\u00ac\3\2\2\2\u0267\u0268\5\u00cdg\2\u0268"+ + "\u00ae\3\2\2\2\u0269\u026a\7*\2\2\u026a\u026b\bX\2\2\u026b\u00b0\3\2\2"+ + "\2\u026c\u026d\7+\2\2\u026d\u026e\bY\3\2\u026e\u00b2\3\2\2\2\u026f\u0270"+ + "\7}\2\2\u0270\u0271\bZ\4\2\u0271\u00b4\3\2\2\2\u0272\u0273\7\177\2\2\u0273"+ + "\u0274\b[\5\2\u0274\u00b6\3\2\2\2\u0275\u0276\7]\2\2\u0276\u0277\b\\\6"+ + "\2\u0277\u00b8\3\2\2\2\u0278\u0279\7_\2\2\u0279\u027a\b]\7\2\u027a\u00ba"+ + "\3\2\2\2\u027b\u027f\5\u00e1q\2\u027c\u027e\5\u00dfp\2\u027d\u027c\3\2"+ + "\2\2\u027e\u0281\3\2\2\2\u027f\u027d\3\2\2\2\u027f\u0280\3\2\2\2\u0280"+ + "\u00bc\3\2\2\2\u0281\u027f\3\2\2\2\u0282\u0286\7^\2\2\u0283\u0285\t\16"+ + "\2\2\u0284\u0283\3\2\2\2\u0285\u0288\3\2\2\2\u0286\u0284\3\2\2\2\u0286"+ + "\u0287\3\2\2\2\u0287\u0289\3\2\2\2\u0288\u0286\3\2\2\2\u0289\u028a\5\u00cb"+ + "f\2\u028a\u028b\3\2\2\2\u028b\u028c\b_\b\2\u028c\u00be\3\2\2\2\u028d\u028e"+ + "\5\u00cbf\2\u028e\u028f\b`\t\2\u028f\u0290\3\2\2\2\u0290\u0291\b`\b\2"+ + "\u0291\u00c0\3\2\2\2\u0292\u0294\t\16\2\2\u0293\u0292\3\2\2\2\u0294\u0295"+ + "\3\2\2\2\u0295\u0293\3\2\2\2\u0295\u0296\3\2\2\2\u0296\u0297\3\2\2\2\u0297"+ + "\u0298\ba\n\2\u0298\u0299\3\2\2\2\u0299\u029a\ba\b\2\u029a\u00c2\3\2\2"+ + "\2\u029b\u029f\7%\2\2\u029c\u029e\n\17\2\2\u029d\u029c\3\2\2\2\u029e\u02a1"+ + "\3\2\2\2\u029f\u029d\3\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a2\3\2\2\2\u02a1"+ + "\u029f\3\2\2\2\u02a2\u02a3\bb\b\2\u02a3\u00c4\3\2\2\2\u02a4\u02ad\7)\2"+ + "\2\u02a5\u02a8\7^\2\2\u02a6\u02a9\5\u00cbf\2\u02a7\u02a9\13\2\2\2\u02a8"+ + "\u02a6\3\2\2\2\u02a8\u02a7\3\2\2\2\u02a9\u02ac\3\2\2\2\u02aa\u02ac\n\20"+ + "\2\2\u02ab\u02a5\3\2\2\2\u02ab\u02aa\3\2\2\2\u02ac\u02af\3\2\2\2\u02ad"+ + "\u02ab\3\2\2\2\u02ad\u02ae\3\2\2\2\u02ae\u02b0\3\2\2\2\u02af\u02ad\3\2"+ + "\2\2\u02b0\u02bf\7)\2\2\u02b1\u02ba\7$\2\2\u02b2\u02b5\7^\2\2\u02b3\u02b6"+ + "\5\u00cbf\2\u02b4\u02b6\13\2\2\2\u02b5\u02b3\3\2\2\2\u02b5\u02b4\3\2\2"+ + "\2\u02b6\u02b9\3\2\2\2\u02b7\u02b9\n\21\2\2\u02b8\u02b2\3\2\2\2\u02b8"+ + "\u02b7\3\2\2\2\u02b9\u02bc\3\2\2\2\u02ba\u02b8\3\2\2\2\u02ba\u02bb\3\2"+ + "\2\2\u02bb\u02bd\3\2\2\2\u02bc\u02ba\3\2\2\2\u02bd\u02bf\7$\2\2\u02be"+ + "\u02a4\3\2\2\2\u02be\u02b1\3\2\2\2\u02bf\u00c6\3\2\2\2\u02c0\u02c1\7)"+ + "\2\2\u02c1\u02c2\7)\2\2\u02c2\u02c3\7)\2\2\u02c3\u02c7\3\2\2\2\u02c4\u02c6"+ + "\5\u00c9e\2\u02c5\u02c4\3\2\2\2\u02c6\u02c9\3\2\2\2\u02c7\u02c8\3\2\2"+ + "\2\u02c7\u02c5\3\2\2\2\u02c8\u02ca\3\2\2\2\u02c9\u02c7\3\2\2\2\u02ca\u02cb"+ + "\7)\2\2\u02cb\u02cc\7)\2\2\u02cc\u02db\7)\2\2\u02cd\u02ce\7$\2\2\u02ce"+ + "\u02cf\7$\2\2\u02cf\u02d0\7$\2\2\u02d0\u02d4\3\2\2\2\u02d1\u02d3\5\u00c9"+ + "e\2\u02d2\u02d1\3\2\2\2\u02d3\u02d6\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d4"+ + "\u02d2\3\2\2\2\u02d5\u02d7\3\2\2\2\u02d6\u02d4\3\2\2\2\u02d7\u02d8\7$"+ + "\2\2\u02d8\u02d9\7$\2\2\u02d9\u02db\7$\2\2\u02da\u02c0\3\2\2\2\u02da\u02cd"+ + "\3\2\2\2\u02db\u00c8\3\2\2\2\u02dc\u02e3\n\22\2\2\u02dd\u02e0\7^\2\2\u02de"+ + "\u02e1\5\u00cbf\2\u02df\u02e1\13\2\2\2\u02e0\u02de\3\2\2\2\u02e0\u02df"+ + "\3\2\2\2\u02e1\u02e3\3\2\2\2\u02e2\u02dc\3\2\2\2\u02e2\u02dd\3\2\2\2\u02e3"+ + "\u00ca\3\2\2\2\u02e4\u02e6\7\17\2\2\u02e5\u02e4\3\2\2\2\u02e5\u02e6\3"+ + "\2\2\2\u02e6\u02e7\3\2\2\2\u02e7\u02e8\7\f\2\2\u02e8\u00cc\3\2\2\2\u02e9"+ + "\u02eb\t\7\2\2\u02ea\u02e9\3\2\2\2\u02eb\u02ec\3\2\2\2\u02ec\u02ea\3\2"+ + "\2\2\u02ec\u02ed\3\2\2\2\u02ed\u02f0\3\2\2\2\u02ee\u02f0\5\u00cfh\2\u02ef"+ + "\u02ea\3\2\2\2\u02ef\u02ee\3\2\2\2\u02f0\u02f1\3\2\2\2\u02f1\u02f3\t\23"+ + "\2\2\u02f2\u02f4\t\24\2\2\u02f3\u02f2\3\2\2\2\u02f3\u02f4\3\2\2\2\u02f4"+ + "\u02f6\3\2\2\2\u02f5\u02f7\t\7\2\2\u02f6\u02f5\3\2\2\2\u02f7\u02f8\3\2"+ + "\2\2\u02f8\u02f6\3\2\2\2\u02f8\u02f9\3\2\2\2\u02f9\u02fc\3\2\2\2\u02fa"+ + "\u02fc\5\u00cfh\2\u02fb\u02ef\3\2\2\2\u02fb\u02fa\3\2\2\2\u02fc\u00ce"+ + "\3\2\2\2\u02fd\u02ff\t\7\2\2\u02fe\u02fd\3\2\2\2\u02ff\u0302\3\2\2\2\u0300"+ + "\u02fe\3\2\2\2\u0300\u0301\3\2\2\2\u0301\u0303\3\2\2\2\u0302\u0300\3\2"+ + "\2\2\u0303\u0305\7\60\2\2\u0304\u0306\t\7\2\2\u0305\u0304\3\2\2\2\u0306"+ + "\u0307\3\2\2\2\u0307\u0305\3\2\2\2\u0307\u0308\3\2\2\2\u0308\u0310\3\2"+ + "\2\2\u0309\u030b\t\7\2\2\u030a\u0309\3\2\2\2\u030b\u030c\3\2\2\2\u030c"+ + "\u030a\3\2\2\2\u030c\u030d\3\2\2\2\u030d\u030e\3\2\2\2\u030e\u0310\7\60"+ + "\2\2\u030f\u0300\3\2\2\2\u030f\u030a\3\2\2\2\u0310\u00d0\3\2\2\2\u0311"+ + "\u0316\7)\2\2\u0312\u0315\5\u00d7l\2\u0313\u0315\5\u00ddo\2\u0314\u0312"+ + "\3\2\2\2\u0314\u0313\3\2\2\2\u0315\u0318\3\2\2\2\u0316\u0314\3\2\2\2\u0316"+ + "\u0317\3\2\2\2\u0317\u0319\3\2\2\2\u0318\u0316\3\2\2\2\u0319\u0324\7)"+ + "\2\2\u031a\u031f\7$\2\2\u031b\u031e\5\u00d9m\2\u031c\u031e\5\u00ddo\2"+ + "\u031d\u031b\3\2\2\2\u031d\u031c\3\2\2\2\u031e\u0321\3\2\2\2\u031f\u031d"+ + "\3\2\2\2\u031f\u0320\3\2\2\2\u0320\u0322\3\2\2\2\u0321\u031f\3\2\2\2\u0322"+ + "\u0324\7$\2\2\u0323\u0311\3\2\2\2\u0323\u031a\3\2\2\2\u0324\u00d2\3\2"+ + "\2\2\u0325\u0326\7)\2\2\u0326\u0327\7)\2\2\u0327\u0328\7)\2\2\u0328\u032c"+ + "\3\2\2\2\u0329\u032b\5\u00d5k\2\u032a\u0329\3\2\2\2\u032b\u032e\3\2\2"+ + "\2\u032c\u032d\3\2\2\2\u032c\u032a\3\2\2\2\u032d\u032f\3\2\2\2\u032e\u032c"+ + "\3\2\2\2\u032f\u0330\7)\2\2\u0330\u0331\7)\2\2\u0331\u0340\7)\2\2\u0332"+ + "\u0333\7$\2\2\u0333\u0334\7$\2\2\u0334\u0335\7$\2\2\u0335\u0339\3\2\2"+ + "\2\u0336\u0338\5\u00d5k\2\u0337\u0336\3\2\2\2\u0338\u033b\3\2\2\2\u0339"+ + "\u033a\3\2\2\2\u0339\u0337\3\2\2\2\u033a\u033c\3\2\2\2\u033b\u0339\3\2"+ + "\2\2\u033c\u033d\7$\2\2\u033d\u033e\7$\2\2\u033e\u0340\7$\2\2\u033f\u0325"+ + "\3\2\2\2\u033f\u0332\3\2\2\2\u0340\u00d4\3\2\2\2\u0341\u0344\5\u00dbn"+ + "\2\u0342\u0344\5\u00ddo\2\u0343\u0341\3\2\2\2\u0343\u0342\3\2\2\2\u0344"+ + "\u00d6\3\2\2\2\u0345\u0347\t\25\2\2\u0346\u0345\3\2\2\2\u0347\u00d8\3"+ + "\2\2\2\u0348\u034a\t\26\2\2\u0349\u0348\3\2\2\2\u034a\u00da\3\2\2\2\u034b"+ + "\u034d\t\27\2\2\u034c\u034b\3\2\2\2\u034d\u00dc\3\2\2\2\u034e\u034f\7"+ + "^\2\2\u034f\u0350\t\30\2\2\u0350\u00de\3\2\2\2\u0351\u0354\5\u00e1q\2"+ + "\u0352\u0354\t\31\2\2\u0353\u0351\3\2\2\2\u0353\u0352\3\2\2\2\u0354\u00e0"+ + "\3\2\2\2\u0355\u0357\t\32\2\2\u0356\u0355\3\2\2\2\u0357\u00e2\3\2\2\2"+ + ";\2\u0220\u0224\u0226\u022a\u022e\u0232\u0236\u0238\u023e\u0244\u0246"+ + "\u024d\u0254\u025b\u0261\u0263\u027f\u0286\u0295\u029f\u02a8\u02ab\u02ad"+ + "\u02b5\u02b8\u02ba\u02be\u02c7\u02d4\u02da\u02e0\u02e2\u02e5\u02ec\u02ef"+ + "\u02f3\u02f8\u02fb\u0300\u0307\u030c\u030f\u0314\u0316\u031d\u031f\u0323"+ + "\u032c\u0339\u033f\u0343\u0346\u0349\u034c\u0353\u0356\13\3X\2\3Y\3\3"+ + "Z\4\3[\5\3\\\6\3]\7\2\3\2\3`\b\3a\t"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} diff --git a/docs/compare/src/main/java/pyantlr/PythonLexer.tokens b/docs/compare/src/main/java/pyantlr/PythonLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..1282117c8ef2e08acdfa44e74aad5fe6a8549244 --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonLexer.tokens @@ -0,0 +1,185 @@ +INDENT=1 +DEDENT=2 +LINE_BREAK=3 +DEF=4 +RETURN=5 +RAISE=6 +FROM=7 +IMPORT=8 +NONLOCAL=9 +AS=10 +GLOBAL=11 +ASSERT=12 +IF=13 +ELIF=14 +ELSE=15 +WHILE=16 +FOR=17 +IN=18 +TRY=19 +NONE=20 +FINALLY=21 +WITH=22 +EXCEPT=23 +LAMBDA=24 +OR=25 +AND=26 +NOT=27 +IS=28 +CLASS=29 +YIELD=30 +DEL=31 +PASS=32 +CONTINUE=33 +BREAK=34 +ASYNC=35 +AWAIT=36 +PRINT=37 +EXEC=38 +TRUE=39 +FALSE=40 +DOT=41 +ELLIPSIS=42 +REVERSE_QUOTE=43 +STAR=44 +COMMA=45 +COLON=46 +SEMI_COLON=47 +POWER=48 +ASSIGN=49 +OR_OP=50 +XOR=51 +AND_OP=52 +LEFT_SHIFT=53 +RIGHT_SHIFT=54 +ADD=55 +MINUS=56 +DIV=57 +MOD=58 +IDIV=59 +NOT_OP=60 +LESS_THAN=61 +GREATER_THAN=62 +EQUALS=63 +GT_EQ=64 +LT_EQ=65 +NOT_EQ_1=66 +NOT_EQ_2=67 +AT=68 +ARROW=69 +ADD_ASSIGN=70 +SUB_ASSIGN=71 +MULT_ASSIGN=72 +AT_ASSIGN=73 +DIV_ASSIGN=74 +MOD_ASSIGN=75 +AND_ASSIGN=76 +OR_ASSIGN=77 +XOR_ASSIGN=78 +LEFT_SHIFT_ASSIGN=79 +RIGHT_SHIFT_ASSIGN=80 +POWER_ASSIGN=81 +IDIV_ASSIGN=82 +STRING=83 +DECIMAL_INTEGER=84 +OCT_INTEGER=85 +HEX_INTEGER=86 +BIN_INTEGER=87 +IMAG_NUMBER=88 +FLOAT_NUMBER=89 +OPEN_PAREN=90 +CLOSE_PAREN=91 +OPEN_BRACE=92 +CLOSE_BRACE=93 +OPEN_BRACKET=94 +CLOSE_BRACKET=95 +NAME=96 +LINE_JOIN=97 +NEWLINE=98 +WS=99 +COMMENT=100 +'def'=4 +'return'=5 +'raise'=6 +'from'=7 +'import'=8 +'nonlocal'=9 +'as'=10 +'global'=11 +'assert'=12 +'if'=13 +'elif'=14 +'else'=15 +'while'=16 +'for'=17 +'in'=18 +'try'=19 +'None'=20 +'finally'=21 +'with'=22 +'except'=23 +'lambda'=24 +'or'=25 +'and'=26 +'not'=27 +'is'=28 +'class'=29 +'yield'=30 +'del'=31 +'pass'=32 +'continue'=33 +'break'=34 +'async'=35 +'await'=36 +'print'=37 +'exec'=38 +'True'=39 +'False'=40 +'.'=41 +'...'=42 +'`'=43 +'*'=44 +','=45 +':'=46 +';'=47 +'**'=48 +'='=49 +'|'=50 +'^'=51 +'&'=52 +'<<'=53 +'>>'=54 +'+'=55 +'-'=56 +'/'=57 +'%'=58 +'//'=59 +'~'=60 +'<'=61 +'>'=62 +'=='=63 +'>='=64 +'<='=65 +'<>'=66 +'!='=67 +'@'=68 +'->'=69 +'+='=70 +'-='=71 +'*='=72 +'@='=73 +'/='=74 +'%='=75 +'&='=76 +'|='=77 +'^='=78 +'<<='=79 +'>>='=80 +'**='=81 +'//='=82 +'('=90 +')'=91 +'{'=92 +'}'=93 +'['=94 +']'=95 diff --git a/docs/compare/src/main/java/pyantlr/PythonParser.interp b/docs/compare/src/main/java/pyantlr/PythonParser.interp new file mode 100644 index 0000000000000000000000000000000000000000..89c4e79e5d0c8722dd4424b71431c8561193bf5a --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonParser.interp @@ -0,0 +1,270 @@ +token literal names: +null +null +null +null +'def' +'return' +'raise' +'from' +'import' +'nonlocal' +'as' +'global' +'assert' +'if' +'elif' +'else' +'while' +'for' +'in' +'try' +'None' +'finally' +'with' +'except' +'lambda' +'or' +'and' +'not' +'is' +'class' +'yield' +'del' +'pass' +'continue' +'break' +'async' +'await' +'print' +'exec' +'True' +'False' +'.' +'...' +'`' +'*' +',' +':' +';' +'**' +'=' +'|' +'^' +'&' +'<<' +'>>' +'+' +'-' +'/' +'%' +'//' +'~' +'<' +'>' +'==' +'>=' +'<=' +'<>' +'!=' +'@' +'->' +'+=' +'-=' +'*=' +'@=' +'/=' +'%=' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'**=' +'//=' +null +null +null +null +null +null +null +'(' +')' +'{' +'}' +'[' +']' +null +null +null +null +null + +token symbolic names: +null +INDENT +DEDENT +LINE_BREAK +DEF +RETURN +RAISE +FROM +IMPORT +NONLOCAL +AS +GLOBAL +ASSERT +IF +ELIF +ELSE +WHILE +FOR +IN +TRY +NONE +FINALLY +WITH +EXCEPT +LAMBDA +OR +AND +NOT +IS +CLASS +YIELD +DEL +PASS +CONTINUE +BREAK +ASYNC +AWAIT +PRINT +EXEC +TRUE +FALSE +DOT +ELLIPSIS +REVERSE_QUOTE +STAR +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +STRING +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +IMAG_NUMBER +FLOAT_NUMBER +OPEN_PAREN +CLOSE_PAREN +OPEN_BRACE +CLOSE_BRACE +OPEN_BRACKET +CLOSE_BRACKET +NAME +LINE_JOIN +NEWLINE +WS +COMMENT + +rule names: +root +single_input +file_input +eval_input +stmt +compound_stmt +suite +decorator +elif_clause +else_clause +finally_clause +with_item +except_clause +classdef +funcdef +typedargslist +args +kwargs +def_parameters +def_parameter +named_parameter +simple_stmt +small_stmt +testlist_star_expr +star_expr +assign_part +exprlist +import_as_names +import_as_name +dotted_as_names +dotted_as_name +test +varargslist +vardef_parameters +vardef_parameter +varargs +varkwargs +logical_test +comparison +expr +atom +dictorsetmaker +testlist_comp +testlist +dotted_name +name +number +integer +yield_expr +yield_arg +trailer +arguments +arglist +argument +subscriptlist +subscript +sliceop +comp_for +comp_iter + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 102, 972, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 3, 2, 3, 2, 3, 2, 5, 2, 124, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 133, 10, 3, 3, 4, 3, 4, 6, 4, 137, 10, 4, 13, 4, 14, 4, 138, 3, 5, 3, 5, 7, 5, 143, 10, 5, 12, 5, 14, 5, 146, 11, 5, 3, 6, 3, 6, 5, 6, 150, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 157, 10, 7, 12, 7, 14, 7, 160, 11, 7, 3, 7, 5, 7, 163, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 170, 10, 7, 3, 7, 5, 7, 173, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 182, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 6, 7, 188, 10, 7, 13, 7, 14, 7, 189, 3, 7, 5, 7, 193, 10, 7, 3, 7, 5, 7, 196, 10, 7, 3, 7, 5, 7, 199, 10, 7, 3, 7, 5, 7, 202, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 208, 10, 7, 12, 7, 14, 7, 211, 11, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 217, 10, 7, 12, 7, 14, 7, 220, 11, 7, 3, 7, 3, 7, 5, 7, 224, 10, 7, 5, 7, 226, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 6, 8, 232, 10, 8, 13, 8, 14, 8, 233, 3, 8, 3, 8, 5, 8, 238, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 244, 10, 9, 3, 9, 5, 9, 247, 10, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 5, 13, 267, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 281, 10, 14, 5, 14, 283, 10, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 292, 10, 15, 3, 15, 5, 15, 295, 10, 15, 3, 15, 3, 15, 3, 15, 3, 16, 5, 16, 301, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 307, 10, 16, 3, 16, 3, 16, 3, 16, 5, 16, 312, 10, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 5, 17, 320, 10, 17, 3, 17, 3, 17, 3, 17, 5, 17, 325, 10, 17, 3, 17, 3, 17, 5, 17, 329, 10, 17, 3, 17, 5, 17, 332, 10, 17, 3, 17, 5, 17, 335, 10, 17, 3, 17, 3, 17, 5, 17, 339, 10, 17, 5, 17, 341, 10, 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 7, 20, 352, 10, 20, 12, 20, 14, 20, 355, 11, 20, 3, 21, 3, 21, 3, 21, 5, 21, 360, 10, 21, 3, 21, 5, 21, 363, 10, 21, 3, 22, 3, 22, 3, 22, 5, 22, 368, 10, 22, 3, 23, 3, 23, 3, 23, 7, 23, 373, 10, 23, 12, 23, 14, 23, 376, 11, 23, 3, 23, 5, 23, 379, 10, 23, 3, 23, 3, 23, 3, 24, 3, 24, 5, 24, 385, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 392, 10, 24, 12, 24, 14, 24, 395, 11, 24, 3, 24, 5, 24, 398, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 6, 24, 404, 10, 24, 13, 24, 14, 24, 405, 3, 24, 5, 24, 409, 10, 24, 5, 24, 411, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 422, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 430, 10, 24, 5, 24, 432, 10, 24, 5, 24, 434, 10, 24, 3, 24, 3, 24, 5, 24, 438, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 445, 10, 24, 12, 24, 14, 24, 448, 11, 24, 3, 24, 3, 24, 6, 24, 452, 10, 24, 13, 24, 14, 24, 453, 5, 24, 456, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 465, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 471, 10, 24, 12, 24, 14, 24, 474, 11, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 483, 10, 24, 5, 24, 485, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 493, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 500, 10, 24, 12, 24, 14, 24, 503, 11, 24, 3, 24, 3, 24, 5, 24, 507, 10, 24, 3, 25, 3, 25, 5, 25, 511, 10, 25, 3, 25, 3, 25, 6, 25, 515, 10, 25, 13, 25, 14, 25, 516, 3, 25, 3, 25, 5, 25, 521, 10, 25, 3, 25, 5, 25, 524, 10, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 7, 27, 533, 10, 27, 12, 27, 14, 27, 536, 11, 27, 3, 27, 3, 27, 5, 27, 540, 10, 27, 3, 27, 5, 27, 543, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 550, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 557, 10, 27, 5, 27, 559, 10, 27, 3, 28, 3, 28, 3, 28, 7, 28, 564, 10, 28, 12, 28, 14, 28, 567, 11, 28, 3, 28, 5, 28, 570, 10, 28, 3, 29, 3, 29, 3, 29, 7, 29, 575, 10, 29, 12, 29, 14, 29, 578, 11, 29, 3, 29, 5, 29, 581, 10, 29, 3, 30, 3, 30, 3, 30, 5, 30, 586, 10, 30, 3, 31, 3, 31, 3, 31, 7, 31, 591, 10, 31, 12, 31, 14, 31, 594, 11, 31, 3, 32, 3, 32, 3, 32, 5, 32, 599, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 607, 10, 33, 3, 33, 3, 33, 5, 33, 611, 10, 33, 3, 33, 3, 33, 5, 33, 615, 10, 33, 3, 34, 3, 34, 3, 34, 5, 34, 620, 10, 34, 3, 34, 3, 34, 3, 34, 5, 34, 625, 10, 34, 3, 34, 3, 34, 5, 34, 629, 10, 34, 3, 34, 5, 34, 632, 10, 34, 3, 34, 5, 34, 635, 10, 34, 3, 34, 3, 34, 5, 34, 639, 10, 34, 5, 34, 641, 10, 34, 3, 35, 3, 35, 3, 35, 7, 35, 646, 10, 35, 12, 35, 14, 35, 649, 11, 35, 3, 36, 3, 36, 3, 36, 5, 36, 654, 10, 36, 3, 36, 5, 36, 657, 10, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 5, 39, 669, 10, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 7, 39, 677, 10, 39, 12, 39, 14, 39, 680, 11, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 694, 10, 40, 3, 40, 3, 40, 3, 40, 5, 40, 699, 10, 40, 5, 40, 701, 10, 40, 3, 40, 7, 40, 704, 10, 40, 12, 40, 14, 40, 707, 11, 40, 3, 41, 3, 41, 5, 41, 711, 10, 41, 3, 41, 3, 41, 7, 41, 715, 10, 41, 12, 41, 14, 41, 718, 11, 41, 3, 41, 3, 41, 5, 41, 722, 10, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 7, 41, 745, 10, 41, 12, 41, 14, 41, 748, 11, 41, 3, 42, 3, 42, 3, 42, 5, 42, 753, 10, 42, 3, 42, 3, 42, 3, 42, 5, 42, 758, 10, 42, 3, 42, 3, 42, 3, 42, 5, 42, 763, 10, 42, 3, 42, 3, 42, 3, 42, 3, 42, 5, 42, 769, 10, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 5, 42, 778, 10, 42, 3, 42, 3, 42, 3, 42, 6, 42, 783, 10, 42, 13, 42, 14, 42, 784, 5, 42, 787, 10, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 5, 43, 795, 10, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 5, 43, 804, 10, 43, 7, 43, 806, 10, 43, 12, 43, 14, 43, 809, 11, 43, 3, 43, 5, 43, 812, 10, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 5, 43, 820, 10, 43, 3, 44, 3, 44, 5, 44, 824, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 5, 44, 830, 10, 44, 7, 44, 832, 10, 44, 12, 44, 14, 44, 835, 11, 44, 3, 44, 5, 44, 838, 10, 44, 5, 44, 840, 10, 44, 3, 45, 3, 45, 3, 45, 7, 45, 845, 10, 45, 12, 45, 14, 45, 848, 11, 45, 3, 45, 5, 45, 851, 10, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 7, 46, 859, 10, 46, 12, 46, 14, 46, 862, 11, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 5, 48, 869, 10, 48, 3, 49, 3, 49, 3, 50, 3, 50, 5, 50, 875, 10, 50, 3, 51, 3, 51, 3, 51, 5, 51, 880, 10, 51, 3, 52, 3, 52, 3, 52, 5, 52, 885, 10, 52, 3, 52, 5, 52, 888, 10, 52, 3, 53, 3, 53, 5, 53, 892, 10, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 899, 10, 53, 3, 54, 3, 54, 3, 54, 7, 54, 904, 10, 54, 12, 54, 14, 54, 907, 11, 54, 3, 54, 5, 54, 910, 10, 54, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 916, 10, 55, 3, 55, 3, 55, 5, 55, 920, 10, 55, 3, 56, 3, 56, 3, 56, 7, 56, 925, 10, 56, 12, 56, 14, 56, 928, 11, 56, 3, 56, 5, 56, 931, 10, 56, 3, 57, 3, 57, 3, 57, 3, 57, 5, 57, 937, 10, 57, 3, 57, 5, 57, 940, 10, 57, 5, 57, 942, 10, 57, 3, 57, 3, 57, 5, 57, 946, 10, 57, 3, 57, 5, 57, 949, 10, 57, 5, 57, 951, 10, 57, 3, 58, 3, 58, 5, 58, 955, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 962, 10, 59, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 968, 10, 60, 5, 60, 970, 10, 60, 3, 60, 2, 6, 76, 78, 80, 90, 61, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 2, 12, 3, 3, 5, 5, 3, 2, 43, 44, 3, 2, 72, 84, 4, 2, 57, 58, 62, 62, 5, 2, 46, 46, 59, 61, 70, 70, 3, 2, 57, 58, 3, 2, 55, 56, 4, 2, 41, 42, 98, 98, 3, 2, 86, 89, 4, 2, 46, 46, 50, 50, 2, 1113, 2, 123, 3, 2, 2, 2, 4, 132, 3, 2, 2, 2, 6, 136, 3, 2, 2, 2, 8, 140, 3, 2, 2, 2, 10, 149, 3, 2, 2, 2, 12, 225, 3, 2, 2, 2, 14, 237, 3, 2, 2, 2, 16, 239, 3, 2, 2, 2, 18, 250, 3, 2, 2, 2, 20, 255, 3, 2, 2, 2, 22, 259, 3, 2, 2, 2, 24, 263, 3, 2, 2, 2, 26, 268, 3, 2, 2, 2, 28, 287, 3, 2, 2, 2, 30, 300, 3, 2, 2, 2, 32, 340, 3, 2, 2, 2, 34, 342, 3, 2, 2, 2, 36, 345, 3, 2, 2, 2, 38, 348, 3, 2, 2, 2, 40, 362, 3, 2, 2, 2, 42, 364, 3, 2, 2, 2, 44, 369, 3, 2, 2, 2, 46, 506, 3, 2, 2, 2, 48, 523, 3, 2, 2, 2, 50, 525, 3, 2, 2, 2, 52, 558, 3, 2, 2, 2, 54, 560, 3, 2, 2, 2, 56, 571, 3, 2, 2, 2, 58, 582, 3, 2, 2, 2, 60, 587, 3, 2, 2, 2, 62, 595, 3, 2, 2, 2, 64, 614, 3, 2, 2, 2, 66, 640, 3, 2, 2, 2, 68, 642, 3, 2, 2, 2, 70, 656, 3, 2, 2, 2, 72, 658, 3, 2, 2, 2, 74, 661, 3, 2, 2, 2, 76, 668, 3, 2, 2, 2, 78, 681, 3, 2, 2, 2, 80, 721, 3, 2, 2, 2, 82, 786, 3, 2, 2, 2, 84, 819, 3, 2, 2, 2, 86, 823, 3, 2, 2, 2, 88, 841, 3, 2, 2, 2, 90, 852, 3, 2, 2, 2, 92, 863, 3, 2, 2, 2, 94, 868, 3, 2, 2, 2, 96, 870, 3, 2, 2, 2, 98, 872, 3, 2, 2, 2, 100, 879, 3, 2, 2, 2, 102, 887, 3, 2, 2, 2, 104, 898, 3, 2, 2, 2, 106, 900, 3, 2, 2, 2, 108, 919, 3, 2, 2, 2, 110, 921, 3, 2, 2, 2, 112, 950, 3, 2, 2, 2, 114, 952, 3, 2, 2, 2, 116, 956, 3, 2, 2, 2, 118, 969, 3, 2, 2, 2, 120, 124, 5, 4, 3, 2, 121, 124, 5, 6, 4, 2, 122, 124, 5, 8, 5, 2, 123, 120, 3, 2, 2, 2, 123, 121, 3, 2, 2, 2, 123, 122, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 126, 7, 2, 2, 3, 126, 3, 3, 2, 2, 2, 127, 133, 7, 5, 2, 2, 128, 133, 5, 44, 23, 2, 129, 130, 5, 12, 7, 2, 130, 131, 7, 5, 2, 2, 131, 133, 3, 2, 2, 2, 132, 127, 3, 2, 2, 2, 132, 128, 3, 2, 2, 2, 132, 129, 3, 2, 2, 2, 133, 5, 3, 2, 2, 2, 134, 137, 7, 5, 2, 2, 135, 137, 5, 10, 6, 2, 136, 134, 3, 2, 2, 2, 136, 135, 3, 2, 2, 2, 137, 138, 3, 2, 2, 2, 138, 136, 3, 2, 2, 2, 138, 139, 3, 2, 2, 2, 139, 7, 3, 2, 2, 2, 140, 144, 5, 88, 45, 2, 141, 143, 7, 5, 2, 2, 142, 141, 3, 2, 2, 2, 143, 146, 3, 2, 2, 2, 144, 142, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 9, 3, 2, 2, 2, 146, 144, 3, 2, 2, 2, 147, 150, 5, 44, 23, 2, 148, 150, 5, 12, 7, 2, 149, 147, 3, 2, 2, 2, 149, 148, 3, 2, 2, 2, 150, 11, 3, 2, 2, 2, 151, 152, 7, 15, 2, 2, 152, 153, 5, 64, 33, 2, 153, 154, 7, 48, 2, 2, 154, 158, 5, 14, 8, 2, 155, 157, 5, 18, 10, 2, 156, 155, 3, 2, 2, 2, 157, 160, 3, 2, 2, 2, 158, 156, 3, 2, 2, 2, 158, 159, 3, 2, 2, 2, 159, 162, 3, 2, 2, 2, 160, 158, 3, 2, 2, 2, 161, 163, 5, 20, 11, 2, 162, 161, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 226, 3, 2, 2, 2, 164, 165, 7, 18, 2, 2, 165, 166, 5, 64, 33, 2, 166, 167, 7, 48, 2, 2, 167, 169, 5, 14, 8, 2, 168, 170, 5, 20, 11, 2, 169, 168, 3, 2, 2, 2, 169, 170, 3, 2, 2, 2, 170, 226, 3, 2, 2, 2, 171, 173, 7, 37, 2, 2, 172, 171, 3, 2, 2, 2, 172, 173, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 175, 7, 19, 2, 2, 175, 176, 5, 54, 28, 2, 176, 177, 7, 20, 2, 2, 177, 178, 5, 88, 45, 2, 178, 179, 7, 48, 2, 2, 179, 181, 5, 14, 8, 2, 180, 182, 5, 20, 11, 2, 181, 180, 3, 2, 2, 2, 181, 182, 3, 2, 2, 2, 182, 226, 3, 2, 2, 2, 183, 184, 7, 21, 2, 2, 184, 185, 7, 48, 2, 2, 185, 198, 5, 14, 8, 2, 186, 188, 5, 26, 14, 2, 187, 186, 3, 2, 2, 2, 188, 189, 3, 2, 2, 2, 189, 187, 3, 2, 2, 2, 189, 190, 3, 2, 2, 2, 190, 192, 3, 2, 2, 2, 191, 193, 5, 20, 11, 2, 192, 191, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 195, 3, 2, 2, 2, 194, 196, 5, 22, 12, 2, 195, 194, 3, 2, 2, 2, 195, 196, 3, 2, 2, 2, 196, 199, 3, 2, 2, 2, 197, 199, 5, 22, 12, 2, 198, 187, 3, 2, 2, 2, 198, 197, 3, 2, 2, 2, 199, 226, 3, 2, 2, 2, 200, 202, 7, 37, 2, 2, 201, 200, 3, 2, 2, 2, 201, 202, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 204, 7, 24, 2, 2, 204, 209, 5, 24, 13, 2, 205, 206, 7, 47, 2, 2, 206, 208, 5, 24, 13, 2, 207, 205, 3, 2, 2, 2, 208, 211, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 209, 210, 3, 2, 2, 2, 210, 212, 3, 2, 2, 2, 211, 209, 3, 2, 2, 2, 212, 213, 7, 48, 2, 2, 213, 214, 5, 14, 8, 2, 214, 226, 3, 2, 2, 2, 215, 217, 5, 16, 9, 2, 216, 215, 3, 2, 2, 2, 217, 220, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 218, 219, 3, 2, 2, 2, 219, 223, 3, 2, 2, 2, 220, 218, 3, 2, 2, 2, 221, 224, 5, 28, 15, 2, 222, 224, 5, 30, 16, 2, 223, 221, 3, 2, 2, 2, 223, 222, 3, 2, 2, 2, 224, 226, 3, 2, 2, 2, 225, 151, 3, 2, 2, 2, 225, 164, 3, 2, 2, 2, 225, 172, 3, 2, 2, 2, 225, 183, 3, 2, 2, 2, 225, 201, 3, 2, 2, 2, 225, 218, 3, 2, 2, 2, 226, 13, 3, 2, 2, 2, 227, 238, 5, 44, 23, 2, 228, 229, 7, 5, 2, 2, 229, 231, 7, 3, 2, 2, 230, 232, 5, 10, 6, 2, 231, 230, 3, 2, 2, 2, 232, 233, 3, 2, 2, 2, 233, 231, 3, 2, 2, 2, 233, 234, 3, 2, 2, 2, 234, 235, 3, 2, 2, 2, 235, 236, 7, 4, 2, 2, 236, 238, 3, 2, 2, 2, 237, 227, 3, 2, 2, 2, 237, 228, 3, 2, 2, 2, 238, 15, 3, 2, 2, 2, 239, 240, 7, 70, 2, 2, 240, 246, 5, 90, 46, 2, 241, 243, 7, 92, 2, 2, 242, 244, 5, 106, 54, 2, 243, 242, 3, 2, 2, 2, 243, 244, 3, 2, 2, 2, 244, 245, 3, 2, 2, 2, 245, 247, 7, 93, 2, 2, 246, 241, 3, 2, 2, 2, 246, 247, 3, 2, 2, 2, 247, 248, 3, 2, 2, 2, 248, 249, 7, 5, 2, 2, 249, 17, 3, 2, 2, 2, 250, 251, 7, 16, 2, 2, 251, 252, 5, 64, 33, 2, 252, 253, 7, 48, 2, 2, 253, 254, 5, 14, 8, 2, 254, 19, 3, 2, 2, 2, 255, 256, 7, 17, 2, 2, 256, 257, 7, 48, 2, 2, 257, 258, 5, 14, 8, 2, 258, 21, 3, 2, 2, 2, 259, 260, 7, 23, 2, 2, 260, 261, 7, 48, 2, 2, 261, 262, 5, 14, 8, 2, 262, 23, 3, 2, 2, 2, 263, 266, 5, 64, 33, 2, 264, 265, 7, 12, 2, 2, 265, 267, 5, 80, 41, 2, 266, 264, 3, 2, 2, 2, 266, 267, 3, 2, 2, 2, 267, 25, 3, 2, 2, 2, 268, 282, 7, 25, 2, 2, 269, 280, 5, 64, 33, 2, 270, 271, 6, 14, 2, 2, 271, 272, 7, 47, 2, 2, 272, 273, 5, 92, 47, 2, 273, 274, 8, 14, 1, 2, 274, 281, 3, 2, 2, 2, 275, 276, 6, 14, 3, 2, 276, 277, 7, 12, 2, 2, 277, 278, 5, 92, 47, 2, 278, 279, 8, 14, 1, 2, 279, 281, 3, 2, 2, 2, 280, 270, 3, 2, 2, 2, 280, 275, 3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 283, 3, 2, 2, 2, 282, 269, 3, 2, 2, 2, 282, 283, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 285, 7, 48, 2, 2, 285, 286, 5, 14, 8, 2, 286, 27, 3, 2, 2, 2, 287, 288, 7, 31, 2, 2, 288, 294, 5, 92, 47, 2, 289, 291, 7, 92, 2, 2, 290, 292, 5, 106, 54, 2, 291, 290, 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, 293, 3, 2, 2, 2, 293, 295, 7, 93, 2, 2, 294, 289, 3, 2, 2, 2, 294, 295, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 297, 7, 48, 2, 2, 297, 298, 5, 14, 8, 2, 298, 29, 3, 2, 2, 2, 299, 301, 7, 37, 2, 2, 300, 299, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 302, 3, 2, 2, 2, 302, 303, 7, 6, 2, 2, 303, 304, 5, 92, 47, 2, 304, 306, 7, 92, 2, 2, 305, 307, 5, 32, 17, 2, 306, 305, 3, 2, 2, 2, 306, 307, 3, 2, 2, 2, 307, 308, 3, 2, 2, 2, 308, 311, 7, 93, 2, 2, 309, 310, 7, 71, 2, 2, 310, 312, 5, 64, 33, 2, 311, 309, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 313, 3, 2, 2, 2, 313, 314, 7, 48, 2, 2, 314, 315, 5, 14, 8, 2, 315, 31, 3, 2, 2, 2, 316, 317, 5, 38, 20, 2, 317, 318, 7, 47, 2, 2, 318, 320, 3, 2, 2, 2, 319, 316, 3, 2, 2, 2, 319, 320, 3, 2, 2, 2, 320, 331, 3, 2, 2, 2, 321, 324, 5, 34, 18, 2, 322, 323, 7, 47, 2, 2, 323, 325, 5, 38, 20, 2, 324, 322, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2, 325, 328, 3, 2, 2, 2, 326, 327, 7, 47, 2, 2, 327, 329, 5, 36, 19, 2, 328, 326, 3, 2, 2, 2, 328, 329, 3, 2, 2, 2, 329, 332, 3, 2, 2, 2, 330, 332, 5, 36, 19, 2, 331, 321, 3, 2, 2, 2, 331, 330, 3, 2, 2, 2, 332, 334, 3, 2, 2, 2, 333, 335, 7, 47, 2, 2, 334, 333, 3, 2, 2, 2, 334, 335, 3, 2, 2, 2, 335, 341, 3, 2, 2, 2, 336, 338, 5, 38, 20, 2, 337, 339, 7, 47, 2, 2, 338, 337, 3, 2, 2, 2, 338, 339, 3, 2, 2, 2, 339, 341, 3, 2, 2, 2, 340, 319, 3, 2, 2, 2, 340, 336, 3, 2, 2, 2, 341, 33, 3, 2, 2, 2, 342, 343, 7, 46, 2, 2, 343, 344, 5, 42, 22, 2, 344, 35, 3, 2, 2, 2, 345, 346, 7, 50, 2, 2, 346, 347, 5, 42, 22, 2, 347, 37, 3, 2, 2, 2, 348, 353, 5, 40, 21, 2, 349, 350, 7, 47, 2, 2, 350, 352, 5, 40, 21, 2, 351, 349, 3, 2, 2, 2, 352, 355, 3, 2, 2, 2, 353, 351, 3, 2, 2, 2, 353, 354, 3, 2, 2, 2, 354, 39, 3, 2, 2, 2, 355, 353, 3, 2, 2, 2, 356, 359, 5, 42, 22, 2, 357, 358, 7, 51, 2, 2, 358, 360, 5, 64, 33, 2, 359, 357, 3, 2, 2, 2, 359, 360, 3, 2, 2, 2, 360, 363, 3, 2, 2, 2, 361, 363, 7, 46, 2, 2, 362, 356, 3, 2, 2, 2, 362, 361, 3, 2, 2, 2, 363, 41, 3, 2, 2, 2, 364, 367, 5, 92, 47, 2, 365, 366, 7, 48, 2, 2, 366, 368, 5, 64, 33, 2, 367, 365, 3, 2, 2, 2, 367, 368, 3, 2, 2, 2, 368, 43, 3, 2, 2, 2, 369, 374, 5, 46, 24, 2, 370, 371, 7, 49, 2, 2, 371, 373, 5, 46, 24, 2, 372, 370, 3, 2, 2, 2, 373, 376, 3, 2, 2, 2, 374, 372, 3, 2, 2, 2, 374, 375, 3, 2, 2, 2, 375, 378, 3, 2, 2, 2, 376, 374, 3, 2, 2, 2, 377, 379, 7, 49, 2, 2, 378, 377, 3, 2, 2, 2, 378, 379, 3, 2, 2, 2, 379, 380, 3, 2, 2, 2, 380, 381, 9, 2, 2, 2, 381, 45, 3, 2, 2, 2, 382, 384, 5, 48, 25, 2, 383, 385, 5, 52, 27, 2, 384, 383, 3, 2, 2, 2, 384, 385, 3, 2, 2, 2, 385, 507, 3, 2, 2, 2, 386, 387, 6, 24, 4, 2, 387, 410, 7, 39, 2, 2, 388, 393, 5, 64, 33, 2, 389, 390, 7, 47, 2, 2, 390, 392, 5, 64, 33, 2, 391, 389, 3, 2, 2, 2, 392, 395, 3, 2, 2, 2, 393, 391, 3, 2, 2, 2, 393, 394, 3, 2, 2, 2, 394, 397, 3, 2, 2, 2, 395, 393, 3, 2, 2, 2, 396, 398, 7, 47, 2, 2, 397, 396, 3, 2, 2, 2, 397, 398, 3, 2, 2, 2, 398, 411, 3, 2, 2, 2, 399, 400, 7, 56, 2, 2, 400, 403, 5, 64, 33, 2, 401, 402, 7, 47, 2, 2, 402, 404, 5, 64, 33, 2, 403, 401, 3, 2, 2, 2, 404, 405, 3, 2, 2, 2, 405, 403, 3, 2, 2, 2, 405, 406, 3, 2, 2, 2, 406, 408, 3, 2, 2, 2, 407, 409, 7, 47, 2, 2, 408, 407, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 411, 3, 2, 2, 2, 410, 388, 3, 2, 2, 2, 410, 399, 3, 2, 2, 2, 411, 412, 3, 2, 2, 2, 412, 413, 8, 24, 1, 2, 413, 507, 3, 2, 2, 2, 414, 415, 7, 33, 2, 2, 415, 507, 5, 54, 28, 2, 416, 507, 7, 34, 2, 2, 417, 507, 7, 36, 2, 2, 418, 507, 7, 35, 2, 2, 419, 421, 7, 7, 2, 2, 420, 422, 5, 88, 45, 2, 421, 420, 3, 2, 2, 2, 421, 422, 3, 2, 2, 2, 422, 507, 3, 2, 2, 2, 423, 433, 7, 8, 2, 2, 424, 431, 5, 64, 33, 2, 425, 426, 7, 47, 2, 2, 426, 429, 5, 64, 33, 2, 427, 428, 7, 47, 2, 2, 428, 430, 5, 64, 33, 2, 429, 427, 3, 2, 2, 2, 429, 430, 3, 2, 2, 2, 430, 432, 3, 2, 2, 2, 431, 425, 3, 2, 2, 2, 431, 432, 3, 2, 2, 2, 432, 434, 3, 2, 2, 2, 433, 424, 3, 2, 2, 2, 433, 434, 3, 2, 2, 2, 434, 437, 3, 2, 2, 2, 435, 436, 7, 9, 2, 2, 436, 438, 5, 64, 33, 2, 437, 435, 3, 2, 2, 2, 437, 438, 3, 2, 2, 2, 438, 507, 3, 2, 2, 2, 439, 507, 5, 98, 50, 2, 440, 441, 7, 10, 2, 2, 441, 507, 5, 60, 31, 2, 442, 455, 7, 9, 2, 2, 443, 445, 9, 3, 2, 2, 444, 443, 3, 2, 2, 2, 445, 448, 3, 2, 2, 2, 446, 444, 3, 2, 2, 2, 446, 447, 3, 2, 2, 2, 447, 449, 3, 2, 2, 2, 448, 446, 3, 2, 2, 2, 449, 456, 5, 90, 46, 2, 450, 452, 9, 3, 2, 2, 451, 450, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 451, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 456, 3, 2, 2, 2, 455, 446, 3, 2, 2, 2, 455, 451, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 464, 7, 10, 2, 2, 458, 465, 7, 46, 2, 2, 459, 460, 7, 92, 2, 2, 460, 461, 5, 56, 29, 2, 461, 462, 7, 93, 2, 2, 462, 465, 3, 2, 2, 2, 463, 465, 5, 56, 29, 2, 464, 458, 3, 2, 2, 2, 464, 459, 3, 2, 2, 2, 464, 463, 3, 2, 2, 2, 465, 507, 3, 2, 2, 2, 466, 467, 7, 13, 2, 2, 467, 472, 5, 92, 47, 2, 468, 469, 7, 47, 2, 2, 469, 471, 5, 92, 47, 2, 470, 468, 3, 2, 2, 2, 471, 474, 3, 2, 2, 2, 472, 470, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 507, 3, 2, 2, 2, 474, 472, 3, 2, 2, 2, 475, 476, 6, 24, 5, 2, 476, 477, 7, 40, 2, 2, 477, 484, 5, 80, 41, 2, 478, 479, 7, 20, 2, 2, 479, 482, 5, 64, 33, 2, 480, 481, 7, 47, 2, 2, 481, 483, 5, 64, 33, 2, 482, 480, 3, 2, 2, 2, 482, 483, 3, 2, 2, 2, 483, 485, 3, 2, 2, 2, 484, 478, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 486, 3, 2, 2, 2, 486, 487, 8, 24, 1, 2, 487, 507, 3, 2, 2, 2, 488, 489, 7, 14, 2, 2, 489, 492, 5, 64, 33, 2, 490, 491, 7, 47, 2, 2, 491, 493, 5, 64, 33, 2, 492, 490, 3, 2, 2, 2, 492, 493, 3, 2, 2, 2, 493, 507, 3, 2, 2, 2, 494, 495, 6, 24, 6, 2, 495, 496, 7, 11, 2, 2, 496, 501, 5, 92, 47, 2, 497, 498, 7, 47, 2, 2, 498, 500, 5, 92, 47, 2, 499, 497, 3, 2, 2, 2, 500, 503, 3, 2, 2, 2, 501, 499, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 504, 3, 2, 2, 2, 503, 501, 3, 2, 2, 2, 504, 505, 8, 24, 1, 2, 505, 507, 3, 2, 2, 2, 506, 382, 3, 2, 2, 2, 506, 386, 3, 2, 2, 2, 506, 414, 3, 2, 2, 2, 506, 416, 3, 2, 2, 2, 506, 417, 3, 2, 2, 2, 506, 418, 3, 2, 2, 2, 506, 419, 3, 2, 2, 2, 506, 423, 3, 2, 2, 2, 506, 439, 3, 2, 2, 2, 506, 440, 3, 2, 2, 2, 506, 442, 3, 2, 2, 2, 506, 466, 3, 2, 2, 2, 506, 475, 3, 2, 2, 2, 506, 488, 3, 2, 2, 2, 506, 494, 3, 2, 2, 2, 507, 47, 3, 2, 2, 2, 508, 511, 5, 64, 33, 2, 509, 511, 5, 50, 26, 2, 510, 508, 3, 2, 2, 2, 510, 509, 3, 2, 2, 2, 511, 512, 3, 2, 2, 2, 512, 513, 7, 47, 2, 2, 513, 515, 3, 2, 2, 2, 514, 510, 3, 2, 2, 2, 515, 516, 3, 2, 2, 2, 516, 514, 3, 2, 2, 2, 516, 517, 3, 2, 2, 2, 517, 520, 3, 2, 2, 2, 518, 521, 5, 64, 33, 2, 519, 521, 5, 50, 26, 2, 520, 518, 3, 2, 2, 2, 520, 519, 3, 2, 2, 2, 520, 521, 3, 2, 2, 2, 521, 524, 3, 2, 2, 2, 522, 524, 5, 88, 45, 2, 523, 514, 3, 2, 2, 2, 523, 522, 3, 2, 2, 2, 524, 49, 3, 2, 2, 2, 525, 526, 7, 46, 2, 2, 526, 527, 5, 80, 41, 2, 527, 51, 3, 2, 2, 2, 528, 542, 7, 51, 2, 2, 529, 534, 5, 48, 25, 2, 530, 531, 7, 51, 2, 2, 531, 533, 5, 48, 25, 2, 532, 530, 3, 2, 2, 2, 533, 536, 3, 2, 2, 2, 534, 532, 3, 2, 2, 2, 534, 535, 3, 2, 2, 2, 535, 539, 3, 2, 2, 2, 536, 534, 3, 2, 2, 2, 537, 538, 7, 51, 2, 2, 538, 540, 5, 98, 50, 2, 539, 537, 3, 2, 2, 2, 539, 540, 3, 2, 2, 2, 540, 543, 3, 2, 2, 2, 541, 543, 5, 98, 50, 2, 542, 529, 3, 2, 2, 2, 542, 541, 3, 2, 2, 2, 543, 559, 3, 2, 2, 2, 544, 545, 6, 27, 7, 2, 545, 546, 7, 48, 2, 2, 546, 549, 5, 64, 33, 2, 547, 548, 7, 51, 2, 2, 548, 550, 5, 88, 45, 2, 549, 547, 3, 2, 2, 2, 549, 550, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 552, 8, 27, 1, 2, 552, 559, 3, 2, 2, 2, 553, 556, 9, 4, 2, 2, 554, 557, 5, 98, 50, 2, 555, 557, 5, 88, 45, 2, 556, 554, 3, 2, 2, 2, 556, 555, 3, 2, 2, 2, 557, 559, 3, 2, 2, 2, 558, 528, 3, 2, 2, 2, 558, 544, 3, 2, 2, 2, 558, 553, 3, 2, 2, 2, 559, 53, 3, 2, 2, 2, 560, 565, 5, 80, 41, 2, 561, 562, 7, 47, 2, 2, 562, 564, 5, 80, 41, 2, 563, 561, 3, 2, 2, 2, 564, 567, 3, 2, 2, 2, 565, 563, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566, 569, 3, 2, 2, 2, 567, 565, 3, 2, 2, 2, 568, 570, 7, 47, 2, 2, 569, 568, 3, 2, 2, 2, 569, 570, 3, 2, 2, 2, 570, 55, 3, 2, 2, 2, 571, 576, 5, 58, 30, 2, 572, 573, 7, 47, 2, 2, 573, 575, 5, 58, 30, 2, 574, 572, 3, 2, 2, 2, 575, 578, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 576, 577, 3, 2, 2, 2, 577, 580, 3, 2, 2, 2, 578, 576, 3, 2, 2, 2, 579, 581, 7, 47, 2, 2, 580, 579, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 57, 3, 2, 2, 2, 582, 585, 5, 92, 47, 2, 583, 584, 7, 12, 2, 2, 584, 586, 5, 92, 47, 2, 585, 583, 3, 2, 2, 2, 585, 586, 3, 2, 2, 2, 586, 59, 3, 2, 2, 2, 587, 592, 5, 62, 32, 2, 588, 589, 7, 47, 2, 2, 589, 591, 5, 62, 32, 2, 590, 588, 3, 2, 2, 2, 591, 594, 3, 2, 2, 2, 592, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 61, 3, 2, 2, 2, 594, 592, 3, 2, 2, 2, 595, 598, 5, 90, 46, 2, 596, 597, 7, 12, 2, 2, 597, 599, 5, 92, 47, 2, 598, 596, 3, 2, 2, 2, 598, 599, 3, 2, 2, 2, 599, 63, 3, 2, 2, 2, 600, 606, 5, 76, 39, 2, 601, 602, 7, 15, 2, 2, 602, 603, 5, 76, 39, 2, 603, 604, 7, 17, 2, 2, 604, 605, 5, 64, 33, 2, 605, 607, 3, 2, 2, 2, 606, 601, 3, 2, 2, 2, 606, 607, 3, 2, 2, 2, 607, 615, 3, 2, 2, 2, 608, 610, 7, 26, 2, 2, 609, 611, 5, 66, 34, 2, 610, 609, 3, 2, 2, 2, 610, 611, 3, 2, 2, 2, 611, 612, 3, 2, 2, 2, 612, 613, 7, 48, 2, 2, 613, 615, 5, 64, 33, 2, 614, 600, 3, 2, 2, 2, 614, 608, 3, 2, 2, 2, 615, 65, 3, 2, 2, 2, 616, 617, 5, 68, 35, 2, 617, 618, 7, 47, 2, 2, 618, 620, 3, 2, 2, 2, 619, 616, 3, 2, 2, 2, 619, 620, 3, 2, 2, 2, 620, 631, 3, 2, 2, 2, 621, 624, 5, 72, 37, 2, 622, 623, 7, 47, 2, 2, 623, 625, 5, 68, 35, 2, 624, 622, 3, 2, 2, 2, 624, 625, 3, 2, 2, 2, 625, 628, 3, 2, 2, 2, 626, 627, 7, 47, 2, 2, 627, 629, 5, 74, 38, 2, 628, 626, 3, 2, 2, 2, 628, 629, 3, 2, 2, 2, 629, 632, 3, 2, 2, 2, 630, 632, 5, 74, 38, 2, 631, 621, 3, 2, 2, 2, 631, 630, 3, 2, 2, 2, 632, 634, 3, 2, 2, 2, 633, 635, 7, 47, 2, 2, 634, 633, 3, 2, 2, 2, 634, 635, 3, 2, 2, 2, 635, 641, 3, 2, 2, 2, 636, 638, 5, 68, 35, 2, 637, 639, 7, 47, 2, 2, 638, 637, 3, 2, 2, 2, 638, 639, 3, 2, 2, 2, 639, 641, 3, 2, 2, 2, 640, 619, 3, 2, 2, 2, 640, 636, 3, 2, 2, 2, 641, 67, 3, 2, 2, 2, 642, 647, 5, 70, 36, 2, 643, 644, 7, 47, 2, 2, 644, 646, 5, 70, 36, 2, 645, 643, 3, 2, 2, 2, 646, 649, 3, 2, 2, 2, 647, 645, 3, 2, 2, 2, 647, 648, 3, 2, 2, 2, 648, 69, 3, 2, 2, 2, 649, 647, 3, 2, 2, 2, 650, 653, 5, 92, 47, 2, 651, 652, 7, 51, 2, 2, 652, 654, 5, 64, 33, 2, 653, 651, 3, 2, 2, 2, 653, 654, 3, 2, 2, 2, 654, 657, 3, 2, 2, 2, 655, 657, 7, 46, 2, 2, 656, 650, 3, 2, 2, 2, 656, 655, 3, 2, 2, 2, 657, 71, 3, 2, 2, 2, 658, 659, 7, 46, 2, 2, 659, 660, 5, 92, 47, 2, 660, 73, 3, 2, 2, 2, 661, 662, 7, 50, 2, 2, 662, 663, 5, 92, 47, 2, 663, 75, 3, 2, 2, 2, 664, 665, 8, 39, 1, 2, 665, 669, 5, 78, 40, 2, 666, 667, 7, 29, 2, 2, 667, 669, 5, 76, 39, 5, 668, 664, 3, 2, 2, 2, 668, 666, 3, 2, 2, 2, 669, 678, 3, 2, 2, 2, 670, 671, 12, 4, 2, 2, 671, 672, 7, 28, 2, 2, 672, 677, 5, 76, 39, 5, 673, 674, 12, 3, 2, 2, 674, 675, 7, 27, 2, 2, 675, 677, 5, 76, 39, 4, 676, 670, 3, 2, 2, 2, 676, 673, 3, 2, 2, 2, 677, 680, 3, 2, 2, 2, 678, 676, 3, 2, 2, 2, 678, 679, 3, 2, 2, 2, 679, 77, 3, 2, 2, 2, 680, 678, 3, 2, 2, 2, 681, 682, 8, 40, 1, 2, 682, 683, 5, 80, 41, 2, 683, 705, 3, 2, 2, 2, 684, 700, 12, 4, 2, 2, 685, 701, 7, 63, 2, 2, 686, 701, 7, 64, 2, 2, 687, 701, 7, 65, 2, 2, 688, 701, 7, 66, 2, 2, 689, 701, 7, 67, 2, 2, 690, 701, 7, 68, 2, 2, 691, 701, 7, 69, 2, 2, 692, 694, 7, 29, 2, 2, 693, 692, 3, 2, 2, 2, 693, 694, 3, 2, 2, 2, 694, 695, 3, 2, 2, 2, 695, 701, 7, 20, 2, 2, 696, 698, 7, 30, 2, 2, 697, 699, 7, 29, 2, 2, 698, 697, 3, 2, 2, 2, 698, 699, 3, 2, 2, 2, 699, 701, 3, 2, 2, 2, 700, 685, 3, 2, 2, 2, 700, 686, 3, 2, 2, 2, 700, 687, 3, 2, 2, 2, 700, 688, 3, 2, 2, 2, 700, 689, 3, 2, 2, 2, 700, 690, 3, 2, 2, 2, 700, 691, 3, 2, 2, 2, 700, 693, 3, 2, 2, 2, 700, 696, 3, 2, 2, 2, 701, 702, 3, 2, 2, 2, 702, 704, 5, 78, 40, 5, 703, 684, 3, 2, 2, 2, 704, 707, 3, 2, 2, 2, 705, 703, 3, 2, 2, 2, 705, 706, 3, 2, 2, 2, 706, 79, 3, 2, 2, 2, 707, 705, 3, 2, 2, 2, 708, 710, 8, 41, 1, 2, 709, 711, 7, 38, 2, 2, 710, 709, 3, 2, 2, 2, 710, 711, 3, 2, 2, 2, 711, 712, 3, 2, 2, 2, 712, 716, 5, 82, 42, 2, 713, 715, 5, 102, 52, 2, 714, 713, 3, 2, 2, 2, 715, 718, 3, 2, 2, 2, 716, 714, 3, 2, 2, 2, 716, 717, 3, 2, 2, 2, 717, 722, 3, 2, 2, 2, 718, 716, 3, 2, 2, 2, 719, 720, 9, 5, 2, 2, 720, 722, 5, 80, 41, 9, 721, 708, 3, 2, 2, 2, 721, 719, 3, 2, 2, 2, 722, 746, 3, 2, 2, 2, 723, 724, 12, 10, 2, 2, 724, 725, 7, 50, 2, 2, 725, 745, 5, 80, 41, 10, 726, 727, 12, 8, 2, 2, 727, 728, 9, 6, 2, 2, 728, 745, 5, 80, 41, 9, 729, 730, 12, 7, 2, 2, 730, 731, 9, 7, 2, 2, 731, 745, 5, 80, 41, 8, 732, 733, 12, 6, 2, 2, 733, 734, 9, 8, 2, 2, 734, 745, 5, 80, 41, 7, 735, 736, 12, 5, 2, 2, 736, 737, 7, 54, 2, 2, 737, 745, 5, 80, 41, 6, 738, 739, 12, 4, 2, 2, 739, 740, 7, 53, 2, 2, 740, 745, 5, 80, 41, 5, 741, 742, 12, 3, 2, 2, 742, 743, 7, 52, 2, 2, 743, 745, 5, 80, 41, 4, 744, 723, 3, 2, 2, 2, 744, 726, 3, 2, 2, 2, 744, 729, 3, 2, 2, 2, 744, 732, 3, 2, 2, 2, 744, 735, 3, 2, 2, 2, 744, 738, 3, 2, 2, 2, 744, 741, 3, 2, 2, 2, 745, 748, 3, 2, 2, 2, 746, 744, 3, 2, 2, 2, 746, 747, 3, 2, 2, 2, 747, 81, 3, 2, 2, 2, 748, 746, 3, 2, 2, 2, 749, 752, 7, 92, 2, 2, 750, 753, 5, 98, 50, 2, 751, 753, 5, 86, 44, 2, 752, 750, 3, 2, 2, 2, 752, 751, 3, 2, 2, 2, 752, 753, 3, 2, 2, 2, 753, 754, 3, 2, 2, 2, 754, 787, 7, 93, 2, 2, 755, 757, 7, 96, 2, 2, 756, 758, 5, 86, 44, 2, 757, 756, 3, 2, 2, 2, 757, 758, 3, 2, 2, 2, 758, 759, 3, 2, 2, 2, 759, 787, 7, 97, 2, 2, 760, 762, 7, 94, 2, 2, 761, 763, 5, 84, 43, 2, 762, 761, 3, 2, 2, 2, 762, 763, 3, 2, 2, 2, 763, 764, 3, 2, 2, 2, 764, 787, 7, 95, 2, 2, 765, 766, 7, 45, 2, 2, 766, 768, 5, 88, 45, 2, 767, 769, 7, 47, 2, 2, 768, 767, 3, 2, 2, 2, 768, 769, 3, 2, 2, 2, 769, 770, 3, 2, 2, 2, 770, 771, 7, 45, 2, 2, 771, 787, 3, 2, 2, 2, 772, 787, 7, 44, 2, 2, 773, 787, 5, 92, 47, 2, 774, 787, 7, 39, 2, 2, 775, 787, 7, 40, 2, 2, 776, 778, 7, 58, 2, 2, 777, 776, 3, 2, 2, 2, 777, 778, 3, 2, 2, 2, 778, 779, 3, 2, 2, 2, 779, 787, 5, 94, 48, 2, 780, 787, 7, 22, 2, 2, 781, 783, 7, 85, 2, 2, 782, 781, 3, 2, 2, 2, 783, 784, 3, 2, 2, 2, 784, 782, 3, 2, 2, 2, 784, 785, 3, 2, 2, 2, 785, 787, 3, 2, 2, 2, 786, 749, 3, 2, 2, 2, 786, 755, 3, 2, 2, 2, 786, 760, 3, 2, 2, 2, 786, 765, 3, 2, 2, 2, 786, 772, 3, 2, 2, 2, 786, 773, 3, 2, 2, 2, 786, 774, 3, 2, 2, 2, 786, 775, 3, 2, 2, 2, 786, 777, 3, 2, 2, 2, 786, 780, 3, 2, 2, 2, 786, 782, 3, 2, 2, 2, 787, 83, 3, 2, 2, 2, 788, 789, 5, 64, 33, 2, 789, 790, 7, 48, 2, 2, 790, 791, 5, 64, 33, 2, 791, 795, 3, 2, 2, 2, 792, 793, 7, 50, 2, 2, 793, 795, 5, 80, 41, 2, 794, 788, 3, 2, 2, 2, 794, 792, 3, 2, 2, 2, 795, 807, 3, 2, 2, 2, 796, 803, 7, 47, 2, 2, 797, 798, 5, 64, 33, 2, 798, 799, 7, 48, 2, 2, 799, 800, 5, 64, 33, 2, 800, 804, 3, 2, 2, 2, 801, 802, 7, 50, 2, 2, 802, 804, 5, 80, 41, 2, 803, 797, 3, 2, 2, 2, 803, 801, 3, 2, 2, 2, 804, 806, 3, 2, 2, 2, 805, 796, 3, 2, 2, 2, 806, 809, 3, 2, 2, 2, 807, 805, 3, 2, 2, 2, 807, 808, 3, 2, 2, 2, 808, 811, 3, 2, 2, 2, 809, 807, 3, 2, 2, 2, 810, 812, 7, 47, 2, 2, 811, 810, 3, 2, 2, 2, 811, 812, 3, 2, 2, 2, 812, 820, 3, 2, 2, 2, 813, 814, 5, 64, 33, 2, 814, 815, 7, 48, 2, 2, 815, 816, 5, 64, 33, 2, 816, 817, 5, 116, 59, 2, 817, 820, 3, 2, 2, 2, 818, 820, 5, 86, 44, 2, 819, 794, 3, 2, 2, 2, 819, 813, 3, 2, 2, 2, 819, 818, 3, 2, 2, 2, 820, 85, 3, 2, 2, 2, 821, 824, 5, 64, 33, 2, 822, 824, 5, 50, 26, 2, 823, 821, 3, 2, 2, 2, 823, 822, 3, 2, 2, 2, 824, 839, 3, 2, 2, 2, 825, 840, 5, 116, 59, 2, 826, 829, 7, 47, 2, 2, 827, 830, 5, 64, 33, 2, 828, 830, 5, 50, 26, 2, 829, 827, 3, 2, 2, 2, 829, 828, 3, 2, 2, 2, 830, 832, 3, 2, 2, 2, 831, 826, 3, 2, 2, 2, 832, 835, 3, 2, 2, 2, 833, 831, 3, 2, 2, 2, 833, 834, 3, 2, 2, 2, 834, 837, 3, 2, 2, 2, 835, 833, 3, 2, 2, 2, 836, 838, 7, 47, 2, 2, 837, 836, 3, 2, 2, 2, 837, 838, 3, 2, 2, 2, 838, 840, 3, 2, 2, 2, 839, 825, 3, 2, 2, 2, 839, 833, 3, 2, 2, 2, 840, 87, 3, 2, 2, 2, 841, 846, 5, 64, 33, 2, 842, 843, 7, 47, 2, 2, 843, 845, 5, 64, 33, 2, 844, 842, 3, 2, 2, 2, 845, 848, 3, 2, 2, 2, 846, 844, 3, 2, 2, 2, 846, 847, 3, 2, 2, 2, 847, 850, 3, 2, 2, 2, 848, 846, 3, 2, 2, 2, 849, 851, 7, 47, 2, 2, 850, 849, 3, 2, 2, 2, 850, 851, 3, 2, 2, 2, 851, 89, 3, 2, 2, 2, 852, 853, 8, 46, 1, 2, 853, 854, 5, 92, 47, 2, 854, 860, 3, 2, 2, 2, 855, 856, 12, 4, 2, 2, 856, 857, 7, 43, 2, 2, 857, 859, 5, 92, 47, 2, 858, 855, 3, 2, 2, 2, 859, 862, 3, 2, 2, 2, 860, 858, 3, 2, 2, 2, 860, 861, 3, 2, 2, 2, 861, 91, 3, 2, 2, 2, 862, 860, 3, 2, 2, 2, 863, 864, 9, 9, 2, 2, 864, 93, 3, 2, 2, 2, 865, 869, 5, 96, 49, 2, 866, 869, 7, 90, 2, 2, 867, 869, 7, 91, 2, 2, 868, 865, 3, 2, 2, 2, 868, 866, 3, 2, 2, 2, 868, 867, 3, 2, 2, 2, 869, 95, 3, 2, 2, 2, 870, 871, 9, 10, 2, 2, 871, 97, 3, 2, 2, 2, 872, 874, 7, 32, 2, 2, 873, 875, 5, 100, 51, 2, 874, 873, 3, 2, 2, 2, 874, 875, 3, 2, 2, 2, 875, 99, 3, 2, 2, 2, 876, 877, 7, 9, 2, 2, 877, 880, 5, 64, 33, 2, 878, 880, 5, 88, 45, 2, 879, 876, 3, 2, 2, 2, 879, 878, 3, 2, 2, 2, 880, 101, 3, 2, 2, 2, 881, 882, 7, 43, 2, 2, 882, 884, 5, 92, 47, 2, 883, 885, 5, 104, 53, 2, 884, 883, 3, 2, 2, 2, 884, 885, 3, 2, 2, 2, 885, 888, 3, 2, 2, 2, 886, 888, 5, 104, 53, 2, 887, 881, 3, 2, 2, 2, 887, 886, 3, 2, 2, 2, 888, 103, 3, 2, 2, 2, 889, 891, 7, 92, 2, 2, 890, 892, 5, 106, 54, 2, 891, 890, 3, 2, 2, 2, 891, 892, 3, 2, 2, 2, 892, 893, 3, 2, 2, 2, 893, 899, 7, 93, 2, 2, 894, 895, 7, 96, 2, 2, 895, 896, 5, 110, 56, 2, 896, 897, 7, 97, 2, 2, 897, 899, 3, 2, 2, 2, 898, 889, 3, 2, 2, 2, 898, 894, 3, 2, 2, 2, 899, 105, 3, 2, 2, 2, 900, 905, 5, 108, 55, 2, 901, 902, 7, 47, 2, 2, 902, 904, 5, 108, 55, 2, 903, 901, 3, 2, 2, 2, 904, 907, 3, 2, 2, 2, 905, 903, 3, 2, 2, 2, 905, 906, 3, 2, 2, 2, 906, 909, 3, 2, 2, 2, 907, 905, 3, 2, 2, 2, 908, 910, 7, 47, 2, 2, 909, 908, 3, 2, 2, 2, 909, 910, 3, 2, 2, 2, 910, 107, 3, 2, 2, 2, 911, 915, 5, 64, 33, 2, 912, 916, 5, 116, 59, 2, 913, 914, 7, 51, 2, 2, 914, 916, 5, 64, 33, 2, 915, 912, 3, 2, 2, 2, 915, 913, 3, 2, 2, 2, 915, 916, 3, 2, 2, 2, 916, 920, 3, 2, 2, 2, 917, 918, 9, 11, 2, 2, 918, 920, 5, 64, 33, 2, 919, 911, 3, 2, 2, 2, 919, 917, 3, 2, 2, 2, 920, 109, 3, 2, 2, 2, 921, 926, 5, 112, 57, 2, 922, 923, 7, 47, 2, 2, 923, 925, 5, 112, 57, 2, 924, 922, 3, 2, 2, 2, 925, 928, 3, 2, 2, 2, 926, 924, 3, 2, 2, 2, 926, 927, 3, 2, 2, 2, 927, 930, 3, 2, 2, 2, 928, 926, 3, 2, 2, 2, 929, 931, 7, 47, 2, 2, 930, 929, 3, 2, 2, 2, 930, 931, 3, 2, 2, 2, 931, 111, 3, 2, 2, 2, 932, 951, 7, 44, 2, 2, 933, 941, 5, 64, 33, 2, 934, 936, 7, 48, 2, 2, 935, 937, 5, 64, 33, 2, 936, 935, 3, 2, 2, 2, 936, 937, 3, 2, 2, 2, 937, 939, 3, 2, 2, 2, 938, 940, 5, 114, 58, 2, 939, 938, 3, 2, 2, 2, 939, 940, 3, 2, 2, 2, 940, 942, 3, 2, 2, 2, 941, 934, 3, 2, 2, 2, 941, 942, 3, 2, 2, 2, 942, 951, 3, 2, 2, 2, 943, 945, 7, 48, 2, 2, 944, 946, 5, 64, 33, 2, 945, 944, 3, 2, 2, 2, 945, 946, 3, 2, 2, 2, 946, 948, 3, 2, 2, 2, 947, 949, 5, 114, 58, 2, 948, 947, 3, 2, 2, 2, 948, 949, 3, 2, 2, 2, 949, 951, 3, 2, 2, 2, 950, 932, 3, 2, 2, 2, 950, 933, 3, 2, 2, 2, 950, 943, 3, 2, 2, 2, 951, 113, 3, 2, 2, 2, 952, 954, 7, 48, 2, 2, 953, 955, 5, 64, 33, 2, 954, 953, 3, 2, 2, 2, 954, 955, 3, 2, 2, 2, 955, 115, 3, 2, 2, 2, 956, 957, 7, 19, 2, 2, 957, 958, 5, 54, 28, 2, 958, 959, 7, 20, 2, 2, 959, 961, 5, 76, 39, 2, 960, 962, 5, 118, 60, 2, 961, 960, 3, 2, 2, 2, 961, 962, 3, 2, 2, 2, 962, 117, 3, 2, 2, 2, 963, 970, 5, 116, 59, 2, 964, 965, 7, 15, 2, 2, 965, 967, 5, 64, 33, 2, 966, 968, 5, 118, 60, 2, 967, 966, 3, 2, 2, 2, 967, 968, 3, 2, 2, 2, 968, 970, 3, 2, 2, 2, 969, 963, 3, 2, 2, 2, 969, 964, 3, 2, 2, 2, 970, 119, 3, 2, 2, 2, 153, 123, 132, 136, 138, 144, 149, 158, 162, 169, 172, 181, 189, 192, 195, 198, 201, 209, 218, 223, 225, 233, 237, 243, 246, 266, 280, 282, 291, 294, 300, 306, 311, 319, 324, 328, 331, 334, 338, 340, 353, 359, 362, 367, 374, 378, 384, 393, 397, 405, 408, 410, 421, 429, 431, 433, 437, 446, 453, 455, 464, 472, 482, 484, 492, 501, 506, 510, 516, 520, 523, 534, 539, 542, 549, 556, 558, 565, 569, 576, 580, 585, 592, 598, 606, 610, 614, 619, 624, 628, 631, 634, 638, 640, 647, 653, 656, 668, 676, 678, 693, 698, 700, 705, 710, 716, 721, 744, 746, 752, 757, 762, 768, 777, 784, 786, 794, 803, 807, 811, 819, 823, 829, 833, 837, 839, 846, 850, 860, 868, 874, 879, 884, 887, 891, 898, 905, 909, 915, 919, 926, 930, 936, 939, 941, 945, 948, 950, 954, 961, 967, 969] \ No newline at end of file diff --git a/docs/compare/src/main/java/pyantlr/PythonParser.java b/docs/compare/src/main/java/pyantlr/PythonParser.java new file mode 100644 index 0000000000000000000000000000000000000000..e9d803e51ea8d933f444444142f402fee98d9f6c --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonParser.java @@ -0,0 +1,6952 @@ +package pyantlr;// Generated from PythonParser.g4 by ANTLR 4.7.2 +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class PythonParser extends PythonBaseParser { + static { RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + INDENT=1, DEDENT=2, LINE_BREAK=3, DEF=4, RETURN=5, RAISE=6, FROM=7, IMPORT=8, + NONLOCAL=9, AS=10, GLOBAL=11, ASSERT=12, IF=13, ELIF=14, ELSE=15, WHILE=16, + FOR=17, IN=18, TRY=19, NONE=20, FINALLY=21, WITH=22, EXCEPT=23, LAMBDA=24, + OR=25, AND=26, NOT=27, IS=28, CLASS=29, YIELD=30, DEL=31, PASS=32, CONTINUE=33, + BREAK=34, ASYNC=35, AWAIT=36, PRINT=37, EXEC=38, TRUE=39, FALSE=40, DOT=41, + ELLIPSIS=42, REVERSE_QUOTE=43, STAR=44, COMMA=45, COLON=46, SEMI_COLON=47, + POWER=48, ASSIGN=49, OR_OP=50, XOR=51, AND_OP=52, LEFT_SHIFT=53, RIGHT_SHIFT=54, + ADD=55, MINUS=56, DIV=57, MOD=58, IDIV=59, NOT_OP=60, LESS_THAN=61, GREATER_THAN=62, + EQUALS=63, GT_EQ=64, LT_EQ=65, NOT_EQ_1=66, NOT_EQ_2=67, AT=68, ARROW=69, + ADD_ASSIGN=70, SUB_ASSIGN=71, MULT_ASSIGN=72, AT_ASSIGN=73, DIV_ASSIGN=74, + MOD_ASSIGN=75, AND_ASSIGN=76, OR_ASSIGN=77, XOR_ASSIGN=78, LEFT_SHIFT_ASSIGN=79, + RIGHT_SHIFT_ASSIGN=80, POWER_ASSIGN=81, IDIV_ASSIGN=82, STRING=83, DECIMAL_INTEGER=84, + OCT_INTEGER=85, HEX_INTEGER=86, BIN_INTEGER=87, IMAG_NUMBER=88, FLOAT_NUMBER=89, + OPEN_PAREN=90, CLOSE_PAREN=91, OPEN_BRACE=92, CLOSE_BRACE=93, OPEN_BRACKET=94, + CLOSE_BRACKET=95, NAME=96, LINE_JOIN=97, NEWLINE=98, WS=99, COMMENT=100; + public static final int + RULE_root = 0, RULE_single_input = 1, RULE_file_input = 2, RULE_eval_input = 3, + RULE_stmt = 4, RULE_compound_stmt = 5, RULE_suite = 6, RULE_decorator = 7, + RULE_elif_clause = 8, RULE_else_clause = 9, RULE_finally_clause = 10, + RULE_with_item = 11, RULE_except_clause = 12, RULE_classdef = 13, RULE_funcdef = 14, + RULE_typedargslist = 15, RULE_args = 16, RULE_kwargs = 17, RULE_def_parameters = 18, + RULE_def_parameter = 19, RULE_named_parameter = 20, RULE_simple_stmt = 21, + RULE_small_stmt = 22, RULE_testlist_star_expr = 23, RULE_star_expr = 24, + RULE_assign_part = 25, RULE_exprlist = 26, RULE_import_as_names = 27, + RULE_import_as_name = 28, RULE_dotted_as_names = 29, RULE_dotted_as_name = 30, + RULE_test = 31, RULE_varargslist = 32, RULE_vardef_parameters = 33, RULE_vardef_parameter = 34, + RULE_varargs = 35, RULE_varkwargs = 36, RULE_logical_test = 37, RULE_comparison = 38, + RULE_expr = 39, RULE_atom = 40, RULE_dictorsetmaker = 41, RULE_testlist_comp = 42, + RULE_testlist = 43, RULE_dotted_name = 44, RULE_name = 45, RULE_number = 46, + RULE_integer = 47, RULE_yield_expr = 48, RULE_yield_arg = 49, RULE_trailer = 50, + RULE_arguments = 51, RULE_arglist = 52, RULE_argument = 53, RULE_subscriptlist = 54, + RULE_subscript = 55, RULE_sliceop = 56, RULE_comp_for = 57, RULE_comp_iter = 58; + private static String[] makeRuleNames() { + return new String[] { + "root", "single_input", "file_input", "eval_input", "stmt", "compound_stmt", + "suite", "decorator", "elif_clause", "else_clause", "finally_clause", + "with_item", "except_clause", "classdef", "funcdef", "typedargslist", + "args", "kwargs", "def_parameters", "def_parameter", "named_parameter", + "simple_stmt", "small_stmt", "testlist_star_expr", "star_expr", "assign_part", + "exprlist", "import_as_names", "import_as_name", "dotted_as_names", "dotted_as_name", + "test", "varargslist", "vardef_parameters", "vardef_parameter", "varargs", + "varkwargs", "logical_test", "comparison", "expr", "atom", "dictorsetmaker", + "testlist_comp", "testlist", "dotted_name", "name", "number", "integer", + "yield_expr", "yield_arg", "trailer", "arguments", "arglist", "argument", + "subscriptlist", "subscript", "sliceop", "comp_for", "comp_iter" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, null, null, null, "'def'", "'return'", "'raise'", "'from'", "'import'", + "'nonlocal'", "'as'", "'global'", "'assert'", "'if'", "'elif'", "'else'", + "'while'", "'for'", "'in'", "'try'", "'None'", "'finally'", "'with'", + "'except'", "'lambda'", "'or'", "'and'", "'not'", "'is'", "'class'", + "'yield'", "'del'", "'pass'", "'continue'", "'break'", "'async'", "'await'", + "'print'", "'exec'", "'True'", "'False'", "'.'", "'...'", "'`'", "'*'", + "','", "':'", "';'", "'**'", "'='", "'|'", "'^'", "'&'", "'<<'", "'>>'", + "'+'", "'-'", "'/'", "'%'", "'//'", "'~'", "'<'", "'>'", "'=='", "'>='", + "'<='", "'<>'", "'!='", "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", + "'/='", "'%='", "'&='", "'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='", + null, null, null, null, null, null, null, "'('", "')'", "'{'", "'}'", + "'['", "']'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "INDENT", "DEDENT", "LINE_BREAK", "DEF", "RETURN", "RAISE", "FROM", + "IMPORT", "NONLOCAL", "AS", "GLOBAL", "ASSERT", "IF", "ELIF", "ELSE", + "WHILE", "FOR", "IN", "TRY", "NONE", "FINALLY", "WITH", "EXCEPT", "LAMBDA", + "OR", "AND", "NOT", "IS", "CLASS", "YIELD", "DEL", "PASS", "CONTINUE", + "BREAK", "ASYNC", "AWAIT", "PRINT", "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", + "REVERSE_QUOTE", "STAR", "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", + "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "LESS_THAN", "GREATER_THAN", "EQUALS", + "GT_EQ", "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", + "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", + "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", + "POWER_ASSIGN", "IDIV_ASSIGN", "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", + "HEX_INTEGER", "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", "OPEN_PAREN", + "CLOSE_PAREN", "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", + "NAME", "LINE_JOIN", "NEWLINE", "WS", "COMMENT" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "PythonParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public PythonParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + public static class RootContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(PythonParser.EOF, 0); } + public Single_inputContext single_input() { + return getRuleContext(Single_inputContext.class,0); + } + public File_inputContext file_input() { + return getRuleContext(File_inputContext.class,0); + } + public Eval_inputContext eval_input() { + return getRuleContext(Eval_inputContext.class,0); + } + public RootContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_root; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterRoot(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitRoot(this); + } + } + + public final RootContext root() throws RecognitionException { + RootContext _localctx = new RootContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_root); + try { + enterOuterAlt(_localctx, 1); + { + setState(121); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(118); + single_input(); + } + break; + case 2: + { + setState(119); + file_input(); + } + break; + case 3: + { + setState(120); + eval_input(); + } + break; + } + setState(123); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Single_inputContext extends ParserRuleContext { + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public Simple_stmtContext simple_stmt() { + return getRuleContext(Simple_stmtContext.class,0); + } + public Compound_stmtContext compound_stmt() { + return getRuleContext(Compound_stmtContext.class,0); + } + public Single_inputContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_single_input; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSingle_input(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSingle_input(this); + } + } + + public final Single_inputContext single_input() throws RecognitionException { + Single_inputContext _localctx = new Single_inputContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_single_input); + try { + setState(130); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(125); + match(LINE_BREAK); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(126); + simple_stmt(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(127); + compound_stmt(); + setState(128); + match(LINE_BREAK); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class File_inputContext extends ParserRuleContext { + public List LINE_BREAK() { return getTokens(PythonParser.LINE_BREAK); } + public TerminalNode LINE_BREAK(int i) { + return getToken(PythonParser.LINE_BREAK, i); + } + public List stmt() { + return getRuleContexts(StmtContext.class); + } + public StmtContext stmt(int i) { + return getRuleContext(StmtContext.class,i); + } + public File_inputContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_file_input; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFile_input(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFile_input(this); + } + } + + public final File_inputContext file_input() throws RecognitionException { + File_inputContext _localctx = new File_inputContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_file_input); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(134); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + setState(134); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { + case 1: + { + setState(132); + match(LINE_BREAK); + } + break; + case 2: + { + setState(133); + stmt(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(136); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,3,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Eval_inputContext extends ParserRuleContext { + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public List LINE_BREAK() { return getTokens(PythonParser.LINE_BREAK); } + public TerminalNode LINE_BREAK(int i) { + return getToken(PythonParser.LINE_BREAK, i); + } + public Eval_inputContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eval_input; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterEval_input(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitEval_input(this); + } + } + + public final Eval_inputContext eval_input() throws RecognitionException { + Eval_inputContext _localctx = new Eval_inputContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_eval_input); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(138); + testlist(); + setState(142); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LINE_BREAK) { + { + { + setState(139); + match(LINE_BREAK); + } + } + setState(144); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StmtContext extends ParserRuleContext { + public Simple_stmtContext simple_stmt() { + return getRuleContext(Simple_stmtContext.class,0); + } + public Compound_stmtContext compound_stmt() { + return getRuleContext(Compound_stmtContext.class,0); + } + public StmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_stmt; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterStmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitStmt(this); + } + } + + public final StmtContext stmt() throws RecognitionException { + StmtContext _localctx = new StmtContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_stmt); + try { + setState(147); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(145); + simple_stmt(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(146); + compound_stmt(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Compound_stmtContext extends ParserRuleContext { + public Compound_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compound_stmt; } + + public Compound_stmtContext() { } + public void copyFrom(Compound_stmtContext ctx) { + super.copyFrom(ctx); + } + } + public static class While_stmtContext extends Compound_stmtContext { + public TerminalNode WHILE() { return getToken(PythonParser.WHILE, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public While_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterWhile_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitWhile_stmt(this); + } + } + public static class Try_stmtContext extends Compound_stmtContext { + public TerminalNode TRY() { return getToken(PythonParser.TRY, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Finally_clauseContext finally_clause() { + return getRuleContext(Finally_clauseContext.class,0); + } + public List except_clause() { + return getRuleContexts(Except_clauseContext.class); + } + public Except_clauseContext except_clause(int i) { + return getRuleContext(Except_clauseContext.class,i); + } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public Try_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTry_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTry_stmt(this); + } + } + public static class If_stmtContext extends Compound_stmtContext { + public TestContext cond; + public TerminalNode IF() { return getToken(PythonParser.IF, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public List elif_clause() { + return getRuleContexts(Elif_clauseContext.class); + } + public Elif_clauseContext elif_clause(int i) { + return getRuleContext(Elif_clauseContext.class,i); + } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public If_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterIf_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitIf_stmt(this); + } + } + public static class With_stmtContext extends Compound_stmtContext { + public TerminalNode WITH() { return getToken(PythonParser.WITH, 0); } + public List with_item() { + return getRuleContexts(With_itemContext.class); + } + public With_itemContext with_item(int i) { + return getRuleContext(With_itemContext.class,i); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode ASYNC() { return getToken(PythonParser.ASYNC, 0); } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public With_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterWith_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitWith_stmt(this); + } + } + public static class Class_or_func_def_stmtContext extends Compound_stmtContext { + public ClassdefContext classdef() { + return getRuleContext(ClassdefContext.class,0); + } + public FuncdefContext funcdef() { + return getRuleContext(FuncdefContext.class,0); + } + public List decorator() { + return getRuleContexts(DecoratorContext.class); + } + public DecoratorContext decorator(int i) { + return getRuleContext(DecoratorContext.class,i); + } + public Class_or_func_def_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterClass_or_func_def_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitClass_or_func_def_stmt(this); + } + } + public static class For_stmtContext extends Compound_stmtContext { + public TerminalNode FOR() { return getToken(PythonParser.FOR, 0); } + public ExprlistContext exprlist() { + return getRuleContext(ExprlistContext.class,0); + } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode ASYNC() { return getToken(PythonParser.ASYNC, 0); } + public Else_clauseContext else_clause() { + return getRuleContext(Else_clauseContext.class,0); + } + public For_stmtContext(Compound_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFor_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFor_stmt(this); + } + } + + public final Compound_stmtContext compound_stmt() throws RecognitionException { + Compound_stmtContext _localctx = new Compound_stmtContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_compound_stmt); + int _la; + try { + int _alt; + setState(223); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { + case 1: + _localctx = new If_stmtContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(149); + match(IF); + setState(150); + ((If_stmtContext)_localctx).cond = test(); + setState(151); + match(COLON); + setState(152); + suite(); + setState(156); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,6,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(153); + elif_clause(); + } + } + } + setState(158); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,6,_ctx); + } + setState(160); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { + case 1: + { + setState(159); + else_clause(); + } + break; + } + } + break; + case 2: + _localctx = new While_stmtContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(162); + match(WHILE); + setState(163); + test(); + setState(164); + match(COLON); + setState(165); + suite(); + setState(167); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { + case 1: + { + setState(166); + else_clause(); + } + break; + } + } + break; + case 3: + _localctx = new For_stmtContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(170); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASYNC) { + { + setState(169); + match(ASYNC); + } + } + + setState(172); + match(FOR); + setState(173); + exprlist(); + setState(174); + match(IN); + setState(175); + testlist(); + setState(176); + match(COLON); + setState(177); + suite(); + setState(179); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + setState(178); + else_clause(); + } + break; + } + } + break; + case 4: + _localctx = new Try_stmtContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(181); + match(TRY); + setState(182); + match(COLON); + setState(183); + suite(); + setState(196); + _errHandler.sync(this); + switch (_input.LA(1)) { + case EXCEPT: + { + setState(185); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(184); + except_clause(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(187); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,11,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(190); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + { + setState(189); + else_clause(); + } + break; + } + setState(193); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { + case 1: + { + setState(192); + finally_clause(); + } + break; + } + } + break; + case FINALLY: + { + setState(195); + finally_clause(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 5: + _localctx = new With_stmtContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(199); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASYNC) { + { + setState(198); + match(ASYNC); + } + } + + setState(201); + match(WITH); + setState(202); + with_item(); + setState(207); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(203); + match(COMMA); + setState(204); + with_item(); + } + } + setState(209); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(210); + match(COLON); + setState(211); + suite(); + } + break; + case 6: + _localctx = new Class_or_func_def_stmtContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(216); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(213); + decorator(); + } + } + setState(218); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(221); + _errHandler.sync(this); + switch (_input.LA(1)) { + case CLASS: + { + setState(219); + classdef(); + } + break; + case DEF: + case ASYNC: + { + setState(220); + funcdef(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuiteContext extends ParserRuleContext { + public Simple_stmtContext simple_stmt() { + return getRuleContext(Simple_stmtContext.class,0); + } + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public TerminalNode INDENT() { return getToken(PythonParser.INDENT, 0); } + public TerminalNode DEDENT() { return getToken(PythonParser.DEDENT, 0); } + public List stmt() { + return getRuleContexts(StmtContext.class); + } + public StmtContext stmt(int i) { + return getRuleContext(StmtContext.class,i); + } + public SuiteContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_suite; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSuite(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSuite(this); + } + } + + public final SuiteContext suite() throws RecognitionException { + SuiteContext _localctx = new SuiteContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_suite); + try { + int _alt; + setState(235); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(225); + simple_stmt(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(226); + match(LINE_BREAK); + setState(227); + match(INDENT); + setState(229); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(228); + stmt(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(231); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(233); + match(DEDENT); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorContext extends ParserRuleContext { + public TerminalNode AT() { return getToken(PythonParser.AT, 0); } + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public ArglistContext arglist() { + return getRuleContext(ArglistContext.class,0); + } + public DecoratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decorator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDecorator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDecorator(this); + } + } + + public final DecoratorContext decorator() throws RecognitionException { + DecoratorContext _localctx = new DecoratorContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_decorator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(237); + match(AT); + setState(238); + dotted_name(0); + setState(244); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==OPEN_PAREN) { + { + setState(239); + match(OPEN_PAREN); + setState(241); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(240); + arglist(); + } + } + + setState(243); + match(CLOSE_PAREN); + } + } + + setState(246); + match(LINE_BREAK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Elif_clauseContext extends ParserRuleContext { + public TerminalNode ELIF() { return getToken(PythonParser.ELIF, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Elif_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elif_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterElif_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitElif_clause(this); + } + } + + public final Elif_clauseContext elif_clause() throws RecognitionException { + Elif_clauseContext _localctx = new Elif_clauseContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_elif_clause); + try { + enterOuterAlt(_localctx, 1); + { + setState(248); + match(ELIF); + setState(249); + test(); + setState(250); + match(COLON); + setState(251); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Else_clauseContext extends ParserRuleContext { + public TerminalNode ELSE() { return getToken(PythonParser.ELSE, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Else_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_else_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterElse_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitElse_clause(this); + } + } + + public final Else_clauseContext else_clause() throws RecognitionException { + Else_clauseContext _localctx = new Else_clauseContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_else_clause); + try { + enterOuterAlt(_localctx, 1); + { + setState(253); + match(ELSE); + setState(254); + match(COLON); + setState(255); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Finally_clauseContext extends ParserRuleContext { + public TerminalNode FINALLY() { return getToken(PythonParser.FINALLY, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public Finally_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finally_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFinally_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFinally_clause(this); + } + } + + public final Finally_clauseContext finally_clause() throws RecognitionException { + Finally_clauseContext _localctx = new Finally_clauseContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_finally_clause); + try { + enterOuterAlt(_localctx, 1); + { + setState(257); + match(FINALLY); + setState(258); + match(COLON); + setState(259); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class With_itemContext extends ParserRuleContext { + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public With_itemContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_with_item; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterWith_item(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitWith_item(this); + } + } + + public final With_itemContext with_item() throws RecognitionException { + With_itemContext _localctx = new With_itemContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_with_item); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(261); + test(); + setState(264); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==AS) { + { + setState(262); + match(AS); + setState(263); + expr(0); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Except_clauseContext extends ParserRuleContext { + public TerminalNode EXCEPT() { return getToken(PythonParser.EXCEPT, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public Except_clauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_except_clause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExcept_clause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExcept_clause(this); + } + } + + public final Except_clauseContext except_clause() throws RecognitionException { + Except_clauseContext _localctx = new Except_clauseContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_except_clause); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(266); + match(EXCEPT); + setState(280); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(267); + test(); + setState(278); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { + case 1: + { + setState(268); + if (!(CheckVersion(2))) throw new FailedPredicateException(this, "CheckVersion(2)"); + setState(269); + match(COMMA); + setState(270); + name(); + SetVersion(2); + } + break; + case 2: + { + setState(273); + if (!(CheckVersion(3))) throw new FailedPredicateException(this, "CheckVersion(3)"); + setState(274); + match(AS); + setState(275); + name(); + SetVersion(3); + } + break; + } + } + } + + setState(282); + match(COLON); + setState(283); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassdefContext extends ParserRuleContext { + public TerminalNode CLASS() { return getToken(PythonParser.CLASS, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public ArglistContext arglist() { + return getRuleContext(ArglistContext.class,0); + } + public ClassdefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classdef; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterClassdef(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitClassdef(this); + } + } + + public final ClassdefContext classdef() throws RecognitionException { + ClassdefContext _localctx = new ClassdefContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_classdef); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(285); + match(CLASS); + setState(286); + name(); + setState(292); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==OPEN_PAREN) { + { + setState(287); + match(OPEN_PAREN); + setState(289); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(288); + arglist(); + } + } + + setState(291); + match(CLOSE_PAREN); + } + } + + setState(294); + match(COLON); + setState(295); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FuncdefContext extends ParserRuleContext { + public TerminalNode DEF() { return getToken(PythonParser.DEF, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SuiteContext suite() { + return getRuleContext(SuiteContext.class,0); + } + public TerminalNode ASYNC() { return getToken(PythonParser.ASYNC, 0); } + public TypedargslistContext typedargslist() { + return getRuleContext(TypedargslistContext.class,0); + } + public TerminalNode ARROW() { return getToken(PythonParser.ARROW, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public FuncdefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_funcdef; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFuncdef(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFuncdef(this); + } + } + + public final FuncdefContext funcdef() throws RecognitionException { + FuncdefContext _localctx = new FuncdefContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_funcdef); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(298); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASYNC) { + { + setState(297); + match(ASYNC); + } + } + + setState(300); + match(DEF); + setState(301); + name(); + setState(302); + match(OPEN_PAREN); + setState(304); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (TRUE - 39)) | (1L << (FALSE - 39)) | (1L << (STAR - 39)) | (1L << (POWER - 39)) | (1L << (NAME - 39)))) != 0)) { + { + setState(303); + typedargslist(); + } + } + + setState(306); + match(CLOSE_PAREN); + setState(309); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ARROW) { + { + setState(307); + match(ARROW); + setState(308); + test(); + } + } + + setState(311); + match(COLON); + setState(312); + suite(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypedargslistContext extends ParserRuleContext { + public ArgsContext args() { + return getRuleContext(ArgsContext.class,0); + } + public KwargsContext kwargs() { + return getRuleContext(KwargsContext.class,0); + } + public List def_parameters() { + return getRuleContexts(Def_parametersContext.class); + } + public Def_parametersContext def_parameters(int i) { + return getRuleContext(Def_parametersContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public TypedargslistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typedargslist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTypedargslist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTypedargslist(this); + } + } + + public final TypedargslistContext typedargslist() throws RecognitionException { + TypedargslistContext _localctx = new TypedargslistContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_typedargslist); + int _la; + try { + setState(338); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(317); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { + case 1: + { + setState(314); + def_parameters(); + setState(315); + match(COMMA); + } + break; + } + setState(329); + _errHandler.sync(this); + switch (_input.LA(1)) { + case STAR: + { + setState(319); + args(); + setState(322); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + case 1: + { + setState(320); + match(COMMA); + setState(321); + def_parameters(); + } + break; + } + setState(326); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) { + case 1: + { + setState(324); + match(COMMA); + setState(325); + kwargs(); + } + break; + } + } + break; + case POWER: + { + setState(328); + kwargs(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(332); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(331); + match(COMMA); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(334); + def_parameters(); + setState(336); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(335); + match(COMMA); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgsContext extends ParserRuleContext { + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public Named_parameterContext named_parameter() { + return getRuleContext(Named_parameterContext.class,0); + } + public ArgsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_args; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArgs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArgs(this); + } + } + + public final ArgsContext args() throws RecognitionException { + ArgsContext _localctx = new ArgsContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_args); + try { + enterOuterAlt(_localctx, 1); + { + setState(340); + match(STAR); + setState(341); + named_parameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class KwargsContext extends ParserRuleContext { + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public Named_parameterContext named_parameter() { + return getRuleContext(Named_parameterContext.class,0); + } + public KwargsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_kwargs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterKwargs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitKwargs(this); + } + } + + public final KwargsContext kwargs() throws RecognitionException { + KwargsContext _localctx = new KwargsContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_kwargs); + try { + enterOuterAlt(_localctx, 1); + { + setState(343); + match(POWER); + setState(344); + named_parameter(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Def_parametersContext extends ParserRuleContext { + public List def_parameter() { + return getRuleContexts(Def_parameterContext.class); + } + public Def_parameterContext def_parameter(int i) { + return getRuleContext(Def_parameterContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Def_parametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_def_parameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDef_parameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDef_parameters(this); + } + } + + public final Def_parametersContext def_parameters() throws RecognitionException { + Def_parametersContext _localctx = new Def_parametersContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_def_parameters); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(346); + def_parameter(); + setState(351); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(347); + match(COMMA); + setState(348); + def_parameter(); + } + } + } + setState(353); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Def_parameterContext extends ParserRuleContext { + public Named_parameterContext named_parameter() { + return getRuleContext(Named_parameterContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(PythonParser.ASSIGN, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public Def_parameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_def_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDef_parameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDef_parameter(this); + } + } + + public final Def_parameterContext def_parameter() throws RecognitionException { + Def_parameterContext _localctx = new Def_parameterContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_def_parameter); + int _la; + try { + setState(360); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + case FALSE: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(354); + named_parameter(); + setState(357); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(355); + match(ASSIGN); + setState(356); + test(); + } + } + + } + break; + case STAR: + enterOuterAlt(_localctx, 2); + { + setState(359); + match(STAR); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Named_parameterContext extends ParserRuleContext { + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public Named_parameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_named_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterNamed_parameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitNamed_parameter(this); + } + } + + public final Named_parameterContext named_parameter() throws RecognitionException { + Named_parameterContext _localctx = new Named_parameterContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_named_parameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(362); + name(); + setState(365); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(363); + match(COLON); + setState(364); + test(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Simple_stmtContext extends ParserRuleContext { + public List small_stmt() { + return getRuleContexts(Small_stmtContext.class); + } + public Small_stmtContext small_stmt(int i) { + return getRuleContext(Small_stmtContext.class,i); + } + public TerminalNode LINE_BREAK() { return getToken(PythonParser.LINE_BREAK, 0); } + public TerminalNode EOF() { return getToken(PythonParser.EOF, 0); } + public List SEMI_COLON() { return getTokens(PythonParser.SEMI_COLON); } + public TerminalNode SEMI_COLON(int i) { + return getToken(PythonParser.SEMI_COLON, i); + } + public Simple_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_simple_stmt; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSimple_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSimple_stmt(this); + } + } + + public final Simple_stmtContext simple_stmt() throws RecognitionException { + Simple_stmtContext _localctx = new Simple_stmtContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_simple_stmt); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(367); + small_stmt(); + setState(372); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(368); + match(SEMI_COLON); + setState(369); + small_stmt(); + } + } + } + setState(374); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + setState(376); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==SEMI_COLON) { + { + setState(375); + match(SEMI_COLON); + } + } + + setState(378); + _la = _input.LA(1); + if ( !(_la==EOF || _la==LINE_BREAK) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Small_stmtContext extends ParserRuleContext { + public Small_stmtContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_small_stmt; } + + public Small_stmtContext() { } + public void copyFrom(Small_stmtContext ctx) { + super.copyFrom(ctx); + } + } + public static class Assert_stmtContext extends Small_stmtContext { + public TerminalNode ASSERT() { return getToken(PythonParser.ASSERT, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public Assert_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterAssert_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitAssert_stmt(this); + } + } + public static class Nonlocal_stmtContext extends Small_stmtContext { + public TerminalNode NONLOCAL() { return getToken(PythonParser.NONLOCAL, 0); } + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Nonlocal_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterNonlocal_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitNonlocal_stmt(this); + } + } + public static class Pass_stmtContext extends Small_stmtContext { + public TerminalNode PASS() { return getToken(PythonParser.PASS, 0); } + public Pass_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterPass_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitPass_stmt(this); + } + } + public static class Import_stmtContext extends Small_stmtContext { + public TerminalNode IMPORT() { return getToken(PythonParser.IMPORT, 0); } + public Dotted_as_namesContext dotted_as_names() { + return getRuleContext(Dotted_as_namesContext.class,0); + } + public Import_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterImport_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitImport_stmt(this); + } + } + public static class Expr_stmtContext extends Small_stmtContext { + public Testlist_star_exprContext testlist_star_expr() { + return getRuleContext(Testlist_star_exprContext.class,0); + } + public Assign_partContext assign_part() { + return getRuleContext(Assign_partContext.class,0); + } + public Expr_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExpr_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExpr_stmt(this); + } + } + public static class Raise_stmtContext extends Small_stmtContext { + public TerminalNode RAISE() { return getToken(PythonParser.RAISE, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode FROM() { return getToken(PythonParser.FROM, 0); } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Raise_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterRaise_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitRaise_stmt(this); + } + } + public static class Yield_stmtContext extends Small_stmtContext { + public Yield_exprContext yield_expr() { + return getRuleContext(Yield_exprContext.class,0); + } + public Yield_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterYield_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitYield_stmt(this); + } + } + public static class From_stmtContext extends Small_stmtContext { + public TerminalNode FROM() { return getToken(PythonParser.FROM, 0); } + public TerminalNode IMPORT() { return getToken(PythonParser.IMPORT, 0); } + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public Import_as_namesContext import_as_names() { + return getRuleContext(Import_as_namesContext.class,0); + } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public List DOT() { return getTokens(PythonParser.DOT); } + public TerminalNode DOT(int i) { + return getToken(PythonParser.DOT, i); + } + public List ELLIPSIS() { return getTokens(PythonParser.ELLIPSIS); } + public TerminalNode ELLIPSIS(int i) { + return getToken(PythonParser.ELLIPSIS, i); + } + public From_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterFrom_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitFrom_stmt(this); + } + } + public static class Global_stmtContext extends Small_stmtContext { + public TerminalNode GLOBAL() { return getToken(PythonParser.GLOBAL, 0); } + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Global_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterGlobal_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitGlobal_stmt(this); + } + } + public static class Continue_stmtContext extends Small_stmtContext { + public TerminalNode CONTINUE() { return getToken(PythonParser.CONTINUE, 0); } + public Continue_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterContinue_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitContinue_stmt(this); + } + } + public static class Exec_stmtContext extends Small_stmtContext { + public TerminalNode EXEC() { return getToken(PythonParser.EXEC, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public Exec_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExec_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExec_stmt(this); + } + } + public static class Break_stmtContext extends Small_stmtContext { + public TerminalNode BREAK() { return getToken(PythonParser.BREAK, 0); } + public Break_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterBreak_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitBreak_stmt(this); + } + } + public static class Del_stmtContext extends Small_stmtContext { + public TerminalNode DEL() { return getToken(PythonParser.DEL, 0); } + public ExprlistContext exprlist() { + return getRuleContext(ExprlistContext.class,0); + } + public Del_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDel_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDel_stmt(this); + } + } + public static class Print_stmtContext extends Small_stmtContext { + public TerminalNode PRINT() { return getToken(PythonParser.PRINT, 0); } + public TerminalNode RIGHT_SHIFT() { return getToken(PythonParser.RIGHT_SHIFT, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Print_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterPrint_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitPrint_stmt(this); + } + } + public static class Return_stmtContext extends Small_stmtContext { + public TerminalNode RETURN() { return getToken(PythonParser.RETURN, 0); } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public Return_stmtContext(Small_stmtContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterReturn_stmt(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitReturn_stmt(this); + } + } + + public final Small_stmtContext small_stmt() throws RecognitionException { + Small_stmtContext _localctx = new Small_stmtContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_small_stmt); + int _la; + try { + int _alt; + setState(504); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,65,_ctx) ) { + case 1: + _localctx = new Expr_stmtContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(380); + testlist_star_expr(); + setState(382); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + { + setState(381); + assign_part(); + } + break; + } + } + break; + case 2: + _localctx = new Print_stmtContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(384); + if (!(CheckVersion(2))) throw new FailedPredicateException(this, "CheckVersion(2)"); + setState(385); + match(PRINT); + setState(408); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + { + setState(386); + test(); + setState(391); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(387); + match(COMMA); + setState(388); + test(); + } + } + } + setState(393); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + } + setState(395); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(394); + match(COMMA); + } + } + + } + } + break; + case RIGHT_SHIFT: + { + setState(397); + match(RIGHT_SHIFT); + setState(398); + test(); + { + setState(401); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(399); + match(COMMA); + setState(400); + test(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(403); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(406); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(405); + match(COMMA); + } + } + + } + } + break; + default: + throw new NoViableAltException(this); + } + SetVersion(2); + } + break; + case 3: + _localctx = new Del_stmtContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(412); + match(DEL); + setState(413); + exprlist(); + } + break; + case 4: + _localctx = new Pass_stmtContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(414); + match(PASS); + } + break; + case 5: + _localctx = new Break_stmtContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(415); + match(BREAK); + } + break; + case 6: + _localctx = new Continue_stmtContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(416); + match(CONTINUE); + } + break; + case 7: + _localctx = new Return_stmtContext(_localctx); + enterOuterAlt(_localctx, 7); + { + setState(417); + match(RETURN); + setState(419); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(418); + testlist(); + } + } + + } + break; + case 8: + _localctx = new Raise_stmtContext(_localctx); + enterOuterAlt(_localctx, 8); + { + setState(421); + match(RAISE); + setState(431); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(422); + test(); + setState(429); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(423); + match(COMMA); + setState(424); + test(); + setState(427); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(425); + match(COMMA); + setState(426); + test(); + } + } + + } + } + + } + } + + setState(435); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==FROM) { + { + setState(433); + match(FROM); + setState(434); + test(); + } + } + + } + break; + case 9: + _localctx = new Yield_stmtContext(_localctx); + enterOuterAlt(_localctx, 9); + { + setState(437); + yield_expr(); + } + break; + case 10: + _localctx = new Import_stmtContext(_localctx); + enterOuterAlt(_localctx, 10); + { + setState(438); + match(IMPORT); + setState(439); + dotted_as_names(); + } + break; + case 11: + _localctx = new From_stmtContext(_localctx); + enterOuterAlt(_localctx, 11); + { + setState(440); + match(FROM); + setState(453); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) { + case 1: + { + setState(444); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==DOT || _la==ELLIPSIS) { + { + { + setState(441); + _la = _input.LA(1); + if ( !(_la==DOT || _la==ELLIPSIS) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + setState(446); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(447); + dotted_name(0); + } + break; + case 2: + { + setState(449); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(448); + _la = _input.LA(1); + if ( !(_la==DOT || _la==ELLIPSIS) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + setState(451); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==DOT || _la==ELLIPSIS ); + } + break; + } + setState(455); + match(IMPORT); + setState(462); + _errHandler.sync(this); + switch (_input.LA(1)) { + case STAR: + { + setState(456); + match(STAR); + } + break; + case OPEN_PAREN: + { + setState(457); + match(OPEN_PAREN); + setState(458); + import_as_names(); + setState(459); + match(CLOSE_PAREN); + } + break; + case TRUE: + case FALSE: + case NAME: + { + setState(461); + import_as_names(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 12: + _localctx = new Global_stmtContext(_localctx); + enterOuterAlt(_localctx, 12); + { + setState(464); + match(GLOBAL); + setState(465); + name(); + setState(470); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(466); + match(COMMA); + setState(467); + name(); + } + } + setState(472); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 13: + _localctx = new Exec_stmtContext(_localctx); + enterOuterAlt(_localctx, 13); + { + setState(473); + if (!(CheckVersion(2))) throw new FailedPredicateException(this, "CheckVersion(2)"); + setState(474); + match(EXEC); + setState(475); + expr(0); + setState(482); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IN) { + { + setState(476); + match(IN); + setState(477); + test(); + setState(480); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(478); + match(COMMA); + setState(479); + test(); + } + } + + } + } + + SetVersion(2); + } + break; + case 14: + _localctx = new Assert_stmtContext(_localctx); + enterOuterAlt(_localctx, 14); + { + setState(486); + match(ASSERT); + setState(487); + test(); + setState(490); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(488); + match(COMMA); + setState(489); + test(); + } + } + + } + break; + case 15: + _localctx = new Nonlocal_stmtContext(_localctx); + enterOuterAlt(_localctx, 15); + { + setState(492); + if (!(CheckVersion(3))) throw new FailedPredicateException(this, "CheckVersion(3)"); + setState(493); + match(NONLOCAL); + setState(494); + name(); + setState(499); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(495); + match(COMMA); + setState(496); + name(); + } + } + setState(501); + _errHandler.sync(this); + _la = _input.LA(1); + } + SetVersion(3); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Testlist_star_exprContext extends ParserRuleContext { + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List star_expr() { + return getRuleContexts(Star_exprContext.class); + } + public Star_exprContext star_expr(int i) { + return getRuleContext(Star_exprContext.class,i); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public Testlist_star_exprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_testlist_star_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTestlist_star_expr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTestlist_star_expr(this); + } + } + + public final Testlist_star_exprContext testlist_star_expr() throws RecognitionException { + Testlist_star_exprContext _localctx = new Testlist_star_exprContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_testlist_star_expr); + try { + int _alt; + setState(521); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,69,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(512); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(508); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(506); + test(); + } + break; + case STAR: + { + setState(507); + star_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(510); + match(COMMA); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(514); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(518); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) { + case 1: + { + setState(516); + test(); + } + break; + case 2: + { + setState(517); + star_expr(); + } + break; + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(520); + testlist(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Star_exprContext extends ParserRuleContext { + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public Star_exprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_star_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterStar_expr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitStar_expr(this); + } + } + + public final Star_exprContext star_expr() throws RecognitionException { + Star_exprContext _localctx = new Star_exprContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_star_expr); + try { + enterOuterAlt(_localctx, 1); + { + setState(523); + match(STAR); + setState(524); + expr(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Assign_partContext extends ParserRuleContext { + public Token op; + public List ASSIGN() { return getTokens(PythonParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(PythonParser.ASSIGN, i); + } + public List testlist_star_expr() { + return getRuleContexts(Testlist_star_exprContext.class); + } + public Testlist_star_exprContext testlist_star_expr(int i) { + return getRuleContext(Testlist_star_exprContext.class,i); + } + public Yield_exprContext yield_expr() { + return getRuleContext(Yield_exprContext.class,0); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public TerminalNode ADD_ASSIGN() { return getToken(PythonParser.ADD_ASSIGN, 0); } + public TerminalNode SUB_ASSIGN() { return getToken(PythonParser.SUB_ASSIGN, 0); } + public TerminalNode MULT_ASSIGN() { return getToken(PythonParser.MULT_ASSIGN, 0); } + public TerminalNode AT_ASSIGN() { return getToken(PythonParser.AT_ASSIGN, 0); } + public TerminalNode DIV_ASSIGN() { return getToken(PythonParser.DIV_ASSIGN, 0); } + public TerminalNode MOD_ASSIGN() { return getToken(PythonParser.MOD_ASSIGN, 0); } + public TerminalNode AND_ASSIGN() { return getToken(PythonParser.AND_ASSIGN, 0); } + public TerminalNode OR_ASSIGN() { return getToken(PythonParser.OR_ASSIGN, 0); } + public TerminalNode XOR_ASSIGN() { return getToken(PythonParser.XOR_ASSIGN, 0); } + public TerminalNode LEFT_SHIFT_ASSIGN() { return getToken(PythonParser.LEFT_SHIFT_ASSIGN, 0); } + public TerminalNode RIGHT_SHIFT_ASSIGN() { return getToken(PythonParser.RIGHT_SHIFT_ASSIGN, 0); } + public TerminalNode POWER_ASSIGN() { return getToken(PythonParser.POWER_ASSIGN, 0); } + public TerminalNode IDIV_ASSIGN() { return getToken(PythonParser.IDIV_ASSIGN, 0); } + public Assign_partContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assign_part; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterAssign_part(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitAssign_part(this); + } + } + + public final Assign_partContext assign_part() throws RecognitionException { + Assign_partContext _localctx = new Assign_partContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_assign_part); + int _la; + try { + int _alt; + setState(556); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(526); + match(ASSIGN); + setState(540); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case STAR: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(527); + testlist_star_expr(); + setState(532); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,70,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(528); + match(ASSIGN); + setState(529); + testlist_star_expr(); + } + } + } + setState(534); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,70,_ctx); + } + setState(537); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(535); + match(ASSIGN); + setState(536); + yield_expr(); + } + } + + } + break; + case YIELD: + { + setState(539); + yield_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(542); + if (!(CheckVersion(3))) throw new FailedPredicateException(this, "CheckVersion(3)"); + setState(543); + match(COLON); + setState(544); + test(); + setState(547); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(545); + match(ASSIGN); + setState(546); + testlist(); + } + } + + SetVersion(3); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(551); + ((Assign_partContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (ADD_ASSIGN - 70)) | (1L << (SUB_ASSIGN - 70)) | (1L << (MULT_ASSIGN - 70)) | (1L << (AT_ASSIGN - 70)) | (1L << (DIV_ASSIGN - 70)) | (1L << (MOD_ASSIGN - 70)) | (1L << (AND_ASSIGN - 70)) | (1L << (OR_ASSIGN - 70)) | (1L << (XOR_ASSIGN - 70)) | (1L << (LEFT_SHIFT_ASSIGN - 70)) | (1L << (RIGHT_SHIFT_ASSIGN - 70)) | (1L << (POWER_ASSIGN - 70)) | (1L << (IDIV_ASSIGN - 70)))) != 0)) ) { + ((Assign_partContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(554); + _errHandler.sync(this); + switch (_input.LA(1)) { + case YIELD: + { + setState(552); + yield_expr(); + } + break; + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(553); + testlist(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExprlistContext extends ParserRuleContext { + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public ExprlistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_exprlist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExprlist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExprlist(this); + } + } + + public final ExprlistContext exprlist() throws RecognitionException { + ExprlistContext _localctx = new ExprlistContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_exprlist); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(558); + expr(0); + setState(563); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,76,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(559); + match(COMMA); + setState(560); + expr(0); + } + } + } + setState(565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,76,_ctx); + } + setState(567); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(566); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Import_as_namesContext extends ParserRuleContext { + public List import_as_name() { + return getRuleContexts(Import_as_nameContext.class); + } + public Import_as_nameContext import_as_name(int i) { + return getRuleContext(Import_as_nameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Import_as_namesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_import_as_names; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterImport_as_names(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitImport_as_names(this); + } + } + + public final Import_as_namesContext import_as_names() throws RecognitionException { + Import_as_namesContext _localctx = new Import_as_namesContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_import_as_names); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(569); + import_as_name(); + setState(574); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,78,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(570); + match(COMMA); + setState(571); + import_as_name(); + } + } + } + setState(576); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,78,_ctx); + } + setState(578); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(577); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Import_as_nameContext extends ParserRuleContext { + public List name() { + return getRuleContexts(NameContext.class); + } + public NameContext name(int i) { + return getRuleContext(NameContext.class,i); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public Import_as_nameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_import_as_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterImport_as_name(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitImport_as_name(this); + } + } + + public final Import_as_nameContext import_as_name() throws RecognitionException { + Import_as_nameContext _localctx = new Import_as_nameContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_import_as_name); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(580); + name(); + setState(583); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==AS) { + { + setState(581); + match(AS); + setState(582); + name(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Dotted_as_namesContext extends ParserRuleContext { + public List dotted_as_name() { + return getRuleContexts(Dotted_as_nameContext.class); + } + public Dotted_as_nameContext dotted_as_name(int i) { + return getRuleContext(Dotted_as_nameContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Dotted_as_namesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dotted_as_names; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDotted_as_names(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDotted_as_names(this); + } + } + + public final Dotted_as_namesContext dotted_as_names() throws RecognitionException { + Dotted_as_namesContext _localctx = new Dotted_as_namesContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_dotted_as_names); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(585); + dotted_as_name(); + setState(590); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(586); + match(COMMA); + setState(587); + dotted_as_name(); + } + } + setState(592); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Dotted_as_nameContext extends ParserRuleContext { + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode AS() { return getToken(PythonParser.AS, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public Dotted_as_nameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dotted_as_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDotted_as_name(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDotted_as_name(this); + } + } + + public final Dotted_as_nameContext dotted_as_name() throws RecognitionException { + Dotted_as_nameContext _localctx = new Dotted_as_nameContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_dotted_as_name); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(593); + dotted_name(0); + setState(596); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==AS) { + { + setState(594); + match(AS); + setState(595); + name(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TestContext extends ParserRuleContext { + public List logical_test() { + return getRuleContexts(Logical_testContext.class); + } + public Logical_testContext logical_test(int i) { + return getRuleContext(Logical_testContext.class,i); + } + public TerminalNode IF() { return getToken(PythonParser.IF, 0); } + public TerminalNode ELSE() { return getToken(PythonParser.ELSE, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode LAMBDA() { return getToken(PythonParser.LAMBDA, 0); } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public VarargslistContext varargslist() { + return getRuleContext(VarargslistContext.class,0); + } + public TestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_test; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTest(this); + } + } + + public final TestContext test() throws RecognitionException { + TestContext _localctx = new TestContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_test); + int _la; + try { + setState(612); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(598); + logical_test(0); + setState(604); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) { + case 1: + { + setState(599); + match(IF); + setState(600); + logical_test(0); + setState(601); + match(ELSE); + setState(602); + test(); + } + break; + } + } + break; + case LAMBDA: + enterOuterAlt(_localctx, 2); + { + setState(606); + match(LAMBDA); + setState(608); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (TRUE - 39)) | (1L << (FALSE - 39)) | (1L << (STAR - 39)) | (1L << (POWER - 39)) | (1L << (NAME - 39)))) != 0)) { + { + setState(607); + varargslist(); + } + } + + setState(610); + match(COLON); + setState(611); + test(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarargslistContext extends ParserRuleContext { + public VarargsContext varargs() { + return getRuleContext(VarargsContext.class,0); + } + public VarkwargsContext varkwargs() { + return getRuleContext(VarkwargsContext.class,0); + } + public List vardef_parameters() { + return getRuleContexts(Vardef_parametersContext.class); + } + public Vardef_parametersContext vardef_parameters(int i) { + return getRuleContext(Vardef_parametersContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public VarargslistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varargslist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVarargslist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVarargslist(this); + } + } + + public final VarargslistContext varargslist() throws RecognitionException { + VarargslistContext _localctx = new VarargslistContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_varargslist); + int _la; + try { + setState(638); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,92,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(617); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(614); + vardef_parameters(); + setState(615); + match(COMMA); + } + break; + } + setState(629); + _errHandler.sync(this); + switch (_input.LA(1)) { + case STAR: + { + setState(619); + varargs(); + setState(622); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { + case 1: + { + setState(620); + match(COMMA); + setState(621); + vardef_parameters(); + } + break; + } + setState(626); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(624); + match(COMMA); + setState(625); + varkwargs(); + } + break; + } + } + break; + case POWER: + { + setState(628); + varkwargs(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(632); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(631); + match(COMMA); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(634); + vardef_parameters(); + setState(636); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(635); + match(COMMA); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Vardef_parametersContext extends ParserRuleContext { + public List vardef_parameter() { + return getRuleContexts(Vardef_parameterContext.class); + } + public Vardef_parameterContext vardef_parameter(int i) { + return getRuleContext(Vardef_parameterContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Vardef_parametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_vardef_parameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVardef_parameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVardef_parameters(this); + } + } + + public final Vardef_parametersContext vardef_parameters() throws RecognitionException { + Vardef_parametersContext _localctx = new Vardef_parametersContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_vardef_parameters); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(640); + vardef_parameter(); + setState(645); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,93,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(641); + match(COMMA); + setState(642); + vardef_parameter(); + } + } + } + setState(647); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,93,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Vardef_parameterContext extends ParserRuleContext { + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(PythonParser.ASSIGN, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public Vardef_parameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_vardef_parameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVardef_parameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVardef_parameter(this); + } + } + + public final Vardef_parameterContext vardef_parameter() throws RecognitionException { + Vardef_parameterContext _localctx = new Vardef_parameterContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_vardef_parameter); + int _la; + try { + setState(654); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + case FALSE: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(648); + name(); + setState(651); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(649); + match(ASSIGN); + setState(650); + test(); + } + } + + } + break; + case STAR: + enterOuterAlt(_localctx, 2); + { + setState(653); + match(STAR); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarargsContext extends ParserRuleContext { + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public VarargsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varargs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVarargs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVarargs(this); + } + } + + public final VarargsContext varargs() throws RecognitionException { + VarargsContext _localctx = new VarargsContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_varargs); + try { + enterOuterAlt(_localctx, 1); + { + setState(656); + match(STAR); + setState(657); + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarkwargsContext extends ParserRuleContext { + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public VarkwargsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varkwargs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterVarkwargs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitVarkwargs(this); + } + } + + public final VarkwargsContext varkwargs() throws RecognitionException { + VarkwargsContext _localctx = new VarkwargsContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_varkwargs); + try { + enterOuterAlt(_localctx, 1); + { + setState(659); + match(POWER); + setState(660); + name(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Logical_testContext extends ParserRuleContext { + public Token op; + public ComparisonContext comparison() { + return getRuleContext(ComparisonContext.class,0); + } + public TerminalNode NOT() { return getToken(PythonParser.NOT, 0); } + public List logical_test() { + return getRuleContexts(Logical_testContext.class); + } + public Logical_testContext logical_test(int i) { + return getRuleContext(Logical_testContext.class,i); + } + public TerminalNode AND() { return getToken(PythonParser.AND, 0); } + public TerminalNode OR() { return getToken(PythonParser.OR, 0); } + public Logical_testContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_logical_test; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterLogical_test(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitLogical_test(this); + } + } + + public final Logical_testContext logical_test() throws RecognitionException { + return logical_test(0); + } + + private Logical_testContext logical_test(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + Logical_testContext _localctx = new Logical_testContext(_ctx, _parentState); + Logical_testContext _prevctx = _localctx; + int _startState = 74; + enterRecursionRule(_localctx, 74, RULE_logical_test, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(666); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(663); + comparison(0); + } + break; + case NOT: + { + setState(664); + match(NOT); + setState(665); + logical_test(3); + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(676); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(674); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) { + case 1: + { + _localctx = new Logical_testContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_logical_test); + setState(668); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(669); + ((Logical_testContext)_localctx).op = match(AND); + setState(670); + logical_test(3); + } + break; + case 2: + { + _localctx = new Logical_testContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_logical_test); + setState(671); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(672); + ((Logical_testContext)_localctx).op = match(OR); + setState(673); + logical_test(2); + } + break; + } + } + } + setState(678); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ComparisonContext extends ParserRuleContext { + public Token optional; + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public List comparison() { + return getRuleContexts(ComparisonContext.class); + } + public ComparisonContext comparison(int i) { + return getRuleContext(ComparisonContext.class,i); + } + public TerminalNode LESS_THAN() { return getToken(PythonParser.LESS_THAN, 0); } + public TerminalNode GREATER_THAN() { return getToken(PythonParser.GREATER_THAN, 0); } + public TerminalNode EQUALS() { return getToken(PythonParser.EQUALS, 0); } + public TerminalNode GT_EQ() { return getToken(PythonParser.GT_EQ, 0); } + public TerminalNode LT_EQ() { return getToken(PythonParser.LT_EQ, 0); } + public TerminalNode NOT_EQ_1() { return getToken(PythonParser.NOT_EQ_1, 0); } + public TerminalNode NOT_EQ_2() { return getToken(PythonParser.NOT_EQ_2, 0); } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public TerminalNode IS() { return getToken(PythonParser.IS, 0); } + public TerminalNode NOT() { return getToken(PythonParser.NOT, 0); } + public ComparisonContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comparison; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterComparison(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitComparison(this); + } + } + + public final ComparisonContext comparison() throws RecognitionException { + return comparison(0); + } + + private ComparisonContext comparison(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ComparisonContext _localctx = new ComparisonContext(_ctx, _parentState); + ComparisonContext _prevctx = _localctx; + int _startState = 76; + enterRecursionRule(_localctx, 76, RULE_comparison, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(680); + expr(0); + } + _ctx.stop = _input.LT(-1); + setState(703); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ComparisonContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_comparison); + setState(682); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(698); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LESS_THAN: + { + setState(683); + match(LESS_THAN); + } + break; + case GREATER_THAN: + { + setState(684); + match(GREATER_THAN); + } + break; + case EQUALS: + { + setState(685); + match(EQUALS); + } + break; + case GT_EQ: + { + setState(686); + match(GT_EQ); + } + break; + case LT_EQ: + { + setState(687); + match(LT_EQ); + } + break; + case NOT_EQ_1: + { + setState(688); + match(NOT_EQ_1); + } + break; + case NOT_EQ_2: + { + setState(689); + match(NOT_EQ_2); + } + break; + case IN: + case NOT: + { + setState(691); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==NOT) { + { + setState(690); + ((ComparisonContext)_localctx).optional = match(NOT); + } + } + + setState(693); + match(IN); + } + break; + case IS: + { + setState(694); + match(IS); + setState(696); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==NOT) { + { + setState(695); + ((ComparisonContext)_localctx).optional = match(NOT); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + setState(700); + comparison(3); + } + } + } + setState(705); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ExprContext extends ParserRuleContext { + public Token op; + public AtomContext atom() { + return getRuleContext(AtomContext.class,0); + } + public TerminalNode AWAIT() { return getToken(PythonParser.AWAIT, 0); } + public List trailer() { + return getRuleContexts(TrailerContext.class); + } + public TrailerContext trailer(int i) { + return getRuleContext(TrailerContext.class,i); + } + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public TerminalNode ADD() { return getToken(PythonParser.ADD, 0); } + public TerminalNode MINUS() { return getToken(PythonParser.MINUS, 0); } + public TerminalNode NOT_OP() { return getToken(PythonParser.NOT_OP, 0); } + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public TerminalNode DIV() { return getToken(PythonParser.DIV, 0); } + public TerminalNode MOD() { return getToken(PythonParser.MOD, 0); } + public TerminalNode IDIV() { return getToken(PythonParser.IDIV, 0); } + public TerminalNode AT() { return getToken(PythonParser.AT, 0); } + public TerminalNode LEFT_SHIFT() { return getToken(PythonParser.LEFT_SHIFT, 0); } + public TerminalNode RIGHT_SHIFT() { return getToken(PythonParser.RIGHT_SHIFT, 0); } + public TerminalNode AND_OP() { return getToken(PythonParser.AND_OP, 0); } + public TerminalNode XOR() { return getToken(PythonParser.XOR, 0); } + public TerminalNode OR_OP() { return getToken(PythonParser.OR_OP, 0); } + public ExprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterExpr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitExpr(this); + } + } + + public final ExprContext expr() throws RecognitionException { + return expr(0); + } + + private ExprContext expr(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExprContext _localctx = new ExprContext(_ctx, _parentState); + ExprContext _prevctx = _localctx; + int _startState = 78; + enterRecursionRule(_localctx, 78, RULE_expr, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(719); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) { + case 1: + { + setState(708); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==AWAIT) { + { + setState(707); + match(AWAIT); + } + } + + setState(710); + atom(); + setState(714); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,104,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(711); + trailer(); + } + } + } + setState(716); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,104,_ctx); + } + } + break; + case 2: + { + setState(717); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0)) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(718); + expr(7); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(744); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,107,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(742); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,106,_ctx) ) { + case 1: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(721); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(722); + ((ExprContext)_localctx).op = match(POWER); + setState(723); + expr(8); + } + break; + case 2: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(724); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(725); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(((((_la - 44)) & ~0x3f) == 0 && ((1L << (_la - 44)) & ((1L << (STAR - 44)) | (1L << (DIV - 44)) | (1L << (MOD - 44)) | (1L << (IDIV - 44)) | (1L << (AT - 44)))) != 0)) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(726); + expr(7); + } + break; + case 3: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(727); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(728); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==ADD || _la==MINUS) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(729); + expr(6); + } + break; + case 4: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(730); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(731); + ((ExprContext)_localctx).op = _input.LT(1); + _la = _input.LA(1); + if ( !(_la==LEFT_SHIFT || _la==RIGHT_SHIFT) ) { + ((ExprContext)_localctx).op = (Token)_errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(732); + expr(5); + } + break; + case 5: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(733); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(734); + ((ExprContext)_localctx).op = match(AND_OP); + setState(735); + expr(4); + } + break; + case 6: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(736); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(737); + ((ExprContext)_localctx).op = match(XOR); + setState(738); + expr(3); + } + break; + case 7: + { + _localctx = new ExprContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expr); + setState(739); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(740); + ((ExprContext)_localctx).op = match(OR_OP); + setState(741); + expr(2); + } + break; + } + } + } + setState(746); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,107,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class AtomContext extends ParserRuleContext { + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public Yield_exprContext yield_expr() { + return getRuleContext(Yield_exprContext.class,0); + } + public Testlist_compContext testlist_comp() { + return getRuleContext(Testlist_compContext.class,0); + } + public TerminalNode OPEN_BRACKET() { return getToken(PythonParser.OPEN_BRACKET, 0); } + public TerminalNode CLOSE_BRACKET() { return getToken(PythonParser.CLOSE_BRACKET, 0); } + public TerminalNode OPEN_BRACE() { return getToken(PythonParser.OPEN_BRACE, 0); } + public TerminalNode CLOSE_BRACE() { return getToken(PythonParser.CLOSE_BRACE, 0); } + public DictorsetmakerContext dictorsetmaker() { + return getRuleContext(DictorsetmakerContext.class,0); + } + public List REVERSE_QUOTE() { return getTokens(PythonParser.REVERSE_QUOTE); } + public TerminalNode REVERSE_QUOTE(int i) { + return getToken(PythonParser.REVERSE_QUOTE, i); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public TerminalNode COMMA() { return getToken(PythonParser.COMMA, 0); } + public TerminalNode ELLIPSIS() { return getToken(PythonParser.ELLIPSIS, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public TerminalNode PRINT() { return getToken(PythonParser.PRINT, 0); } + public TerminalNode EXEC() { return getToken(PythonParser.EXEC, 0); } + public NumberContext number() { + return getRuleContext(NumberContext.class,0); + } + public TerminalNode MINUS() { return getToken(PythonParser.MINUS, 0); } + public TerminalNode NONE() { return getToken(PythonParser.NONE, 0); } + public List STRING() { return getTokens(PythonParser.STRING); } + public TerminalNode STRING(int i) { + return getToken(PythonParser.STRING, i); + } + public AtomContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_atom; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterAtom(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitAtom(this); + } + } + + public final AtomContext atom() throws RecognitionException { + AtomContext _localctx = new AtomContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_atom); + int _la; + try { + int _alt; + setState(784); + _errHandler.sync(this); + switch (_input.LA(1)) { + case OPEN_PAREN: + enterOuterAlt(_localctx, 1); + { + setState(747); + match(OPEN_PAREN); + setState(750); + _errHandler.sync(this); + switch (_input.LA(1)) { + case YIELD: + { + setState(748); + yield_expr(); + } + break; + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case STAR: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(749); + testlist_comp(); + } + break; + case CLOSE_PAREN: + break; + default: + break; + } + setState(752); + match(CLOSE_PAREN); + } + break; + case OPEN_BRACKET: + enterOuterAlt(_localctx, 2); + { + setState(753); + match(OPEN_BRACKET); + setState(755); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(754); + testlist_comp(); + } + } + + setState(757); + match(CLOSE_BRACKET); + } + break; + case OPEN_BRACE: + enterOuterAlt(_localctx, 3); + { + setState(758); + match(OPEN_BRACE); + setState(760); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(759); + dictorsetmaker(); + } + } + + setState(762); + match(CLOSE_BRACE); + } + break; + case REVERSE_QUOTE: + enterOuterAlt(_localctx, 4); + { + setState(763); + match(REVERSE_QUOTE); + setState(764); + testlist(); + setState(766); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(765); + match(COMMA); + } + } + + setState(768); + match(REVERSE_QUOTE); + } + break; + case ELLIPSIS: + enterOuterAlt(_localctx, 5); + { + setState(770); + match(ELLIPSIS); + } + break; + case TRUE: + case FALSE: + case NAME: + enterOuterAlt(_localctx, 6); + { + setState(771); + name(); + } + break; + case PRINT: + enterOuterAlt(_localctx, 7); + { + setState(772); + match(PRINT); + } + break; + case EXEC: + enterOuterAlt(_localctx, 8); + { + setState(773); + match(EXEC); + } + break; + case MINUS: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + enterOuterAlt(_localctx, 9); + { + setState(775); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==MINUS) { + { + setState(774); + match(MINUS); + } + } + + setState(777); + number(); + } + break; + case NONE: + enterOuterAlt(_localctx, 10); + { + setState(778); + match(NONE); + } + break; + case STRING: + enterOuterAlt(_localctx, 11); + { + setState(780); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(779); + match(STRING); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(782); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,113,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DictorsetmakerContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List COLON() { return getTokens(PythonParser.COLON); } + public TerminalNode COLON(int i) { + return getToken(PythonParser.COLON, i); + } + public List POWER() { return getTokens(PythonParser.POWER); } + public TerminalNode POWER(int i) { + return getToken(PythonParser.POWER, i); + } + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public Testlist_compContext testlist_comp() { + return getRuleContext(Testlist_compContext.class,0); + } + public DictorsetmakerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dictorsetmaker; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDictorsetmaker(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDictorsetmaker(this); + } + } + + public final DictorsetmakerContext dictorsetmaker() throws RecognitionException { + DictorsetmakerContext _localctx = new DictorsetmakerContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_dictorsetmaker); + int _la; + try { + int _alt; + setState(817); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(792); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(786); + test(); + setState(787); + match(COLON); + setState(788); + test(); + } + break; + case POWER: + { + setState(790); + match(POWER); + setState(791); + expr(0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(805); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,117,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(794); + match(COMMA); + setState(801); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(795); + test(); + setState(796); + match(COLON); + setState(797); + test(); + } + break; + case POWER: + { + setState(799); + match(POWER); + setState(800); + expr(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + } + setState(807); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,117,_ctx); + } + setState(809); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(808); + match(COMMA); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(811); + test(); + setState(812); + match(COLON); + setState(813); + test(); + setState(814); + comp_for(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(816); + testlist_comp(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Testlist_compContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List star_expr() { + return getRuleContexts(Star_exprContext.class); + } + public Star_exprContext star_expr(int i) { + return getRuleContext(Star_exprContext.class,i); + } + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public Testlist_compContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_testlist_comp; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTestlist_comp(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTestlist_comp(this); + } + } + + public final Testlist_compContext testlist_comp() throws RecognitionException { + Testlist_compContext _localctx = new Testlist_compContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_testlist_comp); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(821); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(819); + test(); + } + break; + case STAR: + { + setState(820); + star_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(837); + _errHandler.sync(this); + switch (_input.LA(1)) { + case FOR: + { + setState(823); + comp_for(); + } + break; + case COMMA: + case CLOSE_PAREN: + case CLOSE_BRACE: + case CLOSE_BRACKET: + { + setState(831); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,122,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(824); + match(COMMA); + setState(827); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + { + setState(825); + test(); + } + break; + case STAR: + { + setState(826); + star_expr(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + } + setState(833); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,122,_ctx); + } + setState(835); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(834); + match(COMMA); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TestlistContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public TestlistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_testlist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTestlist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTestlist(this); + } + } + + public final TestlistContext testlist() throws RecognitionException { + TestlistContext _localctx = new TestlistContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_testlist); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(839); + test(); + setState(844); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,125,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(840); + match(COMMA); + setState(841); + test(); + } + } + } + setState(846); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,125,_ctx); + } + setState(848); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,126,_ctx) ) { + case 1: + { + setState(847); + match(COMMA); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Dotted_nameContext extends ParserRuleContext { + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public Dotted_nameContext dotted_name() { + return getRuleContext(Dotted_nameContext.class,0); + } + public TerminalNode DOT() { return getToken(PythonParser.DOT, 0); } + public Dotted_nameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_dotted_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterDotted_name(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitDotted_name(this); + } + } + + public final Dotted_nameContext dotted_name() throws RecognitionException { + return dotted_name(0); + } + + private Dotted_nameContext dotted_name(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + Dotted_nameContext _localctx = new Dotted_nameContext(_ctx, _parentState); + Dotted_nameContext _prevctx = _localctx; + int _startState = 88; + enterRecursionRule(_localctx, 88, RULE_dotted_name, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(851); + name(); + } + _ctx.stop = _input.LT(-1); + setState(858); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,127,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new Dotted_nameContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_dotted_name); + setState(853); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(854); + match(DOT); + setState(855); + name(); + } + } + } + setState(860); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,127,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class NameContext extends ParserRuleContext { + public TerminalNode NAME() { return getToken(PythonParser.NAME, 0); } + public TerminalNode TRUE() { return getToken(PythonParser.TRUE, 0); } + public TerminalNode FALSE() { return getToken(PythonParser.FALSE, 0); } + public NameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_name; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitName(this); + } + } + + public final NameContext name() throws RecognitionException { + NameContext _localctx = new NameContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_name); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(861); + _la = _input.LA(1); + if ( !(((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (TRUE - 39)) | (1L << (FALSE - 39)) | (1L << (NAME - 39)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NumberContext extends ParserRuleContext { + public IntegerContext integer() { + return getRuleContext(IntegerContext.class,0); + } + public TerminalNode IMAG_NUMBER() { return getToken(PythonParser.IMAG_NUMBER, 0); } + public TerminalNode FLOAT_NUMBER() { return getToken(PythonParser.FLOAT_NUMBER, 0); } + public NumberContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_number; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterNumber(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitNumber(this); + } + } + + public final NumberContext number() throws RecognitionException { + NumberContext _localctx = new NumberContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_number); + try { + setState(866); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + enterOuterAlt(_localctx, 1); + { + setState(863); + integer(); + } + break; + case IMAG_NUMBER: + enterOuterAlt(_localctx, 2); + { + setState(864); + match(IMAG_NUMBER); + } + break; + case FLOAT_NUMBER: + enterOuterAlt(_localctx, 3); + { + setState(865); + match(FLOAT_NUMBER); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IntegerContext extends ParserRuleContext { + public TerminalNode DECIMAL_INTEGER() { return getToken(PythonParser.DECIMAL_INTEGER, 0); } + public TerminalNode OCT_INTEGER() { return getToken(PythonParser.OCT_INTEGER, 0); } + public TerminalNode HEX_INTEGER() { return getToken(PythonParser.HEX_INTEGER, 0); } + public TerminalNode BIN_INTEGER() { return getToken(PythonParser.BIN_INTEGER, 0); } + public IntegerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_integer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterInteger(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitInteger(this); + } + } + + public final IntegerContext integer() throws RecognitionException { + IntegerContext _localctx = new IntegerContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_integer); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(868); + _la = _input.LA(1); + if ( !(((((_la - 84)) & ~0x3f) == 0 && ((1L << (_la - 84)) & ((1L << (DECIMAL_INTEGER - 84)) | (1L << (OCT_INTEGER - 84)) | (1L << (HEX_INTEGER - 84)) | (1L << (BIN_INTEGER - 84)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Yield_exprContext extends ParserRuleContext { + public TerminalNode YIELD() { return getToken(PythonParser.YIELD, 0); } + public Yield_argContext yield_arg() { + return getRuleContext(Yield_argContext.class,0); + } + public Yield_exprContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_yield_expr; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterYield_expr(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitYield_expr(this); + } + } + + public final Yield_exprContext yield_expr() throws RecognitionException { + Yield_exprContext _localctx = new Yield_exprContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_yield_expr); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(870); + match(YIELD); + setState(872); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << FROM) | (1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(871); + yield_arg(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Yield_argContext extends ParserRuleContext { + public TerminalNode FROM() { return getToken(PythonParser.FROM, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public TestlistContext testlist() { + return getRuleContext(TestlistContext.class,0); + } + public Yield_argContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_yield_arg; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterYield_arg(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitYield_arg(this); + } + } + + public final Yield_argContext yield_arg() throws RecognitionException { + Yield_argContext _localctx = new Yield_argContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_yield_arg); + try { + setState(877); + _errHandler.sync(this); + switch (_input.LA(1)) { + case FROM: + enterOuterAlt(_localctx, 1); + { + setState(874); + match(FROM); + setState(875); + test(); + } + break; + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + enterOuterAlt(_localctx, 2); + { + setState(876); + testlist(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TrailerContext extends ParserRuleContext { + public TerminalNode DOT() { return getToken(PythonParser.DOT, 0); } + public NameContext name() { + return getRuleContext(NameContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public TrailerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_trailer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterTrailer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitTrailer(this); + } + } + + public final TrailerContext trailer() throws RecognitionException { + TrailerContext _localctx = new TrailerContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_trailer); + try { + setState(885); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DOT: + enterOuterAlt(_localctx, 1); + { + setState(879); + match(DOT); + setState(880); + name(); + setState(882); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,131,_ctx) ) { + case 1: + { + setState(881); + arguments(); + } + break; + } + } + break; + case OPEN_PAREN: + case OPEN_BRACKET: + enterOuterAlt(_localctx, 2); + { + setState(884); + arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public TerminalNode OPEN_PAREN() { return getToken(PythonParser.OPEN_PAREN, 0); } + public TerminalNode CLOSE_PAREN() { return getToken(PythonParser.CLOSE_PAREN, 0); } + public ArglistContext arglist() { + return getRuleContext(ArglistContext.class,0); + } + public TerminalNode OPEN_BRACKET() { return getToken(PythonParser.OPEN_BRACKET, 0); } + public SubscriptlistContext subscriptlist() { + return getRuleContext(SubscriptlistContext.class,0); + } + public TerminalNode CLOSE_BRACKET() { return getToken(PythonParser.CLOSE_BRACKET, 0); } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_arguments); + int _la; + try { + setState(896); + _errHandler.sync(this); + switch (_input.LA(1)) { + case OPEN_PAREN: + enterOuterAlt(_localctx, 1); + { + setState(887); + match(OPEN_PAREN); + setState(889); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << STAR) | (1L << POWER) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(888); + arglist(); + } + } + + setState(891); + match(CLOSE_PAREN); + } + break; + case OPEN_BRACKET: + enterOuterAlt(_localctx, 2); + { + setState(892); + match(OPEN_BRACKET); + setState(893); + subscriptlist(); + setState(894); + match(CLOSE_BRACKET); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArglistContext extends ParserRuleContext { + public List argument() { + return getRuleContexts(ArgumentContext.class); + } + public ArgumentContext argument(int i) { + return getRuleContext(ArgumentContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public ArglistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arglist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArglist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArglist(this); + } + } + + public final ArglistContext arglist() throws RecognitionException { + ArglistContext _localctx = new ArglistContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_arglist); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(898); + argument(); + setState(903); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,135,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(899); + match(COMMA); + setState(900); + argument(); + } + } + } + setState(905); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,135,_ctx); + } + setState(907); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(906); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentContext extends ParserRuleContext { + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(PythonParser.ASSIGN, 0); } + public TerminalNode POWER() { return getToken(PythonParser.POWER, 0); } + public TerminalNode STAR() { return getToken(PythonParser.STAR, 0); } + public ArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_argument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitArgument(this); + } + } + + public final ArgumentContext argument() throws RecognitionException { + ArgumentContext _localctx = new ArgumentContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_argument); + int _la; + try { + setState(917); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NONE: + case LAMBDA: + case NOT: + case AWAIT: + case PRINT: + case EXEC: + case TRUE: + case FALSE: + case ELLIPSIS: + case REVERSE_QUOTE: + case ADD: + case MINUS: + case NOT_OP: + case STRING: + case DECIMAL_INTEGER: + case OCT_INTEGER: + case HEX_INTEGER: + case BIN_INTEGER: + case IMAG_NUMBER: + case FLOAT_NUMBER: + case OPEN_PAREN: + case OPEN_BRACE: + case OPEN_BRACKET: + case NAME: + enterOuterAlt(_localctx, 1); + { + setState(909); + test(); + setState(913); + _errHandler.sync(this); + switch (_input.LA(1)) { + case FOR: + { + setState(910); + comp_for(); + } + break; + case ASSIGN: + { + setState(911); + match(ASSIGN); + setState(912); + test(); + } + break; + case COMMA: + case CLOSE_PAREN: + break; + default: + break; + } + } + break; + case STAR: + case POWER: + enterOuterAlt(_localctx, 2); + { + setState(915); + _la = _input.LA(1); + if ( !(_la==STAR || _la==POWER) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(916); + test(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SubscriptlistContext extends ParserRuleContext { + public List subscript() { + return getRuleContexts(SubscriptContext.class); + } + public SubscriptContext subscript(int i) { + return getRuleContext(SubscriptContext.class,i); + } + public List COMMA() { return getTokens(PythonParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(PythonParser.COMMA, i); + } + public SubscriptlistContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_subscriptlist; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSubscriptlist(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSubscriptlist(this); + } + } + + public final SubscriptlistContext subscriptlist() throws RecognitionException { + SubscriptlistContext _localctx = new SubscriptlistContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_subscriptlist); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(919); + subscript(); + setState(924); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(920); + match(COMMA); + setState(921); + subscript(); + } + } + } + setState(926); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + } + setState(928); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(927); + match(COMMA); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SubscriptContext extends ParserRuleContext { + public TerminalNode ELLIPSIS() { return getToken(PythonParser.ELLIPSIS, 0); } + public List test() { + return getRuleContexts(TestContext.class); + } + public TestContext test(int i) { + return getRuleContext(TestContext.class,i); + } + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public SliceopContext sliceop() { + return getRuleContext(SliceopContext.class,0); + } + public SubscriptContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_subscript; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSubscript(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSubscript(this); + } + } + + public final SubscriptContext subscript() throws RecognitionException { + SubscriptContext _localctx = new SubscriptContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_subscript); + int _la; + try { + setState(948); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,146,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(930); + match(ELLIPSIS); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(931); + test(); + setState(939); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(932); + match(COLON); + setState(934); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(933); + test(); + } + } + + setState(937); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(936); + sliceop(); + } + } + + } + } + + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(941); + match(COLON); + setState(943); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(942); + test(); + } + } + + setState(946); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(945); + sliceop(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SliceopContext extends ParserRuleContext { + public TerminalNode COLON() { return getToken(PythonParser.COLON, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public SliceopContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sliceop; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterSliceop(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitSliceop(this); + } + } + + public final SliceopContext sliceop() throws RecognitionException { + SliceopContext _localctx = new SliceopContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_sliceop); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(950); + match(COLON); + setState(952); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NONE) | (1L << LAMBDA) | (1L << NOT) | (1L << AWAIT) | (1L << PRINT) | (1L << EXEC) | (1L << TRUE) | (1L << FALSE) | (1L << ELLIPSIS) | (1L << REVERSE_QUOTE) | (1L << ADD) | (1L << MINUS) | (1L << NOT_OP))) != 0) || ((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (STRING - 83)) | (1L << (DECIMAL_INTEGER - 83)) | (1L << (OCT_INTEGER - 83)) | (1L << (HEX_INTEGER - 83)) | (1L << (BIN_INTEGER - 83)) | (1L << (IMAG_NUMBER - 83)) | (1L << (FLOAT_NUMBER - 83)) | (1L << (OPEN_PAREN - 83)) | (1L << (OPEN_BRACE - 83)) | (1L << (OPEN_BRACKET - 83)) | (1L << (NAME - 83)))) != 0)) { + { + setState(951); + test(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Comp_forContext extends ParserRuleContext { + public TerminalNode FOR() { return getToken(PythonParser.FOR, 0); } + public ExprlistContext exprlist() { + return getRuleContext(ExprlistContext.class,0); + } + public TerminalNode IN() { return getToken(PythonParser.IN, 0); } + public Logical_testContext logical_test() { + return getRuleContext(Logical_testContext.class,0); + } + public Comp_iterContext comp_iter() { + return getRuleContext(Comp_iterContext.class,0); + } + public Comp_forContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comp_for; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterComp_for(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitComp_for(this); + } + } + + public final Comp_forContext comp_for() throws RecognitionException { + Comp_forContext _localctx = new Comp_forContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_comp_for); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(954); + match(FOR); + setState(955); + exprlist(); + setState(956); + match(IN); + setState(957); + logical_test(0); + setState(959); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF || _la==FOR) { + { + setState(958); + comp_iter(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Comp_iterContext extends ParserRuleContext { + public Comp_forContext comp_for() { + return getRuleContext(Comp_forContext.class,0); + } + public TerminalNode IF() { return getToken(PythonParser.IF, 0); } + public TestContext test() { + return getRuleContext(TestContext.class,0); + } + public Comp_iterContext comp_iter() { + return getRuleContext(Comp_iterContext.class,0); + } + public Comp_iterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_comp_iter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).enterComp_iter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof PythonParserListener ) ((PythonParserListener)listener).exitComp_iter(this); + } + } + + public final Comp_iterContext comp_iter() throws RecognitionException { + Comp_iterContext _localctx = new Comp_iterContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_comp_iter); + int _la; + try { + setState(967); + _errHandler.sync(this); + switch (_input.LA(1)) { + case FOR: + enterOuterAlt(_localctx, 1); + { + setState(961); + comp_for(); + } + break; + case IF: + enterOuterAlt(_localctx, 2); + { + setState(962); + match(IF); + setState(963); + test(); + setState(965); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF || _la==FOR) { + { + setState(964); + comp_iter(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 12: + return except_clause_sempred((Except_clauseContext)_localctx, predIndex); + case 22: + return small_stmt_sempred((Small_stmtContext)_localctx, predIndex); + case 25: + return assign_part_sempred((Assign_partContext)_localctx, predIndex); + case 37: + return logical_test_sempred((Logical_testContext)_localctx, predIndex); + case 38: + return comparison_sempred((ComparisonContext)_localctx, predIndex); + case 39: + return expr_sempred((ExprContext)_localctx, predIndex); + case 44: + return dotted_name_sempred((Dotted_nameContext)_localctx, predIndex); + } + return true; + } + private boolean except_clause_sempred(Except_clauseContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return CheckVersion(2); + case 1: + return CheckVersion(3); + } + return true; + } + private boolean small_stmt_sempred(Small_stmtContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return CheckVersion(2); + case 3: + return CheckVersion(2); + case 4: + return CheckVersion(3); + } + return true; + } + private boolean assign_part_sempred(Assign_partContext _localctx, int predIndex) { + switch (predIndex) { + case 5: + return CheckVersion(3); + } + return true; + } + private boolean logical_test_sempred(Logical_testContext _localctx, int predIndex) { + switch (predIndex) { + case 6: + return precpred(_ctx, 2); + case 7: + return precpred(_ctx, 1); + } + return true; + } + private boolean comparison_sempred(ComparisonContext _localctx, int predIndex) { + switch (predIndex) { + case 8: + return precpred(_ctx, 2); + } + return true; + } + private boolean expr_sempred(ExprContext _localctx, int predIndex) { + switch (predIndex) { + case 9: + return precpred(_ctx, 8); + case 10: + return precpred(_ctx, 6); + case 11: + return precpred(_ctx, 5); + case 12: + return precpred(_ctx, 4); + case 13: + return precpred(_ctx, 3); + case 14: + return precpred(_ctx, 2); + case 15: + return precpred(_ctx, 1); + } + return true; + } + private boolean dotted_name_sempred(Dotted_nameContext _localctx, int predIndex) { + switch (predIndex) { + case 16: + return precpred(_ctx, 2); + } + return true; + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3f\u03cc\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\3\2\3"+ + "\2\3\2\5\2|\n\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\5\3\u0085\n\3\3\4\3\4\6\4"+ + "\u0089\n\4\r\4\16\4\u008a\3\5\3\5\7\5\u008f\n\5\f\5\16\5\u0092\13\5\3"+ + "\6\3\6\5\6\u0096\n\6\3\7\3\7\3\7\3\7\3\7\7\7\u009d\n\7\f\7\16\7\u00a0"+ + "\13\7\3\7\5\7\u00a3\n\7\3\7\3\7\3\7\3\7\3\7\5\7\u00aa\n\7\3\7\5\7\u00ad"+ + "\n\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u00b6\n\7\3\7\3\7\3\7\3\7\6\7\u00bc"+ + "\n\7\r\7\16\7\u00bd\3\7\5\7\u00c1\n\7\3\7\5\7\u00c4\n\7\3\7\5\7\u00c7"+ + "\n\7\3\7\5\7\u00ca\n\7\3\7\3\7\3\7\3\7\7\7\u00d0\n\7\f\7\16\7\u00d3\13"+ + "\7\3\7\3\7\3\7\3\7\7\7\u00d9\n\7\f\7\16\7\u00dc\13\7\3\7\3\7\5\7\u00e0"+ + "\n\7\5\7\u00e2\n\7\3\b\3\b\3\b\3\b\6\b\u00e8\n\b\r\b\16\b\u00e9\3\b\3"+ + "\b\5\b\u00ee\n\b\3\t\3\t\3\t\3\t\5\t\u00f4\n\t\3\t\5\t\u00f7\n\t\3\t\3"+ + "\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\r"+ + "\5\r\u010b\n\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+ + "\3\16\5\16\u0119\n\16\5\16\u011b\n\16\3\16\3\16\3\16\3\17\3\17\3\17\3"+ + "\17\5\17\u0124\n\17\3\17\5\17\u0127\n\17\3\17\3\17\3\17\3\20\5\20\u012d"+ + "\n\20\3\20\3\20\3\20\3\20\5\20\u0133\n\20\3\20\3\20\3\20\5\20\u0138\n"+ + "\20\3\20\3\20\3\20\3\21\3\21\3\21\5\21\u0140\n\21\3\21\3\21\3\21\5\21"+ + "\u0145\n\21\3\21\3\21\5\21\u0149\n\21\3\21\5\21\u014c\n\21\3\21\5\21\u014f"+ + "\n\21\3\21\3\21\5\21\u0153\n\21\5\21\u0155\n\21\3\22\3\22\3\22\3\23\3"+ + "\23\3\23\3\24\3\24\3\24\7\24\u0160\n\24\f\24\16\24\u0163\13\24\3\25\3"+ + "\25\3\25\5\25\u0168\n\25\3\25\5\25\u016b\n\25\3\26\3\26\3\26\5\26\u0170"+ + "\n\26\3\27\3\27\3\27\7\27\u0175\n\27\f\27\16\27\u0178\13\27\3\27\5\27"+ + "\u017b\n\27\3\27\3\27\3\30\3\30\5\30\u0181\n\30\3\30\3\30\3\30\3\30\3"+ + "\30\7\30\u0188\n\30\f\30\16\30\u018b\13\30\3\30\5\30\u018e\n\30\3\30\3"+ + "\30\3\30\3\30\6\30\u0194\n\30\r\30\16\30\u0195\3\30\5\30\u0199\n\30\5"+ + "\30\u019b\n\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u01a6"+ + "\n\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u01ae\n\30\5\30\u01b0\n\30\5"+ + "\30\u01b2\n\30\3\30\3\30\5\30\u01b6\n\30\3\30\3\30\3\30\3\30\3\30\7\30"+ + "\u01bd\n\30\f\30\16\30\u01c0\13\30\3\30\3\30\6\30\u01c4\n\30\r\30\16\30"+ + "\u01c5\5\30\u01c8\n\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u01d1\n"+ + "\30\3\30\3\30\3\30\3\30\7\30\u01d7\n\30\f\30\16\30\u01da\13\30\3\30\3"+ + "\30\3\30\3\30\3\30\3\30\3\30\5\30\u01e3\n\30\5\30\u01e5\n\30\3\30\3\30"+ + "\3\30\3\30\3\30\3\30\5\30\u01ed\n\30\3\30\3\30\3\30\3\30\3\30\7\30\u01f4"+ + "\n\30\f\30\16\30\u01f7\13\30\3\30\3\30\5\30\u01fb\n\30\3\31\3\31\5\31"+ + "\u01ff\n\31\3\31\3\31\6\31\u0203\n\31\r\31\16\31\u0204\3\31\3\31\5\31"+ + "\u0209\n\31\3\31\5\31\u020c\n\31\3\32\3\32\3\32\3\33\3\33\3\33\3\33\7"+ + "\33\u0215\n\33\f\33\16\33\u0218\13\33\3\33\3\33\5\33\u021c\n\33\3\33\5"+ + "\33\u021f\n\33\3\33\3\33\3\33\3\33\3\33\5\33\u0226\n\33\3\33\3\33\3\33"+ + "\3\33\3\33\5\33\u022d\n\33\5\33\u022f\n\33\3\34\3\34\3\34\7\34\u0234\n"+ + "\34\f\34\16\34\u0237\13\34\3\34\5\34\u023a\n\34\3\35\3\35\3\35\7\35\u023f"+ + "\n\35\f\35\16\35\u0242\13\35\3\35\5\35\u0245\n\35\3\36\3\36\3\36\5\36"+ + "\u024a\n\36\3\37\3\37\3\37\7\37\u024f\n\37\f\37\16\37\u0252\13\37\3 \3"+ + " \3 \5 \u0257\n \3!\3!\3!\3!\3!\3!\5!\u025f\n!\3!\3!\5!\u0263\n!\3!\3"+ + "!\5!\u0267\n!\3\"\3\"\3\"\5\"\u026c\n\"\3\"\3\"\3\"\5\"\u0271\n\"\3\""+ + "\3\"\5\"\u0275\n\"\3\"\5\"\u0278\n\"\3\"\5\"\u027b\n\"\3\"\3\"\5\"\u027f"+ + "\n\"\5\"\u0281\n\"\3#\3#\3#\7#\u0286\n#\f#\16#\u0289\13#\3$\3$\3$\5$\u028e"+ + "\n$\3$\5$\u0291\n$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3\'\5\'\u029d\n\'\3\'"+ + "\3\'\3\'\3\'\3\'\3\'\7\'\u02a5\n\'\f\'\16\'\u02a8\13\'\3(\3(\3(\3(\3("+ + "\3(\3(\3(\3(\3(\3(\3(\5(\u02b6\n(\3(\3(\3(\5(\u02bb\n(\5(\u02bd\n(\3("+ + "\7(\u02c0\n(\f(\16(\u02c3\13(\3)\3)\5)\u02c7\n)\3)\3)\7)\u02cb\n)\f)\16"+ + ")\u02ce\13)\3)\3)\5)\u02d2\n)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\3"+ + ")\3)\3)\3)\3)\3)\3)\3)\7)\u02e9\n)\f)\16)\u02ec\13)\3*\3*\3*\5*\u02f1"+ + "\n*\3*\3*\3*\5*\u02f6\n*\3*\3*\3*\5*\u02fb\n*\3*\3*\3*\3*\5*\u0301\n*"+ + "\3*\3*\3*\3*\3*\3*\3*\5*\u030a\n*\3*\3*\3*\6*\u030f\n*\r*\16*\u0310\5"+ + "*\u0313\n*\3+\3+\3+\3+\3+\3+\5+\u031b\n+\3+\3+\3+\3+\3+\3+\3+\5+\u0324"+ + "\n+\7+\u0326\n+\f+\16+\u0329\13+\3+\5+\u032c\n+\3+\3+\3+\3+\3+\3+\5+\u0334"+ + "\n+\3,\3,\5,\u0338\n,\3,\3,\3,\3,\5,\u033e\n,\7,\u0340\n,\f,\16,\u0343"+ + "\13,\3,\5,\u0346\n,\5,\u0348\n,\3-\3-\3-\7-\u034d\n-\f-\16-\u0350\13-"+ + "\3-\5-\u0353\n-\3.\3.\3.\3.\3.\3.\7.\u035b\n.\f.\16.\u035e\13.\3/\3/\3"+ + "\60\3\60\3\60\5\60\u0365\n\60\3\61\3\61\3\62\3\62\5\62\u036b\n\62\3\63"+ + "\3\63\3\63\5\63\u0370\n\63\3\64\3\64\3\64\5\64\u0375\n\64\3\64\5\64\u0378"+ + "\n\64\3\65\3\65\5\65\u037c\n\65\3\65\3\65\3\65\3\65\3\65\5\65\u0383\n"+ + "\65\3\66\3\66\3\66\7\66\u0388\n\66\f\66\16\66\u038b\13\66\3\66\5\66\u038e"+ + "\n\66\3\67\3\67\3\67\3\67\5\67\u0394\n\67\3\67\3\67\5\67\u0398\n\67\3"+ + "8\38\38\78\u039d\n8\f8\168\u03a0\138\38\58\u03a3\n8\39\39\39\39\59\u03a9"+ + "\n9\39\59\u03ac\n9\59\u03ae\n9\39\39\59\u03b2\n9\39\59\u03b5\n9\59\u03b7"+ + "\n9\3:\3:\5:\u03bb\n:\3;\3;\3;\3;\3;\5;\u03c2\n;\3<\3<\3<\3<\5<\u03c8"+ + "\n<\5<\u03ca\n<\3<\2\6LNPZ=\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \""+ + "$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtv\2\f\3\3\5\5\3\2+,"+ + "\3\2HT\4\29:>>\5\2..;=FF\3\29:\3\2\678\4\2)*bb\3\2VY\4\2..\62\62\2\u0459"+ + "\2{\3\2\2\2\4\u0084\3\2\2\2\6\u0088\3\2\2\2\b\u008c\3\2\2\2\n\u0095\3"+ + "\2\2\2\f\u00e1\3\2\2\2\16\u00ed\3\2\2\2\20\u00ef\3\2\2\2\22\u00fa\3\2"+ + "\2\2\24\u00ff\3\2\2\2\26\u0103\3\2\2\2\30\u0107\3\2\2\2\32\u010c\3\2\2"+ + "\2\34\u011f\3\2\2\2\36\u012c\3\2\2\2 \u0154\3\2\2\2\"\u0156\3\2\2\2$\u0159"+ + "\3\2\2\2&\u015c\3\2\2\2(\u016a\3\2\2\2*\u016c\3\2\2\2,\u0171\3\2\2\2."+ + "\u01fa\3\2\2\2\60\u020b\3\2\2\2\62\u020d\3\2\2\2\64\u022e\3\2\2\2\66\u0230"+ + "\3\2\2\28\u023b\3\2\2\2:\u0246\3\2\2\2<\u024b\3\2\2\2>\u0253\3\2\2\2@"+ + "\u0266\3\2\2\2B\u0280\3\2\2\2D\u0282\3\2\2\2F\u0290\3\2\2\2H\u0292\3\2"+ + "\2\2J\u0295\3\2\2\2L\u029c\3\2\2\2N\u02a9\3\2\2\2P\u02d1\3\2\2\2R\u0312"+ + "\3\2\2\2T\u0333\3\2\2\2V\u0337\3\2\2\2X\u0349\3\2\2\2Z\u0354\3\2\2\2\\"+ + "\u035f\3\2\2\2^\u0364\3\2\2\2`\u0366\3\2\2\2b\u0368\3\2\2\2d\u036f\3\2"+ + "\2\2f\u0377\3\2\2\2h\u0382\3\2\2\2j\u0384\3\2\2\2l\u0397\3\2\2\2n\u0399"+ + "\3\2\2\2p\u03b6\3\2\2\2r\u03b8\3\2\2\2t\u03bc\3\2\2\2v\u03c9\3\2\2\2x"+ + "|\5\4\3\2y|\5\6\4\2z|\5\b\5\2{x\3\2\2\2{y\3\2\2\2{z\3\2\2\2{|\3\2\2\2"+ + "|}\3\2\2\2}~\7\2\2\3~\3\3\2\2\2\177\u0085\7\5\2\2\u0080\u0085\5,\27\2"+ + "\u0081\u0082\5\f\7\2\u0082\u0083\7\5\2\2\u0083\u0085\3\2\2\2\u0084\177"+ + "\3\2\2\2\u0084\u0080\3\2\2\2\u0084\u0081\3\2\2\2\u0085\5\3\2\2\2\u0086"+ + "\u0089\7\5\2\2\u0087\u0089\5\n\6\2\u0088\u0086\3\2\2\2\u0088\u0087\3\2"+ + "\2\2\u0089\u008a\3\2\2\2\u008a\u0088\3\2\2\2\u008a\u008b\3\2\2\2\u008b"+ + "\7\3\2\2\2\u008c\u0090\5X-\2\u008d\u008f\7\5\2\2\u008e\u008d\3\2\2\2\u008f"+ + "\u0092\3\2\2\2\u0090\u008e\3\2\2\2\u0090\u0091\3\2\2\2\u0091\t\3\2\2\2"+ + "\u0092\u0090\3\2\2\2\u0093\u0096\5,\27\2\u0094\u0096\5\f\7\2\u0095\u0093"+ + "\3\2\2\2\u0095\u0094\3\2\2\2\u0096\13\3\2\2\2\u0097\u0098\7\17\2\2\u0098"+ + "\u0099\5@!\2\u0099\u009a\7\60\2\2\u009a\u009e\5\16\b\2\u009b\u009d\5\22"+ + "\n\2\u009c\u009b\3\2\2\2\u009d\u00a0\3\2\2\2\u009e\u009c\3\2\2\2\u009e"+ + "\u009f\3\2\2\2\u009f\u00a2\3\2\2\2\u00a0\u009e\3\2\2\2\u00a1\u00a3\5\24"+ + "\13\2\u00a2\u00a1\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00e2\3\2\2\2\u00a4"+ + "\u00a5\7\22\2\2\u00a5\u00a6\5@!\2\u00a6\u00a7\7\60\2\2\u00a7\u00a9\5\16"+ + "\b\2\u00a8\u00aa\5\24\13\2\u00a9\u00a8\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa"+ + "\u00e2\3\2\2\2\u00ab\u00ad\7%\2\2\u00ac\u00ab\3\2\2\2\u00ac\u00ad\3\2"+ + "\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00af\7\23\2\2\u00af\u00b0\5\66\34\2\u00b0"+ + "\u00b1\7\24\2\2\u00b1\u00b2\5X-\2\u00b2\u00b3\7\60\2\2\u00b3\u00b5\5\16"+ + "\b\2\u00b4\u00b6\5\24\13\2\u00b5\u00b4\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6"+ + "\u00e2\3\2\2\2\u00b7\u00b8\7\25\2\2\u00b8\u00b9\7\60\2\2\u00b9\u00c6\5"+ + "\16\b\2\u00ba\u00bc\5\32\16\2\u00bb\u00ba\3\2\2\2\u00bc\u00bd\3\2\2\2"+ + "\u00bd\u00bb\3\2\2\2\u00bd\u00be\3\2\2\2\u00be\u00c0\3\2\2\2\u00bf\u00c1"+ + "\5\24\13\2\u00c0\u00bf\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\u00c3\3\2\2\2"+ + "\u00c2\u00c4\5\26\f\2\u00c3\u00c2\3\2\2\2\u00c3\u00c4\3\2\2\2\u00c4\u00c7"+ + "\3\2\2\2\u00c5\u00c7\5\26\f\2\u00c6\u00bb\3\2\2\2\u00c6\u00c5\3\2\2\2"+ + "\u00c7\u00e2\3\2\2\2\u00c8\u00ca\7%\2\2\u00c9\u00c8\3\2\2\2\u00c9\u00ca"+ + "\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00cc\7\30\2\2\u00cc\u00d1\5\30\r\2"+ + "\u00cd\u00ce\7/\2\2\u00ce\u00d0\5\30\r\2\u00cf\u00cd\3\2\2\2\u00d0\u00d3"+ + "\3\2\2\2\u00d1\u00cf\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2\u00d4\3\2\2\2\u00d3"+ + "\u00d1\3\2\2\2\u00d4\u00d5\7\60\2\2\u00d5\u00d6\5\16\b\2\u00d6\u00e2\3"+ + "\2\2\2\u00d7\u00d9\5\20\t\2\u00d8\u00d7\3\2\2\2\u00d9\u00dc\3\2\2\2\u00da"+ + "\u00d8\3\2\2\2\u00da\u00db\3\2\2\2\u00db\u00df\3\2\2\2\u00dc\u00da\3\2"+ + "\2\2\u00dd\u00e0\5\34\17\2\u00de\u00e0\5\36\20\2\u00df\u00dd\3\2\2\2\u00df"+ + "\u00de\3\2\2\2\u00e0\u00e2\3\2\2\2\u00e1\u0097\3\2\2\2\u00e1\u00a4\3\2"+ + "\2\2\u00e1\u00ac\3\2\2\2\u00e1\u00b7\3\2\2\2\u00e1\u00c9\3\2\2\2\u00e1"+ + "\u00da\3\2\2\2\u00e2\r\3\2\2\2\u00e3\u00ee\5,\27\2\u00e4\u00e5\7\5\2\2"+ + "\u00e5\u00e7\7\3\2\2\u00e6\u00e8\5\n\6\2\u00e7\u00e6\3\2\2\2\u00e8\u00e9"+ + "\3\2\2\2\u00e9\u00e7\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb"+ + "\u00ec\7\4\2\2\u00ec\u00ee\3\2\2\2\u00ed\u00e3\3\2\2\2\u00ed\u00e4\3\2"+ + "\2\2\u00ee\17\3\2\2\2\u00ef\u00f0\7F\2\2\u00f0\u00f6\5Z.\2\u00f1\u00f3"+ + "\7\\\2\2\u00f2\u00f4\5j\66\2\u00f3\u00f2\3\2\2\2\u00f3\u00f4\3\2\2\2\u00f4"+ + "\u00f5\3\2\2\2\u00f5\u00f7\7]\2\2\u00f6\u00f1\3\2\2\2\u00f6\u00f7\3\2"+ + "\2\2\u00f7\u00f8\3\2\2\2\u00f8\u00f9\7\5\2\2\u00f9\21\3\2\2\2\u00fa\u00fb"+ + "\7\20\2\2\u00fb\u00fc\5@!\2\u00fc\u00fd\7\60\2\2\u00fd\u00fe\5\16\b\2"+ + "\u00fe\23\3\2\2\2\u00ff\u0100\7\21\2\2\u0100\u0101\7\60\2\2\u0101\u0102"+ + "\5\16\b\2\u0102\25\3\2\2\2\u0103\u0104\7\27\2\2\u0104\u0105\7\60\2\2\u0105"+ + "\u0106\5\16\b\2\u0106\27\3\2\2\2\u0107\u010a\5@!\2\u0108\u0109\7\f\2\2"+ + "\u0109\u010b\5P)\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\31\3"+ + "\2\2\2\u010c\u011a\7\31\2\2\u010d\u0118\5@!\2\u010e\u010f\6\16\2\2\u010f"+ + "\u0110\7/\2\2\u0110\u0111\5\\/\2\u0111\u0112\b\16\1\2\u0112\u0119\3\2"+ + "\2\2\u0113\u0114\6\16\3\2\u0114\u0115\7\f\2\2\u0115\u0116\5\\/\2\u0116"+ + "\u0117\b\16\1\2\u0117\u0119\3\2\2\2\u0118\u010e\3\2\2\2\u0118\u0113\3"+ + "\2\2\2\u0118\u0119\3\2\2\2\u0119\u011b\3\2\2\2\u011a\u010d\3\2\2\2\u011a"+ + "\u011b\3\2\2\2\u011b\u011c\3\2\2\2\u011c\u011d\7\60\2\2\u011d\u011e\5"+ + "\16\b\2\u011e\33\3\2\2\2\u011f\u0120\7\37\2\2\u0120\u0126\5\\/\2\u0121"+ + "\u0123\7\\\2\2\u0122\u0124\5j\66\2\u0123\u0122\3\2\2\2\u0123\u0124\3\2"+ + "\2\2\u0124\u0125\3\2\2\2\u0125\u0127\7]\2\2\u0126\u0121\3\2\2\2\u0126"+ + "\u0127\3\2\2\2\u0127\u0128\3\2\2\2\u0128\u0129\7\60\2\2\u0129\u012a\5"+ + "\16\b\2\u012a\35\3\2\2\2\u012b\u012d\7%\2\2\u012c\u012b\3\2\2\2\u012c"+ + "\u012d\3\2\2\2\u012d\u012e\3\2\2\2\u012e\u012f\7\6\2\2\u012f\u0130\5\\"+ + "/\2\u0130\u0132\7\\\2\2\u0131\u0133\5 \21\2\u0132\u0131\3\2\2\2\u0132"+ + "\u0133\3\2\2\2\u0133\u0134\3\2\2\2\u0134\u0137\7]\2\2\u0135\u0136\7G\2"+ + "\2\u0136\u0138\5@!\2\u0137\u0135\3\2\2\2\u0137\u0138\3\2\2\2\u0138\u0139"+ + "\3\2\2\2\u0139\u013a\7\60\2\2\u013a\u013b\5\16\b\2\u013b\37\3\2\2\2\u013c"+ + "\u013d\5&\24\2\u013d\u013e\7/\2\2\u013e\u0140\3\2\2\2\u013f\u013c\3\2"+ + "\2\2\u013f\u0140\3\2\2\2\u0140\u014b\3\2\2\2\u0141\u0144\5\"\22\2\u0142"+ + "\u0143\7/\2\2\u0143\u0145\5&\24\2\u0144\u0142\3\2\2\2\u0144\u0145\3\2"+ + "\2\2\u0145\u0148\3\2\2\2\u0146\u0147\7/\2\2\u0147\u0149\5$\23\2\u0148"+ + "\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014c\3\2\2\2\u014a\u014c\5$"+ + "\23\2\u014b\u0141\3\2\2\2\u014b\u014a\3\2\2\2\u014c\u014e\3\2\2\2\u014d"+ + "\u014f\7/\2\2\u014e\u014d\3\2\2\2\u014e\u014f\3\2\2\2\u014f\u0155\3\2"+ + "\2\2\u0150\u0152\5&\24\2\u0151\u0153\7/\2\2\u0152\u0151\3\2\2\2\u0152"+ + "\u0153\3\2\2\2\u0153\u0155\3\2\2\2\u0154\u013f\3\2\2\2\u0154\u0150\3\2"+ + "\2\2\u0155!\3\2\2\2\u0156\u0157\7.\2\2\u0157\u0158\5*\26\2\u0158#\3\2"+ + "\2\2\u0159\u015a\7\62\2\2\u015a\u015b\5*\26\2\u015b%\3\2\2\2\u015c\u0161"+ + "\5(\25\2\u015d\u015e\7/\2\2\u015e\u0160\5(\25\2\u015f\u015d\3\2\2\2\u0160"+ + "\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161\u0162\3\2\2\2\u0162\'\3\2\2\2"+ + "\u0163\u0161\3\2\2\2\u0164\u0167\5*\26\2\u0165\u0166\7\63\2\2\u0166\u0168"+ + "\5@!\2\u0167\u0165\3\2\2\2\u0167\u0168\3\2\2\2\u0168\u016b\3\2\2\2\u0169"+ + "\u016b\7.\2\2\u016a\u0164\3\2\2\2\u016a\u0169\3\2\2\2\u016b)\3\2\2\2\u016c"+ + "\u016f\5\\/\2\u016d\u016e\7\60\2\2\u016e\u0170\5@!\2\u016f\u016d\3\2\2"+ + "\2\u016f\u0170\3\2\2\2\u0170+\3\2\2\2\u0171\u0176\5.\30\2\u0172\u0173"+ + "\7\61\2\2\u0173\u0175\5.\30\2\u0174\u0172\3\2\2\2\u0175\u0178\3\2\2\2"+ + "\u0176\u0174\3\2\2\2\u0176\u0177\3\2\2\2\u0177\u017a\3\2\2\2\u0178\u0176"+ + "\3\2\2\2\u0179\u017b\7\61\2\2\u017a\u0179\3\2\2\2\u017a\u017b\3\2\2\2"+ + "\u017b\u017c\3\2\2\2\u017c\u017d\t\2\2\2\u017d-\3\2\2\2\u017e\u0180\5"+ + "\60\31\2\u017f\u0181\5\64\33\2\u0180\u017f\3\2\2\2\u0180\u0181\3\2\2\2"+ + "\u0181\u01fb\3\2\2\2\u0182\u0183\6\30\4\2\u0183\u019a\7\'\2\2\u0184\u0189"+ + "\5@!\2\u0185\u0186\7/\2\2\u0186\u0188\5@!\2\u0187\u0185\3\2\2\2\u0188"+ + "\u018b\3\2\2\2\u0189\u0187\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018d\3\2"+ + "\2\2\u018b\u0189\3\2\2\2\u018c\u018e\7/\2\2\u018d\u018c\3\2\2\2\u018d"+ + "\u018e\3\2\2\2\u018e\u019b\3\2\2\2\u018f\u0190\78\2\2\u0190\u0193\5@!"+ + "\2\u0191\u0192\7/\2\2\u0192\u0194\5@!\2\u0193\u0191\3\2\2\2\u0194\u0195"+ + "\3\2\2\2\u0195\u0193\3\2\2\2\u0195\u0196\3\2\2\2\u0196\u0198\3\2\2\2\u0197"+ + "\u0199\7/\2\2\u0198\u0197\3\2\2\2\u0198\u0199\3\2\2\2\u0199\u019b\3\2"+ + "\2\2\u019a\u0184\3\2\2\2\u019a\u018f\3\2\2\2\u019b\u019c\3\2\2\2\u019c"+ + "\u019d\b\30\1\2\u019d\u01fb\3\2\2\2\u019e\u019f\7!\2\2\u019f\u01fb\5\66"+ + "\34\2\u01a0\u01fb\7\"\2\2\u01a1\u01fb\7$\2\2\u01a2\u01fb\7#\2\2\u01a3"+ + "\u01a5\7\7\2\2\u01a4\u01a6\5X-\2\u01a5\u01a4\3\2\2\2\u01a5\u01a6\3\2\2"+ + "\2\u01a6\u01fb\3\2\2\2\u01a7\u01b1\7\b\2\2\u01a8\u01af\5@!\2\u01a9\u01aa"+ + "\7/\2\2\u01aa\u01ad\5@!\2\u01ab\u01ac\7/\2\2\u01ac\u01ae\5@!\2\u01ad\u01ab"+ + "\3\2\2\2\u01ad\u01ae\3\2\2\2\u01ae\u01b0\3\2\2\2\u01af\u01a9\3\2\2\2\u01af"+ + "\u01b0\3\2\2\2\u01b0\u01b2\3\2\2\2\u01b1\u01a8\3\2\2\2\u01b1\u01b2\3\2"+ + "\2\2\u01b2\u01b5\3\2\2\2\u01b3\u01b4\7\t\2\2\u01b4\u01b6\5@!\2\u01b5\u01b3"+ + "\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01fb\3\2\2\2\u01b7\u01fb\5b\62\2\u01b8"+ + "\u01b9\7\n\2\2\u01b9\u01fb\5<\37\2\u01ba\u01c7\7\t\2\2\u01bb\u01bd\t\3"+ + "\2\2\u01bc\u01bb\3\2\2\2\u01bd\u01c0\3\2\2\2\u01be\u01bc\3\2\2\2\u01be"+ + "\u01bf\3\2\2\2\u01bf\u01c1\3\2\2\2\u01c0\u01be\3\2\2\2\u01c1\u01c8\5Z"+ + ".\2\u01c2\u01c4\t\3\2\2\u01c3\u01c2\3\2\2\2\u01c4\u01c5\3\2\2\2\u01c5"+ + "\u01c3\3\2\2\2\u01c5\u01c6\3\2\2\2\u01c6\u01c8\3\2\2\2\u01c7\u01be\3\2"+ + "\2\2\u01c7\u01c3\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01d0\7\n\2\2\u01ca"+ + "\u01d1\7.\2\2\u01cb\u01cc\7\\\2\2\u01cc\u01cd\58\35\2\u01cd\u01ce\7]\2"+ + "\2\u01ce\u01d1\3\2\2\2\u01cf\u01d1\58\35\2\u01d0\u01ca\3\2\2\2\u01d0\u01cb"+ + "\3\2\2\2\u01d0\u01cf\3\2\2\2\u01d1\u01fb\3\2\2\2\u01d2\u01d3\7\r\2\2\u01d3"+ + "\u01d8\5\\/\2\u01d4\u01d5\7/\2\2\u01d5\u01d7\5\\/\2\u01d6\u01d4\3\2\2"+ + "\2\u01d7\u01da\3\2\2\2\u01d8\u01d6\3\2\2\2\u01d8\u01d9\3\2\2\2\u01d9\u01fb"+ + "\3\2\2\2\u01da\u01d8\3\2\2\2\u01db\u01dc\6\30\5\2\u01dc\u01dd\7(\2\2\u01dd"+ + "\u01e4\5P)\2\u01de\u01df\7\24\2\2\u01df\u01e2\5@!\2\u01e0\u01e1\7/\2\2"+ + "\u01e1\u01e3\5@!\2\u01e2\u01e0\3\2\2\2\u01e2\u01e3\3\2\2\2\u01e3\u01e5"+ + "\3\2\2\2\u01e4\u01de\3\2\2\2\u01e4\u01e5\3\2\2\2\u01e5\u01e6\3\2\2\2\u01e6"+ + "\u01e7\b\30\1\2\u01e7\u01fb\3\2\2\2\u01e8\u01e9\7\16\2\2\u01e9\u01ec\5"+ + "@!\2\u01ea\u01eb\7/\2\2\u01eb\u01ed\5@!\2\u01ec\u01ea\3\2\2\2\u01ec\u01ed"+ + "\3\2\2\2\u01ed\u01fb\3\2\2\2\u01ee\u01ef\6\30\6\2\u01ef\u01f0\7\13\2\2"+ + "\u01f0\u01f5\5\\/\2\u01f1\u01f2\7/\2\2\u01f2\u01f4\5\\/\2\u01f3\u01f1"+ + "\3\2\2\2\u01f4\u01f7\3\2\2\2\u01f5\u01f3\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6"+ + "\u01f8\3\2\2\2\u01f7\u01f5\3\2\2\2\u01f8\u01f9\b\30\1\2\u01f9\u01fb\3"+ + "\2\2\2\u01fa\u017e\3\2\2\2\u01fa\u0182\3\2\2\2\u01fa\u019e\3\2\2\2\u01fa"+ + "\u01a0\3\2\2\2\u01fa\u01a1\3\2\2\2\u01fa\u01a2\3\2\2\2\u01fa\u01a3\3\2"+ + "\2\2\u01fa\u01a7\3\2\2\2\u01fa\u01b7\3\2\2\2\u01fa\u01b8\3\2\2\2\u01fa"+ + "\u01ba\3\2\2\2\u01fa\u01d2\3\2\2\2\u01fa\u01db\3\2\2\2\u01fa\u01e8\3\2"+ + "\2\2\u01fa\u01ee\3\2\2\2\u01fb/\3\2\2\2\u01fc\u01ff\5@!\2\u01fd\u01ff"+ + "\5\62\32\2\u01fe\u01fc\3\2\2\2\u01fe\u01fd\3\2\2\2\u01ff\u0200\3\2\2\2"+ + "\u0200\u0201\7/\2\2\u0201\u0203\3\2\2\2\u0202\u01fe\3\2\2\2\u0203\u0204"+ + "\3\2\2\2\u0204\u0202\3\2\2\2\u0204\u0205\3\2\2\2\u0205\u0208\3\2\2\2\u0206"+ + "\u0209\5@!\2\u0207\u0209\5\62\32\2\u0208\u0206\3\2\2\2\u0208\u0207\3\2"+ + "\2\2\u0208\u0209\3\2\2\2\u0209\u020c\3\2\2\2\u020a\u020c\5X-\2\u020b\u0202"+ + "\3\2\2\2\u020b\u020a\3\2\2\2\u020c\61\3\2\2\2\u020d\u020e\7.\2\2\u020e"+ + "\u020f\5P)\2\u020f\63\3\2\2\2\u0210\u021e\7\63\2\2\u0211\u0216\5\60\31"+ + "\2\u0212\u0213\7\63\2\2\u0213\u0215\5\60\31\2\u0214\u0212\3\2\2\2\u0215"+ + "\u0218\3\2\2\2\u0216\u0214\3\2\2\2\u0216\u0217\3\2\2\2\u0217\u021b\3\2"+ + "\2\2\u0218\u0216\3\2\2\2\u0219\u021a\7\63\2\2\u021a\u021c\5b\62\2\u021b"+ + "\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021c\u021f\3\2\2\2\u021d\u021f\5b"+ + "\62\2\u021e\u0211\3\2\2\2\u021e\u021d\3\2\2\2\u021f\u022f\3\2\2\2\u0220"+ + "\u0221\6\33\7\2\u0221\u0222\7\60\2\2\u0222\u0225\5@!\2\u0223\u0224\7\63"+ + "\2\2\u0224\u0226\5X-\2\u0225\u0223\3\2\2\2\u0225\u0226\3\2\2\2\u0226\u0227"+ + "\3\2\2\2\u0227\u0228\b\33\1\2\u0228\u022f\3\2\2\2\u0229\u022c\t\4\2\2"+ + "\u022a\u022d\5b\62\2\u022b\u022d\5X-\2\u022c\u022a\3\2\2\2\u022c\u022b"+ + "\3\2\2\2\u022d\u022f\3\2\2\2\u022e\u0210\3\2\2\2\u022e\u0220\3\2\2\2\u022e"+ + "\u0229\3\2\2\2\u022f\65\3\2\2\2\u0230\u0235\5P)\2\u0231\u0232\7/\2\2\u0232"+ + "\u0234\5P)\2\u0233\u0231\3\2\2\2\u0234\u0237\3\2\2\2\u0235\u0233\3\2\2"+ + "\2\u0235\u0236\3\2\2\2\u0236\u0239\3\2\2\2\u0237\u0235\3\2\2\2\u0238\u023a"+ + "\7/\2\2\u0239\u0238\3\2\2\2\u0239\u023a\3\2\2\2\u023a\67\3\2\2\2\u023b"+ + "\u0240\5:\36\2\u023c\u023d\7/\2\2\u023d\u023f\5:\36\2\u023e\u023c\3\2"+ + "\2\2\u023f\u0242\3\2\2\2\u0240\u023e\3\2\2\2\u0240\u0241\3\2\2\2\u0241"+ + "\u0244\3\2\2\2\u0242\u0240\3\2\2\2\u0243\u0245\7/\2\2\u0244\u0243\3\2"+ + "\2\2\u0244\u0245\3\2\2\2\u02459\3\2\2\2\u0246\u0249\5\\/\2\u0247\u0248"+ + "\7\f\2\2\u0248\u024a\5\\/\2\u0249\u0247\3\2\2\2\u0249\u024a\3\2\2\2\u024a"+ + ";\3\2\2\2\u024b\u0250\5> \2\u024c\u024d\7/\2\2\u024d\u024f\5> \2\u024e"+ + "\u024c\3\2\2\2\u024f\u0252\3\2\2\2\u0250\u024e\3\2\2\2\u0250\u0251\3\2"+ + "\2\2\u0251=\3\2\2\2\u0252\u0250\3\2\2\2\u0253\u0256\5Z.\2\u0254\u0255"+ + "\7\f\2\2\u0255\u0257\5\\/\2\u0256\u0254\3\2\2\2\u0256\u0257\3\2\2\2\u0257"+ + "?\3\2\2\2\u0258\u025e\5L\'\2\u0259\u025a\7\17\2\2\u025a\u025b\5L\'\2\u025b"+ + "\u025c\7\21\2\2\u025c\u025d\5@!\2\u025d\u025f\3\2\2\2\u025e\u0259\3\2"+ + "\2\2\u025e\u025f\3\2\2\2\u025f\u0267\3\2\2\2\u0260\u0262\7\32\2\2\u0261"+ + "\u0263\5B\"\2\u0262\u0261\3\2\2\2\u0262\u0263\3\2\2\2\u0263\u0264\3\2"+ + "\2\2\u0264\u0265\7\60\2\2\u0265\u0267\5@!\2\u0266\u0258\3\2\2\2\u0266"+ + "\u0260\3\2\2\2\u0267A\3\2\2\2\u0268\u0269\5D#\2\u0269\u026a\7/\2\2\u026a"+ + "\u026c\3\2\2\2\u026b\u0268\3\2\2\2\u026b\u026c\3\2\2\2\u026c\u0277\3\2"+ + "\2\2\u026d\u0270\5H%\2\u026e\u026f\7/\2\2\u026f\u0271\5D#\2\u0270\u026e"+ + "\3\2\2\2\u0270\u0271\3\2\2\2\u0271\u0274\3\2\2\2\u0272\u0273\7/\2\2\u0273"+ + "\u0275\5J&\2\u0274\u0272\3\2\2\2\u0274\u0275\3\2\2\2\u0275\u0278\3\2\2"+ + "\2\u0276\u0278\5J&\2\u0277\u026d\3\2\2\2\u0277\u0276\3\2\2\2\u0278\u027a"+ + "\3\2\2\2\u0279\u027b\7/\2\2\u027a\u0279\3\2\2\2\u027a\u027b\3\2\2\2\u027b"+ + "\u0281\3\2\2\2\u027c\u027e\5D#\2\u027d\u027f\7/\2\2\u027e\u027d\3\2\2"+ + "\2\u027e\u027f\3\2\2\2\u027f\u0281\3\2\2\2\u0280\u026b\3\2\2\2\u0280\u027c"+ + "\3\2\2\2\u0281C\3\2\2\2\u0282\u0287\5F$\2\u0283\u0284\7/\2\2\u0284\u0286"+ + "\5F$\2\u0285\u0283\3\2\2\2\u0286\u0289\3\2\2\2\u0287\u0285\3\2\2\2\u0287"+ + "\u0288\3\2\2\2\u0288E\3\2\2\2\u0289\u0287\3\2\2\2\u028a\u028d\5\\/\2\u028b"+ + "\u028c\7\63\2\2\u028c\u028e\5@!\2\u028d\u028b\3\2\2\2\u028d\u028e\3\2"+ + "\2\2\u028e\u0291\3\2\2\2\u028f\u0291\7.\2\2\u0290\u028a\3\2\2\2\u0290"+ + "\u028f\3\2\2\2\u0291G\3\2\2\2\u0292\u0293\7.\2\2\u0293\u0294\5\\/\2\u0294"+ + "I\3\2\2\2\u0295\u0296\7\62\2\2\u0296\u0297\5\\/\2\u0297K\3\2\2\2\u0298"+ + "\u0299\b\'\1\2\u0299\u029d\5N(\2\u029a\u029b\7\35\2\2\u029b\u029d\5L\'"+ + "\5\u029c\u0298\3\2\2\2\u029c\u029a\3\2\2\2\u029d\u02a6\3\2\2\2\u029e\u029f"+ + "\f\4\2\2\u029f\u02a0\7\34\2\2\u02a0\u02a5\5L\'\5\u02a1\u02a2\f\3\2\2\u02a2"+ + "\u02a3\7\33\2\2\u02a3\u02a5\5L\'\4\u02a4\u029e\3\2\2\2\u02a4\u02a1\3\2"+ + "\2\2\u02a5\u02a8\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a6\u02a7\3\2\2\2\u02a7"+ + "M\3\2\2\2\u02a8\u02a6\3\2\2\2\u02a9\u02aa\b(\1\2\u02aa\u02ab\5P)\2\u02ab"+ + "\u02c1\3\2\2\2\u02ac\u02bc\f\4\2\2\u02ad\u02bd\7?\2\2\u02ae\u02bd\7@\2"+ + "\2\u02af\u02bd\7A\2\2\u02b0\u02bd\7B\2\2\u02b1\u02bd\7C\2\2\u02b2\u02bd"+ + "\7D\2\2\u02b3\u02bd\7E\2\2\u02b4\u02b6\7\35\2\2\u02b5\u02b4\3\2\2\2\u02b5"+ + "\u02b6\3\2\2\2\u02b6\u02b7\3\2\2\2\u02b7\u02bd\7\24\2\2\u02b8\u02ba\7"+ + "\36\2\2\u02b9\u02bb\7\35\2\2\u02ba\u02b9\3\2\2\2\u02ba\u02bb\3\2\2\2\u02bb"+ + "\u02bd\3\2\2\2\u02bc\u02ad\3\2\2\2\u02bc\u02ae\3\2\2\2\u02bc\u02af\3\2"+ + "\2\2\u02bc\u02b0\3\2\2\2\u02bc\u02b1\3\2\2\2\u02bc\u02b2\3\2\2\2\u02bc"+ + "\u02b3\3\2\2\2\u02bc\u02b5\3\2\2\2\u02bc\u02b8\3\2\2\2\u02bd\u02be\3\2"+ + "\2\2\u02be\u02c0\5N(\5\u02bf\u02ac\3\2\2\2\u02c0\u02c3\3\2\2\2\u02c1\u02bf"+ + "\3\2\2\2\u02c1\u02c2\3\2\2\2\u02c2O\3\2\2\2\u02c3\u02c1\3\2\2\2\u02c4"+ + "\u02c6\b)\1\2\u02c5\u02c7\7&\2\2\u02c6\u02c5\3\2\2\2\u02c6\u02c7\3\2\2"+ + "\2\u02c7\u02c8\3\2\2\2\u02c8\u02cc\5R*\2\u02c9\u02cb\5f\64\2\u02ca\u02c9"+ + "\3\2\2\2\u02cb\u02ce\3\2\2\2\u02cc\u02ca\3\2\2\2\u02cc\u02cd\3\2\2\2\u02cd"+ + "\u02d2\3\2\2\2\u02ce\u02cc\3\2\2\2\u02cf\u02d0\t\5\2\2\u02d0\u02d2\5P"+ + ")\t\u02d1\u02c4\3\2\2\2\u02d1\u02cf\3\2\2\2\u02d2\u02ea\3\2\2\2\u02d3"+ + "\u02d4\f\n\2\2\u02d4\u02d5\7\62\2\2\u02d5\u02e9\5P)\n\u02d6\u02d7\f\b"+ + "\2\2\u02d7\u02d8\t\6\2\2\u02d8\u02e9\5P)\t\u02d9\u02da\f\7\2\2\u02da\u02db"+ + "\t\7\2\2\u02db\u02e9\5P)\b\u02dc\u02dd\f\6\2\2\u02dd\u02de\t\b\2\2\u02de"+ + "\u02e9\5P)\7\u02df\u02e0\f\5\2\2\u02e0\u02e1\7\66\2\2\u02e1\u02e9\5P)"+ + "\6\u02e2\u02e3\f\4\2\2\u02e3\u02e4\7\65\2\2\u02e4\u02e9\5P)\5\u02e5\u02e6"+ + "\f\3\2\2\u02e6\u02e7\7\64\2\2\u02e7\u02e9\5P)\4\u02e8\u02d3\3\2\2\2\u02e8"+ + "\u02d6\3\2\2\2\u02e8\u02d9\3\2\2\2\u02e8\u02dc\3\2\2\2\u02e8\u02df\3\2"+ + "\2\2\u02e8\u02e2\3\2\2\2\u02e8\u02e5\3\2\2\2\u02e9\u02ec\3\2\2\2\u02ea"+ + "\u02e8\3\2\2\2\u02ea\u02eb\3\2\2\2\u02ebQ\3\2\2\2\u02ec\u02ea\3\2\2\2"+ + "\u02ed\u02f0\7\\\2\2\u02ee\u02f1\5b\62\2\u02ef\u02f1\5V,\2\u02f0\u02ee"+ + "\3\2\2\2\u02f0\u02ef\3\2\2\2\u02f0\u02f1\3\2\2\2\u02f1\u02f2\3\2\2\2\u02f2"+ + "\u0313\7]\2\2\u02f3\u02f5\7`\2\2\u02f4\u02f6\5V,\2\u02f5\u02f4\3\2\2\2"+ + "\u02f5\u02f6\3\2\2\2\u02f6\u02f7\3\2\2\2\u02f7\u0313\7a\2\2\u02f8\u02fa"+ + "\7^\2\2\u02f9\u02fb\5T+\2\u02fa\u02f9\3\2\2\2\u02fa\u02fb\3\2\2\2\u02fb"+ + "\u02fc\3\2\2\2\u02fc\u0313\7_\2\2\u02fd\u02fe\7-\2\2\u02fe\u0300\5X-\2"+ + "\u02ff\u0301\7/\2\2\u0300\u02ff\3\2\2\2\u0300\u0301\3\2\2\2\u0301\u0302"+ + "\3\2\2\2\u0302\u0303\7-\2\2\u0303\u0313\3\2\2\2\u0304\u0313\7,\2\2\u0305"+ + "\u0313\5\\/\2\u0306\u0313\7\'\2\2\u0307\u0313\7(\2\2\u0308\u030a\7:\2"+ + "\2\u0309\u0308\3\2\2\2\u0309\u030a\3\2\2\2\u030a\u030b\3\2\2\2\u030b\u0313"+ + "\5^\60\2\u030c\u0313\7\26\2\2\u030d\u030f\7U\2\2\u030e\u030d\3\2\2\2\u030f"+ + "\u0310\3\2\2\2\u0310\u030e\3\2\2\2\u0310\u0311\3\2\2\2\u0311\u0313\3\2"+ + "\2\2\u0312\u02ed\3\2\2\2\u0312\u02f3\3\2\2\2\u0312\u02f8\3\2\2\2\u0312"+ + "\u02fd\3\2\2\2\u0312\u0304\3\2\2\2\u0312\u0305\3\2\2\2\u0312\u0306\3\2"+ + "\2\2\u0312\u0307\3\2\2\2\u0312\u0309\3\2\2\2\u0312\u030c\3\2\2\2\u0312"+ + "\u030e\3\2\2\2\u0313S\3\2\2\2\u0314\u0315\5@!\2\u0315\u0316\7\60\2\2\u0316"+ + "\u0317\5@!\2\u0317\u031b\3\2\2\2\u0318\u0319\7\62\2\2\u0319\u031b\5P)"+ + "\2\u031a\u0314\3\2\2\2\u031a\u0318\3\2\2\2\u031b\u0327\3\2\2\2\u031c\u0323"+ + "\7/\2\2\u031d\u031e\5@!\2\u031e\u031f\7\60\2\2\u031f\u0320\5@!\2\u0320"+ + "\u0324\3\2\2\2\u0321\u0322\7\62\2\2\u0322\u0324\5P)\2\u0323\u031d\3\2"+ + "\2\2\u0323\u0321\3\2\2\2\u0324\u0326\3\2\2\2\u0325\u031c\3\2\2\2\u0326"+ + "\u0329\3\2\2\2\u0327\u0325\3\2\2\2\u0327\u0328\3\2\2\2\u0328\u032b\3\2"+ + "\2\2\u0329\u0327\3\2\2\2\u032a\u032c\7/\2\2\u032b\u032a\3\2\2\2\u032b"+ + "\u032c\3\2\2\2\u032c\u0334\3\2\2\2\u032d\u032e\5@!\2\u032e\u032f\7\60"+ + "\2\2\u032f\u0330\5@!\2\u0330\u0331\5t;\2\u0331\u0334\3\2\2\2\u0332\u0334"+ + "\5V,\2\u0333\u031a\3\2\2\2\u0333\u032d\3\2\2\2\u0333\u0332\3\2\2\2\u0334"+ + "U\3\2\2\2\u0335\u0338\5@!\2\u0336\u0338\5\62\32\2\u0337\u0335\3\2\2\2"+ + "\u0337\u0336\3\2\2\2\u0338\u0347\3\2\2\2\u0339\u0348\5t;\2\u033a\u033d"+ + "\7/\2\2\u033b\u033e\5@!\2\u033c\u033e\5\62\32\2\u033d\u033b\3\2\2\2\u033d"+ + "\u033c\3\2\2\2\u033e\u0340\3\2\2\2\u033f\u033a\3\2\2\2\u0340\u0343\3\2"+ + "\2\2\u0341\u033f\3\2\2\2\u0341\u0342\3\2\2\2\u0342\u0345\3\2\2\2\u0343"+ + "\u0341\3\2\2\2\u0344\u0346\7/\2\2\u0345\u0344\3\2\2\2\u0345\u0346\3\2"+ + "\2\2\u0346\u0348\3\2\2\2\u0347\u0339\3\2\2\2\u0347\u0341\3\2\2\2\u0348"+ + "W\3\2\2\2\u0349\u034e\5@!\2\u034a\u034b\7/\2\2\u034b\u034d\5@!\2\u034c"+ + "\u034a\3\2\2\2\u034d\u0350\3\2\2\2\u034e\u034c\3\2\2\2\u034e\u034f\3\2"+ + "\2\2\u034f\u0352\3\2\2\2\u0350\u034e\3\2\2\2\u0351\u0353\7/\2\2\u0352"+ + "\u0351\3\2\2\2\u0352\u0353\3\2\2\2\u0353Y\3\2\2\2\u0354\u0355\b.\1\2\u0355"+ + "\u0356\5\\/\2\u0356\u035c\3\2\2\2\u0357\u0358\f\4\2\2\u0358\u0359\7+\2"+ + "\2\u0359\u035b\5\\/\2\u035a\u0357\3\2\2\2\u035b\u035e\3\2\2\2\u035c\u035a"+ + "\3\2\2\2\u035c\u035d\3\2\2\2\u035d[\3\2\2\2\u035e\u035c\3\2\2\2\u035f"+ + "\u0360\t\t\2\2\u0360]\3\2\2\2\u0361\u0365\5`\61\2\u0362\u0365\7Z\2\2\u0363"+ + "\u0365\7[\2\2\u0364\u0361\3\2\2\2\u0364\u0362\3\2\2\2\u0364\u0363\3\2"+ + "\2\2\u0365_\3\2\2\2\u0366\u0367\t\n\2\2\u0367a\3\2\2\2\u0368\u036a\7 "+ + "\2\2\u0369\u036b\5d\63\2\u036a\u0369\3\2\2\2\u036a\u036b\3\2\2\2\u036b"+ + "c\3\2\2\2\u036c\u036d\7\t\2\2\u036d\u0370\5@!\2\u036e\u0370\5X-\2\u036f"+ + "\u036c\3\2\2\2\u036f\u036e\3\2\2\2\u0370e\3\2\2\2\u0371\u0372\7+\2\2\u0372"+ + "\u0374\5\\/\2\u0373\u0375\5h\65\2\u0374\u0373\3\2\2\2\u0374\u0375\3\2"+ + "\2\2\u0375\u0378\3\2\2\2\u0376\u0378\5h\65\2\u0377\u0371\3\2\2\2\u0377"+ + "\u0376\3\2\2\2\u0378g\3\2\2\2\u0379\u037b\7\\\2\2\u037a\u037c\5j\66\2"+ + "\u037b\u037a\3\2\2\2\u037b\u037c\3\2\2\2\u037c\u037d\3\2\2\2\u037d\u0383"+ + "\7]\2\2\u037e\u037f\7`\2\2\u037f\u0380\5n8\2\u0380\u0381\7a\2\2\u0381"+ + "\u0383\3\2\2\2\u0382\u0379\3\2\2\2\u0382\u037e\3\2\2\2\u0383i\3\2\2\2"+ + "\u0384\u0389\5l\67\2\u0385\u0386\7/\2\2\u0386\u0388\5l\67\2\u0387\u0385"+ + "\3\2\2\2\u0388\u038b\3\2\2\2\u0389\u0387\3\2\2\2\u0389\u038a\3\2\2\2\u038a"+ + "\u038d\3\2\2\2\u038b\u0389\3\2\2\2\u038c\u038e\7/\2\2\u038d\u038c\3\2"+ + "\2\2\u038d\u038e\3\2\2\2\u038ek\3\2\2\2\u038f\u0393\5@!\2\u0390\u0394"+ + "\5t;\2\u0391\u0392\7\63\2\2\u0392\u0394\5@!\2\u0393\u0390\3\2\2\2\u0393"+ + "\u0391\3\2\2\2\u0393\u0394\3\2\2\2\u0394\u0398\3\2\2\2\u0395\u0396\t\13"+ + "\2\2\u0396\u0398\5@!\2\u0397\u038f\3\2\2\2\u0397\u0395\3\2\2\2\u0398m"+ + "\3\2\2\2\u0399\u039e\5p9\2\u039a\u039b\7/\2\2\u039b\u039d\5p9\2\u039c"+ + "\u039a\3\2\2\2\u039d\u03a0\3\2\2\2\u039e\u039c\3\2\2\2\u039e\u039f\3\2"+ + "\2\2\u039f\u03a2\3\2\2\2\u03a0\u039e\3\2\2\2\u03a1\u03a3\7/\2\2\u03a2"+ + "\u03a1\3\2\2\2\u03a2\u03a3\3\2\2\2\u03a3o\3\2\2\2\u03a4\u03b7\7,\2\2\u03a5"+ + "\u03ad\5@!\2\u03a6\u03a8\7\60\2\2\u03a7\u03a9\5@!\2\u03a8\u03a7\3\2\2"+ + "\2\u03a8\u03a9\3\2\2\2\u03a9\u03ab\3\2\2\2\u03aa\u03ac\5r:\2\u03ab\u03aa"+ + "\3\2\2\2\u03ab\u03ac\3\2\2\2\u03ac\u03ae\3\2\2\2\u03ad\u03a6\3\2\2\2\u03ad"+ + "\u03ae\3\2\2\2\u03ae\u03b7\3\2\2\2\u03af\u03b1\7\60\2\2\u03b0\u03b2\5"+ + "@!\2\u03b1\u03b0\3\2\2\2\u03b1\u03b2\3\2\2\2\u03b2\u03b4\3\2\2\2\u03b3"+ + "\u03b5\5r:\2\u03b4\u03b3\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5\u03b7\3\2\2"+ + "\2\u03b6\u03a4\3\2\2\2\u03b6\u03a5\3\2\2\2\u03b6\u03af\3\2\2\2\u03b7q"+ + "\3\2\2\2\u03b8\u03ba\7\60\2\2\u03b9\u03bb\5@!\2\u03ba\u03b9\3\2\2\2\u03ba"+ + "\u03bb\3\2\2\2\u03bbs\3\2\2\2\u03bc\u03bd\7\23\2\2\u03bd\u03be\5\66\34"+ + "\2\u03be\u03bf\7\24\2\2\u03bf\u03c1\5L\'\2\u03c0\u03c2\5v<\2\u03c1\u03c0"+ + "\3\2\2\2\u03c1\u03c2\3\2\2\2\u03c2u\3\2\2\2\u03c3\u03ca\5t;\2\u03c4\u03c5"+ + "\7\17\2\2\u03c5\u03c7\5@!\2\u03c6\u03c8\5v<\2\u03c7\u03c6\3\2\2\2\u03c7"+ + "\u03c8\3\2\2\2\u03c8\u03ca\3\2\2\2\u03c9\u03c3\3\2\2\2\u03c9\u03c4\3\2"+ + "\2\2\u03caw\3\2\2\2\u0099{\u0084\u0088\u008a\u0090\u0095\u009e\u00a2\u00a9"+ + "\u00ac\u00b5\u00bd\u00c0\u00c3\u00c6\u00c9\u00d1\u00da\u00df\u00e1\u00e9"+ + "\u00ed\u00f3\u00f6\u010a\u0118\u011a\u0123\u0126\u012c\u0132\u0137\u013f"+ + "\u0144\u0148\u014b\u014e\u0152\u0154\u0161\u0167\u016a\u016f\u0176\u017a"+ + "\u0180\u0189\u018d\u0195\u0198\u019a\u01a5\u01ad\u01af\u01b1\u01b5\u01be"+ + "\u01c5\u01c7\u01d0\u01d8\u01e2\u01e4\u01ec\u01f5\u01fa\u01fe\u0204\u0208"+ + "\u020b\u0216\u021b\u021e\u0225\u022c\u022e\u0235\u0239\u0240\u0244\u0249"+ + "\u0250\u0256\u025e\u0262\u0266\u026b\u0270\u0274\u0277\u027a\u027e\u0280"+ + "\u0287\u028d\u0290\u029c\u02a4\u02a6\u02b5\u02ba\u02bc\u02c1\u02c6\u02cc"+ + "\u02d1\u02e8\u02ea\u02f0\u02f5\u02fa\u0300\u0309\u0310\u0312\u031a\u0323"+ + "\u0327\u032b\u0333\u0337\u033d\u0341\u0345\u0347\u034e\u0352\u035c\u0364"+ + "\u036a\u036f\u0374\u0377\u037b\u0382\u0389\u038d\u0393\u0397\u039e\u03a2"+ + "\u03a8\u03ab\u03ad\u03b1\u03b4\u03b6\u03ba\u03c1\u03c7\u03c9"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} diff --git a/docs/compare/src/main/java/pyantlr/PythonParser.tokens b/docs/compare/src/main/java/pyantlr/PythonParser.tokens new file mode 100644 index 0000000000000000000000000000000000000000..1282117c8ef2e08acdfa44e74aad5fe6a8549244 --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonParser.tokens @@ -0,0 +1,185 @@ +INDENT=1 +DEDENT=2 +LINE_BREAK=3 +DEF=4 +RETURN=5 +RAISE=6 +FROM=7 +IMPORT=8 +NONLOCAL=9 +AS=10 +GLOBAL=11 +ASSERT=12 +IF=13 +ELIF=14 +ELSE=15 +WHILE=16 +FOR=17 +IN=18 +TRY=19 +NONE=20 +FINALLY=21 +WITH=22 +EXCEPT=23 +LAMBDA=24 +OR=25 +AND=26 +NOT=27 +IS=28 +CLASS=29 +YIELD=30 +DEL=31 +PASS=32 +CONTINUE=33 +BREAK=34 +ASYNC=35 +AWAIT=36 +PRINT=37 +EXEC=38 +TRUE=39 +FALSE=40 +DOT=41 +ELLIPSIS=42 +REVERSE_QUOTE=43 +STAR=44 +COMMA=45 +COLON=46 +SEMI_COLON=47 +POWER=48 +ASSIGN=49 +OR_OP=50 +XOR=51 +AND_OP=52 +LEFT_SHIFT=53 +RIGHT_SHIFT=54 +ADD=55 +MINUS=56 +DIV=57 +MOD=58 +IDIV=59 +NOT_OP=60 +LESS_THAN=61 +GREATER_THAN=62 +EQUALS=63 +GT_EQ=64 +LT_EQ=65 +NOT_EQ_1=66 +NOT_EQ_2=67 +AT=68 +ARROW=69 +ADD_ASSIGN=70 +SUB_ASSIGN=71 +MULT_ASSIGN=72 +AT_ASSIGN=73 +DIV_ASSIGN=74 +MOD_ASSIGN=75 +AND_ASSIGN=76 +OR_ASSIGN=77 +XOR_ASSIGN=78 +LEFT_SHIFT_ASSIGN=79 +RIGHT_SHIFT_ASSIGN=80 +POWER_ASSIGN=81 +IDIV_ASSIGN=82 +STRING=83 +DECIMAL_INTEGER=84 +OCT_INTEGER=85 +HEX_INTEGER=86 +BIN_INTEGER=87 +IMAG_NUMBER=88 +FLOAT_NUMBER=89 +OPEN_PAREN=90 +CLOSE_PAREN=91 +OPEN_BRACE=92 +CLOSE_BRACE=93 +OPEN_BRACKET=94 +CLOSE_BRACKET=95 +NAME=96 +LINE_JOIN=97 +NEWLINE=98 +WS=99 +COMMENT=100 +'def'=4 +'return'=5 +'raise'=6 +'from'=7 +'import'=8 +'nonlocal'=9 +'as'=10 +'global'=11 +'assert'=12 +'if'=13 +'elif'=14 +'else'=15 +'while'=16 +'for'=17 +'in'=18 +'try'=19 +'None'=20 +'finally'=21 +'with'=22 +'except'=23 +'lambda'=24 +'or'=25 +'and'=26 +'not'=27 +'is'=28 +'class'=29 +'yield'=30 +'del'=31 +'pass'=32 +'continue'=33 +'break'=34 +'async'=35 +'await'=36 +'print'=37 +'exec'=38 +'True'=39 +'False'=40 +'.'=41 +'...'=42 +'`'=43 +'*'=44 +','=45 +':'=46 +';'=47 +'**'=48 +'='=49 +'|'=50 +'^'=51 +'&'=52 +'<<'=53 +'>>'=54 +'+'=55 +'-'=56 +'/'=57 +'%'=58 +'//'=59 +'~'=60 +'<'=61 +'>'=62 +'=='=63 +'>='=64 +'<='=65 +'<>'=66 +'!='=67 +'@'=68 +'->'=69 +'+='=70 +'-='=71 +'*='=72 +'@='=73 +'/='=74 +'%='=75 +'&='=76 +'|='=77 +'^='=78 +'<<='=79 +'>>='=80 +'**='=81 +'//='=82 +'('=90 +')'=91 +'{'=92 +'}'=93 +'['=94 +']'=95 diff --git a/docs/compare/src/main/java/pyantlr/PythonParserBaseListener.java b/docs/compare/src/main/java/pyantlr/PythonParserBaseListener.java new file mode 100644 index 0000000000000000000000000000000000000000..eb0563076a5ac71b094a2af80174fb77a657633e --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonParserBaseListener.java @@ -0,0 +1,974 @@ +package pyantlr;// Generated from PythonParser.g4 by ANTLR 4.7.2 + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link PythonParserListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class PythonParserBaseListener implements PythonParserListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRoot(PythonParser.RootContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRoot(PythonParser.RootContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSingle_input(PythonParser.Single_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSingle_input(PythonParser.Single_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFile_input(PythonParser.File_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFile_input(PythonParser.File_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEval_input(PythonParser.Eval_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEval_input(PythonParser.Eval_inputContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStmt(PythonParser.StmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStmt(PythonParser.StmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIf_stmt(PythonParser.If_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIf_stmt(PythonParser.If_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterWhile_stmt(PythonParser.While_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitWhile_stmt(PythonParser.While_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFor_stmt(PythonParser.For_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFor_stmt(PythonParser.For_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTry_stmt(PythonParser.Try_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTry_stmt(PythonParser.Try_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterWith_stmt(PythonParser.With_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitWith_stmt(PythonParser.With_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSuite(PythonParser.SuiteContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSuite(PythonParser.SuiteContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDecorator(PythonParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDecorator(PythonParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElif_clause(PythonParser.Elif_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElif_clause(PythonParser.Elif_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElse_clause(PythonParser.Else_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElse_clause(PythonParser.Else_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFinally_clause(PythonParser.Finally_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFinally_clause(PythonParser.Finally_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterWith_item(PythonParser.With_itemContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitWith_item(PythonParser.With_itemContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExcept_clause(PythonParser.Except_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExcept_clause(PythonParser.Except_clauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassdef(PythonParser.ClassdefContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassdef(PythonParser.ClassdefContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFuncdef(PythonParser.FuncdefContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFuncdef(PythonParser.FuncdefContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypedargslist(PythonParser.TypedargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypedargslist(PythonParser.TypedargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArgs(PythonParser.ArgsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArgs(PythonParser.ArgsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterKwargs(PythonParser.KwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitKwargs(PythonParser.KwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDef_parameters(PythonParser.Def_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDef_parameters(PythonParser.Def_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDef_parameter(PythonParser.Def_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDef_parameter(PythonParser.Def_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNamed_parameter(PythonParser.Named_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNamed_parameter(PythonParser.Named_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSimple_stmt(PythonParser.Simple_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSimple_stmt(PythonParser.Simple_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpr_stmt(PythonParser.Expr_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpr_stmt(PythonParser.Expr_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrint_stmt(PythonParser.Print_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrint_stmt(PythonParser.Print_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDel_stmt(PythonParser.Del_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDel_stmt(PythonParser.Del_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPass_stmt(PythonParser.Pass_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPass_stmt(PythonParser.Pass_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBreak_stmt(PythonParser.Break_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBreak_stmt(PythonParser.Break_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterContinue_stmt(PythonParser.Continue_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitContinue_stmt(PythonParser.Continue_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterReturn_stmt(PythonParser.Return_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitReturn_stmt(PythonParser.Return_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRaise_stmt(PythonParser.Raise_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRaise_stmt(PythonParser.Raise_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterYield_stmt(PythonParser.Yield_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitYield_stmt(PythonParser.Yield_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImport_stmt(PythonParser.Import_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImport_stmt(PythonParser.Import_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFrom_stmt(PythonParser.From_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFrom_stmt(PythonParser.From_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGlobal_stmt(PythonParser.Global_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGlobal_stmt(PythonParser.Global_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExec_stmt(PythonParser.Exec_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExec_stmt(PythonParser.Exec_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssert_stmt(PythonParser.Assert_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssert_stmt(PythonParser.Assert_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStar_expr(PythonParser.Star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStar_expr(PythonParser.Star_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssign_part(PythonParser.Assign_partContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssign_part(PythonParser.Assign_partContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprlist(PythonParser.ExprlistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprlist(PythonParser.ExprlistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImport_as_names(PythonParser.Import_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImport_as_names(PythonParser.Import_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImport_as_name(PythonParser.Import_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImport_as_name(PythonParser.Import_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDotted_as_names(PythonParser.Dotted_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDotted_as_names(PythonParser.Dotted_as_namesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDotted_as_name(PythonParser.Dotted_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDotted_as_name(PythonParser.Dotted_as_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTest(PythonParser.TestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTest(PythonParser.TestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVarargslist(PythonParser.VarargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVarargslist(PythonParser.VarargslistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVardef_parameters(PythonParser.Vardef_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVardef_parameters(PythonParser.Vardef_parametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVardef_parameter(PythonParser.Vardef_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVardef_parameter(PythonParser.Vardef_parameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVarargs(PythonParser.VarargsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVarargs(PythonParser.VarargsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVarkwargs(PythonParser.VarkwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVarkwargs(PythonParser.VarkwargsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLogical_test(PythonParser.Logical_testContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLogical_test(PythonParser.Logical_testContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterComparison(PythonParser.ComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitComparison(PythonParser.ComparisonContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpr(PythonParser.ExprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpr(PythonParser.ExprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAtom(PythonParser.AtomContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAtom(PythonParser.AtomContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDictorsetmaker(PythonParser.DictorsetmakerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDictorsetmaker(PythonParser.DictorsetmakerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTestlist_comp(PythonParser.Testlist_compContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTestlist_comp(PythonParser.Testlist_compContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTestlist(PythonParser.TestlistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTestlist(PythonParser.TestlistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDotted_name(PythonParser.Dotted_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDotted_name(PythonParser.Dotted_nameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterName(PythonParser.NameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitName(PythonParser.NameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNumber(PythonParser.NumberContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNumber(PythonParser.NumberContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInteger(PythonParser.IntegerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInteger(PythonParser.IntegerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterYield_expr(PythonParser.Yield_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitYield_expr(PythonParser.Yield_exprContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterYield_arg(PythonParser.Yield_argContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitYield_arg(PythonParser.Yield_argContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTrailer(PythonParser.TrailerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTrailer(PythonParser.TrailerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArguments(PythonParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArguments(PythonParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArglist(PythonParser.ArglistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArglist(PythonParser.ArglistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArgument(PythonParser.ArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArgument(PythonParser.ArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSubscriptlist(PythonParser.SubscriptlistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSubscriptlist(PythonParser.SubscriptlistContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSubscript(PythonParser.SubscriptContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSubscript(PythonParser.SubscriptContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSliceop(PythonParser.SliceopContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSliceop(PythonParser.SliceopContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterComp_for(PythonParser.Comp_forContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitComp_for(PythonParser.Comp_forContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterComp_iter(PythonParser.Comp_iterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitComp_iter(PythonParser.Comp_iterContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} diff --git a/docs/compare/src/main/java/pyantlr/PythonParserListener.java b/docs/compare/src/main/java/pyantlr/PythonParserListener.java new file mode 100644 index 0000000000000000000000000000000000000000..665f3903c8808f6a06c9df81605e8518d951f698 --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonParserListener.java @@ -0,0 +1,831 @@ +package pyantlr;// Generated from PythonParser.g4 by ANTLR 4.7.2 +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link PythonParser}. + */ +public interface PythonParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link PythonParser#root}. + * @param ctx the parse tree + */ + void enterRoot(PythonParser.RootContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#root}. + * @param ctx the parse tree + */ + void exitRoot(PythonParser.RootContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#single_input}. + * @param ctx the parse tree + */ + void enterSingle_input(PythonParser.Single_inputContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#single_input}. + * @param ctx the parse tree + */ + void exitSingle_input(PythonParser.Single_inputContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#file_input}. + * @param ctx the parse tree + */ + void enterFile_input(PythonParser.File_inputContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#file_input}. + * @param ctx the parse tree + */ + void exitFile_input(PythonParser.File_inputContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#eval_input}. + * @param ctx the parse tree + */ + void enterEval_input(PythonParser.Eval_inputContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#eval_input}. + * @param ctx the parse tree + */ + void exitEval_input(PythonParser.Eval_inputContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#stmt}. + * @param ctx the parse tree + */ + void enterStmt(PythonParser.StmtContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#stmt}. + * @param ctx the parse tree + */ + void exitStmt(PythonParser.StmtContext ctx); + /** + * Enter a parse tree produced by the {@code if_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterIf_stmt(PythonParser.If_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code if_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitIf_stmt(PythonParser.If_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code while_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterWhile_stmt(PythonParser.While_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code while_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitWhile_stmt(PythonParser.While_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code for_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterFor_stmt(PythonParser.For_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code for_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitFor_stmt(PythonParser.For_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code try_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterTry_stmt(PythonParser.Try_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code try_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitTry_stmt(PythonParser.Try_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code with_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterWith_stmt(PythonParser.With_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code with_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitWith_stmt(PythonParser.With_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code class_or_func_def_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void enterClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code class_or_func_def_stmt} + * labeled alternative in {@link PythonParser#compound_stmt}. + * @param ctx the parse tree + */ + void exitClass_or_func_def_stmt(PythonParser.Class_or_func_def_stmtContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#suite}. + * @param ctx the parse tree + */ + void enterSuite(PythonParser.SuiteContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#suite}. + * @param ctx the parse tree + */ + void exitSuite(PythonParser.SuiteContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#decorator}. + * @param ctx the parse tree + */ + void enterDecorator(PythonParser.DecoratorContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#decorator}. + * @param ctx the parse tree + */ + void exitDecorator(PythonParser.DecoratorContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#elif_clause}. + * @param ctx the parse tree + */ + void enterElif_clause(PythonParser.Elif_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#elif_clause}. + * @param ctx the parse tree + */ + void exitElif_clause(PythonParser.Elif_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#else_clause}. + * @param ctx the parse tree + */ + void enterElse_clause(PythonParser.Else_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#else_clause}. + * @param ctx the parse tree + */ + void exitElse_clause(PythonParser.Else_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#finally_clause}. + * @param ctx the parse tree + */ + void enterFinally_clause(PythonParser.Finally_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#finally_clause}. + * @param ctx the parse tree + */ + void exitFinally_clause(PythonParser.Finally_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#with_item}. + * @param ctx the parse tree + */ + void enterWith_item(PythonParser.With_itemContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#with_item}. + * @param ctx the parse tree + */ + void exitWith_item(PythonParser.With_itemContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#except_clause}. + * @param ctx the parse tree + */ + void enterExcept_clause(PythonParser.Except_clauseContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#except_clause}. + * @param ctx the parse tree + */ + void exitExcept_clause(PythonParser.Except_clauseContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#classdef}. + * @param ctx the parse tree + */ + void enterClassdef(PythonParser.ClassdefContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#classdef}. + * @param ctx the parse tree + */ + void exitClassdef(PythonParser.ClassdefContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#funcdef}. + * @param ctx the parse tree + */ + void enterFuncdef(PythonParser.FuncdefContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#funcdef}. + * @param ctx the parse tree + */ + void exitFuncdef(PythonParser.FuncdefContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#typedargslist}. + * @param ctx the parse tree + */ + void enterTypedargslist(PythonParser.TypedargslistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#typedargslist}. + * @param ctx the parse tree + */ + void exitTypedargslist(PythonParser.TypedargslistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#args}. + * @param ctx the parse tree + */ + void enterArgs(PythonParser.ArgsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#args}. + * @param ctx the parse tree + */ + void exitArgs(PythonParser.ArgsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#kwargs}. + * @param ctx the parse tree + */ + void enterKwargs(PythonParser.KwargsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#kwargs}. + * @param ctx the parse tree + */ + void exitKwargs(PythonParser.KwargsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#def_parameters}. + * @param ctx the parse tree + */ + void enterDef_parameters(PythonParser.Def_parametersContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#def_parameters}. + * @param ctx the parse tree + */ + void exitDef_parameters(PythonParser.Def_parametersContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#def_parameter}. + * @param ctx the parse tree + */ + void enterDef_parameter(PythonParser.Def_parameterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#def_parameter}. + * @param ctx the parse tree + */ + void exitDef_parameter(PythonParser.Def_parameterContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#named_parameter}. + * @param ctx the parse tree + */ + void enterNamed_parameter(PythonParser.Named_parameterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#named_parameter}. + * @param ctx the parse tree + */ + void exitNamed_parameter(PythonParser.Named_parameterContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#simple_stmt}. + * @param ctx the parse tree + */ + void enterSimple_stmt(PythonParser.Simple_stmtContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#simple_stmt}. + * @param ctx the parse tree + */ + void exitSimple_stmt(PythonParser.Simple_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code expr_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterExpr_stmt(PythonParser.Expr_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code expr_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitExpr_stmt(PythonParser.Expr_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code print_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterPrint_stmt(PythonParser.Print_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code print_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitPrint_stmt(PythonParser.Print_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code del_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterDel_stmt(PythonParser.Del_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code del_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitDel_stmt(PythonParser.Del_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code pass_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterPass_stmt(PythonParser.Pass_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code pass_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitPass_stmt(PythonParser.Pass_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code break_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterBreak_stmt(PythonParser.Break_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code break_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitBreak_stmt(PythonParser.Break_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code continue_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterContinue_stmt(PythonParser.Continue_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code continue_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitContinue_stmt(PythonParser.Continue_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code return_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterReturn_stmt(PythonParser.Return_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code return_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitReturn_stmt(PythonParser.Return_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code raise_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterRaise_stmt(PythonParser.Raise_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code raise_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitRaise_stmt(PythonParser.Raise_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code yield_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterYield_stmt(PythonParser.Yield_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code yield_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitYield_stmt(PythonParser.Yield_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code import_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterImport_stmt(PythonParser.Import_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code import_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitImport_stmt(PythonParser.Import_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code from_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterFrom_stmt(PythonParser.From_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code from_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitFrom_stmt(PythonParser.From_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code global_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterGlobal_stmt(PythonParser.Global_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code global_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitGlobal_stmt(PythonParser.Global_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code exec_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterExec_stmt(PythonParser.Exec_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code exec_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitExec_stmt(PythonParser.Exec_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code assert_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterAssert_stmt(PythonParser.Assert_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code assert_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitAssert_stmt(PythonParser.Assert_stmtContext ctx); + /** + * Enter a parse tree produced by the {@code nonlocal_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void enterNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx); + /** + * Exit a parse tree produced by the {@code nonlocal_stmt} + * labeled alternative in {@link PythonParser#small_stmt}. + * @param ctx the parse tree + */ + void exitNonlocal_stmt(PythonParser.Nonlocal_stmtContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#testlist_star_expr}. + * @param ctx the parse tree + */ + void enterTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#testlist_star_expr}. + * @param ctx the parse tree + */ + void exitTestlist_star_expr(PythonParser.Testlist_star_exprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#star_expr}. + * @param ctx the parse tree + */ + void enterStar_expr(PythonParser.Star_exprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#star_expr}. + * @param ctx the parse tree + */ + void exitStar_expr(PythonParser.Star_exprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#assign_part}. + * @param ctx the parse tree + */ + void enterAssign_part(PythonParser.Assign_partContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#assign_part}. + * @param ctx the parse tree + */ + void exitAssign_part(PythonParser.Assign_partContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#exprlist}. + * @param ctx the parse tree + */ + void enterExprlist(PythonParser.ExprlistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#exprlist}. + * @param ctx the parse tree + */ + void exitExprlist(PythonParser.ExprlistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#import_as_names}. + * @param ctx the parse tree + */ + void enterImport_as_names(PythonParser.Import_as_namesContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#import_as_names}. + * @param ctx the parse tree + */ + void exitImport_as_names(PythonParser.Import_as_namesContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#import_as_name}. + * @param ctx the parse tree + */ + void enterImport_as_name(PythonParser.Import_as_nameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#import_as_name}. + * @param ctx the parse tree + */ + void exitImport_as_name(PythonParser.Import_as_nameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dotted_as_names}. + * @param ctx the parse tree + */ + void enterDotted_as_names(PythonParser.Dotted_as_namesContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dotted_as_names}. + * @param ctx the parse tree + */ + void exitDotted_as_names(PythonParser.Dotted_as_namesContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dotted_as_name}. + * @param ctx the parse tree + */ + void enterDotted_as_name(PythonParser.Dotted_as_nameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dotted_as_name}. + * @param ctx the parse tree + */ + void exitDotted_as_name(PythonParser.Dotted_as_nameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#test}. + * @param ctx the parse tree + */ + void enterTest(PythonParser.TestContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#test}. + * @param ctx the parse tree + */ + void exitTest(PythonParser.TestContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#varargslist}. + * @param ctx the parse tree + */ + void enterVarargslist(PythonParser.VarargslistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#varargslist}. + * @param ctx the parse tree + */ + void exitVarargslist(PythonParser.VarargslistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#vardef_parameters}. + * @param ctx the parse tree + */ + void enterVardef_parameters(PythonParser.Vardef_parametersContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#vardef_parameters}. + * @param ctx the parse tree + */ + void exitVardef_parameters(PythonParser.Vardef_parametersContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#vardef_parameter}. + * @param ctx the parse tree + */ + void enterVardef_parameter(PythonParser.Vardef_parameterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#vardef_parameter}. + * @param ctx the parse tree + */ + void exitVardef_parameter(PythonParser.Vardef_parameterContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#varargs}. + * @param ctx the parse tree + */ + void enterVarargs(PythonParser.VarargsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#varargs}. + * @param ctx the parse tree + */ + void exitVarargs(PythonParser.VarargsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#varkwargs}. + * @param ctx the parse tree + */ + void enterVarkwargs(PythonParser.VarkwargsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#varkwargs}. + * @param ctx the parse tree + */ + void exitVarkwargs(PythonParser.VarkwargsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#logical_test}. + * @param ctx the parse tree + */ + void enterLogical_test(PythonParser.Logical_testContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#logical_test}. + * @param ctx the parse tree + */ + void exitLogical_test(PythonParser.Logical_testContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#comparison}. + * @param ctx the parse tree + */ + void enterComparison(PythonParser.ComparisonContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#comparison}. + * @param ctx the parse tree + */ + void exitComparison(PythonParser.ComparisonContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#expr}. + * @param ctx the parse tree + */ + void enterExpr(PythonParser.ExprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#expr}. + * @param ctx the parse tree + */ + void exitExpr(PythonParser.ExprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#atom}. + * @param ctx the parse tree + */ + void enterAtom(PythonParser.AtomContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#atom}. + * @param ctx the parse tree + */ + void exitAtom(PythonParser.AtomContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dictorsetmaker}. + * @param ctx the parse tree + */ + void enterDictorsetmaker(PythonParser.DictorsetmakerContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dictorsetmaker}. + * @param ctx the parse tree + */ + void exitDictorsetmaker(PythonParser.DictorsetmakerContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#testlist_comp}. + * @param ctx the parse tree + */ + void enterTestlist_comp(PythonParser.Testlist_compContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#testlist_comp}. + * @param ctx the parse tree + */ + void exitTestlist_comp(PythonParser.Testlist_compContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#testlist}. + * @param ctx the parse tree + */ + void enterTestlist(PythonParser.TestlistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#testlist}. + * @param ctx the parse tree + */ + void exitTestlist(PythonParser.TestlistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#dotted_name}. + * @param ctx the parse tree + */ + void enterDotted_name(PythonParser.Dotted_nameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#dotted_name}. + * @param ctx the parse tree + */ + void exitDotted_name(PythonParser.Dotted_nameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#name}. + * @param ctx the parse tree + */ + void enterName(PythonParser.NameContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#name}. + * @param ctx the parse tree + */ + void exitName(PythonParser.NameContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#number}. + * @param ctx the parse tree + */ + void enterNumber(PythonParser.NumberContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#number}. + * @param ctx the parse tree + */ + void exitNumber(PythonParser.NumberContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#integer}. + * @param ctx the parse tree + */ + void enterInteger(PythonParser.IntegerContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#integer}. + * @param ctx the parse tree + */ + void exitInteger(PythonParser.IntegerContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#yield_expr}. + * @param ctx the parse tree + */ + void enterYield_expr(PythonParser.Yield_exprContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#yield_expr}. + * @param ctx the parse tree + */ + void exitYield_expr(PythonParser.Yield_exprContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#yield_arg}. + * @param ctx the parse tree + */ + void enterYield_arg(PythonParser.Yield_argContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#yield_arg}. + * @param ctx the parse tree + */ + void exitYield_arg(PythonParser.Yield_argContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#trailer}. + * @param ctx the parse tree + */ + void enterTrailer(PythonParser.TrailerContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#trailer}. + * @param ctx the parse tree + */ + void exitTrailer(PythonParser.TrailerContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(PythonParser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(PythonParser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#arglist}. + * @param ctx the parse tree + */ + void enterArglist(PythonParser.ArglistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#arglist}. + * @param ctx the parse tree + */ + void exitArglist(PythonParser.ArglistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#argument}. + * @param ctx the parse tree + */ + void enterArgument(PythonParser.ArgumentContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#argument}. + * @param ctx the parse tree + */ + void exitArgument(PythonParser.ArgumentContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#subscriptlist}. + * @param ctx the parse tree + */ + void enterSubscriptlist(PythonParser.SubscriptlistContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#subscriptlist}. + * @param ctx the parse tree + */ + void exitSubscriptlist(PythonParser.SubscriptlistContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#subscript}. + * @param ctx the parse tree + */ + void enterSubscript(PythonParser.SubscriptContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#subscript}. + * @param ctx the parse tree + */ + void exitSubscript(PythonParser.SubscriptContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#sliceop}. + * @param ctx the parse tree + */ + void enterSliceop(PythonParser.SliceopContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#sliceop}. + * @param ctx the parse tree + */ + void exitSliceop(PythonParser.SliceopContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#comp_for}. + * @param ctx the parse tree + */ + void enterComp_for(PythonParser.Comp_forContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#comp_for}. + * @param ctx the parse tree + */ + void exitComp_for(PythonParser.Comp_forContext ctx); + /** + * Enter a parse tree produced by {@link PythonParser#comp_iter}. + * @param ctx the parse tree + */ + void enterComp_iter(PythonParser.Comp_iterContext ctx); + /** + * Exit a parse tree produced by {@link PythonParser#comp_iter}. + * @param ctx the parse tree + */ + void exitComp_iter(PythonParser.Comp_iterContext ctx); +} diff --git a/docs/compare/src/main/java/pyantlr/PythonVersion.java b/docs/compare/src/main/java/pyantlr/PythonVersion.java new file mode 100644 index 0000000000000000000000000000000000000000..b25dc2bc1750c81e9003de888ddb75ef6bfe227a --- /dev/null +++ b/docs/compare/src/main/java/pyantlr/PythonVersion.java @@ -0,0 +1,17 @@ +package pyantlr; + +public enum PythonVersion { + Autodetect(0), + Python2(2), + Python3(3); + + private final int value; + + PythonVersion(int value) { + this.value = value; + } + + public int getValue() { + return value; + } +} diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptBaseLexer.java b/docs/compare/src/main/java/tsantlr/TypeScriptBaseLexer.java new file mode 100644 index 0000000000000000000000000000000000000000..f1e3bfc1a39a6fd526f338e348964363404fc48e --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptBaseLexer.java @@ -0,0 +1,131 @@ +package tsantlr; + +import org.antlr.v4.runtime.*; + +import java.util.Stack; + +/** + * All lexer methods that used in grammar (IsStrictMode) + * should start with Upper Case Char similar to Lexer rules. + */ +public abstract class TypeScriptBaseLexer extends Lexer +{ + /** + * Stores values of nested modes. By default mode is strict or + * defined externally (useStrictDefault) + */ + private Stack scopeStrictModes = new Stack(); + + private Token lastToken = null; + /** + * Default value of strict mode + * Can be defined externally by setUseStrictDefault + */ + private boolean useStrictDefault = false; + /** + * Current value of strict mode + * Can be defined during parsing, see StringFunctions.js and StringGlobal.js samples + */ + private boolean useStrictCurrent = false; + + public TypeScriptBaseLexer(CharStream input) { + super(input); + } + + public boolean getStrictDefault() { + return useStrictDefault; + } + + public void setUseStrictDefault(boolean value) { + useStrictDefault = value; + useStrictCurrent = value; + } + + public boolean IsStrictMode() { + return useStrictCurrent; + } + + /** + * Return the next token from the character stream and records this last + * token in case it resides on the default channel. This recorded token + * is used to determine when the lexer could possibly match a regex + * literal. Also changes scopeStrictModes stack if tokenize special + * string 'use strict'; + * + * @return the next token from the character stream. + */ + @Override + public Token nextToken() { + Token next = super.nextToken(); + + if (next.getChannel() == Token.DEFAULT_CHANNEL) { + // Keep track of the last token on the default channel. + this.lastToken = next; + } + + return next; + } + + protected void ProcessOpenBrace() + { + if (scopeStrictModes.size() > 0 && scopeStrictModes.peek()) { + useStrictCurrent = true; + } else { + useStrictCurrent = useStrictDefault; + } + scopeStrictModes.push(useStrictCurrent); + } + + protected void ProcessCloseBrace() + { + if (scopeStrictModes.size() > 0) useStrictCurrent = scopeStrictModes.pop(); + else useStrictCurrent = useStrictDefault; + } + + protected void ProcessStringLiteral() + { + if (lastToken == null || lastToken.getType() == TypeScriptLexer.OpenBrace) + { + String text = getText(); + if (text.equals("\"use strict\"") || text.equals("'use strict'")) + { + if (scopeStrictModes.size() > 0) + scopeStrictModes.pop(); + useStrictCurrent = true; + scopeStrictModes.push(useStrictCurrent); + } + } + } + + /** + * Returns {@code true} if the lexer can match a regex literal. + */ + protected boolean IsRegexPossible() { + + if (this.lastToken == null) { + // No token has been produced yet: at the start of the input, + // no division is possible, so a regex literal _is_ possible. + return true; + } + + switch (this.lastToken.getType()) { + case TypeScriptLexer.Identifier: + case TypeScriptLexer.NullLiteral: + case TypeScriptLexer.BooleanLiteral: + case TypeScriptLexer.This: + case TypeScriptLexer.CloseBracket: + case TypeScriptLexer.CloseParen: + case TypeScriptLexer.OctalIntegerLiteral: + case TypeScriptLexer.DecimalLiteral: + case TypeScriptLexer.HexIntegerLiteral: + case TypeScriptLexer.StringLiteral: + case TypeScriptLexer.PlusPlus: + case TypeScriptLexer.MinusMinus: + // After any of the tokens above, no regex literal can follow. + return false; + default: + // In all other cases, a regex literal _is_ possible. + return true; + } + } +} diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptBaseParser.java b/docs/compare/src/main/java/tsantlr/TypeScriptBaseParser.java new file mode 100644 index 0000000000000000000000000000000000000000..2bdf86a4e558333819e9bb440d9681a69eb73811 --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptBaseParser.java @@ -0,0 +1,121 @@ +package tsantlr; + +import org.antlr.v4.runtime.*; + +/** + * All parser methods that used in grammar (p, prev, notLineTerminator, etc.) + * should start with lower case char similar to parser rules. + */ +public abstract class TypeScriptBaseParser extends Parser +{ + public TypeScriptBaseParser(TokenStream input) { + super(input); + } + + /** + * Short form for prev(String str) + */ + protected boolean p(String str) { + return prev(str); + } + + /** + * Whether the previous token value equals to @param str + */ + protected boolean prev(String str) { + return _input.LT(-1).getText().equals(str); + } + + /** + * Short form for next(String str) + */ + protected boolean n(String str) { + return next(str); + } + + /** + * Whether the next token value equals to @param str + */ + protected boolean next(String str) { + return _input.LT(1).getText().equals(str); + } + + protected boolean notLineTerminator() { + return !here(TypeScriptParser.LineTerminator); + } + + protected boolean notOpenBraceAndNotFunction() { + int nextTokenType = _input.LT(1).getType(); + return nextTokenType != TypeScriptParser.OpenBrace && nextTokenType != TypeScriptParser.Function; + } + + protected boolean closeBrace() { + return _input.LT(1).getType() == TypeScriptParser.CloseBrace; + } + + /** + * Returns {@code true} iff on the current index of the parser's + * token stream a token of the given {@code type} exists on the + * {@code HIDDEN} channel. + * + * @param type + * the type of the token on the {@code HIDDEN} channel + * to check. + * + * @return {@code true} iff on the current index of the parser's + * token stream a token of the given {@code type} exists on the + * {@code HIDDEN} channel. + */ + private boolean here(final int type) { + + // Get the token ahead of the current index. + int possibleIndexEosToken = this.getCurrentToken().getTokenIndex() - 1; + Token ahead = _input.get(possibleIndexEosToken); + + // Check if the token resides on the HIDDEN channel and if it's of the + // provided type. + return (ahead.getChannel() == Lexer.HIDDEN) && (ahead.getType() == type); + } + + /** + * Returns {@code true} iff on the current index of the parser's + * token stream a token exists on the {@code HIDDEN} channel which + * either is a line terminator, or is a multi line comment that + * contains a line terminator. + * + * @return {@code true} iff on the current index of the parser's + * token stream a token exists on the {@code HIDDEN} channel which + * either is a line terminator, or is a multi line comment that + * contains a line terminator. + */ + protected boolean lineTerminatorAhead() { + + // Get the token ahead of the current index. + int possibleIndexEosToken = this.getCurrentToken().getTokenIndex() - 1; + Token ahead = _input.get(possibleIndexEosToken); + + if (ahead.getChannel() != Lexer.HIDDEN) { + // We're only interested in tokens on the HIDDEN channel. + return false; + } + + if (ahead.getType() == TypeScriptParser.LineTerminator) { + // There is definitely a line terminator ahead. + return true; + } + + if (ahead.getType() == TypeScriptParser.WhiteSpaces) { + // Get the token ahead of the current whitespaces. + possibleIndexEosToken = this.getCurrentToken().getTokenIndex() - 2; + ahead = _input.get(possibleIndexEosToken); + } + + // Get the token's text and type. + String text = ahead.getText(); + int type = ahead.getType(); + + // Check if the token is, or contains a line terminator. + return (type == TypeScriptParser.MultiLineComment && (text.contains("\r") || text.contains("\n"))) || + (type == TypeScriptParser.LineTerminator); + } +} diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptLexer.interp b/docs/compare/src/main/java/tsantlr/TypeScriptLexer.interp new file mode 100644 index 0000000000000000000000000000000000000000..c7eb03ddbcec656401a042fa7bb60dfed1c95b3c --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptLexer.interp @@ -0,0 +1,458 @@ +token literal names: +null +null +null +null +null +'[' +']' +'(' +')' +'{' +'}' +';' +',' +'=' +'?' +':' +'...' +'.' +'++' +'--' +'+' +'-' +'~' +'!' +'*' +'_' +'$' +'/' +'%' +'**' +'??' +'#' +'>>' +'<<' +'>>>' +'<' +'>' +'<=' +'>=' +'==' +'!=' +'===' +'!==' +'&' +'^' +'|' +'&&' +'||' +'*=' +'/=' +'%=' +'+=' +'-=' +'<<=' +'>>=' +'>>>=' +'&=' +'^=' +'|=' +'=>' +'**=' +'null' +null +null +null +null +null +null +'break' +'do' +'instanceof' +'typeof' +'case' +'else' +'new' +'var' +'catch' +'finally' +'return' +'void' +'continue' +'for' +'switch' +'while' +'debugger' +'function' +'this' +'with' +'default' +'if' +'throw' +'delete' +'in' +'try' +'as' +'from' +'readonly' +'async' +'class' +'enum' +'extends' +'super' +'const' +'export' +'import' +'await' +'implements' +'let' +'private' +'public' +'interface' +'package' +'protected' +'static' +'yield' +'any' +'number' +'boolean' +'string' +'symbol' +'type' +'get ' +'set ' +'constructor' +'namespace' +'require' +'module' +'declare' +'abstract' +'is' +'@' +null +null +null +null +null +null +null +null + +token symbolic names: +null +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Lodash +Dollar +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +ARROW +PowerAssign +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +ReadOnly +Async +Class +Enum +Extends +Super +Const +Export +Import +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +ANY +NUMBER +BOOLEAN +STRING +SYMBOL +Type +Get +Set +Constructor +Namespace +Require +Module +Declare +Abstract +Is +At +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter + +rule names: +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Lodash +Dollar +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +ARROW +PowerAssign +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +ReadOnly +Async +Class +Enum +Extends +Super +Const +Export +Import +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +ANY +NUMBER +BOOLEAN +STRING +SYMBOL +Type +Get +Set +Constructor +Namespace +Require +Module +Declare +Abstract +Is +At +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter +DoubleStringCharacter +SingleStringCharacter +EscapeSequence +CharacterEscapeSequence +HexEscapeSequence +UnicodeEscapeSequence +ExtendedUnicodeEscapeSequence +SingleEscapeCharacter +NonEscapeCharacter +EscapeCharacter +LineContinuation +HexDigit +DecimalIntegerLiteral +ExponentPart +IdentifierPart +IdentifierStart +UnicodeLetter +UnicodeCombiningMark +UnicodeDigit +UnicodeConnectorPunctuation +RegularExpressionFirstChar +RegularExpressionChar +RegularExpressionClassChar +RegularExpressionBackslashSequence + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN +null +null +ERROR + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 140, 1230, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 4, 153, 9, 153, 4, 154, 9, 154, 4, 155, 9, 155, 4, 156, 9, 156, 4, 157, 9, 157, 4, 158, 9, 158, 4, 159, 9, 159, 4, 160, 9, 160, 4, 161, 9, 161, 4, 162, 9, 162, 4, 163, 9, 163, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 332, 10, 2, 12, 2, 14, 2, 335, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 341, 10, 3, 12, 3, 14, 3, 344, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 355, 10, 4, 12, 4, 14, 4, 358, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 7, 5, 365, 10, 5, 12, 5, 14, 5, 368, 11, 5, 3, 5, 3, 5, 3, 5, 7, 5, 373, 10, 5, 12, 5, 14, 5, 376, 11, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 544, 10, 63, 3, 64, 3, 64, 3, 64, 7, 64, 549, 10, 64, 12, 64, 14, 64, 552, 11, 64, 3, 64, 5, 64, 555, 10, 64, 3, 64, 3, 64, 6, 64, 559, 10, 64, 13, 64, 14, 64, 560, 3, 64, 5, 64, 564, 10, 64, 3, 64, 3, 64, 5, 64, 568, 10, 64, 5, 64, 570, 10, 64, 3, 65, 3, 65, 3, 65, 6, 65, 575, 10, 65, 13, 65, 14, 65, 576, 3, 66, 3, 66, 6, 66, 581, 10, 66, 13, 66, 14, 66, 582, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 6, 67, 590, 10, 67, 13, 67, 14, 67, 591, 3, 68, 3, 68, 3, 68, 6, 68, 597, 10, 68, 13, 68, 14, 68, 598, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 116, 3, 116, 3, 116, 3, 116, 3, 117, 3, 117, 3, 117, 3, 117, 3, 117, 3, 117, 3, 117, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 132, 3, 132, 7, 132, 1011, 10, 132, 12, 132, 14, 132, 1014, 11, 132, 3, 133, 3, 133, 7, 133, 1018, 10, 133, 12, 133, 14, 133, 1021, 11, 133, 3, 133, 3, 133, 3, 133, 7, 133, 1026, 10, 133, 12, 133, 14, 133, 1029, 11, 133, 3, 133, 5, 133, 1032, 10, 133, 3, 133, 3, 133, 3, 134, 3, 134, 3, 134, 3, 134, 7, 134, 1040, 10, 134, 12, 134, 14, 134, 1043, 11, 134, 3, 134, 3, 134, 3, 135, 6, 135, 1048, 10, 135, 13, 135, 14, 135, 1049, 3, 135, 3, 135, 3, 136, 3, 136, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 7, 137, 1064, 10, 137, 12, 137, 14, 137, 1067, 11, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 7, 138, 1086, 10, 138, 12, 138, 14, 138, 1089, 11, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, 3, 140, 5, 140, 1105, 10, 140, 3, 141, 3, 141, 3, 141, 3, 141, 5, 141, 1111, 10, 141, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, 5, 142, 1118, 10, 142, 3, 143, 3, 143, 5, 143, 1122, 10, 143, 3, 144, 3, 144, 3, 144, 3, 144, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 146, 3, 146, 3, 146, 6, 146, 1137, 10, 146, 13, 146, 14, 146, 1138, 3, 146, 3, 146, 3, 147, 3, 147, 3, 148, 3, 148, 3, 149, 3, 149, 5, 149, 1149, 10, 149, 3, 150, 3, 150, 3, 150, 3, 151, 3, 151, 3, 152, 3, 152, 3, 152, 7, 152, 1159, 10, 152, 12, 152, 14, 152, 1162, 11, 152, 5, 152, 1164, 10, 152, 3, 153, 3, 153, 5, 153, 1168, 10, 153, 3, 153, 6, 153, 1171, 10, 153, 13, 153, 14, 153, 1172, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 5, 154, 1180, 10, 154, 3, 155, 3, 155, 3, 155, 3, 155, 5, 155, 1186, 10, 155, 3, 156, 5, 156, 1189, 10, 156, 3, 157, 5, 157, 1192, 10, 157, 3, 158, 5, 158, 1195, 10, 158, 3, 159, 5, 159, 1198, 10, 159, 3, 160, 3, 160, 3, 160, 3, 160, 7, 160, 1204, 10, 160, 12, 160, 14, 160, 1207, 11, 160, 3, 160, 5, 160, 1210, 10, 160, 3, 161, 3, 161, 3, 161, 3, 161, 7, 161, 1216, 10, 161, 12, 161, 14, 161, 1219, 11, 161, 3, 161, 5, 161, 1222, 10, 161, 3, 162, 3, 162, 5, 162, 1226, 10, 162, 3, 163, 3, 163, 3, 163, 5, 342, 1065, 1087, 2, 164, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 141, 72, 143, 73, 145, 74, 147, 75, 149, 76, 151, 77, 153, 78, 155, 79, 157, 80, 159, 81, 161, 82, 163, 83, 165, 84, 167, 85, 169, 86, 171, 87, 173, 88, 175, 89, 177, 90, 179, 91, 181, 92, 183, 93, 185, 94, 187, 95, 189, 96, 191, 97, 193, 98, 195, 99, 197, 100, 199, 101, 201, 102, 203, 103, 205, 104, 207, 105, 209, 106, 211, 107, 213, 108, 215, 109, 217, 110, 219, 111, 221, 112, 223, 113, 225, 114, 227, 115, 229, 116, 231, 117, 233, 118, 235, 119, 237, 120, 239, 121, 241, 122, 243, 123, 245, 124, 247, 125, 249, 126, 251, 127, 253, 128, 255, 129, 257, 130, 259, 131, 261, 132, 263, 133, 265, 134, 267, 135, 269, 136, 271, 137, 273, 138, 275, 139, 277, 140, 279, 2, 281, 2, 283, 2, 285, 2, 287, 2, 289, 2, 291, 2, 293, 2, 295, 2, 297, 2, 299, 2, 301, 2, 303, 2, 305, 2, 307, 2, 309, 2, 311, 2, 313, 2, 315, 2, 317, 2, 319, 2, 321, 2, 323, 2, 325, 2, 3, 2, 28, 5, 2, 12, 12, 15, 15, 8234, 8235, 3, 2, 50, 59, 4, 2, 90, 90, 122, 122, 3, 2, 50, 57, 4, 2, 81, 81, 113, 113, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 3, 2, 98, 98, 6, 2, 11, 11, 13, 14, 34, 34, 162, 162, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 11, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 14, 2, 12, 12, 15, 15, 36, 36, 41, 41, 50, 59, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 120, 122, 122, 5, 2, 50, 59, 119, 119, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 51, 59, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 38, 38, 97, 97, 257, 2, 67, 92, 99, 124, 172, 172, 183, 183, 188, 188, 194, 216, 218, 248, 250, 545, 548, 565, 594, 687, 690, 698, 701, 707, 722, 723, 738, 742, 752, 752, 892, 892, 904, 904, 906, 908, 910, 910, 912, 931, 933, 976, 978, 985, 988, 1013, 1026, 1155, 1166, 1222, 1225, 1226, 1229, 1230, 1234, 1271, 1274, 1275, 1331, 1368, 1371, 1371, 1379, 1417, 1490, 1516, 1522, 1524, 1571, 1596, 1602, 1612, 1651, 1749, 1751, 1751, 1767, 1768, 1788, 1790, 1810, 1810, 1812, 1838, 1922, 1959, 2311, 2363, 2367, 2367, 2386, 2386, 2394, 2403, 2439, 2446, 2449, 2450, 2453, 2474, 2476, 2482, 2484, 2484, 2488, 2491, 2526, 2527, 2529, 2531, 2546, 2547, 2567, 2572, 2577, 2578, 2581, 2602, 2604, 2610, 2612, 2613, 2615, 2616, 2618, 2619, 2651, 2654, 2656, 2656, 2676, 2678, 2695, 2701, 2703, 2703, 2705, 2707, 2709, 2730, 2732, 2738, 2740, 2741, 2743, 2747, 2751, 2751, 2770, 2770, 2786, 2786, 2823, 2830, 2833, 2834, 2837, 2858, 2860, 2866, 2868, 2869, 2872, 2875, 2879, 2879, 2910, 2911, 2913, 2915, 2951, 2956, 2960, 2962, 2964, 2967, 2971, 2972, 2974, 2974, 2976, 2977, 2981, 2982, 2986, 2988, 2992, 2999, 3001, 3003, 3079, 3086, 3088, 3090, 3092, 3114, 3116, 3125, 3127, 3131, 3170, 3171, 3207, 3214, 3216, 3218, 3220, 3242, 3244, 3253, 3255, 3259, 3296, 3296, 3298, 3299, 3335, 3342, 3344, 3346, 3348, 3370, 3372, 3387, 3426, 3427, 3463, 3480, 3484, 3507, 3509, 3517, 3519, 3519, 3522, 3528, 3587, 3634, 3636, 3637, 3650, 3656, 3715, 3716, 3718, 3718, 3721, 3722, 3724, 3724, 3727, 3727, 3734, 3737, 3739, 3745, 3747, 3749, 3751, 3751, 3753, 3753, 3756, 3757, 3759, 3762, 3764, 3765, 3775, 3782, 3784, 3784, 3806, 3807, 3842, 3842, 3906, 3948, 3978, 3981, 4098, 4131, 4133, 4137, 4139, 4140, 4178, 4183, 4258, 4295, 4306, 4344, 4354, 4443, 4449, 4516, 4522, 4603, 4610, 4616, 4618, 4680, 4682, 4682, 4684, 4687, 4690, 4696, 4698, 4698, 4700, 4703, 4706, 4744, 4746, 4746, 4748, 4751, 4754, 4784, 4786, 4786, 4788, 4791, 4794, 4800, 4802, 4802, 4804, 4807, 4810, 4816, 4818, 4824, 4826, 4848, 4850, 4880, 4882, 4882, 4884, 4887, 4890, 4896, 4898, 4936, 4938, 4956, 5026, 5110, 5123, 5752, 5763, 5788, 5794, 5868, 6018, 6069, 6178, 6265, 6274, 6314, 7682, 7837, 7842, 7931, 7938, 7959, 7962, 7967, 7970, 8007, 8010, 8015, 8018, 8025, 8027, 8027, 8029, 8029, 8031, 8031, 8033, 8063, 8066, 8118, 8120, 8126, 8128, 8128, 8132, 8134, 8136, 8142, 8146, 8149, 8152, 8157, 8162, 8174, 8180, 8182, 8184, 8190, 8321, 8321, 8452, 8452, 8457, 8457, 8460, 8469, 8471, 8471, 8475, 8479, 8486, 8486, 8488, 8488, 8490, 8490, 8492, 8495, 8497, 8499, 8501, 8507, 8546, 8581, 12295, 12297, 12323, 12331, 12339, 12343, 12346, 12348, 12355, 12438, 12447, 12448, 12451, 12540, 12542, 12544, 12551, 12590, 12595, 12688, 12706, 12729, 13314, 19905, 19970, 42126, 44034, 44034, 55205, 55205, 63746, 64047, 64258, 64264, 64277, 64281, 64287, 64287, 64289, 64298, 64300, 64312, 64314, 64318, 64320, 64320, 64322, 64323, 64325, 64326, 64328, 64435, 64469, 64831, 64850, 64913, 64916, 64969, 65010, 65021, 65138, 65140, 65142, 65142, 65144, 65278, 65315, 65340, 65347, 65372, 65384, 65472, 65476, 65481, 65484, 65489, 65492, 65497, 65500, 65502, 102, 2, 770, 848, 866, 868, 1157, 1160, 1427, 1443, 1445, 1467, 1469, 1471, 1473, 1473, 1475, 1476, 1478, 1478, 1613, 1623, 1650, 1650, 1752, 1758, 1761, 1766, 1769, 1770, 1772, 1775, 1811, 1811, 1842, 1868, 1960, 1970, 2307, 2309, 2366, 2366, 2368, 2383, 2387, 2390, 2404, 2405, 2435, 2437, 2494, 2502, 2505, 2506, 2509, 2511, 2521, 2521, 2532, 2533, 2564, 2564, 2622, 2622, 2624, 2628, 2633, 2634, 2637, 2639, 2674, 2675, 2691, 2693, 2750, 2750, 2752, 2759, 2761, 2763, 2765, 2767, 2819, 2821, 2878, 2878, 2880, 2885, 2889, 2890, 2893, 2895, 2904, 2905, 2948, 2949, 3008, 3012, 3016, 3018, 3020, 3023, 3033, 3033, 3075, 3077, 3136, 3142, 3144, 3146, 3148, 3151, 3159, 3160, 3204, 3205, 3264, 3270, 3272, 3274, 3276, 3279, 3287, 3288, 3332, 3333, 3392, 3397, 3400, 3402, 3404, 3407, 3417, 3417, 3460, 3461, 3532, 3532, 3537, 3542, 3544, 3544, 3546, 3553, 3572, 3573, 3635, 3635, 3638, 3644, 3657, 3664, 3763, 3763, 3766, 3771, 3773, 3774, 3786, 3791, 3866, 3867, 3895, 3895, 3897, 3897, 3899, 3899, 3904, 3905, 3955, 3974, 3976, 3977, 3986, 3993, 3995, 4030, 4040, 4040, 4142, 4148, 4152, 4155, 4184, 4187, 6070, 6101, 6315, 6315, 8402, 8414, 8419, 8419, 12332, 12337, 12443, 12444, 64288, 64288, 65058, 65061, 22, 2, 50, 59, 1634, 1643, 1778, 1787, 2408, 2417, 2536, 2545, 2664, 2673, 2792, 2801, 2920, 2929, 3049, 3057, 3176, 3185, 3304, 3313, 3432, 3441, 3666, 3675, 3794, 3803, 3874, 3883, 4162, 4171, 4971, 4979, 6114, 6123, 6162, 6171, 65298, 65307, 9, 2, 97, 97, 8257, 8258, 12541, 12541, 65077, 65078, 65103, 65105, 65345, 65345, 65383, 65383, 8, 2, 12, 12, 15, 15, 44, 44, 49, 49, 93, 94, 8234, 8235, 7, 2, 12, 12, 15, 15, 49, 49, 93, 94, 8234, 8235, 6, 2, 12, 12, 15, 15, 94, 95, 8234, 8235, 2, 1259, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 2, 197, 3, 2, 2, 2, 2, 199, 3, 2, 2, 2, 2, 201, 3, 2, 2, 2, 2, 203, 3, 2, 2, 2, 2, 205, 3, 2, 2, 2, 2, 207, 3, 2, 2, 2, 2, 209, 3, 2, 2, 2, 2, 211, 3, 2, 2, 2, 2, 213, 3, 2, 2, 2, 2, 215, 3, 2, 2, 2, 2, 217, 3, 2, 2, 2, 2, 219, 3, 2, 2, 2, 2, 221, 3, 2, 2, 2, 2, 223, 3, 2, 2, 2, 2, 225, 3, 2, 2, 2, 2, 227, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 231, 3, 2, 2, 2, 2, 233, 3, 2, 2, 2, 2, 235, 3, 2, 2, 2, 2, 237, 3, 2, 2, 2, 2, 239, 3, 2, 2, 2, 2, 241, 3, 2, 2, 2, 2, 243, 3, 2, 2, 2, 2, 245, 3, 2, 2, 2, 2, 247, 3, 2, 2, 2, 2, 249, 3, 2, 2, 2, 2, 251, 3, 2, 2, 2, 2, 253, 3, 2, 2, 2, 2, 255, 3, 2, 2, 2, 2, 257, 3, 2, 2, 2, 2, 259, 3, 2, 2, 2, 2, 261, 3, 2, 2, 2, 2, 263, 3, 2, 2, 2, 2, 265, 3, 2, 2, 2, 2, 267, 3, 2, 2, 2, 2, 269, 3, 2, 2, 2, 2, 271, 3, 2, 2, 2, 2, 273, 3, 2, 2, 2, 2, 275, 3, 2, 2, 2, 2, 277, 3, 2, 2, 2, 3, 327, 3, 2, 2, 2, 5, 336, 3, 2, 2, 2, 7, 350, 3, 2, 2, 2, 9, 361, 3, 2, 2, 2, 11, 377, 3, 2, 2, 2, 13, 379, 3, 2, 2, 2, 15, 381, 3, 2, 2, 2, 17, 383, 3, 2, 2, 2, 19, 385, 3, 2, 2, 2, 21, 388, 3, 2, 2, 2, 23, 391, 3, 2, 2, 2, 25, 393, 3, 2, 2, 2, 27, 395, 3, 2, 2, 2, 29, 397, 3, 2, 2, 2, 31, 399, 3, 2, 2, 2, 33, 401, 3, 2, 2, 2, 35, 405, 3, 2, 2, 2, 37, 407, 3, 2, 2, 2, 39, 410, 3, 2, 2, 2, 41, 413, 3, 2, 2, 2, 43, 415, 3, 2, 2, 2, 45, 417, 3, 2, 2, 2, 47, 419, 3, 2, 2, 2, 49, 421, 3, 2, 2, 2, 51, 423, 3, 2, 2, 2, 53, 425, 3, 2, 2, 2, 55, 427, 3, 2, 2, 2, 57, 429, 3, 2, 2, 2, 59, 431, 3, 2, 2, 2, 61, 434, 3, 2, 2, 2, 63, 437, 3, 2, 2, 2, 65, 439, 3, 2, 2, 2, 67, 442, 3, 2, 2, 2, 69, 445, 3, 2, 2, 2, 71, 449, 3, 2, 2, 2, 73, 451, 3, 2, 2, 2, 75, 453, 3, 2, 2, 2, 77, 456, 3, 2, 2, 2, 79, 459, 3, 2, 2, 2, 81, 462, 3, 2, 2, 2, 83, 465, 3, 2, 2, 2, 85, 469, 3, 2, 2, 2, 87, 473, 3, 2, 2, 2, 89, 475, 3, 2, 2, 2, 91, 477, 3, 2, 2, 2, 93, 479, 3, 2, 2, 2, 95, 482, 3, 2, 2, 2, 97, 485, 3, 2, 2, 2, 99, 488, 3, 2, 2, 2, 101, 491, 3, 2, 2, 2, 103, 494, 3, 2, 2, 2, 105, 497, 3, 2, 2, 2, 107, 500, 3, 2, 2, 2, 109, 504, 3, 2, 2, 2, 111, 508, 3, 2, 2, 2, 113, 513, 3, 2, 2, 2, 115, 516, 3, 2, 2, 2, 117, 519, 3, 2, 2, 2, 119, 522, 3, 2, 2, 2, 121, 525, 3, 2, 2, 2, 123, 529, 3, 2, 2, 2, 125, 543, 3, 2, 2, 2, 127, 569, 3, 2, 2, 2, 129, 571, 3, 2, 2, 2, 131, 578, 3, 2, 2, 2, 133, 586, 3, 2, 2, 2, 135, 593, 3, 2, 2, 2, 137, 600, 3, 2, 2, 2, 139, 606, 3, 2, 2, 2, 141, 609, 3, 2, 2, 2, 143, 620, 3, 2, 2, 2, 145, 627, 3, 2, 2, 2, 147, 632, 3, 2, 2, 2, 149, 637, 3, 2, 2, 2, 151, 641, 3, 2, 2, 2, 153, 645, 3, 2, 2, 2, 155, 651, 3, 2, 2, 2, 157, 659, 3, 2, 2, 2, 159, 666, 3, 2, 2, 2, 161, 671, 3, 2, 2, 2, 163, 680, 3, 2, 2, 2, 165, 684, 3, 2, 2, 2, 167, 691, 3, 2, 2, 2, 169, 697, 3, 2, 2, 2, 171, 706, 3, 2, 2, 2, 173, 715, 3, 2, 2, 2, 175, 720, 3, 2, 2, 2, 177, 725, 3, 2, 2, 2, 179, 733, 3, 2, 2, 2, 181, 736, 3, 2, 2, 2, 183, 742, 3, 2, 2, 2, 185, 749, 3, 2, 2, 2, 187, 752, 3, 2, 2, 2, 189, 756, 3, 2, 2, 2, 191, 759, 3, 2, 2, 2, 193, 764, 3, 2, 2, 2, 195, 773, 3, 2, 2, 2, 197, 779, 3, 2, 2, 2, 199, 785, 3, 2, 2, 2, 201, 790, 3, 2, 2, 2, 203, 798, 3, 2, 2, 2, 205, 804, 3, 2, 2, 2, 207, 810, 3, 2, 2, 2, 209, 817, 3, 2, 2, 2, 211, 824, 3, 2, 2, 2, 213, 830, 3, 2, 2, 2, 215, 841, 3, 2, 2, 2, 217, 845, 3, 2, 2, 2, 219, 853, 3, 2, 2, 2, 221, 860, 3, 2, 2, 2, 223, 870, 3, 2, 2, 2, 225, 878, 3, 2, 2, 2, 227, 888, 3, 2, 2, 2, 229, 895, 3, 2, 2, 2, 231, 901, 3, 2, 2, 2, 233, 905, 3, 2, 2, 2, 235, 912, 3, 2, 2, 2, 237, 920, 3, 2, 2, 2, 239, 927, 3, 2, 2, 2, 241, 934, 3, 2, 2, 2, 243, 939, 3, 2, 2, 2, 245, 944, 3, 2, 2, 2, 247, 949, 3, 2, 2, 2, 249, 961, 3, 2, 2, 2, 251, 971, 3, 2, 2, 2, 253, 979, 3, 2, 2, 2, 255, 986, 3, 2, 2, 2, 257, 994, 3, 2, 2, 2, 259, 1003, 3, 2, 2, 2, 261, 1006, 3, 2, 2, 2, 263, 1008, 3, 2, 2, 2, 265, 1031, 3, 2, 2, 2, 267, 1035, 3, 2, 2, 2, 269, 1047, 3, 2, 2, 2, 271, 1053, 3, 2, 2, 2, 273, 1057, 3, 2, 2, 2, 275, 1074, 3, 2, 2, 2, 277, 1096, 3, 2, 2, 2, 279, 1104, 3, 2, 2, 2, 281, 1110, 3, 2, 2, 2, 283, 1117, 3, 2, 2, 2, 285, 1121, 3, 2, 2, 2, 287, 1123, 3, 2, 2, 2, 289, 1127, 3, 2, 2, 2, 291, 1133, 3, 2, 2, 2, 293, 1142, 3, 2, 2, 2, 295, 1144, 3, 2, 2, 2, 297, 1148, 3, 2, 2, 2, 299, 1150, 3, 2, 2, 2, 301, 1153, 3, 2, 2, 2, 303, 1163, 3, 2, 2, 2, 305, 1165, 3, 2, 2, 2, 307, 1179, 3, 2, 2, 2, 309, 1185, 3, 2, 2, 2, 311, 1188, 3, 2, 2, 2, 313, 1191, 3, 2, 2, 2, 315, 1194, 3, 2, 2, 2, 317, 1197, 3, 2, 2, 2, 319, 1209, 3, 2, 2, 2, 321, 1221, 3, 2, 2, 2, 323, 1225, 3, 2, 2, 2, 325, 1227, 3, 2, 2, 2, 327, 328, 7, 37, 2, 2, 328, 329, 7, 35, 2, 2, 329, 333, 3, 2, 2, 2, 330, 332, 10, 2, 2, 2, 331, 330, 3, 2, 2, 2, 332, 335, 3, 2, 2, 2, 333, 331, 3, 2, 2, 2, 333, 334, 3, 2, 2, 2, 334, 4, 3, 2, 2, 2, 335, 333, 3, 2, 2, 2, 336, 337, 7, 49, 2, 2, 337, 338, 7, 44, 2, 2, 338, 342, 3, 2, 2, 2, 339, 341, 11, 2, 2, 2, 340, 339, 3, 2, 2, 2, 341, 344, 3, 2, 2, 2, 342, 343, 3, 2, 2, 2, 342, 340, 3, 2, 2, 2, 343, 345, 3, 2, 2, 2, 344, 342, 3, 2, 2, 2, 345, 346, 7, 44, 2, 2, 346, 347, 7, 49, 2, 2, 347, 348, 3, 2, 2, 2, 348, 349, 8, 3, 2, 2, 349, 6, 3, 2, 2, 2, 350, 351, 7, 49, 2, 2, 351, 352, 7, 49, 2, 2, 352, 356, 3, 2, 2, 2, 353, 355, 10, 2, 2, 2, 354, 353, 3, 2, 2, 2, 355, 358, 3, 2, 2, 2, 356, 354, 3, 2, 2, 2, 356, 357, 3, 2, 2, 2, 357, 359, 3, 2, 2, 2, 358, 356, 3, 2, 2, 2, 359, 360, 8, 4, 2, 2, 360, 8, 3, 2, 2, 2, 361, 362, 7, 49, 2, 2, 362, 366, 5, 319, 160, 2, 363, 365, 5, 321, 161, 2, 364, 363, 3, 2, 2, 2, 365, 368, 3, 2, 2, 2, 366, 364, 3, 2, 2, 2, 366, 367, 3, 2, 2, 2, 367, 369, 3, 2, 2, 2, 368, 366, 3, 2, 2, 2, 369, 370, 6, 5, 2, 2, 370, 374, 7, 49, 2, 2, 371, 373, 5, 307, 154, 2, 372, 371, 3, 2, 2, 2, 373, 376, 3, 2, 2, 2, 374, 372, 3, 2, 2, 2, 374, 375, 3, 2, 2, 2, 375, 10, 3, 2, 2, 2, 376, 374, 3, 2, 2, 2, 377, 378, 7, 93, 2, 2, 378, 12, 3, 2, 2, 2, 379, 380, 7, 95, 2, 2, 380, 14, 3, 2, 2, 2, 381, 382, 7, 42, 2, 2, 382, 16, 3, 2, 2, 2, 383, 384, 7, 43, 2, 2, 384, 18, 3, 2, 2, 2, 385, 386, 7, 125, 2, 2, 386, 387, 8, 10, 3, 2, 387, 20, 3, 2, 2, 2, 388, 389, 7, 127, 2, 2, 389, 390, 8, 11, 4, 2, 390, 22, 3, 2, 2, 2, 391, 392, 7, 61, 2, 2, 392, 24, 3, 2, 2, 2, 393, 394, 7, 46, 2, 2, 394, 26, 3, 2, 2, 2, 395, 396, 7, 63, 2, 2, 396, 28, 3, 2, 2, 2, 397, 398, 7, 65, 2, 2, 398, 30, 3, 2, 2, 2, 399, 400, 7, 60, 2, 2, 400, 32, 3, 2, 2, 2, 401, 402, 7, 48, 2, 2, 402, 403, 7, 48, 2, 2, 403, 404, 7, 48, 2, 2, 404, 34, 3, 2, 2, 2, 405, 406, 7, 48, 2, 2, 406, 36, 3, 2, 2, 2, 407, 408, 7, 45, 2, 2, 408, 409, 7, 45, 2, 2, 409, 38, 3, 2, 2, 2, 410, 411, 7, 47, 2, 2, 411, 412, 7, 47, 2, 2, 412, 40, 3, 2, 2, 2, 413, 414, 7, 45, 2, 2, 414, 42, 3, 2, 2, 2, 415, 416, 7, 47, 2, 2, 416, 44, 3, 2, 2, 2, 417, 418, 7, 128, 2, 2, 418, 46, 3, 2, 2, 2, 419, 420, 7, 35, 2, 2, 420, 48, 3, 2, 2, 2, 421, 422, 7, 44, 2, 2, 422, 50, 3, 2, 2, 2, 423, 424, 7, 97, 2, 2, 424, 52, 3, 2, 2, 2, 425, 426, 7, 38, 2, 2, 426, 54, 3, 2, 2, 2, 427, 428, 7, 49, 2, 2, 428, 56, 3, 2, 2, 2, 429, 430, 7, 39, 2, 2, 430, 58, 3, 2, 2, 2, 431, 432, 7, 44, 2, 2, 432, 433, 7, 44, 2, 2, 433, 60, 3, 2, 2, 2, 434, 435, 7, 65, 2, 2, 435, 436, 7, 65, 2, 2, 436, 62, 3, 2, 2, 2, 437, 438, 7, 37, 2, 2, 438, 64, 3, 2, 2, 2, 439, 440, 7, 64, 2, 2, 440, 441, 7, 64, 2, 2, 441, 66, 3, 2, 2, 2, 442, 443, 7, 62, 2, 2, 443, 444, 7, 62, 2, 2, 444, 68, 3, 2, 2, 2, 445, 446, 7, 64, 2, 2, 446, 447, 7, 64, 2, 2, 447, 448, 7, 64, 2, 2, 448, 70, 3, 2, 2, 2, 449, 450, 7, 62, 2, 2, 450, 72, 3, 2, 2, 2, 451, 452, 7, 64, 2, 2, 452, 74, 3, 2, 2, 2, 453, 454, 7, 62, 2, 2, 454, 455, 7, 63, 2, 2, 455, 76, 3, 2, 2, 2, 456, 457, 7, 64, 2, 2, 457, 458, 7, 63, 2, 2, 458, 78, 3, 2, 2, 2, 459, 460, 7, 63, 2, 2, 460, 461, 7, 63, 2, 2, 461, 80, 3, 2, 2, 2, 462, 463, 7, 35, 2, 2, 463, 464, 7, 63, 2, 2, 464, 82, 3, 2, 2, 2, 465, 466, 7, 63, 2, 2, 466, 467, 7, 63, 2, 2, 467, 468, 7, 63, 2, 2, 468, 84, 3, 2, 2, 2, 469, 470, 7, 35, 2, 2, 470, 471, 7, 63, 2, 2, 471, 472, 7, 63, 2, 2, 472, 86, 3, 2, 2, 2, 473, 474, 7, 40, 2, 2, 474, 88, 3, 2, 2, 2, 475, 476, 7, 96, 2, 2, 476, 90, 3, 2, 2, 2, 477, 478, 7, 126, 2, 2, 478, 92, 3, 2, 2, 2, 479, 480, 7, 40, 2, 2, 480, 481, 7, 40, 2, 2, 481, 94, 3, 2, 2, 2, 482, 483, 7, 126, 2, 2, 483, 484, 7, 126, 2, 2, 484, 96, 3, 2, 2, 2, 485, 486, 7, 44, 2, 2, 486, 487, 7, 63, 2, 2, 487, 98, 3, 2, 2, 2, 488, 489, 7, 49, 2, 2, 489, 490, 7, 63, 2, 2, 490, 100, 3, 2, 2, 2, 491, 492, 7, 39, 2, 2, 492, 493, 7, 63, 2, 2, 493, 102, 3, 2, 2, 2, 494, 495, 7, 45, 2, 2, 495, 496, 7, 63, 2, 2, 496, 104, 3, 2, 2, 2, 497, 498, 7, 47, 2, 2, 498, 499, 7, 63, 2, 2, 499, 106, 3, 2, 2, 2, 500, 501, 7, 62, 2, 2, 501, 502, 7, 62, 2, 2, 502, 503, 7, 63, 2, 2, 503, 108, 3, 2, 2, 2, 504, 505, 7, 64, 2, 2, 505, 506, 7, 64, 2, 2, 506, 507, 7, 63, 2, 2, 507, 110, 3, 2, 2, 2, 508, 509, 7, 64, 2, 2, 509, 510, 7, 64, 2, 2, 510, 511, 7, 64, 2, 2, 511, 512, 7, 63, 2, 2, 512, 112, 3, 2, 2, 2, 513, 514, 7, 40, 2, 2, 514, 515, 7, 63, 2, 2, 515, 114, 3, 2, 2, 2, 516, 517, 7, 96, 2, 2, 517, 518, 7, 63, 2, 2, 518, 116, 3, 2, 2, 2, 519, 520, 7, 126, 2, 2, 520, 521, 7, 63, 2, 2, 521, 118, 3, 2, 2, 2, 522, 523, 7, 63, 2, 2, 523, 524, 7, 64, 2, 2, 524, 120, 3, 2, 2, 2, 525, 526, 7, 44, 2, 2, 526, 527, 7, 44, 2, 2, 527, 528, 7, 63, 2, 2, 528, 122, 3, 2, 2, 2, 529, 530, 7, 112, 2, 2, 530, 531, 7, 119, 2, 2, 531, 532, 7, 110, 2, 2, 532, 533, 7, 110, 2, 2, 533, 124, 3, 2, 2, 2, 534, 535, 7, 118, 2, 2, 535, 536, 7, 116, 2, 2, 536, 537, 7, 119, 2, 2, 537, 544, 7, 103, 2, 2, 538, 539, 7, 104, 2, 2, 539, 540, 7, 99, 2, 2, 540, 541, 7, 110, 2, 2, 541, 542, 7, 117, 2, 2, 542, 544, 7, 103, 2, 2, 543, 534, 3, 2, 2, 2, 543, 538, 3, 2, 2, 2, 544, 126, 3, 2, 2, 2, 545, 546, 5, 303, 152, 2, 546, 550, 7, 48, 2, 2, 547, 549, 9, 3, 2, 2, 548, 547, 3, 2, 2, 2, 549, 552, 3, 2, 2, 2, 550, 548, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 554, 3, 2, 2, 2, 552, 550, 3, 2, 2, 2, 553, 555, 5, 305, 153, 2, 554, 553, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 570, 3, 2, 2, 2, 556, 558, 7, 48, 2, 2, 557, 559, 9, 3, 2, 2, 558, 557, 3, 2, 2, 2, 559, 560, 3, 2, 2, 2, 560, 558, 3, 2, 2, 2, 560, 561, 3, 2, 2, 2, 561, 563, 3, 2, 2, 2, 562, 564, 5, 305, 153, 2, 563, 562, 3, 2, 2, 2, 563, 564, 3, 2, 2, 2, 564, 570, 3, 2, 2, 2, 565, 567, 5, 303, 152, 2, 566, 568, 5, 305, 153, 2, 567, 566, 3, 2, 2, 2, 567, 568, 3, 2, 2, 2, 568, 570, 3, 2, 2, 2, 569, 545, 3, 2, 2, 2, 569, 556, 3, 2, 2, 2, 569, 565, 3, 2, 2, 2, 570, 128, 3, 2, 2, 2, 571, 572, 7, 50, 2, 2, 572, 574, 9, 4, 2, 2, 573, 575, 5, 301, 151, 2, 574, 573, 3, 2, 2, 2, 575, 576, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 576, 577, 3, 2, 2, 2, 577, 130, 3, 2, 2, 2, 578, 580, 7, 50, 2, 2, 579, 581, 9, 5, 2, 2, 580, 579, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 580, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, 584, 3, 2, 2, 2, 584, 585, 6, 66, 3, 2, 585, 132, 3, 2, 2, 2, 586, 587, 7, 50, 2, 2, 587, 589, 9, 6, 2, 2, 588, 590, 9, 5, 2, 2, 589, 588, 3, 2, 2, 2, 590, 591, 3, 2, 2, 2, 591, 589, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 134, 3, 2, 2, 2, 593, 594, 7, 50, 2, 2, 594, 596, 9, 7, 2, 2, 595, 597, 9, 8, 2, 2, 596, 595, 3, 2, 2, 2, 597, 598, 3, 2, 2, 2, 598, 596, 3, 2, 2, 2, 598, 599, 3, 2, 2, 2, 599, 136, 3, 2, 2, 2, 600, 601, 7, 100, 2, 2, 601, 602, 7, 116, 2, 2, 602, 603, 7, 103, 2, 2, 603, 604, 7, 99, 2, 2, 604, 605, 7, 109, 2, 2, 605, 138, 3, 2, 2, 2, 606, 607, 7, 102, 2, 2, 607, 608, 7, 113, 2, 2, 608, 140, 3, 2, 2, 2, 609, 610, 7, 107, 2, 2, 610, 611, 7, 112, 2, 2, 611, 612, 7, 117, 2, 2, 612, 613, 7, 118, 2, 2, 613, 614, 7, 99, 2, 2, 614, 615, 7, 112, 2, 2, 615, 616, 7, 101, 2, 2, 616, 617, 7, 103, 2, 2, 617, 618, 7, 113, 2, 2, 618, 619, 7, 104, 2, 2, 619, 142, 3, 2, 2, 2, 620, 621, 7, 118, 2, 2, 621, 622, 7, 123, 2, 2, 622, 623, 7, 114, 2, 2, 623, 624, 7, 103, 2, 2, 624, 625, 7, 113, 2, 2, 625, 626, 7, 104, 2, 2, 626, 144, 3, 2, 2, 2, 627, 628, 7, 101, 2, 2, 628, 629, 7, 99, 2, 2, 629, 630, 7, 117, 2, 2, 630, 631, 7, 103, 2, 2, 631, 146, 3, 2, 2, 2, 632, 633, 7, 103, 2, 2, 633, 634, 7, 110, 2, 2, 634, 635, 7, 117, 2, 2, 635, 636, 7, 103, 2, 2, 636, 148, 3, 2, 2, 2, 637, 638, 7, 112, 2, 2, 638, 639, 7, 103, 2, 2, 639, 640, 7, 121, 2, 2, 640, 150, 3, 2, 2, 2, 641, 642, 7, 120, 2, 2, 642, 643, 7, 99, 2, 2, 643, 644, 7, 116, 2, 2, 644, 152, 3, 2, 2, 2, 645, 646, 7, 101, 2, 2, 646, 647, 7, 99, 2, 2, 647, 648, 7, 118, 2, 2, 648, 649, 7, 101, 2, 2, 649, 650, 7, 106, 2, 2, 650, 154, 3, 2, 2, 2, 651, 652, 7, 104, 2, 2, 652, 653, 7, 107, 2, 2, 653, 654, 7, 112, 2, 2, 654, 655, 7, 99, 2, 2, 655, 656, 7, 110, 2, 2, 656, 657, 7, 110, 2, 2, 657, 658, 7, 123, 2, 2, 658, 156, 3, 2, 2, 2, 659, 660, 7, 116, 2, 2, 660, 661, 7, 103, 2, 2, 661, 662, 7, 118, 2, 2, 662, 663, 7, 119, 2, 2, 663, 664, 7, 116, 2, 2, 664, 665, 7, 112, 2, 2, 665, 158, 3, 2, 2, 2, 666, 667, 7, 120, 2, 2, 667, 668, 7, 113, 2, 2, 668, 669, 7, 107, 2, 2, 669, 670, 7, 102, 2, 2, 670, 160, 3, 2, 2, 2, 671, 672, 7, 101, 2, 2, 672, 673, 7, 113, 2, 2, 673, 674, 7, 112, 2, 2, 674, 675, 7, 118, 2, 2, 675, 676, 7, 107, 2, 2, 676, 677, 7, 112, 2, 2, 677, 678, 7, 119, 2, 2, 678, 679, 7, 103, 2, 2, 679, 162, 3, 2, 2, 2, 680, 681, 7, 104, 2, 2, 681, 682, 7, 113, 2, 2, 682, 683, 7, 116, 2, 2, 683, 164, 3, 2, 2, 2, 684, 685, 7, 117, 2, 2, 685, 686, 7, 121, 2, 2, 686, 687, 7, 107, 2, 2, 687, 688, 7, 118, 2, 2, 688, 689, 7, 101, 2, 2, 689, 690, 7, 106, 2, 2, 690, 166, 3, 2, 2, 2, 691, 692, 7, 121, 2, 2, 692, 693, 7, 106, 2, 2, 693, 694, 7, 107, 2, 2, 694, 695, 7, 110, 2, 2, 695, 696, 7, 103, 2, 2, 696, 168, 3, 2, 2, 2, 697, 698, 7, 102, 2, 2, 698, 699, 7, 103, 2, 2, 699, 700, 7, 100, 2, 2, 700, 701, 7, 119, 2, 2, 701, 702, 7, 105, 2, 2, 702, 703, 7, 105, 2, 2, 703, 704, 7, 103, 2, 2, 704, 705, 7, 116, 2, 2, 705, 170, 3, 2, 2, 2, 706, 707, 7, 104, 2, 2, 707, 708, 7, 119, 2, 2, 708, 709, 7, 112, 2, 2, 709, 710, 7, 101, 2, 2, 710, 711, 7, 118, 2, 2, 711, 712, 7, 107, 2, 2, 712, 713, 7, 113, 2, 2, 713, 714, 7, 112, 2, 2, 714, 172, 3, 2, 2, 2, 715, 716, 7, 118, 2, 2, 716, 717, 7, 106, 2, 2, 717, 718, 7, 107, 2, 2, 718, 719, 7, 117, 2, 2, 719, 174, 3, 2, 2, 2, 720, 721, 7, 121, 2, 2, 721, 722, 7, 107, 2, 2, 722, 723, 7, 118, 2, 2, 723, 724, 7, 106, 2, 2, 724, 176, 3, 2, 2, 2, 725, 726, 7, 102, 2, 2, 726, 727, 7, 103, 2, 2, 727, 728, 7, 104, 2, 2, 728, 729, 7, 99, 2, 2, 729, 730, 7, 119, 2, 2, 730, 731, 7, 110, 2, 2, 731, 732, 7, 118, 2, 2, 732, 178, 3, 2, 2, 2, 733, 734, 7, 107, 2, 2, 734, 735, 7, 104, 2, 2, 735, 180, 3, 2, 2, 2, 736, 737, 7, 118, 2, 2, 737, 738, 7, 106, 2, 2, 738, 739, 7, 116, 2, 2, 739, 740, 7, 113, 2, 2, 740, 741, 7, 121, 2, 2, 741, 182, 3, 2, 2, 2, 742, 743, 7, 102, 2, 2, 743, 744, 7, 103, 2, 2, 744, 745, 7, 110, 2, 2, 745, 746, 7, 103, 2, 2, 746, 747, 7, 118, 2, 2, 747, 748, 7, 103, 2, 2, 748, 184, 3, 2, 2, 2, 749, 750, 7, 107, 2, 2, 750, 751, 7, 112, 2, 2, 751, 186, 3, 2, 2, 2, 752, 753, 7, 118, 2, 2, 753, 754, 7, 116, 2, 2, 754, 755, 7, 123, 2, 2, 755, 188, 3, 2, 2, 2, 756, 757, 7, 99, 2, 2, 757, 758, 7, 117, 2, 2, 758, 190, 3, 2, 2, 2, 759, 760, 7, 104, 2, 2, 760, 761, 7, 116, 2, 2, 761, 762, 7, 113, 2, 2, 762, 763, 7, 111, 2, 2, 763, 192, 3, 2, 2, 2, 764, 765, 7, 116, 2, 2, 765, 766, 7, 103, 2, 2, 766, 767, 7, 99, 2, 2, 767, 768, 7, 102, 2, 2, 768, 769, 7, 113, 2, 2, 769, 770, 7, 112, 2, 2, 770, 771, 7, 110, 2, 2, 771, 772, 7, 123, 2, 2, 772, 194, 3, 2, 2, 2, 773, 774, 7, 99, 2, 2, 774, 775, 7, 117, 2, 2, 775, 776, 7, 123, 2, 2, 776, 777, 7, 112, 2, 2, 777, 778, 7, 101, 2, 2, 778, 196, 3, 2, 2, 2, 779, 780, 7, 101, 2, 2, 780, 781, 7, 110, 2, 2, 781, 782, 7, 99, 2, 2, 782, 783, 7, 117, 2, 2, 783, 784, 7, 117, 2, 2, 784, 198, 3, 2, 2, 2, 785, 786, 7, 103, 2, 2, 786, 787, 7, 112, 2, 2, 787, 788, 7, 119, 2, 2, 788, 789, 7, 111, 2, 2, 789, 200, 3, 2, 2, 2, 790, 791, 7, 103, 2, 2, 791, 792, 7, 122, 2, 2, 792, 793, 7, 118, 2, 2, 793, 794, 7, 103, 2, 2, 794, 795, 7, 112, 2, 2, 795, 796, 7, 102, 2, 2, 796, 797, 7, 117, 2, 2, 797, 202, 3, 2, 2, 2, 798, 799, 7, 117, 2, 2, 799, 800, 7, 119, 2, 2, 800, 801, 7, 114, 2, 2, 801, 802, 7, 103, 2, 2, 802, 803, 7, 116, 2, 2, 803, 204, 3, 2, 2, 2, 804, 805, 7, 101, 2, 2, 805, 806, 7, 113, 2, 2, 806, 807, 7, 112, 2, 2, 807, 808, 7, 117, 2, 2, 808, 809, 7, 118, 2, 2, 809, 206, 3, 2, 2, 2, 810, 811, 7, 103, 2, 2, 811, 812, 7, 122, 2, 2, 812, 813, 7, 114, 2, 2, 813, 814, 7, 113, 2, 2, 814, 815, 7, 116, 2, 2, 815, 816, 7, 118, 2, 2, 816, 208, 3, 2, 2, 2, 817, 818, 7, 107, 2, 2, 818, 819, 7, 111, 2, 2, 819, 820, 7, 114, 2, 2, 820, 821, 7, 113, 2, 2, 821, 822, 7, 116, 2, 2, 822, 823, 7, 118, 2, 2, 823, 210, 3, 2, 2, 2, 824, 825, 7, 99, 2, 2, 825, 826, 7, 121, 2, 2, 826, 827, 7, 99, 2, 2, 827, 828, 7, 107, 2, 2, 828, 829, 7, 118, 2, 2, 829, 212, 3, 2, 2, 2, 830, 831, 7, 107, 2, 2, 831, 832, 7, 111, 2, 2, 832, 833, 7, 114, 2, 2, 833, 834, 7, 110, 2, 2, 834, 835, 7, 103, 2, 2, 835, 836, 7, 111, 2, 2, 836, 837, 7, 103, 2, 2, 837, 838, 7, 112, 2, 2, 838, 839, 7, 118, 2, 2, 839, 840, 7, 117, 2, 2, 840, 214, 3, 2, 2, 2, 841, 842, 7, 110, 2, 2, 842, 843, 7, 103, 2, 2, 843, 844, 7, 118, 2, 2, 844, 216, 3, 2, 2, 2, 845, 846, 7, 114, 2, 2, 846, 847, 7, 116, 2, 2, 847, 848, 7, 107, 2, 2, 848, 849, 7, 120, 2, 2, 849, 850, 7, 99, 2, 2, 850, 851, 7, 118, 2, 2, 851, 852, 7, 103, 2, 2, 852, 218, 3, 2, 2, 2, 853, 854, 7, 114, 2, 2, 854, 855, 7, 119, 2, 2, 855, 856, 7, 100, 2, 2, 856, 857, 7, 110, 2, 2, 857, 858, 7, 107, 2, 2, 858, 859, 7, 101, 2, 2, 859, 220, 3, 2, 2, 2, 860, 861, 7, 107, 2, 2, 861, 862, 7, 112, 2, 2, 862, 863, 7, 118, 2, 2, 863, 864, 7, 103, 2, 2, 864, 865, 7, 116, 2, 2, 865, 866, 7, 104, 2, 2, 866, 867, 7, 99, 2, 2, 867, 868, 7, 101, 2, 2, 868, 869, 7, 103, 2, 2, 869, 222, 3, 2, 2, 2, 870, 871, 7, 114, 2, 2, 871, 872, 7, 99, 2, 2, 872, 873, 7, 101, 2, 2, 873, 874, 7, 109, 2, 2, 874, 875, 7, 99, 2, 2, 875, 876, 7, 105, 2, 2, 876, 877, 7, 103, 2, 2, 877, 224, 3, 2, 2, 2, 878, 879, 7, 114, 2, 2, 879, 880, 7, 116, 2, 2, 880, 881, 7, 113, 2, 2, 881, 882, 7, 118, 2, 2, 882, 883, 7, 103, 2, 2, 883, 884, 7, 101, 2, 2, 884, 885, 7, 118, 2, 2, 885, 886, 7, 103, 2, 2, 886, 887, 7, 102, 2, 2, 887, 226, 3, 2, 2, 2, 888, 889, 7, 117, 2, 2, 889, 890, 7, 118, 2, 2, 890, 891, 7, 99, 2, 2, 891, 892, 7, 118, 2, 2, 892, 893, 7, 107, 2, 2, 893, 894, 7, 101, 2, 2, 894, 228, 3, 2, 2, 2, 895, 896, 7, 123, 2, 2, 896, 897, 7, 107, 2, 2, 897, 898, 7, 103, 2, 2, 898, 899, 7, 110, 2, 2, 899, 900, 7, 102, 2, 2, 900, 230, 3, 2, 2, 2, 901, 902, 7, 99, 2, 2, 902, 903, 7, 112, 2, 2, 903, 904, 7, 123, 2, 2, 904, 232, 3, 2, 2, 2, 905, 906, 7, 112, 2, 2, 906, 907, 7, 119, 2, 2, 907, 908, 7, 111, 2, 2, 908, 909, 7, 100, 2, 2, 909, 910, 7, 103, 2, 2, 910, 911, 7, 116, 2, 2, 911, 234, 3, 2, 2, 2, 912, 913, 7, 100, 2, 2, 913, 914, 7, 113, 2, 2, 914, 915, 7, 113, 2, 2, 915, 916, 7, 110, 2, 2, 916, 917, 7, 103, 2, 2, 917, 918, 7, 99, 2, 2, 918, 919, 7, 112, 2, 2, 919, 236, 3, 2, 2, 2, 920, 921, 7, 117, 2, 2, 921, 922, 7, 118, 2, 2, 922, 923, 7, 116, 2, 2, 923, 924, 7, 107, 2, 2, 924, 925, 7, 112, 2, 2, 925, 926, 7, 105, 2, 2, 926, 238, 3, 2, 2, 2, 927, 928, 7, 117, 2, 2, 928, 929, 7, 123, 2, 2, 929, 930, 7, 111, 2, 2, 930, 931, 7, 100, 2, 2, 931, 932, 7, 113, 2, 2, 932, 933, 7, 110, 2, 2, 933, 240, 3, 2, 2, 2, 934, 935, 7, 118, 2, 2, 935, 936, 7, 123, 2, 2, 936, 937, 7, 114, 2, 2, 937, 938, 7, 103, 2, 2, 938, 242, 3, 2, 2, 2, 939, 940, 7, 105, 2, 2, 940, 941, 7, 103, 2, 2, 941, 942, 7, 118, 2, 2, 942, 943, 7, 34, 2, 2, 943, 244, 3, 2, 2, 2, 944, 945, 7, 117, 2, 2, 945, 946, 7, 103, 2, 2, 946, 947, 7, 118, 2, 2, 947, 948, 7, 34, 2, 2, 948, 246, 3, 2, 2, 2, 949, 950, 7, 101, 2, 2, 950, 951, 7, 113, 2, 2, 951, 952, 7, 112, 2, 2, 952, 953, 7, 117, 2, 2, 953, 954, 7, 118, 2, 2, 954, 955, 7, 116, 2, 2, 955, 956, 7, 119, 2, 2, 956, 957, 7, 101, 2, 2, 957, 958, 7, 118, 2, 2, 958, 959, 7, 113, 2, 2, 959, 960, 7, 116, 2, 2, 960, 248, 3, 2, 2, 2, 961, 962, 7, 112, 2, 2, 962, 963, 7, 99, 2, 2, 963, 964, 7, 111, 2, 2, 964, 965, 7, 103, 2, 2, 965, 966, 7, 117, 2, 2, 966, 967, 7, 114, 2, 2, 967, 968, 7, 99, 2, 2, 968, 969, 7, 101, 2, 2, 969, 970, 7, 103, 2, 2, 970, 250, 3, 2, 2, 2, 971, 972, 7, 116, 2, 2, 972, 973, 7, 103, 2, 2, 973, 974, 7, 115, 2, 2, 974, 975, 7, 119, 2, 2, 975, 976, 7, 107, 2, 2, 976, 977, 7, 116, 2, 2, 977, 978, 7, 103, 2, 2, 978, 252, 3, 2, 2, 2, 979, 980, 7, 111, 2, 2, 980, 981, 7, 113, 2, 2, 981, 982, 7, 102, 2, 2, 982, 983, 7, 119, 2, 2, 983, 984, 7, 110, 2, 2, 984, 985, 7, 103, 2, 2, 985, 254, 3, 2, 2, 2, 986, 987, 7, 102, 2, 2, 987, 988, 7, 103, 2, 2, 988, 989, 7, 101, 2, 2, 989, 990, 7, 110, 2, 2, 990, 991, 7, 99, 2, 2, 991, 992, 7, 116, 2, 2, 992, 993, 7, 103, 2, 2, 993, 256, 3, 2, 2, 2, 994, 995, 7, 99, 2, 2, 995, 996, 7, 100, 2, 2, 996, 997, 7, 117, 2, 2, 997, 998, 7, 118, 2, 2, 998, 999, 7, 116, 2, 2, 999, 1000, 7, 99, 2, 2, 1000, 1001, 7, 101, 2, 2, 1001, 1002, 7, 118, 2, 2, 1002, 258, 3, 2, 2, 2, 1003, 1004, 7, 107, 2, 2, 1004, 1005, 7, 117, 2, 2, 1005, 260, 3, 2, 2, 2, 1006, 1007, 7, 66, 2, 2, 1007, 262, 3, 2, 2, 2, 1008, 1012, 5, 309, 155, 2, 1009, 1011, 5, 307, 154, 2, 1010, 1009, 3, 2, 2, 2, 1011, 1014, 3, 2, 2, 2, 1012, 1010, 3, 2, 2, 2, 1012, 1013, 3, 2, 2, 2, 1013, 264, 3, 2, 2, 2, 1014, 1012, 3, 2, 2, 2, 1015, 1019, 7, 36, 2, 2, 1016, 1018, 5, 279, 140, 2, 1017, 1016, 3, 2, 2, 2, 1018, 1021, 3, 2, 2, 2, 1019, 1017, 3, 2, 2, 2, 1019, 1020, 3, 2, 2, 2, 1020, 1022, 3, 2, 2, 2, 1021, 1019, 3, 2, 2, 2, 1022, 1032, 7, 36, 2, 2, 1023, 1027, 7, 41, 2, 2, 1024, 1026, 5, 281, 141, 2, 1025, 1024, 3, 2, 2, 2, 1026, 1029, 3, 2, 2, 2, 1027, 1025, 3, 2, 2, 2, 1027, 1028, 3, 2, 2, 2, 1028, 1030, 3, 2, 2, 2, 1029, 1027, 3, 2, 2, 2, 1030, 1032, 7, 41, 2, 2, 1031, 1015, 3, 2, 2, 2, 1031, 1023, 3, 2, 2, 2, 1032, 1033, 3, 2, 2, 2, 1033, 1034, 8, 133, 5, 2, 1034, 266, 3, 2, 2, 2, 1035, 1041, 7, 98, 2, 2, 1036, 1037, 7, 94, 2, 2, 1037, 1040, 7, 98, 2, 2, 1038, 1040, 10, 9, 2, 2, 1039, 1036, 3, 2, 2, 2, 1039, 1038, 3, 2, 2, 2, 1040, 1043, 3, 2, 2, 2, 1041, 1039, 3, 2, 2, 2, 1041, 1042, 3, 2, 2, 2, 1042, 1044, 3, 2, 2, 2, 1043, 1041, 3, 2, 2, 2, 1044, 1045, 7, 98, 2, 2, 1045, 268, 3, 2, 2, 2, 1046, 1048, 9, 10, 2, 2, 1047, 1046, 3, 2, 2, 2, 1048, 1049, 3, 2, 2, 2, 1049, 1047, 3, 2, 2, 2, 1049, 1050, 3, 2, 2, 2, 1050, 1051, 3, 2, 2, 2, 1051, 1052, 8, 135, 2, 2, 1052, 270, 3, 2, 2, 2, 1053, 1054, 9, 2, 2, 2, 1054, 1055, 3, 2, 2, 2, 1055, 1056, 8, 136, 2, 2, 1056, 272, 3, 2, 2, 2, 1057, 1058, 7, 62, 2, 2, 1058, 1059, 7, 35, 2, 2, 1059, 1060, 7, 47, 2, 2, 1060, 1061, 7, 47, 2, 2, 1061, 1065, 3, 2, 2, 2, 1062, 1064, 11, 2, 2, 2, 1063, 1062, 3, 2, 2, 2, 1064, 1067, 3, 2, 2, 2, 1065, 1066, 3, 2, 2, 2, 1065, 1063, 3, 2, 2, 2, 1066, 1068, 3, 2, 2, 2, 1067, 1065, 3, 2, 2, 2, 1068, 1069, 7, 47, 2, 2, 1069, 1070, 7, 47, 2, 2, 1070, 1071, 7, 64, 2, 2, 1071, 1072, 3, 2, 2, 2, 1072, 1073, 8, 137, 2, 2, 1073, 274, 3, 2, 2, 2, 1074, 1075, 7, 62, 2, 2, 1075, 1076, 7, 35, 2, 2, 1076, 1077, 7, 93, 2, 2, 1077, 1078, 7, 69, 2, 2, 1078, 1079, 7, 70, 2, 2, 1079, 1080, 7, 67, 2, 2, 1080, 1081, 7, 86, 2, 2, 1081, 1082, 7, 67, 2, 2, 1082, 1083, 7, 93, 2, 2, 1083, 1087, 3, 2, 2, 2, 1084, 1086, 11, 2, 2, 2, 1085, 1084, 3, 2, 2, 2, 1086, 1089, 3, 2, 2, 2, 1087, 1088, 3, 2, 2, 2, 1087, 1085, 3, 2, 2, 2, 1088, 1090, 3, 2, 2, 2, 1089, 1087, 3, 2, 2, 2, 1090, 1091, 7, 95, 2, 2, 1091, 1092, 7, 95, 2, 2, 1092, 1093, 7, 64, 2, 2, 1093, 1094, 3, 2, 2, 2, 1094, 1095, 8, 138, 2, 2, 1095, 276, 3, 2, 2, 2, 1096, 1097, 11, 2, 2, 2, 1097, 1098, 3, 2, 2, 2, 1098, 1099, 8, 139, 6, 2, 1099, 278, 3, 2, 2, 2, 1100, 1105, 10, 11, 2, 2, 1101, 1102, 7, 94, 2, 2, 1102, 1105, 5, 283, 142, 2, 1103, 1105, 5, 299, 150, 2, 1104, 1100, 3, 2, 2, 2, 1104, 1101, 3, 2, 2, 2, 1104, 1103, 3, 2, 2, 2, 1105, 280, 3, 2, 2, 2, 1106, 1111, 10, 12, 2, 2, 1107, 1108, 7, 94, 2, 2, 1108, 1111, 5, 283, 142, 2, 1109, 1111, 5, 299, 150, 2, 1110, 1106, 3, 2, 2, 2, 1110, 1107, 3, 2, 2, 2, 1110, 1109, 3, 2, 2, 2, 1111, 282, 3, 2, 2, 2, 1112, 1118, 5, 285, 143, 2, 1113, 1118, 7, 50, 2, 2, 1114, 1118, 5, 287, 144, 2, 1115, 1118, 5, 289, 145, 2, 1116, 1118, 5, 291, 146, 2, 1117, 1112, 3, 2, 2, 2, 1117, 1113, 3, 2, 2, 2, 1117, 1114, 3, 2, 2, 2, 1117, 1115, 3, 2, 2, 2, 1117, 1116, 3, 2, 2, 2, 1118, 284, 3, 2, 2, 2, 1119, 1122, 5, 293, 147, 2, 1120, 1122, 5, 295, 148, 2, 1121, 1119, 3, 2, 2, 2, 1121, 1120, 3, 2, 2, 2, 1122, 286, 3, 2, 2, 2, 1123, 1124, 7, 122, 2, 2, 1124, 1125, 5, 301, 151, 2, 1125, 1126, 5, 301, 151, 2, 1126, 288, 3, 2, 2, 2, 1127, 1128, 7, 119, 2, 2, 1128, 1129, 5, 301, 151, 2, 1129, 1130, 5, 301, 151, 2, 1130, 1131, 5, 301, 151, 2, 1131, 1132, 5, 301, 151, 2, 1132, 290, 3, 2, 2, 2, 1133, 1134, 7, 119, 2, 2, 1134, 1136, 7, 125, 2, 2, 1135, 1137, 5, 301, 151, 2, 1136, 1135, 3, 2, 2, 2, 1137, 1138, 3, 2, 2, 2, 1138, 1136, 3, 2, 2, 2, 1138, 1139, 3, 2, 2, 2, 1139, 1140, 3, 2, 2, 2, 1140, 1141, 7, 127, 2, 2, 1141, 292, 3, 2, 2, 2, 1142, 1143, 9, 13, 2, 2, 1143, 294, 3, 2, 2, 2, 1144, 1145, 10, 14, 2, 2, 1145, 296, 3, 2, 2, 2, 1146, 1149, 5, 293, 147, 2, 1147, 1149, 9, 15, 2, 2, 1148, 1146, 3, 2, 2, 2, 1148, 1147, 3, 2, 2, 2, 1149, 298, 3, 2, 2, 2, 1150, 1151, 7, 94, 2, 2, 1151, 1152, 9, 2, 2, 2, 1152, 300, 3, 2, 2, 2, 1153, 1154, 9, 16, 2, 2, 1154, 302, 3, 2, 2, 2, 1155, 1164, 7, 50, 2, 2, 1156, 1160, 9, 17, 2, 2, 1157, 1159, 9, 3, 2, 2, 1158, 1157, 3, 2, 2, 2, 1159, 1162, 3, 2, 2, 2, 1160, 1158, 3, 2, 2, 2, 1160, 1161, 3, 2, 2, 2, 1161, 1164, 3, 2, 2, 2, 1162, 1160, 3, 2, 2, 2, 1163, 1155, 3, 2, 2, 2, 1163, 1156, 3, 2, 2, 2, 1164, 304, 3, 2, 2, 2, 1165, 1167, 9, 18, 2, 2, 1166, 1168, 9, 19, 2, 2, 1167, 1166, 3, 2, 2, 2, 1167, 1168, 3, 2, 2, 2, 1168, 1170, 3, 2, 2, 2, 1169, 1171, 9, 3, 2, 2, 1170, 1169, 3, 2, 2, 2, 1171, 1172, 3, 2, 2, 2, 1172, 1170, 3, 2, 2, 2, 1172, 1173, 3, 2, 2, 2, 1173, 306, 3, 2, 2, 2, 1174, 1180, 5, 309, 155, 2, 1175, 1180, 5, 313, 157, 2, 1176, 1180, 5, 315, 158, 2, 1177, 1180, 5, 317, 159, 2, 1178, 1180, 4, 8206, 8207, 2, 1179, 1174, 3, 2, 2, 2, 1179, 1175, 3, 2, 2, 2, 1179, 1176, 3, 2, 2, 2, 1179, 1177, 3, 2, 2, 2, 1179, 1178, 3, 2, 2, 2, 1180, 308, 3, 2, 2, 2, 1181, 1186, 5, 311, 156, 2, 1182, 1186, 9, 20, 2, 2, 1183, 1184, 7, 94, 2, 2, 1184, 1186, 5, 289, 145, 2, 1185, 1181, 3, 2, 2, 2, 1185, 1182, 3, 2, 2, 2, 1185, 1183, 3, 2, 2, 2, 1186, 310, 3, 2, 2, 2, 1187, 1189, 9, 21, 2, 2, 1188, 1187, 3, 2, 2, 2, 1189, 312, 3, 2, 2, 2, 1190, 1192, 9, 22, 2, 2, 1191, 1190, 3, 2, 2, 2, 1192, 314, 3, 2, 2, 2, 1193, 1195, 9, 23, 2, 2, 1194, 1193, 3, 2, 2, 2, 1195, 316, 3, 2, 2, 2, 1196, 1198, 9, 24, 2, 2, 1197, 1196, 3, 2, 2, 2, 1198, 318, 3, 2, 2, 2, 1199, 1210, 10, 25, 2, 2, 1200, 1210, 5, 325, 163, 2, 1201, 1205, 7, 93, 2, 2, 1202, 1204, 5, 323, 162, 2, 1203, 1202, 3, 2, 2, 2, 1204, 1207, 3, 2, 2, 2, 1205, 1203, 3, 2, 2, 2, 1205, 1206, 3, 2, 2, 2, 1206, 1208, 3, 2, 2, 2, 1207, 1205, 3, 2, 2, 2, 1208, 1210, 7, 95, 2, 2, 1209, 1199, 3, 2, 2, 2, 1209, 1200, 3, 2, 2, 2, 1209, 1201, 3, 2, 2, 2, 1210, 320, 3, 2, 2, 2, 1211, 1222, 10, 26, 2, 2, 1212, 1222, 5, 325, 163, 2, 1213, 1217, 7, 93, 2, 2, 1214, 1216, 5, 323, 162, 2, 1215, 1214, 3, 2, 2, 2, 1216, 1219, 3, 2, 2, 2, 1217, 1215, 3, 2, 2, 2, 1217, 1218, 3, 2, 2, 2, 1218, 1220, 3, 2, 2, 2, 1219, 1217, 3, 2, 2, 2, 1220, 1222, 7, 95, 2, 2, 1221, 1211, 3, 2, 2, 2, 1221, 1212, 3, 2, 2, 2, 1221, 1213, 3, 2, 2, 2, 1222, 322, 3, 2, 2, 2, 1223, 1226, 10, 27, 2, 2, 1224, 1226, 5, 325, 163, 2, 1225, 1223, 3, 2, 2, 2, 1225, 1224, 3, 2, 2, 2, 1226, 324, 3, 2, 2, 2, 1227, 1228, 7, 94, 2, 2, 1228, 1229, 10, 2, 2, 2, 1229, 326, 3, 2, 2, 2, 49, 2, 333, 342, 356, 366, 374, 543, 550, 554, 560, 563, 567, 569, 576, 582, 591, 598, 1012, 1019, 1027, 1031, 1039, 1041, 1049, 1065, 1087, 1104, 1110, 1117, 1121, 1138, 1148, 1160, 1163, 1167, 1172, 1179, 1185, 1188, 1191, 1194, 1197, 1205, 1209, 1217, 1221, 1225, 7, 2, 3, 2, 3, 10, 2, 3, 11, 3, 3, 133, 4, 2, 4, 2] \ No newline at end of file diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptLexer.java b/docs/compare/src/main/java/tsantlr/TypeScriptLexer.java new file mode 100644 index 0000000000000000000000000000000000000000..030bb21f7b0f1b664d2c020c103e79e1c707750a --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptLexer.java @@ -0,0 +1,780 @@ +// Generated from TypeScriptLexer.g4 by ANTLR 4.7.2 +package tsantlr; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class TypeScriptLexer extends TypeScriptBaseLexer { + static { RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + HashBangLine=1, MultiLineComment=2, SingleLineComment=3, RegularExpressionLiteral=4, + OpenBracket=5, CloseBracket=6, OpenParen=7, CloseParen=8, OpenBrace=9, + CloseBrace=10, SemiColon=11, Comma=12, Assign=13, QuestionMark=14, Colon=15, + Ellipsis=16, Dot=17, PlusPlus=18, MinusMinus=19, Plus=20, Minus=21, BitNot=22, + Not=23, Multiply=24, Lodash=25, Dollar=26, Divide=27, Modulus=28, Power=29, + NullCoalesce=30, Hashtag=31, RightShiftArithmetic=32, LeftShiftArithmetic=33, + RightShiftLogical=34, LessThan=35, MoreThan=36, LessThanEquals=37, GreaterThanEquals=38, + Equals_=39, NotEquals=40, IdentityEquals=41, IdentityNotEquals=42, BitAnd=43, + BitXOr=44, BitOr=45, And=46, Or=47, MultiplyAssign=48, DivideAssign=49, + ModulusAssign=50, PlusAssign=51, MinusAssign=52, LeftShiftArithmeticAssign=53, + RightShiftArithmeticAssign=54, RightShiftLogicalAssign=55, BitAndAssign=56, + BitXorAssign=57, BitOrAssign=58, ARROW=59, PowerAssign=60, NullLiteral=61, + BooleanLiteral=62, DecimalLiteral=63, HexIntegerLiteral=64, OctalIntegerLiteral=65, + OctalIntegerLiteral2=66, BinaryIntegerLiteral=67, Break=68, Do=69, Instanceof=70, + Typeof=71, Case=72, Else=73, New=74, Var=75, Catch=76, Finally=77, Return=78, + Void=79, Continue=80, For=81, Switch=82, While=83, Debugger=84, Function=85, + This=86, With=87, Default=88, If=89, Throw=90, Delete=91, In=92, Try=93, + As=94, From=95, ReadOnly=96, Async=97, Class=98, Enum=99, Extends=100, + Super=101, Const=102, Export=103, Import=104, Await=105, Implements=106, + Let=107, Private=108, Public=109, Interface=110, Package=111, Protected=112, + Static=113, Yield=114, ANY=115, NUMBER=116, BOOLEAN=117, STRING=118, SYMBOL=119, + Type=120, Get=121, Set=122, Constructor=123, Namespace=124, Require=125, + Module=126, Declare=127, Abstract=128, Is=129, At=130, Identifier=131, + StringLiteral=132, TemplateStringLiteral=133, WhiteSpaces=134, LineTerminator=135, + HtmlComment=136, CDataComment=137, UnexpectedCharacter=138; + public static final int + ERROR=2; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", "ERROR" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Lodash", "Dollar", "Divide", "Modulus", "Power", + "NullCoalesce", "Hashtag", "RightShiftArithmetic", "LeftShiftArithmetic", + "RightShiftLogical", "LessThan", "MoreThan", "LessThanEquals", "GreaterThanEquals", + "Equals_", "NotEquals", "IdentityEquals", "IdentityNotEquals", "BitAnd", + "BitXOr", "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", + "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "ARROW", "PowerAssign", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "Break", "Do", "Instanceof", "Typeof", "Case", "Else", "New", "Var", + "Catch", "Finally", "Return", "Void", "Continue", "For", "Switch", "While", + "Debugger", "Function", "This", "With", "Default", "If", "Throw", "Delete", + "In", "Try", "As", "From", "ReadOnly", "Async", "Class", "Enum", "Extends", + "Super", "Const", "Export", "Import", "Await", "Implements", "Let", "Private", + "Public", "Interface", "Package", "Protected", "Static", "Yield", "ANY", + "NUMBER", "BOOLEAN", "STRING", "SYMBOL", "Type", "Get", "Set", "Constructor", + "Namespace", "Require", "Module", "Declare", "Abstract", "Is", "At", + "Identifier", "StringLiteral", "TemplateStringLiteral", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter", + "DoubleStringCharacter", "SingleStringCharacter", "EscapeSequence", "CharacterEscapeSequence", + "HexEscapeSequence", "UnicodeEscapeSequence", "ExtendedUnicodeEscapeSequence", + "SingleEscapeCharacter", "NonEscapeCharacter", "EscapeCharacter", "LineContinuation", + "HexDigit", "DecimalIntegerLiteral", "ExponentPart", "IdentifierPart", + "IdentifierStart", "UnicodeLetter", "UnicodeCombiningMark", "UnicodeDigit", + "UnicodeConnectorPunctuation", "RegularExpressionFirstChar", "RegularExpressionChar", + "RegularExpressionClassChar", "RegularExpressionBackslashSequence" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, null, null, null, null, "'['", "']'", "'('", "')'", "'{'", "'}'", + "';'", "','", "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", + "'-'", "'~'", "'!'", "'*'", "'_'", "'$'", "'/'", "'%'", "'**'", "'??'", + "'#'", "'>>'", "'<<'", "'>>>'", "'<'", "'>'", "'<='", "'>='", "'=='", + "'!='", "'==='", "'!=='", "'&'", "'^'", "'|'", "'&&'", "'||'", "'*='", + "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'>>>='", "'&='", "'^='", + "'|='", "'=>'", "'**='", "'null'", null, null, null, null, null, null, + "'break'", "'do'", "'instanceof'", "'typeof'", "'case'", "'else'", "'new'", + "'var'", "'catch'", "'finally'", "'return'", "'void'", "'continue'", + "'for'", "'switch'", "'while'", "'debugger'", "'function'", "'this'", + "'with'", "'default'", "'if'", "'throw'", "'delete'", "'in'", "'try'", + "'as'", "'from'", "'readonly'", "'async'", "'class'", "'enum'", "'extends'", + "'super'", "'const'", "'export'", "'import'", "'await'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", "'any'", "'number'", "'boolean'", "'string'", + "'symbol'", "'type'", "'get '", "'set '", "'constructor'", "'namespace'", + "'require'", "'module'", "'declare'", "'abstract'", "'is'", "'@'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Lodash", "Dollar", "Divide", "Modulus", "Power", + "NullCoalesce", "Hashtag", "RightShiftArithmetic", "LeftShiftArithmetic", + "RightShiftLogical", "LessThan", "MoreThan", "LessThanEquals", "GreaterThanEquals", + "Equals_", "NotEquals", "IdentityEquals", "IdentityNotEquals", "BitAnd", + "BitXOr", "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", + "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "ARROW", "PowerAssign", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "Break", "Do", "Instanceof", "Typeof", "Case", "Else", "New", "Var", + "Catch", "Finally", "Return", "Void", "Continue", "For", "Switch", "While", + "Debugger", "Function", "This", "With", "Default", "If", "Throw", "Delete", + "In", "Try", "As", "From", "ReadOnly", "Async", "Class", "Enum", "Extends", + "Super", "Const", "Export", "Import", "Await", "Implements", "Let", "Private", + "Public", "Interface", "Package", "Protected", "Static", "Yield", "ANY", + "NUMBER", "BOOLEAN", "STRING", "SYMBOL", "Type", "Get", "Set", "Constructor", + "Namespace", "Require", "Module", "Declare", "Abstract", "Is", "At", + "Identifier", "StringLiteral", "TemplateStringLiteral", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public TypeScriptLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "TypeScriptLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 8: + OpenBrace_action((RuleContext)_localctx, actionIndex); + break; + case 9: + CloseBrace_action((RuleContext)_localctx, actionIndex); + break; + case 131: + StringLiteral_action((RuleContext)_localctx, actionIndex); + break; + } + } + private void OpenBrace_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + this.ProcessOpenBrace(); + break; + } + } + private void CloseBrace_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 1: + this.ProcessCloseBrace(); + break; + } + } + private void StringLiteral_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 2: + this.ProcessStringLiteral(); + break; + } + } + @Override + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 3: + return RegularExpressionLiteral_sempred((RuleContext)_localctx, predIndex); + case 64: + return OctalIntegerLiteral_sempred((RuleContext)_localctx, predIndex); + } + return true; + } + private boolean RegularExpressionLiteral_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return this.IsRegexPossible(); + } + return true; + } + private boolean OctalIntegerLiteral_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return !this.IsStrictMode(); + } + return true; + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\u008c\u04ce\b\1\4"+ + "\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n"+ + "\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+ + "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+ + "\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t"+ + " \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t"+ + "+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64"+ + "\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t"+ + "=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4"+ + "I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\t"+ + "T\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_"+ + "\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k"+ + "\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv"+ + "\4w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t"+ + "\u0080\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084"+ + "\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089"+ + "\t\u0089\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d"+ + "\4\u008e\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092"+ + "\t\u0092\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096"+ + "\4\u0097\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b"+ + "\t\u009b\4\u009c\t\u009c\4\u009d\t\u009d\4\u009e\t\u009e\4\u009f\t\u009f"+ + "\4\u00a0\t\u00a0\4\u00a1\t\u00a1\4\u00a2\t\u00a2\4\u00a3\t\u00a3\3\2\3"+ + "\2\3\2\3\2\7\2\u014c\n\2\f\2\16\2\u014f\13\2\3\3\3\3\3\3\3\3\7\3\u0155"+ + "\n\3\f\3\16\3\u0158\13\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\7\4\u0163"+ + "\n\4\f\4\16\4\u0166\13\4\3\4\3\4\3\5\3\5\3\5\7\5\u016d\n\5\f\5\16\5\u0170"+ + "\13\5\3\5\3\5\3\5\7\5\u0175\n\5\f\5\16\5\u0178\13\5\3\6\3\6\3\7\3\7\3"+ + "\b\3\b\3\t\3\t\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3"+ + "\17\3\17\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\23\3\23\3\23\3\24\3"+ + "\24\3\24\3\25\3\25\3\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31\3\32\3\32\3"+ + "\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\36\3\37\3\37\3\37\3 \3 \3!\3"+ + "!\3!\3\"\3\"\3\"\3#\3#\3#\3#\3$\3$\3%\3%\3&\3&\3&\3\'\3\'\3\'\3(\3(\3"+ + "(\3)\3)\3)\3*\3*\3*\3*\3+\3+\3+\3+\3,\3,\3-\3-\3.\3.\3/\3/\3/\3\60\3\60"+ + "\3\60\3\61\3\61\3\61\3\62\3\62\3\62\3\63\3\63\3\63\3\64\3\64\3\64\3\65"+ + "\3\65\3\65\3\66\3\66\3\66\3\66\3\67\3\67\3\67\3\67\38\38\38\38\38\39\3"+ + "9\39\3:\3:\3:\3;\3;\3;\3<\3<\3<\3=\3=\3=\3=\3>\3>\3>\3>\3>\3?\3?\3?\3"+ + "?\3?\3?\3?\3?\3?\5?\u0220\n?\3@\3@\3@\7@\u0225\n@\f@\16@\u0228\13@\3@"+ + "\5@\u022b\n@\3@\3@\6@\u022f\n@\r@\16@\u0230\3@\5@\u0234\n@\3@\3@\5@\u0238"+ + "\n@\5@\u023a\n@\3A\3A\3A\6A\u023f\nA\rA\16A\u0240\3B\3B\6B\u0245\nB\r"+ + "B\16B\u0246\3B\3B\3C\3C\3C\6C\u024e\nC\rC\16C\u024f\3D\3D\3D\6D\u0255"+ + "\nD\rD\16D\u0256\3E\3E\3E\3E\3E\3E\3F\3F\3F\3G\3G\3G\3G\3G\3G\3G\3G\3"+ + "G\3G\3G\3H\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3J\3J\3J\3J\3J\3K\3K\3K\3"+ + "K\3L\3L\3L\3L\3M\3M\3M\3M\3M\3M\3N\3N\3N\3N\3N\3N\3N\3N\3O\3O\3O\3O\3"+ + "O\3O\3O\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3S\3S\3"+ + "S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3U\3U\3U\3U\3V\3V\3V\3"+ + "V\3V\3V\3V\3V\3V\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3"+ + "Y\3Z\3Z\3Z\3[\3[\3[\3[\3[\3[\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3]\3]\3]\3^\3"+ + "^\3^\3^\3_\3_\3_\3`\3`\3`\3`\3`\3a\3a\3a\3a\3a\3a\3a\3a\3a\3b\3b\3b\3"+ + "b\3b\3b\3c\3c\3c\3c\3c\3c\3d\3d\3d\3d\3d\3e\3e\3e\3e\3e\3e\3e\3e\3f\3"+ + "f\3f\3f\3f\3f\3g\3g\3g\3g\3g\3g\3h\3h\3h\3h\3h\3h\3h\3i\3i\3i\3i\3i\3"+ + "i\3i\3j\3j\3j\3j\3j\3j\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3k\3l\3l\3l\3l\3"+ + "m\3m\3m\3m\3m\3m\3m\3m\3n\3n\3n\3n\3n\3n\3n\3o\3o\3o\3o\3o\3o\3o\3o\3"+ + "o\3o\3p\3p\3p\3p\3p\3p\3p\3p\3q\3q\3q\3q\3q\3q\3q\3q\3q\3q\3r\3r\3r\3"+ + "r\3r\3r\3r\3s\3s\3s\3s\3s\3s\3t\3t\3t\3t\3u\3u\3u\3u\3u\3u\3u\3v\3v\3"+ + "v\3v\3v\3v\3v\3v\3w\3w\3w\3w\3w\3w\3w\3x\3x\3x\3x\3x\3x\3x\3y\3y\3y\3"+ + "y\3y\3z\3z\3z\3z\3z\3{\3{\3{\3{\3{\3|\3|\3|\3|\3|\3|\3|\3|\3|\3|\3|\3"+ + "|\3}\3}\3}\3}\3}\3}\3}\3}\3}\3}\3~\3~\3~\3~\3~\3~\3~\3~\3\177\3\177\3"+ + "\177\3\177\3\177\3\177\3\177\3\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3"+ + "\u0080\3\u0080\3\u0080\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083\3\u0084"+ + "\3\u0084\7\u0084\u03f3\n\u0084\f\u0084\16\u0084\u03f6\13\u0084\3\u0085"+ + "\3\u0085\7\u0085\u03fa\n\u0085\f\u0085\16\u0085\u03fd\13\u0085\3\u0085"+ + "\3\u0085\3\u0085\7\u0085\u0402\n\u0085\f\u0085\16\u0085\u0405\13\u0085"+ + "\3\u0085\5\u0085\u0408\n\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086"+ + "\3\u0086\7\u0086\u0410\n\u0086\f\u0086\16\u0086\u0413\13\u0086\3\u0086"+ + "\3\u0086\3\u0087\6\u0087\u0418\n\u0087\r\u0087\16\u0087\u0419\3\u0087"+ + "\3\u0087\3\u0088\3\u0088\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u0089"+ + "\3\u0089\3\u0089\7\u0089\u0428\n\u0089\f\u0089\16\u0089\u042b\13\u0089"+ + "\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u008a\3\u008a\3\u008a"+ + "\3\u008a\3\u008a\3\u008a\3\u008a\3\u008a\3\u008a\3\u008a\3\u008a\7\u008a"+ + "\u043e\n\u008a\f\u008a\16\u008a\u0441\13\u008a\3\u008a\3\u008a\3\u008a"+ + "\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c"+ + "\3\u008c\3\u008c\5\u008c\u0451\n\u008c\3\u008d\3\u008d\3\u008d\3\u008d"+ + "\5\u008d\u0457\n\u008d\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\5\u008e"+ + "\u045e\n\u008e\3\u008f\3\u008f\5\u008f\u0462\n\u008f\3\u0090\3\u0090\3"+ + "\u0090\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091\3\u0091\3\u0091\3\u0092"+ + "\3\u0092\3\u0092\6\u0092\u0471\n\u0092\r\u0092\16\u0092\u0472\3\u0092"+ + "\3\u0092\3\u0093\3\u0093\3\u0094\3\u0094\3\u0095\3\u0095\5\u0095\u047d"+ + "\n\u0095\3\u0096\3\u0096\3\u0096\3\u0097\3\u0097\3\u0098\3\u0098\3\u0098"+ + "\7\u0098\u0487\n\u0098\f\u0098\16\u0098\u048a\13\u0098\5\u0098\u048c\n"+ + "\u0098\3\u0099\3\u0099\5\u0099\u0490\n\u0099\3\u0099\6\u0099\u0493\n\u0099"+ + "\r\u0099\16\u0099\u0494\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\5\u009a"+ + "\u049c\n\u009a\3\u009b\3\u009b\3\u009b\3\u009b\5\u009b\u04a2\n\u009b\3"+ + "\u009c\5\u009c\u04a5\n\u009c\3\u009d\5\u009d\u04a8\n\u009d\3\u009e\5\u009e"+ + "\u04ab\n\u009e\3\u009f\5\u009f\u04ae\n\u009f\3\u00a0\3\u00a0\3\u00a0\3"+ + "\u00a0\7\u00a0\u04b4\n\u00a0\f\u00a0\16\u00a0\u04b7\13\u00a0\3\u00a0\5"+ + "\u00a0\u04ba\n\u00a0\3\u00a1\3\u00a1\3\u00a1\3\u00a1\7\u00a1\u04c0\n\u00a1"+ + "\f\u00a1\16\u00a1\u04c3\13\u00a1\3\u00a1\5\u00a1\u04c6\n\u00a1\3\u00a2"+ + "\3\u00a2\5\u00a2\u04ca\n\u00a2\3\u00a3\3\u00a3\3\u00a3\5\u0156\u0429\u043f"+ + "\2\u00a4\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17"+ + "\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\35"+ + "9\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66"+ + "k\67m8o9q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG"+ + "\u008dH\u008fI\u0091J\u0093K\u0095L\u0097M\u0099N\u009bO\u009dP\u009f"+ + "Q\u00a1R\u00a3S\u00a5T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3"+ + "[\u00b5\\\u00b7]\u00b9^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7"+ + "e\u00c9f\u00cbg\u00cdh\u00cfi\u00d1j\u00d3k\u00d5l\u00d7m\u00d9n\u00db"+ + "o\u00ddp\u00dfq\u00e1r\u00e3s\u00e5t\u00e7u\u00e9v\u00ebw\u00edx\u00ef"+ + "y\u00f1z\u00f3{\u00f5|\u00f7}\u00f9~\u00fb\177\u00fd\u0080\u00ff\u0081"+ + "\u0101\u0082\u0103\u0083\u0105\u0084\u0107\u0085\u0109\u0086\u010b\u0087"+ + "\u010d\u0088\u010f\u0089\u0111\u008a\u0113\u008b\u0115\u008c\u0117\2\u0119"+ + "\2\u011b\2\u011d\2\u011f\2\u0121\2\u0123\2\u0125\2\u0127\2\u0129\2\u012b"+ + "\2\u012d\2\u012f\2\u0131\2\u0133\2\u0135\2\u0137\2\u0139\2\u013b\2\u013d"+ + "\2\u013f\2\u0141\2\u0143\2\u0145\2\3\2\34\5\2\f\f\17\17\u202a\u202b\3"+ + "\2\62;\4\2ZZzz\3\2\629\4\2QQqq\4\2DDdd\3\2\62\63\3\2bb\6\2\13\13\r\16"+ + "\"\"\u00a2\u00a2\6\2\f\f\17\17$$^^\6\2\f\f\17\17))^^\13\2$$))^^ddhhpp"+ + "ttvvxx\16\2\f\f\17\17$$))\62;^^ddhhppttvxzz\5\2\62;wwzz\5\2\62;CHch\3"+ + "\2\63;\4\2GGgg\4\2--//\4\2&&aa\u0101\2C\\c|\u00ac\u00ac\u00b7\u00b7\u00bc"+ + "\u00bc\u00c2\u00d8\u00da\u00f8\u00fa\u0221\u0224\u0235\u0252\u02af\u02b2"+ + "\u02ba\u02bd\u02c3\u02d2\u02d3\u02e2\u02e6\u02f0\u02f0\u037c\u037c\u0388"+ + "\u0388\u038a\u038c\u038e\u038e\u0390\u03a3\u03a5\u03d0\u03d2\u03d9\u03dc"+ + "\u03f5\u0402\u0483\u048e\u04c6\u04c9\u04ca\u04cd\u04ce\u04d2\u04f7\u04fa"+ + "\u04fb\u0533\u0558\u055b\u055b\u0563\u0589\u05d2\u05ec\u05f2\u05f4\u0623"+ + "\u063c\u0642\u064c\u0673\u06d5\u06d7\u06d7\u06e7\u06e8\u06fc\u06fe\u0712"+ + "\u0712\u0714\u072e\u0782\u07a7\u0907\u093b\u093f\u093f\u0952\u0952\u095a"+ + "\u0963\u0987\u098e\u0991\u0992\u0995\u09aa\u09ac\u09b2\u09b4\u09b4\u09b8"+ + "\u09bb\u09de\u09df\u09e1\u09e3\u09f2\u09f3\u0a07\u0a0c\u0a11\u0a12\u0a15"+ + "\u0a2a\u0a2c\u0a32\u0a34\u0a35\u0a37\u0a38\u0a3a\u0a3b\u0a5b\u0a5e\u0a60"+ + "\u0a60\u0a74\u0a76\u0a87\u0a8d\u0a8f\u0a8f\u0a91\u0a93\u0a95\u0aaa\u0aac"+ + "\u0ab2\u0ab4\u0ab5\u0ab7\u0abb\u0abf\u0abf\u0ad2\u0ad2\u0ae2\u0ae2\u0b07"+ + "\u0b0e\u0b11\u0b12\u0b15\u0b2a\u0b2c\u0b32\u0b34\u0b35\u0b38\u0b3b\u0b3f"+ + "\u0b3f\u0b5e\u0b5f\u0b61\u0b63\u0b87\u0b8c\u0b90\u0b92\u0b94\u0b97\u0b9b"+ + "\u0b9c\u0b9e\u0b9e\u0ba0\u0ba1\u0ba5\u0ba6\u0baa\u0bac\u0bb0\u0bb7\u0bb9"+ + "\u0bbb\u0c07\u0c0e\u0c10\u0c12\u0c14\u0c2a\u0c2c\u0c35\u0c37\u0c3b\u0c62"+ + "\u0c63\u0c87\u0c8e\u0c90\u0c92\u0c94\u0caa\u0cac\u0cb5\u0cb7\u0cbb\u0ce0"+ + "\u0ce0\u0ce2\u0ce3\u0d07\u0d0e\u0d10\u0d12\u0d14\u0d2a\u0d2c\u0d3b\u0d62"+ + "\u0d63\u0d87\u0d98\u0d9c\u0db3\u0db5\u0dbd\u0dbf\u0dbf\u0dc2\u0dc8\u0e03"+ + "\u0e32\u0e34\u0e35\u0e42\u0e48\u0e83\u0e84\u0e86\u0e86\u0e89\u0e8a\u0e8c"+ + "\u0e8c\u0e8f\u0e8f\u0e96\u0e99\u0e9b\u0ea1\u0ea3\u0ea5\u0ea7\u0ea7\u0ea9"+ + "\u0ea9\u0eac\u0ead\u0eaf\u0eb2\u0eb4\u0eb5\u0ebf\u0ec6\u0ec8\u0ec8\u0ede"+ + "\u0edf\u0f02\u0f02\u0f42\u0f6c\u0f8a\u0f8d\u1002\u1023\u1025\u1029\u102b"+ + "\u102c\u1052\u1057\u10a2\u10c7\u10d2\u10f8\u1102\u115b\u1161\u11a4\u11aa"+ + "\u11fb\u1202\u1208\u120a\u1248\u124a\u124a\u124c\u124f\u1252\u1258\u125a"+ + "\u125a\u125c\u125f\u1262\u1288\u128a\u128a\u128c\u128f\u1292\u12b0\u12b2"+ + "\u12b2\u12b4\u12b7\u12ba\u12c0\u12c2\u12c2\u12c4\u12c7\u12ca\u12d0\u12d2"+ + "\u12d8\u12da\u12f0\u12f2\u1310\u1312\u1312\u1314\u1317\u131a\u1320\u1322"+ + "\u1348\u134a\u135c\u13a2\u13f6\u1403\u1678\u1683\u169c\u16a2\u16ec\u1782"+ + "\u17b5\u1822\u1879\u1882\u18aa\u1e02\u1e9d\u1ea2\u1efb\u1f02\u1f17\u1f1a"+ + "\u1f1f\u1f22\u1f47\u1f4a\u1f4f\u1f52\u1f59\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f"+ + "\u1f5f\u1f61\u1f7f\u1f82\u1fb6\u1fb8\u1fbe\u1fc0\u1fc0\u1fc4\u1fc6\u1fc8"+ + "\u1fce\u1fd2\u1fd5\u1fd8\u1fdd\u1fe2\u1fee\u1ff4\u1ff6\u1ff8\u1ffe\u2081"+ + "\u2081\u2104\u2104\u2109\u2109\u210c\u2115\u2117\u2117\u211b\u211f\u2126"+ + "\u2126\u2128\u2128\u212a\u212a\u212c\u212f\u2131\u2133\u2135\u213b\u2162"+ + "\u2185\u3007\u3009\u3023\u302b\u3033\u3037\u303a\u303c\u3043\u3096\u309f"+ + "\u30a0\u30a3\u30fc\u30fe\u3100\u3107\u312e\u3133\u3190\u31a2\u31b9\u3402"+ + "\u4dc1\u4e02\ua48e\uac02\uac02\ud7a5\ud7a5\uf902\ufa2f\ufb02\ufb08\ufb15"+ + "\ufb19\ufb1f\ufb1f\ufb21\ufb2a\ufb2c\ufb38\ufb3a\ufb3e\ufb40\ufb40\ufb42"+ + "\ufb43\ufb45\ufb46\ufb48\ufbb3\ufbd5\ufd3f\ufd52\ufd91\ufd94\ufdc9\ufdf2"+ + "\ufdfd\ufe72\ufe74\ufe76\ufe76\ufe78\ufefe\uff23\uff3c\uff43\uff5c\uff68"+ + "\uffc0\uffc4\uffc9\uffcc\uffd1\uffd4\uffd9\uffdc\uffdef\2\u0302\u0350"+ + "\u0362\u0364\u0485\u0488\u0593\u05a3\u05a5\u05bb\u05bd\u05bf\u05c1\u05c1"+ + "\u05c3\u05c4\u05c6\u05c6\u064d\u0657\u0672\u0672\u06d8\u06de\u06e1\u06e6"+ + "\u06e9\u06ea\u06ec\u06ef\u0713\u0713\u0732\u074c\u07a8\u07b2\u0903\u0905"+ + "\u093e\u093e\u0940\u094f\u0953\u0956\u0964\u0965\u0983\u0985\u09be\u09c6"+ + "\u09c9\u09ca\u09cd\u09cf\u09d9\u09d9\u09e4\u09e5\u0a04\u0a04\u0a3e\u0a3e"+ + "\u0a40\u0a44\u0a49\u0a4a\u0a4d\u0a4f\u0a72\u0a73\u0a83\u0a85\u0abe\u0abe"+ + "\u0ac0\u0ac7\u0ac9\u0acb\u0acd\u0acf\u0b03\u0b05\u0b3e\u0b3e\u0b40\u0b45"+ + "\u0b49\u0b4a\u0b4d\u0b4f\u0b58\u0b59\u0b84\u0b85\u0bc0\u0bc4\u0bc8\u0bca"+ + "\u0bcc\u0bcf\u0bd9\u0bd9\u0c03\u0c05\u0c40\u0c46\u0c48\u0c4a\u0c4c\u0c4f"+ + "\u0c57\u0c58\u0c84\u0c85\u0cc0\u0cc6\u0cc8\u0cca\u0ccc\u0ccf\u0cd7\u0cd8"+ + "\u0d04\u0d05\u0d40\u0d45\u0d48\u0d4a\u0d4c\u0d4f\u0d59\u0d59\u0d84\u0d85"+ + "\u0dcc\u0dcc\u0dd1\u0dd6\u0dd8\u0dd8\u0dda\u0de1\u0df4\u0df5\u0e33\u0e33"+ + "\u0e36\u0e3c\u0e49\u0e50\u0eb3\u0eb3\u0eb6\u0ebb\u0ebd\u0ebe\u0eca\u0ecf"+ + "\u0f1a\u0f1b\u0f37\u0f37\u0f39\u0f39\u0f3b\u0f3b\u0f40\u0f41\u0f73\u0f86"+ + "\u0f88\u0f89\u0f92\u0f99\u0f9b\u0fbe\u0fc8\u0fc8\u102e\u1034\u1038\u103b"+ + "\u1058\u105b\u17b6\u17d5\u18ab\u18ab\u20d2\u20de\u20e3\u20e3\u302c\u3031"+ + "\u309b\u309c\ufb20\ufb20\ufe22\ufe25\26\2\62;\u0662\u066b\u06f2\u06fb"+ + "\u0968\u0971\u09e8\u09f1\u0a68\u0a71\u0ae8\u0af1\u0b68\u0b71\u0be9\u0bf1"+ + "\u0c68\u0c71\u0ce8\u0cf1\u0d68\u0d71\u0e52\u0e5b\u0ed2\u0edb\u0f22\u0f2b"+ + "\u1042\u104b\u136b\u1373\u17e2\u17eb\u1812\u181b\uff12\uff1b\t\2aa\u2041"+ + "\u2042\u30fd\u30fd\ufe35\ufe36\ufe4f\ufe51\uff41\uff41\uff67\uff67\b\2"+ + "\f\f\17\17,,\61\61]^\u202a\u202b\7\2\f\f\17\17\61\61]^\u202a\u202b\6\2"+ + "\f\f\17\17^_\u202a\u202b\2\u04eb\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2"+ + "\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2"+ + "\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2"+ + "\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2"+ + "\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2"+ + "\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2"+ + "\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O"+ + "\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2"+ + "\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2"+ + "\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u"+ + "\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081"+ + "\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2"+ + "\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093"+ + "\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2"+ + "\2\2\u009d\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5"+ + "\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2"+ + "\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7"+ + "\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2"+ + "\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9"+ + "\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2"+ + "\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db"+ + "\3\2\2\2\2\u00dd\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2"+ + "\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2\2\2\u00ed"+ + "\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2"+ + "\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2\2\2\u00fd\3\2\2\2\2\u00ff"+ + "\3\2\2\2\2\u0101\3\2\2\2\2\u0103\3\2\2\2\2\u0105\3\2\2\2\2\u0107\3\2\2"+ + "\2\2\u0109\3\2\2\2\2\u010b\3\2\2\2\2\u010d\3\2\2\2\2\u010f\3\2\2\2\2\u0111"+ + "\3\2\2\2\2\u0113\3\2\2\2\2\u0115\3\2\2\2\3\u0147\3\2\2\2\5\u0150\3\2\2"+ + "\2\7\u015e\3\2\2\2\t\u0169\3\2\2\2\13\u0179\3\2\2\2\r\u017b\3\2\2\2\17"+ + "\u017d\3\2\2\2\21\u017f\3\2\2\2\23\u0181\3\2\2\2\25\u0184\3\2\2\2\27\u0187"+ + "\3\2\2\2\31\u0189\3\2\2\2\33\u018b\3\2\2\2\35\u018d\3\2\2\2\37\u018f\3"+ + "\2\2\2!\u0191\3\2\2\2#\u0195\3\2\2\2%\u0197\3\2\2\2\'\u019a\3\2\2\2)\u019d"+ + "\3\2\2\2+\u019f\3\2\2\2-\u01a1\3\2\2\2/\u01a3\3\2\2\2\61\u01a5\3\2\2\2"+ + "\63\u01a7\3\2\2\2\65\u01a9\3\2\2\2\67\u01ab\3\2\2\29\u01ad\3\2\2\2;\u01af"+ + "\3\2\2\2=\u01b2\3\2\2\2?\u01b5\3\2\2\2A\u01b7\3\2\2\2C\u01ba\3\2\2\2E"+ + "\u01bd\3\2\2\2G\u01c1\3\2\2\2I\u01c3\3\2\2\2K\u01c5\3\2\2\2M\u01c8\3\2"+ + "\2\2O\u01cb\3\2\2\2Q\u01ce\3\2\2\2S\u01d1\3\2\2\2U\u01d5\3\2\2\2W\u01d9"+ + "\3\2\2\2Y\u01db\3\2\2\2[\u01dd\3\2\2\2]\u01df\3\2\2\2_\u01e2\3\2\2\2a"+ + "\u01e5\3\2\2\2c\u01e8\3\2\2\2e\u01eb\3\2\2\2g\u01ee\3\2\2\2i\u01f1\3\2"+ + "\2\2k\u01f4\3\2\2\2m\u01f8\3\2\2\2o\u01fc\3\2\2\2q\u0201\3\2\2\2s\u0204"+ + "\3\2\2\2u\u0207\3\2\2\2w\u020a\3\2\2\2y\u020d\3\2\2\2{\u0211\3\2\2\2}"+ + "\u021f\3\2\2\2\177\u0239\3\2\2\2\u0081\u023b\3\2\2\2\u0083\u0242\3\2\2"+ + "\2\u0085\u024a\3\2\2\2\u0087\u0251\3\2\2\2\u0089\u0258\3\2\2\2\u008b\u025e"+ + "\3\2\2\2\u008d\u0261\3\2\2\2\u008f\u026c\3\2\2\2\u0091\u0273\3\2\2\2\u0093"+ + "\u0278\3\2\2\2\u0095\u027d\3\2\2\2\u0097\u0281\3\2\2\2\u0099\u0285\3\2"+ + "\2\2\u009b\u028b\3\2\2\2\u009d\u0293\3\2\2\2\u009f\u029a\3\2\2\2\u00a1"+ + "\u029f\3\2\2\2\u00a3\u02a8\3\2\2\2\u00a5\u02ac\3\2\2\2\u00a7\u02b3\3\2"+ + "\2\2\u00a9\u02b9\3\2\2\2\u00ab\u02c2\3\2\2\2\u00ad\u02cb\3\2\2\2\u00af"+ + "\u02d0\3\2\2\2\u00b1\u02d5\3\2\2\2\u00b3\u02dd\3\2\2\2\u00b5\u02e0\3\2"+ + "\2\2\u00b7\u02e6\3\2\2\2\u00b9\u02ed\3\2\2\2\u00bb\u02f0\3\2\2\2\u00bd"+ + "\u02f4\3\2\2\2\u00bf\u02f7\3\2\2\2\u00c1\u02fc\3\2\2\2\u00c3\u0305\3\2"+ + "\2\2\u00c5\u030b\3\2\2\2\u00c7\u0311\3\2\2\2\u00c9\u0316\3\2\2\2\u00cb"+ + "\u031e\3\2\2\2\u00cd\u0324\3\2\2\2\u00cf\u032a\3\2\2\2\u00d1\u0331\3\2"+ + "\2\2\u00d3\u0338\3\2\2\2\u00d5\u033e\3\2\2\2\u00d7\u0349\3\2\2\2\u00d9"+ + "\u034d\3\2\2\2\u00db\u0355\3\2\2\2\u00dd\u035c\3\2\2\2\u00df\u0366\3\2"+ + "\2\2\u00e1\u036e\3\2\2\2\u00e3\u0378\3\2\2\2\u00e5\u037f\3\2\2\2\u00e7"+ + "\u0385\3\2\2\2\u00e9\u0389\3\2\2\2\u00eb\u0390\3\2\2\2\u00ed\u0398\3\2"+ + "\2\2\u00ef\u039f\3\2\2\2\u00f1\u03a6\3\2\2\2\u00f3\u03ab\3\2\2\2\u00f5"+ + "\u03b0\3\2\2\2\u00f7\u03b5\3\2\2\2\u00f9\u03c1\3\2\2\2\u00fb\u03cb\3\2"+ + "\2\2\u00fd\u03d3\3\2\2\2\u00ff\u03da\3\2\2\2\u0101\u03e2\3\2\2\2\u0103"+ + "\u03eb\3\2\2\2\u0105\u03ee\3\2\2\2\u0107\u03f0\3\2\2\2\u0109\u0407\3\2"+ + "\2\2\u010b\u040b\3\2\2\2\u010d\u0417\3\2\2\2\u010f\u041d\3\2\2\2\u0111"+ + "\u0421\3\2\2\2\u0113\u0432\3\2\2\2\u0115\u0448\3\2\2\2\u0117\u0450\3\2"+ + "\2\2\u0119\u0456\3\2\2\2\u011b\u045d\3\2\2\2\u011d\u0461\3\2\2\2\u011f"+ + "\u0463\3\2\2\2\u0121\u0467\3\2\2\2\u0123\u046d\3\2\2\2\u0125\u0476\3\2"+ + "\2\2\u0127\u0478\3\2\2\2\u0129\u047c\3\2\2\2\u012b\u047e\3\2\2\2\u012d"+ + "\u0481\3\2\2\2\u012f\u048b\3\2\2\2\u0131\u048d\3\2\2\2\u0133\u049b\3\2"+ + "\2\2\u0135\u04a1\3\2\2\2\u0137\u04a4\3\2\2\2\u0139\u04a7\3\2\2\2\u013b"+ + "\u04aa\3\2\2\2\u013d\u04ad\3\2\2\2\u013f\u04b9\3\2\2\2\u0141\u04c5\3\2"+ + "\2\2\u0143\u04c9\3\2\2\2\u0145\u04cb\3\2\2\2\u0147\u0148\7%\2\2\u0148"+ + "\u0149\7#\2\2\u0149\u014d\3\2\2\2\u014a\u014c\n\2\2\2\u014b\u014a\3\2"+ + "\2\2\u014c\u014f\3\2\2\2\u014d\u014b\3\2\2\2\u014d\u014e\3\2\2\2\u014e"+ + "\4\3\2\2\2\u014f\u014d\3\2\2\2\u0150\u0151\7\61\2\2\u0151\u0152\7,\2\2"+ + "\u0152\u0156\3\2\2\2\u0153\u0155\13\2\2\2\u0154\u0153\3\2\2\2\u0155\u0158"+ + "\3\2\2\2\u0156\u0157\3\2\2\2\u0156\u0154\3\2\2\2\u0157\u0159\3\2\2\2\u0158"+ + "\u0156\3\2\2\2\u0159\u015a\7,\2\2\u015a\u015b\7\61\2\2\u015b\u015c\3\2"+ + "\2\2\u015c\u015d\b\3\2\2\u015d\6\3\2\2\2\u015e\u015f\7\61\2\2\u015f\u0160"+ + "\7\61\2\2\u0160\u0164\3\2\2\2\u0161\u0163\n\2\2\2\u0162\u0161\3\2\2\2"+ + "\u0163\u0166\3\2\2\2\u0164\u0162\3\2\2\2\u0164\u0165\3\2\2\2\u0165\u0167"+ + "\3\2\2\2\u0166\u0164\3\2\2\2\u0167\u0168\b\4\2\2\u0168\b\3\2\2\2\u0169"+ + "\u016a\7\61\2\2\u016a\u016e\5\u013f\u00a0\2\u016b\u016d\5\u0141\u00a1"+ + "\2\u016c\u016b\3\2\2\2\u016d\u0170\3\2\2\2\u016e\u016c\3\2\2\2\u016e\u016f"+ + "\3\2\2\2\u016f\u0171\3\2\2\2\u0170\u016e\3\2\2\2\u0171\u0172\6\5\2\2\u0172"+ + "\u0176\7\61\2\2\u0173\u0175\5\u0133\u009a\2\u0174\u0173\3\2\2\2\u0175"+ + "\u0178\3\2\2\2\u0176\u0174\3\2\2\2\u0176\u0177\3\2\2\2\u0177\n\3\2\2\2"+ + "\u0178\u0176\3\2\2\2\u0179\u017a\7]\2\2\u017a\f\3\2\2\2\u017b\u017c\7"+ + "_\2\2\u017c\16\3\2\2\2\u017d\u017e\7*\2\2\u017e\20\3\2\2\2\u017f\u0180"+ + "\7+\2\2\u0180\22\3\2\2\2\u0181\u0182\7}\2\2\u0182\u0183\b\n\3\2\u0183"+ + "\24\3\2\2\2\u0184\u0185\7\177\2\2\u0185\u0186\b\13\4\2\u0186\26\3\2\2"+ + "\2\u0187\u0188\7=\2\2\u0188\30\3\2\2\2\u0189\u018a\7.\2\2\u018a\32\3\2"+ + "\2\2\u018b\u018c\7?\2\2\u018c\34\3\2\2\2\u018d\u018e\7A\2\2\u018e\36\3"+ + "\2\2\2\u018f\u0190\7<\2\2\u0190 \3\2\2\2\u0191\u0192\7\60\2\2\u0192\u0193"+ + "\7\60\2\2\u0193\u0194\7\60\2\2\u0194\"\3\2\2\2\u0195\u0196\7\60\2\2\u0196"+ + "$\3\2\2\2\u0197\u0198\7-\2\2\u0198\u0199\7-\2\2\u0199&\3\2\2\2\u019a\u019b"+ + "\7/\2\2\u019b\u019c\7/\2\2\u019c(\3\2\2\2\u019d\u019e\7-\2\2\u019e*\3"+ + "\2\2\2\u019f\u01a0\7/\2\2\u01a0,\3\2\2\2\u01a1\u01a2\7\u0080\2\2\u01a2"+ + ".\3\2\2\2\u01a3\u01a4\7#\2\2\u01a4\60\3\2\2\2\u01a5\u01a6\7,\2\2\u01a6"+ + "\62\3\2\2\2\u01a7\u01a8\7a\2\2\u01a8\64\3\2\2\2\u01a9\u01aa\7&\2\2\u01aa"+ + "\66\3\2\2\2\u01ab\u01ac\7\61\2\2\u01ac8\3\2\2\2\u01ad\u01ae\7\'\2\2\u01ae"+ + ":\3\2\2\2\u01af\u01b0\7,\2\2\u01b0\u01b1\7,\2\2\u01b1<\3\2\2\2\u01b2\u01b3"+ + "\7A\2\2\u01b3\u01b4\7A\2\2\u01b4>\3\2\2\2\u01b5\u01b6\7%\2\2\u01b6@\3"+ + "\2\2\2\u01b7\u01b8\7@\2\2\u01b8\u01b9\7@\2\2\u01b9B\3\2\2\2\u01ba\u01bb"+ + "\7>\2\2\u01bb\u01bc\7>\2\2\u01bcD\3\2\2\2\u01bd\u01be\7@\2\2\u01be\u01bf"+ + "\7@\2\2\u01bf\u01c0\7@\2\2\u01c0F\3\2\2\2\u01c1\u01c2\7>\2\2\u01c2H\3"+ + "\2\2\2\u01c3\u01c4\7@\2\2\u01c4J\3\2\2\2\u01c5\u01c6\7>\2\2\u01c6\u01c7"+ + "\7?\2\2\u01c7L\3\2\2\2\u01c8\u01c9\7@\2\2\u01c9\u01ca\7?\2\2\u01caN\3"+ + "\2\2\2\u01cb\u01cc\7?\2\2\u01cc\u01cd\7?\2\2\u01cdP\3\2\2\2\u01ce\u01cf"+ + "\7#\2\2\u01cf\u01d0\7?\2\2\u01d0R\3\2\2\2\u01d1\u01d2\7?\2\2\u01d2\u01d3"+ + "\7?\2\2\u01d3\u01d4\7?\2\2\u01d4T\3\2\2\2\u01d5\u01d6\7#\2\2\u01d6\u01d7"+ + "\7?\2\2\u01d7\u01d8\7?\2\2\u01d8V\3\2\2\2\u01d9\u01da\7(\2\2\u01daX\3"+ + "\2\2\2\u01db\u01dc\7`\2\2\u01dcZ\3\2\2\2\u01dd\u01de\7~\2\2\u01de\\\3"+ + "\2\2\2\u01df\u01e0\7(\2\2\u01e0\u01e1\7(\2\2\u01e1^\3\2\2\2\u01e2\u01e3"+ + "\7~\2\2\u01e3\u01e4\7~\2\2\u01e4`\3\2\2\2\u01e5\u01e6\7,\2\2\u01e6\u01e7"+ + "\7?\2\2\u01e7b\3\2\2\2\u01e8\u01e9\7\61\2\2\u01e9\u01ea\7?\2\2\u01ead"+ + "\3\2\2\2\u01eb\u01ec\7\'\2\2\u01ec\u01ed\7?\2\2\u01edf\3\2\2\2\u01ee\u01ef"+ + "\7-\2\2\u01ef\u01f0\7?\2\2\u01f0h\3\2\2\2\u01f1\u01f2\7/\2\2\u01f2\u01f3"+ + "\7?\2\2\u01f3j\3\2\2\2\u01f4\u01f5\7>\2\2\u01f5\u01f6\7>\2\2\u01f6\u01f7"+ + "\7?\2\2\u01f7l\3\2\2\2\u01f8\u01f9\7@\2\2\u01f9\u01fa\7@\2\2\u01fa\u01fb"+ + "\7?\2\2\u01fbn\3\2\2\2\u01fc\u01fd\7@\2\2\u01fd\u01fe\7@\2\2\u01fe\u01ff"+ + "\7@\2\2\u01ff\u0200\7?\2\2\u0200p\3\2\2\2\u0201\u0202\7(\2\2\u0202\u0203"+ + "\7?\2\2\u0203r\3\2\2\2\u0204\u0205\7`\2\2\u0205\u0206\7?\2\2\u0206t\3"+ + "\2\2\2\u0207\u0208\7~\2\2\u0208\u0209\7?\2\2\u0209v\3\2\2\2\u020a\u020b"+ + "\7?\2\2\u020b\u020c\7@\2\2\u020cx\3\2\2\2\u020d\u020e\7,\2\2\u020e\u020f"+ + "\7,\2\2\u020f\u0210\7?\2\2\u0210z\3\2\2\2\u0211\u0212\7p\2\2\u0212\u0213"+ + "\7w\2\2\u0213\u0214\7n\2\2\u0214\u0215\7n\2\2\u0215|\3\2\2\2\u0216\u0217"+ + "\7v\2\2\u0217\u0218\7t\2\2\u0218\u0219\7w\2\2\u0219\u0220\7g\2\2\u021a"+ + "\u021b\7h\2\2\u021b\u021c\7c\2\2\u021c\u021d\7n\2\2\u021d\u021e\7u\2\2"+ + "\u021e\u0220\7g\2\2\u021f\u0216\3\2\2\2\u021f\u021a\3\2\2\2\u0220~\3\2"+ + "\2\2\u0221\u0222\5\u012f\u0098\2\u0222\u0226\7\60\2\2\u0223\u0225\t\3"+ + "\2\2\u0224\u0223\3\2\2\2\u0225\u0228\3\2\2\2\u0226\u0224\3\2\2\2\u0226"+ + "\u0227\3\2\2\2\u0227\u022a\3\2\2\2\u0228\u0226\3\2\2\2\u0229\u022b\5\u0131"+ + "\u0099\2\u022a\u0229\3\2\2\2\u022a\u022b\3\2\2\2\u022b\u023a\3\2\2\2\u022c"+ + "\u022e\7\60\2\2\u022d\u022f\t\3\2\2\u022e\u022d\3\2\2\2\u022f\u0230\3"+ + "\2\2\2\u0230\u022e\3\2\2\2\u0230\u0231\3\2\2\2\u0231\u0233\3\2\2\2\u0232"+ + "\u0234\5\u0131\u0099\2\u0233\u0232\3\2\2\2\u0233\u0234\3\2\2\2\u0234\u023a"+ + "\3\2\2\2\u0235\u0237\5\u012f\u0098\2\u0236\u0238\5\u0131\u0099\2\u0237"+ + "\u0236\3\2\2\2\u0237\u0238\3\2\2\2\u0238\u023a\3\2\2\2\u0239\u0221\3\2"+ + "\2\2\u0239\u022c\3\2\2\2\u0239\u0235\3\2\2\2\u023a\u0080\3\2\2\2\u023b"+ + "\u023c\7\62\2\2\u023c\u023e\t\4\2\2\u023d\u023f\5\u012d\u0097\2\u023e"+ + "\u023d\3\2\2\2\u023f\u0240\3\2\2\2\u0240\u023e\3\2\2\2\u0240\u0241\3\2"+ + "\2\2\u0241\u0082\3\2\2\2\u0242\u0244\7\62\2\2\u0243\u0245\t\5\2\2\u0244"+ + "\u0243\3\2\2\2\u0245\u0246\3\2\2\2\u0246\u0244\3\2\2\2\u0246\u0247\3\2"+ + "\2\2\u0247\u0248\3\2\2\2\u0248\u0249\6B\3\2\u0249\u0084\3\2\2\2\u024a"+ + "\u024b\7\62\2\2\u024b\u024d\t\6\2\2\u024c\u024e\t\5\2\2\u024d\u024c\3"+ + "\2\2\2\u024e\u024f\3\2\2\2\u024f\u024d\3\2\2\2\u024f\u0250\3\2\2\2\u0250"+ + "\u0086\3\2\2\2\u0251\u0252\7\62\2\2\u0252\u0254\t\7\2\2\u0253\u0255\t"+ + "\b\2\2\u0254\u0253\3\2\2\2\u0255\u0256\3\2\2\2\u0256\u0254\3\2\2\2\u0256"+ + "\u0257\3\2\2\2\u0257\u0088\3\2\2\2\u0258\u0259\7d\2\2\u0259\u025a\7t\2"+ + "\2\u025a\u025b\7g\2\2\u025b\u025c\7c\2\2\u025c\u025d\7m\2\2\u025d\u008a"+ + "\3\2\2\2\u025e\u025f\7f\2\2\u025f\u0260\7q\2\2\u0260\u008c\3\2\2\2\u0261"+ + "\u0262\7k\2\2\u0262\u0263\7p\2\2\u0263\u0264\7u\2\2\u0264\u0265\7v\2\2"+ + "\u0265\u0266\7c\2\2\u0266\u0267\7p\2\2\u0267\u0268\7e\2\2\u0268\u0269"+ + "\7g\2\2\u0269\u026a\7q\2\2\u026a\u026b\7h\2\2\u026b\u008e\3\2\2\2\u026c"+ + "\u026d\7v\2\2\u026d\u026e\7{\2\2\u026e\u026f\7r\2\2\u026f\u0270\7g\2\2"+ + "\u0270\u0271\7q\2\2\u0271\u0272\7h\2\2\u0272\u0090\3\2\2\2\u0273\u0274"+ + "\7e\2\2\u0274\u0275\7c\2\2\u0275\u0276\7u\2\2\u0276\u0277\7g\2\2\u0277"+ + "\u0092\3\2\2\2\u0278\u0279\7g\2\2\u0279\u027a\7n\2\2\u027a\u027b\7u\2"+ + "\2\u027b\u027c\7g\2\2\u027c\u0094\3\2\2\2\u027d\u027e\7p\2\2\u027e\u027f"+ + "\7g\2\2\u027f\u0280\7y\2\2\u0280\u0096\3\2\2\2\u0281\u0282\7x\2\2\u0282"+ + "\u0283\7c\2\2\u0283\u0284\7t\2\2\u0284\u0098\3\2\2\2\u0285\u0286\7e\2"+ + "\2\u0286\u0287\7c\2\2\u0287\u0288\7v\2\2\u0288\u0289\7e\2\2\u0289\u028a"+ + "\7j\2\2\u028a\u009a\3\2\2\2\u028b\u028c\7h\2\2\u028c\u028d\7k\2\2\u028d"+ + "\u028e\7p\2\2\u028e\u028f\7c\2\2\u028f\u0290\7n\2\2\u0290\u0291\7n\2\2"+ + "\u0291\u0292\7{\2\2\u0292\u009c\3\2\2\2\u0293\u0294\7t\2\2\u0294\u0295"+ + "\7g\2\2\u0295\u0296\7v\2\2\u0296\u0297\7w\2\2\u0297\u0298\7t\2\2\u0298"+ + "\u0299\7p\2\2\u0299\u009e\3\2\2\2\u029a\u029b\7x\2\2\u029b\u029c\7q\2"+ + "\2\u029c\u029d\7k\2\2\u029d\u029e\7f\2\2\u029e\u00a0\3\2\2\2\u029f\u02a0"+ + "\7e\2\2\u02a0\u02a1\7q\2\2\u02a1\u02a2\7p\2\2\u02a2\u02a3\7v\2\2\u02a3"+ + "\u02a4\7k\2\2\u02a4\u02a5\7p\2\2\u02a5\u02a6\7w\2\2\u02a6\u02a7\7g\2\2"+ + "\u02a7\u00a2\3\2\2\2\u02a8\u02a9\7h\2\2\u02a9\u02aa\7q\2\2\u02aa\u02ab"+ + "\7t\2\2\u02ab\u00a4\3\2\2\2\u02ac\u02ad\7u\2\2\u02ad\u02ae\7y\2\2\u02ae"+ + "\u02af\7k\2\2\u02af\u02b0\7v\2\2\u02b0\u02b1\7e\2\2\u02b1\u02b2\7j\2\2"+ + "\u02b2\u00a6\3\2\2\2\u02b3\u02b4\7y\2\2\u02b4\u02b5\7j\2\2\u02b5\u02b6"+ + "\7k\2\2\u02b6\u02b7\7n\2\2\u02b7\u02b8\7g\2\2\u02b8\u00a8\3\2\2\2\u02b9"+ + "\u02ba\7f\2\2\u02ba\u02bb\7g\2\2\u02bb\u02bc\7d\2\2\u02bc\u02bd\7w\2\2"+ + "\u02bd\u02be\7i\2\2\u02be\u02bf\7i\2\2\u02bf\u02c0\7g\2\2\u02c0\u02c1"+ + "\7t\2\2\u02c1\u00aa\3\2\2\2\u02c2\u02c3\7h\2\2\u02c3\u02c4\7w\2\2\u02c4"+ + "\u02c5\7p\2\2\u02c5\u02c6\7e\2\2\u02c6\u02c7\7v\2\2\u02c7\u02c8\7k\2\2"+ + "\u02c8\u02c9\7q\2\2\u02c9\u02ca\7p\2\2\u02ca\u00ac\3\2\2\2\u02cb\u02cc"+ + "\7v\2\2\u02cc\u02cd\7j\2\2\u02cd\u02ce\7k\2\2\u02ce\u02cf\7u\2\2\u02cf"+ + "\u00ae\3\2\2\2\u02d0\u02d1\7y\2\2\u02d1\u02d2\7k\2\2\u02d2\u02d3\7v\2"+ + "\2\u02d3\u02d4\7j\2\2\u02d4\u00b0\3\2\2\2\u02d5\u02d6\7f\2\2\u02d6\u02d7"+ + "\7g\2\2\u02d7\u02d8\7h\2\2\u02d8\u02d9\7c\2\2\u02d9\u02da\7w\2\2\u02da"+ + "\u02db\7n\2\2\u02db\u02dc\7v\2\2\u02dc\u00b2\3\2\2\2\u02dd\u02de\7k\2"+ + "\2\u02de\u02df\7h\2\2\u02df\u00b4\3\2\2\2\u02e0\u02e1\7v\2\2\u02e1\u02e2"+ + "\7j\2\2\u02e2\u02e3\7t\2\2\u02e3\u02e4\7q\2\2\u02e4\u02e5\7y\2\2\u02e5"+ + "\u00b6\3\2\2\2\u02e6\u02e7\7f\2\2\u02e7\u02e8\7g\2\2\u02e8\u02e9\7n\2"+ + "\2\u02e9\u02ea\7g\2\2\u02ea\u02eb\7v\2\2\u02eb\u02ec\7g\2\2\u02ec\u00b8"+ + "\3\2\2\2\u02ed\u02ee\7k\2\2\u02ee\u02ef\7p\2\2\u02ef\u00ba\3\2\2\2\u02f0"+ + "\u02f1\7v\2\2\u02f1\u02f2\7t\2\2\u02f2\u02f3\7{\2\2\u02f3\u00bc\3\2\2"+ + "\2\u02f4\u02f5\7c\2\2\u02f5\u02f6\7u\2\2\u02f6\u00be\3\2\2\2\u02f7\u02f8"+ + "\7h\2\2\u02f8\u02f9\7t\2\2\u02f9\u02fa\7q\2\2\u02fa\u02fb\7o\2\2\u02fb"+ + "\u00c0\3\2\2\2\u02fc\u02fd\7t\2\2\u02fd\u02fe\7g\2\2\u02fe\u02ff\7c\2"+ + "\2\u02ff\u0300\7f\2\2\u0300\u0301\7q\2\2\u0301\u0302\7p\2\2\u0302\u0303"+ + "\7n\2\2\u0303\u0304\7{\2\2\u0304\u00c2\3\2\2\2\u0305\u0306\7c\2\2\u0306"+ + "\u0307\7u\2\2\u0307\u0308\7{\2\2\u0308\u0309\7p\2\2\u0309\u030a\7e\2\2"+ + "\u030a\u00c4\3\2\2\2\u030b\u030c\7e\2\2\u030c\u030d\7n\2\2\u030d\u030e"+ + "\7c\2\2\u030e\u030f\7u\2\2\u030f\u0310\7u\2\2\u0310\u00c6\3\2\2\2\u0311"+ + "\u0312\7g\2\2\u0312\u0313\7p\2\2\u0313\u0314\7w\2\2\u0314\u0315\7o\2\2"+ + "\u0315\u00c8\3\2\2\2\u0316\u0317\7g\2\2\u0317\u0318\7z\2\2\u0318\u0319"+ + "\7v\2\2\u0319\u031a\7g\2\2\u031a\u031b\7p\2\2\u031b\u031c\7f\2\2\u031c"+ + "\u031d\7u\2\2\u031d\u00ca\3\2\2\2\u031e\u031f\7u\2\2\u031f\u0320\7w\2"+ + "\2\u0320\u0321\7r\2\2\u0321\u0322\7g\2\2\u0322\u0323\7t\2\2\u0323\u00cc"+ + "\3\2\2\2\u0324\u0325\7e\2\2\u0325\u0326\7q\2\2\u0326\u0327\7p\2\2\u0327"+ + "\u0328\7u\2\2\u0328\u0329\7v\2\2\u0329\u00ce\3\2\2\2\u032a\u032b\7g\2"+ + "\2\u032b\u032c\7z\2\2\u032c\u032d\7r\2\2\u032d\u032e\7q\2\2\u032e\u032f"+ + "\7t\2\2\u032f\u0330\7v\2\2\u0330\u00d0\3\2\2\2\u0331\u0332\7k\2\2\u0332"+ + "\u0333\7o\2\2\u0333\u0334\7r\2\2\u0334\u0335\7q\2\2\u0335\u0336\7t\2\2"+ + "\u0336\u0337\7v\2\2\u0337\u00d2\3\2\2\2\u0338\u0339\7c\2\2\u0339\u033a"+ + "\7y\2\2\u033a\u033b\7c\2\2\u033b\u033c\7k\2\2\u033c\u033d\7v\2\2\u033d"+ + "\u00d4\3\2\2\2\u033e\u033f\7k\2\2\u033f\u0340\7o\2\2\u0340\u0341\7r\2"+ + "\2\u0341\u0342\7n\2\2\u0342\u0343\7g\2\2\u0343\u0344\7o\2\2\u0344\u0345"+ + "\7g\2\2\u0345\u0346\7p\2\2\u0346\u0347\7v\2\2\u0347\u0348\7u\2\2\u0348"+ + "\u00d6\3\2\2\2\u0349\u034a\7n\2\2\u034a\u034b\7g\2\2\u034b\u034c\7v\2"+ + "\2\u034c\u00d8\3\2\2\2\u034d\u034e\7r\2\2\u034e\u034f\7t\2\2\u034f\u0350"+ + "\7k\2\2\u0350\u0351\7x\2\2\u0351\u0352\7c\2\2\u0352\u0353\7v\2\2\u0353"+ + "\u0354\7g\2\2\u0354\u00da\3\2\2\2\u0355\u0356\7r\2\2\u0356\u0357\7w\2"+ + "\2\u0357\u0358\7d\2\2\u0358\u0359\7n\2\2\u0359\u035a\7k\2\2\u035a\u035b"+ + "\7e\2\2\u035b\u00dc\3\2\2\2\u035c\u035d\7k\2\2\u035d\u035e\7p\2\2\u035e"+ + "\u035f\7v\2\2\u035f\u0360\7g\2\2\u0360\u0361\7t\2\2\u0361\u0362\7h\2\2"+ + "\u0362\u0363\7c\2\2\u0363\u0364\7e\2\2\u0364\u0365\7g\2\2\u0365\u00de"+ + "\3\2\2\2\u0366\u0367\7r\2\2\u0367\u0368\7c\2\2\u0368\u0369\7e\2\2\u0369"+ + "\u036a\7m\2\2\u036a\u036b\7c\2\2\u036b\u036c\7i\2\2\u036c\u036d\7g\2\2"+ + "\u036d\u00e0\3\2\2\2\u036e\u036f\7r\2\2\u036f\u0370\7t\2\2\u0370\u0371"+ + "\7q\2\2\u0371\u0372\7v\2\2\u0372\u0373\7g\2\2\u0373\u0374\7e\2\2\u0374"+ + "\u0375\7v\2\2\u0375\u0376\7g\2\2\u0376\u0377\7f\2\2\u0377\u00e2\3\2\2"+ + "\2\u0378\u0379\7u\2\2\u0379\u037a\7v\2\2\u037a\u037b\7c\2\2\u037b\u037c"+ + "\7v\2\2\u037c\u037d\7k\2\2\u037d\u037e\7e\2\2\u037e\u00e4\3\2\2\2\u037f"+ + "\u0380\7{\2\2\u0380\u0381\7k\2\2\u0381\u0382\7g\2\2\u0382\u0383\7n\2\2"+ + "\u0383\u0384\7f\2\2\u0384\u00e6\3\2\2\2\u0385\u0386\7c\2\2\u0386\u0387"+ + "\7p\2\2\u0387\u0388\7{\2\2\u0388\u00e8\3\2\2\2\u0389\u038a\7p\2\2\u038a"+ + "\u038b\7w\2\2\u038b\u038c\7o\2\2\u038c\u038d\7d\2\2\u038d\u038e\7g\2\2"+ + "\u038e\u038f\7t\2\2\u038f\u00ea\3\2\2\2\u0390\u0391\7d\2\2\u0391\u0392"+ + "\7q\2\2\u0392\u0393\7q\2\2\u0393\u0394\7n\2\2\u0394\u0395\7g\2\2\u0395"+ + "\u0396\7c\2\2\u0396\u0397\7p\2\2\u0397\u00ec\3\2\2\2\u0398\u0399\7u\2"+ + "\2\u0399\u039a\7v\2\2\u039a\u039b\7t\2\2\u039b\u039c\7k\2\2\u039c\u039d"+ + "\7p\2\2\u039d\u039e\7i\2\2\u039e\u00ee\3\2\2\2\u039f\u03a0\7u\2\2\u03a0"+ + "\u03a1\7{\2\2\u03a1\u03a2\7o\2\2\u03a2\u03a3\7d\2\2\u03a3\u03a4\7q\2\2"+ + "\u03a4\u03a5\7n\2\2\u03a5\u00f0\3\2\2\2\u03a6\u03a7\7v\2\2\u03a7\u03a8"+ + "\7{\2\2\u03a8\u03a9\7r\2\2\u03a9\u03aa\7g\2\2\u03aa\u00f2\3\2\2\2\u03ab"+ + "\u03ac\7i\2\2\u03ac\u03ad\7g\2\2\u03ad\u03ae\7v\2\2\u03ae\u03af\7\"\2"+ + "\2\u03af\u00f4\3\2\2\2\u03b0\u03b1\7u\2\2\u03b1\u03b2\7g\2\2\u03b2\u03b3"+ + "\7v\2\2\u03b3\u03b4\7\"\2\2\u03b4\u00f6\3\2\2\2\u03b5\u03b6\7e\2\2\u03b6"+ + "\u03b7\7q\2\2\u03b7\u03b8\7p\2\2\u03b8\u03b9\7u\2\2\u03b9\u03ba\7v\2\2"+ + "\u03ba\u03bb\7t\2\2\u03bb\u03bc\7w\2\2\u03bc\u03bd\7e\2\2\u03bd\u03be"+ + "\7v\2\2\u03be\u03bf\7q\2\2\u03bf\u03c0\7t\2\2\u03c0\u00f8\3\2\2\2\u03c1"+ + "\u03c2\7p\2\2\u03c2\u03c3\7c\2\2\u03c3\u03c4\7o\2\2\u03c4\u03c5\7g\2\2"+ + "\u03c5\u03c6\7u\2\2\u03c6\u03c7\7r\2\2\u03c7\u03c8\7c\2\2\u03c8\u03c9"+ + "\7e\2\2\u03c9\u03ca\7g\2\2\u03ca\u00fa\3\2\2\2\u03cb\u03cc\7t\2\2\u03cc"+ + "\u03cd\7g\2\2\u03cd\u03ce\7s\2\2\u03ce\u03cf\7w\2\2\u03cf\u03d0\7k\2\2"+ + "\u03d0\u03d1\7t\2\2\u03d1\u03d2\7g\2\2\u03d2\u00fc\3\2\2\2\u03d3\u03d4"+ + "\7o\2\2\u03d4\u03d5\7q\2\2\u03d5\u03d6\7f\2\2\u03d6\u03d7\7w\2\2\u03d7"+ + "\u03d8\7n\2\2\u03d8\u03d9\7g\2\2\u03d9\u00fe\3\2\2\2\u03da\u03db\7f\2"+ + "\2\u03db\u03dc\7g\2\2\u03dc\u03dd\7e\2\2\u03dd\u03de\7n\2\2\u03de\u03df"+ + "\7c\2\2\u03df\u03e0\7t\2\2\u03e0\u03e1\7g\2\2\u03e1\u0100\3\2\2\2\u03e2"+ + "\u03e3\7c\2\2\u03e3\u03e4\7d\2\2\u03e4\u03e5\7u\2\2\u03e5\u03e6\7v\2\2"+ + "\u03e6\u03e7\7t\2\2\u03e7\u03e8\7c\2\2\u03e8\u03e9\7e\2\2\u03e9\u03ea"+ + "\7v\2\2\u03ea\u0102\3\2\2\2\u03eb\u03ec\7k\2\2\u03ec\u03ed\7u\2\2\u03ed"+ + "\u0104\3\2\2\2\u03ee\u03ef\7B\2\2\u03ef\u0106\3\2\2\2\u03f0\u03f4\5\u0135"+ + "\u009b\2\u03f1\u03f3\5\u0133\u009a\2\u03f2\u03f1\3\2\2\2\u03f3\u03f6\3"+ + "\2\2\2\u03f4\u03f2\3\2\2\2\u03f4\u03f5\3\2\2\2\u03f5\u0108\3\2\2\2\u03f6"+ + "\u03f4\3\2\2\2\u03f7\u03fb\7$\2\2\u03f8\u03fa\5\u0117\u008c\2\u03f9\u03f8"+ + "\3\2\2\2\u03fa\u03fd\3\2\2\2\u03fb\u03f9\3\2\2\2\u03fb\u03fc\3\2\2\2\u03fc"+ + "\u03fe\3\2\2\2\u03fd\u03fb\3\2\2\2\u03fe\u0408\7$\2\2\u03ff\u0403\7)\2"+ + "\2\u0400\u0402\5\u0119\u008d\2\u0401\u0400\3\2\2\2\u0402\u0405\3\2\2\2"+ + "\u0403\u0401\3\2\2\2\u0403\u0404\3\2\2\2\u0404\u0406\3\2\2\2\u0405\u0403"+ + "\3\2\2\2\u0406\u0408\7)\2\2\u0407\u03f7\3\2\2\2\u0407\u03ff\3\2\2\2\u0408"+ + "\u0409\3\2\2\2\u0409\u040a\b\u0085\5\2\u040a\u010a\3\2\2\2\u040b\u0411"+ + "\7b\2\2\u040c\u040d\7^\2\2\u040d\u0410\7b\2\2\u040e\u0410\n\t\2\2\u040f"+ + "\u040c\3\2\2\2\u040f\u040e\3\2\2\2\u0410\u0413\3\2\2\2\u0411\u040f\3\2"+ + "\2\2\u0411\u0412\3\2\2\2\u0412\u0414\3\2\2\2\u0413\u0411\3\2\2\2\u0414"+ + "\u0415\7b\2\2\u0415\u010c\3\2\2\2\u0416\u0418\t\n\2\2\u0417\u0416\3\2"+ + "\2\2\u0418\u0419\3\2\2\2\u0419\u0417\3\2\2\2\u0419\u041a\3\2\2\2\u041a"+ + "\u041b\3\2\2\2\u041b\u041c\b\u0087\2\2\u041c\u010e\3\2\2\2\u041d\u041e"+ + "\t\2\2\2\u041e\u041f\3\2\2\2\u041f\u0420\b\u0088\2\2\u0420\u0110\3\2\2"+ + "\2\u0421\u0422\7>\2\2\u0422\u0423\7#\2\2\u0423\u0424\7/\2\2\u0424\u0425"+ + "\7/\2\2\u0425\u0429\3\2\2\2\u0426\u0428\13\2\2\2\u0427\u0426\3\2\2\2\u0428"+ + "\u042b\3\2\2\2\u0429\u042a\3\2\2\2\u0429\u0427\3\2\2\2\u042a\u042c\3\2"+ + "\2\2\u042b\u0429\3\2\2\2\u042c\u042d\7/\2\2\u042d\u042e\7/\2\2\u042e\u042f"+ + "\7@\2\2\u042f\u0430\3\2\2\2\u0430\u0431\b\u0089\2\2\u0431\u0112\3\2\2"+ + "\2\u0432\u0433\7>\2\2\u0433\u0434\7#\2\2\u0434\u0435\7]\2\2\u0435\u0436"+ + "\7E\2\2\u0436\u0437\7F\2\2\u0437\u0438\7C\2\2\u0438\u0439\7V\2\2\u0439"+ + "\u043a\7C\2\2\u043a\u043b\7]\2\2\u043b\u043f\3\2\2\2\u043c\u043e\13\2"+ + "\2\2\u043d\u043c\3\2\2\2\u043e\u0441\3\2\2\2\u043f\u0440\3\2\2\2\u043f"+ + "\u043d\3\2\2\2\u0440\u0442\3\2\2\2\u0441\u043f\3\2\2\2\u0442\u0443\7_"+ + "\2\2\u0443\u0444\7_\2\2\u0444\u0445\7@\2\2\u0445\u0446\3\2\2\2\u0446\u0447"+ + "\b\u008a\2\2\u0447\u0114\3\2\2\2\u0448\u0449\13\2\2\2\u0449\u044a\3\2"+ + "\2\2\u044a\u044b\b\u008b\6\2\u044b\u0116\3\2\2\2\u044c\u0451\n\13\2\2"+ + "\u044d\u044e\7^\2\2\u044e\u0451\5\u011b\u008e\2\u044f\u0451\5\u012b\u0096"+ + "\2\u0450\u044c\3\2\2\2\u0450\u044d\3\2\2\2\u0450\u044f\3\2\2\2\u0451\u0118"+ + "\3\2\2\2\u0452\u0457\n\f\2\2\u0453\u0454\7^\2\2\u0454\u0457\5\u011b\u008e"+ + "\2\u0455\u0457\5\u012b\u0096\2\u0456\u0452\3\2\2\2\u0456\u0453\3\2\2\2"+ + "\u0456\u0455\3\2\2\2\u0457\u011a\3\2\2\2\u0458\u045e\5\u011d\u008f\2\u0459"+ + "\u045e\7\62\2\2\u045a\u045e\5\u011f\u0090\2\u045b\u045e\5\u0121\u0091"+ + "\2\u045c\u045e\5\u0123\u0092\2\u045d\u0458\3\2\2\2\u045d\u0459\3\2\2\2"+ + "\u045d\u045a\3\2\2\2\u045d\u045b\3\2\2\2\u045d\u045c\3\2\2\2\u045e\u011c"+ + "\3\2\2\2\u045f\u0462\5\u0125\u0093\2\u0460\u0462\5\u0127\u0094\2\u0461"+ + "\u045f\3\2\2\2\u0461\u0460\3\2\2\2\u0462\u011e\3\2\2\2\u0463\u0464\7z"+ + "\2\2\u0464\u0465\5\u012d\u0097\2\u0465\u0466\5\u012d\u0097\2\u0466\u0120"+ + "\3\2\2\2\u0467\u0468\7w\2\2\u0468\u0469\5\u012d\u0097\2\u0469\u046a\5"+ + "\u012d\u0097\2\u046a\u046b\5\u012d\u0097\2\u046b\u046c\5\u012d\u0097\2"+ + "\u046c\u0122\3\2\2\2\u046d\u046e\7w\2\2\u046e\u0470\7}\2\2\u046f\u0471"+ + "\5\u012d\u0097\2\u0470\u046f\3\2\2\2\u0471\u0472\3\2\2\2\u0472\u0470\3"+ + "\2\2\2\u0472\u0473\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0475\7\177\2\2\u0475"+ + "\u0124\3\2\2\2\u0476\u0477\t\r\2\2\u0477\u0126\3\2\2\2\u0478\u0479\n\16"+ + "\2\2\u0479\u0128\3\2\2\2\u047a\u047d\5\u0125\u0093\2\u047b\u047d\t\17"+ + "\2\2\u047c\u047a\3\2\2\2\u047c\u047b\3\2\2\2\u047d\u012a\3\2\2\2\u047e"+ + "\u047f\7^\2\2\u047f\u0480\t\2\2\2\u0480\u012c\3\2\2\2\u0481\u0482\t\20"+ + "\2\2\u0482\u012e\3\2\2\2\u0483\u048c\7\62\2\2\u0484\u0488\t\21\2\2\u0485"+ + "\u0487\t\3\2\2\u0486\u0485\3\2\2\2\u0487\u048a\3\2\2\2\u0488\u0486\3\2"+ + "\2\2\u0488\u0489\3\2\2\2\u0489\u048c\3\2\2\2\u048a\u0488\3\2\2\2\u048b"+ + "\u0483\3\2\2\2\u048b\u0484\3\2\2\2\u048c\u0130\3\2\2\2\u048d\u048f\t\22"+ + "\2\2\u048e\u0490\t\23\2\2\u048f\u048e\3\2\2\2\u048f\u0490\3\2\2\2\u0490"+ + "\u0492\3\2\2\2\u0491\u0493\t\3\2\2\u0492\u0491\3\2\2\2\u0493\u0494\3\2"+ + "\2\2\u0494\u0492\3\2\2\2\u0494\u0495\3\2\2\2\u0495\u0132\3\2\2\2\u0496"+ + "\u049c\5\u0135\u009b\2\u0497\u049c\5\u0139\u009d\2\u0498\u049c\5\u013b"+ + "\u009e\2\u0499\u049c\5\u013d\u009f\2\u049a\u049c\4\u200e\u200f\2\u049b"+ + "\u0496\3\2\2\2\u049b\u0497\3\2\2\2\u049b\u0498\3\2\2\2\u049b\u0499\3\2"+ + "\2\2\u049b\u049a\3\2\2\2\u049c\u0134\3\2\2\2\u049d\u04a2\5\u0137\u009c"+ + "\2\u049e\u04a2\t\24\2\2\u049f\u04a0\7^\2\2\u04a0\u04a2\5\u0121\u0091\2"+ + "\u04a1\u049d\3\2\2\2\u04a1\u049e\3\2\2\2\u04a1\u049f\3\2\2\2\u04a2\u0136"+ + "\3\2\2\2\u04a3\u04a5\t\25\2\2\u04a4\u04a3\3\2\2\2\u04a5\u0138\3\2\2\2"+ + "\u04a6\u04a8\t\26\2\2\u04a7\u04a6\3\2\2\2\u04a8\u013a\3\2\2\2\u04a9\u04ab"+ + "\t\27\2\2\u04aa\u04a9\3\2\2\2\u04ab\u013c\3\2\2\2\u04ac\u04ae\t\30\2\2"+ + "\u04ad\u04ac\3\2\2\2\u04ae\u013e\3\2\2\2\u04af\u04ba\n\31\2\2\u04b0\u04ba"+ + "\5\u0145\u00a3\2\u04b1\u04b5\7]\2\2\u04b2\u04b4\5\u0143\u00a2\2\u04b3"+ + "\u04b2\3\2\2\2\u04b4\u04b7\3\2\2\2\u04b5\u04b3\3\2\2\2\u04b5\u04b6\3\2"+ + "\2\2\u04b6\u04b8\3\2\2\2\u04b7\u04b5\3\2\2\2\u04b8\u04ba\7_\2\2\u04b9"+ + "\u04af\3\2\2\2\u04b9\u04b0\3\2\2\2\u04b9\u04b1\3\2\2\2\u04ba\u0140\3\2"+ + "\2\2\u04bb\u04c6\n\32\2\2\u04bc\u04c6\5\u0145\u00a3\2\u04bd\u04c1\7]\2"+ + "\2\u04be\u04c0\5\u0143\u00a2\2\u04bf\u04be\3\2\2\2\u04c0\u04c3\3\2\2\2"+ + "\u04c1\u04bf\3\2\2\2\u04c1\u04c2\3\2\2\2\u04c2\u04c4\3\2\2\2\u04c3\u04c1"+ + "\3\2\2\2\u04c4\u04c6\7_\2\2\u04c5\u04bb\3\2\2\2\u04c5\u04bc\3\2\2\2\u04c5"+ + "\u04bd\3\2\2\2\u04c6\u0142\3\2\2\2\u04c7\u04ca\n\33\2\2\u04c8\u04ca\5"+ + "\u0145\u00a3\2\u04c9\u04c7\3\2\2\2\u04c9\u04c8\3\2\2\2\u04ca\u0144\3\2"+ + "\2\2\u04cb\u04cc\7^\2\2\u04cc\u04cd\n\2\2\2\u04cd\u0146\3\2\2\2\61\2\u014d"+ + "\u0156\u0164\u016e\u0176\u021f\u0226\u022a\u0230\u0233\u0237\u0239\u0240"+ + "\u0246\u024f\u0256\u03f4\u03fb\u0403\u0407\u040f\u0411\u0419\u0429\u043f"+ + "\u0450\u0456\u045d\u0461\u0472\u047c\u0488\u048b\u048f\u0494\u049b\u04a1"+ + "\u04a4\u04a7\u04aa\u04ad\u04b5\u04b9\u04c1\u04c5\u04c9\7\2\3\2\3\n\2\3"+ + "\13\3\3\u0085\4\2\4\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptLexer.tokens b/docs/compare/src/main/java/tsantlr/TypeScriptLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..64e7e7ca3af11c442acdcce28ca3070682075e69 --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptLexer.tokens @@ -0,0 +1,258 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Lodash=25 +Dollar=26 +Divide=27 +Modulus=28 +Power=29 +NullCoalesce=30 +Hashtag=31 +RightShiftArithmetic=32 +LeftShiftArithmetic=33 +RightShiftLogical=34 +LessThan=35 +MoreThan=36 +LessThanEquals=37 +GreaterThanEquals=38 +Equals_=39 +NotEquals=40 +IdentityEquals=41 +IdentityNotEquals=42 +BitAnd=43 +BitXOr=44 +BitOr=45 +And=46 +Or=47 +MultiplyAssign=48 +DivideAssign=49 +ModulusAssign=50 +PlusAssign=51 +MinusAssign=52 +LeftShiftArithmeticAssign=53 +RightShiftArithmeticAssign=54 +RightShiftLogicalAssign=55 +BitAndAssign=56 +BitXorAssign=57 +BitOrAssign=58 +ARROW=59 +PowerAssign=60 +NullLiteral=61 +BooleanLiteral=62 +DecimalLiteral=63 +HexIntegerLiteral=64 +OctalIntegerLiteral=65 +OctalIntegerLiteral2=66 +BinaryIntegerLiteral=67 +Break=68 +Do=69 +Instanceof=70 +Typeof=71 +Case=72 +Else=73 +New=74 +Var=75 +Catch=76 +Finally=77 +Return=78 +Void=79 +Continue=80 +For=81 +Switch=82 +While=83 +Debugger=84 +Function=85 +This=86 +With=87 +Default=88 +If=89 +Throw=90 +Delete=91 +In=92 +Try=93 +As=94 +From=95 +ReadOnly=96 +Async=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Await=105 +Implements=106 +Let=107 +Private=108 +Public=109 +Interface=110 +Package=111 +Protected=112 +Static=113 +Yield=114 +ANY=115 +NUMBER=116 +BOOLEAN=117 +STRING=118 +SYMBOL=119 +Type=120 +Get=121 +Set=122 +Constructor=123 +Namespace=124 +Require=125 +Module=126 +Declare=127 +Abstract=128 +Is=129 +At=130 +Identifier=131 +StringLiteral=132 +TemplateStringLiteral=133 +WhiteSpaces=134 +LineTerminator=135 +HtmlComment=136 +CDataComment=137 +UnexpectedCharacter=138 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'_'=25 +'$'=26 +'/'=27 +'%'=28 +'**'=29 +'??'=30 +'#'=31 +'>>'=32 +'<<'=33 +'>>>'=34 +'<'=35 +'>'=36 +'<='=37 +'>='=38 +'=='=39 +'!='=40 +'==='=41 +'!=='=42 +'&'=43 +'^'=44 +'|'=45 +'&&'=46 +'||'=47 +'*='=48 +'/='=49 +'%='=50 +'+='=51 +'-='=52 +'<<='=53 +'>>='=54 +'>>>='=55 +'&='=56 +'^='=57 +'|='=58 +'=>'=59 +'**='=60 +'null'=61 +'break'=68 +'do'=69 +'instanceof'=70 +'typeof'=71 +'case'=72 +'else'=73 +'new'=74 +'var'=75 +'catch'=76 +'finally'=77 +'return'=78 +'void'=79 +'continue'=80 +'for'=81 +'switch'=82 +'while'=83 +'debugger'=84 +'function'=85 +'this'=86 +'with'=87 +'default'=88 +'if'=89 +'throw'=90 +'delete'=91 +'in'=92 +'try'=93 +'as'=94 +'from'=95 +'readonly'=96 +'async'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'await'=105 +'implements'=106 +'let'=107 +'private'=108 +'public'=109 +'interface'=110 +'package'=111 +'protected'=112 +'static'=113 +'yield'=114 +'any'=115 +'number'=116 +'boolean'=117 +'string'=118 +'symbol'=119 +'type'=120 +'get '=121 +'set '=122 +'constructor'=123 +'namespace'=124 +'require'=125 +'module'=126 +'declare'=127 +'abstract'=128 +'is'=129 +'@'=130 diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptParser.interp b/docs/compare/src/main/java/tsantlr/TypeScriptParser.interp new file mode 100644 index 0000000000000000000000000000000000000000..50d7477995b9a67f5778399792fdd8b77729c701 --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptParser.interp @@ -0,0 +1,427 @@ +token literal names: +null +null +null +null +null +'[' +']' +'(' +')' +'{' +'}' +';' +',' +'=' +'?' +':' +'...' +'.' +'++' +'--' +'+' +'-' +'~' +'!' +'*' +'_' +'$' +'/' +'%' +'**' +'??' +'#' +'>>' +'<<' +'>>>' +'<' +'>' +'<=' +'>=' +'==' +'!=' +'===' +'!==' +'&' +'^' +'|' +'&&' +'||' +'*=' +'/=' +'%=' +'+=' +'-=' +'<<=' +'>>=' +'>>>=' +'&=' +'^=' +'|=' +'=>' +'**=' +'null' +null +null +null +null +null +null +'break' +'do' +'instanceof' +'typeof' +'case' +'else' +'new' +'var' +'catch' +'finally' +'return' +'void' +'continue' +'for' +'switch' +'while' +'debugger' +'function' +'this' +'with' +'default' +'if' +'throw' +'delete' +'in' +'try' +'as' +'from' +'readonly' +'async' +'class' +'enum' +'extends' +'super' +'const' +'export' +'import' +'await' +'implements' +'let' +'private' +'public' +'interface' +'package' +'protected' +'static' +'yield' +'any' +'number' +'boolean' +'string' +'symbol' +'type' +'get ' +'set ' +'constructor' +'namespace' +'require' +'module' +'declare' +'abstract' +'is' +'@' +null +null +null +null +null +null +null +null + +token symbolic names: +null +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Lodash +Dollar +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +ARROW +PowerAssign +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +ReadOnly +Async +Class +Enum +Extends +Super +Const +Export +Import +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +ANY +NUMBER +BOOLEAN +STRING +SYMBOL +Type +Get +Set +Constructor +Namespace +Require +Module +Declare +Abstract +Is +At +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter + +rule names: +initializer +bindingPattern +typeParameters +typeParameterList +typeParameter +constraint +typeArguments +typeArgumentList +typeArgument +type_ +unionOrIntersectionOrPrimaryType +primaryType +predefinedType +typeReference +typeGeneric +typeIncludeGeneric +typeName +objectType +typeBody +typeMemberList +typeMember +arrayType +tupleType +tupleElementTypes +functionType +constructorType +typeQuery +typeQueryExpression +propertySignature +typeAnnotation +callSignature +parameterList +requiredParameterList +requiredParameter +accessibilityModifier +identifierOrPattern +optionalParameterList +optionalParameter +restParameter +constructSignature +indexSignature +methodSignature +typeAliasDeclaration +constructorDeclaration +interfaceDeclaration +interfaceExtendsClause +classOrInterfaceTypeList +enumDeclaration +enumBody +enumMemberList +enumMember +namespaceDeclaration +namespaceName +importAliasDeclaration +importAll +decoratorList +decorator +decoratorMemberExpression +decoratorCallExpression +program +sourceElement +statement +block +statementList +abstractDeclaration +importStatement +importFromBlock +multipleImportStatement +exportStatement +variableStatement +variableDeclarationList +variableDeclaration +emptyStatement_ +expressionStatement +ifStatement +iterationStatement +varModifier +continueStatement +breakStatement +returnStatement +yieldStatement +withStatement +switchStatement +caseBlock +caseClauses +caseClause +defaultClause +labelledStatement +throwStatement +tryStatement +catchProduction +assignable +finallyProduction +debuggerStatement +functionDeclaration +classDeclaration +classHeritage +classTail +classExtendsClause +implementsClause +classElement +propertyMemberDeclaration +propertyMemberBase +indexMemberDeclaration +generatorMethod +generatorFunctionDeclaration +generatorBlock +generatorDefinition +iteratorBlock +iteratorDefinition +formalParameterList +formalParameterArg +lastFormalParameterArg +functionBody +sourceElements +arrayLiteral +elementList +lastElement +objectLiteral +propertyAssignment +getAccessor +setAccessor +propertyName +arguments +lastArgument +expressionSequence +functionExpressionDeclaration +singleExpression +arrowFunctionDeclaration +arrowFunctionParameters +arrowFunctionBody +assignmentOperator +literal +numericLiteral +identifierName +reservedWord +keyword +getter +setter +eos + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 140, 1723, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 5, 3, 288, 10, 3, 3, 4, 3, 4, 5, 4, 292, 10, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 7, 5, 299, 10, 5, 12, 5, 14, 5, 302, 11, 5, 3, 6, 3, 6, 5, 6, 306, 10, 6, 3, 6, 5, 6, 309, 10, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 5, 8, 316, 10, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 7, 9, 323, 10, 9, 12, 9, 14, 9, 326, 11, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 335, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 7, 12, 346, 10, 12, 12, 12, 14, 12, 349, 11, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 369, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 375, 10, 13, 12, 13, 14, 13, 378, 11, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 5, 15, 385, 10, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 400, 10, 17, 3, 18, 3, 18, 5, 18, 404, 10, 18, 3, 19, 3, 19, 5, 19, 408, 10, 19, 3, 19, 3, 19, 3, 20, 3, 20, 5, 20, 414, 10, 20, 3, 21, 3, 21, 3, 21, 7, 21, 419, 10, 21, 12, 21, 14, 21, 422, 11, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 431, 10, 22, 5, 22, 433, 10, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 7, 25, 447, 10, 25, 12, 25, 14, 25, 450, 11, 25, 3, 26, 5, 26, 453, 10, 26, 3, 26, 3, 26, 5, 26, 457, 10, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 5, 27, 465, 10, 27, 3, 27, 3, 27, 5, 27, 469, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 6, 29, 482, 10, 29, 13, 29, 14, 29, 483, 3, 29, 3, 29, 5, 29, 488, 10, 29, 3, 30, 5, 30, 491, 10, 30, 3, 30, 3, 30, 5, 30, 495, 10, 30, 3, 30, 5, 30, 498, 10, 30, 3, 30, 3, 30, 5, 30, 502, 10, 30, 3, 31, 3, 31, 3, 31, 3, 32, 5, 32, 508, 10, 32, 3, 32, 3, 32, 5, 32, 512, 10, 32, 3, 32, 3, 32, 5, 32, 516, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 7, 33, 522, 10, 33, 12, 33, 14, 33, 525, 11, 33, 3, 33, 3, 33, 3, 33, 5, 33, 530, 10, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 537, 10, 33, 3, 33, 5, 33, 540, 10, 33, 5, 33, 542, 10, 33, 5, 33, 544, 10, 33, 3, 34, 3, 34, 3, 34, 7, 34, 549, 10, 34, 12, 34, 14, 34, 552, 11, 34, 3, 35, 5, 35, 555, 10, 35, 3, 35, 5, 35, 558, 10, 35, 3, 35, 3, 35, 5, 35, 562, 10, 35, 3, 36, 3, 36, 3, 37, 3, 37, 5, 37, 568, 10, 37, 3, 38, 3, 38, 3, 38, 7, 38, 573, 10, 38, 12, 38, 14, 38, 576, 11, 38, 3, 39, 5, 39, 579, 10, 39, 3, 39, 5, 39, 582, 10, 39, 3, 39, 3, 39, 3, 39, 5, 39, 587, 10, 39, 3, 39, 5, 39, 590, 10, 39, 3, 39, 5, 39, 593, 10, 39, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 599, 10, 40, 3, 41, 3, 41, 5, 41, 603, 10, 41, 3, 41, 3, 41, 5, 41, 607, 10, 41, 3, 41, 3, 41, 5, 41, 611, 10, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 5, 43, 622, 10, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 5, 44, 629, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 5, 45, 636, 10, 45, 3, 45, 3, 45, 3, 45, 5, 45, 641, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 649, 10, 45, 3, 46, 5, 46, 652, 10, 46, 3, 46, 3, 46, 3, 46, 5, 46, 657, 10, 46, 3, 46, 5, 46, 660, 10, 46, 3, 46, 3, 46, 5, 46, 664, 10, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 7, 48, 672, 10, 48, 12, 48, 14, 48, 675, 11, 48, 3, 49, 5, 49, 678, 10, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 684, 10, 49, 3, 49, 3, 49, 3, 50, 3, 50, 5, 50, 690, 10, 50, 3, 51, 3, 51, 3, 51, 7, 51, 695, 10, 51, 12, 51, 14, 51, 698, 11, 51, 3, 52, 3, 52, 3, 52, 5, 52, 703, 10, 52, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 709, 10, 53, 3, 53, 3, 53, 3, 54, 3, 54, 6, 54, 715, 10, 54, 13, 54, 14, 54, 716, 3, 54, 7, 54, 720, 10, 54, 12, 54, 14, 54, 723, 11, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 737, 10, 55, 3, 56, 3, 56, 3, 57, 6, 57, 742, 10, 57, 13, 57, 14, 57, 743, 3, 58, 3, 58, 3, 58, 5, 58, 749, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 757, 10, 59, 3, 59, 3, 59, 3, 59, 7, 59, 762, 10, 59, 12, 59, 14, 59, 765, 11, 59, 3, 60, 3, 60, 3, 60, 3, 61, 5, 61, 771, 10, 61, 3, 61, 3, 61, 3, 62, 5, 62, 776, 10, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 809, 10, 63, 3, 64, 3, 64, 5, 64, 813, 10, 64, 3, 64, 3, 64, 3, 65, 6, 65, 818, 10, 65, 13, 65, 14, 65, 819, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 826, 10, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 67, 5, 67, 834, 10, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 5, 68, 843, 10, 68, 3, 68, 3, 68, 5, 68, 847, 10, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 5, 69, 855, 10, 69, 3, 69, 3, 69, 3, 69, 3, 69, 7, 69, 861, 10, 69, 12, 69, 14, 69, 864, 11, 69, 3, 69, 3, 69, 3, 70, 3, 70, 5, 70, 870, 10, 70, 3, 70, 3, 70, 5, 70, 874, 10, 70, 3, 71, 3, 71, 5, 71, 878, 10, 71, 3, 71, 3, 71, 5, 71, 882, 10, 71, 3, 71, 5, 71, 885, 10, 71, 3, 71, 5, 71, 888, 10, 71, 3, 71, 5, 71, 891, 10, 71, 3, 71, 3, 71, 5, 71, 895, 10, 71, 5, 71, 897, 10, 71, 3, 72, 3, 72, 3, 72, 7, 72, 902, 10, 72, 12, 72, 14, 72, 905, 11, 72, 3, 73, 3, 73, 5, 73, 909, 10, 73, 3, 73, 5, 73, 912, 10, 73, 3, 73, 3, 73, 5, 73, 916, 10, 73, 3, 73, 5, 73, 919, 10, 73, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 5, 75, 926, 10, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 5, 76, 935, 10, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 954, 10, 77, 3, 77, 3, 77, 5, 77, 958, 10, 77, 3, 77, 3, 77, 5, 77, 962, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 972, 10, 77, 3, 77, 3, 77, 5, 77, 976, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 983, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 990, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 998, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 1006, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 1012, 10, 77, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 5, 79, 1019, 10, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 5, 80, 1026, 10, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 5, 81, 1033, 10, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 5, 82, 1040, 10, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 5, 85, 1058, 10, 85, 3, 85, 3, 85, 5, 85, 1062, 10, 85, 5, 85, 1064, 10, 85, 3, 85, 3, 85, 3, 86, 6, 86, 1069, 10, 86, 13, 86, 14, 86, 1070, 3, 87, 3, 87, 3, 87, 3, 87, 5, 87, 1077, 10, 87, 3, 88, 3, 88, 3, 88, 5, 88, 1082, 10, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 5, 91, 1097, 10, 91, 3, 91, 5, 91, 1100, 10, 91, 3, 92, 3, 92, 3, 92, 5, 92, 1105, 10, 92, 3, 92, 5, 92, 1108, 10, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 5, 93, 1115, 10, 93, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 5, 96, 1124, 10, 96, 3, 96, 3, 96, 5, 96, 1128, 10, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 5, 96, 1137, 10, 96, 3, 97, 5, 97, 1140, 10, 97, 3, 97, 3, 97, 3, 97, 5, 97, 1145, 10, 97, 3, 97, 3, 97, 3, 97, 3, 98, 5, 98, 1151, 10, 98, 3, 98, 5, 98, 1154, 10, 98, 3, 99, 3, 99, 7, 99, 1158, 10, 99, 12, 99, 14, 99, 1161, 11, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, 102, 5, 102, 1175, 10, 102, 3, 103, 3, 103, 5, 103, 1179, 10, 103, 3, 103, 5, 103, 1182, 10, 103, 3, 103, 3, 103, 5, 103, 1186, 10, 103, 3, 103, 5, 103, 1189, 10, 103, 3, 103, 3, 103, 3, 103, 3, 103, 5, 103, 1195, 10, 103, 3, 103, 5, 103, 1198, 10, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 5, 103, 1207, 10, 103, 3, 103, 3, 103, 5, 103, 1211, 10, 103, 3, 103, 5, 103, 1214, 10, 103, 3, 103, 3, 103, 5, 103, 1218, 10, 103, 3, 103, 5, 103, 1221, 10, 103, 3, 104, 5, 104, 1224, 10, 104, 3, 104, 5, 104, 1227, 10, 104, 3, 104, 5, 104, 1230, 10, 104, 3, 104, 5, 104, 1233, 10, 104, 3, 105, 3, 105, 3, 105, 3, 106, 5, 106, 1239, 10, 106, 3, 106, 3, 106, 3, 106, 5, 106, 1244, 10, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 5, 107, 1254, 10, 107, 3, 107, 3, 107, 5, 107, 1258, 10, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 108, 7, 108, 1269, 10, 108, 12, 108, 14, 108, 1272, 11, 108, 3, 108, 5, 108, 1275, 10, 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 110, 7, 110, 1286, 10, 110, 12, 110, 14, 110, 1289, 11, 110, 3, 110, 5, 110, 1292, 10, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 5, 111, 1301, 10, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 7, 112, 1311, 10, 112, 12, 112, 14, 112, 1314, 11, 112, 3, 112, 3, 112, 5, 112, 1318, 10, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 5, 112, 1325, 10, 112, 5, 112, 1327, 10, 112, 3, 113, 5, 113, 1330, 10, 113, 3, 113, 3, 113, 5, 113, 1334, 10, 113, 3, 113, 3, 113, 5, 113, 1338, 10, 113, 3, 114, 3, 114, 3, 114, 3, 115, 5, 115, 1344, 10, 115, 3, 116, 6, 116, 1347, 10, 116, 13, 116, 14, 116, 1348, 3, 117, 3, 117, 5, 117, 1353, 10, 117, 3, 117, 3, 117, 3, 118, 3, 118, 6, 118, 1359, 10, 118, 13, 118, 14, 118, 1360, 3, 118, 7, 118, 1364, 10, 118, 12, 118, 14, 118, 1367, 11, 118, 3, 118, 6, 118, 1370, 10, 118, 13, 118, 14, 118, 1371, 3, 118, 5, 118, 1375, 10, 118, 3, 118, 5, 118, 1378, 10, 118, 3, 119, 3, 119, 3, 119, 5, 119, 1383, 10, 119, 3, 120, 3, 120, 3, 120, 3, 120, 7, 120, 1389, 10, 120, 12, 120, 14, 120, 1392, 11, 120, 5, 120, 1394, 10, 120, 3, 120, 5, 120, 1397, 10, 120, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1412, 10, 121, 3, 121, 5, 121, 1415, 10, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1420, 10, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1432, 10, 121, 3, 122, 3, 122, 3, 122, 3, 122, 5, 122, 1438, 10, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 123, 3, 123, 3, 123, 3, 123, 5, 123, 1448, 10, 123, 3, 123, 5, 123, 1451, 10, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 5, 124, 1465, 10, 124, 3, 125, 3, 125, 3, 125, 3, 125, 7, 125, 1471, 10, 125, 12, 125, 14, 125, 1474, 11, 125, 3, 125, 3, 125, 5, 125, 1478, 10, 125, 3, 125, 5, 125, 1481, 10, 125, 3, 125, 3, 125, 3, 126, 3, 126, 3, 126, 3, 127, 3, 127, 3, 127, 7, 127, 1491, 10, 127, 12, 127, 14, 127, 1494, 11, 127, 3, 127, 5, 127, 1497, 10, 127, 3, 128, 5, 128, 1500, 10, 128, 3, 128, 3, 128, 5, 128, 1504, 10, 128, 3, 128, 3, 128, 5, 128, 1508, 10, 128, 3, 128, 3, 128, 5, 128, 1512, 10, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1523, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1529, 10, 129, 3, 129, 5, 129, 1532, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1561, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1573, 10, 129, 5, 129, 1575, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1639, 10, 129, 3, 129, 3, 129, 5, 129, 1643, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 7, 129, 1656, 10, 129, 12, 129, 14, 129, 1659, 11, 129, 3, 130, 5, 130, 1662, 10, 130, 3, 130, 3, 130, 5, 130, 1666, 10, 130, 3, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 131, 5, 131, 1674, 10, 131, 3, 131, 5, 131, 1677, 10, 131, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 5, 132, 1684, 10, 132, 3, 133, 3, 133, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1694, 10, 134, 3, 135, 3, 135, 3, 136, 3, 136, 5, 136, 1700, 10, 136, 3, 137, 3, 137, 3, 137, 5, 137, 1705, 10, 137, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, 3, 140, 3, 141, 3, 141, 3, 141, 3, 141, 5, 141, 1721, 10, 141, 3, 141, 2, 6, 22, 24, 116, 256, 142, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 2, 16, 4, 2, 81, 81, 117, 121, 3, 2, 13, 14, 4, 2, 110, 111, 114, 114, 4, 2, 118, 118, 120, 120, 5, 2, 77, 77, 104, 104, 109, 109, 4, 2, 15, 15, 17, 17, 4, 2, 26, 26, 29, 30, 3, 2, 22, 23, 3, 2, 34, 36, 3, 2, 37, 40, 3, 2, 41, 44, 4, 2, 50, 60, 62, 62, 3, 2, 65, 69, 3, 2, 70, 116, 2, 1918, 2, 282, 3, 2, 2, 2, 4, 287, 3, 2, 2, 2, 6, 289, 3, 2, 2, 2, 8, 295, 3, 2, 2, 2, 10, 308, 3, 2, 2, 2, 12, 310, 3, 2, 2, 2, 14, 313, 3, 2, 2, 2, 16, 319, 3, 2, 2, 2, 18, 327, 3, 2, 2, 2, 20, 334, 3, 2, 2, 2, 22, 336, 3, 2, 2, 2, 24, 368, 3, 2, 2, 2, 26, 379, 3, 2, 2, 2, 28, 381, 3, 2, 2, 2, 30, 386, 3, 2, 2, 2, 32, 390, 3, 2, 2, 2, 34, 403, 3, 2, 2, 2, 36, 405, 3, 2, 2, 2, 38, 411, 3, 2, 2, 2, 40, 415, 3, 2, 2, 2, 42, 432, 3, 2, 2, 2, 44, 434, 3, 2, 2, 2, 46, 439, 3, 2, 2, 2, 48, 443, 3, 2, 2, 2, 50, 452, 3, 2, 2, 2, 52, 462, 3, 2, 2, 2, 54, 474, 3, 2, 2, 2, 56, 487, 3, 2, 2, 2, 58, 490, 3, 2, 2, 2, 60, 503, 3, 2, 2, 2, 62, 507, 3, 2, 2, 2, 64, 543, 3, 2, 2, 2, 66, 545, 3, 2, 2, 2, 68, 554, 3, 2, 2, 2, 70, 563, 3, 2, 2, 2, 72, 567, 3, 2, 2, 2, 74, 569, 3, 2, 2, 2, 76, 578, 3, 2, 2, 2, 78, 598, 3, 2, 2, 2, 80, 600, 3, 2, 2, 2, 82, 612, 3, 2, 2, 2, 84, 619, 3, 2, 2, 2, 86, 625, 3, 2, 2, 2, 88, 635, 3, 2, 2, 2, 90, 651, 3, 2, 2, 2, 92, 665, 3, 2, 2, 2, 94, 668, 3, 2, 2, 2, 96, 677, 3, 2, 2, 2, 98, 687, 3, 2, 2, 2, 100, 691, 3, 2, 2, 2, 102, 699, 3, 2, 2, 2, 104, 704, 3, 2, 2, 2, 106, 712, 3, 2, 2, 2, 108, 736, 3, 2, 2, 2, 110, 738, 3, 2, 2, 2, 112, 741, 3, 2, 2, 2, 114, 745, 3, 2, 2, 2, 116, 756, 3, 2, 2, 2, 118, 766, 3, 2, 2, 2, 120, 770, 3, 2, 2, 2, 122, 775, 3, 2, 2, 2, 124, 808, 3, 2, 2, 2, 126, 810, 3, 2, 2, 2, 128, 817, 3, 2, 2, 2, 130, 821, 3, 2, 2, 2, 132, 829, 3, 2, 2, 2, 134, 842, 3, 2, 2, 2, 136, 854, 3, 2, 2, 2, 138, 867, 3, 2, 2, 2, 140, 896, 3, 2, 2, 2, 142, 898, 3, 2, 2, 2, 144, 906, 3, 2, 2, 2, 146, 920, 3, 2, 2, 2, 148, 922, 3, 2, 2, 2, 150, 927, 3, 2, 2, 2, 152, 1011, 3, 2, 2, 2, 154, 1013, 3, 2, 2, 2, 156, 1015, 3, 2, 2, 2, 158, 1022, 3, 2, 2, 2, 160, 1029, 3, 2, 2, 2, 162, 1036, 3, 2, 2, 2, 164, 1043, 3, 2, 2, 2, 166, 1049, 3, 2, 2, 2, 168, 1055, 3, 2, 2, 2, 170, 1068, 3, 2, 2, 2, 172, 1072, 3, 2, 2, 2, 174, 1078, 3, 2, 2, 2, 176, 1083, 3, 2, 2, 2, 178, 1087, 3, 2, 2, 2, 180, 1092, 3, 2, 2, 2, 182, 1101, 3, 2, 2, 2, 184, 1114, 3, 2, 2, 2, 186, 1116, 3, 2, 2, 2, 188, 1119, 3, 2, 2, 2, 190, 1123, 3, 2, 2, 2, 192, 1139, 3, 2, 2, 2, 194, 1150, 3, 2, 2, 2, 196, 1155, 3, 2, 2, 2, 198, 1164, 3, 2, 2, 2, 200, 1167, 3, 2, 2, 2, 202, 1174, 3, 2, 2, 2, 204, 1220, 3, 2, 2, 2, 206, 1223, 3, 2, 2, 2, 208, 1234, 3, 2, 2, 2, 210, 1238, 3, 2, 2, 2, 212, 1250, 3, 2, 2, 2, 214, 1264, 3, 2, 2, 2, 216, 1278, 3, 2, 2, 2, 218, 1281, 3, 2, 2, 2, 220, 1295, 3, 2, 2, 2, 222, 1326, 3, 2, 2, 2, 224, 1329, 3, 2, 2, 2, 226, 1339, 3, 2, 2, 2, 228, 1343, 3, 2, 2, 2, 230, 1346, 3, 2, 2, 2, 232, 1350, 3, 2, 2, 2, 234, 1377, 3, 2, 2, 2, 236, 1379, 3, 2, 2, 2, 238, 1384, 3, 2, 2, 2, 240, 1431, 3, 2, 2, 2, 242, 1433, 3, 2, 2, 2, 244, 1443, 3, 2, 2, 2, 246, 1464, 3, 2, 2, 2, 248, 1466, 3, 2, 2, 2, 250, 1484, 3, 2, 2, 2, 252, 1487, 3, 2, 2, 2, 254, 1499, 3, 2, 2, 2, 256, 1574, 3, 2, 2, 2, 258, 1661, 3, 2, 2, 2, 260, 1676, 3, 2, 2, 2, 262, 1683, 3, 2, 2, 2, 264, 1685, 3, 2, 2, 2, 266, 1693, 3, 2, 2, 2, 268, 1695, 3, 2, 2, 2, 270, 1699, 3, 2, 2, 2, 272, 1704, 3, 2, 2, 2, 274, 1706, 3, 2, 2, 2, 276, 1708, 3, 2, 2, 2, 278, 1712, 3, 2, 2, 2, 280, 1720, 3, 2, 2, 2, 282, 283, 7, 15, 2, 2, 283, 284, 5, 256, 129, 2, 284, 3, 3, 2, 2, 2, 285, 288, 5, 232, 117, 2, 286, 288, 5, 238, 120, 2, 287, 285, 3, 2, 2, 2, 287, 286, 3, 2, 2, 2, 288, 5, 3, 2, 2, 2, 289, 291, 7, 37, 2, 2, 290, 292, 5, 8, 5, 2, 291, 290, 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, 293, 3, 2, 2, 2, 293, 294, 7, 38, 2, 2, 294, 7, 3, 2, 2, 2, 295, 300, 5, 10, 6, 2, 296, 297, 7, 14, 2, 2, 297, 299, 5, 10, 6, 2, 298, 296, 3, 2, 2, 2, 299, 302, 3, 2, 2, 2, 300, 298, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 9, 3, 2, 2, 2, 302, 300, 3, 2, 2, 2, 303, 305, 7, 133, 2, 2, 304, 306, 5, 12, 7, 2, 305, 304, 3, 2, 2, 2, 305, 306, 3, 2, 2, 2, 306, 309, 3, 2, 2, 2, 307, 309, 5, 6, 4, 2, 308, 303, 3, 2, 2, 2, 308, 307, 3, 2, 2, 2, 309, 11, 3, 2, 2, 2, 310, 311, 7, 102, 2, 2, 311, 312, 5, 20, 11, 2, 312, 13, 3, 2, 2, 2, 313, 315, 7, 37, 2, 2, 314, 316, 5, 16, 9, 2, 315, 314, 3, 2, 2, 2, 315, 316, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 318, 7, 38, 2, 2, 318, 15, 3, 2, 2, 2, 319, 324, 5, 18, 10, 2, 320, 321, 7, 14, 2, 2, 321, 323, 5, 18, 10, 2, 322, 320, 3, 2, 2, 2, 323, 326, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2, 325, 17, 3, 2, 2, 2, 326, 324, 3, 2, 2, 2, 327, 328, 5, 20, 11, 2, 328, 19, 3, 2, 2, 2, 329, 335, 5, 22, 12, 2, 330, 335, 5, 50, 26, 2, 331, 335, 5, 52, 27, 2, 332, 335, 5, 30, 16, 2, 333, 335, 7, 134, 2, 2, 334, 329, 3, 2, 2, 2, 334, 330, 3, 2, 2, 2, 334, 331, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 333, 3, 2, 2, 2, 335, 21, 3, 2, 2, 2, 336, 337, 8, 12, 1, 2, 337, 338, 5, 24, 13, 2, 338, 347, 3, 2, 2, 2, 339, 340, 12, 5, 2, 2, 340, 341, 7, 47, 2, 2, 341, 346, 5, 22, 12, 6, 342, 343, 12, 4, 2, 2, 343, 344, 7, 45, 2, 2, 344, 346, 5, 22, 12, 5, 345, 339, 3, 2, 2, 2, 345, 342, 3, 2, 2, 2, 346, 349, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 23, 3, 2, 2, 2, 349, 347, 3, 2, 2, 2, 350, 351, 8, 13, 1, 2, 351, 352, 7, 9, 2, 2, 352, 353, 5, 20, 11, 2, 353, 354, 7, 10, 2, 2, 354, 369, 3, 2, 2, 2, 355, 369, 5, 26, 14, 2, 356, 369, 5, 28, 15, 2, 357, 369, 5, 36, 19, 2, 358, 359, 7, 7, 2, 2, 359, 360, 5, 48, 25, 2, 360, 361, 7, 8, 2, 2, 361, 369, 3, 2, 2, 2, 362, 369, 5, 54, 28, 2, 363, 369, 7, 88, 2, 2, 364, 365, 5, 28, 15, 2, 365, 366, 7, 131, 2, 2, 366, 367, 5, 24, 13, 3, 367, 369, 3, 2, 2, 2, 368, 350, 3, 2, 2, 2, 368, 355, 3, 2, 2, 2, 368, 356, 3, 2, 2, 2, 368, 357, 3, 2, 2, 2, 368, 358, 3, 2, 2, 2, 368, 362, 3, 2, 2, 2, 368, 363, 3, 2, 2, 2, 368, 364, 3, 2, 2, 2, 369, 376, 3, 2, 2, 2, 370, 371, 12, 7, 2, 2, 371, 372, 6, 13, 5, 2, 372, 373, 7, 7, 2, 2, 373, 375, 7, 8, 2, 2, 374, 370, 3, 2, 2, 2, 375, 378, 3, 2, 2, 2, 376, 374, 3, 2, 2, 2, 376, 377, 3, 2, 2, 2, 377, 25, 3, 2, 2, 2, 378, 376, 3, 2, 2, 2, 379, 380, 9, 2, 2, 2, 380, 27, 3, 2, 2, 2, 381, 384, 5, 34, 18, 2, 382, 385, 5, 32, 17, 2, 383, 385, 5, 30, 16, 2, 384, 382, 3, 2, 2, 2, 384, 383, 3, 2, 2, 2, 384, 385, 3, 2, 2, 2, 385, 29, 3, 2, 2, 2, 386, 387, 7, 37, 2, 2, 387, 388, 5, 16, 9, 2, 388, 389, 7, 38, 2, 2, 389, 31, 3, 2, 2, 2, 390, 391, 7, 37, 2, 2, 391, 392, 5, 16, 9, 2, 392, 393, 7, 37, 2, 2, 393, 399, 5, 16, 9, 2, 394, 395, 7, 38, 2, 2, 395, 396, 5, 4, 3, 2, 396, 397, 7, 38, 2, 2, 397, 400, 3, 2, 2, 2, 398, 400, 7, 34, 2, 2, 399, 394, 3, 2, 2, 2, 399, 398, 3, 2, 2, 2, 400, 33, 3, 2, 2, 2, 401, 404, 7, 133, 2, 2, 402, 404, 5, 106, 54, 2, 403, 401, 3, 2, 2, 2, 403, 402, 3, 2, 2, 2, 404, 35, 3, 2, 2, 2, 405, 407, 7, 11, 2, 2, 406, 408, 5, 38, 20, 2, 407, 406, 3, 2, 2, 2, 407, 408, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 410, 7, 12, 2, 2, 410, 37, 3, 2, 2, 2, 411, 413, 5, 40, 21, 2, 412, 414, 9, 3, 2, 2, 413, 412, 3, 2, 2, 2, 413, 414, 3, 2, 2, 2, 414, 39, 3, 2, 2, 2, 415, 420, 5, 42, 22, 2, 416, 417, 9, 3, 2, 2, 417, 419, 5, 42, 22, 2, 418, 416, 3, 2, 2, 2, 419, 422, 3, 2, 2, 2, 420, 418, 3, 2, 2, 2, 420, 421, 3, 2, 2, 2, 421, 41, 3, 2, 2, 2, 422, 420, 3, 2, 2, 2, 423, 433, 5, 58, 30, 2, 424, 433, 5, 62, 32, 2, 425, 433, 5, 80, 41, 2, 426, 433, 5, 82, 42, 2, 427, 430, 5, 84, 43, 2, 428, 429, 7, 61, 2, 2, 429, 431, 5, 20, 11, 2, 430, 428, 3, 2, 2, 2, 430, 431, 3, 2, 2, 2, 431, 433, 3, 2, 2, 2, 432, 423, 3, 2, 2, 2, 432, 424, 3, 2, 2, 2, 432, 425, 3, 2, 2, 2, 432, 426, 3, 2, 2, 2, 432, 427, 3, 2, 2, 2, 433, 43, 3, 2, 2, 2, 434, 435, 5, 24, 13, 2, 435, 436, 6, 23, 6, 2, 436, 437, 7, 7, 2, 2, 437, 438, 7, 8, 2, 2, 438, 45, 3, 2, 2, 2, 439, 440, 7, 7, 2, 2, 440, 441, 5, 48, 25, 2, 441, 442, 7, 8, 2, 2, 442, 47, 3, 2, 2, 2, 443, 448, 5, 20, 11, 2, 444, 445, 7, 14, 2, 2, 445, 447, 5, 20, 11, 2, 446, 444, 3, 2, 2, 2, 447, 450, 3, 2, 2, 2, 448, 446, 3, 2, 2, 2, 448, 449, 3, 2, 2, 2, 449, 49, 3, 2, 2, 2, 450, 448, 3, 2, 2, 2, 451, 453, 5, 6, 4, 2, 452, 451, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 456, 7, 9, 2, 2, 455, 457, 5, 64, 33, 2, 456, 455, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 459, 7, 10, 2, 2, 459, 460, 7, 61, 2, 2, 460, 461, 5, 20, 11, 2, 461, 51, 3, 2, 2, 2, 462, 464, 7, 76, 2, 2, 463, 465, 5, 6, 4, 2, 464, 463, 3, 2, 2, 2, 464, 465, 3, 2, 2, 2, 465, 466, 3, 2, 2, 2, 466, 468, 7, 9, 2, 2, 467, 469, 5, 64, 33, 2, 468, 467, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 7, 10, 2, 2, 471, 472, 7, 61, 2, 2, 472, 473, 5, 20, 11, 2, 473, 53, 3, 2, 2, 2, 474, 475, 7, 73, 2, 2, 475, 476, 5, 56, 29, 2, 476, 55, 3, 2, 2, 2, 477, 488, 7, 133, 2, 2, 478, 479, 5, 270, 136, 2, 479, 480, 7, 19, 2, 2, 480, 482, 3, 2, 2, 2, 481, 478, 3, 2, 2, 2, 482, 483, 3, 2, 2, 2, 483, 481, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 486, 5, 270, 136, 2, 486, 488, 3, 2, 2, 2, 487, 477, 3, 2, 2, 2, 487, 481, 3, 2, 2, 2, 488, 57, 3, 2, 2, 2, 489, 491, 7, 98, 2, 2, 490, 489, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 494, 5, 246, 124, 2, 493, 495, 7, 16, 2, 2, 494, 493, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 497, 3, 2, 2, 2, 496, 498, 5, 60, 31, 2, 497, 496, 3, 2, 2, 2, 497, 498, 3, 2, 2, 2, 498, 501, 3, 2, 2, 2, 499, 500, 7, 61, 2, 2, 500, 502, 5, 20, 11, 2, 501, 499, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 59, 3, 2, 2, 2, 503, 504, 7, 17, 2, 2, 504, 505, 5, 20, 11, 2, 505, 61, 3, 2, 2, 2, 506, 508, 5, 6, 4, 2, 507, 506, 3, 2, 2, 2, 507, 508, 3, 2, 2, 2, 508, 509, 3, 2, 2, 2, 509, 511, 7, 9, 2, 2, 510, 512, 5, 64, 33, 2, 511, 510, 3, 2, 2, 2, 511, 512, 3, 2, 2, 2, 512, 513, 3, 2, 2, 2, 513, 515, 7, 10, 2, 2, 514, 516, 5, 60, 31, 2, 515, 514, 3, 2, 2, 2, 515, 516, 3, 2, 2, 2, 516, 63, 3, 2, 2, 2, 517, 544, 5, 78, 40, 2, 518, 523, 5, 26, 14, 2, 519, 520, 7, 14, 2, 2, 520, 522, 5, 26, 14, 2, 521, 519, 3, 2, 2, 2, 522, 525, 3, 2, 2, 2, 523, 521, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 544, 3, 2, 2, 2, 525, 523, 3, 2, 2, 2, 526, 529, 5, 74, 38, 2, 527, 528, 7, 14, 2, 2, 528, 530, 5, 78, 40, 2, 529, 527, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 544, 3, 2, 2, 2, 531, 541, 5, 66, 34, 2, 532, 539, 7, 14, 2, 2, 533, 536, 5, 74, 38, 2, 534, 535, 7, 14, 2, 2, 535, 537, 5, 78, 40, 2, 536, 534, 3, 2, 2, 2, 536, 537, 3, 2, 2, 2, 537, 540, 3, 2, 2, 2, 538, 540, 5, 78, 40, 2, 539, 533, 3, 2, 2, 2, 539, 538, 3, 2, 2, 2, 540, 542, 3, 2, 2, 2, 541, 532, 3, 2, 2, 2, 541, 542, 3, 2, 2, 2, 542, 544, 3, 2, 2, 2, 543, 517, 3, 2, 2, 2, 543, 518, 3, 2, 2, 2, 543, 526, 3, 2, 2, 2, 543, 531, 3, 2, 2, 2, 544, 65, 3, 2, 2, 2, 545, 550, 5, 68, 35, 2, 546, 547, 7, 14, 2, 2, 547, 549, 5, 68, 35, 2, 548, 546, 3, 2, 2, 2, 549, 552, 3, 2, 2, 2, 550, 548, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 67, 3, 2, 2, 2, 552, 550, 3, 2, 2, 2, 553, 555, 5, 112, 57, 2, 554, 553, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 557, 3, 2, 2, 2, 556, 558, 5, 70, 36, 2, 557, 556, 3, 2, 2, 2, 557, 558, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 561, 5, 72, 37, 2, 560, 562, 5, 60, 31, 2, 561, 560, 3, 2, 2, 2, 561, 562, 3, 2, 2, 2, 562, 69, 3, 2, 2, 2, 563, 564, 9, 4, 2, 2, 564, 71, 3, 2, 2, 2, 565, 568, 5, 270, 136, 2, 566, 568, 5, 4, 3, 2, 567, 565, 3, 2, 2, 2, 567, 566, 3, 2, 2, 2, 568, 73, 3, 2, 2, 2, 569, 574, 5, 76, 39, 2, 570, 571, 7, 14, 2, 2, 571, 573, 5, 76, 39, 2, 572, 570, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 75, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 577, 579, 5, 112, 57, 2, 578, 577, 3, 2, 2, 2, 578, 579, 3, 2, 2, 2, 579, 581, 3, 2, 2, 2, 580, 582, 5, 70, 36, 2, 581, 580, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, 592, 5, 72, 37, 2, 584, 586, 7, 16, 2, 2, 585, 587, 5, 60, 31, 2, 586, 585, 3, 2, 2, 2, 586, 587, 3, 2, 2, 2, 587, 593, 3, 2, 2, 2, 588, 590, 5, 60, 31, 2, 589, 588, 3, 2, 2, 2, 589, 590, 3, 2, 2, 2, 590, 591, 3, 2, 2, 2, 591, 593, 5, 2, 2, 2, 592, 584, 3, 2, 2, 2, 592, 589, 3, 2, 2, 2, 593, 77, 3, 2, 2, 2, 594, 595, 7, 18, 2, 2, 595, 599, 5, 68, 35, 2, 596, 597, 7, 18, 2, 2, 597, 599, 5, 256, 129, 2, 598, 594, 3, 2, 2, 2, 598, 596, 3, 2, 2, 2, 599, 79, 3, 2, 2, 2, 600, 602, 7, 76, 2, 2, 601, 603, 5, 6, 4, 2, 602, 601, 3, 2, 2, 2, 602, 603, 3, 2, 2, 2, 603, 604, 3, 2, 2, 2, 604, 606, 7, 9, 2, 2, 605, 607, 5, 64, 33, 2, 606, 605, 3, 2, 2, 2, 606, 607, 3, 2, 2, 2, 607, 608, 3, 2, 2, 2, 608, 610, 7, 10, 2, 2, 609, 611, 5, 60, 31, 2, 610, 609, 3, 2, 2, 2, 610, 611, 3, 2, 2, 2, 611, 81, 3, 2, 2, 2, 612, 613, 7, 7, 2, 2, 613, 614, 7, 133, 2, 2, 614, 615, 7, 17, 2, 2, 615, 616, 9, 5, 2, 2, 616, 617, 7, 8, 2, 2, 617, 618, 5, 60, 31, 2, 618, 83, 3, 2, 2, 2, 619, 621, 5, 246, 124, 2, 620, 622, 7, 16, 2, 2, 621, 620, 3, 2, 2, 2, 621, 622, 3, 2, 2, 2, 622, 623, 3, 2, 2, 2, 623, 624, 5, 62, 32, 2, 624, 85, 3, 2, 2, 2, 625, 626, 7, 122, 2, 2, 626, 628, 7, 133, 2, 2, 627, 629, 5, 6, 4, 2, 628, 627, 3, 2, 2, 2, 628, 629, 3, 2, 2, 2, 629, 630, 3, 2, 2, 2, 630, 631, 7, 15, 2, 2, 631, 632, 5, 20, 11, 2, 632, 633, 7, 13, 2, 2, 633, 87, 3, 2, 2, 2, 634, 636, 5, 70, 36, 2, 635, 634, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 637, 3, 2, 2, 2, 637, 638, 7, 125, 2, 2, 638, 640, 7, 9, 2, 2, 639, 641, 5, 222, 112, 2, 640, 639, 3, 2, 2, 2, 640, 641, 3, 2, 2, 2, 641, 642, 3, 2, 2, 2, 642, 648, 7, 10, 2, 2, 643, 644, 7, 11, 2, 2, 644, 645, 5, 228, 115, 2, 645, 646, 7, 12, 2, 2, 646, 649, 3, 2, 2, 2, 647, 649, 7, 13, 2, 2, 648, 643, 3, 2, 2, 2, 648, 647, 3, 2, 2, 2, 648, 649, 3, 2, 2, 2, 649, 89, 3, 2, 2, 2, 650, 652, 7, 105, 2, 2, 651, 650, 3, 2, 2, 2, 651, 652, 3, 2, 2, 2, 652, 653, 3, 2, 2, 2, 653, 654, 7, 112, 2, 2, 654, 656, 7, 133, 2, 2, 655, 657, 5, 6, 4, 2, 656, 655, 3, 2, 2, 2, 656, 657, 3, 2, 2, 2, 657, 659, 3, 2, 2, 2, 658, 660, 5, 92, 47, 2, 659, 658, 3, 2, 2, 2, 659, 660, 3, 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 663, 5, 36, 19, 2, 662, 664, 7, 13, 2, 2, 663, 662, 3, 2, 2, 2, 663, 664, 3, 2, 2, 2, 664, 91, 3, 2, 2, 2, 665, 666, 7, 102, 2, 2, 666, 667, 5, 94, 48, 2, 667, 93, 3, 2, 2, 2, 668, 673, 5, 28, 15, 2, 669, 670, 7, 14, 2, 2, 670, 672, 5, 28, 15, 2, 671, 669, 3, 2, 2, 2, 672, 675, 3, 2, 2, 2, 673, 671, 3, 2, 2, 2, 673, 674, 3, 2, 2, 2, 674, 95, 3, 2, 2, 2, 675, 673, 3, 2, 2, 2, 676, 678, 7, 104, 2, 2, 677, 676, 3, 2, 2, 2, 677, 678, 3, 2, 2, 2, 678, 679, 3, 2, 2, 2, 679, 680, 7, 101, 2, 2, 680, 681, 7, 133, 2, 2, 681, 683, 7, 11, 2, 2, 682, 684, 5, 98, 50, 2, 683, 682, 3, 2, 2, 2, 683, 684, 3, 2, 2, 2, 684, 685, 3, 2, 2, 2, 685, 686, 7, 12, 2, 2, 686, 97, 3, 2, 2, 2, 687, 689, 5, 100, 51, 2, 688, 690, 7, 14, 2, 2, 689, 688, 3, 2, 2, 2, 689, 690, 3, 2, 2, 2, 690, 99, 3, 2, 2, 2, 691, 696, 5, 102, 52, 2, 692, 693, 7, 14, 2, 2, 693, 695, 5, 102, 52, 2, 694, 692, 3, 2, 2, 2, 695, 698, 3, 2, 2, 2, 696, 694, 3, 2, 2, 2, 696, 697, 3, 2, 2, 2, 697, 101, 3, 2, 2, 2, 698, 696, 3, 2, 2, 2, 699, 702, 5, 246, 124, 2, 700, 701, 7, 15, 2, 2, 701, 703, 5, 256, 129, 2, 702, 700, 3, 2, 2, 2, 702, 703, 3, 2, 2, 2, 703, 103, 3, 2, 2, 2, 704, 705, 7, 126, 2, 2, 705, 706, 5, 106, 54, 2, 706, 708, 7, 11, 2, 2, 707, 709, 5, 128, 65, 2, 708, 707, 3, 2, 2, 2, 708, 709, 3, 2, 2, 2, 709, 710, 3, 2, 2, 2, 710, 711, 7, 12, 2, 2, 711, 105, 3, 2, 2, 2, 712, 721, 7, 133, 2, 2, 713, 715, 7, 19, 2, 2, 714, 713, 3, 2, 2, 2, 715, 716, 3, 2, 2, 2, 716, 714, 3, 2, 2, 2, 716, 717, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 720, 7, 133, 2, 2, 719, 714, 3, 2, 2, 2, 720, 723, 3, 2, 2, 2, 721, 719, 3, 2, 2, 2, 721, 722, 3, 2, 2, 2, 722, 107, 3, 2, 2, 2, 723, 721, 3, 2, 2, 2, 724, 725, 7, 133, 2, 2, 725, 726, 7, 15, 2, 2, 726, 727, 5, 106, 54, 2, 727, 728, 7, 13, 2, 2, 728, 737, 3, 2, 2, 2, 729, 730, 7, 133, 2, 2, 730, 731, 7, 15, 2, 2, 731, 732, 7, 127, 2, 2, 732, 733, 7, 9, 2, 2, 733, 734, 7, 134, 2, 2, 734, 735, 7, 10, 2, 2, 735, 737, 7, 13, 2, 2, 736, 724, 3, 2, 2, 2, 736, 729, 3, 2, 2, 2, 737, 109, 3, 2, 2, 2, 738, 739, 7, 134, 2, 2, 739, 111, 3, 2, 2, 2, 740, 742, 5, 114, 58, 2, 741, 740, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 741, 3, 2, 2, 2, 743, 744, 3, 2, 2, 2, 744, 113, 3, 2, 2, 2, 745, 748, 7, 132, 2, 2, 746, 749, 5, 116, 59, 2, 747, 749, 5, 118, 60, 2, 748, 746, 3, 2, 2, 2, 748, 747, 3, 2, 2, 2, 749, 115, 3, 2, 2, 2, 750, 751, 8, 59, 1, 2, 751, 757, 7, 133, 2, 2, 752, 753, 7, 9, 2, 2, 753, 754, 5, 256, 129, 2, 754, 755, 7, 10, 2, 2, 755, 757, 3, 2, 2, 2, 756, 750, 3, 2, 2, 2, 756, 752, 3, 2, 2, 2, 757, 763, 3, 2, 2, 2, 758, 759, 12, 4, 2, 2, 759, 760, 7, 19, 2, 2, 760, 762, 5, 270, 136, 2, 761, 758, 3, 2, 2, 2, 762, 765, 3, 2, 2, 2, 763, 761, 3, 2, 2, 2, 763, 764, 3, 2, 2, 2, 764, 117, 3, 2, 2, 2, 765, 763, 3, 2, 2, 2, 766, 767, 5, 116, 59, 2, 767, 768, 5, 248, 125, 2, 768, 119, 3, 2, 2, 2, 769, 771, 5, 230, 116, 2, 770, 769, 3, 2, 2, 2, 770, 771, 3, 2, 2, 2, 771, 772, 3, 2, 2, 2, 772, 773, 7, 2, 2, 3, 773, 121, 3, 2, 2, 2, 774, 776, 7, 105, 2, 2, 775, 774, 3, 2, 2, 2, 775, 776, 3, 2, 2, 2, 776, 777, 3, 2, 2, 2, 777, 778, 5, 124, 63, 2, 778, 123, 3, 2, 2, 2, 779, 809, 5, 126, 64, 2, 780, 809, 5, 140, 71, 2, 781, 809, 5, 132, 67, 2, 782, 809, 5, 138, 70, 2, 783, 809, 5, 146, 74, 2, 784, 809, 5, 130, 66, 2, 785, 809, 5, 192, 97, 2, 786, 809, 5, 90, 46, 2, 787, 809, 5, 104, 53, 2, 788, 809, 5, 150, 76, 2, 789, 809, 5, 152, 77, 2, 790, 809, 5, 156, 79, 2, 791, 809, 5, 158, 80, 2, 792, 809, 5, 160, 81, 2, 793, 809, 5, 162, 82, 2, 794, 809, 5, 164, 83, 2, 795, 809, 5, 176, 89, 2, 796, 809, 5, 166, 84, 2, 797, 809, 5, 178, 90, 2, 798, 809, 5, 180, 91, 2, 799, 809, 5, 188, 95, 2, 800, 809, 5, 190, 96, 2, 801, 809, 5, 258, 130, 2, 802, 809, 5, 212, 107, 2, 803, 809, 5, 86, 44, 2, 804, 809, 5, 96, 49, 2, 805, 809, 5, 148, 75, 2, 806, 807, 7, 105, 2, 2, 807, 809, 5, 124, 63, 2, 808, 779, 3, 2, 2, 2, 808, 780, 3, 2, 2, 2, 808, 781, 3, 2, 2, 2, 808, 782, 3, 2, 2, 2, 808, 783, 3, 2, 2, 2, 808, 784, 3, 2, 2, 2, 808, 785, 3, 2, 2, 2, 808, 786, 3, 2, 2, 2, 808, 787, 3, 2, 2, 2, 808, 788, 3, 2, 2, 2, 808, 789, 3, 2, 2, 2, 808, 790, 3, 2, 2, 2, 808, 791, 3, 2, 2, 2, 808, 792, 3, 2, 2, 2, 808, 793, 3, 2, 2, 2, 808, 794, 3, 2, 2, 2, 808, 795, 3, 2, 2, 2, 808, 796, 3, 2, 2, 2, 808, 797, 3, 2, 2, 2, 808, 798, 3, 2, 2, 2, 808, 799, 3, 2, 2, 2, 808, 800, 3, 2, 2, 2, 808, 801, 3, 2, 2, 2, 808, 802, 3, 2, 2, 2, 808, 803, 3, 2, 2, 2, 808, 804, 3, 2, 2, 2, 808, 805, 3, 2, 2, 2, 808, 806, 3, 2, 2, 2, 809, 125, 3, 2, 2, 2, 810, 812, 7, 11, 2, 2, 811, 813, 5, 128, 65, 2, 812, 811, 3, 2, 2, 2, 812, 813, 3, 2, 2, 2, 813, 814, 3, 2, 2, 2, 814, 815, 7, 12, 2, 2, 815, 127, 3, 2, 2, 2, 816, 818, 5, 124, 63, 2, 817, 816, 3, 2, 2, 2, 818, 819, 3, 2, 2, 2, 819, 817, 3, 2, 2, 2, 819, 820, 3, 2, 2, 2, 820, 129, 3, 2, 2, 2, 821, 825, 7, 130, 2, 2, 822, 823, 7, 133, 2, 2, 823, 826, 5, 62, 32, 2, 824, 826, 5, 140, 71, 2, 825, 822, 3, 2, 2, 2, 825, 824, 3, 2, 2, 2, 826, 827, 3, 2, 2, 2, 827, 828, 5, 280, 141, 2, 828, 131, 3, 2, 2, 2, 829, 833, 7, 106, 2, 2, 830, 834, 5, 134, 68, 2, 831, 834, 5, 108, 55, 2, 832, 834, 5, 110, 56, 2, 833, 830, 3, 2, 2, 2, 833, 831, 3, 2, 2, 2, 833, 832, 3, 2, 2, 2, 834, 835, 3, 2, 2, 2, 835, 836, 5, 280, 141, 2, 836, 133, 3, 2, 2, 2, 837, 843, 7, 28, 2, 2, 838, 843, 7, 27, 2, 2, 839, 843, 7, 26, 2, 2, 840, 843, 5, 136, 69, 2, 841, 843, 5, 270, 136, 2, 842, 837, 3, 2, 2, 2, 842, 838, 3, 2, 2, 2, 842, 839, 3, 2, 2, 2, 842, 840, 3, 2, 2, 2, 842, 841, 3, 2, 2, 2, 843, 846, 3, 2, 2, 2, 844, 845, 7, 96, 2, 2, 845, 847, 5, 270, 136, 2, 846, 844, 3, 2, 2, 2, 846, 847, 3, 2, 2, 2, 847, 848, 3, 2, 2, 2, 848, 849, 7, 97, 2, 2, 849, 850, 7, 134, 2, 2, 850, 135, 3, 2, 2, 2, 851, 852, 5, 270, 136, 2, 852, 853, 7, 14, 2, 2, 853, 855, 3, 2, 2, 2, 854, 851, 3, 2, 2, 2, 854, 855, 3, 2, 2, 2, 855, 856, 3, 2, 2, 2, 856, 857, 7, 11, 2, 2, 857, 862, 5, 270, 136, 2, 858, 859, 7, 14, 2, 2, 859, 861, 5, 270, 136, 2, 860, 858, 3, 2, 2, 2, 861, 864, 3, 2, 2, 2, 862, 860, 3, 2, 2, 2, 862, 863, 3, 2, 2, 2, 863, 865, 3, 2, 2, 2, 864, 862, 3, 2, 2, 2, 865, 866, 7, 12, 2, 2, 866, 137, 3, 2, 2, 2, 867, 869, 7, 105, 2, 2, 868, 870, 7, 90, 2, 2, 869, 868, 3, 2, 2, 2, 869, 870, 3, 2, 2, 2, 870, 873, 3, 2, 2, 2, 871, 874, 5, 134, 68, 2, 872, 874, 5, 124, 63, 2, 873, 871, 3, 2, 2, 2, 873, 872, 3, 2, 2, 2, 874, 139, 3, 2, 2, 2, 875, 877, 5, 4, 3, 2, 876, 878, 5, 60, 31, 2, 877, 876, 3, 2, 2, 2, 877, 878, 3, 2, 2, 2, 878, 879, 3, 2, 2, 2, 879, 881, 5, 2, 2, 2, 880, 882, 7, 13, 2, 2, 881, 880, 3, 2, 2, 2, 881, 882, 3, 2, 2, 2, 882, 897, 3, 2, 2, 2, 883, 885, 5, 70, 36, 2, 884, 883, 3, 2, 2, 2, 884, 885, 3, 2, 2, 2, 885, 887, 3, 2, 2, 2, 886, 888, 5, 154, 78, 2, 887, 886, 3, 2, 2, 2, 887, 888, 3, 2, 2, 2, 888, 890, 3, 2, 2, 2, 889, 891, 7, 98, 2, 2, 890, 889, 3, 2, 2, 2, 890, 891, 3, 2, 2, 2, 891, 892, 3, 2, 2, 2, 892, 894, 5, 142, 72, 2, 893, 895, 7, 13, 2, 2, 894, 893, 3, 2, 2, 2, 894, 895, 3, 2, 2, 2, 895, 897, 3, 2, 2, 2, 896, 875, 3, 2, 2, 2, 896, 884, 3, 2, 2, 2, 897, 141, 3, 2, 2, 2, 898, 903, 5, 144, 73, 2, 899, 900, 7, 14, 2, 2, 900, 902, 5, 144, 73, 2, 901, 899, 3, 2, 2, 2, 902, 905, 3, 2, 2, 2, 903, 901, 3, 2, 2, 2, 903, 904, 3, 2, 2, 2, 904, 143, 3, 2, 2, 2, 905, 903, 3, 2, 2, 2, 906, 908, 5, 184, 93, 2, 907, 909, 5, 60, 31, 2, 908, 907, 3, 2, 2, 2, 908, 909, 3, 2, 2, 2, 909, 911, 3, 2, 2, 2, 910, 912, 5, 256, 129, 2, 911, 910, 3, 2, 2, 2, 911, 912, 3, 2, 2, 2, 912, 918, 3, 2, 2, 2, 913, 915, 7, 15, 2, 2, 914, 916, 5, 6, 4, 2, 915, 914, 3, 2, 2, 2, 915, 916, 3, 2, 2, 2, 916, 917, 3, 2, 2, 2, 917, 919, 5, 256, 129, 2, 918, 913, 3, 2, 2, 2, 918, 919, 3, 2, 2, 2, 919, 145, 3, 2, 2, 2, 920, 921, 7, 13, 2, 2, 921, 147, 3, 2, 2, 2, 922, 923, 6, 75, 8, 2, 923, 925, 5, 252, 127, 2, 924, 926, 7, 13, 2, 2, 925, 924, 3, 2, 2, 2, 925, 926, 3, 2, 2, 2, 926, 149, 3, 2, 2, 2, 927, 928, 7, 91, 2, 2, 928, 929, 7, 9, 2, 2, 929, 930, 5, 252, 127, 2, 930, 931, 7, 10, 2, 2, 931, 934, 5, 124, 63, 2, 932, 933, 7, 75, 2, 2, 933, 935, 5, 124, 63, 2, 934, 932, 3, 2, 2, 2, 934, 935, 3, 2, 2, 2, 935, 151, 3, 2, 2, 2, 936, 937, 7, 71, 2, 2, 937, 938, 5, 124, 63, 2, 938, 939, 7, 85, 2, 2, 939, 940, 7, 9, 2, 2, 940, 941, 5, 252, 127, 2, 941, 942, 7, 10, 2, 2, 942, 943, 5, 280, 141, 2, 943, 1012, 3, 2, 2, 2, 944, 945, 7, 85, 2, 2, 945, 946, 7, 9, 2, 2, 946, 947, 5, 252, 127, 2, 947, 948, 7, 10, 2, 2, 948, 949, 5, 124, 63, 2, 949, 1012, 3, 2, 2, 2, 950, 951, 7, 83, 2, 2, 951, 953, 7, 9, 2, 2, 952, 954, 5, 252, 127, 2, 953, 952, 3, 2, 2, 2, 953, 954, 3, 2, 2, 2, 954, 955, 3, 2, 2, 2, 955, 957, 7, 13, 2, 2, 956, 958, 5, 252, 127, 2, 957, 956, 3, 2, 2, 2, 957, 958, 3, 2, 2, 2, 958, 959, 3, 2, 2, 2, 959, 961, 7, 13, 2, 2, 960, 962, 5, 252, 127, 2, 961, 960, 3, 2, 2, 2, 961, 962, 3, 2, 2, 2, 962, 963, 3, 2, 2, 2, 963, 964, 7, 10, 2, 2, 964, 1012, 5, 124, 63, 2, 965, 966, 7, 83, 2, 2, 966, 967, 7, 9, 2, 2, 967, 968, 5, 154, 78, 2, 968, 969, 5, 142, 72, 2, 969, 971, 7, 13, 2, 2, 970, 972, 5, 252, 127, 2, 971, 970, 3, 2, 2, 2, 971, 972, 3, 2, 2, 2, 972, 973, 3, 2, 2, 2, 973, 975, 7, 13, 2, 2, 974, 976, 5, 252, 127, 2, 975, 974, 3, 2, 2, 2, 975, 976, 3, 2, 2, 2, 976, 977, 3, 2, 2, 2, 977, 978, 7, 10, 2, 2, 978, 979, 5, 124, 63, 2, 979, 1012, 3, 2, 2, 2, 980, 982, 7, 83, 2, 2, 981, 983, 7, 107, 2, 2, 982, 981, 3, 2, 2, 2, 982, 983, 3, 2, 2, 2, 983, 984, 3, 2, 2, 2, 984, 985, 7, 9, 2, 2, 985, 989, 5, 256, 129, 2, 986, 990, 7, 94, 2, 2, 987, 988, 7, 133, 2, 2, 988, 990, 6, 77, 9, 2, 989, 986, 3, 2, 2, 2, 989, 987, 3, 2, 2, 2, 990, 991, 3, 2, 2, 2, 991, 992, 5, 252, 127, 2, 992, 993, 7, 10, 2, 2, 993, 994, 5, 124, 63, 2, 994, 1012, 3, 2, 2, 2, 995, 997, 7, 83, 2, 2, 996, 998, 7, 107, 2, 2, 997, 996, 3, 2, 2, 2, 997, 998, 3, 2, 2, 2, 998, 999, 3, 2, 2, 2, 999, 1000, 7, 9, 2, 2, 1000, 1001, 5, 154, 78, 2, 1001, 1005, 5, 144, 73, 2, 1002, 1006, 7, 94, 2, 2, 1003, 1004, 7, 133, 2, 2, 1004, 1006, 6, 77, 10, 2, 1005, 1002, 3, 2, 2, 2, 1005, 1003, 3, 2, 2, 2, 1006, 1007, 3, 2, 2, 2, 1007, 1008, 5, 252, 127, 2, 1008, 1009, 7, 10, 2, 2, 1009, 1010, 5, 124, 63, 2, 1010, 1012, 3, 2, 2, 2, 1011, 936, 3, 2, 2, 2, 1011, 944, 3, 2, 2, 2, 1011, 950, 3, 2, 2, 2, 1011, 965, 3, 2, 2, 2, 1011, 980, 3, 2, 2, 2, 1011, 995, 3, 2, 2, 2, 1012, 153, 3, 2, 2, 2, 1013, 1014, 9, 6, 2, 2, 1014, 155, 3, 2, 2, 2, 1015, 1018, 7, 82, 2, 2, 1016, 1017, 6, 79, 11, 2, 1017, 1019, 7, 133, 2, 2, 1018, 1016, 3, 2, 2, 2, 1018, 1019, 3, 2, 2, 2, 1019, 1020, 3, 2, 2, 2, 1020, 1021, 5, 280, 141, 2, 1021, 157, 3, 2, 2, 2, 1022, 1025, 7, 70, 2, 2, 1023, 1024, 6, 80, 12, 2, 1024, 1026, 7, 133, 2, 2, 1025, 1023, 3, 2, 2, 2, 1025, 1026, 3, 2, 2, 2, 1026, 1027, 3, 2, 2, 2, 1027, 1028, 5, 280, 141, 2, 1028, 159, 3, 2, 2, 2, 1029, 1032, 7, 80, 2, 2, 1030, 1031, 6, 81, 13, 2, 1031, 1033, 5, 252, 127, 2, 1032, 1030, 3, 2, 2, 2, 1032, 1033, 3, 2, 2, 2, 1033, 1034, 3, 2, 2, 2, 1034, 1035, 5, 280, 141, 2, 1035, 161, 3, 2, 2, 2, 1036, 1039, 7, 116, 2, 2, 1037, 1038, 6, 82, 14, 2, 1038, 1040, 5, 252, 127, 2, 1039, 1037, 3, 2, 2, 2, 1039, 1040, 3, 2, 2, 2, 1040, 1041, 3, 2, 2, 2, 1041, 1042, 5, 280, 141, 2, 1042, 163, 3, 2, 2, 2, 1043, 1044, 7, 89, 2, 2, 1044, 1045, 7, 9, 2, 2, 1045, 1046, 5, 252, 127, 2, 1046, 1047, 7, 10, 2, 2, 1047, 1048, 5, 124, 63, 2, 1048, 165, 3, 2, 2, 2, 1049, 1050, 7, 84, 2, 2, 1050, 1051, 7, 9, 2, 2, 1051, 1052, 5, 252, 127, 2, 1052, 1053, 7, 10, 2, 2, 1053, 1054, 5, 168, 85, 2, 1054, 167, 3, 2, 2, 2, 1055, 1057, 7, 11, 2, 2, 1056, 1058, 5, 170, 86, 2, 1057, 1056, 3, 2, 2, 2, 1057, 1058, 3, 2, 2, 2, 1058, 1063, 3, 2, 2, 2, 1059, 1061, 5, 174, 88, 2, 1060, 1062, 5, 170, 86, 2, 1061, 1060, 3, 2, 2, 2, 1061, 1062, 3, 2, 2, 2, 1062, 1064, 3, 2, 2, 2, 1063, 1059, 3, 2, 2, 2, 1063, 1064, 3, 2, 2, 2, 1064, 1065, 3, 2, 2, 2, 1065, 1066, 7, 12, 2, 2, 1066, 169, 3, 2, 2, 2, 1067, 1069, 5, 172, 87, 2, 1068, 1067, 3, 2, 2, 2, 1069, 1070, 3, 2, 2, 2, 1070, 1068, 3, 2, 2, 2, 1070, 1071, 3, 2, 2, 2, 1071, 171, 3, 2, 2, 2, 1072, 1073, 7, 74, 2, 2, 1073, 1074, 5, 252, 127, 2, 1074, 1076, 7, 17, 2, 2, 1075, 1077, 5, 128, 65, 2, 1076, 1075, 3, 2, 2, 2, 1076, 1077, 3, 2, 2, 2, 1077, 173, 3, 2, 2, 2, 1078, 1079, 7, 90, 2, 2, 1079, 1081, 7, 17, 2, 2, 1080, 1082, 5, 128, 65, 2, 1081, 1080, 3, 2, 2, 2, 1081, 1082, 3, 2, 2, 2, 1082, 175, 3, 2, 2, 2, 1083, 1084, 7, 133, 2, 2, 1084, 1085, 7, 17, 2, 2, 1085, 1086, 5, 124, 63, 2, 1086, 177, 3, 2, 2, 2, 1087, 1088, 7, 92, 2, 2, 1088, 1089, 6, 90, 15, 2, 1089, 1090, 5, 252, 127, 2, 1090, 1091, 5, 280, 141, 2, 1091, 179, 3, 2, 2, 2, 1092, 1093, 7, 95, 2, 2, 1093, 1099, 5, 126, 64, 2, 1094, 1096, 5, 182, 92, 2, 1095, 1097, 5, 186, 94, 2, 1096, 1095, 3, 2, 2, 2, 1096, 1097, 3, 2, 2, 2, 1097, 1100, 3, 2, 2, 2, 1098, 1100, 5, 186, 94, 2, 1099, 1094, 3, 2, 2, 2, 1099, 1098, 3, 2, 2, 2, 1100, 181, 3, 2, 2, 2, 1101, 1107, 7, 78, 2, 2, 1102, 1104, 7, 9, 2, 2, 1103, 1105, 5, 184, 93, 2, 1104, 1103, 3, 2, 2, 2, 1104, 1105, 3, 2, 2, 2, 1105, 1106, 3, 2, 2, 2, 1106, 1108, 7, 10, 2, 2, 1107, 1102, 3, 2, 2, 2, 1107, 1108, 3, 2, 2, 2, 1108, 1109, 3, 2, 2, 2, 1109, 1110, 5, 126, 64, 2, 1110, 183, 3, 2, 2, 2, 1111, 1115, 7, 133, 2, 2, 1112, 1115, 5, 232, 117, 2, 1113, 1115, 5, 238, 120, 2, 1114, 1111, 3, 2, 2, 2, 1114, 1112, 3, 2, 2, 2, 1114, 1113, 3, 2, 2, 2, 1115, 185, 3, 2, 2, 2, 1116, 1117, 7, 79, 2, 2, 1117, 1118, 5, 126, 64, 2, 1118, 187, 3, 2, 2, 2, 1119, 1120, 7, 86, 2, 2, 1120, 1121, 5, 280, 141, 2, 1121, 189, 3, 2, 2, 2, 1122, 1124, 7, 99, 2, 2, 1123, 1122, 3, 2, 2, 2, 1123, 1124, 3, 2, 2, 2, 1124, 1125, 3, 2, 2, 2, 1125, 1127, 7, 87, 2, 2, 1126, 1128, 7, 26, 2, 2, 1127, 1126, 3, 2, 2, 2, 1127, 1128, 3, 2, 2, 2, 1128, 1129, 3, 2, 2, 2, 1129, 1130, 7, 133, 2, 2, 1130, 1136, 5, 62, 32, 2, 1131, 1132, 7, 11, 2, 2, 1132, 1133, 5, 228, 115, 2, 1133, 1134, 7, 12, 2, 2, 1134, 1137, 3, 2, 2, 2, 1135, 1137, 7, 13, 2, 2, 1136, 1131, 3, 2, 2, 2, 1136, 1135, 3, 2, 2, 2, 1137, 191, 3, 2, 2, 2, 1138, 1140, 7, 130, 2, 2, 1139, 1138, 3, 2, 2, 2, 1139, 1140, 3, 2, 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 7, 100, 2, 2, 1142, 1144, 7, 133, 2, 2, 1143, 1145, 5, 6, 4, 2, 1144, 1143, 3, 2, 2, 2, 1144, 1145, 3, 2, 2, 2, 1145, 1146, 3, 2, 2, 2, 1146, 1147, 5, 194, 98, 2, 1147, 1148, 5, 196, 99, 2, 1148, 193, 3, 2, 2, 2, 1149, 1151, 5, 198, 100, 2, 1150, 1149, 3, 2, 2, 2, 1150, 1151, 3, 2, 2, 2, 1151, 1153, 3, 2, 2, 2, 1152, 1154, 5, 200, 101, 2, 1153, 1152, 3, 2, 2, 2, 1153, 1154, 3, 2, 2, 2, 1154, 195, 3, 2, 2, 2, 1155, 1159, 7, 11, 2, 2, 1156, 1158, 5, 202, 102, 2, 1157, 1156, 3, 2, 2, 2, 1158, 1161, 3, 2, 2, 2, 1159, 1157, 3, 2, 2, 2, 1159, 1160, 3, 2, 2, 2, 1160, 1162, 3, 2, 2, 2, 1161, 1159, 3, 2, 2, 2, 1162, 1163, 7, 12, 2, 2, 1163, 197, 3, 2, 2, 2, 1164, 1165, 7, 102, 2, 2, 1165, 1166, 5, 28, 15, 2, 1166, 199, 3, 2, 2, 2, 1167, 1168, 7, 108, 2, 2, 1168, 1169, 5, 94, 48, 2, 1169, 201, 3, 2, 2, 2, 1170, 1175, 5, 88, 45, 2, 1171, 1175, 5, 204, 103, 2, 1172, 1175, 5, 208, 105, 2, 1173, 1175, 5, 124, 63, 2, 1174, 1170, 3, 2, 2, 2, 1174, 1171, 3, 2, 2, 2, 1174, 1172, 3, 2, 2, 2, 1174, 1173, 3, 2, 2, 2, 1175, 203, 3, 2, 2, 2, 1176, 1178, 5, 206, 104, 2, 1177, 1179, 7, 26, 2, 2, 1178, 1177, 3, 2, 2, 2, 1178, 1179, 3, 2, 2, 2, 1179, 1181, 3, 2, 2, 2, 1180, 1182, 7, 33, 2, 2, 1181, 1180, 3, 2, 2, 2, 1181, 1182, 3, 2, 2, 2, 1182, 1183, 3, 2, 2, 2, 1183, 1185, 5, 246, 124, 2, 1184, 1186, 5, 60, 31, 2, 1185, 1184, 3, 2, 2, 2, 1185, 1186, 3, 2, 2, 2, 1186, 1188, 3, 2, 2, 2, 1187, 1189, 5, 2, 2, 2, 1188, 1187, 3, 2, 2, 2, 1188, 1189, 3, 2, 2, 2, 1189, 1190, 3, 2, 2, 2, 1190, 1191, 7, 13, 2, 2, 1191, 1221, 3, 2, 2, 2, 1192, 1194, 5, 206, 104, 2, 1193, 1195, 7, 26, 2, 2, 1194, 1193, 3, 2, 2, 2, 1194, 1195, 3, 2, 2, 2, 1195, 1197, 3, 2, 2, 2, 1196, 1198, 7, 33, 2, 2, 1197, 1196, 3, 2, 2, 2, 1197, 1198, 3, 2, 2, 2, 1198, 1199, 3, 2, 2, 2, 1199, 1200, 5, 246, 124, 2, 1200, 1206, 5, 62, 32, 2, 1201, 1202, 7, 11, 2, 2, 1202, 1203, 5, 228, 115, 2, 1203, 1204, 7, 12, 2, 2, 1204, 1207, 3, 2, 2, 2, 1205, 1207, 7, 13, 2, 2, 1206, 1201, 3, 2, 2, 2, 1206, 1205, 3, 2, 2, 2, 1207, 1221, 3, 2, 2, 2, 1208, 1210, 5, 206, 104, 2, 1209, 1211, 7, 26, 2, 2, 1210, 1209, 3, 2, 2, 2, 1210, 1211, 3, 2, 2, 2, 1211, 1213, 3, 2, 2, 2, 1212, 1214, 7, 33, 2, 2, 1213, 1212, 3, 2, 2, 2, 1213, 1214, 3, 2, 2, 2, 1214, 1217, 3, 2, 2, 2, 1215, 1218, 5, 242, 122, 2, 1216, 1218, 5, 244, 123, 2, 1217, 1215, 3, 2, 2, 2, 1217, 1216, 3, 2, 2, 2, 1218, 1221, 3, 2, 2, 2, 1219, 1221, 5, 130, 66, 2, 1220, 1176, 3, 2, 2, 2, 1220, 1192, 3, 2, 2, 2, 1220, 1208, 3, 2, 2, 2, 1220, 1219, 3, 2, 2, 2, 1221, 205, 3, 2, 2, 2, 1222, 1224, 7, 99, 2, 2, 1223, 1222, 3, 2, 2, 2, 1223, 1224, 3, 2, 2, 2, 1224, 1226, 3, 2, 2, 2, 1225, 1227, 5, 70, 36, 2, 1226, 1225, 3, 2, 2, 2, 1226, 1227, 3, 2, 2, 2, 1227, 1229, 3, 2, 2, 2, 1228, 1230, 7, 115, 2, 2, 1229, 1228, 3, 2, 2, 2, 1229, 1230, 3, 2, 2, 2, 1230, 1232, 3, 2, 2, 2, 1231, 1233, 7, 98, 2, 2, 1232, 1231, 3, 2, 2, 2, 1232, 1233, 3, 2, 2, 2, 1233, 207, 3, 2, 2, 2, 1234, 1235, 5, 82, 42, 2, 1235, 1236, 7, 13, 2, 2, 1236, 209, 3, 2, 2, 2, 1237, 1239, 7, 26, 2, 2, 1238, 1237, 3, 2, 2, 2, 1238, 1239, 3, 2, 2, 2, 1239, 1240, 3, 2, 2, 2, 1240, 1241, 7, 133, 2, 2, 1241, 1243, 7, 9, 2, 2, 1242, 1244, 5, 222, 112, 2, 1243, 1242, 3, 2, 2, 2, 1243, 1244, 3, 2, 2, 2, 1244, 1245, 3, 2, 2, 2, 1245, 1246, 7, 10, 2, 2, 1246, 1247, 7, 11, 2, 2, 1247, 1248, 5, 228, 115, 2, 1248, 1249, 7, 12, 2, 2, 1249, 211, 3, 2, 2, 2, 1250, 1251, 7, 87, 2, 2, 1251, 1253, 7, 26, 2, 2, 1252, 1254, 7, 133, 2, 2, 1253, 1252, 3, 2, 2, 2, 1253, 1254, 3, 2, 2, 2, 1254, 1255, 3, 2, 2, 2, 1255, 1257, 7, 9, 2, 2, 1256, 1258, 5, 222, 112, 2, 1257, 1256, 3, 2, 2, 2, 1257, 1258, 3, 2, 2, 2, 1258, 1259, 3, 2, 2, 2, 1259, 1260, 7, 10, 2, 2, 1260, 1261, 7, 11, 2, 2, 1261, 1262, 5, 228, 115, 2, 1262, 1263, 7, 12, 2, 2, 1263, 213, 3, 2, 2, 2, 1264, 1265, 7, 11, 2, 2, 1265, 1270, 5, 216, 109, 2, 1266, 1267, 7, 14, 2, 2, 1267, 1269, 5, 216, 109, 2, 1268, 1266, 3, 2, 2, 2, 1269, 1272, 3, 2, 2, 2, 1270, 1268, 3, 2, 2, 2, 1270, 1271, 3, 2, 2, 2, 1271, 1274, 3, 2, 2, 2, 1272, 1270, 3, 2, 2, 2, 1273, 1275, 7, 14, 2, 2, 1274, 1273, 3, 2, 2, 2, 1274, 1275, 3, 2, 2, 2, 1275, 1276, 3, 2, 2, 2, 1276, 1277, 7, 12, 2, 2, 1277, 215, 3, 2, 2, 2, 1278, 1279, 7, 26, 2, 2, 1279, 1280, 5, 220, 111, 2, 1280, 217, 3, 2, 2, 2, 1281, 1282, 7, 11, 2, 2, 1282, 1287, 5, 220, 111, 2, 1283, 1284, 7, 14, 2, 2, 1284, 1286, 5, 220, 111, 2, 1285, 1283, 3, 2, 2, 2, 1286, 1289, 3, 2, 2, 2, 1287, 1285, 3, 2, 2, 2, 1287, 1288, 3, 2, 2, 2, 1288, 1291, 3, 2, 2, 2, 1289, 1287, 3, 2, 2, 2, 1290, 1292, 7, 14, 2, 2, 1291, 1290, 3, 2, 2, 2, 1291, 1292, 3, 2, 2, 2, 1292, 1293, 3, 2, 2, 2, 1293, 1294, 7, 12, 2, 2, 1294, 219, 3, 2, 2, 2, 1295, 1296, 7, 7, 2, 2, 1296, 1297, 5, 256, 129, 2, 1297, 1298, 7, 8, 2, 2, 1298, 1300, 7, 9, 2, 2, 1299, 1301, 5, 222, 112, 2, 1300, 1299, 3, 2, 2, 2, 1300, 1301, 3, 2, 2, 2, 1301, 1302, 3, 2, 2, 2, 1302, 1303, 7, 10, 2, 2, 1303, 1304, 7, 11, 2, 2, 1304, 1305, 5, 228, 115, 2, 1305, 1306, 7, 12, 2, 2, 1306, 221, 3, 2, 2, 2, 1307, 1312, 5, 224, 113, 2, 1308, 1309, 7, 14, 2, 2, 1309, 1311, 5, 224, 113, 2, 1310, 1308, 3, 2, 2, 2, 1311, 1314, 3, 2, 2, 2, 1312, 1310, 3, 2, 2, 2, 1312, 1313, 3, 2, 2, 2, 1313, 1317, 3, 2, 2, 2, 1314, 1312, 3, 2, 2, 2, 1315, 1316, 7, 14, 2, 2, 1316, 1318, 5, 226, 114, 2, 1317, 1315, 3, 2, 2, 2, 1317, 1318, 3, 2, 2, 2, 1318, 1327, 3, 2, 2, 2, 1319, 1327, 5, 226, 114, 2, 1320, 1327, 5, 232, 117, 2, 1321, 1324, 5, 238, 120, 2, 1322, 1323, 7, 17, 2, 2, 1323, 1325, 5, 222, 112, 2, 1324, 1322, 3, 2, 2, 2, 1324, 1325, 3, 2, 2, 2, 1325, 1327, 3, 2, 2, 2, 1326, 1307, 3, 2, 2, 2, 1326, 1319, 3, 2, 2, 2, 1326, 1320, 3, 2, 2, 2, 1326, 1321, 3, 2, 2, 2, 1327, 223, 3, 2, 2, 2, 1328, 1330, 5, 70, 36, 2, 1329, 1328, 3, 2, 2, 2, 1329, 1330, 3, 2, 2, 2, 1330, 1331, 3, 2, 2, 2, 1331, 1333, 7, 133, 2, 2, 1332, 1334, 5, 60, 31, 2, 1333, 1332, 3, 2, 2, 2, 1333, 1334, 3, 2, 2, 2, 1334, 1337, 3, 2, 2, 2, 1335, 1336, 7, 15, 2, 2, 1336, 1338, 5, 256, 129, 2, 1337, 1335, 3, 2, 2, 2, 1337, 1338, 3, 2, 2, 2, 1338, 225, 3, 2, 2, 2, 1339, 1340, 7, 18, 2, 2, 1340, 1341, 7, 133, 2, 2, 1341, 227, 3, 2, 2, 2, 1342, 1344, 5, 230, 116, 2, 1343, 1342, 3, 2, 2, 2, 1343, 1344, 3, 2, 2, 2, 1344, 229, 3, 2, 2, 2, 1345, 1347, 5, 122, 62, 2, 1346, 1345, 3, 2, 2, 2, 1347, 1348, 3, 2, 2, 2, 1348, 1346, 3, 2, 2, 2, 1348, 1349, 3, 2, 2, 2, 1349, 231, 3, 2, 2, 2, 1350, 1352, 7, 7, 2, 2, 1351, 1353, 5, 234, 118, 2, 1352, 1351, 3, 2, 2, 2, 1352, 1353, 3, 2, 2, 2, 1353, 1354, 3, 2, 2, 2, 1354, 1355, 7, 8, 2, 2, 1355, 233, 3, 2, 2, 2, 1356, 1365, 5, 256, 129, 2, 1357, 1359, 7, 14, 2, 2, 1358, 1357, 3, 2, 2, 2, 1359, 1360, 3, 2, 2, 2, 1360, 1358, 3, 2, 2, 2, 1360, 1361, 3, 2, 2, 2, 1361, 1362, 3, 2, 2, 2, 1362, 1364, 5, 256, 129, 2, 1363, 1358, 3, 2, 2, 2, 1364, 1367, 3, 2, 2, 2, 1365, 1363, 3, 2, 2, 2, 1365, 1366, 3, 2, 2, 2, 1366, 1374, 3, 2, 2, 2, 1367, 1365, 3, 2, 2, 2, 1368, 1370, 7, 14, 2, 2, 1369, 1368, 3, 2, 2, 2, 1370, 1371, 3, 2, 2, 2, 1371, 1369, 3, 2, 2, 2, 1371, 1372, 3, 2, 2, 2, 1372, 1373, 3, 2, 2, 2, 1373, 1375, 5, 236, 119, 2, 1374, 1369, 3, 2, 2, 2, 1374, 1375, 3, 2, 2, 2, 1375, 1378, 3, 2, 2, 2, 1376, 1378, 5, 236, 119, 2, 1377, 1356, 3, 2, 2, 2, 1377, 1376, 3, 2, 2, 2, 1378, 235, 3, 2, 2, 2, 1379, 1382, 7, 18, 2, 2, 1380, 1383, 7, 133, 2, 2, 1381, 1383, 5, 256, 129, 2, 1382, 1380, 3, 2, 2, 2, 1382, 1381, 3, 2, 2, 2, 1383, 237, 3, 2, 2, 2, 1384, 1393, 7, 11, 2, 2, 1385, 1390, 5, 240, 121, 2, 1386, 1387, 7, 14, 2, 2, 1387, 1389, 5, 240, 121, 2, 1388, 1386, 3, 2, 2, 2, 1389, 1392, 3, 2, 2, 2, 1390, 1388, 3, 2, 2, 2, 1390, 1391, 3, 2, 2, 2, 1391, 1394, 3, 2, 2, 2, 1392, 1390, 3, 2, 2, 2, 1393, 1385, 3, 2, 2, 2, 1393, 1394, 3, 2, 2, 2, 1394, 1396, 3, 2, 2, 2, 1395, 1397, 7, 14, 2, 2, 1396, 1395, 3, 2, 2, 2, 1396, 1397, 3, 2, 2, 2, 1397, 1398, 3, 2, 2, 2, 1398, 1399, 7, 12, 2, 2, 1399, 239, 3, 2, 2, 2, 1400, 1401, 5, 246, 124, 2, 1401, 1402, 9, 7, 2, 2, 1402, 1403, 5, 256, 129, 2, 1403, 1432, 3, 2, 2, 2, 1404, 1405, 7, 7, 2, 2, 1405, 1406, 5, 256, 129, 2, 1406, 1407, 7, 8, 2, 2, 1407, 1408, 7, 17, 2, 2, 1408, 1409, 5, 256, 129, 2, 1409, 1432, 3, 2, 2, 2, 1410, 1412, 7, 99, 2, 2, 1411, 1410, 3, 2, 2, 2, 1411, 1412, 3, 2, 2, 2, 1412, 1414, 3, 2, 2, 2, 1413, 1415, 7, 26, 2, 2, 1414, 1413, 3, 2, 2, 2, 1414, 1415, 3, 2, 2, 2, 1415, 1416, 3, 2, 2, 2, 1416, 1417, 5, 246, 124, 2, 1417, 1419, 7, 9, 2, 2, 1418, 1420, 5, 222, 112, 2, 1419, 1418, 3, 2, 2, 2, 1419, 1420, 3, 2, 2, 2, 1420, 1421, 3, 2, 2, 2, 1421, 1422, 7, 10, 2, 2, 1422, 1423, 7, 11, 2, 2, 1423, 1424, 5, 228, 115, 2, 1424, 1425, 7, 12, 2, 2, 1425, 1432, 3, 2, 2, 2, 1426, 1432, 5, 242, 122, 2, 1427, 1432, 5, 244, 123, 2, 1428, 1432, 5, 210, 106, 2, 1429, 1432, 7, 133, 2, 2, 1430, 1432, 5, 78, 40, 2, 1431, 1400, 3, 2, 2, 2, 1431, 1404, 3, 2, 2, 2, 1431, 1411, 3, 2, 2, 2, 1431, 1426, 3, 2, 2, 2, 1431, 1427, 3, 2, 2, 2, 1431, 1428, 3, 2, 2, 2, 1431, 1429, 3, 2, 2, 2, 1431, 1430, 3, 2, 2, 2, 1432, 241, 3, 2, 2, 2, 1433, 1434, 5, 276, 139, 2, 1434, 1435, 7, 9, 2, 2, 1435, 1437, 7, 10, 2, 2, 1436, 1438, 5, 60, 31, 2, 1437, 1436, 3, 2, 2, 2, 1437, 1438, 3, 2, 2, 2, 1438, 1439, 3, 2, 2, 2, 1439, 1440, 7, 11, 2, 2, 1440, 1441, 5, 228, 115, 2, 1441, 1442, 7, 12, 2, 2, 1442, 243, 3, 2, 2, 2, 1443, 1444, 5, 278, 140, 2, 1444, 1447, 7, 9, 2, 2, 1445, 1448, 7, 133, 2, 2, 1446, 1448, 5, 4, 3, 2, 1447, 1445, 3, 2, 2, 2, 1447, 1446, 3, 2, 2, 2, 1448, 1450, 3, 2, 2, 2, 1449, 1451, 5, 60, 31, 2, 1450, 1449, 3, 2, 2, 2, 1450, 1451, 3, 2, 2, 2, 1451, 1452, 3, 2, 2, 2, 1452, 1453, 7, 10, 2, 2, 1453, 1454, 7, 11, 2, 2, 1454, 1455, 5, 228, 115, 2, 1455, 1456, 7, 12, 2, 2, 1456, 245, 3, 2, 2, 2, 1457, 1465, 5, 270, 136, 2, 1458, 1465, 7, 134, 2, 2, 1459, 1465, 5, 268, 135, 2, 1460, 1461, 7, 7, 2, 2, 1461, 1462, 5, 256, 129, 2, 1462, 1463, 7, 8, 2, 2, 1463, 1465, 3, 2, 2, 2, 1464, 1457, 3, 2, 2, 2, 1464, 1458, 3, 2, 2, 2, 1464, 1459, 3, 2, 2, 2, 1464, 1460, 3, 2, 2, 2, 1465, 247, 3, 2, 2, 2, 1466, 1480, 7, 9, 2, 2, 1467, 1472, 5, 256, 129, 2, 1468, 1469, 7, 14, 2, 2, 1469, 1471, 5, 256, 129, 2, 1470, 1468, 3, 2, 2, 2, 1471, 1474, 3, 2, 2, 2, 1472, 1470, 3, 2, 2, 2, 1472, 1473, 3, 2, 2, 2, 1473, 1477, 3, 2, 2, 2, 1474, 1472, 3, 2, 2, 2, 1475, 1476, 7, 14, 2, 2, 1476, 1478, 5, 250, 126, 2, 1477, 1475, 3, 2, 2, 2, 1477, 1478, 3, 2, 2, 2, 1478, 1481, 3, 2, 2, 2, 1479, 1481, 5, 250, 126, 2, 1480, 1467, 3, 2, 2, 2, 1480, 1479, 3, 2, 2, 2, 1480, 1481, 3, 2, 2, 2, 1481, 1482, 3, 2, 2, 2, 1482, 1483, 7, 10, 2, 2, 1483, 249, 3, 2, 2, 2, 1484, 1485, 7, 18, 2, 2, 1485, 1486, 7, 133, 2, 2, 1486, 251, 3, 2, 2, 2, 1487, 1492, 5, 256, 129, 2, 1488, 1489, 7, 14, 2, 2, 1489, 1491, 5, 256, 129, 2, 1490, 1488, 3, 2, 2, 2, 1491, 1494, 3, 2, 2, 2, 1492, 1490, 3, 2, 2, 2, 1492, 1493, 3, 2, 2, 2, 1493, 1496, 3, 2, 2, 2, 1494, 1492, 3, 2, 2, 2, 1495, 1497, 7, 14, 2, 2, 1496, 1495, 3, 2, 2, 2, 1496, 1497, 3, 2, 2, 2, 1497, 253, 3, 2, 2, 2, 1498, 1500, 7, 99, 2, 2, 1499, 1498, 3, 2, 2, 2, 1499, 1500, 3, 2, 2, 2, 1500, 1501, 3, 2, 2, 2, 1501, 1503, 7, 87, 2, 2, 1502, 1504, 7, 133, 2, 2, 1503, 1502, 3, 2, 2, 2, 1503, 1504, 3, 2, 2, 2, 1504, 1505, 3, 2, 2, 2, 1505, 1507, 7, 9, 2, 2, 1506, 1508, 5, 222, 112, 2, 1507, 1506, 3, 2, 2, 2, 1507, 1508, 3, 2, 2, 2, 1508, 1509, 3, 2, 2, 2, 1509, 1511, 7, 10, 2, 2, 1510, 1512, 5, 60, 31, 2, 1511, 1510, 3, 2, 2, 2, 1511, 1512, 3, 2, 2, 2, 1512, 1513, 3, 2, 2, 2, 1513, 1514, 7, 11, 2, 2, 1514, 1515, 5, 228, 115, 2, 1515, 1516, 7, 12, 2, 2, 1516, 255, 3, 2, 2, 2, 1517, 1518, 8, 129, 1, 2, 1518, 1575, 5, 254, 128, 2, 1519, 1575, 5, 258, 130, 2, 1520, 1522, 7, 100, 2, 2, 1521, 1523, 7, 133, 2, 2, 1522, 1521, 3, 2, 2, 2, 1522, 1523, 3, 2, 2, 2, 1523, 1524, 3, 2, 2, 2, 1524, 1575, 5, 196, 99, 2, 1525, 1526, 7, 76, 2, 2, 1526, 1528, 5, 256, 129, 2, 1527, 1529, 5, 14, 8, 2, 1528, 1527, 3, 2, 2, 2, 1528, 1529, 3, 2, 2, 2, 1529, 1531, 3, 2, 2, 2, 1530, 1532, 5, 248, 125, 2, 1531, 1530, 3, 2, 2, 2, 1531, 1532, 3, 2, 2, 2, 1532, 1575, 3, 2, 2, 2, 1533, 1534, 7, 93, 2, 2, 1534, 1575, 5, 256, 129, 42, 1535, 1536, 7, 81, 2, 2, 1536, 1575, 5, 256, 129, 41, 1537, 1538, 7, 73, 2, 2, 1538, 1575, 5, 256, 129, 40, 1539, 1540, 7, 20, 2, 2, 1540, 1575, 5, 256, 129, 39, 1541, 1542, 7, 21, 2, 2, 1542, 1575, 5, 256, 129, 38, 1543, 1544, 7, 22, 2, 2, 1544, 1575, 5, 256, 129, 37, 1545, 1546, 7, 23, 2, 2, 1546, 1575, 5, 256, 129, 36, 1547, 1548, 7, 24, 2, 2, 1548, 1575, 5, 256, 129, 35, 1549, 1550, 7, 25, 2, 2, 1550, 1575, 5, 256, 129, 34, 1551, 1552, 7, 107, 2, 2, 1552, 1575, 5, 256, 129, 33, 1553, 1575, 5, 218, 110, 2, 1554, 1575, 5, 214, 108, 2, 1555, 1575, 5, 212, 107, 2, 1556, 1575, 5, 162, 82, 2, 1557, 1575, 7, 88, 2, 2, 1558, 1560, 5, 270, 136, 2, 1559, 1561, 5, 256, 129, 2, 1560, 1559, 3, 2, 2, 2, 1560, 1561, 3, 2, 2, 2, 1561, 1575, 3, 2, 2, 2, 1562, 1575, 7, 103, 2, 2, 1563, 1575, 5, 266, 134, 2, 1564, 1575, 5, 232, 117, 2, 1565, 1575, 5, 238, 120, 2, 1566, 1567, 7, 9, 2, 2, 1567, 1568, 5, 252, 127, 2, 1568, 1569, 7, 10, 2, 2, 1569, 1575, 3, 2, 2, 2, 1570, 1572, 5, 14, 8, 2, 1571, 1573, 5, 252, 127, 2, 1572, 1571, 3, 2, 2, 2, 1572, 1573, 3, 2, 2, 2, 1573, 1575, 3, 2, 2, 2, 1574, 1517, 3, 2, 2, 2, 1574, 1519, 3, 2, 2, 2, 1574, 1520, 3, 2, 2, 2, 1574, 1525, 3, 2, 2, 2, 1574, 1533, 3, 2, 2, 2, 1574, 1535, 3, 2, 2, 2, 1574, 1537, 3, 2, 2, 2, 1574, 1539, 3, 2, 2, 2, 1574, 1541, 3, 2, 2, 2, 1574, 1543, 3, 2, 2, 2, 1574, 1545, 3, 2, 2, 2, 1574, 1547, 3, 2, 2, 2, 1574, 1549, 3, 2, 2, 2, 1574, 1551, 3, 2, 2, 2, 1574, 1553, 3, 2, 2, 2, 1574, 1554, 3, 2, 2, 2, 1574, 1555, 3, 2, 2, 2, 1574, 1556, 3, 2, 2, 2, 1574, 1557, 3, 2, 2, 2, 1574, 1558, 3, 2, 2, 2, 1574, 1562, 3, 2, 2, 2, 1574, 1563, 3, 2, 2, 2, 1574, 1564, 3, 2, 2, 2, 1574, 1565, 3, 2, 2, 2, 1574, 1566, 3, 2, 2, 2, 1574, 1570, 3, 2, 2, 2, 1575, 1657, 3, 2, 2, 2, 1576, 1577, 12, 32, 2, 2, 1577, 1578, 7, 31, 2, 2, 1578, 1656, 5, 256, 129, 32, 1579, 1580, 12, 31, 2, 2, 1580, 1581, 9, 8, 2, 2, 1581, 1656, 5, 256, 129, 32, 1582, 1583, 12, 30, 2, 2, 1583, 1584, 9, 9, 2, 2, 1584, 1656, 5, 256, 129, 31, 1585, 1586, 12, 29, 2, 2, 1586, 1587, 9, 10, 2, 2, 1587, 1656, 5, 256, 129, 30, 1588, 1589, 12, 28, 2, 2, 1589, 1590, 9, 11, 2, 2, 1590, 1656, 5, 256, 129, 29, 1591, 1592, 12, 27, 2, 2, 1592, 1593, 7, 72, 2, 2, 1593, 1656, 5, 256, 129, 28, 1594, 1595, 12, 26, 2, 2, 1595, 1596, 7, 94, 2, 2, 1596, 1656, 5, 256, 129, 27, 1597, 1598, 12, 25, 2, 2, 1598, 1599, 9, 12, 2, 2, 1599, 1656, 5, 256, 129, 26, 1600, 1601, 12, 24, 2, 2, 1601, 1602, 7, 45, 2, 2, 1602, 1656, 5, 256, 129, 25, 1603, 1604, 12, 23, 2, 2, 1604, 1605, 7, 46, 2, 2, 1605, 1656, 5, 256, 129, 24, 1606, 1607, 12, 22, 2, 2, 1607, 1608, 7, 47, 2, 2, 1608, 1656, 5, 256, 129, 23, 1609, 1610, 12, 21, 2, 2, 1610, 1611, 7, 48, 2, 2, 1611, 1656, 5, 256, 129, 22, 1612, 1613, 12, 20, 2, 2, 1613, 1614, 7, 49, 2, 2, 1614, 1656, 5, 256, 129, 21, 1615, 1616, 12, 19, 2, 2, 1616, 1617, 7, 16, 2, 2, 1617, 1618, 5, 256, 129, 2, 1618, 1619, 7, 17, 2, 2, 1619, 1620, 5, 256, 129, 20, 1620, 1656, 3, 2, 2, 2, 1621, 1622, 12, 18, 2, 2, 1622, 1623, 7, 32, 2, 2, 1623, 1656, 5, 256, 129, 19, 1624, 1625, 12, 17, 2, 2, 1625, 1626, 7, 15, 2, 2, 1626, 1656, 5, 256, 129, 17, 1627, 1628, 12, 16, 2, 2, 1628, 1629, 5, 264, 133, 2, 1629, 1630, 5, 256, 129, 16, 1630, 1656, 3, 2, 2, 2, 1631, 1632, 12, 48, 2, 2, 1632, 1633, 7, 7, 2, 2, 1633, 1634, 5, 252, 127, 2, 1634, 1635, 7, 8, 2, 2, 1635, 1656, 3, 2, 2, 2, 1636, 1638, 12, 47, 2, 2, 1637, 1639, 7, 16, 2, 2, 1638, 1637, 3, 2, 2, 2, 1638, 1639, 3, 2, 2, 2, 1639, 1640, 3, 2, 2, 2, 1640, 1642, 7, 19, 2, 2, 1641, 1643, 7, 33, 2, 2, 1642, 1641, 3, 2, 2, 2, 1642, 1643, 3, 2, 2, 2, 1643, 1644, 3, 2, 2, 2, 1644, 1656, 5, 270, 136, 2, 1645, 1646, 12, 46, 2, 2, 1646, 1656, 5, 248, 125, 2, 1647, 1648, 12, 44, 2, 2, 1648, 1649, 6, 129, 37, 2, 1649, 1656, 7, 20, 2, 2, 1650, 1651, 12, 43, 2, 2, 1651, 1652, 6, 129, 39, 2, 1652, 1656, 7, 21, 2, 2, 1653, 1654, 12, 15, 2, 2, 1654, 1656, 7, 135, 2, 2, 1655, 1576, 3, 2, 2, 2, 1655, 1579, 3, 2, 2, 2, 1655, 1582, 3, 2, 2, 2, 1655, 1585, 3, 2, 2, 2, 1655, 1588, 3, 2, 2, 2, 1655, 1591, 3, 2, 2, 2, 1655, 1594, 3, 2, 2, 2, 1655, 1597, 3, 2, 2, 2, 1655, 1600, 3, 2, 2, 2, 1655, 1603, 3, 2, 2, 2, 1655, 1606, 3, 2, 2, 2, 1655, 1609, 3, 2, 2, 2, 1655, 1612, 3, 2, 2, 2, 1655, 1615, 3, 2, 2, 2, 1655, 1621, 3, 2, 2, 2, 1655, 1624, 3, 2, 2, 2, 1655, 1627, 3, 2, 2, 2, 1655, 1631, 3, 2, 2, 2, 1655, 1636, 3, 2, 2, 2, 1655, 1645, 3, 2, 2, 2, 1655, 1647, 3, 2, 2, 2, 1655, 1650, 3, 2, 2, 2, 1655, 1653, 3, 2, 2, 2, 1656, 1659, 3, 2, 2, 2, 1657, 1655, 3, 2, 2, 2, 1657, 1658, 3, 2, 2, 2, 1658, 257, 3, 2, 2, 2, 1659, 1657, 3, 2, 2, 2, 1660, 1662, 7, 99, 2, 2, 1661, 1660, 3, 2, 2, 2, 1661, 1662, 3, 2, 2, 2, 1662, 1663, 3, 2, 2, 2, 1663, 1665, 5, 260, 131, 2, 1664, 1666, 5, 60, 31, 2, 1665, 1664, 3, 2, 2, 2, 1665, 1666, 3, 2, 2, 2, 1666, 1667, 3, 2, 2, 2, 1667, 1668, 7, 61, 2, 2, 1668, 1669, 5, 262, 132, 2, 1669, 259, 3, 2, 2, 2, 1670, 1677, 7, 133, 2, 2, 1671, 1673, 7, 9, 2, 2, 1672, 1674, 5, 222, 112, 2, 1673, 1672, 3, 2, 2, 2, 1673, 1674, 3, 2, 2, 2, 1674, 1675, 3, 2, 2, 2, 1675, 1677, 7, 10, 2, 2, 1676, 1670, 3, 2, 2, 2, 1676, 1671, 3, 2, 2, 2, 1677, 261, 3, 2, 2, 2, 1678, 1684, 5, 256, 129, 2, 1679, 1680, 7, 11, 2, 2, 1680, 1681, 5, 228, 115, 2, 1681, 1682, 7, 12, 2, 2, 1682, 1684, 3, 2, 2, 2, 1683, 1678, 3, 2, 2, 2, 1683, 1679, 3, 2, 2, 2, 1684, 263, 3, 2, 2, 2, 1685, 1686, 9, 13, 2, 2, 1686, 265, 3, 2, 2, 2, 1687, 1694, 7, 63, 2, 2, 1688, 1694, 7, 64, 2, 2, 1689, 1694, 7, 134, 2, 2, 1690, 1694, 7, 135, 2, 2, 1691, 1694, 7, 6, 2, 2, 1692, 1694, 5, 268, 135, 2, 1693, 1687, 3, 2, 2, 2, 1693, 1688, 3, 2, 2, 2, 1693, 1689, 3, 2, 2, 2, 1693, 1690, 3, 2, 2, 2, 1693, 1691, 3, 2, 2, 2, 1693, 1692, 3, 2, 2, 2, 1694, 267, 3, 2, 2, 2, 1695, 1696, 9, 14, 2, 2, 1696, 269, 3, 2, 2, 2, 1697, 1700, 7, 133, 2, 2, 1698, 1700, 5, 272, 137, 2, 1699, 1697, 3, 2, 2, 2, 1699, 1698, 3, 2, 2, 2, 1700, 271, 3, 2, 2, 2, 1701, 1705, 5, 274, 138, 2, 1702, 1705, 7, 63, 2, 2, 1703, 1705, 7, 64, 2, 2, 1704, 1701, 3, 2, 2, 2, 1704, 1702, 3, 2, 2, 2, 1704, 1703, 3, 2, 2, 2, 1705, 273, 3, 2, 2, 2, 1706, 1707, 9, 15, 2, 2, 1707, 275, 3, 2, 2, 2, 1708, 1709, 7, 133, 2, 2, 1709, 1710, 6, 139, 41, 2, 1710, 1711, 5, 246, 124, 2, 1711, 277, 3, 2, 2, 2, 1712, 1713, 7, 133, 2, 2, 1713, 1714, 6, 140, 42, 2, 1714, 1715, 5, 246, 124, 2, 1715, 279, 3, 2, 2, 2, 1716, 1721, 7, 13, 2, 2, 1717, 1721, 7, 2, 2, 3, 1718, 1721, 6, 141, 43, 2, 1719, 1721, 6, 141, 44, 2, 1720, 1716, 3, 2, 2, 2, 1720, 1717, 3, 2, 2, 2, 1720, 1718, 3, 2, 2, 2, 1720, 1719, 3, 2, 2, 2, 1721, 281, 3, 2, 2, 2, 220, 287, 291, 300, 305, 308, 315, 324, 334, 345, 347, 368, 376, 384, 399, 403, 407, 413, 420, 430, 432, 448, 452, 456, 464, 468, 483, 487, 490, 494, 497, 501, 507, 511, 515, 523, 529, 536, 539, 541, 543, 550, 554, 557, 561, 567, 574, 578, 581, 586, 589, 592, 598, 602, 606, 610, 621, 628, 635, 640, 648, 651, 656, 659, 663, 673, 677, 683, 689, 696, 702, 708, 716, 721, 736, 743, 748, 756, 763, 770, 775, 808, 812, 819, 825, 833, 842, 846, 854, 862, 869, 873, 877, 881, 884, 887, 890, 894, 896, 903, 908, 911, 915, 918, 925, 934, 953, 957, 961, 971, 975, 982, 989, 997, 1005, 1011, 1018, 1025, 1032, 1039, 1057, 1061, 1063, 1070, 1076, 1081, 1096, 1099, 1104, 1107, 1114, 1123, 1127, 1136, 1139, 1144, 1150, 1153, 1159, 1174, 1178, 1181, 1185, 1188, 1194, 1197, 1206, 1210, 1213, 1217, 1220, 1223, 1226, 1229, 1232, 1238, 1243, 1253, 1257, 1270, 1274, 1287, 1291, 1300, 1312, 1317, 1324, 1326, 1329, 1333, 1337, 1343, 1348, 1352, 1360, 1365, 1371, 1374, 1377, 1382, 1390, 1393, 1396, 1411, 1414, 1419, 1431, 1437, 1447, 1450, 1464, 1472, 1477, 1480, 1492, 1496, 1499, 1503, 1507, 1511, 1522, 1528, 1531, 1560, 1572, 1574, 1638, 1642, 1655, 1657, 1661, 1665, 1673, 1676, 1683, 1693, 1699, 1704, 1720] \ No newline at end of file diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptParser.java b/docs/compare/src/main/java/tsantlr/TypeScriptParser.java new file mode 100644 index 0000000000000000000000000000000000000000..e6ce1a3426d6368a0492c2f02945a9ef1b4afc12 --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptParser.java @@ -0,0 +1,13593 @@ +// Generated from TypeScriptParser.g4 by ANTLR 4.7.2 +package tsantlr; + +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class TypeScriptParser extends TypeScriptBaseParser { + static { RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + HashBangLine=1, MultiLineComment=2, SingleLineComment=3, RegularExpressionLiteral=4, + OpenBracket=5, CloseBracket=6, OpenParen=7, CloseParen=8, OpenBrace=9, + CloseBrace=10, SemiColon=11, Comma=12, Assign=13, QuestionMark=14, Colon=15, + Ellipsis=16, Dot=17, PlusPlus=18, MinusMinus=19, Plus=20, Minus=21, BitNot=22, + Not=23, Multiply=24, Lodash=25, Dollar=26, Divide=27, Modulus=28, Power=29, + NullCoalesce=30, Hashtag=31, RightShiftArithmetic=32, LeftShiftArithmetic=33, + RightShiftLogical=34, LessThan=35, MoreThan=36, LessThanEquals=37, GreaterThanEquals=38, + Equals_=39, NotEquals=40, IdentityEquals=41, IdentityNotEquals=42, BitAnd=43, + BitXOr=44, BitOr=45, And=46, Or=47, MultiplyAssign=48, DivideAssign=49, + ModulusAssign=50, PlusAssign=51, MinusAssign=52, LeftShiftArithmeticAssign=53, + RightShiftArithmeticAssign=54, RightShiftLogicalAssign=55, BitAndAssign=56, + BitXorAssign=57, BitOrAssign=58, ARROW=59, PowerAssign=60, NullLiteral=61, + BooleanLiteral=62, DecimalLiteral=63, HexIntegerLiteral=64, OctalIntegerLiteral=65, + OctalIntegerLiteral2=66, BinaryIntegerLiteral=67, Break=68, Do=69, Instanceof=70, + Typeof=71, Case=72, Else=73, New=74, Var=75, Catch=76, Finally=77, Return=78, + Void=79, Continue=80, For=81, Switch=82, While=83, Debugger=84, Function=85, + This=86, With=87, Default=88, If=89, Throw=90, Delete=91, In=92, Try=93, + As=94, From=95, ReadOnly=96, Async=97, Class=98, Enum=99, Extends=100, + Super=101, Const=102, Export=103, Import=104, Await=105, Implements=106, + Let=107, Private=108, Public=109, Interface=110, Package=111, Protected=112, + Static=113, Yield=114, ANY=115, NUMBER=116, BOOLEAN=117, STRING=118, SYMBOL=119, + Type=120, Get=121, Set=122, Constructor=123, Namespace=124, Require=125, + Module=126, Declare=127, Abstract=128, Is=129, At=130, Identifier=131, + StringLiteral=132, TemplateStringLiteral=133, WhiteSpaces=134, LineTerminator=135, + HtmlComment=136, CDataComment=137, UnexpectedCharacter=138; + public static final int + RULE_initializer = 0, RULE_bindingPattern = 1, RULE_typeParameters = 2, + RULE_typeParameterList = 3, RULE_typeParameter = 4, RULE_constraint = 5, + RULE_typeArguments = 6, RULE_typeArgumentList = 7, RULE_typeArgument = 8, + RULE_type_ = 9, RULE_unionOrIntersectionOrPrimaryType = 10, RULE_primaryType = 11, + RULE_predefinedType = 12, RULE_typeReference = 13, RULE_typeGeneric = 14, + RULE_typeIncludeGeneric = 15, RULE_typeName = 16, RULE_objectType = 17, + RULE_typeBody = 18, RULE_typeMemberList = 19, RULE_typeMember = 20, RULE_arrayType = 21, + RULE_tupleType = 22, RULE_tupleElementTypes = 23, RULE_functionType = 24, + RULE_constructorType = 25, RULE_typeQuery = 26, RULE_typeQueryExpression = 27, + RULE_propertySignature = 28, RULE_typeAnnotation = 29, RULE_callSignature = 30, + RULE_parameterList = 31, RULE_requiredParameterList = 32, RULE_requiredParameter = 33, + RULE_accessibilityModifier = 34, RULE_identifierOrPattern = 35, RULE_optionalParameterList = 36, + RULE_optionalParameter = 37, RULE_restParameter = 38, RULE_constructSignature = 39, + RULE_indexSignature = 40, RULE_methodSignature = 41, RULE_typeAliasDeclaration = 42, + RULE_constructorDeclaration = 43, RULE_interfaceDeclaration = 44, RULE_interfaceExtendsClause = 45, + RULE_classOrInterfaceTypeList = 46, RULE_enumDeclaration = 47, RULE_enumBody = 48, + RULE_enumMemberList = 49, RULE_enumMember = 50, RULE_namespaceDeclaration = 51, + RULE_namespaceName = 52, RULE_importAliasDeclaration = 53, RULE_importAll = 54, + RULE_decoratorList = 55, RULE_decorator = 56, RULE_decoratorMemberExpression = 57, + RULE_decoratorCallExpression = 58, RULE_program = 59, RULE_sourceElement = 60, + RULE_statement = 61, RULE_block = 62, RULE_statementList = 63, RULE_abstractDeclaration = 64, + RULE_importStatement = 65, RULE_importFromBlock = 66, RULE_multipleImportStatement = 67, + RULE_exportStatement = 68, RULE_variableStatement = 69, RULE_variableDeclarationList = 70, + RULE_variableDeclaration = 71, RULE_emptyStatement_ = 72, RULE_expressionStatement = 73, + RULE_ifStatement = 74, RULE_iterationStatement = 75, RULE_varModifier = 76, + RULE_continueStatement = 77, RULE_breakStatement = 78, RULE_returnStatement = 79, + RULE_yieldStatement = 80, RULE_withStatement = 81, RULE_switchStatement = 82, + RULE_caseBlock = 83, RULE_caseClauses = 84, RULE_caseClause = 85, RULE_defaultClause = 86, + RULE_labelledStatement = 87, RULE_throwStatement = 88, RULE_tryStatement = 89, + RULE_catchProduction = 90, RULE_assignable = 91, RULE_finallyProduction = 92, + RULE_debuggerStatement = 93, RULE_functionDeclaration = 94, RULE_classDeclaration = 95, + RULE_classHeritage = 96, RULE_classTail = 97, RULE_classExtendsClause = 98, + RULE_implementsClause = 99, RULE_classElement = 100, RULE_propertyMemberDeclaration = 101, + RULE_propertyMemberBase = 102, RULE_indexMemberDeclaration = 103, RULE_generatorMethod = 104, + RULE_generatorFunctionDeclaration = 105, RULE_generatorBlock = 106, RULE_generatorDefinition = 107, + RULE_iteratorBlock = 108, RULE_iteratorDefinition = 109, RULE_formalParameterList = 110, + RULE_formalParameterArg = 111, RULE_lastFormalParameterArg = 112, RULE_functionBody = 113, + RULE_sourceElements = 114, RULE_arrayLiteral = 115, RULE_elementList = 116, + RULE_lastElement = 117, RULE_objectLiteral = 118, RULE_propertyAssignment = 119, + RULE_getAccessor = 120, RULE_setAccessor = 121, RULE_propertyName = 122, + RULE_arguments = 123, RULE_lastArgument = 124, RULE_expressionSequence = 125, + RULE_functionExpressionDeclaration = 126, RULE_singleExpression = 127, + RULE_arrowFunctionDeclaration = 128, RULE_arrowFunctionParameters = 129, + RULE_arrowFunctionBody = 130, RULE_assignmentOperator = 131, RULE_literal = 132, + RULE_numericLiteral = 133, RULE_identifierName = 134, RULE_reservedWord = 135, + RULE_keyword = 136, RULE_getter = 137, RULE_setter = 138, RULE_eos = 139; + private static String[] makeRuleNames() { + return new String[] { + "initializer", "bindingPattern", "typeParameters", "typeParameterList", + "typeParameter", "constraint", "typeArguments", "typeArgumentList", "typeArgument", + "type_", "unionOrIntersectionOrPrimaryType", "primaryType", "predefinedType", + "typeReference", "typeGeneric", "typeIncludeGeneric", "typeName", "objectType", + "typeBody", "typeMemberList", "typeMember", "arrayType", "tupleType", + "tupleElementTypes", "functionType", "constructorType", "typeQuery", + "typeQueryExpression", "propertySignature", "typeAnnotation", "callSignature", + "parameterList", "requiredParameterList", "requiredParameter", "accessibilityModifier", + "identifierOrPattern", "optionalParameterList", "optionalParameter", + "restParameter", "constructSignature", "indexSignature", "methodSignature", + "typeAliasDeclaration", "constructorDeclaration", "interfaceDeclaration", + "interfaceExtendsClause", "classOrInterfaceTypeList", "enumDeclaration", + "enumBody", "enumMemberList", "enumMember", "namespaceDeclaration", "namespaceName", + "importAliasDeclaration", "importAll", "decoratorList", "decorator", + "decoratorMemberExpression", "decoratorCallExpression", "program", "sourceElement", + "statement", "block", "statementList", "abstractDeclaration", "importStatement", + "importFromBlock", "multipleImportStatement", "exportStatement", "variableStatement", + "variableDeclarationList", "variableDeclaration", "emptyStatement_", + "expressionStatement", "ifStatement", "iterationStatement", "varModifier", + "continueStatement", "breakStatement", "returnStatement", "yieldStatement", + "withStatement", "switchStatement", "caseBlock", "caseClauses", "caseClause", + "defaultClause", "labelledStatement", "throwStatement", "tryStatement", + "catchProduction", "assignable", "finallyProduction", "debuggerStatement", + "functionDeclaration", "classDeclaration", "classHeritage", "classTail", + "classExtendsClause", "implementsClause", "classElement", "propertyMemberDeclaration", + "propertyMemberBase", "indexMemberDeclaration", "generatorMethod", "generatorFunctionDeclaration", + "generatorBlock", "generatorDefinition", "iteratorBlock", "iteratorDefinition", + "formalParameterList", "formalParameterArg", "lastFormalParameterArg", + "functionBody", "sourceElements", "arrayLiteral", "elementList", "lastElement", + "objectLiteral", "propertyAssignment", "getAccessor", "setAccessor", + "propertyName", "arguments", "lastArgument", "expressionSequence", "functionExpressionDeclaration", + "singleExpression", "arrowFunctionDeclaration", "arrowFunctionParameters", + "arrowFunctionBody", "assignmentOperator", "literal", "numericLiteral", + "identifierName", "reservedWord", "keyword", "getter", "setter", "eos" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, null, null, null, null, "'['", "']'", "'('", "')'", "'{'", "'}'", + "';'", "','", "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", + "'-'", "'~'", "'!'", "'*'", "'_'", "'$'", "'/'", "'%'", "'**'", "'??'", + "'#'", "'>>'", "'<<'", "'>>>'", "'<'", "'>'", "'<='", "'>='", "'=='", + "'!='", "'==='", "'!=='", "'&'", "'^'", "'|'", "'&&'", "'||'", "'*='", + "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'>>>='", "'&='", "'^='", + "'|='", "'=>'", "'**='", "'null'", null, null, null, null, null, null, + "'break'", "'do'", "'instanceof'", "'typeof'", "'case'", "'else'", "'new'", + "'var'", "'catch'", "'finally'", "'return'", "'void'", "'continue'", + "'for'", "'switch'", "'while'", "'debugger'", "'function'", "'this'", + "'with'", "'default'", "'if'", "'throw'", "'delete'", "'in'", "'try'", + "'as'", "'from'", "'readonly'", "'async'", "'class'", "'enum'", "'extends'", + "'super'", "'const'", "'export'", "'import'", "'await'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", "'any'", "'number'", "'boolean'", "'string'", + "'symbol'", "'type'", "'get '", "'set '", "'constructor'", "'namespace'", + "'require'", "'module'", "'declare'", "'abstract'", "'is'", "'@'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Lodash", "Dollar", "Divide", "Modulus", "Power", + "NullCoalesce", "Hashtag", "RightShiftArithmetic", "LeftShiftArithmetic", + "RightShiftLogical", "LessThan", "MoreThan", "LessThanEquals", "GreaterThanEquals", + "Equals_", "NotEquals", "IdentityEquals", "IdentityNotEquals", "BitAnd", + "BitXOr", "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", + "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "ARROW", "PowerAssign", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "Break", "Do", "Instanceof", "Typeof", "Case", "Else", "New", "Var", + "Catch", "Finally", "Return", "Void", "Continue", "For", "Switch", "While", + "Debugger", "Function", "This", "With", "Default", "If", "Throw", "Delete", + "In", "Try", "As", "From", "ReadOnly", "Async", "Class", "Enum", "Extends", + "Super", "Const", "Export", "Import", "Await", "Implements", "Let", "Private", + "Public", "Interface", "Package", "Protected", "Static", "Yield", "ANY", + "NUMBER", "BOOLEAN", "STRING", "SYMBOL", "Type", "Get", "Set", "Constructor", + "Namespace", "Require", "Module", "Declare", "Abstract", "Is", "At", + "Identifier", "StringLiteral", "TemplateStringLiteral", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "TypeScriptParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public TypeScriptParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + public static class InitializerContext extends ParserRuleContext { + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public InitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_initializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInitializer(this); + } + } + + public final InitializerContext initializer() throws RecognitionException { + InitializerContext _localctx = new InitializerContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_initializer); + try { + enterOuterAlt(_localctx, 1); + { + setState(280); + match(Assign); + setState(281); + singleExpression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BindingPatternContext extends ParserRuleContext { + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public BindingPatternContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_bindingPattern; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBindingPattern(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBindingPattern(this); + } + } + + public final BindingPatternContext bindingPattern() throws RecognitionException { + BindingPatternContext _localctx = new BindingPatternContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_bindingPattern); + try { + enterOuterAlt(_localctx, 1); + { + setState(285); + _errHandler.sync(this); + switch (_input.LA(1)) { + case OpenBracket: + { + setState(283); + arrayLiteral(); + } + break; + case OpenBrace: + { + setState(284); + objectLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public TerminalNode LessThan() { return getToken(TypeScriptParser.LessThan, 0); } + public TerminalNode MoreThan() { return getToken(TypeScriptParser.MoreThan, 0); } + public TypeParameterListContext typeParameterList() { + return getRuleContext(TypeParameterListContext.class,0); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeParameters(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_typeParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(287); + match(LessThan); + setState(289); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan || _la==Identifier) { + { + setState(288); + typeParameterList(); + } + } + + setState(291); + match(MoreThan); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterListContext extends ParserRuleContext { + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public TypeParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeParameterList(this); + } + } + + public final TypeParameterListContext typeParameterList() throws RecognitionException { + TypeParameterListContext _localctx = new TypeParameterListContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_typeParameterList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(293); + typeParameter(); + setState(298); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(294); + match(Comma); + setState(295); + typeParameter(); + } + } + setState(300); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ConstraintContext constraint() { + return getRuleContext(ConstraintContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeParameter(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_typeParameter); + int _la; + try { + setState(306); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(301); + match(Identifier); + setState(303); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Extends) { + { + setState(302); + constraint(); + } + } + + } + break; + case LessThan: + enterOuterAlt(_localctx, 2); + { + setState(305); + typeParameters(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstraintContext extends ParserRuleContext { + public TerminalNode Extends() { return getToken(TypeScriptParser.Extends, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public ConstraintContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constraint; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstraint(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstraint(this); + } + } + + public final ConstraintContext constraint() throws RecognitionException { + ConstraintContext _localctx = new ConstraintContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_constraint); + try { + enterOuterAlt(_localctx, 1); + { + setState(308); + match(Extends); + setState(309); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public TerminalNode LessThan() { return getToken(TypeScriptParser.LessThan, 0); } + public TerminalNode MoreThan() { return getToken(TypeScriptParser.MoreThan, 0); } + public TypeArgumentListContext typeArgumentList() { + return getRuleContext(TypeArgumentListContext.class,0); + } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeArguments(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_typeArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(311); + match(LessThan); + setState(313); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << LessThan))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Typeof - 71)) | (1L << (New - 71)) | (1L << (Void - 71)) | (1L << (This - 71)) | (1L << (ANY - 71)) | (1L << (NUMBER - 71)) | (1L << (BOOLEAN - 71)) | (1L << (STRING - 71)) | (1L << (SYMBOL - 71)) | (1L << (Identifier - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(312); + typeArgumentList(); + } + } + + setState(315); + match(MoreThan); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentListContext extends ParserRuleContext { + public List typeArgument() { + return getRuleContexts(TypeArgumentContext.class); + } + public TypeArgumentContext typeArgument(int i) { + return getRuleContext(TypeArgumentContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public TypeArgumentListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgumentList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeArgumentList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeArgumentList(this); + } + } + + public final TypeArgumentListContext typeArgumentList() throws RecognitionException { + TypeArgumentListContext _localctx = new TypeArgumentListContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_typeArgumentList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(317); + typeArgument(); + setState(322); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(318); + match(Comma); + setState(319); + typeArgument(); + } + } + setState(324); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentContext extends ParserRuleContext { + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeArgument(this); + } + } + + public final TypeArgumentContext typeArgument() throws RecognitionException { + TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_typeArgument); + try { + enterOuterAlt(_localctx, 1); + { + setState(325); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class Type_Context extends ParserRuleContext { + public UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType() { + return getRuleContext(UnionOrIntersectionOrPrimaryTypeContext.class,0); + } + public FunctionTypeContext functionType() { + return getRuleContext(FunctionTypeContext.class,0); + } + public ConstructorTypeContext constructorType() { + return getRuleContext(ConstructorTypeContext.class,0); + } + public TypeGenericContext typeGeneric() { + return getRuleContext(TypeGenericContext.class,0); + } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public Type_Context(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_type_; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterType_(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitType_(this); + } + } + + public final Type_Context type_() throws RecognitionException { + Type_Context _localctx = new Type_Context(_ctx, getState()); + enterRule(_localctx, 18, RULE_type_); + try { + setState(332); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(327); + unionOrIntersectionOrPrimaryType(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(328); + functionType(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(329); + constructorType(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(330); + typeGeneric(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(331); + match(StringLiteral); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class UnionOrIntersectionOrPrimaryTypeContext extends ParserRuleContext { + public UnionOrIntersectionOrPrimaryTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unionOrIntersectionOrPrimaryType; } + + public UnionOrIntersectionOrPrimaryTypeContext() { } + public void copyFrom(UnionOrIntersectionOrPrimaryTypeContext ctx) { + super.copyFrom(ctx); + } + } + public static class IntersectionContext extends UnionOrIntersectionOrPrimaryTypeContext { + public List unionOrIntersectionOrPrimaryType() { + return getRuleContexts(UnionOrIntersectionOrPrimaryTypeContext.class); + } + public UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType(int i) { + return getRuleContext(UnionOrIntersectionOrPrimaryTypeContext.class,i); + } + public TerminalNode BitAnd() { return getToken(TypeScriptParser.BitAnd, 0); } + public IntersectionContext(UnionOrIntersectionOrPrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIntersection(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIntersection(this); + } + } + public static class PrimaryContext extends UnionOrIntersectionOrPrimaryTypeContext { + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public PrimaryContext(UnionOrIntersectionOrPrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPrimary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPrimary(this); + } + } + public static class UnionContext extends UnionOrIntersectionOrPrimaryTypeContext { + public List unionOrIntersectionOrPrimaryType() { + return getRuleContexts(UnionOrIntersectionOrPrimaryTypeContext.class); + } + public UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType(int i) { + return getRuleContext(UnionOrIntersectionOrPrimaryTypeContext.class,i); + } + public TerminalNode BitOr() { return getToken(TypeScriptParser.BitOr, 0); } + public UnionContext(UnionOrIntersectionOrPrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterUnion(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitUnion(this); + } + } + + public final UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType() throws RecognitionException { + return unionOrIntersectionOrPrimaryType(0); + } + + private UnionOrIntersectionOrPrimaryTypeContext unionOrIntersectionOrPrimaryType(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + UnionOrIntersectionOrPrimaryTypeContext _localctx = new UnionOrIntersectionOrPrimaryTypeContext(_ctx, _parentState); + UnionOrIntersectionOrPrimaryTypeContext _prevctx = _localctx; + int _startState = 20; + enterRecursionRule(_localctx, 20, RULE_unionOrIntersectionOrPrimaryType, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + _localctx = new PrimaryContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(335); + primaryType(0); + } + _ctx.stop = _input.LT(-1); + setState(345); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(343); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { + case 1: + { + _localctx = new UnionContext(new UnionOrIntersectionOrPrimaryTypeContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_unionOrIntersectionOrPrimaryType); + setState(337); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(338); + match(BitOr); + setState(339); + unionOrIntersectionOrPrimaryType(4); + } + break; + case 2: + { + _localctx = new IntersectionContext(new UnionOrIntersectionOrPrimaryTypeContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_unionOrIntersectionOrPrimaryType); + setState(340); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(341); + match(BitAnd); + setState(342); + unionOrIntersectionOrPrimaryType(3); + } + break; + } + } + } + setState(347); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PrimaryTypeContext extends ParserRuleContext { + public PrimaryTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primaryType; } + + public PrimaryTypeContext() { } + public void copyFrom(PrimaryTypeContext ctx) { + super.copyFrom(ctx); + } + } + public static class RedefinitionOfTypeContext extends PrimaryTypeContext { + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public TerminalNode Is() { return getToken(TypeScriptParser.Is, 0); } + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public RedefinitionOfTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRedefinitionOfType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRedefinitionOfType(this); + } + } + public static class PredefinedPrimTypeContext extends PrimaryTypeContext { + public PredefinedTypeContext predefinedType() { + return getRuleContext(PredefinedTypeContext.class,0); + } + public PredefinedPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPredefinedPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPredefinedPrimType(this); + } + } + public static class ArrayPrimTypeContext extends PrimaryTypeContext { + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public ArrayPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayPrimType(this); + } + } + public static class ParenthesizedPrimTypeContext extends PrimaryTypeContext { + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public ParenthesizedPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterParenthesizedPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitParenthesizedPrimType(this); + } + } + public static class ThisPrimTypeContext extends PrimaryTypeContext { + public TerminalNode This() { return getToken(TypeScriptParser.This, 0); } + public ThisPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterThisPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitThisPrimType(this); + } + } + public static class TuplePrimTypeContext extends PrimaryTypeContext { + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public TupleElementTypesContext tupleElementTypes() { + return getRuleContext(TupleElementTypesContext.class,0); + } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public TuplePrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTuplePrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTuplePrimType(this); + } + } + public static class ObjectPrimTypeContext extends PrimaryTypeContext { + public ObjectTypeContext objectType() { + return getRuleContext(ObjectTypeContext.class,0); + } + public ObjectPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectPrimType(this); + } + } + public static class ReferencePrimTypeContext extends PrimaryTypeContext { + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public ReferencePrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterReferencePrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitReferencePrimType(this); + } + } + public static class QueryPrimTypeContext extends PrimaryTypeContext { + public TypeQueryContext typeQuery() { + return getRuleContext(TypeQueryContext.class,0); + } + public QueryPrimTypeContext(PrimaryTypeContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterQueryPrimType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitQueryPrimType(this); + } + } + + public final PrimaryTypeContext primaryType() throws RecognitionException { + return primaryType(0); + } + + private PrimaryTypeContext primaryType(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + PrimaryTypeContext _localctx = new PrimaryTypeContext(_ctx, _parentState); + PrimaryTypeContext _prevctx = _localctx; + int _startState = 22; + enterRecursionRule(_localctx, 22, RULE_primaryType, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(366); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + _localctx = new ParenthesizedPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(349); + match(OpenParen); + setState(350); + type_(); + setState(351); + match(CloseParen); + } + break; + case 2: + { + _localctx = new PredefinedPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(353); + predefinedType(); + } + break; + case 3: + { + _localctx = new ReferencePrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(354); + typeReference(); + } + break; + case 4: + { + _localctx = new ObjectPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(355); + objectType(); + } + break; + case 5: + { + _localctx = new TuplePrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(356); + match(OpenBracket); + setState(357); + tupleElementTypes(); + setState(358); + match(CloseBracket); + } + break; + case 6: + { + _localctx = new QueryPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(360); + typeQuery(); + } + break; + case 7: + { + _localctx = new ThisPrimTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(361); + match(This); + } + break; + case 8: + { + _localctx = new RedefinitionOfTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(362); + typeReference(); + setState(363); + match(Is); + setState(364); + primaryType(1); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(374); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,11,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ArrayPrimTypeContext(new PrimaryTypeContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_primaryType); + setState(368); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(369); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(370); + match(OpenBracket); + setState(371); + match(CloseBracket); + } + } + } + setState(376); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,11,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PredefinedTypeContext extends ParserRuleContext { + public TerminalNode ANY() { return getToken(TypeScriptParser.ANY, 0); } + public TerminalNode NUMBER() { return getToken(TypeScriptParser.NUMBER, 0); } + public TerminalNode BOOLEAN() { return getToken(TypeScriptParser.BOOLEAN, 0); } + public TerminalNode STRING() { return getToken(TypeScriptParser.STRING, 0); } + public TerminalNode SYMBOL() { return getToken(TypeScriptParser.SYMBOL, 0); } + public TerminalNode Void() { return getToken(TypeScriptParser.Void, 0); } + public PredefinedTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_predefinedType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPredefinedType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPredefinedType(this); + } + } + + public final PredefinedTypeContext predefinedType() throws RecognitionException { + PredefinedTypeContext _localctx = new PredefinedTypeContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_predefinedType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(377); + _la = _input.LA(1); + if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (Void - 79)) | (1L << (ANY - 79)) | (1L << (NUMBER - 79)) | (1L << (BOOLEAN - 79)) | (1L << (STRING - 79)) | (1L << (SYMBOL - 79)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeReferenceContext extends ParserRuleContext { + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public TypeIncludeGenericContext typeIncludeGeneric() { + return getRuleContext(TypeIncludeGenericContext.class,0); + } + public TypeGenericContext typeGeneric() { + return getRuleContext(TypeGenericContext.class,0); + } + public TypeReferenceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeReference; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeReference(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeReference(this); + } + } + + public final TypeReferenceContext typeReference() throws RecognitionException { + TypeReferenceContext _localctx = new TypeReferenceContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_typeReference); + try { + enterOuterAlt(_localctx, 1); + { + setState(379); + typeName(); + setState(382); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + { + setState(380); + typeIncludeGeneric(); + } + break; + case 2: + { + setState(381); + typeGeneric(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeGenericContext extends ParserRuleContext { + public TerminalNode LessThan() { return getToken(TypeScriptParser.LessThan, 0); } + public TypeArgumentListContext typeArgumentList() { + return getRuleContext(TypeArgumentListContext.class,0); + } + public TerminalNode MoreThan() { return getToken(TypeScriptParser.MoreThan, 0); } + public TypeGenericContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeGeneric; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeGeneric(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeGeneric(this); + } + } + + public final TypeGenericContext typeGeneric() throws RecognitionException { + TypeGenericContext _localctx = new TypeGenericContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_typeGeneric); + try { + enterOuterAlt(_localctx, 1); + { + setState(384); + match(LessThan); + setState(385); + typeArgumentList(); + setState(386); + match(MoreThan); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeIncludeGenericContext extends ParserRuleContext { + public List LessThan() { return getTokens(TypeScriptParser.LessThan); } + public TerminalNode LessThan(int i) { + return getToken(TypeScriptParser.LessThan, i); + } + public List typeArgumentList() { + return getRuleContexts(TypeArgumentListContext.class); + } + public TypeArgumentListContext typeArgumentList(int i) { + return getRuleContext(TypeArgumentListContext.class,i); + } + public List MoreThan() { return getTokens(TypeScriptParser.MoreThan); } + public TerminalNode MoreThan(int i) { + return getToken(TypeScriptParser.MoreThan, i); + } + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public TerminalNode RightShiftArithmetic() { return getToken(TypeScriptParser.RightShiftArithmetic, 0); } + public TypeIncludeGenericContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeIncludeGeneric; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeIncludeGeneric(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeIncludeGeneric(this); + } + } + + public final TypeIncludeGenericContext typeIncludeGeneric() throws RecognitionException { + TypeIncludeGenericContext _localctx = new TypeIncludeGenericContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_typeIncludeGeneric); + try { + enterOuterAlt(_localctx, 1); + { + setState(388); + match(LessThan); + setState(389); + typeArgumentList(); + setState(390); + match(LessThan); + setState(391); + typeArgumentList(); + setState(397); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MoreThan: + { + setState(392); + match(MoreThan); + setState(393); + bindingPattern(); + setState(394); + match(MoreThan); + } + break; + case RightShiftArithmetic: + { + setState(396); + match(RightShiftArithmetic); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public NamespaceNameContext namespaceName() { + return getRuleContext(NamespaceNameContext.class,0); + } + public TypeNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeName(this); + } + } + + public final TypeNameContext typeName() throws RecognitionException { + TypeNameContext _localctx = new TypeNameContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_typeName); + try { + setState(401); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(399); + match(Identifier); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(400); + namespaceName(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ObjectTypeContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TypeBodyContext typeBody() { + return getRuleContext(TypeBodyContext.class,0); + } + public ObjectTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_objectType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectType(this); + } + } + + public final ObjectTypeContext objectType() throws RecognitionException { + ObjectTypeContext _localctx = new ObjectTypeContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_objectType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(403); + match(OpenBrace); + setState(405); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 5)) & ~0x3f) == 0 && ((1L << (_la - 5)) & ((1L << (OpenBracket - 5)) | (1L << (OpenParen - 5)) | (1L << (LessThan - 5)) | (1L << (NullLiteral - 5)) | (1L << (BooleanLiteral - 5)) | (1L << (DecimalLiteral - 5)) | (1L << (HexIntegerLiteral - 5)) | (1L << (OctalIntegerLiteral - 5)) | (1L << (OctalIntegerLiteral2 - 5)) | (1L << (BinaryIntegerLiteral - 5)) | (1L << (Break - 5)))) != 0) || ((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (Do - 69)) | (1L << (Instanceof - 69)) | (1L << (Typeof - 69)) | (1L << (Case - 69)) | (1L << (Else - 69)) | (1L << (New - 69)) | (1L << (Var - 69)) | (1L << (Catch - 69)) | (1L << (Finally - 69)) | (1L << (Return - 69)) | (1L << (Void - 69)) | (1L << (Continue - 69)) | (1L << (For - 69)) | (1L << (Switch - 69)) | (1L << (While - 69)) | (1L << (Debugger - 69)) | (1L << (Function - 69)) | (1L << (This - 69)) | (1L << (With - 69)) | (1L << (Default - 69)) | (1L << (If - 69)) | (1L << (Throw - 69)) | (1L << (Delete - 69)) | (1L << (In - 69)) | (1L << (Try - 69)) | (1L << (As - 69)) | (1L << (From - 69)) | (1L << (ReadOnly - 69)) | (1L << (Async - 69)) | (1L << (Class - 69)) | (1L << (Enum - 69)) | (1L << (Extends - 69)) | (1L << (Super - 69)) | (1L << (Const - 69)) | (1L << (Export - 69)) | (1L << (Import - 69)) | (1L << (Await - 69)) | (1L << (Implements - 69)) | (1L << (Let - 69)) | (1L << (Private - 69)) | (1L << (Public - 69)) | (1L << (Interface - 69)) | (1L << (Package - 69)) | (1L << (Protected - 69)) | (1L << (Static - 69)) | (1L << (Yield - 69)) | (1L << (Identifier - 69)) | (1L << (StringLiteral - 69)))) != 0)) { + { + setState(404); + typeBody(); + } + } + + setState(407); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeBodyContext extends ParserRuleContext { + public TypeMemberListContext typeMemberList() { + return getRuleContext(TypeMemberListContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TerminalNode Comma() { return getToken(TypeScriptParser.Comma, 0); } + public TypeBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeBody(this); + } + } + + public final TypeBodyContext typeBody() throws RecognitionException { + TypeBodyContext _localctx = new TypeBodyContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_typeBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(409); + typeMemberList(); + setState(411); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==SemiColon || _la==Comma) { + { + setState(410); + _la = _input.LA(1); + if ( !(_la==SemiColon || _la==Comma) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeMemberListContext extends ParserRuleContext { + public List typeMember() { + return getRuleContexts(TypeMemberContext.class); + } + public TypeMemberContext typeMember(int i) { + return getRuleContext(TypeMemberContext.class,i); + } + public List SemiColon() { return getTokens(TypeScriptParser.SemiColon); } + public TerminalNode SemiColon(int i) { + return getToken(TypeScriptParser.SemiColon, i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public TypeMemberListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeMemberList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeMemberList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeMemberList(this); + } + } + + public final TypeMemberListContext typeMemberList() throws RecognitionException { + TypeMemberListContext _localctx = new TypeMemberListContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_typeMemberList); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(413); + typeMember(); + setState(418); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(414); + _la = _input.LA(1); + if ( !(_la==SemiColon || _la==Comma) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(415); + typeMember(); + } + } + } + setState(420); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeMemberContext extends ParserRuleContext { + public PropertySignatureContext propertySignature() { + return getRuleContext(PropertySignatureContext.class,0); + } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public ConstructSignatureContext constructSignature() { + return getRuleContext(ConstructSignatureContext.class,0); + } + public IndexSignatureContext indexSignature() { + return getRuleContext(IndexSignatureContext.class,0); + } + public MethodSignatureContext methodSignature() { + return getRuleContext(MethodSignatureContext.class,0); + } + public TerminalNode ARROW() { return getToken(TypeScriptParser.ARROW, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeMemberContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeMember; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeMember(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeMember(this); + } + } + + public final TypeMemberContext typeMember() throws RecognitionException { + TypeMemberContext _localctx = new TypeMemberContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_typeMember); + int _la; + try { + setState(430); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(421); + propertySignature(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(422); + callSignature(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(423); + constructSignature(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(424); + indexSignature(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(425); + methodSignature(); + setState(428); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ARROW) { + { + setState(426); + match(ARROW); + setState(427); + type_(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayTypeContext extends ParserRuleContext { + public PrimaryTypeContext primaryType() { + return getRuleContext(PrimaryTypeContext.class,0); + } + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public ArrayTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayType(this); + } + } + + public final ArrayTypeContext arrayType() throws RecognitionException { + ArrayTypeContext _localctx = new ArrayTypeContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_arrayType); + try { + enterOuterAlt(_localctx, 1); + { + setState(432); + primaryType(0); + setState(433); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(434); + match(OpenBracket); + setState(435); + match(CloseBracket); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TupleTypeContext extends ParserRuleContext { + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public TupleElementTypesContext tupleElementTypes() { + return getRuleContext(TupleElementTypesContext.class,0); + } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public TupleTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_tupleType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTupleType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTupleType(this); + } + } + + public final TupleTypeContext tupleType() throws RecognitionException { + TupleTypeContext _localctx = new TupleTypeContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_tupleType); + try { + enterOuterAlt(_localctx, 1); + { + setState(437); + match(OpenBracket); + setState(438); + tupleElementTypes(); + setState(439); + match(CloseBracket); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TupleElementTypesContext extends ParserRuleContext { + public List type_() { + return getRuleContexts(Type_Context.class); + } + public Type_Context type_(int i) { + return getRuleContext(Type_Context.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public TupleElementTypesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_tupleElementTypes; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTupleElementTypes(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTupleElementTypes(this); + } + } + + public final TupleElementTypesContext tupleElementTypes() throws RecognitionException { + TupleElementTypesContext _localctx = new TupleElementTypesContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_tupleElementTypes); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(441); + type_(); + setState(446); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(442); + match(Comma); + setState(443); + type_(); + } + } + setState(448); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionTypeContext extends ParserRuleContext { + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode ARROW() { return getToken(TypeScriptParser.ARROW, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public FunctionTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionType(this); + } + } + + public final FunctionTypeContext functionType() throws RecognitionException { + FunctionTypeContext _localctx = new FunctionTypeContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_functionType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(450); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(449); + typeParameters(); + } + } + + setState(452); + match(OpenParen); + setState(454); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (Break - 68)) | (1L << (Do - 68)) | (1L << (Instanceof - 68)) | (1L << (Typeof - 68)) | (1L << (Case - 68)) | (1L << (Else - 68)) | (1L << (New - 68)) | (1L << (Var - 68)) | (1L << (Catch - 68)) | (1L << (Finally - 68)) | (1L << (Return - 68)) | (1L << (Void - 68)) | (1L << (Continue - 68)) | (1L << (For - 68)) | (1L << (Switch - 68)) | (1L << (While - 68)) | (1L << (Debugger - 68)) | (1L << (Function - 68)) | (1L << (This - 68)) | (1L << (With - 68)) | (1L << (Default - 68)) | (1L << (If - 68)) | (1L << (Throw - 68)) | (1L << (Delete - 68)) | (1L << (In - 68)) | (1L << (Try - 68)) | (1L << (As - 68)) | (1L << (From - 68)) | (1L << (ReadOnly - 68)) | (1L << (Async - 68)) | (1L << (Class - 68)) | (1L << (Enum - 68)) | (1L << (Extends - 68)) | (1L << (Super - 68)) | (1L << (Const - 68)) | (1L << (Export - 68)) | (1L << (Import - 68)) | (1L << (Await - 68)) | (1L << (Implements - 68)) | (1L << (Let - 68)) | (1L << (Private - 68)) | (1L << (Public - 68)) | (1L << (Interface - 68)) | (1L << (Package - 68)) | (1L << (Protected - 68)) | (1L << (Static - 68)) | (1L << (Yield - 68)) | (1L << (ANY - 68)) | (1L << (NUMBER - 68)) | (1L << (BOOLEAN - 68)) | (1L << (STRING - 68)) | (1L << (SYMBOL - 68)) | (1L << (At - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(453); + parameterList(); + } + } + + setState(456); + match(CloseParen); + setState(457); + match(ARROW); + setState(458); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorTypeContext extends ParserRuleContext { + public TerminalNode New() { return getToken(TypeScriptParser.New, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode ARROW() { return getToken(TypeScriptParser.ARROW, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public ConstructorTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstructorType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstructorType(this); + } + } + + public final ConstructorTypeContext constructorType() throws RecognitionException { + ConstructorTypeContext _localctx = new ConstructorTypeContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_constructorType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(460); + match(New); + setState(462); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(461); + typeParameters(); + } + } + + setState(464); + match(OpenParen); + setState(466); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (Break - 68)) | (1L << (Do - 68)) | (1L << (Instanceof - 68)) | (1L << (Typeof - 68)) | (1L << (Case - 68)) | (1L << (Else - 68)) | (1L << (New - 68)) | (1L << (Var - 68)) | (1L << (Catch - 68)) | (1L << (Finally - 68)) | (1L << (Return - 68)) | (1L << (Void - 68)) | (1L << (Continue - 68)) | (1L << (For - 68)) | (1L << (Switch - 68)) | (1L << (While - 68)) | (1L << (Debugger - 68)) | (1L << (Function - 68)) | (1L << (This - 68)) | (1L << (With - 68)) | (1L << (Default - 68)) | (1L << (If - 68)) | (1L << (Throw - 68)) | (1L << (Delete - 68)) | (1L << (In - 68)) | (1L << (Try - 68)) | (1L << (As - 68)) | (1L << (From - 68)) | (1L << (ReadOnly - 68)) | (1L << (Async - 68)) | (1L << (Class - 68)) | (1L << (Enum - 68)) | (1L << (Extends - 68)) | (1L << (Super - 68)) | (1L << (Const - 68)) | (1L << (Export - 68)) | (1L << (Import - 68)) | (1L << (Await - 68)) | (1L << (Implements - 68)) | (1L << (Let - 68)) | (1L << (Private - 68)) | (1L << (Public - 68)) | (1L << (Interface - 68)) | (1L << (Package - 68)) | (1L << (Protected - 68)) | (1L << (Static - 68)) | (1L << (Yield - 68)) | (1L << (ANY - 68)) | (1L << (NUMBER - 68)) | (1L << (BOOLEAN - 68)) | (1L << (STRING - 68)) | (1L << (SYMBOL - 68)) | (1L << (At - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(465); + parameterList(); + } + } + + setState(468); + match(CloseParen); + setState(469); + match(ARROW); + setState(470); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeQueryContext extends ParserRuleContext { + public TerminalNode Typeof() { return getToken(TypeScriptParser.Typeof, 0); } + public TypeQueryExpressionContext typeQueryExpression() { + return getRuleContext(TypeQueryExpressionContext.class,0); + } + public TypeQueryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeQuery; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeQuery(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeQuery(this); + } + } + + public final TypeQueryContext typeQuery() throws RecognitionException { + TypeQueryContext _localctx = new TypeQueryContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_typeQuery); + try { + enterOuterAlt(_localctx, 1); + { + setState(472); + match(Typeof); + setState(473); + typeQueryExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeQueryExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public List identifierName() { + return getRuleContexts(IdentifierNameContext.class); + } + public IdentifierNameContext identifierName(int i) { + return getRuleContext(IdentifierNameContext.class,i); + } + public List Dot() { return getTokens(TypeScriptParser.Dot); } + public TerminalNode Dot(int i) { + return getToken(TypeScriptParser.Dot, i); + } + public TypeQueryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeQueryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeQueryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeQueryExpression(this); + } + } + + public final TypeQueryExpressionContext typeQueryExpression() throws RecognitionException { + TypeQueryExpressionContext _localctx = new TypeQueryExpressionContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_typeQueryExpression); + try { + int _alt; + setState(485); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(475); + match(Identifier); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(479); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(476); + identifierName(); + setState(477); + match(Dot); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(481); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,25,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + setState(483); + identifierName(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertySignatureContext extends ParserRuleContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public TerminalNode QuestionMark() { return getToken(TypeScriptParser.QuestionMark, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public TerminalNode ARROW() { return getToken(TypeScriptParser.ARROW, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public PropertySignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertySignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertySignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertySignature(this); + } + } + + public final PropertySignatureContext propertySignature() throws RecognitionException { + PropertySignatureContext _localctx = new PropertySignatureContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_propertySignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(488); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) { + case 1: + { + setState(487); + match(ReadOnly); + } + break; + } + setState(490); + propertyName(); + setState(492); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==QuestionMark) { + { + setState(491); + match(QuestionMark); + } + } + + setState(495); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(494); + typeAnnotation(); + } + } + + setState(499); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ARROW) { + { + setState(497); + match(ARROW); + setState(498); + type_(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeAnnotationContext extends ParserRuleContext { + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TypeAnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeAnnotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeAnnotation(this); + } + } + + public final TypeAnnotationContext typeAnnotation() throws RecognitionException { + TypeAnnotationContext _localctx = new TypeAnnotationContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_typeAnnotation); + try { + enterOuterAlt(_localctx, 1); + { + setState(501); + match(Colon); + setState(502); + type_(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CallSignatureContext extends ParserRuleContext { + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public CallSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_callSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCallSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCallSignature(this); + } + } + + public final CallSignatureContext callSignature() throws RecognitionException { + CallSignatureContext _localctx = new CallSignatureContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_callSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(505); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(504); + typeParameters(); + } + } + + setState(507); + match(OpenParen); + setState(509); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (Break - 68)) | (1L << (Do - 68)) | (1L << (Instanceof - 68)) | (1L << (Typeof - 68)) | (1L << (Case - 68)) | (1L << (Else - 68)) | (1L << (New - 68)) | (1L << (Var - 68)) | (1L << (Catch - 68)) | (1L << (Finally - 68)) | (1L << (Return - 68)) | (1L << (Void - 68)) | (1L << (Continue - 68)) | (1L << (For - 68)) | (1L << (Switch - 68)) | (1L << (While - 68)) | (1L << (Debugger - 68)) | (1L << (Function - 68)) | (1L << (This - 68)) | (1L << (With - 68)) | (1L << (Default - 68)) | (1L << (If - 68)) | (1L << (Throw - 68)) | (1L << (Delete - 68)) | (1L << (In - 68)) | (1L << (Try - 68)) | (1L << (As - 68)) | (1L << (From - 68)) | (1L << (ReadOnly - 68)) | (1L << (Async - 68)) | (1L << (Class - 68)) | (1L << (Enum - 68)) | (1L << (Extends - 68)) | (1L << (Super - 68)) | (1L << (Const - 68)) | (1L << (Export - 68)) | (1L << (Import - 68)) | (1L << (Await - 68)) | (1L << (Implements - 68)) | (1L << (Let - 68)) | (1L << (Private - 68)) | (1L << (Public - 68)) | (1L << (Interface - 68)) | (1L << (Package - 68)) | (1L << (Protected - 68)) | (1L << (Static - 68)) | (1L << (Yield - 68)) | (1L << (ANY - 68)) | (1L << (NUMBER - 68)) | (1L << (BOOLEAN - 68)) | (1L << (STRING - 68)) | (1L << (SYMBOL - 68)) | (1L << (At - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(508); + parameterList(); + } + } + + setState(511); + match(CloseParen); + setState(513); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + case 1: + { + setState(512); + typeAnnotation(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParameterListContext extends ParserRuleContext { + public RestParameterContext restParameter() { + return getRuleContext(RestParameterContext.class,0); + } + public List predefinedType() { + return getRuleContexts(PredefinedTypeContext.class); + } + public PredefinedTypeContext predefinedType(int i) { + return getRuleContext(PredefinedTypeContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public OptionalParameterListContext optionalParameterList() { + return getRuleContext(OptionalParameterListContext.class,0); + } + public RequiredParameterListContext requiredParameterList() { + return getRuleContext(RequiredParameterListContext.class,0); + } + public ParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitParameterList(this); + } + } + + public final ParameterListContext parameterList() throws RecognitionException { + ParameterListContext _localctx = new ParameterListContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_parameterList); + int _la; + try { + setState(541); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(515); + restParameter(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(516); + predefinedType(); + setState(521); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(517); + match(Comma); + setState(518); + predefinedType(); + } + } + setState(523); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(524); + optionalParameterList(); + setState(527); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(525); + match(Comma); + setState(526); + restParameter(); + } + } + + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(529); + requiredParameterList(); + setState(539); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(530); + match(Comma); + setState(537); + _errHandler.sync(this); + switch (_input.LA(1)) { + case OpenBracket: + case OpenBrace: + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case As: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Await: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case At: + case Identifier: + { + setState(531); + optionalParameterList(); + setState(534); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(532); + match(Comma); + setState(533); + restParameter(); + } + } + + } + break; + case Ellipsis: + { + setState(536); + restParameter(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RequiredParameterListContext extends ParserRuleContext { + public List requiredParameter() { + return getRuleContexts(RequiredParameterContext.class); + } + public RequiredParameterContext requiredParameter(int i) { + return getRuleContext(RequiredParameterContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public RequiredParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_requiredParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRequiredParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRequiredParameterList(this); + } + } + + public final RequiredParameterListContext requiredParameterList() throws RecognitionException { + RequiredParameterListContext _localctx = new RequiredParameterListContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_requiredParameterList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(543); + requiredParameter(); + setState(548); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(544); + match(Comma); + setState(545); + requiredParameter(); + } + } + } + setState(550); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RequiredParameterContext extends ParserRuleContext { + public IdentifierOrPatternContext identifierOrPattern() { + return getRuleContext(IdentifierOrPatternContext.class,0); + } + public DecoratorListContext decoratorList() { + return getRuleContext(DecoratorListContext.class,0); + } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public RequiredParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_requiredParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRequiredParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRequiredParameter(this); + } + } + + public final RequiredParameterContext requiredParameter() throws RecognitionException { + RequiredParameterContext _localctx = new RequiredParameterContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_requiredParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(552); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==At) { + { + setState(551); + decoratorList(); + } + } + + setState(555); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) { + case 1: + { + setState(554); + accessibilityModifier(); + } + break; + } + setState(557); + identifierOrPattern(); + setState(559); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(558); + typeAnnotation(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AccessibilityModifierContext extends ParserRuleContext { + public TerminalNode Public() { return getToken(TypeScriptParser.Public, 0); } + public TerminalNode Private() { return getToken(TypeScriptParser.Private, 0); } + public TerminalNode Protected() { return getToken(TypeScriptParser.Protected, 0); } + public AccessibilityModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessibilityModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAccessibilityModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAccessibilityModifier(this); + } + } + + public final AccessibilityModifierContext accessibilityModifier() throws RecognitionException { + AccessibilityModifierContext _localctx = new AccessibilityModifierContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_accessibilityModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(561); + _la = _input.LA(1); + if ( !(((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierOrPatternContext extends ParserRuleContext { + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public IdentifierOrPatternContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifierOrPattern; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIdentifierOrPattern(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIdentifierOrPattern(this); + } + } + + public final IdentifierOrPatternContext identifierOrPattern() throws RecognitionException { + IdentifierOrPatternContext _localctx = new IdentifierOrPatternContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_identifierOrPattern); + try { + setState(565); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case As: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Await: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(563); + identifierName(); + } + break; + case OpenBracket: + case OpenBrace: + enterOuterAlt(_localctx, 2); + { + setState(564); + bindingPattern(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class OptionalParameterListContext extends ParserRuleContext { + public List optionalParameter() { + return getRuleContexts(OptionalParameterContext.class); + } + public OptionalParameterContext optionalParameter(int i) { + return getRuleContext(OptionalParameterContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public OptionalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_optionalParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterOptionalParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitOptionalParameterList(this); + } + } + + public final OptionalParameterListContext optionalParameterList() throws RecognitionException { + OptionalParameterListContext _localctx = new OptionalParameterListContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_optionalParameterList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(567); + optionalParameter(); + setState(572); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,45,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(568); + match(Comma); + setState(569); + optionalParameter(); + } + } + } + setState(574); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,45,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class OptionalParameterContext extends ParserRuleContext { + public IdentifierOrPatternContext identifierOrPattern() { + return getRuleContext(IdentifierOrPatternContext.class,0); + } + public DecoratorListContext decoratorList() { + return getRuleContext(DecoratorListContext.class,0); + } + public TerminalNode QuestionMark() { return getToken(TypeScriptParser.QuestionMark, 0); } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public OptionalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_optionalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterOptionalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitOptionalParameter(this); + } + } + + public final OptionalParameterContext optionalParameter() throws RecognitionException { + OptionalParameterContext _localctx = new OptionalParameterContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_optionalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(576); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==At) { + { + setState(575); + decoratorList(); + } + } + + { + setState(579); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) { + case 1: + { + setState(578); + accessibilityModifier(); + } + break; + } + setState(581); + identifierOrPattern(); + setState(590); + _errHandler.sync(this); + switch (_input.LA(1)) { + case QuestionMark: + { + setState(582); + match(QuestionMark); + setState(584); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(583); + typeAnnotation(); + } + } + + } + break; + case Assign: + case Colon: + { + setState(587); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(586); + typeAnnotation(); + } + } + + setState(589); + initializer(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RestParameterContext extends ParserRuleContext { + public TerminalNode Ellipsis() { return getToken(TypeScriptParser.Ellipsis, 0); } + public RequiredParameterContext requiredParameter() { + return getRuleContext(RequiredParameterContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public RestParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_restParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRestParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRestParameter(this); + } + } + + public final RestParameterContext restParameter() throws RecognitionException { + RestParameterContext _localctx = new RestParameterContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_restParameter); + try { + setState(596); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(592); + match(Ellipsis); + setState(593); + requiredParameter(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(594); + match(Ellipsis); + setState(595); + singleExpression(0); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructSignatureContext extends ParserRuleContext { + public TerminalNode New() { return getToken(TypeScriptParser.New, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public ConstructSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstructSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstructSignature(this); + } + } + + public final ConstructSignatureContext constructSignature() throws RecognitionException { + ConstructSignatureContext _localctx = new ConstructSignatureContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_constructSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(598); + match(New); + setState(600); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(599); + typeParameters(); + } + } + + setState(602); + match(OpenParen); + setState(604); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << NullLiteral) | (1L << BooleanLiteral))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (Break - 68)) | (1L << (Do - 68)) | (1L << (Instanceof - 68)) | (1L << (Typeof - 68)) | (1L << (Case - 68)) | (1L << (Else - 68)) | (1L << (New - 68)) | (1L << (Var - 68)) | (1L << (Catch - 68)) | (1L << (Finally - 68)) | (1L << (Return - 68)) | (1L << (Void - 68)) | (1L << (Continue - 68)) | (1L << (For - 68)) | (1L << (Switch - 68)) | (1L << (While - 68)) | (1L << (Debugger - 68)) | (1L << (Function - 68)) | (1L << (This - 68)) | (1L << (With - 68)) | (1L << (Default - 68)) | (1L << (If - 68)) | (1L << (Throw - 68)) | (1L << (Delete - 68)) | (1L << (In - 68)) | (1L << (Try - 68)) | (1L << (As - 68)) | (1L << (From - 68)) | (1L << (ReadOnly - 68)) | (1L << (Async - 68)) | (1L << (Class - 68)) | (1L << (Enum - 68)) | (1L << (Extends - 68)) | (1L << (Super - 68)) | (1L << (Const - 68)) | (1L << (Export - 68)) | (1L << (Import - 68)) | (1L << (Await - 68)) | (1L << (Implements - 68)) | (1L << (Let - 68)) | (1L << (Private - 68)) | (1L << (Public - 68)) | (1L << (Interface - 68)) | (1L << (Package - 68)) | (1L << (Protected - 68)) | (1L << (Static - 68)) | (1L << (Yield - 68)) | (1L << (ANY - 68)) | (1L << (NUMBER - 68)) | (1L << (BOOLEAN - 68)) | (1L << (STRING - 68)) | (1L << (SYMBOL - 68)) | (1L << (At - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(603); + parameterList(); + } + } + + setState(606); + match(CloseParen); + setState(608); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(607); + typeAnnotation(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IndexSignatureContext extends ParserRuleContext { + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public TerminalNode NUMBER() { return getToken(TypeScriptParser.NUMBER, 0); } + public TerminalNode STRING() { return getToken(TypeScriptParser.STRING, 0); } + public IndexSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_indexSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIndexSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIndexSignature(this); + } + } + + public final IndexSignatureContext indexSignature() throws RecognitionException { + IndexSignatureContext _localctx = new IndexSignatureContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_indexSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(610); + match(OpenBracket); + setState(611); + match(Identifier); + setState(612); + match(Colon); + setState(613); + _la = _input.LA(1); + if ( !(_la==NUMBER || _la==STRING) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(614); + match(CloseBracket); + setState(615); + typeAnnotation(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodSignatureContext extends ParserRuleContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public TerminalNode QuestionMark() { return getToken(TypeScriptParser.QuestionMark, 0); } + public MethodSignatureContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodSignature; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMethodSignature(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMethodSignature(this); + } + } + + public final MethodSignatureContext methodSignature() throws RecognitionException { + MethodSignatureContext _localctx = new MethodSignatureContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_methodSignature); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(617); + propertyName(); + setState(619); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==QuestionMark) { + { + setState(618); + match(QuestionMark); + } + } + + setState(621); + callSignature(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeAliasDeclarationContext extends ParserRuleContext { + public TerminalNode Type() { return getToken(TypeScriptParser.Type, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public Type_Context type_() { + return getRuleContext(Type_Context.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeAliasDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeAliasDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeAliasDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeAliasDeclaration(this); + } + } + + public final TypeAliasDeclarationContext typeAliasDeclaration() throws RecognitionException { + TypeAliasDeclarationContext _localctx = new TypeAliasDeclarationContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_typeAliasDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(623); + match(Type); + setState(624); + match(Identifier); + setState(626); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(625); + typeParameters(); + } + } + + setState(628); + match(Assign); + setState(629); + type_(); + setState(630); + match(SemiColon); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDeclarationContext extends ParserRuleContext { + public TerminalNode Constructor() { return getToken(TypeScriptParser.Constructor, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitConstructorDeclaration(this); + } + } + + public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { + ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_constructorDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(633); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)))) != 0)) { + { + setState(632); + accessibilityModifier(); + } + } + + setState(635); + match(Constructor); + setState(636); + match(OpenParen); + setState(638); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)) | (1L << (Identifier - 108)))) != 0)) { + { + setState(637); + formalParameterList(); + } + } + + setState(640); + match(CloseParen); + setState(646); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { + case 1: + { + { + setState(641); + match(OpenBrace); + setState(642); + functionBody(); + setState(643); + match(CloseBrace); + } + } + break; + case 2: + { + setState(645); + match(SemiColon); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceDeclarationContext extends ParserRuleContext { + public TerminalNode Interface() { return getToken(TypeScriptParser.Interface, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ObjectTypeContext objectType() { + return getRuleContext(ObjectTypeContext.class,0); + } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceExtendsClauseContext interfaceExtendsClause() { + return getRuleContext(InterfaceExtendsClauseContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInterfaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInterfaceDeclaration(this); + } + } + + public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { + InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_interfaceDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(649); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Export) { + { + setState(648); + match(Export); + } + } + + setState(651); + match(Interface); + setState(652); + match(Identifier); + setState(654); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(653); + typeParameters(); + } + } + + setState(657); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Extends) { + { + setState(656); + interfaceExtendsClause(); + } + } + + setState(659); + objectType(); + setState(661); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { + case 1: + { + setState(660); + match(SemiColon); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceExtendsClauseContext extends ParserRuleContext { + public TerminalNode Extends() { return getToken(TypeScriptParser.Extends, 0); } + public ClassOrInterfaceTypeListContext classOrInterfaceTypeList() { + return getRuleContext(ClassOrInterfaceTypeListContext.class,0); + } + public InterfaceExtendsClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceExtendsClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInterfaceExtendsClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInterfaceExtendsClause(this); + } + } + + public final InterfaceExtendsClauseContext interfaceExtendsClause() throws RecognitionException { + InterfaceExtendsClauseContext _localctx = new InterfaceExtendsClauseContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_interfaceExtendsClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(663); + match(Extends); + setState(664); + classOrInterfaceTypeList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceTypeListContext extends ParserRuleContext { + public List typeReference() { + return getRuleContexts(TypeReferenceContext.class); + } + public TypeReferenceContext typeReference(int i) { + return getRuleContext(TypeReferenceContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public ClassOrInterfaceTypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceTypeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassOrInterfaceTypeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassOrInterfaceTypeList(this); + } + } + + public final ClassOrInterfaceTypeListContext classOrInterfaceTypeList() throws RecognitionException { + ClassOrInterfaceTypeListContext _localctx = new ClassOrInterfaceTypeListContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_classOrInterfaceTypeList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(666); + typeReference(); + setState(671); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(667); + match(Comma); + setState(668); + typeReference(); + } + } + setState(673); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumDeclarationContext extends ParserRuleContext { + public TerminalNode Enum() { return getToken(TypeScriptParser.Enum, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TerminalNode Const() { return getToken(TypeScriptParser.Const, 0); } + public EnumBodyContext enumBody() { + return getRuleContext(EnumBodyContext.class,0); + } + public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumDeclaration(this); + } + } + + public final EnumDeclarationContext enumDeclaration() throws RecognitionException { + EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_enumDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(675); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Const) { + { + setState(674); + match(Const); + } + } + + setState(677); + match(Enum); + setState(678); + match(Identifier); + setState(679); + match(OpenBrace); + setState(681); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 5)) & ~0x3f) == 0 && ((1L << (_la - 5)) & ((1L << (OpenBracket - 5)) | (1L << (NullLiteral - 5)) | (1L << (BooleanLiteral - 5)) | (1L << (DecimalLiteral - 5)) | (1L << (HexIntegerLiteral - 5)) | (1L << (OctalIntegerLiteral - 5)) | (1L << (OctalIntegerLiteral2 - 5)) | (1L << (BinaryIntegerLiteral - 5)) | (1L << (Break - 5)))) != 0) || ((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (Do - 69)) | (1L << (Instanceof - 69)) | (1L << (Typeof - 69)) | (1L << (Case - 69)) | (1L << (Else - 69)) | (1L << (New - 69)) | (1L << (Var - 69)) | (1L << (Catch - 69)) | (1L << (Finally - 69)) | (1L << (Return - 69)) | (1L << (Void - 69)) | (1L << (Continue - 69)) | (1L << (For - 69)) | (1L << (Switch - 69)) | (1L << (While - 69)) | (1L << (Debugger - 69)) | (1L << (Function - 69)) | (1L << (This - 69)) | (1L << (With - 69)) | (1L << (Default - 69)) | (1L << (If - 69)) | (1L << (Throw - 69)) | (1L << (Delete - 69)) | (1L << (In - 69)) | (1L << (Try - 69)) | (1L << (As - 69)) | (1L << (From - 69)) | (1L << (ReadOnly - 69)) | (1L << (Async - 69)) | (1L << (Class - 69)) | (1L << (Enum - 69)) | (1L << (Extends - 69)) | (1L << (Super - 69)) | (1L << (Const - 69)) | (1L << (Export - 69)) | (1L << (Import - 69)) | (1L << (Await - 69)) | (1L << (Implements - 69)) | (1L << (Let - 69)) | (1L << (Private - 69)) | (1L << (Public - 69)) | (1L << (Interface - 69)) | (1L << (Package - 69)) | (1L << (Protected - 69)) | (1L << (Static - 69)) | (1L << (Yield - 69)) | (1L << (Identifier - 69)) | (1L << (StringLiteral - 69)))) != 0)) { + { + setState(680); + enumBody(); + } + } + + setState(683); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumBodyContext extends ParserRuleContext { + public EnumMemberListContext enumMemberList() { + return getRuleContext(EnumMemberListContext.class,0); + } + public TerminalNode Comma() { return getToken(TypeScriptParser.Comma, 0); } + public EnumBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumBody(this); + } + } + + public final EnumBodyContext enumBody() throws RecognitionException { + EnumBodyContext _localctx = new EnumBodyContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_enumBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(685); + enumMemberList(); + setState(687); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(686); + match(Comma); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumMemberListContext extends ParserRuleContext { + public List enumMember() { + return getRuleContexts(EnumMemberContext.class); + } + public EnumMemberContext enumMember(int i) { + return getRuleContext(EnumMemberContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public EnumMemberListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumMemberList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumMemberList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumMemberList(this); + } + } + + public final EnumMemberListContext enumMemberList() throws RecognitionException { + EnumMemberListContext _localctx = new EnumMemberListContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_enumMemberList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(689); + enumMember(); + setState(694); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,68,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(690); + match(Comma); + setState(691); + enumMember(); + } + } + } + setState(696); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,68,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumMemberContext extends ParserRuleContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public EnumMemberContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumMember; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEnumMember(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEnumMember(this); + } + } + + public final EnumMemberContext enumMember() throws RecognitionException { + EnumMemberContext _localctx = new EnumMemberContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_enumMember); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(697); + propertyName(); + setState(700); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Assign) { + { + setState(698); + match(Assign); + setState(699); + singleExpression(0); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamespaceDeclarationContext extends ParserRuleContext { + public TerminalNode Namespace() { return getToken(TypeScriptParser.Namespace, 0); } + public NamespaceNameContext namespaceName() { + return getRuleContext(NamespaceNameContext.class,0); + } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public NamespaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namespaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNamespaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNamespaceDeclaration(this); + } + } + + public final NamespaceDeclarationContext namespaceDeclaration() throws RecognitionException { + NamespaceDeclarationContext _localctx = new NamespaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_namespaceDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(702); + match(Namespace); + setState(703); + namespaceName(); + setState(704); + match(OpenBrace); + setState(706); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,70,_ctx) ) { + case 1: + { + setState(705); + statementList(); + } + break; + } + setState(708); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamespaceNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(TypeScriptParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(TypeScriptParser.Identifier, i); + } + public List Dot() { return getTokens(TypeScriptParser.Dot); } + public TerminalNode Dot(int i) { + return getToken(TypeScriptParser.Dot, i); + } + public NamespaceNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namespaceName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNamespaceName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNamespaceName(this); + } + } + + public final NamespaceNameContext namespaceName() throws RecognitionException { + NamespaceNameContext _localctx = new NamespaceNameContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_namespaceName); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(710); + match(Identifier); + setState(719); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(712); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(711); + match(Dot); + } + } + setState(714); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==Dot ); + setState(716); + match(Identifier); + } + } + } + setState(721); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportAliasDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public NamespaceNameContext namespaceName() { + return getRuleContext(NamespaceNameContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TerminalNode Require() { return getToken(TypeScriptParser.Require, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public ImportAliasDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importAliasDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImportAliasDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImportAliasDeclaration(this); + } + } + + public final ImportAliasDeclarationContext importAliasDeclaration() throws RecognitionException { + ImportAliasDeclarationContext _localctx = new ImportAliasDeclarationContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_importAliasDeclaration); + try { + setState(734); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(722); + match(Identifier); + setState(723); + match(Assign); + setState(724); + namespaceName(); + setState(725); + match(SemiColon); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(727); + match(Identifier); + setState(728); + match(Assign); + setState(729); + match(Require); + setState(730); + match(OpenParen); + setState(731); + match(StringLiteral); + setState(732); + match(CloseParen); + setState(733); + match(SemiColon); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportAllContext extends ParserRuleContext { + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public ImportAllContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importAll; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImportAll(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImportAll(this); + } + } + + public final ImportAllContext importAll() throws RecognitionException { + ImportAllContext _localctx = new ImportAllContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_importAll); + try { + enterOuterAlt(_localctx, 1); + { + setState(736); + match(StringLiteral); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorListContext extends ParserRuleContext { + public List decorator() { + return getRuleContexts(DecoratorContext.class); + } + public DecoratorContext decorator(int i) { + return getRuleContext(DecoratorContext.class,i); + } + public DecoratorListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decoratorList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecoratorList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecoratorList(this); + } + } + + public final DecoratorListContext decoratorList() throws RecognitionException { + DecoratorListContext _localctx = new DecoratorListContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_decoratorList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(739); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(738); + decorator(); + } + } + setState(741); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==At ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorContext extends ParserRuleContext { + public TerminalNode At() { return getToken(TypeScriptParser.At, 0); } + public DecoratorMemberExpressionContext decoratorMemberExpression() { + return getRuleContext(DecoratorMemberExpressionContext.class,0); + } + public DecoratorCallExpressionContext decoratorCallExpression() { + return getRuleContext(DecoratorCallExpressionContext.class,0); + } + public DecoratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decorator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecorator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecorator(this); + } + } + + public final DecoratorContext decorator() throws RecognitionException { + DecoratorContext _localctx = new DecoratorContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_decorator); + try { + enterOuterAlt(_localctx, 1); + { + setState(743); + match(At); + setState(746); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + { + setState(744); + decoratorMemberExpression(0); + } + break; + case 2: + { + setState(745); + decoratorCallExpression(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DecoratorMemberExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public DecoratorMemberExpressionContext decoratorMemberExpression() { + return getRuleContext(DecoratorMemberExpressionContext.class,0); + } + public TerminalNode Dot() { return getToken(TypeScriptParser.Dot, 0); } + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public DecoratorMemberExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decoratorMemberExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecoratorMemberExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecoratorMemberExpression(this); + } + } + + public final DecoratorMemberExpressionContext decoratorMemberExpression() throws RecognitionException { + return decoratorMemberExpression(0); + } + + private DecoratorMemberExpressionContext decoratorMemberExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DecoratorMemberExpressionContext _localctx = new DecoratorMemberExpressionContext(_ctx, _parentState); + DecoratorMemberExpressionContext _prevctx = _localctx; + int _startState = 114; + enterRecursionRule(_localctx, 114, RULE_decoratorMemberExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(754); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + { + setState(749); + match(Identifier); + } + break; + case OpenParen: + { + setState(750); + match(OpenParen); + setState(751); + singleExpression(0); + setState(752); + match(CloseParen); + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(761); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new DecoratorMemberExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_decoratorMemberExpression); + setState(756); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(757); + match(Dot); + setState(758); + identifierName(); + } + } + } + setState(763); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class DecoratorCallExpressionContext extends ParserRuleContext { + public DecoratorMemberExpressionContext decoratorMemberExpression() { + return getRuleContext(DecoratorMemberExpressionContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public DecoratorCallExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decoratorCallExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDecoratorCallExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDecoratorCallExpression(this); + } + } + + public final DecoratorCallExpressionContext decoratorCallExpression() throws RecognitionException { + DecoratorCallExpressionContext _localctx = new DecoratorCallExpressionContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_decoratorCallExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(764); + decoratorMemberExpression(0); + setState(765); + arguments(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ProgramContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(TypeScriptParser.EOF, 0); } + public SourceElementsContext sourceElements() { + return getRuleContext(SourceElementsContext.class,0); + } + public ProgramContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_program; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterProgram(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitProgram(this); + } + } + + public final ProgramContext program() throws RecognitionException { + ProgramContext _localctx = new ProgramContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_program); + try { + enterOuterAlt(_localctx, 1); + { + setState(768); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { + case 1: + { + setState(767); + sourceElements(); + } + break; + } + setState(770); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SourceElementContext extends ParserRuleContext { + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public SourceElementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sourceElement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSourceElement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSourceElement(this); + } + } + + public final SourceElementContext sourceElement() throws RecognitionException { + SourceElementContext _localctx = new SourceElementContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_sourceElement); + try { + enterOuterAlt(_localctx, 1); + { + setState(773); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { + case 1: + { + setState(772); + match(Export); + } + break; + } + setState(775); + statement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public VariableStatementContext variableStatement() { + return getRuleContext(VariableStatementContext.class,0); + } + public ImportStatementContext importStatement() { + return getRuleContext(ImportStatementContext.class,0); + } + public ExportStatementContext exportStatement() { + return getRuleContext(ExportStatementContext.class,0); + } + public EmptyStatement_Context emptyStatement_() { + return getRuleContext(EmptyStatement_Context.class,0); + } + public AbstractDeclarationContext abstractDeclaration() { + return getRuleContext(AbstractDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public NamespaceDeclarationContext namespaceDeclaration() { + return getRuleContext(NamespaceDeclarationContext.class,0); + } + public IfStatementContext ifStatement() { + return getRuleContext(IfStatementContext.class,0); + } + public IterationStatementContext iterationStatement() { + return getRuleContext(IterationStatementContext.class,0); + } + public ContinueStatementContext continueStatement() { + return getRuleContext(ContinueStatementContext.class,0); + } + public BreakStatementContext breakStatement() { + return getRuleContext(BreakStatementContext.class,0); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public YieldStatementContext yieldStatement() { + return getRuleContext(YieldStatementContext.class,0); + } + public WithStatementContext withStatement() { + return getRuleContext(WithStatementContext.class,0); + } + public LabelledStatementContext labelledStatement() { + return getRuleContext(LabelledStatementContext.class,0); + } + public SwitchStatementContext switchStatement() { + return getRuleContext(SwitchStatementContext.class,0); + } + public ThrowStatementContext throwStatement() { + return getRuleContext(ThrowStatementContext.class,0); + } + public TryStatementContext tryStatement() { + return getRuleContext(TryStatementContext.class,0); + } + public DebuggerStatementContext debuggerStatement() { + return getRuleContext(DebuggerStatementContext.class,0); + } + public FunctionDeclarationContext functionDeclaration() { + return getRuleContext(FunctionDeclarationContext.class,0); + } + public ArrowFunctionDeclarationContext arrowFunctionDeclaration() { + return getRuleContext(ArrowFunctionDeclarationContext.class,0); + } + public GeneratorFunctionDeclarationContext generatorFunctionDeclaration() { + return getRuleContext(GeneratorFunctionDeclarationContext.class,0); + } + public TypeAliasDeclarationContext typeAliasDeclaration() { + return getRuleContext(TypeAliasDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public ExpressionStatementContext expressionStatement() { + return getRuleContext(ExpressionStatementContext.class,0); + } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_statement); + try { + setState(806); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,80,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(777); + block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(778); + variableStatement(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(779); + importStatement(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(780); + exportStatement(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(781); + emptyStatement_(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(782); + abstractDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(783); + classDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(784); + interfaceDeclaration(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(785); + namespaceDeclaration(); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(786); + ifStatement(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(787); + iterationStatement(); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(788); + continueStatement(); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(789); + breakStatement(); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(790); + returnStatement(); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(791); + yieldStatement(); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(792); + withStatement(); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(793); + labelledStatement(); + } + break; + case 18: + enterOuterAlt(_localctx, 18); + { + setState(794); + switchStatement(); + } + break; + case 19: + enterOuterAlt(_localctx, 19); + { + setState(795); + throwStatement(); + } + break; + case 20: + enterOuterAlt(_localctx, 20); + { + setState(796); + tryStatement(); + } + break; + case 21: + enterOuterAlt(_localctx, 21); + { + setState(797); + debuggerStatement(); + } + break; + case 22: + enterOuterAlt(_localctx, 22); + { + setState(798); + functionDeclaration(); + } + break; + case 23: + enterOuterAlt(_localctx, 23); + { + setState(799); + arrowFunctionDeclaration(); + } + break; + case 24: + enterOuterAlt(_localctx, 24); + { + setState(800); + generatorFunctionDeclaration(); + } + break; + case 25: + enterOuterAlt(_localctx, 25); + { + setState(801); + typeAliasDeclaration(); + } + break; + case 26: + enterOuterAlt(_localctx, 26); + { + setState(802); + enumDeclaration(); + } + break; + case 27: + enterOuterAlt(_localctx, 27); + { + setState(803); + expressionStatement(); + } + break; + case 28: + enterOuterAlt(_localctx, 28); + { + setState(804); + match(Export); + setState(805); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBlock(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_block); + try { + enterOuterAlt(_localctx, 1); + { + setState(808); + match(OpenBrace); + setState(810); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) { + case 1: + { + setState(809); + statementList(); + } + break; + } + setState(812); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementListContext extends ParserRuleContext { + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public StatementListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statementList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterStatementList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitStatementList(this); + } + } + + public final StatementListContext statementList() throws RecognitionException { + StatementListContext _localctx = new StatementListContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_statementList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(815); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(814); + statement(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(817); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,82,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AbstractDeclarationContext extends ParserRuleContext { + public TerminalNode Abstract() { return getToken(TypeScriptParser.Abstract, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public VariableStatementContext variableStatement() { + return getRuleContext(VariableStatementContext.class,0); + } + public AbstractDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_abstractDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAbstractDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAbstractDeclaration(this); + } + } + + public final AbstractDeclarationContext abstractDeclaration() throws RecognitionException { + AbstractDeclarationContext _localctx = new AbstractDeclarationContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_abstractDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(819); + match(Abstract); + setState(823); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) { + case 1: + { + setState(820); + match(Identifier); + setState(821); + callSignature(); + } + break; + case 2: + { + setState(822); + variableStatement(); + } + break; + } + setState(825); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportStatementContext extends ParserRuleContext { + public TerminalNode Import() { return getToken(TypeScriptParser.Import, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public ImportFromBlockContext importFromBlock() { + return getRuleContext(ImportFromBlockContext.class,0); + } + public ImportAliasDeclarationContext importAliasDeclaration() { + return getRuleContext(ImportAliasDeclarationContext.class,0); + } + public ImportAllContext importAll() { + return getRuleContext(ImportAllContext.class,0); + } + public ImportStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImportStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImportStatement(this); + } + } + + public final ImportStatementContext importStatement() throws RecognitionException { + ImportStatementContext _localctx = new ImportStatementContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_importStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(827); + match(Import); + setState(831); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,84,_ctx) ) { + case 1: + { + setState(828); + importFromBlock(); + } + break; + case 2: + { + setState(829); + importAliasDeclaration(); + } + break; + case 3: + { + setState(830); + importAll(); + } + break; + } + setState(833); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportFromBlockContext extends ParserRuleContext { + public TerminalNode From() { return getToken(TypeScriptParser.From, 0); } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public TerminalNode Dollar() { return getToken(TypeScriptParser.Dollar, 0); } + public TerminalNode Lodash() { return getToken(TypeScriptParser.Lodash, 0); } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public MultipleImportStatementContext multipleImportStatement() { + return getRuleContext(MultipleImportStatementContext.class,0); + } + public List identifierName() { + return getRuleContexts(IdentifierNameContext.class); + } + public IdentifierNameContext identifierName(int i) { + return getRuleContext(IdentifierNameContext.class,i); + } + public TerminalNode As() { return getToken(TypeScriptParser.As, 0); } + public ImportFromBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importFromBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImportFromBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImportFromBlock(this); + } + } + + public final ImportFromBlockContext importFromBlock() throws RecognitionException { + ImportFromBlockContext _localctx = new ImportFromBlockContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_importFromBlock); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(840); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) { + case 1: + { + setState(835); + match(Dollar); + } + break; + case 2: + { + setState(836); + match(Lodash); + } + break; + case 3: + { + setState(837); + match(Multiply); + } + break; + case 4: + { + setState(838); + multipleImportStatement(); + } + break; + case 5: + { + setState(839); + identifierName(); + } + break; + } + setState(844); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==As) { + { + setState(842); + match(As); + setState(843); + identifierName(); + } + } + + setState(846); + match(From); + setState(847); + match(StringLiteral); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultipleImportStatementContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public List identifierName() { + return getRuleContexts(IdentifierNameContext.class); + } + public IdentifierNameContext identifierName(int i) { + return getRuleContext(IdentifierNameContext.class,i); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public MultipleImportStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multipleImportStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMultipleImportStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMultipleImportStatement(this); + } + } + + public final MultipleImportStatementContext multipleImportStatement() throws RecognitionException { + MultipleImportStatementContext _localctx = new MultipleImportStatementContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_multipleImportStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(852); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==NullLiteral || _la==BooleanLiteral || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (Break - 68)) | (1L << (Do - 68)) | (1L << (Instanceof - 68)) | (1L << (Typeof - 68)) | (1L << (Case - 68)) | (1L << (Else - 68)) | (1L << (New - 68)) | (1L << (Var - 68)) | (1L << (Catch - 68)) | (1L << (Finally - 68)) | (1L << (Return - 68)) | (1L << (Void - 68)) | (1L << (Continue - 68)) | (1L << (For - 68)) | (1L << (Switch - 68)) | (1L << (While - 68)) | (1L << (Debugger - 68)) | (1L << (Function - 68)) | (1L << (This - 68)) | (1L << (With - 68)) | (1L << (Default - 68)) | (1L << (If - 68)) | (1L << (Throw - 68)) | (1L << (Delete - 68)) | (1L << (In - 68)) | (1L << (Try - 68)) | (1L << (As - 68)) | (1L << (From - 68)) | (1L << (ReadOnly - 68)) | (1L << (Async - 68)) | (1L << (Class - 68)) | (1L << (Enum - 68)) | (1L << (Extends - 68)) | (1L << (Super - 68)) | (1L << (Const - 68)) | (1L << (Export - 68)) | (1L << (Import - 68)) | (1L << (Await - 68)) | (1L << (Implements - 68)) | (1L << (Let - 68)) | (1L << (Private - 68)) | (1L << (Public - 68)) | (1L << (Interface - 68)) | (1L << (Package - 68)) | (1L << (Protected - 68)) | (1L << (Static - 68)) | (1L << (Yield - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(849); + identifierName(); + setState(850); + match(Comma); + } + } + + setState(854); + match(OpenBrace); + setState(855); + identifierName(); + setState(860); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(856); + match(Comma); + setState(857); + identifierName(); + } + } + setState(862); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(863); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExportStatementContext extends ParserRuleContext { + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public ImportFromBlockContext importFromBlock() { + return getRuleContext(ImportFromBlockContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode Default() { return getToken(TypeScriptParser.Default, 0); } + public ExportStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_exportStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterExportStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitExportStatement(this); + } + } + + public final ExportStatementContext exportStatement() throws RecognitionException { + ExportStatementContext _localctx = new ExportStatementContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_exportStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(865); + match(Export); + setState(867); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,89,_ctx) ) { + case 1: + { + setState(866); + match(Default); + } + break; + } + setState(871); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + case 1: + { + setState(869); + importFromBlock(); + } + break; + case 2: + { + setState(870); + statement(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableStatementContext extends ParserRuleContext { + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public VariableDeclarationListContext variableDeclarationList() { + return getRuleContext(VariableDeclarationListContext.class,0); + } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public VarModifierContext varModifier() { + return getRuleContext(VarModifierContext.class,0); + } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public VariableStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVariableStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVariableStatement(this); + } + } + + public final VariableStatementContext variableStatement() throws RecognitionException { + VariableStatementContext _localctx = new VariableStatementContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_variableStatement); + int _la; + try { + setState(894); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(873); + bindingPattern(); + setState(875); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(874); + typeAnnotation(); + } + } + + setState(877); + initializer(); + setState(879); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,92,_ctx) ) { + case 1: + { + setState(878); + match(SemiColon); + } + break; + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(882); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)))) != 0)) { + { + setState(881); + accessibilityModifier(); + } + } + + setState(885); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 75)) & ~0x3f) == 0 && ((1L << (_la - 75)) & ((1L << (Var - 75)) | (1L << (Const - 75)) | (1L << (Let - 75)))) != 0)) { + { + setState(884); + varModifier(); + } + } + + setState(888); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ReadOnly) { + { + setState(887); + match(ReadOnly); + } + } + + setState(890); + variableDeclarationList(); + setState(892); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { + case 1: + { + setState(891); + match(SemiColon); + } + break; + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclarationListContext extends ParserRuleContext { + public List variableDeclaration() { + return getRuleContexts(VariableDeclarationContext.class); + } + public VariableDeclarationContext variableDeclaration(int i) { + return getRuleContext(VariableDeclarationContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public VariableDeclarationListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarationList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVariableDeclarationList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVariableDeclarationList(this); + } + } + + public final VariableDeclarationListContext variableDeclarationList() throws RecognitionException { + VariableDeclarationListContext _localctx = new VariableDeclarationListContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_variableDeclarationList); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(896); + variableDeclaration(); + setState(901); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(897); + match(Comma); + setState(898); + variableDeclaration(); + } + } + } + setState(903); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,98,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclarationContext extends ParserRuleContext { + public AssignableContext assignable() { + return getRuleContext(AssignableContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public VariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVariableDeclaration(this); + } + } + + public final VariableDeclarationContext variableDeclaration() throws RecognitionException { + VariableDeclarationContext _localctx = new VariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_variableDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(904); + assignable(); + setState(906); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) { + case 1: + { + setState(905); + typeAnnotation(); + } + break; + } + setState(909); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) { + case 1: + { + setState(908); + singleExpression(0); + } + break; + } + setState(916); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) { + case 1: + { + setState(911); + match(Assign); + setState(913); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { + case 1: + { + setState(912); + typeParameters(); + } + break; + } + setState(915); + singleExpression(0); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EmptyStatement_Context extends ParserRuleContext { + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public EmptyStatement_Context(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_emptyStatement_; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEmptyStatement_(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEmptyStatement_(this); + } + } + + public final EmptyStatement_Context emptyStatement_() throws RecognitionException { + EmptyStatement_Context _localctx = new EmptyStatement_Context(_ctx, getState()); + enterRule(_localctx, 144, RULE_emptyStatement_); + try { + enterOuterAlt(_localctx, 1); + { + setState(918); + match(SemiColon); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionStatementContext extends ParserRuleContext { + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public ExpressionStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterExpressionStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitExpressionStatement(this); + } + } + + public final ExpressionStatementContext expressionStatement() throws RecognitionException { + ExpressionStatementContext _localctx = new ExpressionStatementContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_expressionStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(920); + if (!(this.notOpenBraceAndNotFunction())) throw new FailedPredicateException(this, "this.notOpenBraceAndNotFunction()"); + setState(921); + expressionSequence(); + setState(923); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) { + case 1: + { + setState(922); + match(SemiColon); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IfStatementContext extends ParserRuleContext { + public TerminalNode If() { return getToken(TypeScriptParser.If, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public TerminalNode Else() { return getToken(TypeScriptParser.Else, 0); } + public IfStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ifStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIfStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIfStatement(this); + } + } + + public final IfStatementContext ifStatement() throws RecognitionException { + IfStatementContext _localctx = new IfStatementContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_ifStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(925); + match(If); + setState(926); + match(OpenParen); + setState(927); + expressionSequence(); + setState(928); + match(CloseParen); + setState(929); + statement(); + setState(932); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,104,_ctx) ) { + case 1: + { + setState(930); + match(Else); + setState(931); + statement(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IterationStatementContext extends ParserRuleContext { + public IterationStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_iterationStatement; } + + public IterationStatementContext() { } + public void copyFrom(IterationStatementContext ctx) { + super.copyFrom(ctx); + } + } + public static class DoStatementContext extends IterationStatementContext { + public TerminalNode Do() { return getToken(TypeScriptParser.Do, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode While() { return getToken(TypeScriptParser.While, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public DoStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDoStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDoStatement(this); + } + } + public static class ForVarStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public VarModifierContext varModifier() { + return getRuleContext(VarModifierContext.class,0); + } + public VariableDeclarationListContext variableDeclarationList() { + return getRuleContext(VariableDeclarationListContext.class,0); + } + public List SemiColon() { return getTokens(TypeScriptParser.SemiColon); } + public TerminalNode SemiColon(int i) { + return getToken(TypeScriptParser.SemiColon, i); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public List expressionSequence() { + return getRuleContexts(ExpressionSequenceContext.class); + } + public ExpressionSequenceContext expressionSequence(int i) { + return getRuleContext(ExpressionSequenceContext.class,i); + } + public ForVarStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForVarStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForVarStatement(this); + } + } + public static class ForVarInStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public VarModifierContext varModifier() { + return getRuleContext(VarModifierContext.class,0); + } + public VariableDeclarationContext variableDeclaration() { + return getRuleContext(VariableDeclarationContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Await() { return getToken(TypeScriptParser.Await, 0); } + public ForVarInStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForVarInStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForVarInStatement(this); + } + } + public static class WhileStatementContext extends IterationStatementContext { + public TerminalNode While() { return getToken(TypeScriptParser.While, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public WhileStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterWhileStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitWhileStatement(this); + } + } + public static class ForStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public List SemiColon() { return getTokens(TypeScriptParser.SemiColon); } + public TerminalNode SemiColon(int i) { + return getToken(TypeScriptParser.SemiColon, i); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public List expressionSequence() { + return getRuleContexts(ExpressionSequenceContext.class); + } + public ExpressionSequenceContext expressionSequence(int i) { + return getRuleContext(ExpressionSequenceContext.class,i); + } + public ForStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForStatement(this); + } + } + public static class ForInStatementContext extends IterationStatementContext { + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Await() { return getToken(TypeScriptParser.Await, 0); } + public ForInStatementContext(IterationStatementContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterForInStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitForInStatement(this); + } + } + + public final IterationStatementContext iterationStatement() throws RecognitionException { + IterationStatementContext _localctx = new IterationStatementContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_iterationStatement); + int _la; + try { + setState(1009); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,114,_ctx) ) { + case 1: + _localctx = new DoStatementContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(934); + match(Do); + setState(935); + statement(); + setState(936); + match(While); + setState(937); + match(OpenParen); + setState(938); + expressionSequence(); + setState(939); + match(CloseParen); + setState(940); + eos(); + } + break; + case 2: + _localctx = new WhileStatementContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(942); + match(While); + setState(943); + match(OpenParen); + setState(944); + expressionSequence(); + setState(945); + match(CloseParen); + setState(946); + statement(); + } + break; + case 3: + _localctx = new ForStatementContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(948); + match(For); + setState(949); + match(OpenParen); + setState(951); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HexIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral2 - 64)) | (1L << (BinaryIntegerLiteral - 64)) | (1L << (Break - 64)) | (1L << (Do - 64)) | (1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (As - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Await - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)))) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & ((1L << (Identifier - 131)) | (1L << (StringLiteral - 131)) | (1L << (TemplateStringLiteral - 131)))) != 0)) { + { + setState(950); + expressionSequence(); + } + } + + setState(953); + match(SemiColon); + setState(955); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HexIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral2 - 64)) | (1L << (BinaryIntegerLiteral - 64)) | (1L << (Break - 64)) | (1L << (Do - 64)) | (1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (As - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Await - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)))) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & ((1L << (Identifier - 131)) | (1L << (StringLiteral - 131)) | (1L << (TemplateStringLiteral - 131)))) != 0)) { + { + setState(954); + expressionSequence(); + } + } + + setState(957); + match(SemiColon); + setState(959); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HexIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral2 - 64)) | (1L << (BinaryIntegerLiteral - 64)) | (1L << (Break - 64)) | (1L << (Do - 64)) | (1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (As - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Await - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)))) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & ((1L << (Identifier - 131)) | (1L << (StringLiteral - 131)) | (1L << (TemplateStringLiteral - 131)))) != 0)) { + { + setState(958); + expressionSequence(); + } + } + + setState(961); + match(CloseParen); + setState(962); + statement(); + } + break; + case 4: + _localctx = new ForVarStatementContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(963); + match(For); + setState(964); + match(OpenParen); + setState(965); + varModifier(); + setState(966); + variableDeclarationList(); + setState(967); + match(SemiColon); + setState(969); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HexIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral2 - 64)) | (1L << (BinaryIntegerLiteral - 64)) | (1L << (Break - 64)) | (1L << (Do - 64)) | (1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (As - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Await - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)))) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & ((1L << (Identifier - 131)) | (1L << (StringLiteral - 131)) | (1L << (TemplateStringLiteral - 131)))) != 0)) { + { + setState(968); + expressionSequence(); + } + } + + setState(971); + match(SemiColon); + setState(973); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HexIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral2 - 64)) | (1L << (BinaryIntegerLiteral - 64)) | (1L << (Break - 64)) | (1L << (Do - 64)) | (1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (As - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Await - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)))) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & ((1L << (Identifier - 131)) | (1L << (StringLiteral - 131)) | (1L << (TemplateStringLiteral - 131)))) != 0)) { + { + setState(972); + expressionSequence(); + } + } + + setState(975); + match(CloseParen); + setState(976); + statement(); + } + break; + case 5: + _localctx = new ForInStatementContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(978); + match(For); + setState(980); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Await) { + { + setState(979); + match(Await); + } + } + + setState(982); + match(OpenParen); + setState(983); + singleExpression(0); + setState(987); + _errHandler.sync(this); + switch (_input.LA(1)) { + case In: + { + setState(984); + match(In); + } + break; + case Identifier: + { + setState(985); + match(Identifier); + setState(986); + if (!(this.p("of"))) throw new FailedPredicateException(this, "this.p(\"of\")"); + } + break; + default: + throw new NoViableAltException(this); + } + setState(989); + expressionSequence(); + setState(990); + match(CloseParen); + setState(991); + statement(); + } + break; + case 6: + _localctx = new ForVarInStatementContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(993); + match(For); + setState(995); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Await) { + { + setState(994); + match(Await); + } + } + + setState(997); + match(OpenParen); + setState(998); + varModifier(); + setState(999); + variableDeclaration(); + setState(1003); + _errHandler.sync(this); + switch (_input.LA(1)) { + case In: + { + setState(1000); + match(In); + } + break; + case Identifier: + { + setState(1001); + match(Identifier); + setState(1002); + if (!(this.p("of"))) throw new FailedPredicateException(this, "this.p(\"of\")"); + } + break; + default: + throw new NoViableAltException(this); + } + setState(1005); + expressionSequence(); + setState(1006); + match(CloseParen); + setState(1007); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VarModifierContext extends ParserRuleContext { + public TerminalNode Var() { return getToken(TypeScriptParser.Var, 0); } + public TerminalNode Let() { return getToken(TypeScriptParser.Let, 0); } + public TerminalNode Const() { return getToken(TypeScriptParser.Const, 0); } + public VarModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_varModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVarModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVarModifier(this); + } + } + + public final VarModifierContext varModifier() throws RecognitionException { + VarModifierContext _localctx = new VarModifierContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_varModifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1011); + _la = _input.LA(1); + if ( !(((((_la - 75)) & ~0x3f) == 0 && ((1L << (_la - 75)) & ((1L << (Var - 75)) | (1L << (Const - 75)) | (1L << (Let - 75)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ContinueStatementContext extends ParserRuleContext { + public TerminalNode Continue() { return getToken(TypeScriptParser.Continue, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ContinueStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_continueStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterContinueStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitContinueStatement(this); + } + } + + public final ContinueStatementContext continueStatement() throws RecognitionException { + ContinueStatementContext _localctx = new ContinueStatementContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_continueStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1013); + match(Continue); + setState(1016); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { + case 1: + { + setState(1014); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1015); + match(Identifier); + } + break; + } + setState(1018); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BreakStatementContext extends ParserRuleContext { + public TerminalNode Break() { return getToken(TypeScriptParser.Break, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public BreakStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_breakStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBreakStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBreakStatement(this); + } + } + + public final BreakStatementContext breakStatement() throws RecognitionException { + BreakStatementContext _localctx = new BreakStatementContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_breakStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1020); + match(Break); + setState(1023); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,116,_ctx) ) { + case 1: + { + setState(1021); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1022); + match(Identifier); + } + break; + } + setState(1025); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ReturnStatementContext extends ParserRuleContext { + public TerminalNode Return() { return getToken(TypeScriptParser.Return, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public ReturnStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_returnStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterReturnStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitReturnStatement(this); + } + } + + public final ReturnStatementContext returnStatement() throws RecognitionException { + ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_returnStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1027); + match(Return); + setState(1030); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,117,_ctx) ) { + case 1: + { + setState(1028); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1029); + expressionSequence(); + } + break; + } + setState(1032); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class YieldStatementContext extends ParserRuleContext { + public TerminalNode Yield() { return getToken(TypeScriptParser.Yield, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public YieldStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_yieldStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterYieldStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitYieldStatement(this); + } + } + + public final YieldStatementContext yieldStatement() throws RecognitionException { + YieldStatementContext _localctx = new YieldStatementContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_yieldStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1034); + match(Yield); + setState(1037); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,118,_ctx) ) { + case 1: + { + setState(1035); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1036); + expressionSequence(); + } + break; + } + setState(1039); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class WithStatementContext extends ParserRuleContext { + public TerminalNode With() { return getToken(TypeScriptParser.With, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public WithStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_withStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterWithStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitWithStatement(this); + } + } + + public final WithStatementContext withStatement() throws RecognitionException { + WithStatementContext _localctx = new WithStatementContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_withStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1041); + match(With); + setState(1042); + match(OpenParen); + setState(1043); + expressionSequence(); + setState(1044); + match(CloseParen); + setState(1045); + statement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchStatementContext extends ParserRuleContext { + public TerminalNode Switch() { return getToken(TypeScriptParser.Switch, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public CaseBlockContext caseBlock() { + return getRuleContext(CaseBlockContext.class,0); + } + public SwitchStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSwitchStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSwitchStatement(this); + } + } + + public final SwitchStatementContext switchStatement() throws RecognitionException { + SwitchStatementContext _localctx = new SwitchStatementContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_switchStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1047); + match(Switch); + setState(1048); + match(OpenParen); + setState(1049); + expressionSequence(); + setState(1050); + match(CloseParen); + setState(1051); + caseBlock(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CaseBlockContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public List caseClauses() { + return getRuleContexts(CaseClausesContext.class); + } + public CaseClausesContext caseClauses(int i) { + return getRuleContext(CaseClausesContext.class,i); + } + public DefaultClauseContext defaultClause() { + return getRuleContext(DefaultClauseContext.class,0); + } + public CaseBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_caseBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCaseBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCaseBlock(this); + } + } + + public final CaseBlockContext caseBlock() throws RecognitionException { + CaseBlockContext _localctx = new CaseBlockContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_caseBlock); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1053); + match(OpenBrace); + setState(1055); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Case) { + { + setState(1054); + caseClauses(); + } + } + + setState(1061); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Default) { + { + setState(1057); + defaultClause(); + setState(1059); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Case) { + { + setState(1058); + caseClauses(); + } + } + + } + } + + setState(1063); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CaseClausesContext extends ParserRuleContext { + public List caseClause() { + return getRuleContexts(CaseClauseContext.class); + } + public CaseClauseContext caseClause(int i) { + return getRuleContext(CaseClauseContext.class,i); + } + public CaseClausesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_caseClauses; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCaseClauses(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCaseClauses(this); + } + } + + public final CaseClausesContext caseClauses() throws RecognitionException { + CaseClausesContext _localctx = new CaseClausesContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_caseClauses); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1066); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1065); + caseClause(); + } + } + setState(1068); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==Case ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CaseClauseContext extends ParserRuleContext { + public TerminalNode Case() { return getToken(TypeScriptParser.Case, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public CaseClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_caseClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCaseClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCaseClause(this); + } + } + + public final CaseClauseContext caseClause() throws RecognitionException { + CaseClauseContext _localctx = new CaseClauseContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_caseClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1070); + match(Case); + setState(1071); + expressionSequence(); + setState(1072); + match(Colon); + setState(1074); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { + case 1: + { + setState(1073); + statementList(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DefaultClauseContext extends ParserRuleContext { + public TerminalNode Default() { return getToken(TypeScriptParser.Default, 0); } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public StatementListContext statementList() { + return getRuleContext(StatementListContext.class,0); + } + public DefaultClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_defaultClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDefaultClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDefaultClause(this); + } + } + + public final DefaultClauseContext defaultClause() throws RecognitionException { + DefaultClauseContext _localctx = new DefaultClauseContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_defaultClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1076); + match(Default); + setState(1077); + match(Colon); + setState(1079); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) { + case 1: + { + setState(1078); + statementList(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LabelledStatementContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public LabelledStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_labelledStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLabelledStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLabelledStatement(this); + } + } + + public final LabelledStatementContext labelledStatement() throws RecognitionException { + LabelledStatementContext _localctx = new LabelledStatementContext(_ctx, getState()); + enterRule(_localctx, 174, RULE_labelledStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1081); + match(Identifier); + setState(1082); + match(Colon); + setState(1083); + statement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ThrowStatementContext extends ParserRuleContext { + public TerminalNode Throw() { return getToken(TypeScriptParser.Throw, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public ThrowStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_throwStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterThrowStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitThrowStatement(this); + } + } + + public final ThrowStatementContext throwStatement() throws RecognitionException { + ThrowStatementContext _localctx = new ThrowStatementContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_throwStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1085); + match(Throw); + setState(1086); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1087); + expressionSequence(); + setState(1088); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TryStatementContext extends ParserRuleContext { + public TerminalNode Try() { return getToken(TypeScriptParser.Try, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public CatchProductionContext catchProduction() { + return getRuleContext(CatchProductionContext.class,0); + } + public FinallyProductionContext finallyProduction() { + return getRuleContext(FinallyProductionContext.class,0); + } + public TryStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_tryStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTryStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTryStatement(this); + } + } + + public final TryStatementContext tryStatement() throws RecognitionException { + TryStatementContext _localctx = new TryStatementContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_tryStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1090); + match(Try); + setState(1091); + block(); + setState(1097); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Catch: + { + setState(1092); + catchProduction(); + setState(1094); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,125,_ctx) ) { + case 1: + { + setState(1093); + finallyProduction(); + } + break; + } + } + break; + case Finally: + { + setState(1096); + finallyProduction(); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchProductionContext extends ParserRuleContext { + public TerminalNode Catch() { return getToken(TypeScriptParser.Catch, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public AssignableContext assignable() { + return getRuleContext(AssignableContext.class,0); + } + public CatchProductionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchProduction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCatchProduction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCatchProduction(this); + } + } + + public final CatchProductionContext catchProduction() throws RecognitionException { + CatchProductionContext _localctx = new CatchProductionContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_catchProduction); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1099); + match(Catch); + setState(1105); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==OpenParen) { + { + setState(1100); + match(OpenParen); + setState(1102); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==OpenBracket || _la==OpenBrace || _la==Identifier) { + { + setState(1101); + assignable(); + } + } + + setState(1104); + match(CloseParen); + } + } + + setState(1107); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignableContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public AssignableContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignable; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAssignable(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAssignable(this); + } + } + + public final AssignableContext assignable() throws RecognitionException { + AssignableContext _localctx = new AssignableContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_assignable); + try { + setState(1112); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1109); + match(Identifier); + } + break; + case OpenBracket: + enterOuterAlt(_localctx, 2); + { + setState(1110); + arrayLiteral(); + } + break; + case OpenBrace: + enterOuterAlt(_localctx, 3); + { + setState(1111); + objectLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyProductionContext extends ParserRuleContext { + public TerminalNode Finally() { return getToken(TypeScriptParser.Finally, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public FinallyProductionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyProduction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFinallyProduction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFinallyProduction(this); + } + } + + public final FinallyProductionContext finallyProduction() throws RecognitionException { + FinallyProductionContext _localctx = new FinallyProductionContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_finallyProduction); + try { + enterOuterAlt(_localctx, 1); + { + setState(1114); + match(Finally); + setState(1115); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DebuggerStatementContext extends ParserRuleContext { + public TerminalNode Debugger() { return getToken(TypeScriptParser.Debugger, 0); } + public EosContext eos() { + return getRuleContext(EosContext.class,0); + } + public DebuggerStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_debuggerStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDebuggerStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDebuggerStatement(this); + } + } + + public final DebuggerStatementContext debuggerStatement() throws RecognitionException { + DebuggerStatementContext _localctx = new DebuggerStatementContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_debuggerStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1117); + match(Debugger); + setState(1118); + eos(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionDeclarationContext extends ParserRuleContext { + public TerminalNode Function() { return getToken(TypeScriptParser.Function, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionDeclaration(this); + } + } + + public final FunctionDeclarationContext functionDeclaration() throws RecognitionException { + FunctionDeclarationContext _localctx = new FunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_functionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1121); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Async) { + { + setState(1120); + match(Async); + } + } + + setState(1123); + match(Function); + setState(1125); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Multiply) { + { + setState(1124); + match(Multiply); + } + } + + setState(1127); + match(Identifier); + setState(1128); + callSignature(); + setState(1134); + _errHandler.sync(this); + switch (_input.LA(1)) { + case OpenBrace: + { + { + setState(1129); + match(OpenBrace); + setState(1130); + functionBody(); + setState(1131); + match(CloseBrace); + } + } + break; + case SemiColon: + { + setState(1133); + match(SemiColon); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public TerminalNode Class() { return getToken(TypeScriptParser.Class, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ClassHeritageContext classHeritage() { + return getRuleContext(ClassHeritageContext.class,0); + } + public ClassTailContext classTail() { + return getRuleContext(ClassTailContext.class,0); + } + public TerminalNode Abstract() { return getToken(TypeScriptParser.Abstract, 0); } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassDeclaration(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1137); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Abstract) { + { + setState(1136); + match(Abstract); + } + } + + setState(1139); + match(Class); + setState(1140); + match(Identifier); + setState(1142); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LessThan) { + { + setState(1141); + typeParameters(); + } + } + + setState(1144); + classHeritage(); + setState(1145); + classTail(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassHeritageContext extends ParserRuleContext { + public ClassExtendsClauseContext classExtendsClause() { + return getRuleContext(ClassExtendsClauseContext.class,0); + } + public ImplementsClauseContext implementsClause() { + return getRuleContext(ImplementsClauseContext.class,0); + } + public ClassHeritageContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classHeritage; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassHeritage(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassHeritage(this); + } + } + + public final ClassHeritageContext classHeritage() throws RecognitionException { + ClassHeritageContext _localctx = new ClassHeritageContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_classHeritage); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1148); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Extends) { + { + setState(1147); + classExtendsClause(); + } + } + + setState(1151); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Implements) { + { + setState(1150); + implementsClause(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassTailContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public List classElement() { + return getRuleContexts(ClassElementContext.class); + } + public ClassElementContext classElement(int i) { + return getRuleContext(ClassElementContext.class,i); + } + public ClassTailContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classTail; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassTail(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassTail(this); + } + } + + public final ClassTailContext classTail() throws RecognitionException { + ClassTailContext _localctx = new ClassTailContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_classTail); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1153); + match(OpenBrace); + setState(1157); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,137,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1154); + classElement(); + } + } + } + setState(1159); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,137,_ctx); + } + setState(1160); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassExtendsClauseContext extends ParserRuleContext { + public TerminalNode Extends() { return getToken(TypeScriptParser.Extends, 0); } + public TypeReferenceContext typeReference() { + return getRuleContext(TypeReferenceContext.class,0); + } + public ClassExtendsClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classExtendsClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassExtendsClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassExtendsClause(this); + } + } + + public final ClassExtendsClauseContext classExtendsClause() throws RecognitionException { + ClassExtendsClauseContext _localctx = new ClassExtendsClauseContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_classExtendsClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1162); + match(Extends); + setState(1163); + typeReference(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImplementsClauseContext extends ParserRuleContext { + public TerminalNode Implements() { return getToken(TypeScriptParser.Implements, 0); } + public ClassOrInterfaceTypeListContext classOrInterfaceTypeList() { + return getRuleContext(ClassOrInterfaceTypeListContext.class,0); + } + public ImplementsClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_implementsClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterImplementsClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitImplementsClause(this); + } + } + + public final ImplementsClauseContext implementsClause() throws RecognitionException { + ImplementsClauseContext _localctx = new ImplementsClauseContext(_ctx, getState()); + enterRule(_localctx, 198, RULE_implementsClause); + try { + enterOuterAlt(_localctx, 1); + { + setState(1165); + match(Implements); + setState(1166); + classOrInterfaceTypeList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassElementContext extends ParserRuleContext { + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public PropertyMemberDeclarationContext propertyMemberDeclaration() { + return getRuleContext(PropertyMemberDeclarationContext.class,0); + } + public IndexMemberDeclarationContext indexMemberDeclaration() { + return getRuleContext(IndexMemberDeclarationContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public ClassElementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classElement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassElement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassElement(this); + } + } + + public final ClassElementContext classElement() throws RecognitionException { + ClassElementContext _localctx = new ClassElementContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_classElement); + try { + setState(1172); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,138,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1168); + constructorDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1169); + propertyMemberDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1170); + indexMemberDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1171); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyMemberDeclarationContext extends ParserRuleContext { + public PropertyMemberBaseContext propertyMemberBase() { + return getRuleContext(PropertyMemberBaseContext.class,0); + } + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public TerminalNode Hashtag() { return getToken(TypeScriptParser.Hashtag, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public CallSignatureContext callSignature() { + return getRuleContext(CallSignatureContext.class,0); + } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public GetAccessorContext getAccessor() { + return getRuleContext(GetAccessorContext.class,0); + } + public SetAccessorContext setAccessor() { + return getRuleContext(SetAccessorContext.class,0); + } + public AbstractDeclarationContext abstractDeclaration() { + return getRuleContext(AbstractDeclarationContext.class,0); + } + public PropertyMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyMemberDeclaration(this); + } + } + + public final PropertyMemberDeclarationContext propertyMemberDeclaration() throws RecognitionException { + PropertyMemberDeclarationContext _localctx = new PropertyMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 202, RULE_propertyMemberDeclaration); + int _la; + try { + setState(1218); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,149,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1174); + propertyMemberBase(); + setState(1176); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Multiply) { + { + setState(1175); + match(Multiply); + } + } + + setState(1179); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Hashtag) { + { + setState(1178); + match(Hashtag); + } + } + + setState(1181); + propertyName(); + setState(1183); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1182); + typeAnnotation(); + } + } + + setState(1186); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Assign) { + { + setState(1185); + initializer(); + } + } + + setState(1188); + match(SemiColon); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1190); + propertyMemberBase(); + setState(1192); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Multiply) { + { + setState(1191); + match(Multiply); + } + } + + setState(1195); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Hashtag) { + { + setState(1194); + match(Hashtag); + } + } + + setState(1197); + propertyName(); + setState(1198); + callSignature(); + setState(1204); + _errHandler.sync(this); + switch (_input.LA(1)) { + case OpenBrace: + { + { + setState(1199); + match(OpenBrace); + setState(1200); + functionBody(); + setState(1201); + match(CloseBrace); + } + } + break; + case SemiColon: + { + setState(1203); + match(SemiColon); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1206); + propertyMemberBase(); + setState(1208); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Multiply) { + { + setState(1207); + match(Multiply); + } + } + + setState(1211); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Hashtag) { + { + setState(1210); + match(Hashtag); + } + } + + setState(1215); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,148,_ctx) ) { + case 1: + { + setState(1213); + getAccessor(); + } + break; + case 2: + { + setState(1214); + setAccessor(); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1217); + abstractDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyMemberBaseContext extends ParserRuleContext { + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TerminalNode Static() { return getToken(TypeScriptParser.Static, 0); } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public PropertyMemberBaseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyMemberBase; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyMemberBase(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyMemberBase(this); + } + } + + public final PropertyMemberBaseContext propertyMemberBase() throws RecognitionException { + PropertyMemberBaseContext _localctx = new PropertyMemberBaseContext(_ctx, getState()); + enterRule(_localctx, 204, RULE_propertyMemberBase); + try { + enterOuterAlt(_localctx, 1); + { + setState(1221); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,150,_ctx) ) { + case 1: + { + setState(1220); + match(Async); + } + break; + } + setState(1224); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,151,_ctx) ) { + case 1: + { + setState(1223); + accessibilityModifier(); + } + break; + } + setState(1227); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,152,_ctx) ) { + case 1: + { + setState(1226); + match(Static); + } + break; + } + setState(1230); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,153,_ctx) ) { + case 1: + { + setState(1229); + match(ReadOnly); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IndexMemberDeclarationContext extends ParserRuleContext { + public IndexSignatureContext indexSignature() { + return getRuleContext(IndexSignatureContext.class,0); + } + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public IndexMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_indexMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIndexMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIndexMemberDeclaration(this); + } + } + + public final IndexMemberDeclarationContext indexMemberDeclaration() throws RecognitionException { + IndexMemberDeclarationContext _localctx = new IndexMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 206, RULE_indexMemberDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(1232); + indexSignature(); + setState(1233); + match(SemiColon); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorMethodContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public GeneratorMethodContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorMethod; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorMethod(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorMethod(this); + } + } + + public final GeneratorMethodContext generatorMethod() throws RecognitionException { + GeneratorMethodContext _localctx = new GeneratorMethodContext(_ctx, getState()); + enterRule(_localctx, 208, RULE_generatorMethod); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1236); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Multiply) { + { + setState(1235); + match(Multiply); + } + } + + setState(1238); + match(Identifier); + setState(1239); + match(OpenParen); + setState(1241); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)) | (1L << (Identifier - 108)))) != 0)) { + { + setState(1240); + formalParameterList(); + } + } + + setState(1243); + match(CloseParen); + setState(1244); + match(OpenBrace); + setState(1245); + functionBody(); + setState(1246); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorFunctionDeclarationContext extends ParserRuleContext { + public TerminalNode Function() { return getToken(TypeScriptParser.Function, 0); } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public GeneratorFunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorFunctionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorFunctionDeclaration(this); + } + } + + public final GeneratorFunctionDeclarationContext generatorFunctionDeclaration() throws RecognitionException { + GeneratorFunctionDeclarationContext _localctx = new GeneratorFunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 210, RULE_generatorFunctionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1248); + match(Function); + setState(1249); + match(Multiply); + setState(1251); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(1250); + match(Identifier); + } + } + + setState(1253); + match(OpenParen); + setState(1255); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)) | (1L << (Identifier - 108)))) != 0)) { + { + setState(1254); + formalParameterList(); + } + } + + setState(1257); + match(CloseParen); + setState(1258); + match(OpenBrace); + setState(1259); + functionBody(); + setState(1260); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorBlockContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public List generatorDefinition() { + return getRuleContexts(GeneratorDefinitionContext.class); + } + public GeneratorDefinitionContext generatorDefinition(int i) { + return getRuleContext(GeneratorDefinitionContext.class,i); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public GeneratorBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorBlock(this); + } + } + + public final GeneratorBlockContext generatorBlock() throws RecognitionException { + GeneratorBlockContext _localctx = new GeneratorBlockContext(_ctx, getState()); + enterRule(_localctx, 212, RULE_generatorBlock); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1262); + match(OpenBrace); + setState(1263); + generatorDefinition(); + setState(1268); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,158,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1264); + match(Comma); + setState(1265); + generatorDefinition(); + } + } + } + setState(1270); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,158,_ctx); + } + setState(1272); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1271); + match(Comma); + } + } + + setState(1274); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GeneratorDefinitionContext extends ParserRuleContext { + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public IteratorDefinitionContext iteratorDefinition() { + return getRuleContext(IteratorDefinitionContext.class,0); + } + public GeneratorDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_generatorDefinition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorDefinition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorDefinition(this); + } + } + + public final GeneratorDefinitionContext generatorDefinition() throws RecognitionException { + GeneratorDefinitionContext _localctx = new GeneratorDefinitionContext(_ctx, getState()); + enterRule(_localctx, 214, RULE_generatorDefinition); + try { + enterOuterAlt(_localctx, 1); + { + setState(1276); + match(Multiply); + setState(1277); + iteratorDefinition(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IteratorBlockContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public List iteratorDefinition() { + return getRuleContexts(IteratorDefinitionContext.class); + } + public IteratorDefinitionContext iteratorDefinition(int i) { + return getRuleContext(IteratorDefinitionContext.class,i); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public IteratorBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_iteratorBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIteratorBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIteratorBlock(this); + } + } + + public final IteratorBlockContext iteratorBlock() throws RecognitionException { + IteratorBlockContext _localctx = new IteratorBlockContext(_ctx, getState()); + enterRule(_localctx, 216, RULE_iteratorBlock); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1279); + match(OpenBrace); + setState(1280); + iteratorDefinition(); + setState(1285); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,160,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1281); + match(Comma); + setState(1282); + iteratorDefinition(); + } + } + } + setState(1287); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,160,_ctx); + } + setState(1289); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1288); + match(Comma); + } + } + + setState(1291); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IteratorDefinitionContext extends ParserRuleContext { + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public IteratorDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_iteratorDefinition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIteratorDefinition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIteratorDefinition(this); + } + } + + public final IteratorDefinitionContext iteratorDefinition() throws RecognitionException { + IteratorDefinitionContext _localctx = new IteratorDefinitionContext(_ctx, getState()); + enterRule(_localctx, 218, RULE_iteratorDefinition); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1293); + match(OpenBracket); + setState(1294); + singleExpression(0); + setState(1295); + match(CloseBracket); + setState(1296); + match(OpenParen); + setState(1298); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)) | (1L << (Identifier - 108)))) != 0)) { + { + setState(1297); + formalParameterList(); + } + } + + setState(1300); + match(CloseParen); + setState(1301); + match(OpenBrace); + setState(1302); + functionBody(); + setState(1303); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterListContext extends ParserRuleContext { + public List formalParameterArg() { + return getRuleContexts(FormalParameterArgContext.class); + } + public FormalParameterArgContext formalParameterArg(int i) { + return getRuleContext(FormalParameterArgContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public LastFormalParameterArgContext lastFormalParameterArg() { + return getRuleContext(LastFormalParameterArgContext.class,0); + } + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FormalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFormalParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFormalParameterList(this); + } + } + + public final FormalParameterListContext formalParameterList() throws RecognitionException { + FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); + enterRule(_localctx, 220, RULE_formalParameterList); + int _la; + try { + int _alt; + setState(1324); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Private: + case Public: + case Protected: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1305); + formalParameterArg(); + setState(1310); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,163,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1306); + match(Comma); + setState(1307); + formalParameterArg(); + } + } + } + setState(1312); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,163,_ctx); + } + setState(1315); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1313); + match(Comma); + setState(1314); + lastFormalParameterArg(); + } + } + + } + break; + case Ellipsis: + enterOuterAlt(_localctx, 2); + { + setState(1317); + lastFormalParameterArg(); + } + break; + case OpenBracket: + enterOuterAlt(_localctx, 3); + { + setState(1318); + arrayLiteral(); + } + break; + case OpenBrace: + enterOuterAlt(_localctx, 4); + { + setState(1319); + objectLiteral(); + setState(1322); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1320); + match(Colon); + setState(1321); + formalParameterList(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterArgContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public AccessibilityModifierContext accessibilityModifier() { + return getRuleContext(AccessibilityModifierContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public FormalParameterArgContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterArg; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFormalParameterArg(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFormalParameterArg(this); + } + } + + public final FormalParameterArgContext formalParameterArg() throws RecognitionException { + FormalParameterArgContext _localctx = new FormalParameterArgContext(_ctx, getState()); + enterRule(_localctx, 222, RULE_formalParameterArg); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1327); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)))) != 0)) { + { + setState(1326); + accessibilityModifier(); + } + } + + setState(1329); + match(Identifier); + setState(1331); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1330); + typeAnnotation(); + } + } + + setState(1335); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Assign) { + { + setState(1333); + match(Assign); + setState(1334); + singleExpression(0); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastFormalParameterArgContext extends ParserRuleContext { + public TerminalNode Ellipsis() { return getToken(TypeScriptParser.Ellipsis, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public LastFormalParameterArgContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastFormalParameterArg; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLastFormalParameterArg(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLastFormalParameterArg(this); + } + } + + public final LastFormalParameterArgContext lastFormalParameterArg() throws RecognitionException { + LastFormalParameterArgContext _localctx = new LastFormalParameterArgContext(_ctx, getState()); + enterRule(_localctx, 224, RULE_lastFormalParameterArg); + try { + enterOuterAlt(_localctx, 1); + { + setState(1337); + match(Ellipsis); + setState(1338); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionBodyContext extends ParserRuleContext { + public SourceElementsContext sourceElements() { + return getRuleContext(SourceElementsContext.class,0); + } + public FunctionBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionBody(this); + } + } + + public final FunctionBodyContext functionBody() throws RecognitionException { + FunctionBodyContext _localctx = new FunctionBodyContext(_ctx, getState()); + enterRule(_localctx, 226, RULE_functionBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(1341); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,170,_ctx) ) { + case 1: + { + setState(1340); + sourceElements(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SourceElementsContext extends ParserRuleContext { + public List sourceElement() { + return getRuleContexts(SourceElementContext.class); + } + public SourceElementContext sourceElement(int i) { + return getRuleContext(SourceElementContext.class,i); + } + public SourceElementsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_sourceElements; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSourceElements(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSourceElements(this); + } + } + + public final SourceElementsContext sourceElements() throws RecognitionException { + SourceElementsContext _localctx = new SourceElementsContext(_ctx, getState()); + enterRule(_localctx, 228, RULE_sourceElements); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1344); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(1343); + sourceElement(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(1346); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,171,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayLiteralContext extends ParserRuleContext { + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public ElementListContext elementList() { + return getRuleContext(ElementListContext.class,0); + } + public ArrayLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayLiteral(this); + } + } + + public final ArrayLiteralContext arrayLiteral() throws RecognitionException { + ArrayLiteralContext _localctx = new ArrayLiteralContext(_ctx, getState()); + enterRule(_localctx, 230, RULE_arrayLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + { + setState(1348); + match(OpenBracket); + setState(1350); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RegularExpressionLiteral) | (1L << OpenBracket) | (1L << OpenParen) | (1L << OpenBrace) | (1L << Ellipsis) | (1L << PlusPlus) | (1L << MinusMinus) | (1L << Plus) | (1L << Minus) | (1L << BitNot) | (1L << Not) | (1L << LessThan) | (1L << NullLiteral) | (1L << BooleanLiteral) | (1L << DecimalLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HexIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral - 64)) | (1L << (OctalIntegerLiteral2 - 64)) | (1L << (BinaryIntegerLiteral - 64)) | (1L << (Break - 64)) | (1L << (Do - 64)) | (1L << (Instanceof - 64)) | (1L << (Typeof - 64)) | (1L << (Case - 64)) | (1L << (Else - 64)) | (1L << (New - 64)) | (1L << (Var - 64)) | (1L << (Catch - 64)) | (1L << (Finally - 64)) | (1L << (Return - 64)) | (1L << (Void - 64)) | (1L << (Continue - 64)) | (1L << (For - 64)) | (1L << (Switch - 64)) | (1L << (While - 64)) | (1L << (Debugger - 64)) | (1L << (Function - 64)) | (1L << (This - 64)) | (1L << (With - 64)) | (1L << (Default - 64)) | (1L << (If - 64)) | (1L << (Throw - 64)) | (1L << (Delete - 64)) | (1L << (In - 64)) | (1L << (Try - 64)) | (1L << (As - 64)) | (1L << (From - 64)) | (1L << (ReadOnly - 64)) | (1L << (Async - 64)) | (1L << (Class - 64)) | (1L << (Enum - 64)) | (1L << (Extends - 64)) | (1L << (Super - 64)) | (1L << (Const - 64)) | (1L << (Export - 64)) | (1L << (Import - 64)) | (1L << (Await - 64)) | (1L << (Implements - 64)) | (1L << (Let - 64)) | (1L << (Private - 64)) | (1L << (Public - 64)) | (1L << (Interface - 64)) | (1L << (Package - 64)) | (1L << (Protected - 64)) | (1L << (Static - 64)) | (1L << (Yield - 64)))) != 0) || ((((_la - 131)) & ~0x3f) == 0 && ((1L << (_la - 131)) & ((1L << (Identifier - 131)) | (1L << (StringLiteral - 131)) | (1L << (TemplateStringLiteral - 131)))) != 0)) { + { + setState(1349); + elementList(); + } + } + + setState(1352); + match(CloseBracket); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementListContext extends ParserRuleContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public LastElementContext lastElement() { + return getRuleContext(LastElementContext.class,0); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public ElementListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterElementList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitElementList(this); + } + } + + public final ElementListContext elementList() throws RecognitionException { + ElementListContext _localctx = new ElementListContext(_ctx, getState()); + enterRule(_localctx, 232, RULE_elementList); + int _la; + try { + int _alt; + setState(1375); + _errHandler.sync(this); + switch (_input.LA(1)) { + case RegularExpressionLiteral: + case OpenBracket: + case OpenParen: + case OpenBrace: + case PlusPlus: + case MinusMinus: + case Plus: + case Minus: + case BitNot: + case Not: + case LessThan: + case NullLiteral: + case BooleanLiteral: + case DecimalLiteral: + case HexIntegerLiteral: + case OctalIntegerLiteral: + case OctalIntegerLiteral2: + case BinaryIntegerLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case As: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Await: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Identifier: + case StringLiteral: + case TemplateStringLiteral: + enterOuterAlt(_localctx, 1); + { + setState(1354); + singleExpression(0); + setState(1363); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,174,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1356); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1355); + match(Comma); + } + } + setState(1358); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==Comma ); + setState(1360); + singleExpression(0); + } + } + } + setState(1365); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,174,_ctx); + } + setState(1372); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1367); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1366); + match(Comma); + } + } + setState(1369); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==Comma ); + setState(1371); + lastElement(); + } + } + + } + break; + case Ellipsis: + enterOuterAlt(_localctx, 2); + { + setState(1374); + lastElement(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastElementContext extends ParserRuleContext { + public TerminalNode Ellipsis() { return getToken(TypeScriptParser.Ellipsis, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public LastElementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastElement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLastElement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLastElement(this); + } + } + + public final LastElementContext lastElement() throws RecognitionException { + LastElementContext _localctx = new LastElementContext(_ctx, getState()); + enterRule(_localctx, 234, RULE_lastElement); + try { + enterOuterAlt(_localctx, 1); + { + setState(1377); + match(Ellipsis); + setState(1380); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,178,_ctx) ) { + case 1: + { + setState(1378); + match(Identifier); + } + break; + case 2: + { + setState(1379); + singleExpression(0); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ObjectLiteralContext extends ParserRuleContext { + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public List propertyAssignment() { + return getRuleContexts(PropertyAssignmentContext.class); + } + public PropertyAssignmentContext propertyAssignment(int i) { + return getRuleContext(PropertyAssignmentContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public ObjectLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_objectLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectLiteral(this); + } + } + + public final ObjectLiteralContext objectLiteral() throws RecognitionException { + ObjectLiteralContext _localctx = new ObjectLiteralContext(_ctx, getState()); + enterRule(_localctx, 236, RULE_objectLiteral); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1382); + match(OpenBrace); + setState(1391); + _errHandler.sync(this); + _la = _input.LA(1); + if (((((_la - 5)) & ~0x3f) == 0 && ((1L << (_la - 5)) & ((1L << (OpenBracket - 5)) | (1L << (Ellipsis - 5)) | (1L << (Multiply - 5)) | (1L << (NullLiteral - 5)) | (1L << (BooleanLiteral - 5)) | (1L << (DecimalLiteral - 5)) | (1L << (HexIntegerLiteral - 5)) | (1L << (OctalIntegerLiteral - 5)) | (1L << (OctalIntegerLiteral2 - 5)) | (1L << (BinaryIntegerLiteral - 5)) | (1L << (Break - 5)))) != 0) || ((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & ((1L << (Do - 69)) | (1L << (Instanceof - 69)) | (1L << (Typeof - 69)) | (1L << (Case - 69)) | (1L << (Else - 69)) | (1L << (New - 69)) | (1L << (Var - 69)) | (1L << (Catch - 69)) | (1L << (Finally - 69)) | (1L << (Return - 69)) | (1L << (Void - 69)) | (1L << (Continue - 69)) | (1L << (For - 69)) | (1L << (Switch - 69)) | (1L << (While - 69)) | (1L << (Debugger - 69)) | (1L << (Function - 69)) | (1L << (This - 69)) | (1L << (With - 69)) | (1L << (Default - 69)) | (1L << (If - 69)) | (1L << (Throw - 69)) | (1L << (Delete - 69)) | (1L << (In - 69)) | (1L << (Try - 69)) | (1L << (As - 69)) | (1L << (From - 69)) | (1L << (ReadOnly - 69)) | (1L << (Async - 69)) | (1L << (Class - 69)) | (1L << (Enum - 69)) | (1L << (Extends - 69)) | (1L << (Super - 69)) | (1L << (Const - 69)) | (1L << (Export - 69)) | (1L << (Import - 69)) | (1L << (Await - 69)) | (1L << (Implements - 69)) | (1L << (Let - 69)) | (1L << (Private - 69)) | (1L << (Public - 69)) | (1L << (Interface - 69)) | (1L << (Package - 69)) | (1L << (Protected - 69)) | (1L << (Static - 69)) | (1L << (Yield - 69)) | (1L << (Identifier - 69)) | (1L << (StringLiteral - 69)))) != 0)) { + { + setState(1383); + propertyAssignment(); + setState(1388); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,179,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1384); + match(Comma); + setState(1385); + propertyAssignment(); + } + } + } + setState(1390); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,179,_ctx); + } + } + } + + setState(1394); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1393); + match(Comma); + } + } + + setState(1396); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyAssignmentContext extends ParserRuleContext { + public PropertyAssignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyAssignment; } + + public PropertyAssignmentContext() { } + public void copyFrom(PropertyAssignmentContext ctx) { + super.copyFrom(ctx); + } + } + public static class PropertyExpressionAssignmentContext extends PropertyAssignmentContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public PropertyExpressionAssignmentContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyExpressionAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyExpressionAssignment(this); + } + } + public static class ComputedPropertyExpressionAssignmentContext extends PropertyAssignmentContext { + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public ComputedPropertyExpressionAssignmentContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterComputedPropertyExpressionAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitComputedPropertyExpressionAssignment(this); + } + } + public static class PropertyShorthandContext extends PropertyAssignmentContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public PropertyShorthandContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyShorthand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyShorthand(this); + } + } + public static class PropertySetterContext extends PropertyAssignmentContext { + public SetAccessorContext setAccessor() { + return getRuleContext(SetAccessorContext.class,0); + } + public PropertySetterContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertySetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertySetter(this); + } + } + public static class PropertyGetterContext extends PropertyAssignmentContext { + public GetAccessorContext getAccessor() { + return getRuleContext(GetAccessorContext.class,0); + } + public PropertyGetterContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyGetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyGetter(this); + } + } + public static class FunctionPropertyContext extends PropertyAssignmentContext { + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FunctionPropertyContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionProperty(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionProperty(this); + } + } + public static class RestParameterInObjectContext extends PropertyAssignmentContext { + public RestParameterContext restParameter() { + return getRuleContext(RestParameterContext.class,0); + } + public RestParameterInObjectContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRestParameterInObject(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRestParameterInObject(this); + } + } + public static class MethodPropertyContext extends PropertyAssignmentContext { + public GeneratorMethodContext generatorMethod() { + return getRuleContext(GeneratorMethodContext.class,0); + } + public MethodPropertyContext(PropertyAssignmentContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMethodProperty(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMethodProperty(this); + } + } + + public final PropertyAssignmentContext propertyAssignment() throws RecognitionException { + PropertyAssignmentContext _localctx = new PropertyAssignmentContext(_ctx, getState()); + enterRule(_localctx, 238, RULE_propertyAssignment); + int _la; + try { + setState(1429); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,185,_ctx) ) { + case 1: + _localctx = new PropertyExpressionAssignmentContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(1398); + propertyName(); + setState(1399); + _la = _input.LA(1); + if ( !(_la==Assign || _la==Colon) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1400); + singleExpression(0); + } + break; + case 2: + _localctx = new ComputedPropertyExpressionAssignmentContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(1402); + match(OpenBracket); + setState(1403); + singleExpression(0); + setState(1404); + match(CloseBracket); + setState(1405); + match(Colon); + setState(1406); + singleExpression(0); + } + break; + case 3: + _localctx = new FunctionPropertyContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(1409); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,182,_ctx) ) { + case 1: + { + setState(1408); + match(Async); + } + break; + } + setState(1412); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Multiply) { + { + setState(1411); + match(Multiply); + } + } + + setState(1414); + propertyName(); + setState(1415); + match(OpenParen); + setState(1417); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)) | (1L << (Identifier - 108)))) != 0)) { + { + setState(1416); + formalParameterList(); + } + } + + setState(1419); + match(CloseParen); + setState(1420); + match(OpenBrace); + setState(1421); + functionBody(); + setState(1422); + match(CloseBrace); + } + break; + case 4: + _localctx = new PropertyGetterContext(_localctx); + enterOuterAlt(_localctx, 4); + { + setState(1424); + getAccessor(); + } + break; + case 5: + _localctx = new PropertySetterContext(_localctx); + enterOuterAlt(_localctx, 5); + { + setState(1425); + setAccessor(); + } + break; + case 6: + _localctx = new MethodPropertyContext(_localctx); + enterOuterAlt(_localctx, 6); + { + setState(1426); + generatorMethod(); + } + break; + case 7: + _localctx = new PropertyShorthandContext(_localctx); + enterOuterAlt(_localctx, 7); + { + setState(1427); + match(Identifier); + } + break; + case 8: + _localctx = new RestParameterInObjectContext(_localctx); + enterOuterAlt(_localctx, 8); + { + setState(1428); + restParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GetAccessorContext extends ParserRuleContext { + public GetterContext getter() { + return getRuleContext(GetterContext.class,0); + } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public GetAccessorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_getAccessor; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGetAccessor(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGetAccessor(this); + } + } + + public final GetAccessorContext getAccessor() throws RecognitionException { + GetAccessorContext _localctx = new GetAccessorContext(_ctx, getState()); + enterRule(_localctx, 240, RULE_getAccessor); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1431); + getter(); + setState(1432); + match(OpenParen); + setState(1433); + match(CloseParen); + setState(1435); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1434); + typeAnnotation(); + } + } + + setState(1437); + match(OpenBrace); + setState(1438); + functionBody(); + setState(1439); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SetAccessorContext extends ParserRuleContext { + public SetterContext setter() { + return getRuleContext(SetterContext.class,0); + } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public BindingPatternContext bindingPattern() { + return getRuleContext(BindingPatternContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public SetAccessorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_setAccessor; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSetAccessor(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSetAccessor(this); + } + } + + public final SetAccessorContext setAccessor() throws RecognitionException { + SetAccessorContext _localctx = new SetAccessorContext(_ctx, getState()); + enterRule(_localctx, 242, RULE_setAccessor); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1441); + setter(); + setState(1442); + match(OpenParen); + setState(1445); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + { + setState(1443); + match(Identifier); + } + break; + case OpenBracket: + case OpenBrace: + { + setState(1444); + bindingPattern(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(1448); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1447); + typeAnnotation(); + } + } + + setState(1450); + match(CloseParen); + setState(1451); + match(OpenBrace); + setState(1452); + functionBody(); + setState(1453); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyNameContext extends ParserRuleContext { + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public NumericLiteralContext numericLiteral() { + return getRuleContext(NumericLiteralContext.class,0); + } + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public PropertyNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_propertyName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPropertyName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPropertyName(this); + } + } + + public final PropertyNameContext propertyName() throws RecognitionException { + PropertyNameContext _localctx = new PropertyNameContext(_ctx, getState()); + enterRule(_localctx, 244, RULE_propertyName); + try { + setState(1462); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case As: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Await: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1455); + identifierName(); + } + break; + case StringLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1456); + match(StringLiteral); + } + break; + case DecimalLiteral: + case HexIntegerLiteral: + case OctalIntegerLiteral: + case OctalIntegerLiteral2: + case BinaryIntegerLiteral: + enterOuterAlt(_localctx, 3); + { + setState(1457); + numericLiteral(); + } + break; + case OpenBracket: + enterOuterAlt(_localctx, 4); + { + setState(1458); + match(OpenBracket); + setState(1459); + singleExpression(0); + setState(1460); + match(CloseBracket); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public LastArgumentContext lastArgument() { + return getRuleContext(LastArgumentContext.class,0); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 246, RULE_arguments); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1464); + match(OpenParen); + setState(1478); + _errHandler.sync(this); + switch (_input.LA(1)) { + case RegularExpressionLiteral: + case OpenBracket: + case OpenParen: + case OpenBrace: + case PlusPlus: + case MinusMinus: + case Plus: + case Minus: + case BitNot: + case Not: + case LessThan: + case NullLiteral: + case BooleanLiteral: + case DecimalLiteral: + case HexIntegerLiteral: + case OctalIntegerLiteral: + case OctalIntegerLiteral2: + case BinaryIntegerLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case As: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Await: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + case Identifier: + case StringLiteral: + case TemplateStringLiteral: + { + setState(1465); + singleExpression(0); + setState(1470); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,190,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1466); + match(Comma); + setState(1467); + singleExpression(0); + } + } + } + setState(1472); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,190,_ctx); + } + setState(1475); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Comma) { + { + setState(1473); + match(Comma); + setState(1474); + lastArgument(); + } + } + + } + break; + case Ellipsis: + { + setState(1477); + lastArgument(); + } + break; + case CloseParen: + break; + default: + break; + } + setState(1480); + match(CloseParen); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastArgumentContext extends ParserRuleContext { + public TerminalNode Ellipsis() { return getToken(TypeScriptParser.Ellipsis, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public LastArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLastArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLastArgument(this); + } + } + + public final LastArgumentContext lastArgument() throws RecognitionException { + LastArgumentContext _localctx = new LastArgumentContext(_ctx, getState()); + enterRule(_localctx, 248, RULE_lastArgument); + try { + enterOuterAlt(_localctx, 1); + { + setState(1482); + match(Ellipsis); + setState(1483); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionSequenceContext extends ParserRuleContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public List Comma() { return getTokens(TypeScriptParser.Comma); } + public TerminalNode Comma(int i) { + return getToken(TypeScriptParser.Comma, i); + } + public ExpressionSequenceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionSequence; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterExpressionSequence(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitExpressionSequence(this); + } + } + + public final ExpressionSequenceContext expressionSequence() throws RecognitionException { + ExpressionSequenceContext _localctx = new ExpressionSequenceContext(_ctx, getState()); + enterRule(_localctx, 250, RULE_expressionSequence); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1485); + singleExpression(0); + setState(1490); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,193,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1486); + match(Comma); + setState(1487); + singleExpression(0); + } + } + } + setState(1492); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,193,_ctx); + } + setState(1494); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,194,_ctx) ) { + case 1: + { + setState(1493); + match(Comma); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionExpressionDeclarationContext extends ParserRuleContext { + public TerminalNode Function() { return getToken(TypeScriptParser.Function, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public FunctionExpressionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionExpressionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionExpressionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionExpressionDeclaration(this); + } + } + + public final FunctionExpressionDeclarationContext functionExpressionDeclaration() throws RecognitionException { + FunctionExpressionDeclarationContext _localctx = new FunctionExpressionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 252, RULE_functionExpressionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1497); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Async) { + { + setState(1496); + match(Async); + } + } + + setState(1499); + match(Function); + setState(1501); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(1500); + match(Identifier); + } + } + + setState(1503); + match(OpenParen); + setState(1505); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)) | (1L << (Identifier - 108)))) != 0)) { + { + setState(1504); + formalParameterList(); + } + } + + setState(1507); + match(CloseParen); + setState(1509); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1508); + typeAnnotation(); + } + } + + setState(1511); + match(OpenBrace); + setState(1512); + functionBody(); + setState(1513); + match(CloseBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SingleExpressionContext extends ParserRuleContext { + public SingleExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_singleExpression; } + + public SingleExpressionContext() { } + public void copyFrom(SingleExpressionContext ctx) { + super.copyFrom(ctx); + } + } + public static class TemplateStringExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode TemplateStringLiteral() { return getToken(TypeScriptParser.TemplateStringLiteral, 0); } + public TemplateStringExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTemplateStringExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTemplateStringExpression(this); + } + } + public static class GeneratorsExpressionContext extends SingleExpressionContext { + public GeneratorBlockContext generatorBlock() { + return getRuleContext(GeneratorBlockContext.class,0); + } + public GeneratorsExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorsExpression(this); + } + } + public static class PowerExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Power() { return getToken(TypeScriptParser.Power, 0); } + public PowerExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPowerExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPowerExpression(this); + } + } + public static class InExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public InExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInExpression(this); + } + } + public static class GenericTypesContext extends SingleExpressionContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public GenericTypesContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGenericTypes(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGenericTypes(this); + } + } + public static class ArgumentsExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ArgumentsExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArgumentsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArgumentsExpression(this); + } + } + public static class ThisExpressionContext extends SingleExpressionContext { + public TerminalNode This() { return getToken(TypeScriptParser.This, 0); } + public ThisExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterThisExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitThisExpression(this); + } + } + public static class TypeofExpressionContext extends SingleExpressionContext { + public TerminalNode Typeof() { return getToken(TypeScriptParser.Typeof, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TypeofExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTypeofExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTypeofExpression(this); + } + } + public static class GeneratorsFunctionExpressionContext extends SingleExpressionContext { + public GeneratorFunctionDeclarationContext generatorFunctionDeclaration() { + return getRuleContext(GeneratorFunctionDeclarationContext.class,0); + } + public GeneratorsFunctionExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGeneratorsFunctionExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGeneratorsFunctionExpression(this); + } + } + public static class EqualityExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Equals_() { return getToken(TypeScriptParser.Equals_, 0); } + public TerminalNode NotEquals() { return getToken(TypeScriptParser.NotEquals, 0); } + public TerminalNode IdentityEquals() { return getToken(TypeScriptParser.IdentityEquals, 0); } + public TerminalNode IdentityNotEquals() { return getToken(TypeScriptParser.IdentityNotEquals, 0); } + public EqualityExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEqualityExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEqualityExpression(this); + } + } + public static class BitXOrExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode BitXOr() { return getToken(TypeScriptParser.BitXOr, 0); } + public BitXOrExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitXOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitXOrExpression(this); + } + } + public static class MultiplicativeExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Multiply() { return getToken(TypeScriptParser.Multiply, 0); } + public TerminalNode Divide() { return getToken(TypeScriptParser.Divide, 0); } + public TerminalNode Modulus() { return getToken(TypeScriptParser.Modulus, 0); } + public MultiplicativeExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMultiplicativeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMultiplicativeExpression(this); + } + } + public static class BitShiftExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode LeftShiftArithmetic() { return getToken(TypeScriptParser.LeftShiftArithmetic, 0); } + public TerminalNode RightShiftArithmetic() { return getToken(TypeScriptParser.RightShiftArithmetic, 0); } + public TerminalNode RightShiftLogical() { return getToken(TypeScriptParser.RightShiftLogical, 0); } + public BitShiftExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitShiftExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitShiftExpression(this); + } + } + public static class AdditiveExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Plus() { return getToken(TypeScriptParser.Plus, 0); } + public TerminalNode Minus() { return getToken(TypeScriptParser.Minus, 0); } + public AdditiveExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAdditiveExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAdditiveExpression(this); + } + } + public static class RelationalExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode LessThan() { return getToken(TypeScriptParser.LessThan, 0); } + public TerminalNode MoreThan() { return getToken(TypeScriptParser.MoreThan, 0); } + public TerminalNode LessThanEquals() { return getToken(TypeScriptParser.LessThanEquals, 0); } + public TerminalNode GreaterThanEquals() { return getToken(TypeScriptParser.GreaterThanEquals, 0); } + public RelationalExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterRelationalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitRelationalExpression(this); + } + } + public static class BitNotExpressionContext extends SingleExpressionContext { + public TerminalNode BitNot() { return getToken(TypeScriptParser.BitNot, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public BitNotExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitNotExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitNotExpression(this); + } + } + public static class NewExpressionContext extends SingleExpressionContext { + public TerminalNode New() { return getToken(TypeScriptParser.New, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public NewExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNewExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNewExpression(this); + } + } + public static class LiteralExpressionContext extends SingleExpressionContext { + public LiteralContext literal() { + return getRuleContext(LiteralContext.class,0); + } + public LiteralExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLiteralExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLiteralExpression(this); + } + } + public static class ArrayLiteralExpressionContext extends SingleExpressionContext { + public ArrayLiteralContext arrayLiteral() { + return getRuleContext(ArrayLiteralContext.class,0); + } + public ArrayLiteralExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrayLiteralExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrayLiteralExpression(this); + } + } + public static class MemberDotExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode Dot() { return getToken(TypeScriptParser.Dot, 0); } + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public TerminalNode QuestionMark() { return getToken(TypeScriptParser.QuestionMark, 0); } + public TerminalNode Hashtag() { return getToken(TypeScriptParser.Hashtag, 0); } + public MemberDotExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMemberDotExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMemberDotExpression(this); + } + } + public static class MemberIndexExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode OpenBracket() { return getToken(TypeScriptParser.OpenBracket, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseBracket() { return getToken(TypeScriptParser.CloseBracket, 0); } + public MemberIndexExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterMemberIndexExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitMemberIndexExpression(this); + } + } + public static class BitAndExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode BitAnd() { return getToken(TypeScriptParser.BitAnd, 0); } + public BitAndExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitAndExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitAndExpression(this); + } + } + public static class BitOrExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode BitOr() { return getToken(TypeScriptParser.BitOr, 0); } + public BitOrExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterBitOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitBitOrExpression(this); + } + } + public static class AssignmentOperatorExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public AssignmentOperatorContext assignmentOperator() { + return getRuleContext(AssignmentOperatorContext.class,0); + } + public AssignmentOperatorExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAssignmentOperatorExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAssignmentOperatorExpression(this); + } + } + public static class VoidExpressionContext extends SingleExpressionContext { + public TerminalNode Void() { return getToken(TypeScriptParser.Void, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public VoidExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterVoidExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitVoidExpression(this); + } + } + public static class TernaryExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode QuestionMark() { return getToken(TypeScriptParser.QuestionMark, 0); } + public TerminalNode Colon() { return getToken(TypeScriptParser.Colon, 0); } + public TernaryExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterTernaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitTernaryExpression(this); + } + } + public static class LogicalAndExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode And() { return getToken(TypeScriptParser.And, 0); } + public LogicalAndExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLogicalAndExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLogicalAndExpression(this); + } + } + public static class PreIncrementExpressionContext extends SingleExpressionContext { + public TerminalNode PlusPlus() { return getToken(TypeScriptParser.PlusPlus, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public PreIncrementExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPreIncrementExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPreIncrementExpression(this); + } + } + public static class ObjectLiteralExpressionContext extends SingleExpressionContext { + public ObjectLiteralContext objectLiteral() { + return getRuleContext(ObjectLiteralContext.class,0); + } + public ObjectLiteralExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterObjectLiteralExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitObjectLiteralExpression(this); + } + } + public static class LogicalOrExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Or() { return getToken(TypeScriptParser.Or, 0); } + public LogicalOrExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLogicalOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLogicalOrExpression(this); + } + } + public static class NotExpressionContext extends SingleExpressionContext { + public TerminalNode Not() { return getToken(TypeScriptParser.Not, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public NotExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNotExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNotExpression(this); + } + } + public static class PreDecreaseExpressionContext extends SingleExpressionContext { + public TerminalNode MinusMinus() { return getToken(TypeScriptParser.MinusMinus, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public PreDecreaseExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPreDecreaseExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPreDecreaseExpression(this); + } + } + public static class AwaitExpressionContext extends SingleExpressionContext { + public TerminalNode Await() { return getToken(TypeScriptParser.Await, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public AwaitExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAwaitExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAwaitExpression(this); + } + } + public static class FunctionExpressionContext extends SingleExpressionContext { + public FunctionExpressionDeclarationContext functionExpressionDeclaration() { + return getRuleContext(FunctionExpressionDeclarationContext.class,0); + } + public FunctionExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterFunctionExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitFunctionExpression(this); + } + } + public static class UnaryMinusExpressionContext extends SingleExpressionContext { + public TerminalNode Minus() { return getToken(TypeScriptParser.Minus, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public UnaryMinusExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterUnaryMinusExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitUnaryMinusExpression(this); + } + } + public static class AssignmentExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Assign() { return getToken(TypeScriptParser.Assign, 0); } + public AssignmentExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAssignmentExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAssignmentExpression(this); + } + } + public static class PostDecreaseExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode MinusMinus() { return getToken(TypeScriptParser.MinusMinus, 0); } + public PostDecreaseExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPostDecreaseExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPostDecreaseExpression(this); + } + } + public static class InstanceofExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode Instanceof() { return getToken(TypeScriptParser.Instanceof, 0); } + public InstanceofExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterInstanceofExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitInstanceofExpression(this); + } + } + public static class UnaryPlusExpressionContext extends SingleExpressionContext { + public TerminalNode Plus() { return getToken(TypeScriptParser.Plus, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public UnaryPlusExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterUnaryPlusExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitUnaryPlusExpression(this); + } + } + public static class DeleteExpressionContext extends SingleExpressionContext { + public TerminalNode Delete() { return getToken(TypeScriptParser.Delete, 0); } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public DeleteExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterDeleteExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitDeleteExpression(this); + } + } + public static class ArrowFunctionExpressionContext extends SingleExpressionContext { + public ArrowFunctionDeclarationContext arrowFunctionDeclaration() { + return getRuleContext(ArrowFunctionDeclarationContext.class,0); + } + public ArrowFunctionExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionExpression(this); + } + } + public static class IteratorsExpressionContext extends SingleExpressionContext { + public IteratorBlockContext iteratorBlock() { + return getRuleContext(IteratorBlockContext.class,0); + } + public IteratorsExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIteratorsExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIteratorsExpression(this); + } + } + public static class SuperExpressionContext extends SingleExpressionContext { + public TerminalNode Super() { return getToken(TypeScriptParser.Super, 0); } + public SuperExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSuperExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSuperExpression(this); + } + } + public static class ParenthesizedExpressionContext extends SingleExpressionContext { + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public ExpressionSequenceContext expressionSequence() { + return getRuleContext(ExpressionSequenceContext.class,0); + } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public ParenthesizedExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterParenthesizedExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitParenthesizedExpression(this); + } + } + public static class PostIncrementExpressionContext extends SingleExpressionContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode PlusPlus() { return getToken(TypeScriptParser.PlusPlus, 0); } + public PostIncrementExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterPostIncrementExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitPostIncrementExpression(this); + } + } + public static class YieldExpressionContext extends SingleExpressionContext { + public YieldStatementContext yieldStatement() { + return getRuleContext(YieldStatementContext.class,0); + } + public YieldExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterYieldExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitYieldExpression(this); + } + } + public static class ClassExpressionContext extends SingleExpressionContext { + public TerminalNode Class() { return getToken(TypeScriptParser.Class, 0); } + public ClassTailContext classTail() { + return getRuleContext(ClassTailContext.class,0); + } + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ClassExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterClassExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitClassExpression(this); + } + } + public static class IdentifierExpressionContext extends SingleExpressionContext { + public IdentifierNameContext identifierName() { + return getRuleContext(IdentifierNameContext.class,0); + } + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public IdentifierExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIdentifierExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIdentifierExpression(this); + } + } + public static class CoalesceExpressionContext extends SingleExpressionContext { + public List singleExpression() { + return getRuleContexts(SingleExpressionContext.class); + } + public SingleExpressionContext singleExpression(int i) { + return getRuleContext(SingleExpressionContext.class,i); + } + public TerminalNode NullCoalesce() { return getToken(TypeScriptParser.NullCoalesce, 0); } + public CoalesceExpressionContext(SingleExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterCoalesceExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitCoalesceExpression(this); + } + } + + public final SingleExpressionContext singleExpression() throws RecognitionException { + return singleExpression(0); + } + + private SingleExpressionContext singleExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + SingleExpressionContext _localctx = new SingleExpressionContext(_ctx, _parentState); + SingleExpressionContext _prevctx = _localctx; + int _startState = 254; + enterRecursionRule(_localctx, 254, RULE_singleExpression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1572); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,204,_ctx) ) { + case 1: + { + _localctx = new FunctionExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(1516); + functionExpressionDeclaration(); + } + break; + case 2: + { + _localctx = new ArrowFunctionExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1517); + arrowFunctionDeclaration(); + } + break; + case 3: + { + _localctx = new ClassExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1518); + match(Class); + setState(1520); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(1519); + match(Identifier); + } + } + + setState(1522); + classTail(); + } + break; + case 4: + { + _localctx = new NewExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1523); + match(New); + setState(1524); + singleExpression(0); + setState(1526); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,200,_ctx) ) { + case 1: + { + setState(1525); + typeArguments(); + } + break; + } + setState(1529); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,201,_ctx) ) { + case 1: + { + setState(1528); + arguments(); + } + break; + } + } + break; + case 5: + { + _localctx = new DeleteExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1531); + match(Delete); + setState(1532); + singleExpression(40); + } + break; + case 6: + { + _localctx = new VoidExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1533); + match(Void); + setState(1534); + singleExpression(39); + } + break; + case 7: + { + _localctx = new TypeofExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1535); + match(Typeof); + setState(1536); + singleExpression(38); + } + break; + case 8: + { + _localctx = new PreIncrementExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1537); + match(PlusPlus); + setState(1538); + singleExpression(37); + } + break; + case 9: + { + _localctx = new PreDecreaseExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1539); + match(MinusMinus); + setState(1540); + singleExpression(36); + } + break; + case 10: + { + _localctx = new UnaryPlusExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1541); + match(Plus); + setState(1542); + singleExpression(35); + } + break; + case 11: + { + _localctx = new UnaryMinusExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1543); + match(Minus); + setState(1544); + singleExpression(34); + } + break; + case 12: + { + _localctx = new BitNotExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1545); + match(BitNot); + setState(1546); + singleExpression(33); + } + break; + case 13: + { + _localctx = new NotExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1547); + match(Not); + setState(1548); + singleExpression(32); + } + break; + case 14: + { + _localctx = new AwaitExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1549); + match(Await); + setState(1550); + singleExpression(31); + } + break; + case 15: + { + _localctx = new IteratorsExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1551); + iteratorBlock(); + } + break; + case 16: + { + _localctx = new GeneratorsExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1552); + generatorBlock(); + } + break; + case 17: + { + _localctx = new GeneratorsFunctionExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1553); + generatorFunctionDeclaration(); + } + break; + case 18: + { + _localctx = new YieldExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1554); + yieldStatement(); + } + break; + case 19: + { + _localctx = new ThisExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1555); + match(This); + } + break; + case 20: + { + _localctx = new IdentifierExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1556); + identifierName(); + setState(1558); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,202,_ctx) ) { + case 1: + { + setState(1557); + singleExpression(0); + } + break; + } + } + break; + case 21: + { + _localctx = new SuperExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1560); + match(Super); + } + break; + case 22: + { + _localctx = new LiteralExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1561); + literal(); + } + break; + case 23: + { + _localctx = new ArrayLiteralExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1562); + arrayLiteral(); + } + break; + case 24: + { + _localctx = new ObjectLiteralExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1563); + objectLiteral(); + } + break; + case 25: + { + _localctx = new ParenthesizedExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1564); + match(OpenParen); + setState(1565); + expressionSequence(); + setState(1566); + match(CloseParen); + } + break; + case 26: + { + _localctx = new GenericTypesContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(1568); + typeArguments(); + setState(1570); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,203,_ctx) ) { + case 1: + { + setState(1569); + expressionSequence(); + } + break; + } + } + break; + } + _ctx.stop = _input.LT(-1); + setState(1655); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,208,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(1653); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,207,_ctx) ) { + case 1: + { + _localctx = new PowerExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1574); + if (!(precpred(_ctx, 30))) throw new FailedPredicateException(this, "precpred(_ctx, 30)"); + setState(1575); + match(Power); + setState(1576); + singleExpression(30); + } + break; + case 2: + { + _localctx = new MultiplicativeExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1577); + if (!(precpred(_ctx, 29))) throw new FailedPredicateException(this, "precpred(_ctx, 29)"); + setState(1578); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Multiply) | (1L << Divide) | (1L << Modulus))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1579); + singleExpression(30); + } + break; + case 3: + { + _localctx = new AdditiveExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1580); + if (!(precpred(_ctx, 28))) throw new FailedPredicateException(this, "precpred(_ctx, 28)"); + setState(1581); + _la = _input.LA(1); + if ( !(_la==Plus || _la==Minus) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1582); + singleExpression(29); + } + break; + case 4: + { + _localctx = new BitShiftExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1583); + if (!(precpred(_ctx, 27))) throw new FailedPredicateException(this, "precpred(_ctx, 27)"); + setState(1584); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << RightShiftArithmetic) | (1L << LeftShiftArithmetic) | (1L << RightShiftLogical))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1585); + singleExpression(28); + } + break; + case 5: + { + _localctx = new RelationalExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1586); + if (!(precpred(_ctx, 26))) throw new FailedPredicateException(this, "precpred(_ctx, 26)"); + setState(1587); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LessThan) | (1L << MoreThan) | (1L << LessThanEquals) | (1L << GreaterThanEquals))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1588); + singleExpression(27); + } + break; + case 6: + { + _localctx = new InstanceofExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1589); + if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); + setState(1590); + match(Instanceof); + setState(1591); + singleExpression(26); + } + break; + case 7: + { + _localctx = new InExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1592); + if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); + setState(1593); + match(In); + setState(1594); + singleExpression(25); + } + break; + case 8: + { + _localctx = new EqualityExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1595); + if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); + setState(1596); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Equals_) | (1L << NotEquals) | (1L << IdentityEquals) | (1L << IdentityNotEquals))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1597); + singleExpression(24); + } + break; + case 9: + { + _localctx = new BitAndExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1598); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(1599); + match(BitAnd); + setState(1600); + singleExpression(23); + } + break; + case 10: + { + _localctx = new BitXOrExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1601); + if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); + setState(1602); + match(BitXOr); + setState(1603); + singleExpression(22); + } + break; + case 11: + { + _localctx = new BitOrExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1604); + if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); + setState(1605); + match(BitOr); + setState(1606); + singleExpression(21); + } + break; + case 12: + { + _localctx = new LogicalAndExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1607); + if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); + setState(1608); + match(And); + setState(1609); + singleExpression(20); + } + break; + case 13: + { + _localctx = new LogicalOrExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1610); + if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); + setState(1611); + match(Or); + setState(1612); + singleExpression(19); + } + break; + case 14: + { + _localctx = new TernaryExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1613); + if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); + setState(1614); + match(QuestionMark); + setState(1615); + singleExpression(0); + setState(1616); + match(Colon); + setState(1617); + singleExpression(18); + } + break; + case 15: + { + _localctx = new CoalesceExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1619); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(1620); + match(NullCoalesce); + setState(1621); + singleExpression(17); + } + break; + case 16: + { + _localctx = new AssignmentExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1622); + if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); + setState(1623); + match(Assign); + setState(1624); + singleExpression(15); + } + break; + case 17: + { + _localctx = new AssignmentOperatorExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1625); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); + setState(1626); + assignmentOperator(); + setState(1627); + singleExpression(14); + } + break; + case 18: + { + _localctx = new MemberIndexExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1629); + if (!(precpred(_ctx, 46))) throw new FailedPredicateException(this, "precpred(_ctx, 46)"); + setState(1630); + match(OpenBracket); + setState(1631); + expressionSequence(); + setState(1632); + match(CloseBracket); + } + break; + case 19: + { + _localctx = new MemberDotExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1634); + if (!(precpred(_ctx, 45))) throw new FailedPredicateException(this, "precpred(_ctx, 45)"); + setState(1636); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==QuestionMark) { + { + setState(1635); + match(QuestionMark); + } + } + + setState(1638); + match(Dot); + setState(1640); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Hashtag) { + { + setState(1639); + match(Hashtag); + } + } + + setState(1642); + identifierName(); + } + break; + case 20: + { + _localctx = new ArgumentsExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1643); + if (!(precpred(_ctx, 44))) throw new FailedPredicateException(this, "precpred(_ctx, 44)"); + setState(1644); + arguments(); + } + break; + case 21: + { + _localctx = new PostIncrementExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1645); + if (!(precpred(_ctx, 42))) throw new FailedPredicateException(this, "precpred(_ctx, 42)"); + setState(1646); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1647); + match(PlusPlus); + } + break; + case 22: + { + _localctx = new PostDecreaseExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1648); + if (!(precpred(_ctx, 41))) throw new FailedPredicateException(this, "precpred(_ctx, 41)"); + setState(1649); + if (!(this.notLineTerminator())) throw new FailedPredicateException(this, "this.notLineTerminator()"); + setState(1650); + match(MinusMinus); + } + break; + case 23: + { + _localctx = new TemplateStringExpressionContext(new SingleExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_singleExpression); + setState(1651); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(1652); + match(TemplateStringLiteral); + } + break; + } + } + } + setState(1657); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,208,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ArrowFunctionDeclarationContext extends ParserRuleContext { + public ArrowFunctionParametersContext arrowFunctionParameters() { + return getRuleContext(ArrowFunctionParametersContext.class,0); + } + public TerminalNode ARROW() { return getToken(TypeScriptParser.ARROW, 0); } + public ArrowFunctionBodyContext arrowFunctionBody() { + return getRuleContext(ArrowFunctionBodyContext.class,0); + } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TypeAnnotationContext typeAnnotation() { + return getRuleContext(TypeAnnotationContext.class,0); + } + public ArrowFunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrowFunctionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionDeclaration(this); + } + } + + public final ArrowFunctionDeclarationContext arrowFunctionDeclaration() throws RecognitionException { + ArrowFunctionDeclarationContext _localctx = new ArrowFunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 256, RULE_arrowFunctionDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1659); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Async) { + { + setState(1658); + match(Async); + } + } + + setState(1661); + arrowFunctionParameters(); + setState(1663); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Colon) { + { + setState(1662); + typeAnnotation(); + } + } + + setState(1665); + match(ARROW); + setState(1666); + arrowFunctionBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrowFunctionParametersContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public TerminalNode OpenParen() { return getToken(TypeScriptParser.OpenParen, 0); } + public TerminalNode CloseParen() { return getToken(TypeScriptParser.CloseParen, 0); } + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public ArrowFunctionParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrowFunctionParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionParameters(this); + } + } + + public final ArrowFunctionParametersContext arrowFunctionParameters() throws RecognitionException { + ArrowFunctionParametersContext _localctx = new ArrowFunctionParametersContext(_ctx, getState()); + enterRule(_localctx, 258, RULE_arrowFunctionParameters); + int _la; + try { + setState(1674); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1668); + match(Identifier); + } + break; + case OpenParen: + enterOuterAlt(_localctx, 2); + { + setState(1669); + match(OpenParen); + setState(1671); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OpenBracket) | (1L << OpenBrace) | (1L << Ellipsis))) != 0) || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (Private - 108)) | (1L << (Public - 108)) | (1L << (Protected - 108)) | (1L << (Identifier - 108)))) != 0)) { + { + setState(1670); + formalParameterList(); + } + } + + setState(1673); + match(CloseParen); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrowFunctionBodyContext extends ParserRuleContext { + public SingleExpressionContext singleExpression() { + return getRuleContext(SingleExpressionContext.class,0); + } + public TerminalNode OpenBrace() { return getToken(TypeScriptParser.OpenBrace, 0); } + public FunctionBodyContext functionBody() { + return getRuleContext(FunctionBodyContext.class,0); + } + public TerminalNode CloseBrace() { return getToken(TypeScriptParser.CloseBrace, 0); } + public ArrowFunctionBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrowFunctionBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterArrowFunctionBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitArrowFunctionBody(this); + } + } + + public final ArrowFunctionBodyContext arrowFunctionBody() throws RecognitionException { + ArrowFunctionBodyContext _localctx = new ArrowFunctionBodyContext(_ctx, getState()); + enterRule(_localctx, 260, RULE_arrowFunctionBody); + try { + setState(1681); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,213,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1676); + singleExpression(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1677); + match(OpenBrace); + setState(1678); + functionBody(); + setState(1679); + match(CloseBrace); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignmentOperatorContext extends ParserRuleContext { + public TerminalNode MultiplyAssign() { return getToken(TypeScriptParser.MultiplyAssign, 0); } + public TerminalNode DivideAssign() { return getToken(TypeScriptParser.DivideAssign, 0); } + public TerminalNode ModulusAssign() { return getToken(TypeScriptParser.ModulusAssign, 0); } + public TerminalNode PlusAssign() { return getToken(TypeScriptParser.PlusAssign, 0); } + public TerminalNode MinusAssign() { return getToken(TypeScriptParser.MinusAssign, 0); } + public TerminalNode LeftShiftArithmeticAssign() { return getToken(TypeScriptParser.LeftShiftArithmeticAssign, 0); } + public TerminalNode RightShiftArithmeticAssign() { return getToken(TypeScriptParser.RightShiftArithmeticAssign, 0); } + public TerminalNode RightShiftLogicalAssign() { return getToken(TypeScriptParser.RightShiftLogicalAssign, 0); } + public TerminalNode BitAndAssign() { return getToken(TypeScriptParser.BitAndAssign, 0); } + public TerminalNode BitXorAssign() { return getToken(TypeScriptParser.BitXorAssign, 0); } + public TerminalNode BitOrAssign() { return getToken(TypeScriptParser.BitOrAssign, 0); } + public TerminalNode PowerAssign() { return getToken(TypeScriptParser.PowerAssign, 0); } + public AssignmentOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignmentOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterAssignmentOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitAssignmentOperator(this); + } + } + + public final AssignmentOperatorContext assignmentOperator() throws RecognitionException { + AssignmentOperatorContext _localctx = new AssignmentOperatorContext(_ctx, getState()); + enterRule(_localctx, 262, RULE_assignmentOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1683); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MultiplyAssign) | (1L << DivideAssign) | (1L << ModulusAssign) | (1L << PlusAssign) | (1L << MinusAssign) | (1L << LeftShiftArithmeticAssign) | (1L << RightShiftArithmeticAssign) | (1L << RightShiftLogicalAssign) | (1L << BitAndAssign) | (1L << BitXorAssign) | (1L << BitOrAssign) | (1L << PowerAssign))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralContext extends ParserRuleContext { + public TerminalNode NullLiteral() { return getToken(TypeScriptParser.NullLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(TypeScriptParser.BooleanLiteral, 0); } + public TerminalNode StringLiteral() { return getToken(TypeScriptParser.StringLiteral, 0); } + public TerminalNode TemplateStringLiteral() { return getToken(TypeScriptParser.TemplateStringLiteral, 0); } + public TerminalNode RegularExpressionLiteral() { return getToken(TypeScriptParser.RegularExpressionLiteral, 0); } + public NumericLiteralContext numericLiteral() { + return getRuleContext(NumericLiteralContext.class,0); + } + public LiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literal; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitLiteral(this); + } + } + + public final LiteralContext literal() throws RecognitionException { + LiteralContext _localctx = new LiteralContext(_ctx, getState()); + enterRule(_localctx, 264, RULE_literal); + try { + setState(1691); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NullLiteral: + enterOuterAlt(_localctx, 1); + { + setState(1685); + match(NullLiteral); + } + break; + case BooleanLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1686); + match(BooleanLiteral); + } + break; + case StringLiteral: + enterOuterAlt(_localctx, 3); + { + setState(1687); + match(StringLiteral); + } + break; + case TemplateStringLiteral: + enterOuterAlt(_localctx, 4); + { + setState(1688); + match(TemplateStringLiteral); + } + break; + case RegularExpressionLiteral: + enterOuterAlt(_localctx, 5); + { + setState(1689); + match(RegularExpressionLiteral); + } + break; + case DecimalLiteral: + case HexIntegerLiteral: + case OctalIntegerLiteral: + case OctalIntegerLiteral2: + case BinaryIntegerLiteral: + enterOuterAlt(_localctx, 6); + { + setState(1690); + numericLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NumericLiteralContext extends ParserRuleContext { + public TerminalNode DecimalLiteral() { return getToken(TypeScriptParser.DecimalLiteral, 0); } + public TerminalNode HexIntegerLiteral() { return getToken(TypeScriptParser.HexIntegerLiteral, 0); } + public TerminalNode OctalIntegerLiteral() { return getToken(TypeScriptParser.OctalIntegerLiteral, 0); } + public TerminalNode OctalIntegerLiteral2() { return getToken(TypeScriptParser.OctalIntegerLiteral2, 0); } + public TerminalNode BinaryIntegerLiteral() { return getToken(TypeScriptParser.BinaryIntegerLiteral, 0); } + public NumericLiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_numericLiteral; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterNumericLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitNumericLiteral(this); + } + } + + public final NumericLiteralContext numericLiteral() throws RecognitionException { + NumericLiteralContext _localctx = new NumericLiteralContext(_ctx, getState()); + enterRule(_localctx, 266, RULE_numericLiteral); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1693); + _la = _input.LA(1); + if ( !(((((_la - 63)) & ~0x3f) == 0 && ((1L << (_la - 63)) & ((1L << (DecimalLiteral - 63)) | (1L << (HexIntegerLiteral - 63)) | (1L << (OctalIntegerLiteral - 63)) | (1L << (OctalIntegerLiteral2 - 63)) | (1L << (BinaryIntegerLiteral - 63)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public ReservedWordContext reservedWord() { + return getRuleContext(ReservedWordContext.class,0); + } + public IdentifierNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifierName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterIdentifierName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitIdentifierName(this); + } + } + + public final IdentifierNameContext identifierName() throws RecognitionException { + IdentifierNameContext _localctx = new IdentifierNameContext(_ctx, getState()); + enterRule(_localctx, 268, RULE_identifierName); + try { + setState(1697); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1695); + match(Identifier); + } + break; + case NullLiteral: + case BooleanLiteral: + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case As: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Await: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + enterOuterAlt(_localctx, 2); + { + setState(1696); + reservedWord(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ReservedWordContext extends ParserRuleContext { + public KeywordContext keyword() { + return getRuleContext(KeywordContext.class,0); + } + public TerminalNode NullLiteral() { return getToken(TypeScriptParser.NullLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(TypeScriptParser.BooleanLiteral, 0); } + public ReservedWordContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_reservedWord; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterReservedWord(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitReservedWord(this); + } + } + + public final ReservedWordContext reservedWord() throws RecognitionException { + ReservedWordContext _localctx = new ReservedWordContext(_ctx, getState()); + enterRule(_localctx, 270, RULE_reservedWord); + try { + setState(1702); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Break: + case Do: + case Instanceof: + case Typeof: + case Case: + case Else: + case New: + case Var: + case Catch: + case Finally: + case Return: + case Void: + case Continue: + case For: + case Switch: + case While: + case Debugger: + case Function: + case This: + case With: + case Default: + case If: + case Throw: + case Delete: + case In: + case Try: + case As: + case From: + case ReadOnly: + case Async: + case Class: + case Enum: + case Extends: + case Super: + case Const: + case Export: + case Import: + case Await: + case Implements: + case Let: + case Private: + case Public: + case Interface: + case Package: + case Protected: + case Static: + case Yield: + enterOuterAlt(_localctx, 1); + { + setState(1699); + keyword(); + } + break; + case NullLiteral: + enterOuterAlt(_localctx, 2); + { + setState(1700); + match(NullLiteral); + } + break; + case BooleanLiteral: + enterOuterAlt(_localctx, 3); + { + setState(1701); + match(BooleanLiteral); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class KeywordContext extends ParserRuleContext { + public TerminalNode Break() { return getToken(TypeScriptParser.Break, 0); } + public TerminalNode Do() { return getToken(TypeScriptParser.Do, 0); } + public TerminalNode Instanceof() { return getToken(TypeScriptParser.Instanceof, 0); } + public TerminalNode Typeof() { return getToken(TypeScriptParser.Typeof, 0); } + public TerminalNode Case() { return getToken(TypeScriptParser.Case, 0); } + public TerminalNode Else() { return getToken(TypeScriptParser.Else, 0); } + public TerminalNode New() { return getToken(TypeScriptParser.New, 0); } + public TerminalNode Var() { return getToken(TypeScriptParser.Var, 0); } + public TerminalNode Catch() { return getToken(TypeScriptParser.Catch, 0); } + public TerminalNode Finally() { return getToken(TypeScriptParser.Finally, 0); } + public TerminalNode Return() { return getToken(TypeScriptParser.Return, 0); } + public TerminalNode Void() { return getToken(TypeScriptParser.Void, 0); } + public TerminalNode Continue() { return getToken(TypeScriptParser.Continue, 0); } + public TerminalNode For() { return getToken(TypeScriptParser.For, 0); } + public TerminalNode Switch() { return getToken(TypeScriptParser.Switch, 0); } + public TerminalNode While() { return getToken(TypeScriptParser.While, 0); } + public TerminalNode Debugger() { return getToken(TypeScriptParser.Debugger, 0); } + public TerminalNode Function() { return getToken(TypeScriptParser.Function, 0); } + public TerminalNode This() { return getToken(TypeScriptParser.This, 0); } + public TerminalNode With() { return getToken(TypeScriptParser.With, 0); } + public TerminalNode Default() { return getToken(TypeScriptParser.Default, 0); } + public TerminalNode If() { return getToken(TypeScriptParser.If, 0); } + public TerminalNode Throw() { return getToken(TypeScriptParser.Throw, 0); } + public TerminalNode Delete() { return getToken(TypeScriptParser.Delete, 0); } + public TerminalNode In() { return getToken(TypeScriptParser.In, 0); } + public TerminalNode Try() { return getToken(TypeScriptParser.Try, 0); } + public TerminalNode ReadOnly() { return getToken(TypeScriptParser.ReadOnly, 0); } + public TerminalNode Async() { return getToken(TypeScriptParser.Async, 0); } + public TerminalNode From() { return getToken(TypeScriptParser.From, 0); } + public TerminalNode Class() { return getToken(TypeScriptParser.Class, 0); } + public TerminalNode Enum() { return getToken(TypeScriptParser.Enum, 0); } + public TerminalNode Extends() { return getToken(TypeScriptParser.Extends, 0); } + public TerminalNode Super() { return getToken(TypeScriptParser.Super, 0); } + public TerminalNode Const() { return getToken(TypeScriptParser.Const, 0); } + public TerminalNode Export() { return getToken(TypeScriptParser.Export, 0); } + public TerminalNode Import() { return getToken(TypeScriptParser.Import, 0); } + public TerminalNode Implements() { return getToken(TypeScriptParser.Implements, 0); } + public TerminalNode Let() { return getToken(TypeScriptParser.Let, 0); } + public TerminalNode Private() { return getToken(TypeScriptParser.Private, 0); } + public TerminalNode Public() { return getToken(TypeScriptParser.Public, 0); } + public TerminalNode Interface() { return getToken(TypeScriptParser.Interface, 0); } + public TerminalNode Package() { return getToken(TypeScriptParser.Package, 0); } + public TerminalNode Protected() { return getToken(TypeScriptParser.Protected, 0); } + public TerminalNode Static() { return getToken(TypeScriptParser.Static, 0); } + public TerminalNode Yield() { return getToken(TypeScriptParser.Yield, 0); } + public TerminalNode Await() { return getToken(TypeScriptParser.Await, 0); } + public TerminalNode As() { return getToken(TypeScriptParser.As, 0); } + public KeywordContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_keyword; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterKeyword(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitKeyword(this); + } + } + + public final KeywordContext keyword() throws RecognitionException { + KeywordContext _localctx = new KeywordContext(_ctx, getState()); + enterRule(_localctx, 272, RULE_keyword); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1704); + _la = _input.LA(1); + if ( !(((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (Break - 68)) | (1L << (Do - 68)) | (1L << (Instanceof - 68)) | (1L << (Typeof - 68)) | (1L << (Case - 68)) | (1L << (Else - 68)) | (1L << (New - 68)) | (1L << (Var - 68)) | (1L << (Catch - 68)) | (1L << (Finally - 68)) | (1L << (Return - 68)) | (1L << (Void - 68)) | (1L << (Continue - 68)) | (1L << (For - 68)) | (1L << (Switch - 68)) | (1L << (While - 68)) | (1L << (Debugger - 68)) | (1L << (Function - 68)) | (1L << (This - 68)) | (1L << (With - 68)) | (1L << (Default - 68)) | (1L << (If - 68)) | (1L << (Throw - 68)) | (1L << (Delete - 68)) | (1L << (In - 68)) | (1L << (Try - 68)) | (1L << (As - 68)) | (1L << (From - 68)) | (1L << (ReadOnly - 68)) | (1L << (Async - 68)) | (1L << (Class - 68)) | (1L << (Enum - 68)) | (1L << (Extends - 68)) | (1L << (Super - 68)) | (1L << (Const - 68)) | (1L << (Export - 68)) | (1L << (Import - 68)) | (1L << (Await - 68)) | (1L << (Implements - 68)) | (1L << (Let - 68)) | (1L << (Private - 68)) | (1L << (Public - 68)) | (1L << (Interface - 68)) | (1L << (Package - 68)) | (1L << (Protected - 68)) | (1L << (Static - 68)) | (1L << (Yield - 68)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GetterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public GetterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_getter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterGetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitGetter(this); + } + } + + public final GetterContext getter() throws RecognitionException { + GetterContext _localctx = new GetterContext(_ctx, getState()); + enterRule(_localctx, 274, RULE_getter); + try { + enterOuterAlt(_localctx, 1); + { + setState(1706); + match(Identifier); + setState(1707); + if (!(this.p("get"))) throw new FailedPredicateException(this, "this.p(\"get\")"); + setState(1708); + propertyName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SetterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(TypeScriptParser.Identifier, 0); } + public PropertyNameContext propertyName() { + return getRuleContext(PropertyNameContext.class,0); + } + public SetterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_setter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterSetter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitSetter(this); + } + } + + public final SetterContext setter() throws RecognitionException { + SetterContext _localctx = new SetterContext(_ctx, getState()); + enterRule(_localctx, 276, RULE_setter); + try { + enterOuterAlt(_localctx, 1); + { + setState(1710); + match(Identifier); + setState(1711); + if (!(this.p("set"))) throw new FailedPredicateException(this, "this.p(\"set\")"); + setState(1712); + propertyName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EosContext extends ParserRuleContext { + public TerminalNode SemiColon() { return getToken(TypeScriptParser.SemiColon, 0); } + public TerminalNode EOF() { return getToken(TypeScriptParser.EOF, 0); } + public EosContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eos; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).enterEos(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TypeScriptParserListener ) ((TypeScriptParserListener)listener).exitEos(this); + } + } + + public final EosContext eos() throws RecognitionException { + EosContext _localctx = new EosContext(_ctx, getState()); + enterRule(_localctx, 278, RULE_eos); + try { + setState(1718); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,217,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1714); + match(SemiColon); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1715); + match(EOF); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1716); + if (!(this.lineTerminatorAhead())) throw new FailedPredicateException(this, "this.lineTerminatorAhead()"); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1717); + if (!(this.closeBrace())) throw new FailedPredicateException(this, "this.closeBrace()"); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 10: + return unionOrIntersectionOrPrimaryType_sempred((UnionOrIntersectionOrPrimaryTypeContext)_localctx, predIndex); + case 11: + return primaryType_sempred((PrimaryTypeContext)_localctx, predIndex); + case 21: + return arrayType_sempred((ArrayTypeContext)_localctx, predIndex); + case 57: + return decoratorMemberExpression_sempred((DecoratorMemberExpressionContext)_localctx, predIndex); + case 73: + return expressionStatement_sempred((ExpressionStatementContext)_localctx, predIndex); + case 75: + return iterationStatement_sempred((IterationStatementContext)_localctx, predIndex); + case 77: + return continueStatement_sempred((ContinueStatementContext)_localctx, predIndex); + case 78: + return breakStatement_sempred((BreakStatementContext)_localctx, predIndex); + case 79: + return returnStatement_sempred((ReturnStatementContext)_localctx, predIndex); + case 80: + return yieldStatement_sempred((YieldStatementContext)_localctx, predIndex); + case 88: + return throwStatement_sempred((ThrowStatementContext)_localctx, predIndex); + case 127: + return singleExpression_sempred((SingleExpressionContext)_localctx, predIndex); + case 137: + return getter_sempred((GetterContext)_localctx, predIndex); + case 138: + return setter_sempred((SetterContext)_localctx, predIndex); + case 139: + return eos_sempred((EosContext)_localctx, predIndex); + } + return true; + } + private boolean unionOrIntersectionOrPrimaryType_sempred(UnionOrIntersectionOrPrimaryTypeContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 3); + case 1: + return precpred(_ctx, 2); + } + return true; + } + private boolean primaryType_sempred(PrimaryTypeContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return precpred(_ctx, 5); + case 3: + return this.notLineTerminator(); + } + return true; + } + private boolean arrayType_sempred(ArrayTypeContext _localctx, int predIndex) { + switch (predIndex) { + case 4: + return this.notLineTerminator(); + } + return true; + } + private boolean decoratorMemberExpression_sempred(DecoratorMemberExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 5: + return precpred(_ctx, 2); + } + return true; + } + private boolean expressionStatement_sempred(ExpressionStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 6: + return this.notOpenBraceAndNotFunction(); + } + return true; + } + private boolean iterationStatement_sempred(IterationStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 7: + return this.p("of"); + case 8: + return this.p("of"); + } + return true; + } + private boolean continueStatement_sempred(ContinueStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 9: + return this.notLineTerminator(); + } + return true; + } + private boolean breakStatement_sempred(BreakStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 10: + return this.notLineTerminator(); + } + return true; + } + private boolean returnStatement_sempred(ReturnStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 11: + return this.notLineTerminator(); + } + return true; + } + private boolean yieldStatement_sempred(YieldStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 12: + return this.notLineTerminator(); + } + return true; + } + private boolean throwStatement_sempred(ThrowStatementContext _localctx, int predIndex) { + switch (predIndex) { + case 13: + return this.notLineTerminator(); + } + return true; + } + private boolean singleExpression_sempred(SingleExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 14: + return precpred(_ctx, 30); + case 15: + return precpred(_ctx, 29); + case 16: + return precpred(_ctx, 28); + case 17: + return precpred(_ctx, 27); + case 18: + return precpred(_ctx, 26); + case 19: + return precpred(_ctx, 25); + case 20: + return precpred(_ctx, 24); + case 21: + return precpred(_ctx, 23); + case 22: + return precpred(_ctx, 22); + case 23: + return precpred(_ctx, 21); + case 24: + return precpred(_ctx, 20); + case 25: + return precpred(_ctx, 19); + case 26: + return precpred(_ctx, 18); + case 27: + return precpred(_ctx, 17); + case 28: + return precpred(_ctx, 16); + case 29: + return precpred(_ctx, 15); + case 30: + return precpred(_ctx, 14); + case 31: + return precpred(_ctx, 46); + case 32: + return precpred(_ctx, 45); + case 33: + return precpred(_ctx, 44); + case 34: + return precpred(_ctx, 42); + case 35: + return this.notLineTerminator(); + case 36: + return precpred(_ctx, 41); + case 37: + return this.notLineTerminator(); + case 38: + return precpred(_ctx, 13); + } + return true; + } + private boolean getter_sempred(GetterContext _localctx, int predIndex) { + switch (predIndex) { + case 39: + return this.p("get"); + } + return true; + } + private boolean setter_sempred(SetterContext _localctx, int predIndex) { + switch (predIndex) { + case 40: + return this.p("set"); + } + return true; + } + private boolean eos_sempred(EosContext _localctx, int predIndex) { + switch (predIndex) { + case 41: + return this.lineTerminatorAhead(); + case 42: + return this.closeBrace(); + } + return true; + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u008c\u06bb\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\3\2\3"+ + "\2\3\2\3\3\3\3\5\3\u0120\n\3\3\4\3\4\5\4\u0124\n\4\3\4\3\4\3\5\3\5\3\5"+ + "\7\5\u012b\n\5\f\5\16\5\u012e\13\5\3\6\3\6\5\6\u0132\n\6\3\6\5\6\u0135"+ + "\n\6\3\7\3\7\3\7\3\b\3\b\5\b\u013c\n\b\3\b\3\b\3\t\3\t\3\t\7\t\u0143\n"+ + "\t\f\t\16\t\u0146\13\t\3\n\3\n\3\13\3\13\3\13\3\13\3\13\5\13\u014f\n\13"+ + "\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\7\f\u015a\n\f\f\f\16\f\u015d\13\f"+ + "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3"+ + "\r\5\r\u0171\n\r\3\r\3\r\3\r\3\r\7\r\u0177\n\r\f\r\16\r\u017a\13\r\3\16"+ + "\3\16\3\17\3\17\3\17\5\17\u0181\n\17\3\20\3\20\3\20\3\20\3\21\3\21\3\21"+ + "\3\21\3\21\3\21\3\21\3\21\3\21\5\21\u0190\n\21\3\22\3\22\5\22\u0194\n"+ + "\22\3\23\3\23\5\23\u0198\n\23\3\23\3\23\3\24\3\24\5\24\u019e\n\24\3\25"+ + "\3\25\3\25\7\25\u01a3\n\25\f\25\16\25\u01a6\13\25\3\26\3\26\3\26\3\26"+ + "\3\26\3\26\3\26\5\26\u01af\n\26\5\26\u01b1\n\26\3\27\3\27\3\27\3\27\3"+ + "\27\3\30\3\30\3\30\3\30\3\31\3\31\3\31\7\31\u01bf\n\31\f\31\16\31\u01c2"+ + "\13\31\3\32\5\32\u01c5\n\32\3\32\3\32\5\32\u01c9\n\32\3\32\3\32\3\32\3"+ + "\32\3\33\3\33\5\33\u01d1\n\33\3\33\3\33\5\33\u01d5\n\33\3\33\3\33\3\33"+ + "\3\33\3\34\3\34\3\34\3\35\3\35\3\35\3\35\6\35\u01e2\n\35\r\35\16\35\u01e3"+ + "\3\35\3\35\5\35\u01e8\n\35\3\36\5\36\u01eb\n\36\3\36\3\36\5\36\u01ef\n"+ + "\36\3\36\5\36\u01f2\n\36\3\36\3\36\5\36\u01f6\n\36\3\37\3\37\3\37\3 \5"+ + " \u01fc\n \3 \3 \5 \u0200\n \3 \3 \5 \u0204\n \3!\3!\3!\3!\7!\u020a\n"+ + "!\f!\16!\u020d\13!\3!\3!\3!\5!\u0212\n!\3!\3!\3!\3!\3!\5!\u0219\n!\3!"+ + "\5!\u021c\n!\5!\u021e\n!\5!\u0220\n!\3\"\3\"\3\"\7\"\u0225\n\"\f\"\16"+ + "\"\u0228\13\"\3#\5#\u022b\n#\3#\5#\u022e\n#\3#\3#\5#\u0232\n#\3$\3$\3"+ + "%\3%\5%\u0238\n%\3&\3&\3&\7&\u023d\n&\f&\16&\u0240\13&\3\'\5\'\u0243\n"+ + "\'\3\'\5\'\u0246\n\'\3\'\3\'\3\'\5\'\u024b\n\'\3\'\5\'\u024e\n\'\3\'\5"+ + "\'\u0251\n\'\3(\3(\3(\3(\5(\u0257\n(\3)\3)\5)\u025b\n)\3)\3)\5)\u025f"+ + "\n)\3)\3)\5)\u0263\n)\3*\3*\3*\3*\3*\3*\3*\3+\3+\5+\u026e\n+\3+\3+\3,"+ + "\3,\3,\5,\u0275\n,\3,\3,\3,\3,\3-\5-\u027c\n-\3-\3-\3-\5-\u0281\n-\3-"+ + "\3-\3-\3-\3-\3-\5-\u0289\n-\3.\5.\u028c\n.\3.\3.\3.\5.\u0291\n.\3.\5."+ + "\u0294\n.\3.\3.\5.\u0298\n.\3/\3/\3/\3\60\3\60\3\60\7\60\u02a0\n\60\f"+ + "\60\16\60\u02a3\13\60\3\61\5\61\u02a6\n\61\3\61\3\61\3\61\3\61\5\61\u02ac"+ + "\n\61\3\61\3\61\3\62\3\62\5\62\u02b2\n\62\3\63\3\63\3\63\7\63\u02b7\n"+ + "\63\f\63\16\63\u02ba\13\63\3\64\3\64\3\64\5\64\u02bf\n\64\3\65\3\65\3"+ + "\65\3\65\5\65\u02c5\n\65\3\65\3\65\3\66\3\66\6\66\u02cb\n\66\r\66\16\66"+ + "\u02cc\3\66\7\66\u02d0\n\66\f\66\16\66\u02d3\13\66\3\67\3\67\3\67\3\67"+ + "\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\5\67\u02e1\n\67\38\38\39\69\u02e6"+ + "\n9\r9\169\u02e7\3:\3:\3:\5:\u02ed\n:\3;\3;\3;\3;\3;\3;\5;\u02f5\n;\3"+ + ";\3;\3;\7;\u02fa\n;\f;\16;\u02fd\13;\3<\3<\3<\3=\5=\u0303\n=\3=\3=\3>"+ + "\5>\u0308\n>\3>\3>\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?"+ + "\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\5?\u0329\n?\3@\3@\5@\u032d\n@\3@"+ + "\3@\3A\6A\u0332\nA\rA\16A\u0333\3B\3B\3B\3B\5B\u033a\nB\3B\3B\3C\3C\3"+ + "C\3C\5C\u0342\nC\3C\3C\3D\3D\3D\3D\3D\5D\u034b\nD\3D\3D\5D\u034f\nD\3"+ + "D\3D\3D\3E\3E\3E\5E\u0357\nE\3E\3E\3E\3E\7E\u035d\nE\fE\16E\u0360\13E"+ + "\3E\3E\3F\3F\5F\u0366\nF\3F\3F\5F\u036a\nF\3G\3G\5G\u036e\nG\3G\3G\5G"+ + "\u0372\nG\3G\5G\u0375\nG\3G\5G\u0378\nG\3G\5G\u037b\nG\3G\3G\5G\u037f"+ + "\nG\5G\u0381\nG\3H\3H\3H\7H\u0386\nH\fH\16H\u0389\13H\3I\3I\5I\u038d\n"+ + "I\3I\5I\u0390\nI\3I\3I\5I\u0394\nI\3I\5I\u0397\nI\3J\3J\3K\3K\3K\5K\u039e"+ + "\nK\3L\3L\3L\3L\3L\3L\3L\5L\u03a7\nL\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M"+ + "\3M\3M\3M\3M\3M\3M\5M\u03ba\nM\3M\3M\5M\u03be\nM\3M\3M\5M\u03c2\nM\3M"+ + "\3M\3M\3M\3M\3M\3M\3M\5M\u03cc\nM\3M\3M\5M\u03d0\nM\3M\3M\3M\3M\3M\5M"+ + "\u03d7\nM\3M\3M\3M\3M\3M\5M\u03de\nM\3M\3M\3M\3M\3M\3M\5M\u03e6\nM\3M"+ + "\3M\3M\3M\3M\3M\5M\u03ee\nM\3M\3M\3M\3M\5M\u03f4\nM\3N\3N\3O\3O\3O\5O"+ + "\u03fb\nO\3O\3O\3P\3P\3P\5P\u0402\nP\3P\3P\3Q\3Q\3Q\5Q\u0409\nQ\3Q\3Q"+ + "\3R\3R\3R\5R\u0410\nR\3R\3R\3S\3S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3U\3U"+ + "\5U\u0422\nU\3U\3U\5U\u0426\nU\5U\u0428\nU\3U\3U\3V\6V\u042d\nV\rV\16"+ + "V\u042e\3W\3W\3W\3W\5W\u0435\nW\3X\3X\3X\5X\u043a\nX\3Y\3Y\3Y\3Y\3Z\3"+ + "Z\3Z\3Z\3Z\3[\3[\3[\3[\5[\u0449\n[\3[\5[\u044c\n[\3\\\3\\\3\\\5\\\u0451"+ + "\n\\\3\\\5\\\u0454\n\\\3\\\3\\\3]\3]\3]\5]\u045b\n]\3^\3^\3^\3_\3_\3_"+ + "\3`\5`\u0464\n`\3`\3`\5`\u0468\n`\3`\3`\3`\3`\3`\3`\3`\5`\u0471\n`\3a"+ + "\5a\u0474\na\3a\3a\3a\5a\u0479\na\3a\3a\3a\3b\5b\u047f\nb\3b\5b\u0482"+ + "\nb\3c\3c\7c\u0486\nc\fc\16c\u0489\13c\3c\3c\3d\3d\3d\3e\3e\3e\3f\3f\3"+ + "f\3f\5f\u0497\nf\3g\3g\5g\u049b\ng\3g\5g\u049e\ng\3g\3g\5g\u04a2\ng\3"+ + "g\5g\u04a5\ng\3g\3g\3g\3g\5g\u04ab\ng\3g\5g\u04ae\ng\3g\3g\3g\3g\3g\3"+ + "g\3g\5g\u04b7\ng\3g\3g\5g\u04bb\ng\3g\5g\u04be\ng\3g\3g\5g\u04c2\ng\3"+ + "g\5g\u04c5\ng\3h\5h\u04c8\nh\3h\5h\u04cb\nh\3h\5h\u04ce\nh\3h\5h\u04d1"+ + "\nh\3i\3i\3i\3j\5j\u04d7\nj\3j\3j\3j\5j\u04dc\nj\3j\3j\3j\3j\3j\3k\3k"+ + "\3k\5k\u04e6\nk\3k\3k\5k\u04ea\nk\3k\3k\3k\3k\3k\3l\3l\3l\3l\7l\u04f5"+ + "\nl\fl\16l\u04f8\13l\3l\5l\u04fb\nl\3l\3l\3m\3m\3m\3n\3n\3n\3n\7n\u0506"+ + "\nn\fn\16n\u0509\13n\3n\5n\u050c\nn\3n\3n\3o\3o\3o\3o\3o\5o\u0515\no\3"+ + "o\3o\3o\3o\3o\3p\3p\3p\7p\u051f\np\fp\16p\u0522\13p\3p\3p\5p\u0526\np"+ + "\3p\3p\3p\3p\3p\5p\u052d\np\5p\u052f\np\3q\5q\u0532\nq\3q\3q\5q\u0536"+ + "\nq\3q\3q\5q\u053a\nq\3r\3r\3r\3s\5s\u0540\ns\3t\6t\u0543\nt\rt\16t\u0544"+ + "\3u\3u\5u\u0549\nu\3u\3u\3v\3v\6v\u054f\nv\rv\16v\u0550\3v\7v\u0554\n"+ + "v\fv\16v\u0557\13v\3v\6v\u055a\nv\rv\16v\u055b\3v\5v\u055f\nv\3v\5v\u0562"+ + "\nv\3w\3w\3w\5w\u0567\nw\3x\3x\3x\3x\7x\u056d\nx\fx\16x\u0570\13x\5x\u0572"+ + "\nx\3x\5x\u0575\nx\3x\3x\3y\3y\3y\3y\3y\3y\3y\3y\3y\3y\3y\5y\u0584\ny"+ + "\3y\5y\u0587\ny\3y\3y\3y\5y\u058c\ny\3y\3y\3y\3y\3y\3y\3y\3y\3y\3y\5y"+ + "\u0598\ny\3z\3z\3z\3z\5z\u059e\nz\3z\3z\3z\3z\3{\3{\3{\3{\5{\u05a8\n{"+ + "\3{\5{\u05ab\n{\3{\3{\3{\3{\3{\3|\3|\3|\3|\3|\3|\3|\5|\u05b9\n|\3}\3}"+ + "\3}\3}\7}\u05bf\n}\f}\16}\u05c2\13}\3}\3}\5}\u05c6\n}\3}\5}\u05c9\n}\3"+ + "}\3}\3~\3~\3~\3\177\3\177\3\177\7\177\u05d3\n\177\f\177\16\177\u05d6\13"+ + "\177\3\177\5\177\u05d9\n\177\3\u0080\5\u0080\u05dc\n\u0080\3\u0080\3\u0080"+ + "\5\u0080\u05e0\n\u0080\3\u0080\3\u0080\5\u0080\u05e4\n\u0080\3\u0080\3"+ + "\u0080\5\u0080\u05e8\n\u0080\3\u0080\3\u0080\3\u0080\3\u0080\3\u0081\3"+ + "\u0081\3\u0081\3\u0081\3\u0081\5\u0081\u05f3\n\u0081\3\u0081\3\u0081\3"+ + "\u0081\3\u0081\5\u0081\u05f9\n\u0081\3\u0081\5\u0081\u05fc\n\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\5\u0081"+ + "\u0619\n\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\5\u0081\u0625\n\u0081\5\u0081\u0627\n\u0081\3"+ + "\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\5\u0081"+ + "\u0667\n\u0081\3\u0081\3\u0081\5\u0081\u066b\n\u0081\3\u0081\3\u0081\3"+ + "\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081"+ + "\7\u0081\u0678\n\u0081\f\u0081\16\u0081\u067b\13\u0081\3\u0082\5\u0082"+ + "\u067e\n\u0082\3\u0082\3\u0082\5\u0082\u0682\n\u0082\3\u0082\3\u0082\3"+ + "\u0082\3\u0083\3\u0083\3\u0083\5\u0083\u068a\n\u0083\3\u0083\5\u0083\u068d"+ + "\n\u0083\3\u0084\3\u0084\3\u0084\3\u0084\3\u0084\5\u0084\u0694\n\u0084"+ + "\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086\5\u0086"+ + "\u069e\n\u0086\3\u0087\3\u0087\3\u0088\3\u0088\5\u0088\u06a4\n\u0088\3"+ + "\u0089\3\u0089\3\u0089\5\u0089\u06a9\n\u0089\3\u008a\3\u008a\3\u008b\3"+ + "\u008b\3\u008b\3\u008b\3\u008c\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d"+ + "\3\u008d\3\u008d\5\u008d\u06b9\n\u008d\3\u008d\2\6\26\30t\u0100\u008e"+ + "\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFH"+ + "JLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c"+ + "\u008e\u0090\u0092\u0094\u0096\u0098\u009a\u009c\u009e\u00a0\u00a2\u00a4"+ + "\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc"+ + "\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca\u00cc\u00ce\u00d0\u00d2\u00d4"+ + "\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u00e2\u00e4\u00e6\u00e8\u00ea\u00ec"+ + "\u00ee\u00f0\u00f2\u00f4\u00f6\u00f8\u00fa\u00fc\u00fe\u0100\u0102\u0104"+ + "\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\2\20\4\2"+ + "QQuy\3\2\r\16\4\2norr\4\2vvxx\5\2MMhhmm\4\2\17\17\21\21\4\2\32\32\35\36"+ + "\3\2\26\27\3\2\"$\3\2%(\3\2),\4\2\62<>>\3\2AE\3\2Ft\2\u077e\2\u011a\3"+ + "\2\2\2\4\u011f\3\2\2\2\6\u0121\3\2\2\2\b\u0127\3\2\2\2\n\u0134\3\2\2\2"+ + "\f\u0136\3\2\2\2\16\u0139\3\2\2\2\20\u013f\3\2\2\2\22\u0147\3\2\2\2\24"+ + "\u014e\3\2\2\2\26\u0150\3\2\2\2\30\u0170\3\2\2\2\32\u017b\3\2\2\2\34\u017d"+ + "\3\2\2\2\36\u0182\3\2\2\2 \u0186\3\2\2\2\"\u0193\3\2\2\2$\u0195\3\2\2"+ + "\2&\u019b\3\2\2\2(\u019f\3\2\2\2*\u01b0\3\2\2\2,\u01b2\3\2\2\2.\u01b7"+ + "\3\2\2\2\60\u01bb\3\2\2\2\62\u01c4\3\2\2\2\64\u01ce\3\2\2\2\66\u01da\3"+ + "\2\2\28\u01e7\3\2\2\2:\u01ea\3\2\2\2<\u01f7\3\2\2\2>\u01fb\3\2\2\2@\u021f"+ + "\3\2\2\2B\u0221\3\2\2\2D\u022a\3\2\2\2F\u0233\3\2\2\2H\u0237\3\2\2\2J"+ + "\u0239\3\2\2\2L\u0242\3\2\2\2N\u0256\3\2\2\2P\u0258\3\2\2\2R\u0264\3\2"+ + "\2\2T\u026b\3\2\2\2V\u0271\3\2\2\2X\u027b\3\2\2\2Z\u028b\3\2\2\2\\\u0299"+ + "\3\2\2\2^\u029c\3\2\2\2`\u02a5\3\2\2\2b\u02af\3\2\2\2d\u02b3\3\2\2\2f"+ + "\u02bb\3\2\2\2h\u02c0\3\2\2\2j\u02c8\3\2\2\2l\u02e0\3\2\2\2n\u02e2\3\2"+ + "\2\2p\u02e5\3\2\2\2r\u02e9\3\2\2\2t\u02f4\3\2\2\2v\u02fe\3\2\2\2x\u0302"+ + "\3\2\2\2z\u0307\3\2\2\2|\u0328\3\2\2\2~\u032a\3\2\2\2\u0080\u0331\3\2"+ + "\2\2\u0082\u0335\3\2\2\2\u0084\u033d\3\2\2\2\u0086\u034a\3\2\2\2\u0088"+ + "\u0356\3\2\2\2\u008a\u0363\3\2\2\2\u008c\u0380\3\2\2\2\u008e\u0382\3\2"+ + "\2\2\u0090\u038a\3\2\2\2\u0092\u0398\3\2\2\2\u0094\u039a\3\2\2\2\u0096"+ + "\u039f\3\2\2\2\u0098\u03f3\3\2\2\2\u009a\u03f5\3\2\2\2\u009c\u03f7\3\2"+ + "\2\2\u009e\u03fe\3\2\2\2\u00a0\u0405\3\2\2\2\u00a2\u040c\3\2\2\2\u00a4"+ + "\u0413\3\2\2\2\u00a6\u0419\3\2\2\2\u00a8\u041f\3\2\2\2\u00aa\u042c\3\2"+ + "\2\2\u00ac\u0430\3\2\2\2\u00ae\u0436\3\2\2\2\u00b0\u043b\3\2\2\2\u00b2"+ + "\u043f\3\2\2\2\u00b4\u0444\3\2\2\2\u00b6\u044d\3\2\2\2\u00b8\u045a\3\2"+ + "\2\2\u00ba\u045c\3\2\2\2\u00bc\u045f\3\2\2\2\u00be\u0463\3\2\2\2\u00c0"+ + "\u0473\3\2\2\2\u00c2\u047e\3\2\2\2\u00c4\u0483\3\2\2\2\u00c6\u048c\3\2"+ + "\2\2\u00c8\u048f\3\2\2\2\u00ca\u0496\3\2\2\2\u00cc\u04c4\3\2\2\2\u00ce"+ + "\u04c7\3\2\2\2\u00d0\u04d2\3\2\2\2\u00d2\u04d6\3\2\2\2\u00d4\u04e2\3\2"+ + "\2\2\u00d6\u04f0\3\2\2\2\u00d8\u04fe\3\2\2\2\u00da\u0501\3\2\2\2\u00dc"+ + "\u050f\3\2\2\2\u00de\u052e\3\2\2\2\u00e0\u0531\3\2\2\2\u00e2\u053b\3\2"+ + "\2\2\u00e4\u053f\3\2\2\2\u00e6\u0542\3\2\2\2\u00e8\u0546\3\2\2\2\u00ea"+ + "\u0561\3\2\2\2\u00ec\u0563\3\2\2\2\u00ee\u0568\3\2\2\2\u00f0\u0597\3\2"+ + "\2\2\u00f2\u0599\3\2\2\2\u00f4\u05a3\3\2\2\2\u00f6\u05b8\3\2\2\2\u00f8"+ + "\u05ba\3\2\2\2\u00fa\u05cc\3\2\2\2\u00fc\u05cf\3\2\2\2\u00fe\u05db\3\2"+ + "\2\2\u0100\u0626\3\2\2\2\u0102\u067d\3\2\2\2\u0104\u068c\3\2\2\2\u0106"+ + "\u0693\3\2\2\2\u0108\u0695\3\2\2\2\u010a\u069d\3\2\2\2\u010c\u069f\3\2"+ + "\2\2\u010e\u06a3\3\2\2\2\u0110\u06a8\3\2\2\2\u0112\u06aa\3\2\2\2\u0114"+ + "\u06ac\3\2\2\2\u0116\u06b0\3\2\2\2\u0118\u06b8\3\2\2\2\u011a\u011b\7\17"+ + "\2\2\u011b\u011c\5\u0100\u0081\2\u011c\3\3\2\2\2\u011d\u0120\5\u00e8u"+ + "\2\u011e\u0120\5\u00eex\2\u011f\u011d\3\2\2\2\u011f\u011e\3\2\2\2\u0120"+ + "\5\3\2\2\2\u0121\u0123\7%\2\2\u0122\u0124\5\b\5\2\u0123\u0122\3\2\2\2"+ + "\u0123\u0124\3\2\2\2\u0124\u0125\3\2\2\2\u0125\u0126\7&\2\2\u0126\7\3"+ + "\2\2\2\u0127\u012c\5\n\6\2\u0128\u0129\7\16\2\2\u0129\u012b\5\n\6\2\u012a"+ + "\u0128\3\2\2\2\u012b\u012e\3\2\2\2\u012c\u012a\3\2\2\2\u012c\u012d\3\2"+ + "\2\2\u012d\t\3\2\2\2\u012e\u012c\3\2\2\2\u012f\u0131\7\u0085\2\2\u0130"+ + "\u0132\5\f\7\2\u0131\u0130\3\2\2\2\u0131\u0132\3\2\2\2\u0132\u0135\3\2"+ + "\2\2\u0133\u0135\5\6\4\2\u0134\u012f\3\2\2\2\u0134\u0133\3\2\2\2\u0135"+ + "\13\3\2\2\2\u0136\u0137\7f\2\2\u0137\u0138\5\24\13\2\u0138\r\3\2\2\2\u0139"+ + "\u013b\7%\2\2\u013a\u013c\5\20\t\2\u013b\u013a\3\2\2\2\u013b\u013c\3\2"+ + "\2\2\u013c\u013d\3\2\2\2\u013d\u013e\7&\2\2\u013e\17\3\2\2\2\u013f\u0144"+ + "\5\22\n\2\u0140\u0141\7\16\2\2\u0141\u0143\5\22\n\2\u0142\u0140\3\2\2"+ + "\2\u0143\u0146\3\2\2\2\u0144\u0142\3\2\2\2\u0144\u0145\3\2\2\2\u0145\21"+ + "\3\2\2\2\u0146\u0144\3\2\2\2\u0147\u0148\5\24\13\2\u0148\23\3\2\2\2\u0149"+ + "\u014f\5\26\f\2\u014a\u014f\5\62\32\2\u014b\u014f\5\64\33\2\u014c\u014f"+ + "\5\36\20\2\u014d\u014f\7\u0086\2\2\u014e\u0149\3\2\2\2\u014e\u014a\3\2"+ + "\2\2\u014e\u014b\3\2\2\2\u014e\u014c\3\2\2\2\u014e\u014d\3\2\2\2\u014f"+ + "\25\3\2\2\2\u0150\u0151\b\f\1\2\u0151\u0152\5\30\r\2\u0152\u015b\3\2\2"+ + "\2\u0153\u0154\f\5\2\2\u0154\u0155\7/\2\2\u0155\u015a\5\26\f\6\u0156\u0157"+ + "\f\4\2\2\u0157\u0158\7-\2\2\u0158\u015a\5\26\f\5\u0159\u0153\3\2\2\2\u0159"+ + "\u0156\3\2\2\2\u015a\u015d\3\2\2\2\u015b\u0159\3\2\2\2\u015b\u015c\3\2"+ + "\2\2\u015c\27\3\2\2\2\u015d\u015b\3\2\2\2\u015e\u015f\b\r\1\2\u015f\u0160"+ + "\7\t\2\2\u0160\u0161\5\24\13\2\u0161\u0162\7\n\2\2\u0162\u0171\3\2\2\2"+ + "\u0163\u0171\5\32\16\2\u0164\u0171\5\34\17\2\u0165\u0171\5$\23\2\u0166"+ + "\u0167\7\7\2\2\u0167\u0168\5\60\31\2\u0168\u0169\7\b\2\2\u0169\u0171\3"+ + "\2\2\2\u016a\u0171\5\66\34\2\u016b\u0171\7X\2\2\u016c\u016d\5\34\17\2"+ + "\u016d\u016e\7\u0083\2\2\u016e\u016f\5\30\r\3\u016f\u0171\3\2\2\2\u0170"+ + "\u015e\3\2\2\2\u0170\u0163\3\2\2\2\u0170\u0164\3\2\2\2\u0170\u0165\3\2"+ + "\2\2\u0170\u0166\3\2\2\2\u0170\u016a\3\2\2\2\u0170\u016b\3\2\2\2\u0170"+ + "\u016c\3\2\2\2\u0171\u0178\3\2\2\2\u0172\u0173\f\7\2\2\u0173\u0174\6\r"+ + "\5\2\u0174\u0175\7\7\2\2\u0175\u0177\7\b\2\2\u0176\u0172\3\2\2\2\u0177"+ + "\u017a\3\2\2\2\u0178\u0176\3\2\2\2\u0178\u0179\3\2\2\2\u0179\31\3\2\2"+ + "\2\u017a\u0178\3\2\2\2\u017b\u017c\t\2\2\2\u017c\33\3\2\2\2\u017d\u0180"+ + "\5\"\22\2\u017e\u0181\5 \21\2\u017f\u0181\5\36\20\2\u0180\u017e\3\2\2"+ + "\2\u0180\u017f\3\2\2\2\u0180\u0181\3\2\2\2\u0181\35\3\2\2\2\u0182\u0183"+ + "\7%\2\2\u0183\u0184\5\20\t\2\u0184\u0185\7&\2\2\u0185\37\3\2\2\2\u0186"+ + "\u0187\7%\2\2\u0187\u0188\5\20\t\2\u0188\u0189\7%\2\2\u0189\u018f\5\20"+ + "\t\2\u018a\u018b\7&\2\2\u018b\u018c\5\4\3\2\u018c\u018d\7&\2\2\u018d\u0190"+ + "\3\2\2\2\u018e\u0190\7\"\2\2\u018f\u018a\3\2\2\2\u018f\u018e\3\2\2\2\u0190"+ + "!\3\2\2\2\u0191\u0194\7\u0085\2\2\u0192\u0194\5j\66\2\u0193\u0191\3\2"+ + "\2\2\u0193\u0192\3\2\2\2\u0194#\3\2\2\2\u0195\u0197\7\13\2\2\u0196\u0198"+ + "\5&\24\2\u0197\u0196\3\2\2\2\u0197\u0198\3\2\2\2\u0198\u0199\3\2\2\2\u0199"+ + "\u019a\7\f\2\2\u019a%\3\2\2\2\u019b\u019d\5(\25\2\u019c\u019e\t\3\2\2"+ + "\u019d\u019c\3\2\2\2\u019d\u019e\3\2\2\2\u019e\'\3\2\2\2\u019f\u01a4\5"+ + "*\26\2\u01a0\u01a1\t\3\2\2\u01a1\u01a3\5*\26\2\u01a2\u01a0\3\2\2\2\u01a3"+ + "\u01a6\3\2\2\2\u01a4\u01a2\3\2\2\2\u01a4\u01a5\3\2\2\2\u01a5)\3\2\2\2"+ + "\u01a6\u01a4\3\2\2\2\u01a7\u01b1\5:\36\2\u01a8\u01b1\5> \2\u01a9\u01b1"+ + "\5P)\2\u01aa\u01b1\5R*\2\u01ab\u01ae\5T+\2\u01ac\u01ad\7=\2\2\u01ad\u01af"+ + "\5\24\13\2\u01ae\u01ac\3\2\2\2\u01ae\u01af\3\2\2\2\u01af\u01b1\3\2\2\2"+ + "\u01b0\u01a7\3\2\2\2\u01b0\u01a8\3\2\2\2\u01b0\u01a9\3\2\2\2\u01b0\u01aa"+ + "\3\2\2\2\u01b0\u01ab\3\2\2\2\u01b1+\3\2\2\2\u01b2\u01b3\5\30\r\2\u01b3"+ + "\u01b4\6\27\6\2\u01b4\u01b5\7\7\2\2\u01b5\u01b6\7\b\2\2\u01b6-\3\2\2\2"+ + "\u01b7\u01b8\7\7\2\2\u01b8\u01b9\5\60\31\2\u01b9\u01ba\7\b\2\2\u01ba/"+ + "\3\2\2\2\u01bb\u01c0\5\24\13\2\u01bc\u01bd\7\16\2\2\u01bd\u01bf\5\24\13"+ + "\2\u01be\u01bc\3\2\2\2\u01bf\u01c2\3\2\2\2\u01c0\u01be\3\2\2\2\u01c0\u01c1"+ + "\3\2\2\2\u01c1\61\3\2\2\2\u01c2\u01c0\3\2\2\2\u01c3\u01c5\5\6\4\2\u01c4"+ + "\u01c3\3\2\2\2\u01c4\u01c5\3\2\2\2\u01c5\u01c6\3\2\2\2\u01c6\u01c8\7\t"+ + "\2\2\u01c7\u01c9\5@!\2\u01c8\u01c7\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01ca"+ + "\3\2\2\2\u01ca\u01cb\7\n\2\2\u01cb\u01cc\7=\2\2\u01cc\u01cd\5\24\13\2"+ + "\u01cd\63\3\2\2\2\u01ce\u01d0\7L\2\2\u01cf\u01d1\5\6\4\2\u01d0\u01cf\3"+ + "\2\2\2\u01d0\u01d1\3\2\2\2\u01d1\u01d2\3\2\2\2\u01d2\u01d4\7\t\2\2\u01d3"+ + "\u01d5\5@!\2\u01d4\u01d3\3\2\2\2\u01d4\u01d5\3\2\2\2\u01d5\u01d6\3\2\2"+ + "\2\u01d6\u01d7\7\n\2\2\u01d7\u01d8\7=\2\2\u01d8\u01d9\5\24\13\2\u01d9"+ + "\65\3\2\2\2\u01da\u01db\7I\2\2\u01db\u01dc\58\35\2\u01dc\67\3\2\2\2\u01dd"+ + "\u01e8\7\u0085\2\2\u01de\u01df\5\u010e\u0088\2\u01df\u01e0\7\23\2\2\u01e0"+ + "\u01e2\3\2\2\2\u01e1\u01de\3\2\2\2\u01e2\u01e3\3\2\2\2\u01e3\u01e1\3\2"+ + "\2\2\u01e3\u01e4\3\2\2\2\u01e4\u01e5\3\2\2\2\u01e5\u01e6\5\u010e\u0088"+ + "\2\u01e6\u01e8\3\2\2\2\u01e7\u01dd\3\2\2\2\u01e7\u01e1\3\2\2\2\u01e89"+ + "\3\2\2\2\u01e9\u01eb\7b\2\2\u01ea\u01e9\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb"+ + "\u01ec\3\2\2\2\u01ec\u01ee\5\u00f6|\2\u01ed\u01ef\7\20\2\2\u01ee\u01ed"+ + "\3\2\2\2\u01ee\u01ef\3\2\2\2\u01ef\u01f1\3\2\2\2\u01f0\u01f2\5<\37\2\u01f1"+ + "\u01f0\3\2\2\2\u01f1\u01f2\3\2\2\2\u01f2\u01f5\3\2\2\2\u01f3\u01f4\7="+ + "\2\2\u01f4\u01f6\5\24\13\2\u01f5\u01f3\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6"+ + ";\3\2\2\2\u01f7\u01f8\7\21\2\2\u01f8\u01f9\5\24\13\2\u01f9=\3\2\2\2\u01fa"+ + "\u01fc\5\6\4\2\u01fb\u01fa\3\2\2\2\u01fb\u01fc\3\2\2\2\u01fc\u01fd\3\2"+ + "\2\2\u01fd\u01ff\7\t\2\2\u01fe\u0200\5@!\2\u01ff\u01fe\3\2\2\2\u01ff\u0200"+ + "\3\2\2\2\u0200\u0201\3\2\2\2\u0201\u0203\7\n\2\2\u0202\u0204\5<\37\2\u0203"+ + "\u0202\3\2\2\2\u0203\u0204\3\2\2\2\u0204?\3\2\2\2\u0205\u0220\5N(\2\u0206"+ + "\u020b\5\32\16\2\u0207\u0208\7\16\2\2\u0208\u020a\5\32\16\2\u0209\u0207"+ + "\3\2\2\2\u020a\u020d\3\2\2\2\u020b\u0209\3\2\2\2\u020b\u020c\3\2\2\2\u020c"+ + "\u0220\3\2\2\2\u020d\u020b\3\2\2\2\u020e\u0211\5J&\2\u020f\u0210\7\16"+ + "\2\2\u0210\u0212\5N(\2\u0211\u020f\3\2\2\2\u0211\u0212\3\2\2\2\u0212\u0220"+ + "\3\2\2\2\u0213\u021d\5B\"\2\u0214\u021b\7\16\2\2\u0215\u0218\5J&\2\u0216"+ + "\u0217\7\16\2\2\u0217\u0219\5N(\2\u0218\u0216\3\2\2\2\u0218\u0219\3\2"+ + "\2\2\u0219\u021c\3\2\2\2\u021a\u021c\5N(\2\u021b\u0215\3\2\2\2\u021b\u021a"+ + "\3\2\2\2\u021c\u021e\3\2\2\2\u021d\u0214\3\2\2\2\u021d\u021e\3\2\2\2\u021e"+ + "\u0220\3\2\2\2\u021f\u0205\3\2\2\2\u021f\u0206\3\2\2\2\u021f\u020e\3\2"+ + "\2\2\u021f\u0213\3\2\2\2\u0220A\3\2\2\2\u0221\u0226\5D#\2\u0222\u0223"+ + "\7\16\2\2\u0223\u0225\5D#\2\u0224\u0222\3\2\2\2\u0225\u0228\3\2\2\2\u0226"+ + "\u0224\3\2\2\2\u0226\u0227\3\2\2\2\u0227C\3\2\2\2\u0228\u0226\3\2\2\2"+ + "\u0229\u022b\5p9\2\u022a\u0229\3\2\2\2\u022a\u022b\3\2\2\2\u022b\u022d"+ + "\3\2\2\2\u022c\u022e\5F$\2\u022d\u022c\3\2\2\2\u022d\u022e\3\2\2\2\u022e"+ + "\u022f\3\2\2\2\u022f\u0231\5H%\2\u0230\u0232\5<\37\2\u0231\u0230\3\2\2"+ + "\2\u0231\u0232\3\2\2\2\u0232E\3\2\2\2\u0233\u0234\t\4\2\2\u0234G\3\2\2"+ + "\2\u0235\u0238\5\u010e\u0088\2\u0236\u0238\5\4\3\2\u0237\u0235\3\2\2\2"+ + "\u0237\u0236\3\2\2\2\u0238I\3\2\2\2\u0239\u023e\5L\'\2\u023a\u023b\7\16"+ + "\2\2\u023b\u023d\5L\'\2\u023c\u023a\3\2\2\2\u023d\u0240\3\2\2\2\u023e"+ + "\u023c\3\2\2\2\u023e\u023f\3\2\2\2\u023fK\3\2\2\2\u0240\u023e\3\2\2\2"+ + "\u0241\u0243\5p9\2\u0242\u0241\3\2\2\2\u0242\u0243\3\2\2\2\u0243\u0245"+ + "\3\2\2\2\u0244\u0246\5F$\2\u0245\u0244\3\2\2\2\u0245\u0246\3\2\2\2\u0246"+ + "\u0247\3\2\2\2\u0247\u0250\5H%\2\u0248\u024a\7\20\2\2\u0249\u024b\5<\37"+ + "\2\u024a\u0249\3\2\2\2\u024a\u024b\3\2\2\2\u024b\u0251\3\2\2\2\u024c\u024e"+ + "\5<\37\2\u024d\u024c\3\2\2\2\u024d\u024e\3\2\2\2\u024e\u024f\3\2\2\2\u024f"+ + "\u0251\5\2\2\2\u0250\u0248\3\2\2\2\u0250\u024d\3\2\2\2\u0251M\3\2\2\2"+ + "\u0252\u0253\7\22\2\2\u0253\u0257\5D#\2\u0254\u0255\7\22\2\2\u0255\u0257"+ + "\5\u0100\u0081\2\u0256\u0252\3\2\2\2\u0256\u0254\3\2\2\2\u0257O\3\2\2"+ + "\2\u0258\u025a\7L\2\2\u0259\u025b\5\6\4\2\u025a\u0259\3\2\2\2\u025a\u025b"+ + "\3\2\2\2\u025b\u025c\3\2\2\2\u025c\u025e\7\t\2\2\u025d\u025f\5@!\2\u025e"+ + "\u025d\3\2\2\2\u025e\u025f\3\2\2\2\u025f\u0260\3\2\2\2\u0260\u0262\7\n"+ + "\2\2\u0261\u0263\5<\37\2\u0262\u0261\3\2\2\2\u0262\u0263\3\2\2\2\u0263"+ + "Q\3\2\2\2\u0264\u0265\7\7\2\2\u0265\u0266\7\u0085\2\2\u0266\u0267\7\21"+ + "\2\2\u0267\u0268\t\5\2\2\u0268\u0269\7\b\2\2\u0269\u026a\5<\37\2\u026a"+ + "S\3\2\2\2\u026b\u026d\5\u00f6|\2\u026c\u026e\7\20\2\2\u026d\u026c\3\2"+ + "\2\2\u026d\u026e\3\2\2\2\u026e\u026f\3\2\2\2\u026f\u0270\5> \2\u0270U"+ + "\3\2\2\2\u0271\u0272\7z\2\2\u0272\u0274\7\u0085\2\2\u0273\u0275\5\6\4"+ + "\2\u0274\u0273\3\2\2\2\u0274\u0275\3\2\2\2\u0275\u0276\3\2\2\2\u0276\u0277"+ + "\7\17\2\2\u0277\u0278\5\24\13\2\u0278\u0279\7\r\2\2\u0279W\3\2\2\2\u027a"+ + "\u027c\5F$\2\u027b\u027a\3\2\2\2\u027b\u027c\3\2\2\2\u027c\u027d\3\2\2"+ + "\2\u027d\u027e\7}\2\2\u027e\u0280\7\t\2\2\u027f\u0281\5\u00dep\2\u0280"+ + "\u027f\3\2\2\2\u0280\u0281\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0288\7\n"+ + "\2\2\u0283\u0284\7\13\2\2\u0284\u0285\5\u00e4s\2\u0285\u0286\7\f\2\2\u0286"+ + "\u0289\3\2\2\2\u0287\u0289\7\r\2\2\u0288\u0283\3\2\2\2\u0288\u0287\3\2"+ + "\2\2\u0288\u0289\3\2\2\2\u0289Y\3\2\2\2\u028a\u028c\7i\2\2\u028b\u028a"+ + "\3\2\2\2\u028b\u028c\3\2\2\2\u028c\u028d\3\2\2\2\u028d\u028e\7p\2\2\u028e"+ + "\u0290\7\u0085\2\2\u028f\u0291\5\6\4\2\u0290\u028f\3\2\2\2\u0290\u0291"+ + "\3\2\2\2\u0291\u0293\3\2\2\2\u0292\u0294\5\\/\2\u0293\u0292\3\2\2\2\u0293"+ + "\u0294\3\2\2\2\u0294\u0295\3\2\2\2\u0295\u0297\5$\23\2\u0296\u0298\7\r"+ + "\2\2\u0297\u0296\3\2\2\2\u0297\u0298\3\2\2\2\u0298[\3\2\2\2\u0299\u029a"+ + "\7f\2\2\u029a\u029b\5^\60\2\u029b]\3\2\2\2\u029c\u02a1\5\34\17\2\u029d"+ + "\u029e\7\16\2\2\u029e\u02a0\5\34\17\2\u029f\u029d\3\2\2\2\u02a0\u02a3"+ + "\3\2\2\2\u02a1\u029f\3\2\2\2\u02a1\u02a2\3\2\2\2\u02a2_\3\2\2\2\u02a3"+ + "\u02a1\3\2\2\2\u02a4\u02a6\7h\2\2\u02a5\u02a4\3\2\2\2\u02a5\u02a6\3\2"+ + "\2\2\u02a6\u02a7\3\2\2\2\u02a7\u02a8\7e\2\2\u02a8\u02a9\7\u0085\2\2\u02a9"+ + "\u02ab\7\13\2\2\u02aa\u02ac\5b\62\2\u02ab\u02aa\3\2\2\2\u02ab\u02ac\3"+ + "\2\2\2\u02ac\u02ad\3\2\2\2\u02ad\u02ae\7\f\2\2\u02aea\3\2\2\2\u02af\u02b1"+ + "\5d\63\2\u02b0\u02b2\7\16\2\2\u02b1\u02b0\3\2\2\2\u02b1\u02b2\3\2\2\2"+ + "\u02b2c\3\2\2\2\u02b3\u02b8\5f\64\2\u02b4\u02b5\7\16\2\2\u02b5\u02b7\5"+ + "f\64\2\u02b6\u02b4\3\2\2\2\u02b7\u02ba\3\2\2\2\u02b8\u02b6\3\2\2\2\u02b8"+ + "\u02b9\3\2\2\2\u02b9e\3\2\2\2\u02ba\u02b8\3\2\2\2\u02bb\u02be\5\u00f6"+ + "|\2\u02bc\u02bd\7\17\2\2\u02bd\u02bf\5\u0100\u0081\2\u02be\u02bc\3\2\2"+ + "\2\u02be\u02bf\3\2\2\2\u02bfg\3\2\2\2\u02c0\u02c1\7~\2\2\u02c1\u02c2\5"+ + "j\66\2\u02c2\u02c4\7\13\2\2\u02c3\u02c5\5\u0080A\2\u02c4\u02c3\3\2\2\2"+ + "\u02c4\u02c5\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u02c7\7\f\2\2\u02c7i\3"+ + "\2\2\2\u02c8\u02d1\7\u0085\2\2\u02c9\u02cb\7\23\2\2\u02ca\u02c9\3\2\2"+ + "\2\u02cb\u02cc\3\2\2\2\u02cc\u02ca\3\2\2\2\u02cc\u02cd\3\2\2\2\u02cd\u02ce"+ + "\3\2\2\2\u02ce\u02d0\7\u0085\2\2\u02cf\u02ca\3\2\2\2\u02d0\u02d3\3\2\2"+ + "\2\u02d1\u02cf\3\2\2\2\u02d1\u02d2\3\2\2\2\u02d2k\3\2\2\2\u02d3\u02d1"+ + "\3\2\2\2\u02d4\u02d5\7\u0085\2\2\u02d5\u02d6\7\17\2\2\u02d6\u02d7\5j\66"+ + "\2\u02d7\u02d8\7\r\2\2\u02d8\u02e1\3\2\2\2\u02d9\u02da\7\u0085\2\2\u02da"+ + "\u02db\7\17\2\2\u02db\u02dc\7\177\2\2\u02dc\u02dd\7\t\2\2\u02dd\u02de"+ + "\7\u0086\2\2\u02de\u02df\7\n\2\2\u02df\u02e1\7\r\2\2\u02e0\u02d4\3\2\2"+ + "\2\u02e0\u02d9\3\2\2\2\u02e1m\3\2\2\2\u02e2\u02e3\7\u0086\2\2\u02e3o\3"+ + "\2\2\2\u02e4\u02e6\5r:\2\u02e5\u02e4\3\2\2\2\u02e6\u02e7\3\2\2\2\u02e7"+ + "\u02e5\3\2\2\2\u02e7\u02e8\3\2\2\2\u02e8q\3\2\2\2\u02e9\u02ec\7\u0084"+ + "\2\2\u02ea\u02ed\5t;\2\u02eb\u02ed\5v<\2\u02ec\u02ea\3\2\2\2\u02ec\u02eb"+ + "\3\2\2\2\u02eds\3\2\2\2\u02ee\u02ef\b;\1\2\u02ef\u02f5\7\u0085\2\2\u02f0"+ + "\u02f1\7\t\2\2\u02f1\u02f2\5\u0100\u0081\2\u02f2\u02f3\7\n\2\2\u02f3\u02f5"+ + "\3\2\2\2\u02f4\u02ee\3\2\2\2\u02f4\u02f0\3\2\2\2\u02f5\u02fb\3\2\2\2\u02f6"+ + "\u02f7\f\4\2\2\u02f7\u02f8\7\23\2\2\u02f8\u02fa\5\u010e\u0088\2\u02f9"+ + "\u02f6\3\2\2\2\u02fa\u02fd\3\2\2\2\u02fb\u02f9\3\2\2\2\u02fb\u02fc\3\2"+ + "\2\2\u02fcu\3\2\2\2\u02fd\u02fb\3\2\2\2\u02fe\u02ff\5t;\2\u02ff\u0300"+ + "\5\u00f8}\2\u0300w\3\2\2\2\u0301\u0303\5\u00e6t\2\u0302\u0301\3\2\2\2"+ + "\u0302\u0303\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u0305\7\2\2\3\u0305y\3"+ + "\2\2\2\u0306\u0308\7i\2\2\u0307\u0306\3\2\2\2\u0307\u0308\3\2\2\2\u0308"+ + "\u0309\3\2\2\2\u0309\u030a\5|?\2\u030a{\3\2\2\2\u030b\u0329\5~@\2\u030c"+ + "\u0329\5\u008cG\2\u030d\u0329\5\u0084C\2\u030e\u0329\5\u008aF\2\u030f"+ + "\u0329\5\u0092J\2\u0310\u0329\5\u0082B\2\u0311\u0329\5\u00c0a\2\u0312"+ + "\u0329\5Z.\2\u0313\u0329\5h\65\2\u0314\u0329\5\u0096L\2\u0315\u0329\5"+ + "\u0098M\2\u0316\u0329\5\u009cO\2\u0317\u0329\5\u009eP\2\u0318\u0329\5"+ + "\u00a0Q\2\u0319\u0329\5\u00a2R\2\u031a\u0329\5\u00a4S\2\u031b\u0329\5"+ + "\u00b0Y\2\u031c\u0329\5\u00a6T\2\u031d\u0329\5\u00b2Z\2\u031e\u0329\5"+ + "\u00b4[\2\u031f\u0329\5\u00bc_\2\u0320\u0329\5\u00be`\2\u0321\u0329\5"+ + "\u0102\u0082\2\u0322\u0329\5\u00d4k\2\u0323\u0329\5V,\2\u0324\u0329\5"+ + "`\61\2\u0325\u0329\5\u0094K\2\u0326\u0327\7i\2\2\u0327\u0329\5|?\2\u0328"+ + "\u030b\3\2\2\2\u0328\u030c\3\2\2\2\u0328\u030d\3\2\2\2\u0328\u030e\3\2"+ + "\2\2\u0328\u030f\3\2\2\2\u0328\u0310\3\2\2\2\u0328\u0311\3\2\2\2\u0328"+ + "\u0312\3\2\2\2\u0328\u0313\3\2\2\2\u0328\u0314\3\2\2\2\u0328\u0315\3\2"+ + "\2\2\u0328\u0316\3\2\2\2\u0328\u0317\3\2\2\2\u0328\u0318\3\2\2\2\u0328"+ + "\u0319\3\2\2\2\u0328\u031a\3\2\2\2\u0328\u031b\3\2\2\2\u0328\u031c\3\2"+ + "\2\2\u0328\u031d\3\2\2\2\u0328\u031e\3\2\2\2\u0328\u031f\3\2\2\2\u0328"+ + "\u0320\3\2\2\2\u0328\u0321\3\2\2\2\u0328\u0322\3\2\2\2\u0328\u0323\3\2"+ + "\2\2\u0328\u0324\3\2\2\2\u0328\u0325\3\2\2\2\u0328\u0326\3\2\2\2\u0329"+ + "}\3\2\2\2\u032a\u032c\7\13\2\2\u032b\u032d\5\u0080A\2\u032c\u032b\3\2"+ + "\2\2\u032c\u032d\3\2\2\2\u032d\u032e\3\2\2\2\u032e\u032f\7\f\2\2\u032f"+ + "\177\3\2\2\2\u0330\u0332\5|?\2\u0331\u0330\3\2\2\2\u0332\u0333\3\2\2\2"+ + "\u0333\u0331\3\2\2\2\u0333\u0334\3\2\2\2\u0334\u0081\3\2\2\2\u0335\u0339"+ + "\7\u0082\2\2\u0336\u0337\7\u0085\2\2\u0337\u033a\5> \2\u0338\u033a\5\u008c"+ + "G\2\u0339\u0336\3\2\2\2\u0339\u0338\3\2\2\2\u033a\u033b\3\2\2\2\u033b"+ + "\u033c\5\u0118\u008d\2\u033c\u0083\3\2\2\2\u033d\u0341\7j\2\2\u033e\u0342"+ + "\5\u0086D\2\u033f\u0342\5l\67\2\u0340\u0342\5n8\2\u0341\u033e\3\2\2\2"+ + "\u0341\u033f\3\2\2\2\u0341\u0340\3\2\2\2\u0342\u0343\3\2\2\2\u0343\u0344"+ + "\5\u0118\u008d\2\u0344\u0085\3\2\2\2\u0345\u034b\7\34\2\2\u0346\u034b"+ + "\7\33\2\2\u0347\u034b\7\32\2\2\u0348\u034b\5\u0088E\2\u0349\u034b\5\u010e"+ + "\u0088\2\u034a\u0345\3\2\2\2\u034a\u0346\3\2\2\2\u034a\u0347\3\2\2\2\u034a"+ + "\u0348\3\2\2\2\u034a\u0349\3\2\2\2\u034b\u034e\3\2\2\2\u034c\u034d\7`"+ + "\2\2\u034d\u034f\5\u010e\u0088\2\u034e\u034c\3\2\2\2\u034e\u034f\3\2\2"+ + "\2\u034f\u0350\3\2\2\2\u0350\u0351\7a\2\2\u0351\u0352\7\u0086\2\2\u0352"+ + "\u0087\3\2\2\2\u0353\u0354\5\u010e\u0088\2\u0354\u0355\7\16\2\2\u0355"+ + "\u0357\3\2\2\2\u0356\u0353\3\2\2\2\u0356\u0357\3\2\2\2\u0357\u0358\3\2"+ + "\2\2\u0358\u0359\7\13\2\2\u0359\u035e\5\u010e\u0088\2\u035a\u035b\7\16"+ + "\2\2\u035b\u035d\5\u010e\u0088\2\u035c\u035a\3\2\2\2\u035d\u0360\3\2\2"+ + "\2\u035e\u035c\3\2\2\2\u035e\u035f\3\2\2\2\u035f\u0361\3\2\2\2\u0360\u035e"+ + "\3\2\2\2\u0361\u0362\7\f\2\2\u0362\u0089\3\2\2\2\u0363\u0365\7i\2\2\u0364"+ + "\u0366\7Z\2\2\u0365\u0364\3\2\2\2\u0365\u0366\3\2\2\2\u0366\u0369\3\2"+ + "\2\2\u0367\u036a\5\u0086D\2\u0368\u036a\5|?\2\u0369\u0367\3\2\2\2\u0369"+ + "\u0368\3\2\2\2\u036a\u008b\3\2\2\2\u036b\u036d\5\4\3\2\u036c\u036e\5<"+ + "\37\2\u036d\u036c\3\2\2\2\u036d\u036e\3\2\2\2\u036e\u036f\3\2\2\2\u036f"+ + "\u0371\5\2\2\2\u0370\u0372\7\r\2\2\u0371\u0370\3\2\2\2\u0371\u0372\3\2"+ + "\2\2\u0372\u0381\3\2\2\2\u0373\u0375\5F$\2\u0374\u0373\3\2\2\2\u0374\u0375"+ + "\3\2\2\2\u0375\u0377\3\2\2\2\u0376\u0378\5\u009aN\2\u0377\u0376\3\2\2"+ + "\2\u0377\u0378\3\2\2\2\u0378\u037a\3\2\2\2\u0379\u037b\7b\2\2\u037a\u0379"+ + "\3\2\2\2\u037a\u037b\3\2\2\2\u037b\u037c\3\2\2\2\u037c\u037e\5\u008eH"+ + "\2\u037d\u037f\7\r\2\2\u037e\u037d\3\2\2\2\u037e\u037f\3\2\2\2\u037f\u0381"+ + "\3\2\2\2\u0380\u036b\3\2\2\2\u0380\u0374\3\2\2\2\u0381\u008d\3\2\2\2\u0382"+ + "\u0387\5\u0090I\2\u0383\u0384\7\16\2\2\u0384\u0386\5\u0090I\2\u0385\u0383"+ + "\3\2\2\2\u0386\u0389\3\2\2\2\u0387\u0385\3\2\2\2\u0387\u0388\3\2\2\2\u0388"+ + "\u008f\3\2\2\2\u0389\u0387\3\2\2\2\u038a\u038c\5\u00b8]\2\u038b\u038d"+ + "\5<\37\2\u038c\u038b\3\2\2\2\u038c\u038d\3\2\2\2\u038d\u038f\3\2\2\2\u038e"+ + "\u0390\5\u0100\u0081\2\u038f\u038e\3\2\2\2\u038f\u0390\3\2\2\2\u0390\u0396"+ + "\3\2\2\2\u0391\u0393\7\17\2\2\u0392\u0394\5\6\4\2\u0393\u0392\3\2\2\2"+ + "\u0393\u0394\3\2\2\2\u0394\u0395\3\2\2\2\u0395\u0397\5\u0100\u0081\2\u0396"+ + "\u0391\3\2\2\2\u0396\u0397\3\2\2\2\u0397\u0091\3\2\2\2\u0398\u0399\7\r"+ + "\2\2\u0399\u0093\3\2\2\2\u039a\u039b\6K\b\2\u039b\u039d\5\u00fc\177\2"+ + "\u039c\u039e\7\r\2\2\u039d\u039c\3\2\2\2\u039d\u039e\3\2\2\2\u039e\u0095"+ + "\3\2\2\2\u039f\u03a0\7[\2\2\u03a0\u03a1\7\t\2\2\u03a1\u03a2\5\u00fc\177"+ + "\2\u03a2\u03a3\7\n\2\2\u03a3\u03a6\5|?\2\u03a4\u03a5\7K\2\2\u03a5\u03a7"+ + "\5|?\2\u03a6\u03a4\3\2\2\2\u03a6\u03a7\3\2\2\2\u03a7\u0097\3\2\2\2\u03a8"+ + "\u03a9\7G\2\2\u03a9\u03aa\5|?\2\u03aa\u03ab\7U\2\2\u03ab\u03ac\7\t\2\2"+ + "\u03ac\u03ad\5\u00fc\177\2\u03ad\u03ae\7\n\2\2\u03ae\u03af\5\u0118\u008d"+ + "\2\u03af\u03f4\3\2\2\2\u03b0\u03b1\7U\2\2\u03b1\u03b2\7\t\2\2\u03b2\u03b3"+ + "\5\u00fc\177\2\u03b3\u03b4\7\n\2\2\u03b4\u03b5\5|?\2\u03b5\u03f4\3\2\2"+ + "\2\u03b6\u03b7\7S\2\2\u03b7\u03b9\7\t\2\2\u03b8\u03ba\5\u00fc\177\2\u03b9"+ + "\u03b8\3\2\2\2\u03b9\u03ba\3\2\2\2\u03ba\u03bb\3\2\2\2\u03bb\u03bd\7\r"+ + "\2\2\u03bc\u03be\5\u00fc\177\2\u03bd\u03bc\3\2\2\2\u03bd\u03be\3\2\2\2"+ + "\u03be\u03bf\3\2\2\2\u03bf\u03c1\7\r\2\2\u03c0\u03c2\5\u00fc\177\2\u03c1"+ + "\u03c0\3\2\2\2\u03c1\u03c2\3\2\2\2\u03c2\u03c3\3\2\2\2\u03c3\u03c4\7\n"+ + "\2\2\u03c4\u03f4\5|?\2\u03c5\u03c6\7S\2\2\u03c6\u03c7\7\t\2\2\u03c7\u03c8"+ + "\5\u009aN\2\u03c8\u03c9\5\u008eH\2\u03c9\u03cb\7\r\2\2\u03ca\u03cc\5\u00fc"+ + "\177\2\u03cb\u03ca\3\2\2\2\u03cb\u03cc\3\2\2\2\u03cc\u03cd\3\2\2\2\u03cd"+ + "\u03cf\7\r\2\2\u03ce\u03d0\5\u00fc\177\2\u03cf\u03ce\3\2\2\2\u03cf\u03d0"+ + "\3\2\2\2\u03d0\u03d1\3\2\2\2\u03d1\u03d2\7\n\2\2\u03d2\u03d3\5|?\2\u03d3"+ + "\u03f4\3\2\2\2\u03d4\u03d6\7S\2\2\u03d5\u03d7\7k\2\2\u03d6\u03d5\3\2\2"+ + "\2\u03d6\u03d7\3\2\2\2\u03d7\u03d8\3\2\2\2\u03d8\u03d9\7\t\2\2\u03d9\u03dd"+ + "\5\u0100\u0081\2\u03da\u03de\7^\2\2\u03db\u03dc\7\u0085\2\2\u03dc\u03de"+ + "\6M\t\2\u03dd\u03da\3\2\2\2\u03dd\u03db\3\2\2\2\u03de\u03df\3\2\2\2\u03df"+ + "\u03e0\5\u00fc\177\2\u03e0\u03e1\7\n\2\2\u03e1\u03e2\5|?\2\u03e2\u03f4"+ + "\3\2\2\2\u03e3\u03e5\7S\2\2\u03e4\u03e6\7k\2\2\u03e5\u03e4\3\2\2\2\u03e5"+ + "\u03e6\3\2\2\2\u03e6\u03e7\3\2\2\2\u03e7\u03e8\7\t\2\2\u03e8\u03e9\5\u009a"+ + "N\2\u03e9\u03ed\5\u0090I\2\u03ea\u03ee\7^\2\2\u03eb\u03ec\7\u0085\2\2"+ + "\u03ec\u03ee\6M\n\2\u03ed\u03ea\3\2\2\2\u03ed\u03eb\3\2\2\2\u03ee\u03ef"+ + "\3\2\2\2\u03ef\u03f0\5\u00fc\177\2\u03f0\u03f1\7\n\2\2\u03f1\u03f2\5|"+ + "?\2\u03f2\u03f4\3\2\2\2\u03f3\u03a8\3\2\2\2\u03f3\u03b0\3\2\2\2\u03f3"+ + "\u03b6\3\2\2\2\u03f3\u03c5\3\2\2\2\u03f3\u03d4\3\2\2\2\u03f3\u03e3\3\2"+ + "\2\2\u03f4\u0099\3\2\2\2\u03f5\u03f6\t\6\2\2\u03f6\u009b\3\2\2\2\u03f7"+ + "\u03fa\7R\2\2\u03f8\u03f9\6O\13\2\u03f9\u03fb\7\u0085\2\2\u03fa\u03f8"+ + "\3\2\2\2\u03fa\u03fb\3\2\2\2\u03fb\u03fc\3\2\2\2\u03fc\u03fd\5\u0118\u008d"+ + "\2\u03fd\u009d\3\2\2\2\u03fe\u0401\7F\2\2\u03ff\u0400\6P\f\2\u0400\u0402"+ + "\7\u0085\2\2\u0401\u03ff\3\2\2\2\u0401\u0402\3\2\2\2\u0402\u0403\3\2\2"+ + "\2\u0403\u0404\5\u0118\u008d\2\u0404\u009f\3\2\2\2\u0405\u0408\7P\2\2"+ + "\u0406\u0407\6Q\r\2\u0407\u0409\5\u00fc\177\2\u0408\u0406\3\2\2\2\u0408"+ + "\u0409\3\2\2\2\u0409\u040a\3\2\2\2\u040a\u040b\5\u0118\u008d\2\u040b\u00a1"+ + "\3\2\2\2\u040c\u040f\7t\2\2\u040d\u040e\6R\16\2\u040e\u0410\5\u00fc\177"+ + "\2\u040f\u040d\3\2\2\2\u040f\u0410\3\2\2\2\u0410\u0411\3\2\2\2\u0411\u0412"+ + "\5\u0118\u008d\2\u0412\u00a3\3\2\2\2\u0413\u0414\7Y\2\2\u0414\u0415\7"+ + "\t\2\2\u0415\u0416\5\u00fc\177\2\u0416\u0417\7\n\2\2\u0417\u0418\5|?\2"+ + "\u0418\u00a5\3\2\2\2\u0419\u041a\7T\2\2\u041a\u041b\7\t\2\2\u041b\u041c"+ + "\5\u00fc\177\2\u041c\u041d\7\n\2\2\u041d\u041e\5\u00a8U\2\u041e\u00a7"+ + "\3\2\2\2\u041f\u0421\7\13\2\2\u0420\u0422\5\u00aaV\2\u0421\u0420\3\2\2"+ + "\2\u0421\u0422\3\2\2\2\u0422\u0427\3\2\2\2\u0423\u0425\5\u00aeX\2\u0424"+ + "\u0426\5\u00aaV\2\u0425\u0424\3\2\2\2\u0425\u0426\3\2\2\2\u0426\u0428"+ + "\3\2\2\2\u0427\u0423\3\2\2\2\u0427\u0428\3\2\2\2\u0428\u0429\3\2\2\2\u0429"+ + "\u042a\7\f\2\2\u042a\u00a9\3\2\2\2\u042b\u042d\5\u00acW\2\u042c\u042b"+ + "\3\2\2\2\u042d\u042e\3\2\2\2\u042e\u042c\3\2\2\2\u042e\u042f\3\2\2\2\u042f"+ + "\u00ab\3\2\2\2\u0430\u0431\7J\2\2\u0431\u0432\5\u00fc\177\2\u0432\u0434"+ + "\7\21\2\2\u0433\u0435\5\u0080A\2\u0434\u0433\3\2\2\2\u0434\u0435\3\2\2"+ + "\2\u0435\u00ad\3\2\2\2\u0436\u0437\7Z\2\2\u0437\u0439\7\21\2\2\u0438\u043a"+ + "\5\u0080A\2\u0439\u0438\3\2\2\2\u0439\u043a\3\2\2\2\u043a\u00af\3\2\2"+ + "\2\u043b\u043c\7\u0085\2\2\u043c\u043d\7\21\2\2\u043d\u043e\5|?\2\u043e"+ + "\u00b1\3\2\2\2\u043f\u0440\7\\\2\2\u0440\u0441\6Z\17\2\u0441\u0442\5\u00fc"+ + "\177\2\u0442\u0443\5\u0118\u008d\2\u0443\u00b3\3\2\2\2\u0444\u0445\7_"+ + "\2\2\u0445\u044b\5~@\2\u0446\u0448\5\u00b6\\\2\u0447\u0449\5\u00ba^\2"+ + "\u0448\u0447\3\2\2\2\u0448\u0449\3\2\2\2\u0449\u044c\3\2\2\2\u044a\u044c"+ + "\5\u00ba^\2\u044b\u0446\3\2\2\2\u044b\u044a\3\2\2\2\u044c\u00b5\3\2\2"+ + "\2\u044d\u0453\7N\2\2\u044e\u0450\7\t\2\2\u044f\u0451\5\u00b8]\2\u0450"+ + "\u044f\3\2\2\2\u0450\u0451\3\2\2\2\u0451\u0452\3\2\2\2\u0452\u0454\7\n"+ + "\2\2\u0453\u044e\3\2\2\2\u0453\u0454\3\2\2\2\u0454\u0455\3\2\2\2\u0455"+ + "\u0456\5~@\2\u0456\u00b7\3\2\2\2\u0457\u045b\7\u0085\2\2\u0458\u045b\5"+ + "\u00e8u\2\u0459\u045b\5\u00eex\2\u045a\u0457\3\2\2\2\u045a\u0458\3\2\2"+ + "\2\u045a\u0459\3\2\2\2\u045b\u00b9\3\2\2\2\u045c\u045d\7O\2\2\u045d\u045e"+ + "\5~@\2\u045e\u00bb\3\2\2\2\u045f\u0460\7V\2\2\u0460\u0461\5\u0118\u008d"+ + "\2\u0461\u00bd\3\2\2\2\u0462\u0464\7c\2\2\u0463\u0462\3\2\2\2\u0463\u0464"+ + "\3\2\2\2\u0464\u0465\3\2\2\2\u0465\u0467\7W\2\2\u0466\u0468\7\32\2\2\u0467"+ + "\u0466\3\2\2\2\u0467\u0468\3\2\2\2\u0468\u0469\3\2\2\2\u0469\u046a\7\u0085"+ + "\2\2\u046a\u0470\5> \2\u046b\u046c\7\13\2\2\u046c\u046d\5\u00e4s\2\u046d"+ + "\u046e\7\f\2\2\u046e\u0471\3\2\2\2\u046f\u0471\7\r\2\2\u0470\u046b\3\2"+ + "\2\2\u0470\u046f\3\2\2\2\u0471\u00bf\3\2\2\2\u0472\u0474\7\u0082\2\2\u0473"+ + "\u0472\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0475\3\2\2\2\u0475\u0476\7d"+ + "\2\2\u0476\u0478\7\u0085\2\2\u0477\u0479\5\6\4\2\u0478\u0477\3\2\2\2\u0478"+ + "\u0479\3\2\2\2\u0479\u047a\3\2\2\2\u047a\u047b\5\u00c2b\2\u047b\u047c"+ + "\5\u00c4c\2\u047c\u00c1\3\2\2\2\u047d\u047f\5\u00c6d\2\u047e\u047d\3\2"+ + "\2\2\u047e\u047f\3\2\2\2\u047f\u0481\3\2\2\2\u0480\u0482\5\u00c8e\2\u0481"+ + "\u0480\3\2\2\2\u0481\u0482\3\2\2\2\u0482\u00c3\3\2\2\2\u0483\u0487\7\13"+ + "\2\2\u0484\u0486\5\u00caf\2\u0485\u0484\3\2\2\2\u0486\u0489\3\2\2\2\u0487"+ + "\u0485\3\2\2\2\u0487\u0488\3\2\2\2\u0488\u048a\3\2\2\2\u0489\u0487\3\2"+ + "\2\2\u048a\u048b\7\f\2\2\u048b\u00c5\3\2\2\2\u048c\u048d\7f\2\2\u048d"+ + "\u048e\5\34\17\2\u048e\u00c7\3\2\2\2\u048f\u0490\7l\2\2\u0490\u0491\5"+ + "^\60\2\u0491\u00c9\3\2\2\2\u0492\u0497\5X-\2\u0493\u0497\5\u00ccg\2\u0494"+ + "\u0497\5\u00d0i\2\u0495\u0497\5|?\2\u0496\u0492\3\2\2\2\u0496\u0493\3"+ + "\2\2\2\u0496\u0494\3\2\2\2\u0496\u0495\3\2\2\2\u0497\u00cb\3\2\2\2\u0498"+ + "\u049a\5\u00ceh\2\u0499\u049b\7\32\2\2\u049a\u0499\3\2\2\2\u049a\u049b"+ + "\3\2\2\2\u049b\u049d\3\2\2\2\u049c\u049e\7!\2\2\u049d\u049c\3\2\2\2\u049d"+ + "\u049e\3\2\2\2\u049e\u049f\3\2\2\2\u049f\u04a1\5\u00f6|\2\u04a0\u04a2"+ + "\5<\37\2\u04a1\u04a0\3\2\2\2\u04a1\u04a2\3\2\2\2\u04a2\u04a4\3\2\2\2\u04a3"+ + "\u04a5\5\2\2\2\u04a4\u04a3\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5\u04a6\3\2"+ + "\2\2\u04a6\u04a7\7\r\2\2\u04a7\u04c5\3\2\2\2\u04a8\u04aa\5\u00ceh\2\u04a9"+ + "\u04ab\7\32\2\2\u04aa\u04a9\3\2\2\2\u04aa\u04ab\3\2\2\2\u04ab\u04ad\3"+ + "\2\2\2\u04ac\u04ae\7!\2\2\u04ad\u04ac\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae"+ + "\u04af\3\2\2\2\u04af\u04b0\5\u00f6|\2\u04b0\u04b6\5> \2\u04b1\u04b2\7"+ + "\13\2\2\u04b2\u04b3\5\u00e4s\2\u04b3\u04b4\7\f\2\2\u04b4\u04b7\3\2\2\2"+ + "\u04b5\u04b7\7\r\2\2\u04b6\u04b1\3\2\2\2\u04b6\u04b5\3\2\2\2\u04b7\u04c5"+ + "\3\2\2\2\u04b8\u04ba\5\u00ceh\2\u04b9\u04bb\7\32\2\2\u04ba\u04b9\3\2\2"+ + "\2\u04ba\u04bb\3\2\2\2\u04bb\u04bd\3\2\2\2\u04bc\u04be\7!\2\2\u04bd\u04bc"+ + "\3\2\2\2\u04bd\u04be\3\2\2\2\u04be\u04c1\3\2\2\2\u04bf\u04c2\5\u00f2z"+ + "\2\u04c0\u04c2\5\u00f4{\2\u04c1\u04bf\3\2\2\2\u04c1\u04c0\3\2\2\2\u04c2"+ + "\u04c5\3\2\2\2\u04c3\u04c5\5\u0082B\2\u04c4\u0498\3\2\2\2\u04c4\u04a8"+ + "\3\2\2\2\u04c4\u04b8\3\2\2\2\u04c4\u04c3\3\2\2\2\u04c5\u00cd\3\2\2\2\u04c6"+ + "\u04c8\7c\2\2\u04c7\u04c6\3\2\2\2\u04c7\u04c8\3\2\2\2\u04c8\u04ca\3\2"+ + "\2\2\u04c9\u04cb\5F$\2\u04ca\u04c9\3\2\2\2\u04ca\u04cb\3\2\2\2\u04cb\u04cd"+ + "\3\2\2\2\u04cc\u04ce\7s\2\2\u04cd\u04cc\3\2\2\2\u04cd\u04ce\3\2\2\2\u04ce"+ + "\u04d0\3\2\2\2\u04cf\u04d1\7b\2\2\u04d0\u04cf\3\2\2\2\u04d0\u04d1\3\2"+ + "\2\2\u04d1\u00cf\3\2\2\2\u04d2\u04d3\5R*\2\u04d3\u04d4\7\r\2\2\u04d4\u00d1"+ + "\3\2\2\2\u04d5\u04d7\7\32\2\2\u04d6\u04d5\3\2\2\2\u04d6\u04d7\3\2\2\2"+ + "\u04d7\u04d8\3\2\2\2\u04d8\u04d9\7\u0085\2\2\u04d9\u04db\7\t\2\2\u04da"+ + "\u04dc\5\u00dep\2\u04db\u04da\3\2\2\2\u04db\u04dc\3\2\2\2\u04dc\u04dd"+ + "\3\2\2\2\u04dd\u04de\7\n\2\2\u04de\u04df\7\13\2\2\u04df\u04e0\5\u00e4"+ + "s\2\u04e0\u04e1\7\f\2\2\u04e1\u00d3\3\2\2\2\u04e2\u04e3\7W\2\2\u04e3\u04e5"+ + "\7\32\2\2\u04e4\u04e6\7\u0085\2\2\u04e5\u04e4\3\2\2\2\u04e5\u04e6\3\2"+ + "\2\2\u04e6\u04e7\3\2\2\2\u04e7\u04e9\7\t\2\2\u04e8\u04ea\5\u00dep\2\u04e9"+ + "\u04e8\3\2\2\2\u04e9\u04ea\3\2\2\2\u04ea\u04eb\3\2\2\2\u04eb\u04ec\7\n"+ + "\2\2\u04ec\u04ed\7\13\2\2\u04ed\u04ee\5\u00e4s\2\u04ee\u04ef\7\f\2\2\u04ef"+ + "\u00d5\3\2\2\2\u04f0\u04f1\7\13\2\2\u04f1\u04f6\5\u00d8m\2\u04f2\u04f3"+ + "\7\16\2\2\u04f3\u04f5\5\u00d8m\2\u04f4\u04f2\3\2\2\2\u04f5\u04f8\3\2\2"+ + "\2\u04f6\u04f4\3\2\2\2\u04f6\u04f7\3\2\2\2\u04f7\u04fa\3\2\2\2\u04f8\u04f6"+ + "\3\2\2\2\u04f9\u04fb\7\16\2\2\u04fa\u04f9\3\2\2\2\u04fa\u04fb\3\2\2\2"+ + "\u04fb\u04fc\3\2\2\2\u04fc\u04fd\7\f\2\2\u04fd\u00d7\3\2\2\2\u04fe\u04ff"+ + "\7\32\2\2\u04ff\u0500\5\u00dco\2\u0500\u00d9\3\2\2\2\u0501\u0502\7\13"+ + "\2\2\u0502\u0507\5\u00dco\2\u0503\u0504\7\16\2\2\u0504\u0506\5\u00dco"+ + "\2\u0505\u0503\3\2\2\2\u0506\u0509\3\2\2\2\u0507\u0505\3\2\2\2\u0507\u0508"+ + "\3\2\2\2\u0508\u050b\3\2\2\2\u0509\u0507\3\2\2\2\u050a\u050c\7\16\2\2"+ + "\u050b\u050a\3\2\2\2\u050b\u050c\3\2\2\2\u050c\u050d\3\2\2\2\u050d\u050e"+ + "\7\f\2\2\u050e\u00db\3\2\2\2\u050f\u0510\7\7\2\2\u0510\u0511\5\u0100\u0081"+ + "\2\u0511\u0512\7\b\2\2\u0512\u0514\7\t\2\2\u0513\u0515\5\u00dep\2\u0514"+ + "\u0513\3\2\2\2\u0514\u0515\3\2\2\2\u0515\u0516\3\2\2\2\u0516\u0517\7\n"+ + "\2\2\u0517\u0518\7\13\2\2\u0518\u0519\5\u00e4s\2\u0519\u051a\7\f\2\2\u051a"+ + "\u00dd\3\2\2\2\u051b\u0520\5\u00e0q\2\u051c\u051d\7\16\2\2\u051d\u051f"+ + "\5\u00e0q\2\u051e\u051c\3\2\2\2\u051f\u0522\3\2\2\2\u0520\u051e\3\2\2"+ + "\2\u0520\u0521\3\2\2\2\u0521\u0525\3\2\2\2\u0522\u0520\3\2\2\2\u0523\u0524"+ + "\7\16\2\2\u0524\u0526\5\u00e2r\2\u0525\u0523\3\2\2\2\u0525\u0526\3\2\2"+ + "\2\u0526\u052f\3\2\2\2\u0527\u052f\5\u00e2r\2\u0528\u052f\5\u00e8u\2\u0529"+ + "\u052c\5\u00eex\2\u052a\u052b\7\21\2\2\u052b\u052d\5\u00dep\2\u052c\u052a"+ + "\3\2\2\2\u052c\u052d\3\2\2\2\u052d\u052f\3\2\2\2\u052e\u051b\3\2\2\2\u052e"+ + "\u0527\3\2\2\2\u052e\u0528\3\2\2\2\u052e\u0529\3\2\2\2\u052f\u00df\3\2"+ + "\2\2\u0530\u0532\5F$\2\u0531\u0530\3\2\2\2\u0531\u0532\3\2\2\2\u0532\u0533"+ + "\3\2\2\2\u0533\u0535\7\u0085\2\2\u0534\u0536\5<\37\2\u0535\u0534\3\2\2"+ + "\2\u0535\u0536\3\2\2\2\u0536\u0539\3\2\2\2\u0537\u0538\7\17\2\2\u0538"+ + "\u053a\5\u0100\u0081\2\u0539\u0537\3\2\2\2\u0539\u053a\3\2\2\2\u053a\u00e1"+ + "\3\2\2\2\u053b\u053c\7\22\2\2\u053c\u053d\7\u0085\2\2\u053d\u00e3\3\2"+ + "\2\2\u053e\u0540\5\u00e6t\2\u053f\u053e\3\2\2\2\u053f\u0540\3\2\2\2\u0540"+ + "\u00e5\3\2\2\2\u0541\u0543\5z>\2\u0542\u0541\3\2\2\2\u0543\u0544\3\2\2"+ + "\2\u0544\u0542\3\2\2\2\u0544\u0545\3\2\2\2\u0545\u00e7\3\2\2\2\u0546\u0548"+ + "\7\7\2\2\u0547\u0549\5\u00eav\2\u0548\u0547\3\2\2\2\u0548\u0549\3\2\2"+ + "\2\u0549\u054a\3\2\2\2\u054a\u054b\7\b\2\2\u054b\u00e9\3\2\2\2\u054c\u0555"+ + "\5\u0100\u0081\2\u054d\u054f\7\16\2\2\u054e\u054d\3\2\2\2\u054f\u0550"+ + "\3\2\2\2\u0550\u054e\3\2\2\2\u0550\u0551\3\2\2\2\u0551\u0552\3\2\2\2\u0552"+ + "\u0554\5\u0100\u0081\2\u0553\u054e\3\2\2\2\u0554\u0557\3\2\2\2\u0555\u0553"+ + "\3\2\2\2\u0555\u0556\3\2\2\2\u0556\u055e\3\2\2\2\u0557\u0555\3\2\2\2\u0558"+ + "\u055a\7\16\2\2\u0559\u0558\3\2\2\2\u055a\u055b\3\2\2\2\u055b\u0559\3"+ + "\2\2\2\u055b\u055c\3\2\2\2\u055c\u055d\3\2\2\2\u055d\u055f\5\u00ecw\2"+ + "\u055e\u0559\3\2\2\2\u055e\u055f\3\2\2\2\u055f\u0562\3\2\2\2\u0560\u0562"+ + "\5\u00ecw\2\u0561\u054c\3\2\2\2\u0561\u0560\3\2\2\2\u0562\u00eb\3\2\2"+ + "\2\u0563\u0566\7\22\2\2\u0564\u0567\7\u0085\2\2\u0565\u0567\5\u0100\u0081"+ + "\2\u0566\u0564\3\2\2\2\u0566\u0565\3\2\2\2\u0567\u00ed\3\2\2\2\u0568\u0571"+ + "\7\13\2\2\u0569\u056e\5\u00f0y\2\u056a\u056b\7\16\2\2\u056b\u056d\5\u00f0"+ + "y\2\u056c\u056a\3\2\2\2\u056d\u0570\3\2\2\2\u056e\u056c\3\2\2\2\u056e"+ + "\u056f\3\2\2\2\u056f\u0572\3\2\2\2\u0570\u056e\3\2\2\2\u0571\u0569\3\2"+ + "\2\2\u0571\u0572\3\2\2\2\u0572\u0574\3\2\2\2\u0573\u0575\7\16\2\2\u0574"+ + "\u0573\3\2\2\2\u0574\u0575\3\2\2\2\u0575\u0576\3\2\2\2\u0576\u0577\7\f"+ + "\2\2\u0577\u00ef\3\2\2\2\u0578\u0579\5\u00f6|\2\u0579\u057a\t\7\2\2\u057a"+ + "\u057b\5\u0100\u0081\2\u057b\u0598\3\2\2\2\u057c\u057d\7\7\2\2\u057d\u057e"+ + "\5\u0100\u0081\2\u057e\u057f\7\b\2\2\u057f\u0580\7\21\2\2\u0580\u0581"+ + "\5\u0100\u0081\2\u0581\u0598\3\2\2\2\u0582\u0584\7c\2\2\u0583\u0582\3"+ + "\2\2\2\u0583\u0584\3\2\2\2\u0584\u0586\3\2\2\2\u0585\u0587\7\32\2\2\u0586"+ + "\u0585\3\2\2\2\u0586\u0587\3\2\2\2\u0587\u0588\3\2\2\2\u0588\u0589\5\u00f6"+ + "|\2\u0589\u058b\7\t\2\2\u058a\u058c\5\u00dep\2\u058b\u058a\3\2\2\2\u058b"+ + "\u058c\3\2\2\2\u058c\u058d\3\2\2\2\u058d\u058e\7\n\2\2\u058e\u058f\7\13"+ + "\2\2\u058f\u0590\5\u00e4s\2\u0590\u0591\7\f\2\2\u0591\u0598\3\2\2\2\u0592"+ + "\u0598\5\u00f2z\2\u0593\u0598\5\u00f4{\2\u0594\u0598\5\u00d2j\2\u0595"+ + "\u0598\7\u0085\2\2\u0596\u0598\5N(\2\u0597\u0578\3\2\2\2\u0597\u057c\3"+ + "\2\2\2\u0597\u0583\3\2\2\2\u0597\u0592\3\2\2\2\u0597\u0593\3\2\2\2\u0597"+ + "\u0594\3\2\2\2\u0597\u0595\3\2\2\2\u0597\u0596\3\2\2\2\u0598\u00f1\3\2"+ + "\2\2\u0599\u059a\5\u0114\u008b\2\u059a\u059b\7\t\2\2\u059b\u059d\7\n\2"+ + "\2\u059c\u059e\5<\37\2\u059d\u059c\3\2\2\2\u059d\u059e\3\2\2\2\u059e\u059f"+ + "\3\2\2\2\u059f\u05a0\7\13\2\2\u05a0\u05a1\5\u00e4s\2\u05a1\u05a2\7\f\2"+ + "\2\u05a2\u00f3\3\2\2\2\u05a3\u05a4\5\u0116\u008c\2\u05a4\u05a7\7\t\2\2"+ + "\u05a5\u05a8\7\u0085\2\2\u05a6\u05a8\5\4\3\2\u05a7\u05a5\3\2\2\2\u05a7"+ + "\u05a6\3\2\2\2\u05a8\u05aa\3\2\2\2\u05a9\u05ab\5<\37\2\u05aa\u05a9\3\2"+ + "\2\2\u05aa\u05ab\3\2\2\2\u05ab\u05ac\3\2\2\2\u05ac\u05ad\7\n\2\2\u05ad"+ + "\u05ae\7\13\2\2\u05ae\u05af\5\u00e4s\2\u05af\u05b0\7\f\2\2\u05b0\u00f5"+ + "\3\2\2\2\u05b1\u05b9\5\u010e\u0088\2\u05b2\u05b9\7\u0086\2\2\u05b3\u05b9"+ + "\5\u010c\u0087\2\u05b4\u05b5\7\7\2\2\u05b5\u05b6\5\u0100\u0081\2\u05b6"+ + "\u05b7\7\b\2\2\u05b7\u05b9\3\2\2\2\u05b8\u05b1\3\2\2\2\u05b8\u05b2\3\2"+ + "\2\2\u05b8\u05b3\3\2\2\2\u05b8\u05b4\3\2\2\2\u05b9\u00f7\3\2\2\2\u05ba"+ + "\u05c8\7\t\2\2\u05bb\u05c0\5\u0100\u0081\2\u05bc\u05bd\7\16\2\2\u05bd"+ + "\u05bf\5\u0100\u0081\2\u05be\u05bc\3\2\2\2\u05bf\u05c2\3\2\2\2\u05c0\u05be"+ + "\3\2\2\2\u05c0\u05c1\3\2\2\2\u05c1\u05c5\3\2\2\2\u05c2\u05c0\3\2\2\2\u05c3"+ + "\u05c4\7\16\2\2\u05c4\u05c6\5\u00fa~\2\u05c5\u05c3\3\2\2\2\u05c5\u05c6"+ + "\3\2\2\2\u05c6\u05c9\3\2\2\2\u05c7\u05c9\5\u00fa~\2\u05c8\u05bb\3\2\2"+ + "\2\u05c8\u05c7\3\2\2\2\u05c8\u05c9\3\2\2\2\u05c9\u05ca\3\2\2\2\u05ca\u05cb"+ + "\7\n\2\2\u05cb\u00f9\3\2\2\2\u05cc\u05cd\7\22\2\2\u05cd\u05ce\7\u0085"+ + "\2\2\u05ce\u00fb\3\2\2\2\u05cf\u05d4\5\u0100\u0081\2\u05d0\u05d1\7\16"+ + "\2\2\u05d1\u05d3\5\u0100\u0081\2\u05d2\u05d0\3\2\2\2\u05d3\u05d6\3\2\2"+ + "\2\u05d4\u05d2\3\2\2\2\u05d4\u05d5\3\2\2\2\u05d5\u05d8\3\2\2\2\u05d6\u05d4"+ + "\3\2\2\2\u05d7\u05d9\7\16\2\2\u05d8\u05d7\3\2\2\2\u05d8\u05d9\3\2\2\2"+ + "\u05d9\u00fd\3\2\2\2\u05da\u05dc\7c\2\2\u05db\u05da\3\2\2\2\u05db\u05dc"+ + "\3\2\2\2\u05dc\u05dd\3\2\2\2\u05dd\u05df\7W\2\2\u05de\u05e0\7\u0085\2"+ + "\2\u05df\u05de\3\2\2\2\u05df\u05e0\3\2\2\2\u05e0\u05e1\3\2\2\2\u05e1\u05e3"+ + "\7\t\2\2\u05e2\u05e4\5\u00dep\2\u05e3\u05e2\3\2\2\2\u05e3\u05e4\3\2\2"+ + "\2\u05e4\u05e5\3\2\2\2\u05e5\u05e7\7\n\2\2\u05e6\u05e8\5<\37\2\u05e7\u05e6"+ + "\3\2\2\2\u05e7\u05e8\3\2\2\2\u05e8\u05e9\3\2\2\2\u05e9\u05ea\7\13\2\2"+ + "\u05ea\u05eb\5\u00e4s\2\u05eb\u05ec\7\f\2\2\u05ec\u00ff\3\2\2\2\u05ed"+ + "\u05ee\b\u0081\1\2\u05ee\u0627\5\u00fe\u0080\2\u05ef\u0627\5\u0102\u0082"+ + "\2\u05f0\u05f2\7d\2\2\u05f1\u05f3\7\u0085\2\2\u05f2\u05f1\3\2\2\2\u05f2"+ + "\u05f3\3\2\2\2\u05f3\u05f4\3\2\2\2\u05f4\u0627\5\u00c4c\2\u05f5\u05f6"+ + "\7L\2\2\u05f6\u05f8\5\u0100\u0081\2\u05f7\u05f9\5\16\b\2\u05f8\u05f7\3"+ + "\2\2\2\u05f8\u05f9\3\2\2\2\u05f9\u05fb\3\2\2\2\u05fa\u05fc\5\u00f8}\2"+ + "\u05fb\u05fa\3\2\2\2\u05fb\u05fc\3\2\2\2\u05fc\u0627\3\2\2\2\u05fd\u05fe"+ + "\7]\2\2\u05fe\u0627\5\u0100\u0081*\u05ff\u0600\7Q\2\2\u0600\u0627\5\u0100"+ + "\u0081)\u0601\u0602\7I\2\2\u0602\u0627\5\u0100\u0081(\u0603\u0604\7\24"+ + "\2\2\u0604\u0627\5\u0100\u0081\'\u0605\u0606\7\25\2\2\u0606\u0627\5\u0100"+ + "\u0081&\u0607\u0608\7\26\2\2\u0608\u0627\5\u0100\u0081%\u0609\u060a\7"+ + "\27\2\2\u060a\u0627\5\u0100\u0081$\u060b\u060c\7\30\2\2\u060c\u0627\5"+ + "\u0100\u0081#\u060d\u060e\7\31\2\2\u060e\u0627\5\u0100\u0081\"\u060f\u0610"+ + "\7k\2\2\u0610\u0627\5\u0100\u0081!\u0611\u0627\5\u00dan\2\u0612\u0627"+ + "\5\u00d6l\2\u0613\u0627\5\u00d4k\2\u0614\u0627\5\u00a2R\2\u0615\u0627"+ + "\7X\2\2\u0616\u0618\5\u010e\u0088\2\u0617\u0619\5\u0100\u0081\2\u0618"+ + "\u0617\3\2\2\2\u0618\u0619\3\2\2\2\u0619\u0627\3\2\2\2\u061a\u0627\7g"+ + "\2\2\u061b\u0627\5\u010a\u0086\2\u061c\u0627\5\u00e8u\2\u061d\u0627\5"+ + "\u00eex\2\u061e\u061f\7\t\2\2\u061f\u0620\5\u00fc\177\2\u0620\u0621\7"+ + "\n\2\2\u0621\u0627\3\2\2\2\u0622\u0624\5\16\b\2\u0623\u0625\5\u00fc\177"+ + "\2\u0624\u0623\3\2\2\2\u0624\u0625\3\2\2\2\u0625\u0627\3\2\2\2\u0626\u05ed"+ + "\3\2\2\2\u0626\u05ef\3\2\2\2\u0626\u05f0\3\2\2\2\u0626\u05f5\3\2\2\2\u0626"+ + "\u05fd\3\2\2\2\u0626\u05ff\3\2\2\2\u0626\u0601\3\2\2\2\u0626\u0603\3\2"+ + "\2\2\u0626\u0605\3\2\2\2\u0626\u0607\3\2\2\2\u0626\u0609\3\2\2\2\u0626"+ + "\u060b\3\2\2\2\u0626\u060d\3\2\2\2\u0626\u060f\3\2\2\2\u0626\u0611\3\2"+ + "\2\2\u0626\u0612\3\2\2\2\u0626\u0613\3\2\2\2\u0626\u0614\3\2\2\2\u0626"+ + "\u0615\3\2\2\2\u0626\u0616\3\2\2\2\u0626\u061a\3\2\2\2\u0626\u061b\3\2"+ + "\2\2\u0626\u061c\3\2\2\2\u0626\u061d\3\2\2\2\u0626\u061e\3\2\2\2\u0626"+ + "\u0622\3\2\2\2\u0627\u0679\3\2\2\2\u0628\u0629\f \2\2\u0629\u062a\7\37"+ + "\2\2\u062a\u0678\5\u0100\u0081 \u062b\u062c\f\37\2\2\u062c\u062d\t\b\2"+ + "\2\u062d\u0678\5\u0100\u0081 \u062e\u062f\f\36\2\2\u062f\u0630\t\t\2\2"+ + "\u0630\u0678\5\u0100\u0081\37\u0631\u0632\f\35\2\2\u0632\u0633\t\n\2\2"+ + "\u0633\u0678\5\u0100\u0081\36\u0634\u0635\f\34\2\2\u0635\u0636\t\13\2"+ + "\2\u0636\u0678\5\u0100\u0081\35\u0637\u0638\f\33\2\2\u0638\u0639\7H\2"+ + "\2\u0639\u0678\5\u0100\u0081\34\u063a\u063b\f\32\2\2\u063b\u063c\7^\2"+ + "\2\u063c\u0678\5\u0100\u0081\33\u063d\u063e\f\31\2\2\u063e\u063f\t\f\2"+ + "\2\u063f\u0678\5\u0100\u0081\32\u0640\u0641\f\30\2\2\u0641\u0642\7-\2"+ + "\2\u0642\u0678\5\u0100\u0081\31\u0643\u0644\f\27\2\2\u0644\u0645\7.\2"+ + "\2\u0645\u0678\5\u0100\u0081\30\u0646\u0647\f\26\2\2\u0647\u0648\7/\2"+ + "\2\u0648\u0678\5\u0100\u0081\27\u0649\u064a\f\25\2\2\u064a\u064b\7\60"+ + "\2\2\u064b\u0678\5\u0100\u0081\26\u064c\u064d\f\24\2\2\u064d\u064e\7\61"+ + "\2\2\u064e\u0678\5\u0100\u0081\25\u064f\u0650\f\23\2\2\u0650\u0651\7\20"+ + "\2\2\u0651\u0652\5\u0100\u0081\2\u0652\u0653\7\21\2\2\u0653\u0654\5\u0100"+ + "\u0081\24\u0654\u0678\3\2\2\2\u0655\u0656\f\22\2\2\u0656\u0657\7 \2\2"+ + "\u0657\u0678\5\u0100\u0081\23\u0658\u0659\f\21\2\2\u0659\u065a\7\17\2"+ + "\2\u065a\u0678\5\u0100\u0081\21\u065b\u065c\f\20\2\2\u065c\u065d\5\u0108"+ + "\u0085\2\u065d\u065e\5\u0100\u0081\20\u065e\u0678\3\2\2\2\u065f\u0660"+ + "\f\60\2\2\u0660\u0661\7\7\2\2\u0661\u0662\5\u00fc\177\2\u0662\u0663\7"+ + "\b\2\2\u0663\u0678\3\2\2\2\u0664\u0666\f/\2\2\u0665\u0667\7\20\2\2\u0666"+ + "\u0665\3\2\2\2\u0666\u0667\3\2\2\2\u0667\u0668\3\2\2\2\u0668\u066a\7\23"+ + "\2\2\u0669\u066b\7!\2\2\u066a\u0669\3\2\2\2\u066a\u066b\3\2\2\2\u066b"+ + "\u066c\3\2\2\2\u066c\u0678\5\u010e\u0088\2\u066d\u066e\f.\2\2\u066e\u0678"+ + "\5\u00f8}\2\u066f\u0670\f,\2\2\u0670\u0671\6\u0081%\2\u0671\u0678\7\24"+ + "\2\2\u0672\u0673\f+\2\2\u0673\u0674\6\u0081\'\2\u0674\u0678\7\25\2\2\u0675"+ + "\u0676\f\17\2\2\u0676\u0678\7\u0087\2\2\u0677\u0628\3\2\2\2\u0677\u062b"+ + "\3\2\2\2\u0677\u062e\3\2\2\2\u0677\u0631\3\2\2\2\u0677\u0634\3\2\2\2\u0677"+ + "\u0637\3\2\2\2\u0677\u063a\3\2\2\2\u0677\u063d\3\2\2\2\u0677\u0640\3\2"+ + "\2\2\u0677\u0643\3\2\2\2\u0677\u0646\3\2\2\2\u0677\u0649\3\2\2\2\u0677"+ + "\u064c\3\2\2\2\u0677\u064f\3\2\2\2\u0677\u0655\3\2\2\2\u0677\u0658\3\2"+ + "\2\2\u0677\u065b\3\2\2\2\u0677\u065f\3\2\2\2\u0677\u0664\3\2\2\2\u0677"+ + "\u066d\3\2\2\2\u0677\u066f\3\2\2\2\u0677\u0672\3\2\2\2\u0677\u0675\3\2"+ + "\2\2\u0678\u067b\3\2\2\2\u0679\u0677\3\2\2\2\u0679\u067a\3\2\2\2\u067a"+ + "\u0101\3\2\2\2\u067b\u0679\3\2\2\2\u067c\u067e\7c\2\2\u067d\u067c\3\2"+ + "\2\2\u067d\u067e\3\2\2\2\u067e\u067f\3\2\2\2\u067f\u0681\5\u0104\u0083"+ + "\2\u0680\u0682\5<\37\2\u0681\u0680\3\2\2\2\u0681\u0682\3\2\2\2\u0682\u0683"+ + "\3\2\2\2\u0683\u0684\7=\2\2\u0684\u0685\5\u0106\u0084\2\u0685\u0103\3"+ + "\2\2\2\u0686\u068d\7\u0085\2\2\u0687\u0689\7\t\2\2\u0688\u068a\5\u00de"+ + "p\2\u0689\u0688\3\2\2\2\u0689\u068a\3\2\2\2\u068a\u068b\3\2\2\2\u068b"+ + "\u068d\7\n\2\2\u068c\u0686\3\2\2\2\u068c\u0687\3\2\2\2\u068d\u0105\3\2"+ + "\2\2\u068e\u0694\5\u0100\u0081\2\u068f\u0690\7\13\2\2\u0690\u0691\5\u00e4"+ + "s\2\u0691\u0692\7\f\2\2\u0692\u0694\3\2\2\2\u0693\u068e\3\2\2\2\u0693"+ + "\u068f\3\2\2\2\u0694\u0107\3\2\2\2\u0695\u0696\t\r\2\2\u0696\u0109\3\2"+ + "\2\2\u0697\u069e\7?\2\2\u0698\u069e\7@\2\2\u0699\u069e\7\u0086\2\2\u069a"+ + "\u069e\7\u0087\2\2\u069b\u069e\7\6\2\2\u069c\u069e\5\u010c\u0087\2\u069d"+ + "\u0697\3\2\2\2\u069d\u0698\3\2\2\2\u069d\u0699\3\2\2\2\u069d\u069a\3\2"+ + "\2\2\u069d\u069b\3\2\2\2\u069d\u069c\3\2\2\2\u069e\u010b\3\2\2\2\u069f"+ + "\u06a0\t\16\2\2\u06a0\u010d\3\2\2\2\u06a1\u06a4\7\u0085\2\2\u06a2\u06a4"+ + "\5\u0110\u0089\2\u06a3\u06a1\3\2\2\2\u06a3\u06a2\3\2\2\2\u06a4\u010f\3"+ + "\2\2\2\u06a5\u06a9\5\u0112\u008a\2\u06a6\u06a9\7?\2\2\u06a7\u06a9\7@\2"+ + "\2\u06a8\u06a5\3\2\2\2\u06a8\u06a6\3\2\2\2\u06a8\u06a7\3\2\2\2\u06a9\u0111"+ + "\3\2\2\2\u06aa\u06ab\t\17\2\2\u06ab\u0113\3\2\2\2\u06ac\u06ad\7\u0085"+ + "\2\2\u06ad\u06ae\6\u008b)\2\u06ae\u06af\5\u00f6|\2\u06af\u0115\3\2\2\2"+ + "\u06b0\u06b1\7\u0085\2\2\u06b1\u06b2\6\u008c*\2\u06b2\u06b3\5\u00f6|\2"+ + "\u06b3\u0117\3\2\2\2\u06b4\u06b9\7\r\2\2\u06b5\u06b9\7\2\2\3\u06b6\u06b9"+ + "\6\u008d+\2\u06b7\u06b9\6\u008d,\2\u06b8\u06b4\3\2\2\2\u06b8\u06b5\3\2"+ + "\2\2\u06b8\u06b6\3\2\2\2\u06b8\u06b7\3\2\2\2\u06b9\u0119\3\2\2\2\u00dc"+ + "\u011f\u0123\u012c\u0131\u0134\u013b\u0144\u014e\u0159\u015b\u0170\u0178"+ + "\u0180\u018f\u0193\u0197\u019d\u01a4\u01ae\u01b0\u01c0\u01c4\u01c8\u01d0"+ + "\u01d4\u01e3\u01e7\u01ea\u01ee\u01f1\u01f5\u01fb\u01ff\u0203\u020b\u0211"+ + "\u0218\u021b\u021d\u021f\u0226\u022a\u022d\u0231\u0237\u023e\u0242\u0245"+ + "\u024a\u024d\u0250\u0256\u025a\u025e\u0262\u026d\u0274\u027b\u0280\u0288"+ + "\u028b\u0290\u0293\u0297\u02a1\u02a5\u02ab\u02b1\u02b8\u02be\u02c4\u02cc"+ + "\u02d1\u02e0\u02e7\u02ec\u02f4\u02fb\u0302\u0307\u0328\u032c\u0333\u0339"+ + "\u0341\u034a\u034e\u0356\u035e\u0365\u0369\u036d\u0371\u0374\u0377\u037a"+ + "\u037e\u0380\u0387\u038c\u038f\u0393\u0396\u039d\u03a6\u03b9\u03bd\u03c1"+ + "\u03cb\u03cf\u03d6\u03dd\u03e5\u03ed\u03f3\u03fa\u0401\u0408\u040f\u0421"+ + "\u0425\u0427\u042e\u0434\u0439\u0448\u044b\u0450\u0453\u045a\u0463\u0467"+ + "\u0470\u0473\u0478\u047e\u0481\u0487\u0496\u049a\u049d\u04a1\u04a4\u04aa"+ + "\u04ad\u04b6\u04ba\u04bd\u04c1\u04c4\u04c7\u04ca\u04cd\u04d0\u04d6\u04db"+ + "\u04e5\u04e9\u04f6\u04fa\u0507\u050b\u0514\u0520\u0525\u052c\u052e\u0531"+ + "\u0535\u0539\u053f\u0544\u0548\u0550\u0555\u055b\u055e\u0561\u0566\u056e"+ + "\u0571\u0574\u0583\u0586\u058b\u0597\u059d\u05a7\u05aa\u05b8\u05c0\u05c5"+ + "\u05c8\u05d4\u05d8\u05db\u05df\u05e3\u05e7\u05f2\u05f8\u05fb\u0618\u0624"+ + "\u0626\u0666\u066a\u0677\u0679\u067d\u0681\u0689\u068c\u0693\u069d\u06a3"+ + "\u06a8\u06b8"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptParser.tokens b/docs/compare/src/main/java/tsantlr/TypeScriptParser.tokens new file mode 100644 index 0000000000000000000000000000000000000000..64e7e7ca3af11c442acdcce28ca3070682075e69 --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptParser.tokens @@ -0,0 +1,258 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Lodash=25 +Dollar=26 +Divide=27 +Modulus=28 +Power=29 +NullCoalesce=30 +Hashtag=31 +RightShiftArithmetic=32 +LeftShiftArithmetic=33 +RightShiftLogical=34 +LessThan=35 +MoreThan=36 +LessThanEquals=37 +GreaterThanEquals=38 +Equals_=39 +NotEquals=40 +IdentityEquals=41 +IdentityNotEquals=42 +BitAnd=43 +BitXOr=44 +BitOr=45 +And=46 +Or=47 +MultiplyAssign=48 +DivideAssign=49 +ModulusAssign=50 +PlusAssign=51 +MinusAssign=52 +LeftShiftArithmeticAssign=53 +RightShiftArithmeticAssign=54 +RightShiftLogicalAssign=55 +BitAndAssign=56 +BitXorAssign=57 +BitOrAssign=58 +ARROW=59 +PowerAssign=60 +NullLiteral=61 +BooleanLiteral=62 +DecimalLiteral=63 +HexIntegerLiteral=64 +OctalIntegerLiteral=65 +OctalIntegerLiteral2=66 +BinaryIntegerLiteral=67 +Break=68 +Do=69 +Instanceof=70 +Typeof=71 +Case=72 +Else=73 +New=74 +Var=75 +Catch=76 +Finally=77 +Return=78 +Void=79 +Continue=80 +For=81 +Switch=82 +While=83 +Debugger=84 +Function=85 +This=86 +With=87 +Default=88 +If=89 +Throw=90 +Delete=91 +In=92 +Try=93 +As=94 +From=95 +ReadOnly=96 +Async=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Await=105 +Implements=106 +Let=107 +Private=108 +Public=109 +Interface=110 +Package=111 +Protected=112 +Static=113 +Yield=114 +ANY=115 +NUMBER=116 +BOOLEAN=117 +STRING=118 +SYMBOL=119 +Type=120 +Get=121 +Set=122 +Constructor=123 +Namespace=124 +Require=125 +Module=126 +Declare=127 +Abstract=128 +Is=129 +At=130 +Identifier=131 +StringLiteral=132 +TemplateStringLiteral=133 +WhiteSpaces=134 +LineTerminator=135 +HtmlComment=136 +CDataComment=137 +UnexpectedCharacter=138 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'_'=25 +'$'=26 +'/'=27 +'%'=28 +'**'=29 +'??'=30 +'#'=31 +'>>'=32 +'<<'=33 +'>>>'=34 +'<'=35 +'>'=36 +'<='=37 +'>='=38 +'=='=39 +'!='=40 +'==='=41 +'!=='=42 +'&'=43 +'^'=44 +'|'=45 +'&&'=46 +'||'=47 +'*='=48 +'/='=49 +'%='=50 +'+='=51 +'-='=52 +'<<='=53 +'>>='=54 +'>>>='=55 +'&='=56 +'^='=57 +'|='=58 +'=>'=59 +'**='=60 +'null'=61 +'break'=68 +'do'=69 +'instanceof'=70 +'typeof'=71 +'case'=72 +'else'=73 +'new'=74 +'var'=75 +'catch'=76 +'finally'=77 +'return'=78 +'void'=79 +'continue'=80 +'for'=81 +'switch'=82 +'while'=83 +'debugger'=84 +'function'=85 +'this'=86 +'with'=87 +'default'=88 +'if'=89 +'throw'=90 +'delete'=91 +'in'=92 +'try'=93 +'as'=94 +'from'=95 +'readonly'=96 +'async'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'await'=105 +'implements'=106 +'let'=107 +'private'=108 +'public'=109 +'interface'=110 +'package'=111 +'protected'=112 +'static'=113 +'yield'=114 +'any'=115 +'number'=116 +'boolean'=117 +'string'=118 +'symbol'=119 +'type'=120 +'get '=121 +'set '=122 +'constructor'=123 +'namespace'=124 +'require'=125 +'module'=126 +'declare'=127 +'abstract'=128 +'is'=129 +'@'=130 diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptParserBaseListener.java b/docs/compare/src/main/java/tsantlr/TypeScriptParserBaseListener.java new file mode 100644 index 0000000000000000000000000000000000000000..0273155df50eea0116c2be11e4946c6ba5397e38 --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptParserBaseListener.java @@ -0,0 +1,2559 @@ +// Generated from TypeScriptParser.g4 by ANTLR 4.7.2 +package tsantlr; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link TypeScriptParserListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class TypeScriptParserBaseListener implements TypeScriptParserListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInitializer(TypeScriptParser.InitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInitializer(TypeScriptParser.InitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBindingPattern(TypeScriptParser.BindingPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBindingPattern(TypeScriptParser.BindingPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameters(TypeScriptParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameters(TypeScriptParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameterList(TypeScriptParser.TypeParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameterList(TypeScriptParser.TypeParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameter(TypeScriptParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameter(TypeScriptParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstraint(TypeScriptParser.ConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstraint(TypeScriptParser.ConstraintContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArguments(TypeScriptParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArguments(TypeScriptParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgument(TypeScriptParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgument(TypeScriptParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterType_(TypeScriptParser.Type_Context ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitType_(TypeScriptParser.Type_Context ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIntersection(TypeScriptParser.IntersectionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIntersection(TypeScriptParser.IntersectionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimary(TypeScriptParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimary(TypeScriptParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterUnion(TypeScriptParser.UnionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitUnion(TypeScriptParser.UnionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPredefinedType(TypeScriptParser.PredefinedTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPredefinedType(TypeScriptParser.PredefinedTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeReference(TypeScriptParser.TypeReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeReference(TypeScriptParser.TypeReferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeGeneric(TypeScriptParser.TypeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeGeneric(TypeScriptParser.TypeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeName(TypeScriptParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeName(TypeScriptParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterObjectType(TypeScriptParser.ObjectTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitObjectType(TypeScriptParser.ObjectTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeBody(TypeScriptParser.TypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeBody(TypeScriptParser.TypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeMemberList(TypeScriptParser.TypeMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeMemberList(TypeScriptParser.TypeMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeMember(TypeScriptParser.TypeMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeMember(TypeScriptParser.TypeMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayType(TypeScriptParser.ArrayTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayType(TypeScriptParser.ArrayTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTupleType(TypeScriptParser.TupleTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTupleType(TypeScriptParser.TupleTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionType(TypeScriptParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionType(TypeScriptParser.FunctionTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorType(TypeScriptParser.ConstructorTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorType(TypeScriptParser.ConstructorTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeQuery(TypeScriptParser.TypeQueryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeQuery(TypeScriptParser.TypeQueryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertySignature(TypeScriptParser.PropertySignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertySignature(TypeScriptParser.PropertySignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCallSignature(TypeScriptParser.CallSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCallSignature(TypeScriptParser.CallSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParameterList(TypeScriptParser.ParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParameterList(TypeScriptParser.ParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRequiredParameter(TypeScriptParser.RequiredParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRequiredParameter(TypeScriptParser.RequiredParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterOptionalParameterList(TypeScriptParser.OptionalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitOptionalParameterList(TypeScriptParser.OptionalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterOptionalParameter(TypeScriptParser.OptionalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitOptionalParameter(TypeScriptParser.OptionalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRestParameter(TypeScriptParser.RestParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRestParameter(TypeScriptParser.RestParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructSignature(TypeScriptParser.ConstructSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructSignature(TypeScriptParser.ConstructSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIndexSignature(TypeScriptParser.IndexSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIndexSignature(TypeScriptParser.IndexSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodSignature(TypeScriptParser.MethodSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodSignature(TypeScriptParser.MethodSignatureContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumBody(TypeScriptParser.EnumBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumBody(TypeScriptParser.EnumBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumMemberList(TypeScriptParser.EnumMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumMemberList(TypeScriptParser.EnumMemberListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumMember(TypeScriptParser.EnumMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumMember(TypeScriptParser.EnumMemberContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNamespaceName(TypeScriptParser.NamespaceNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNamespaceName(TypeScriptParser.NamespaceNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportAll(TypeScriptParser.ImportAllContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportAll(TypeScriptParser.ImportAllContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDecoratorList(TypeScriptParser.DecoratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDecoratorList(TypeScriptParser.DecoratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDecorator(TypeScriptParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDecorator(TypeScriptParser.DecoratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterProgram(TypeScriptParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitProgram(TypeScriptParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSourceElement(TypeScriptParser.SourceElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSourceElement(TypeScriptParser.SourceElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(TypeScriptParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(TypeScriptParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlock(TypeScriptParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlock(TypeScriptParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatementList(TypeScriptParser.StatementListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatementList(TypeScriptParser.StatementListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportStatement(TypeScriptParser.ImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportStatement(TypeScriptParser.ImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportFromBlock(TypeScriptParser.ImportFromBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportFromBlock(TypeScriptParser.ImportFromBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExportStatement(TypeScriptParser.ExportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExportStatement(TypeScriptParser.ExportStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableStatement(TypeScriptParser.VariableStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableStatement(TypeScriptParser.VariableStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIfStatement(TypeScriptParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIfStatement(TypeScriptParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDoStatement(TypeScriptParser.DoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDoStatement(TypeScriptParser.DoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterWhileStatement(TypeScriptParser.WhileStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitWhileStatement(TypeScriptParser.WhileStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForStatement(TypeScriptParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForStatement(TypeScriptParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForVarStatement(TypeScriptParser.ForVarStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForVarStatement(TypeScriptParser.ForVarStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForInStatement(TypeScriptParser.ForInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForInStatement(TypeScriptParser.ForInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVarModifier(TypeScriptParser.VarModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVarModifier(TypeScriptParser.VarModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterContinueStatement(TypeScriptParser.ContinueStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitContinueStatement(TypeScriptParser.ContinueStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBreakStatement(TypeScriptParser.BreakStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBreakStatement(TypeScriptParser.BreakStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterReturnStatement(TypeScriptParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitReturnStatement(TypeScriptParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterYieldStatement(TypeScriptParser.YieldStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitYieldStatement(TypeScriptParser.YieldStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterWithStatement(TypeScriptParser.WithStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitWithStatement(TypeScriptParser.WithStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchStatement(TypeScriptParser.SwitchStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchStatement(TypeScriptParser.SwitchStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCaseBlock(TypeScriptParser.CaseBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCaseBlock(TypeScriptParser.CaseBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCaseClauses(TypeScriptParser.CaseClausesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCaseClauses(TypeScriptParser.CaseClausesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCaseClause(TypeScriptParser.CaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCaseClause(TypeScriptParser.CaseClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDefaultClause(TypeScriptParser.DefaultClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDefaultClause(TypeScriptParser.DefaultClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLabelledStatement(TypeScriptParser.LabelledStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLabelledStatement(TypeScriptParser.LabelledStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterThrowStatement(TypeScriptParser.ThrowStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitThrowStatement(TypeScriptParser.ThrowStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTryStatement(TypeScriptParser.TryStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTryStatement(TypeScriptParser.TryStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchProduction(TypeScriptParser.CatchProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchProduction(TypeScriptParser.CatchProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignable(TypeScriptParser.AssignableContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignable(TypeScriptParser.AssignableContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFinallyProduction(TypeScriptParser.FinallyProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFinallyProduction(TypeScriptParser.FinallyProductionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassHeritage(TypeScriptParser.ClassHeritageContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassHeritage(TypeScriptParser.ClassHeritageContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassTail(TypeScriptParser.ClassTailContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassTail(TypeScriptParser.ClassTailContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImplementsClause(TypeScriptParser.ImplementsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImplementsClause(TypeScriptParser.ImplementsClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassElement(TypeScriptParser.ClassElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassElement(TypeScriptParser.ClassElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertyMemberDeclaration(TypeScriptParser.PropertyMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertyMemberDeclaration(TypeScriptParser.PropertyMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIteratorBlock(TypeScriptParser.IteratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIteratorBlock(TypeScriptParser.IteratorBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameterList(TypeScriptParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameterList(TypeScriptParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionBody(TypeScriptParser.FunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionBody(TypeScriptParser.FunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSourceElements(TypeScriptParser.SourceElementsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSourceElements(TypeScriptParser.SourceElementsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementList(TypeScriptParser.ElementListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementList(TypeScriptParser.ElementListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLastElement(TypeScriptParser.LastElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLastElement(TypeScriptParser.LastElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionProperty(TypeScriptParser.FunctionPropertyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionProperty(TypeScriptParser.FunctionPropertyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertyGetter(TypeScriptParser.PropertyGetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertyGetter(TypeScriptParser.PropertyGetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertySetter(TypeScriptParser.PropertySetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertySetter(TypeScriptParser.PropertySetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodProperty(TypeScriptParser.MethodPropertyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodProperty(TypeScriptParser.MethodPropertyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGetAccessor(TypeScriptParser.GetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGetAccessor(TypeScriptParser.GetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSetAccessor(TypeScriptParser.SetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSetAccessor(TypeScriptParser.SetAccessorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPropertyName(TypeScriptParser.PropertyNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPropertyName(TypeScriptParser.PropertyNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArguments(TypeScriptParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArguments(TypeScriptParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLastArgument(TypeScriptParser.LastArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLastArgument(TypeScriptParser.LastArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPowerExpression(TypeScriptParser.PowerExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPowerExpression(TypeScriptParser.PowerExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInExpression(TypeScriptParser.InExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInExpression(TypeScriptParser.InExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericTypes(TypeScriptParser.GenericTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericTypes(TypeScriptParser.GenericTypesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterThisExpression(TypeScriptParser.ThisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitThisExpression(TypeScriptParser.ThisExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNewExpression(TypeScriptParser.NewExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNewExpression(TypeScriptParser.NewExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVoidExpression(TypeScriptParser.VoidExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVoidExpression(TypeScriptParser.VoidExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNotExpression(TypeScriptParser.NotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNotExpression(TypeScriptParser.NotExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAwaitExpression(TypeScriptParser.AwaitExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAwaitExpression(TypeScriptParser.AwaitExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSuperExpression(TypeScriptParser.SuperExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSuperExpression(TypeScriptParser.SuperExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterYieldExpression(TypeScriptParser.YieldExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitYieldExpression(TypeScriptParser.YieldExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassExpression(TypeScriptParser.ClassExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassExpression(TypeScriptParser.ClassExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCoalesceExpression(TypeScriptParser.CoalesceExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCoalesceExpression(TypeScriptParser.CoalesceExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLiteral(TypeScriptParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLiteral(TypeScriptParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNumericLiteral(TypeScriptParser.NumericLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNumericLiteral(TypeScriptParser.NumericLiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIdentifierName(TypeScriptParser.IdentifierNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIdentifierName(TypeScriptParser.IdentifierNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterReservedWord(TypeScriptParser.ReservedWordContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitReservedWord(TypeScriptParser.ReservedWordContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterKeyword(TypeScriptParser.KeywordContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitKeyword(TypeScriptParser.KeywordContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGetter(TypeScriptParser.GetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGetter(TypeScriptParser.GetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSetter(TypeScriptParser.SetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSetter(TypeScriptParser.SetterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEos(TypeScriptParser.EosContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEos(TypeScriptParser.EosContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} diff --git a/docs/compare/src/main/java/tsantlr/TypeScriptParserListener.java b/docs/compare/src/main/java/tsantlr/TypeScriptParserListener.java new file mode 100644 index 0000000000000000000000000000000000000000..20e8e74b8f2ca6e4f1ff0988f1a4a943ba85e393 --- /dev/null +++ b/docs/compare/src/main/java/tsantlr/TypeScriptParserListener.java @@ -0,0 +1,2261 @@ +// Generated from TypeScriptParser.g4 by ANTLR 4.7.2 +package tsantlr; + +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link TypeScriptParser}. + */ +public interface TypeScriptParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link TypeScriptParser#initializer}. + * @param ctx the parse tree + */ + void enterInitializer(TypeScriptParser.InitializerContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#initializer}. + * @param ctx the parse tree + */ + void exitInitializer(TypeScriptParser.InitializerContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#bindingPattern}. + * @param ctx the parse tree + */ + void enterBindingPattern(TypeScriptParser.BindingPatternContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#bindingPattern}. + * @param ctx the parse tree + */ + void exitBindingPattern(TypeScriptParser.BindingPatternContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(TypeScriptParser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(TypeScriptParser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeParameterList}. + * @param ctx the parse tree + */ + void enterTypeParameterList(TypeScriptParser.TypeParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeParameterList}. + * @param ctx the parse tree + */ + void exitTypeParameterList(TypeScriptParser.TypeParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(TypeScriptParser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(TypeScriptParser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constraint}. + * @param ctx the parse tree + */ + void enterConstraint(TypeScriptParser.ConstraintContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constraint}. + * @param ctx the parse tree + */ + void exitConstraint(TypeScriptParser.ConstraintContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(TypeScriptParser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(TypeScriptParser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeArgumentList}. + * @param ctx the parse tree + */ + void enterTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeArgumentList}. + * @param ctx the parse tree + */ + void exitTypeArgumentList(TypeScriptParser.TypeArgumentListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeArgument}. + * @param ctx the parse tree + */ + void enterTypeArgument(TypeScriptParser.TypeArgumentContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeArgument}. + * @param ctx the parse tree + */ + void exitTypeArgument(TypeScriptParser.TypeArgumentContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#type_}. + * @param ctx the parse tree + */ + void enterType_(TypeScriptParser.Type_Context ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#type_}. + * @param ctx the parse tree + */ + void exitType_(TypeScriptParser.Type_Context ctx); + /** + * Enter a parse tree produced by the {@code Intersection} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void enterIntersection(TypeScriptParser.IntersectionContext ctx); + /** + * Exit a parse tree produced by the {@code Intersection} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void exitIntersection(TypeScriptParser.IntersectionContext ctx); + /** + * Enter a parse tree produced by the {@code Primary} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void enterPrimary(TypeScriptParser.PrimaryContext ctx); + /** + * Exit a parse tree produced by the {@code Primary} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void exitPrimary(TypeScriptParser.PrimaryContext ctx); + /** + * Enter a parse tree produced by the {@code Union} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void enterUnion(TypeScriptParser.UnionContext ctx); + /** + * Exit a parse tree produced by the {@code Union} + * labeled alternative in {@link TypeScriptParser#unionOrIntersectionOrPrimaryType}. + * @param ctx the parse tree + */ + void exitUnion(TypeScriptParser.UnionContext ctx); + /** + * Enter a parse tree produced by the {@code RedefinitionOfType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx); + /** + * Exit a parse tree produced by the {@code RedefinitionOfType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitRedefinitionOfType(TypeScriptParser.RedefinitionOfTypeContext ctx); + /** + * Enter a parse tree produced by the {@code PredefinedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code PredefinedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitPredefinedPrimType(TypeScriptParser.PredefinedPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ArrayPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ArrayPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitArrayPrimType(TypeScriptParser.ArrayPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ParenthesizedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ParenthesizedPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitParenthesizedPrimType(TypeScriptParser.ParenthesizedPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ThisPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ThisPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitThisPrimType(TypeScriptParser.ThisPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code TuplePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code TuplePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitTuplePrimType(TypeScriptParser.TuplePrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ObjectPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ObjectPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitObjectPrimType(TypeScriptParser.ObjectPrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code ReferencePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code ReferencePrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitReferencePrimType(TypeScriptParser.ReferencePrimTypeContext ctx); + /** + * Enter a parse tree produced by the {@code QueryPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void enterQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx); + /** + * Exit a parse tree produced by the {@code QueryPrimType} + * labeled alternative in {@link TypeScriptParser#primaryType}. + * @param ctx the parse tree + */ + void exitQueryPrimType(TypeScriptParser.QueryPrimTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#predefinedType}. + * @param ctx the parse tree + */ + void enterPredefinedType(TypeScriptParser.PredefinedTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#predefinedType}. + * @param ctx the parse tree + */ + void exitPredefinedType(TypeScriptParser.PredefinedTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeReference}. + * @param ctx the parse tree + */ + void enterTypeReference(TypeScriptParser.TypeReferenceContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeReference}. + * @param ctx the parse tree + */ + void exitTypeReference(TypeScriptParser.TypeReferenceContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeGeneric}. + * @param ctx the parse tree + */ + void enterTypeGeneric(TypeScriptParser.TypeGenericContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeGeneric}. + * @param ctx the parse tree + */ + void exitTypeGeneric(TypeScriptParser.TypeGenericContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeIncludeGeneric}. + * @param ctx the parse tree + */ + void enterTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeIncludeGeneric}. + * @param ctx the parse tree + */ + void exitTypeIncludeGeneric(TypeScriptParser.TypeIncludeGenericContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeName}. + * @param ctx the parse tree + */ + void enterTypeName(TypeScriptParser.TypeNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeName}. + * @param ctx the parse tree + */ + void exitTypeName(TypeScriptParser.TypeNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#objectType}. + * @param ctx the parse tree + */ + void enterObjectType(TypeScriptParser.ObjectTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#objectType}. + * @param ctx the parse tree + */ + void exitObjectType(TypeScriptParser.ObjectTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeBody}. + * @param ctx the parse tree + */ + void enterTypeBody(TypeScriptParser.TypeBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeBody}. + * @param ctx the parse tree + */ + void exitTypeBody(TypeScriptParser.TypeBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeMemberList}. + * @param ctx the parse tree + */ + void enterTypeMemberList(TypeScriptParser.TypeMemberListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeMemberList}. + * @param ctx the parse tree + */ + void exitTypeMemberList(TypeScriptParser.TypeMemberListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeMember}. + * @param ctx the parse tree + */ + void enterTypeMember(TypeScriptParser.TypeMemberContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeMember}. + * @param ctx the parse tree + */ + void exitTypeMember(TypeScriptParser.TypeMemberContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrayType}. + * @param ctx the parse tree + */ + void enterArrayType(TypeScriptParser.ArrayTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrayType}. + * @param ctx the parse tree + */ + void exitArrayType(TypeScriptParser.ArrayTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#tupleType}. + * @param ctx the parse tree + */ + void enterTupleType(TypeScriptParser.TupleTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#tupleType}. + * @param ctx the parse tree + */ + void exitTupleType(TypeScriptParser.TupleTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#tupleElementTypes}. + * @param ctx the parse tree + */ + void enterTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#tupleElementTypes}. + * @param ctx the parse tree + */ + void exitTupleElementTypes(TypeScriptParser.TupleElementTypesContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionType}. + * @param ctx the parse tree + */ + void enterFunctionType(TypeScriptParser.FunctionTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionType}. + * @param ctx the parse tree + */ + void exitFunctionType(TypeScriptParser.FunctionTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constructorType}. + * @param ctx the parse tree + */ + void enterConstructorType(TypeScriptParser.ConstructorTypeContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constructorType}. + * @param ctx the parse tree + */ + void exitConstructorType(TypeScriptParser.ConstructorTypeContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeQuery}. + * @param ctx the parse tree + */ + void enterTypeQuery(TypeScriptParser.TypeQueryContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeQuery}. + * @param ctx the parse tree + */ + void exitTypeQuery(TypeScriptParser.TypeQueryContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeQueryExpression}. + * @param ctx the parse tree + */ + void enterTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeQueryExpression}. + * @param ctx the parse tree + */ + void exitTypeQueryExpression(TypeScriptParser.TypeQueryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#propertySignature}. + * @param ctx the parse tree + */ + void enterPropertySignature(TypeScriptParser.PropertySignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#propertySignature}. + * @param ctx the parse tree + */ + void exitPropertySignature(TypeScriptParser.PropertySignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeAnnotation}. + * @param ctx the parse tree + */ + void enterTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeAnnotation}. + * @param ctx the parse tree + */ + void exitTypeAnnotation(TypeScriptParser.TypeAnnotationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#callSignature}. + * @param ctx the parse tree + */ + void enterCallSignature(TypeScriptParser.CallSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#callSignature}. + * @param ctx the parse tree + */ + void exitCallSignature(TypeScriptParser.CallSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#parameterList}. + * @param ctx the parse tree + */ + void enterParameterList(TypeScriptParser.ParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#parameterList}. + * @param ctx the parse tree + */ + void exitParameterList(TypeScriptParser.ParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#requiredParameterList}. + * @param ctx the parse tree + */ + void enterRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#requiredParameterList}. + * @param ctx the parse tree + */ + void exitRequiredParameterList(TypeScriptParser.RequiredParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#requiredParameter}. + * @param ctx the parse tree + */ + void enterRequiredParameter(TypeScriptParser.RequiredParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#requiredParameter}. + * @param ctx the parse tree + */ + void exitRequiredParameter(TypeScriptParser.RequiredParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#accessibilityModifier}. + * @param ctx the parse tree + */ + void enterAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#accessibilityModifier}. + * @param ctx the parse tree + */ + void exitAccessibilityModifier(TypeScriptParser.AccessibilityModifierContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#identifierOrPattern}. + * @param ctx the parse tree + */ + void enterIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#identifierOrPattern}. + * @param ctx the parse tree + */ + void exitIdentifierOrPattern(TypeScriptParser.IdentifierOrPatternContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#optionalParameterList}. + * @param ctx the parse tree + */ + void enterOptionalParameterList(TypeScriptParser.OptionalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#optionalParameterList}. + * @param ctx the parse tree + */ + void exitOptionalParameterList(TypeScriptParser.OptionalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#optionalParameter}. + * @param ctx the parse tree + */ + void enterOptionalParameter(TypeScriptParser.OptionalParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#optionalParameter}. + * @param ctx the parse tree + */ + void exitOptionalParameter(TypeScriptParser.OptionalParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#restParameter}. + * @param ctx the parse tree + */ + void enterRestParameter(TypeScriptParser.RestParameterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#restParameter}. + * @param ctx the parse tree + */ + void exitRestParameter(TypeScriptParser.RestParameterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constructSignature}. + * @param ctx the parse tree + */ + void enterConstructSignature(TypeScriptParser.ConstructSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constructSignature}. + * @param ctx the parse tree + */ + void exitConstructSignature(TypeScriptParser.ConstructSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#indexSignature}. + * @param ctx the parse tree + */ + void enterIndexSignature(TypeScriptParser.IndexSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#indexSignature}. + * @param ctx the parse tree + */ + void exitIndexSignature(TypeScriptParser.IndexSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#methodSignature}. + * @param ctx the parse tree + */ + void enterMethodSignature(TypeScriptParser.MethodSignatureContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#methodSignature}. + * @param ctx the parse tree + */ + void exitMethodSignature(TypeScriptParser.MethodSignatureContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#typeAliasDeclaration}. + * @param ctx the parse tree + */ + void enterTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#typeAliasDeclaration}. + * @param ctx the parse tree + */ + void exitTypeAliasDeclaration(TypeScriptParser.TypeAliasDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void enterConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void exitConstructorDeclaration(TypeScriptParser.ConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceDeclaration(TypeScriptParser.InterfaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#interfaceExtendsClause}. + * @param ctx the parse tree + */ + void enterInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#interfaceExtendsClause}. + * @param ctx the parse tree + */ + void exitInterfaceExtendsClause(TypeScriptParser.InterfaceExtendsClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classOrInterfaceTypeList}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classOrInterfaceTypeList}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceTypeList(TypeScriptParser.ClassOrInterfaceTypeListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumDeclaration}. + * @param ctx the parse tree + */ + void enterEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumDeclaration}. + * @param ctx the parse tree + */ + void exitEnumDeclaration(TypeScriptParser.EnumDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumBody}. + * @param ctx the parse tree + */ + void enterEnumBody(TypeScriptParser.EnumBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumBody}. + * @param ctx the parse tree + */ + void exitEnumBody(TypeScriptParser.EnumBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumMemberList}. + * @param ctx the parse tree + */ + void enterEnumMemberList(TypeScriptParser.EnumMemberListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumMemberList}. + * @param ctx the parse tree + */ + void exitEnumMemberList(TypeScriptParser.EnumMemberListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#enumMember}. + * @param ctx the parse tree + */ + void enterEnumMember(TypeScriptParser.EnumMemberContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#enumMember}. + * @param ctx the parse tree + */ + void exitEnumMember(TypeScriptParser.EnumMemberContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#namespaceDeclaration}. + * @param ctx the parse tree + */ + void enterNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#namespaceDeclaration}. + * @param ctx the parse tree + */ + void exitNamespaceDeclaration(TypeScriptParser.NamespaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#namespaceName}. + * @param ctx the parse tree + */ + void enterNamespaceName(TypeScriptParser.NamespaceNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#namespaceName}. + * @param ctx the parse tree + */ + void exitNamespaceName(TypeScriptParser.NamespaceNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#importAliasDeclaration}. + * @param ctx the parse tree + */ + void enterImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#importAliasDeclaration}. + * @param ctx the parse tree + */ + void exitImportAliasDeclaration(TypeScriptParser.ImportAliasDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#importAll}. + * @param ctx the parse tree + */ + void enterImportAll(TypeScriptParser.ImportAllContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#importAll}. + * @param ctx the parse tree + */ + void exitImportAll(TypeScriptParser.ImportAllContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decoratorList}. + * @param ctx the parse tree + */ + void enterDecoratorList(TypeScriptParser.DecoratorListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decoratorList}. + * @param ctx the parse tree + */ + void exitDecoratorList(TypeScriptParser.DecoratorListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decorator}. + * @param ctx the parse tree + */ + void enterDecorator(TypeScriptParser.DecoratorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decorator}. + * @param ctx the parse tree + */ + void exitDecorator(TypeScriptParser.DecoratorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decoratorMemberExpression}. + * @param ctx the parse tree + */ + void enterDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decoratorMemberExpression}. + * @param ctx the parse tree + */ + void exitDecoratorMemberExpression(TypeScriptParser.DecoratorMemberExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#decoratorCallExpression}. + * @param ctx the parse tree + */ + void enterDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#decoratorCallExpression}. + * @param ctx the parse tree + */ + void exitDecoratorCallExpression(TypeScriptParser.DecoratorCallExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#program}. + * @param ctx the parse tree + */ + void enterProgram(TypeScriptParser.ProgramContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#program}. + * @param ctx the parse tree + */ + void exitProgram(TypeScriptParser.ProgramContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#sourceElement}. + * @param ctx the parse tree + */ + void enterSourceElement(TypeScriptParser.SourceElementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#sourceElement}. + * @param ctx the parse tree + */ + void exitSourceElement(TypeScriptParser.SourceElementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(TypeScriptParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(TypeScriptParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#block}. + * @param ctx the parse tree + */ + void enterBlock(TypeScriptParser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#block}. + * @param ctx the parse tree + */ + void exitBlock(TypeScriptParser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#statementList}. + * @param ctx the parse tree + */ + void enterStatementList(TypeScriptParser.StatementListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#statementList}. + * @param ctx the parse tree + */ + void exitStatementList(TypeScriptParser.StatementListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#abstractDeclaration}. + * @param ctx the parse tree + */ + void enterAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#abstractDeclaration}. + * @param ctx the parse tree + */ + void exitAbstractDeclaration(TypeScriptParser.AbstractDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#importStatement}. + * @param ctx the parse tree + */ + void enterImportStatement(TypeScriptParser.ImportStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#importStatement}. + * @param ctx the parse tree + */ + void exitImportStatement(TypeScriptParser.ImportStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#importFromBlock}. + * @param ctx the parse tree + */ + void enterImportFromBlock(TypeScriptParser.ImportFromBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#importFromBlock}. + * @param ctx the parse tree + */ + void exitImportFromBlock(TypeScriptParser.ImportFromBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#multipleImportStatement}. + * @param ctx the parse tree + */ + void enterMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#multipleImportStatement}. + * @param ctx the parse tree + */ + void exitMultipleImportStatement(TypeScriptParser.MultipleImportStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#exportStatement}. + * @param ctx the parse tree + */ + void enterExportStatement(TypeScriptParser.ExportStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#exportStatement}. + * @param ctx the parse tree + */ + void exitExportStatement(TypeScriptParser.ExportStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#variableStatement}. + * @param ctx the parse tree + */ + void enterVariableStatement(TypeScriptParser.VariableStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#variableStatement}. + * @param ctx the parse tree + */ + void exitVariableStatement(TypeScriptParser.VariableStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#variableDeclarationList}. + * @param ctx the parse tree + */ + void enterVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#variableDeclarationList}. + * @param ctx the parse tree + */ + void exitVariableDeclarationList(TypeScriptParser.VariableDeclarationListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#variableDeclaration}. + * @param ctx the parse tree + */ + void enterVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#variableDeclaration}. + * @param ctx the parse tree + */ + void exitVariableDeclaration(TypeScriptParser.VariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#emptyStatement_}. + * @param ctx the parse tree + */ + void enterEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#emptyStatement_}. + * @param ctx the parse tree + */ + void exitEmptyStatement_(TypeScriptParser.EmptyStatement_Context ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#expressionStatement}. + * @param ctx the parse tree + */ + void enterExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#expressionStatement}. + * @param ctx the parse tree + */ + void exitExpressionStatement(TypeScriptParser.ExpressionStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#ifStatement}. + * @param ctx the parse tree + */ + void enterIfStatement(TypeScriptParser.IfStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#ifStatement}. + * @param ctx the parse tree + */ + void exitIfStatement(TypeScriptParser.IfStatementContext ctx); + /** + * Enter a parse tree produced by the {@code DoStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterDoStatement(TypeScriptParser.DoStatementContext ctx); + /** + * Exit a parse tree produced by the {@code DoStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitDoStatement(TypeScriptParser.DoStatementContext ctx); + /** + * Enter a parse tree produced by the {@code WhileStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterWhileStatement(TypeScriptParser.WhileStatementContext ctx); + /** + * Exit a parse tree produced by the {@code WhileStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitWhileStatement(TypeScriptParser.WhileStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForStatement(TypeScriptParser.ForStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForStatement(TypeScriptParser.ForStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForVarStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForVarStatement(TypeScriptParser.ForVarStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForVarStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForVarStatement(TypeScriptParser.ForVarStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForInStatement(TypeScriptParser.ForInStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForInStatement(TypeScriptParser.ForInStatementContext ctx); + /** + * Enter a parse tree produced by the {@code ForVarInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx); + /** + * Exit a parse tree produced by the {@code ForVarInStatement} + * labeled alternative in {@link TypeScriptParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitForVarInStatement(TypeScriptParser.ForVarInStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#varModifier}. + * @param ctx the parse tree + */ + void enterVarModifier(TypeScriptParser.VarModifierContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#varModifier}. + * @param ctx the parse tree + */ + void exitVarModifier(TypeScriptParser.VarModifierContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#continueStatement}. + * @param ctx the parse tree + */ + void enterContinueStatement(TypeScriptParser.ContinueStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#continueStatement}. + * @param ctx the parse tree + */ + void exitContinueStatement(TypeScriptParser.ContinueStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#breakStatement}. + * @param ctx the parse tree + */ + void enterBreakStatement(TypeScriptParser.BreakStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#breakStatement}. + * @param ctx the parse tree + */ + void exitBreakStatement(TypeScriptParser.BreakStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#returnStatement}. + * @param ctx the parse tree + */ + void enterReturnStatement(TypeScriptParser.ReturnStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#returnStatement}. + * @param ctx the parse tree + */ + void exitReturnStatement(TypeScriptParser.ReturnStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#yieldStatement}. + * @param ctx the parse tree + */ + void enterYieldStatement(TypeScriptParser.YieldStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#yieldStatement}. + * @param ctx the parse tree + */ + void exitYieldStatement(TypeScriptParser.YieldStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#withStatement}. + * @param ctx the parse tree + */ + void enterWithStatement(TypeScriptParser.WithStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#withStatement}. + * @param ctx the parse tree + */ + void exitWithStatement(TypeScriptParser.WithStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#switchStatement}. + * @param ctx the parse tree + */ + void enterSwitchStatement(TypeScriptParser.SwitchStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#switchStatement}. + * @param ctx the parse tree + */ + void exitSwitchStatement(TypeScriptParser.SwitchStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#caseBlock}. + * @param ctx the parse tree + */ + void enterCaseBlock(TypeScriptParser.CaseBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#caseBlock}. + * @param ctx the parse tree + */ + void exitCaseBlock(TypeScriptParser.CaseBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#caseClauses}. + * @param ctx the parse tree + */ + void enterCaseClauses(TypeScriptParser.CaseClausesContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#caseClauses}. + * @param ctx the parse tree + */ + void exitCaseClauses(TypeScriptParser.CaseClausesContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#caseClause}. + * @param ctx the parse tree + */ + void enterCaseClause(TypeScriptParser.CaseClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#caseClause}. + * @param ctx the parse tree + */ + void exitCaseClause(TypeScriptParser.CaseClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#defaultClause}. + * @param ctx the parse tree + */ + void enterDefaultClause(TypeScriptParser.DefaultClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#defaultClause}. + * @param ctx the parse tree + */ + void exitDefaultClause(TypeScriptParser.DefaultClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#labelledStatement}. + * @param ctx the parse tree + */ + void enterLabelledStatement(TypeScriptParser.LabelledStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#labelledStatement}. + * @param ctx the parse tree + */ + void exitLabelledStatement(TypeScriptParser.LabelledStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#throwStatement}. + * @param ctx the parse tree + */ + void enterThrowStatement(TypeScriptParser.ThrowStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#throwStatement}. + * @param ctx the parse tree + */ + void exitThrowStatement(TypeScriptParser.ThrowStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#tryStatement}. + * @param ctx the parse tree + */ + void enterTryStatement(TypeScriptParser.TryStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#tryStatement}. + * @param ctx the parse tree + */ + void exitTryStatement(TypeScriptParser.TryStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#catchProduction}. + * @param ctx the parse tree + */ + void enterCatchProduction(TypeScriptParser.CatchProductionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#catchProduction}. + * @param ctx the parse tree + */ + void exitCatchProduction(TypeScriptParser.CatchProductionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#assignable}. + * @param ctx the parse tree + */ + void enterAssignable(TypeScriptParser.AssignableContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#assignable}. + * @param ctx the parse tree + */ + void exitAssignable(TypeScriptParser.AssignableContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#finallyProduction}. + * @param ctx the parse tree + */ + void enterFinallyProduction(TypeScriptParser.FinallyProductionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#finallyProduction}. + * @param ctx the parse tree + */ + void exitFinallyProduction(TypeScriptParser.FinallyProductionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#debuggerStatement}. + * @param ctx the parse tree + */ + void enterDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#debuggerStatement}. + * @param ctx the parse tree + */ + void exitDebuggerStatement(TypeScriptParser.DebuggerStatementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionDeclaration(TypeScriptParser.FunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(TypeScriptParser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classHeritage}. + * @param ctx the parse tree + */ + void enterClassHeritage(TypeScriptParser.ClassHeritageContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classHeritage}. + * @param ctx the parse tree + */ + void exitClassHeritage(TypeScriptParser.ClassHeritageContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classTail}. + * @param ctx the parse tree + */ + void enterClassTail(TypeScriptParser.ClassTailContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classTail}. + * @param ctx the parse tree + */ + void exitClassTail(TypeScriptParser.ClassTailContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classExtendsClause}. + * @param ctx the parse tree + */ + void enterClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classExtendsClause}. + * @param ctx the parse tree + */ + void exitClassExtendsClause(TypeScriptParser.ClassExtendsClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#implementsClause}. + * @param ctx the parse tree + */ + void enterImplementsClause(TypeScriptParser.ImplementsClauseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#implementsClause}. + * @param ctx the parse tree + */ + void exitImplementsClause(TypeScriptParser.ImplementsClauseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#classElement}. + * @param ctx the parse tree + */ + void enterClassElement(TypeScriptParser.ClassElementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#classElement}. + * @param ctx the parse tree + */ + void exitClassElement(TypeScriptParser.ClassElementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void enterPropertyMemberDeclaration(TypeScriptParser.PropertyMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#propertyMemberDeclaration}. + * @param ctx the parse tree + */ + void exitPropertyMemberDeclaration(TypeScriptParser.PropertyMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#propertyMemberBase}. + * @param ctx the parse tree + */ + void enterPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#propertyMemberBase}. + * @param ctx the parse tree + */ + void exitPropertyMemberBase(TypeScriptParser.PropertyMemberBaseContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#indexMemberDeclaration}. + * @param ctx the parse tree + */ + void enterIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#indexMemberDeclaration}. + * @param ctx the parse tree + */ + void exitIndexMemberDeclaration(TypeScriptParser.IndexMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorMethod}. + * @param ctx the parse tree + */ + void enterGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorMethod}. + * @param ctx the parse tree + */ + void exitGeneratorMethod(TypeScriptParser.GeneratorMethodContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorFunctionDeclaration}. + * @param ctx the parse tree + */ + void enterGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorFunctionDeclaration}. + * @param ctx the parse tree + */ + void exitGeneratorFunctionDeclaration(TypeScriptParser.GeneratorFunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorBlock}. + * @param ctx the parse tree + */ + void enterGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorBlock}. + * @param ctx the parse tree + */ + void exitGeneratorBlock(TypeScriptParser.GeneratorBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#generatorDefinition}. + * @param ctx the parse tree + */ + void enterGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#generatorDefinition}. + * @param ctx the parse tree + */ + void exitGeneratorDefinition(TypeScriptParser.GeneratorDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#iteratorBlock}. + * @param ctx the parse tree + */ + void enterIteratorBlock(TypeScriptParser.IteratorBlockContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#iteratorBlock}. + * @param ctx the parse tree + */ + void exitIteratorBlock(TypeScriptParser.IteratorBlockContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#iteratorDefinition}. + * @param ctx the parse tree + */ + void enterIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#iteratorDefinition}. + * @param ctx the parse tree + */ + void exitIteratorDefinition(TypeScriptParser.IteratorDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#formalParameterList}. + * @param ctx the parse tree + */ + void enterFormalParameterList(TypeScriptParser.FormalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#formalParameterList}. + * @param ctx the parse tree + */ + void exitFormalParameterList(TypeScriptParser.FormalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#formalParameterArg}. + * @param ctx the parse tree + */ + void enterFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#formalParameterArg}. + * @param ctx the parse tree + */ + void exitFormalParameterArg(TypeScriptParser.FormalParameterArgContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#lastFormalParameterArg}. + * @param ctx the parse tree + */ + void enterLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#lastFormalParameterArg}. + * @param ctx the parse tree + */ + void exitLastFormalParameterArg(TypeScriptParser.LastFormalParameterArgContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionBody}. + * @param ctx the parse tree + */ + void enterFunctionBody(TypeScriptParser.FunctionBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionBody}. + * @param ctx the parse tree + */ + void exitFunctionBody(TypeScriptParser.FunctionBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#sourceElements}. + * @param ctx the parse tree + */ + void enterSourceElements(TypeScriptParser.SourceElementsContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#sourceElements}. + * @param ctx the parse tree + */ + void exitSourceElements(TypeScriptParser.SourceElementsContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrayLiteral}. + * @param ctx the parse tree + */ + void enterArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrayLiteral}. + * @param ctx the parse tree + */ + void exitArrayLiteral(TypeScriptParser.ArrayLiteralContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#elementList}. + * @param ctx the parse tree + */ + void enterElementList(TypeScriptParser.ElementListContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#elementList}. + * @param ctx the parse tree + */ + void exitElementList(TypeScriptParser.ElementListContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#lastElement}. + * @param ctx the parse tree + */ + void enterLastElement(TypeScriptParser.LastElementContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#lastElement}. + * @param ctx the parse tree + */ + void exitLastElement(TypeScriptParser.LastElementContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#objectLiteral}. + * @param ctx the parse tree + */ + void enterObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#objectLiteral}. + * @param ctx the parse tree + */ + void exitObjectLiteral(TypeScriptParser.ObjectLiteralContext ctx); + /** + * Enter a parse tree produced by the {@code PropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx); + /** + * Exit a parse tree produced by the {@code PropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertyExpressionAssignment(TypeScriptParser.PropertyExpressionAssignmentContext ctx); + /** + * Enter a parse tree produced by the {@code ComputedPropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx); + /** + * Exit a parse tree produced by the {@code ComputedPropertyExpressionAssignment} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitComputedPropertyExpressionAssignment(TypeScriptParser.ComputedPropertyExpressionAssignmentContext ctx); + /** + * Enter a parse tree produced by the {@code FunctionProperty} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterFunctionProperty(TypeScriptParser.FunctionPropertyContext ctx); + /** + * Exit a parse tree produced by the {@code FunctionProperty} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitFunctionProperty(TypeScriptParser.FunctionPropertyContext ctx); + /** + * Enter a parse tree produced by the {@code PropertyGetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertyGetter(TypeScriptParser.PropertyGetterContext ctx); + /** + * Exit a parse tree produced by the {@code PropertyGetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertyGetter(TypeScriptParser.PropertyGetterContext ctx); + /** + * Enter a parse tree produced by the {@code PropertySetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertySetter(TypeScriptParser.PropertySetterContext ctx); + /** + * Exit a parse tree produced by the {@code PropertySetter} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertySetter(TypeScriptParser.PropertySetterContext ctx); + /** + * Enter a parse tree produced by the {@code MethodProperty} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterMethodProperty(TypeScriptParser.MethodPropertyContext ctx); + /** + * Exit a parse tree produced by the {@code MethodProperty} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitMethodProperty(TypeScriptParser.MethodPropertyContext ctx); + /** + * Enter a parse tree produced by the {@code PropertyShorthand} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx); + /** + * Exit a parse tree produced by the {@code PropertyShorthand} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitPropertyShorthand(TypeScriptParser.PropertyShorthandContext ctx); + /** + * Enter a parse tree produced by the {@code RestParameterInObject} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void enterRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx); + /** + * Exit a parse tree produced by the {@code RestParameterInObject} + * labeled alternative in {@link TypeScriptParser#propertyAssignment}. + * @param ctx the parse tree + */ + void exitRestParameterInObject(TypeScriptParser.RestParameterInObjectContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#getAccessor}. + * @param ctx the parse tree + */ + void enterGetAccessor(TypeScriptParser.GetAccessorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#getAccessor}. + * @param ctx the parse tree + */ + void exitGetAccessor(TypeScriptParser.GetAccessorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#setAccessor}. + * @param ctx the parse tree + */ + void enterSetAccessor(TypeScriptParser.SetAccessorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#setAccessor}. + * @param ctx the parse tree + */ + void exitSetAccessor(TypeScriptParser.SetAccessorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#propertyName}. + * @param ctx the parse tree + */ + void enterPropertyName(TypeScriptParser.PropertyNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#propertyName}. + * @param ctx the parse tree + */ + void exitPropertyName(TypeScriptParser.PropertyNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(TypeScriptParser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(TypeScriptParser.ArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#lastArgument}. + * @param ctx the parse tree + */ + void enterLastArgument(TypeScriptParser.LastArgumentContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#lastArgument}. + * @param ctx the parse tree + */ + void exitLastArgument(TypeScriptParser.LastArgumentContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#expressionSequence}. + * @param ctx the parse tree + */ + void enterExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#expressionSequence}. + * @param ctx the parse tree + */ + void exitExpressionSequence(TypeScriptParser.ExpressionSequenceContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#functionExpressionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#functionExpressionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionExpressionDeclaration(TypeScriptParser.FunctionExpressionDeclarationContext ctx); + /** + * Enter a parse tree produced by the {@code TemplateStringExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code TemplateStringExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitTemplateStringExpression(TypeScriptParser.TemplateStringExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code GeneratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code GeneratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitGeneratorsExpression(TypeScriptParser.GeneratorsExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PowerExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPowerExpression(TypeScriptParser.PowerExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PowerExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPowerExpression(TypeScriptParser.PowerExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code InExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterInExpression(TypeScriptParser.InExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code InExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitInExpression(TypeScriptParser.InExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code GenericTypes} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterGenericTypes(TypeScriptParser.GenericTypesContext ctx); + /** + * Exit a parse tree produced by the {@code GenericTypes} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitGenericTypes(TypeScriptParser.GenericTypesContext ctx); + /** + * Enter a parse tree produced by the {@code ArgumentsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ArgumentsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitArgumentsExpression(TypeScriptParser.ArgumentsExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ThisExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterThisExpression(TypeScriptParser.ThisExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ThisExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitThisExpression(TypeScriptParser.ThisExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code TypeofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code TypeofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitTypeofExpression(TypeScriptParser.TypeofExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code GeneratorsFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code GeneratorsFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitGeneratorsFunctionExpression(TypeScriptParser.GeneratorsFunctionExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code EqualityExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code EqualityExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitEqualityExpression(TypeScriptParser.EqualityExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitXOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitXOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitXOrExpression(TypeScriptParser.BitXOrExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MultiplicativeExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MultiplicativeExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitMultiplicativeExpression(TypeScriptParser.MultiplicativeExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitShiftExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitShiftExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitShiftExpression(TypeScriptParser.BitShiftExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AdditiveExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code AdditiveExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitAdditiveExpression(TypeScriptParser.AdditiveExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code RelationalExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code RelationalExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitRelationalExpression(TypeScriptParser.RelationalExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitNotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitNotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitNotExpression(TypeScriptParser.BitNotExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code NewExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterNewExpression(TypeScriptParser.NewExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code NewExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitNewExpression(TypeScriptParser.NewExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code LiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code LiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitLiteralExpression(TypeScriptParser.LiteralExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ArrayLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ArrayLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitArrayLiteralExpression(TypeScriptParser.ArrayLiteralExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MemberDotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MemberDotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitMemberDotExpression(TypeScriptParser.MemberDotExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code MemberIndexExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code MemberIndexExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitMemberIndexExpression(TypeScriptParser.MemberIndexExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitAndExpression(TypeScriptParser.BitAndExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code BitOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code BitOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitBitOrExpression(TypeScriptParser.BitOrExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AssignmentOperatorExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code AssignmentOperatorExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitAssignmentOperatorExpression(TypeScriptParser.AssignmentOperatorExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code VoidExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterVoidExpression(TypeScriptParser.VoidExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code VoidExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitVoidExpression(TypeScriptParser.VoidExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code TernaryExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code TernaryExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitTernaryExpression(TypeScriptParser.TernaryExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code LogicalAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code LogicalAndExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitLogicalAndExpression(TypeScriptParser.LogicalAndExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PreIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PreIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPreIncrementExpression(TypeScriptParser.PreIncrementExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ObjectLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ObjectLiteralExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitObjectLiteralExpression(TypeScriptParser.ObjectLiteralExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code LogicalOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code LogicalOrExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitLogicalOrExpression(TypeScriptParser.LogicalOrExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code NotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterNotExpression(TypeScriptParser.NotExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code NotExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitNotExpression(TypeScriptParser.NotExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PreDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PreDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPreDecreaseExpression(TypeScriptParser.PreDecreaseExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AwaitExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterAwaitExpression(TypeScriptParser.AwaitExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code AwaitExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitAwaitExpression(TypeScriptParser.AwaitExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code FunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code FunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitFunctionExpression(TypeScriptParser.FunctionExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code UnaryMinusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code UnaryMinusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitUnaryMinusExpression(TypeScriptParser.UnaryMinusExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code AssignmentExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code AssignmentExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitAssignmentExpression(TypeScriptParser.AssignmentExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PostDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PostDecreaseExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPostDecreaseExpression(TypeScriptParser.PostDecreaseExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code InstanceofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code InstanceofExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitInstanceofExpression(TypeScriptParser.InstanceofExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code UnaryPlusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code UnaryPlusExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitUnaryPlusExpression(TypeScriptParser.UnaryPlusExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code DeleteExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code DeleteExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitDeleteExpression(TypeScriptParser.DeleteExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ArrowFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ArrowFunctionExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitArrowFunctionExpression(TypeScriptParser.ArrowFunctionExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code IteratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code IteratorsExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitIteratorsExpression(TypeScriptParser.IteratorsExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code SuperExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterSuperExpression(TypeScriptParser.SuperExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code SuperExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitSuperExpression(TypeScriptParser.SuperExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ParenthesizedExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ParenthesizedExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitParenthesizedExpression(TypeScriptParser.ParenthesizedExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code PostIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code PostIncrementExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitPostIncrementExpression(TypeScriptParser.PostIncrementExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code YieldExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterYieldExpression(TypeScriptParser.YieldExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code YieldExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitYieldExpression(TypeScriptParser.YieldExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code ClassExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterClassExpression(TypeScriptParser.ClassExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code ClassExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitClassExpression(TypeScriptParser.ClassExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code IdentifierExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code IdentifierExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitIdentifierExpression(TypeScriptParser.IdentifierExpressionContext ctx); + /** + * Enter a parse tree produced by the {@code CoalesceExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void enterCoalesceExpression(TypeScriptParser.CoalesceExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code CoalesceExpression} + * labeled alternative in {@link TypeScriptParser#singleExpression}. + * @param ctx the parse tree + */ + void exitCoalesceExpression(TypeScriptParser.CoalesceExpressionContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrowFunctionDeclaration}. + * @param ctx the parse tree + */ + void enterArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrowFunctionDeclaration}. + * @param ctx the parse tree + */ + void exitArrowFunctionDeclaration(TypeScriptParser.ArrowFunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrowFunctionParameters}. + * @param ctx the parse tree + */ + void enterArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrowFunctionParameters}. + * @param ctx the parse tree + */ + void exitArrowFunctionParameters(TypeScriptParser.ArrowFunctionParametersContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#arrowFunctionBody}. + * @param ctx the parse tree + */ + void enterArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#arrowFunctionBody}. + * @param ctx the parse tree + */ + void exitArrowFunctionBody(TypeScriptParser.ArrowFunctionBodyContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#assignmentOperator}. + * @param ctx the parse tree + */ + void enterAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#assignmentOperator}. + * @param ctx the parse tree + */ + void exitAssignmentOperator(TypeScriptParser.AssignmentOperatorContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(TypeScriptParser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(TypeScriptParser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#numericLiteral}. + * @param ctx the parse tree + */ + void enterNumericLiteral(TypeScriptParser.NumericLiteralContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#numericLiteral}. + * @param ctx the parse tree + */ + void exitNumericLiteral(TypeScriptParser.NumericLiteralContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#identifierName}. + * @param ctx the parse tree + */ + void enterIdentifierName(TypeScriptParser.IdentifierNameContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#identifierName}. + * @param ctx the parse tree + */ + void exitIdentifierName(TypeScriptParser.IdentifierNameContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#reservedWord}. + * @param ctx the parse tree + */ + void enterReservedWord(TypeScriptParser.ReservedWordContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#reservedWord}. + * @param ctx the parse tree + */ + void exitReservedWord(TypeScriptParser.ReservedWordContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#keyword}. + * @param ctx the parse tree + */ + void enterKeyword(TypeScriptParser.KeywordContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#keyword}. + * @param ctx the parse tree + */ + void exitKeyword(TypeScriptParser.KeywordContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#getter}. + * @param ctx the parse tree + */ + void enterGetter(TypeScriptParser.GetterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#getter}. + * @param ctx the parse tree + */ + void exitGetter(TypeScriptParser.GetterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#setter}. + * @param ctx the parse tree + */ + void enterSetter(TypeScriptParser.SetterContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#setter}. + * @param ctx the parse tree + */ + void exitSetter(TypeScriptParser.SetterContext ctx); + /** + * Enter a parse tree produced by {@link TypeScriptParser#eos}. + * @param ctx the parse tree + */ + void enterEos(TypeScriptParser.EosContext ctx); + /** + * Exit a parse tree produced by {@link TypeScriptParser#eos}. + * @param ctx the parse tree + */ + void exitEos(TypeScriptParser.EosContext ctx); +} diff --git a/docs/compare/src/test/java/com/compare/PythonIdentAppTest.java b/docs/compare/src/test/java/com/compare/PythonIdentAppTest.java new file mode 100644 index 0000000000000000000000000000000000000000..8f3fa724cabeba5beb86272f383bc3f95b1055c8 --- /dev/null +++ b/docs/compare/src/test/java/com/compare/PythonIdentAppTest.java @@ -0,0 +1,91 @@ +package com.compare; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class PythonIdentAppTest { + + @Test + void processString() { + String s = "class foo:\n pass\n"; + PythonIdentApp.processString(s); + } + + @Test + void testStar() { + String s = "# argument\n" + + "# : test (comp_for | ASSIGN test)?\n" + + "# | (POWER | STAR) test\n" + + "# ;\n" + + "\n" + + "# test\n" + + "b(x)\n" + + "\n" + + "# test comp_for\n" + + "b(x for x in a)\n" + + "\n" + + "# test ASSIGN test\n" + + "b(x=i)\n" + + "\n" + + "# test COMMA test ASSIGN test COMMA test ASSIGN test\n" + + "b(z, x=i, y=u)\n" + + "\n" + + "# POWER test\n" + + "b(**z)\n" + + "\n" + + "# STAR test\n" + + "b(*z)\n" + + "\n" + + "# test COMMA STAR test COMMA test ASSIGN test\n" + + "b(y, *z, x=i)\n"; + PythonIdentApp.processString(s); + } + + @Test + void testPy2() { + String s = "print 'a'"; + PythonIdentApp.processString(s); + } + + @Test + void testPy3() { + String s = "print('a')"; + PythonIdentApp.processString(s); + } + @Test + void testTryStmt() { + String s = "# try_stmt: TRY COLON suite (except_clause+ else_clause? finaly_clause? | finaly_clause)\n" + + "\n" + + "# TRY COLON suite except_clause\n" + + "try:\n" + + " pass\n" + + "except:\n" + + " pass\n" + + "\n" + + "# TRY COLON suite except_clause except_clause else_clause\n" + + "try:\n" + + " pass\n" + + "except Exception as ex:\n" + + " pass\n" + + "except:\n" + + " pass\n" + + "else:\n" + + " pass\n" + + "\n" + + "# TRY COLON suite except_clause finaly_clause\n" + + "try:\n" + + " pass\n" + + "except Exception:\n" + + " pass\n" + + "finally:\n" + + " pass\n" + + "\n" + + "# TRY COLON suite finaly_clause\n" + + "try:\n" + + " pass\n" + + "finally:\n" + + " pass\n"; + PythonIdentApp.processString(s); + } +} diff --git a/docs/compare/src/test/java/com/compare/TsIdentAppTest.java b/docs/compare/src/test/java/com/compare/TsIdentAppTest.java new file mode 100644 index 0000000000000000000000000000000000000000..6767952247aaf533f6b17a7dc6b09c7486942fa8 --- /dev/null +++ b/docs/compare/src/test/java/com/compare/TsIdentAppTest.java @@ -0,0 +1,36 @@ +package com.compare; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class TsIdentAppTest { + @Test + void shouldHandleField() { + String str = "passport.use(new FacebookStrategy({}, (req: any, accessToken, refreshToken, profile, done) => {\n" + + " if (req.user) {\n" + + " User.findOne({ facebook: profile.id }, (err, existingUser) => {\n" + + " if (err) { return done(err); }\n" + + " if (existingUser) {\n" + + " req.flash(\"errors\", { msg: \"There is already a Facebook account that belongs to you. Sign in with that account or delete it, then link it with your current account.\" });\n" + + " done(err);\n" + + " } else {\n" + + " User.findById(req.user.id, (err, user: any) => {\n" + + " if (err) { return done(err); }\n" + + " user.facebook = profile.id;\n" + + " user.tokens.push({ kind: \"facebook\", accessToken });\n" + + " user.profile.name = user.profile.name || `${profile.name.givenName} ${profile.name.familyName}`;\n" + + " user.profile.gender = user.profile.gender || profile._json.gender;\n" + + " user.profile.picture = user.profile.picture || `https://graph.facebook.com/${profile.id}/picture?type=large`;\n" + + " user.save((err: Error) => {\n" + + " req.flash(\"info\", { msg: \"Facebook account has been linked.\" });\n" + + " done(err, user);\n" + + " });\n" + + " });\n" + + " }\n" + + " });\n" + + " }\n" + + "}));\n"; + TsIdentApp.processString(str); + } +} diff --git a/docs/images/model.svg b/docs/images/model.svg index c798075eec9319515c61277e67d7712b6720d4a7..d10c8a81d27452063c265d96d8780dff4596c55f 100644 --- a/docs/images/model.svg +++ b/docs/images/model.svg @@ -61,10 +61,10 @@ Make Static - Instance Method - Behavior Drivent + Behavior Driven - TypeTypet + TypeType ... Parameters @@ -78,8 +78,8 @@ Observer - - REST API Designt + + REST API Design Big ball of mud @@ -94,7 +94,7 @@ by Exp… - common common + common's common God Class diff --git a/docs/patterns/test-bad-smells.md b/docs/patterns/test-bad-smells.md new file mode 100644 index 0000000000000000000000000000000000000000..bc5fd82b2e571176b2f4c73aa1721e86ed5343da --- /dev/null +++ b/docs/patterns/test-bad-smells.md @@ -0,0 +1,49 @@ +# Test Data + +Source: + +| System | Description | Classes | Methods | KLOCs | Test Methods | +|--------|-------------|---------|---------|-------|-----------------| +Apache Ant 1.8.3 | Java library and command-line tool to build systems | 813 | 8,540 | 204 | 3,097 +Apache Cassandra 1.1 | Scalable DB Management System | 586 | 5,730 | 111 | 586 +Apache Derby 10.9 | Relational DB Management System | 1,929 | 28,119 | 734 | 426 +Apache Hive 0.9 Data | Warehouse Software Facilities Provider | 1,115 | 9,572 | 204 | 58 +Apache Ivy 2.1.0x | Flexible Dependency Manager | 349 | 3,775 | 58 | 793 +Apache Hbase 0.94 | Distributed DB System | 699 | 8,148 | 271 | 604 +Apache Karaf 2.3 | Standalone Software Container | 470 | 2,678 | 56 | 199 +Apache Lucene 3.6 | Search Engine | 2,246 | 17,021 | 466 | 3,895 +Apache Nutch 1.4 | Web-search Software built on Lucene | 259 | 1,937 | 51 | 389 +Apache Pig 0.8 | Large Dataset Query Maker | 922 | 7,619 | 184 | 449 +Apache Qpid 0.18 | AMQP-based Messaging Tool | 922 | 9,777 | 193 | 786 +Apache Struts 3.0 | MVC Framework | 1,002 | 7,506 | 152 | 1,751 +Apache Wicket 1.4.20 | Java Serverside Web Framework | 825 | 6,900 | 179 | 1,553 +Elastic Search 0.19 | RESTful Search Engine | 2,265 | 17,095 | 316 | 397 +Hibernate 4 | Java Persistence Manager | 154 | 2,387 | 47 | 132 +JHotDraw 7.6 | Java GUI Framework for Technical Graphics | 679 | 6,687 | 135 | 516 +JFreeChart 1.0.14 | Java Chart Library | 775 | 8,746 | 231 | 3,842 +HSQLDB 2.2.8 | HyperSQL Database Engine | 444 | 8,808 | 260 | 59 +Overall | - | 16,454 | 161,045 |3,852 | 19,532 + +Issues + +| Test Smell | Rule | +|------------------|---------------------| +Resource Optimism | JUnit methods using an external resource without checking its status. +Indirect Testing | JUnit methods invoking, besides methods of the corresponding production class, methods of other classes in the production code. +Test Run War | JUnit methods that allocate resources that are also used by other test methods (e.g., temporary files) + +Flaky Tests + +| Category | Description | +|----------|------------| +Async Wait | A test method making an asynchronous call and that does not wait for the result of the call. +Concurrency | Different threads interact in a non-desirable manner. +Test Order Dependency | The test outcome depends on the order of execution of the tests. +Resource Leak | The test method does not properly acquire or release one or more of its resources. +Network Test | execution depends on the network performance. +Time | The test method relies on the system time. +IO | The test method does not properly manage external resources. +Randomness | The test method uses random number. +Floating Point Operation | The test method performs floating-point operations. +Unordered Collections | Test outcome depends on the order of collections. + diff --git a/docs/patterns/todo.md b/docs/patterns/todo.md new file mode 100644 index 0000000000000000000000000000000000000000..b92c5171656436e1c3daac55810632bb7c803e5f --- /dev/null +++ b/docs/patterns/todo.md @@ -0,0 +1,34 @@ +http://2005.msrconf.org/papers/24.pdf + + +Categories Example +communication: // TODO an ugly hack for now -sue. Joan, please fix it +point-to-point +communication: // TODO joan: explain why this [method] is public, since it +multi-cast/broadcast is used only internally +communication: // TODO [..] remove tracery if cell-editing is ever stable +self-communication +pointer to a change request RichAttributeComparison.java: // TODO pam: ECR 311: get +copy-text button to work +AttributeViewerImpl.java: // TODO pam: ECR 311: handle the +case of multiple Node-*types* +bookmark: // TODO an ugly hack for now -sue. Joan, please fix it +hack +bookmark: // TODO joan EXPERIMENTAL +experimental fix +current task: // TODO [..] make this work using subtyping, not parsing the +refactoring String type-name! +current task: // TODO Auto-generated method stub +from automatically generated code +future task: // TODO pam: once we have the Eclipse-icon-Decorator +once the library is available... mechanism, use it here +future task: // TODO [..] eliminate this once ECR 317 complete +once some code modification is complete ... +location marker: // TODO +point location +location marker: // TODO Workaround for [..] +range location [..] +// [..] End Workaround +concern tag in 12 places in the code: TODO pam: null-guard case of [..] +[input] corruption +Table 1: Eclipse task comment categorization \ No newline at end of file diff --git a/docs/stories/1nDSIHPWg-method-call-to-story.feature b/docs/stories/1nDSIHPWg-method-call-to-story.feature new file mode 100644 index 0000000000000000000000000000000000000000..157d881798622bd522f227df902157749d0d21a8 --- /dev/null +++ b/docs/stories/1nDSIHPWg-method-call-to-story.feature @@ -0,0 +1,15 @@ +# id: 1nDSIHPWg +# startDate: 2020-01-09T15:32:29Z +# endDate: 2020-01-09T15:32:29Z +# priority: +# status: +# author: +# title: method call to story +# language: zh-CN +@math +功能:method call to story + + 场景: + 假设 我已经有了所有的 method call + 当 我执行 `coca story` 时 + 那么 我应该得到一个故事 diff --git a/stories/4c02dVfZg-NLP-from-database-Schema.feature b/docs/stories/4c02dVfZg-NLP-from-database-Schema.feature similarity index 100% rename from stories/4c02dVfZg-NLP-from-database-Schema.feature rename to docs/stories/4c02dVfZg-NLP-from-database-Schema.feature diff --git a/docs/stories/EPwMwfLWg-online-github-project-analysis.feature b/docs/stories/EPwMwfLWg-online-github-project-analysis.feature new file mode 100644 index 0000000000000000000000000000000000000000..c6974a73aa606e849664cdd97489dd28f6415731 --- /dev/null +++ b/docs/stories/EPwMwfLWg-online-github-project-analysis.feature @@ -0,0 +1,16 @@ +# id: EPwMwfLWg +# startDate: 2020-01-02T02:20:53Z +# endDate: 2020-01-02T02:20:53Z +# priority: +# status: +# author: +# title: online github project analysis +# language: zh-CN +@math +功能:online github project analysis + + 场景: + 假设: + 当: + 并且: + 那么: diff --git a/stories/MomaHFBWg-Code-Complexity-by-files.feature b/docs/stories/MomaHFBWg-Code-Complexity-by-files.feature similarity index 100% rename from stories/MomaHFBWg-Code-Complexity-by-files.feature rename to docs/stories/MomaHFBWg-Code-Complexity-by-files.feature diff --git a/stories/ayGA3GfZR-NLP-from-method-Name.feature b/docs/stories/ayGA3GfZR-NLP-from-method-Name.feature similarity index 100% rename from stories/ayGA3GfZR-NLP-from-method-Name.feature rename to docs/stories/ayGA3GfZR-NLP-from-method-Name.feature diff --git a/stories/yXqVVzYWR-suggest-to-design-pattern-api.feature b/docs/stories/yXqVVzYWR-suggest-to-design-pattern-api.feature similarity index 100% rename from stories/yXqVVzYWR-suggest-to-design-pattern-api.feature rename to docs/stories/yXqVVzYWR-suggest-to-design-pattern-api.feature diff --git a/go.mod b/go.mod index be474802859ff2e543f0f80c64c2d87f6e4fa9fb..9b3e55bd1a7465b6a2ef657fe95ae4439ba8ed13 100644 --- a/go.mod +++ b/go.mod @@ -3,21 +3,26 @@ module github.com/phodal/coca go 1.13 require ( - github.com/antlr/antlr4 v0.0.0-20191031194250-3fcb6da1f690 + github.com/antlr/antlr4 v0.0.0-20201020194047-0a7eaede42b0 github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab - github.com/boyter/scc v2.10.1+incompatible - github.com/dbaggerman/cuba v0.3.2 // indirect + github.com/boyter/scc v0.0.0-20200907020550-91af61dfda0d + github.com/huleTW/bad-smell-analysis v0.1.0 github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 + github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect + github.com/mattn/go-colorable v0.1.7 // indirect github.com/mattn/go-shellwords v1.0.6 - github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect - github.com/monochromegane/go-gitignore v0.0.0-20160105113617-38717d0a108c // indirect github.com/olekukonko/tablewriter v0.0.4 github.com/onsi/ginkgo v1.10.3 // indirect github.com/onsi/gomega v1.7.1 github.com/pkg/errors v0.8.1 github.com/pkg/profile v1.3.0 github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 + github.com/sergi/go-diff v1.1.0 // indirect github.com/spf13/cobra v0.0.5 + github.com/yourbasic/radix v0.0.0-20180308122924-cbe1cc82e907 + github.com/yudai/gojsondiff v1.0.0 + github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect + github.com/yudai/pp v2.0.1+incompatible // indirect golang.org/x/exp v0.0.0-20191224044220-1fea468a75e9 // indirect gonum.org/v1/gonum v0.6.2 ) diff --git a/go.sum b/go.sum index 6c11dc3ab050b245afce482decdab4ff4589a6ca..79301d4ac8a1bb5a18ab3a6db4daa3a94a77456e 100644 --- a/go.sum +++ b/go.sum @@ -2,13 +2,15 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/antlr/antlr4 v0.0.0-20191031194250-3fcb6da1f690 h1:ZxuHyCRVyeoXhu/PK93BvZP66NoNIsSZzCykW5MezKc= -github.com/antlr/antlr4 v0.0.0-20191031194250-3fcb6da1f690/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= +github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f h1:0cEys61Sr2hUBEXfNV8eyQP01oZuBgoMeHunebPirK8= +github.com/antlr/antlr4 v0.0.0-20200503195918-621b933c7a7f/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= +github.com/antlr/antlr4 v0.0.0-20201020194047-0a7eaede42b0 h1:7RW94Pqb4Twsfpz42ALQ+sD0cUUpN8HF4uzKyQf2D8Y= +github.com/antlr/antlr4 v0.0.0-20201020194047-0a7eaede42b0/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab h1:+cdNqtOJWjvepyhxy23G7z7vmpYCoC65AP0nqi1f53s= github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= -github.com/boyter/scc v2.10.1+incompatible h1:0bg2TmmduZjvoSqz0dfF3W3jfibgEFv2XOsKItTjarU= -github.com/boyter/scc v2.10.1+incompatible/go.mod h1:VB5w4e0dahmIiKnpZ7LRh/sjauoY0BmCWjIzZcShNY0= +github.com/boyter/scc v0.0.0-20200907020550-91af61dfda0d h1:5JNO0540xThPrm7UO3Uy+UGep8rhh7w4i36NWU6+3Oc= +github.com/boyter/scc v0.0.0-20200907020550-91af61dfda0d/go.mod h1:zC/HNng+aBSmaB3afm1TRvqFahQOBaIH9p6uiINj5Ao= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -25,16 +27,30 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huleTW/bad-smell-analysis v0.1.0 h1:mEVtiekah7S2X5CqyeakCDUcWyO3v0QruJDNh7JzX+s= +github.com/huleTW/bad-smell-analysis v0.1.0/go.mod h1:m/G88wmnOY6Qii7BkXlx8Omm8LLK3bvT+J7HqFQ4Jak= github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 h1:VHgatEHNcBFEB7inlalqfNqw65aNkM1lGX2yt3NmbS8= github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.6 h1:9Jok5pILi5S1MnDirGVTufYGtksUs/V2BWUP3ZkeUUI= @@ -43,8 +59,10 @@ github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/monochromegane/go-gitignore v0.0.0-20160105113617-38717d0a108c h1:RRUev95N3Gq4Aog4avFzXJA2V8fgXmND+cvcH7KLMyk= -github.com/monochromegane/go-gitignore v0.0.0-20160105113617-38717d0a108c/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -62,8 +80,11 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94 h1:G04eS0JkAIVZfaJLjla9dNxkJCPiKIGZlw9AfOhzOD0= github.com/sabhiram/go-gitignore v0.0.0-20180611051255-d3107576ba94/go.mod h1:b18R55ulyQ/h3RaWyloPyER7fWQVZvimKKhnI5OfrJQ= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -74,8 +95,17 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yourbasic/radix v0.0.0-20180308122924-cbe1cc82e907 h1:S5h7yNKStqF8CqFtgtMNMzk/lUI3p82LrX6h2BhlsTM= +github.com/yourbasic/radix v0.0.0-20180308122924-cbe1cc82e907/go.mod h1:/7Fy/4/OyrkguTf2i2pO4erUD/8QAlrlmXSdSJPu678= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -107,6 +137,9 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -122,6 +155,7 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6d gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= @@ -129,4 +163,5 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/languages/comment/CommentLexer.interp b/languages/comment/CommentLexer.interp new file mode 100644 index 0000000000000000000000000000000000000000..8b07ff79d21c5c5269cdd436617e61a09e8594bd --- /dev/null +++ b/languages/comment/CommentLexer.interp @@ -0,0 +1,213 @@ +token literal names: +null +null +null +null +null +null +null +null +null +null +null +null +null +'null' +'(' +')' +'{' +'}' +'[' +']' +';' +',' +'.' +'=' +'>' +'<' +'!' +'~' +'?' +':' +'==' +'<=' +'>=' +'!=' +'&&' +'||' +'++' +'--' +'+' +'-' +'*' +'/' +'&' +'|' +'^' +'%' +'+=' +'-=' +'*=' +'/=' +'&=' +'|=' +'^=' +'%=' +'<<=' +'>>=' +'>>>=' +null +'->' +'::' +'@' +'...' +null +null + +token symbolic names: +null +COMMENT +LINE_COMMENT +PYTHON_COMMENT +DECIMAL_LITERAL +HEX_LITERAL +OCT_LITERAL +BINARY_LITERAL +FLOAT_LITERAL +HEX_FLOAT_LITERAL +BOOL_LITERAL +CHAR_LITERAL +STRING_LITERAL +NULL_LITERAL +LPAREN +RPAREN +LBRACE +RBRACE +LBRACK +RBRACK +SEMI +COMMA +DOT +ASSIGN +GT +LT +BANG +TILDE +QUESTION +COLON +EQUAL +LE +GE +NOTEQUAL +AND +OR +INC +DEC +ADD +SUB +MUL +DIV +BITAND +BITOR +CARET +MOD +ADD_ASSIGN +SUB_ASSIGN +MUL_ASSIGN +DIV_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +MOD_ASSIGN +LSHIFT_ASSIGN +RSHIFT_ASSIGN +URSHIFT_ASSIGN +TemplateStringLiteral +ARROW +COLONCOLON +AT +ELLIPSIS +WS +IDENTIFIER + +rule names: +COMMENT +LINE_COMMENT +PYTHON_COMMENT +DECIMAL_LITERAL +HEX_LITERAL +OCT_LITERAL +BINARY_LITERAL +FLOAT_LITERAL +HEX_FLOAT_LITERAL +BOOL_LITERAL +CHAR_LITERAL +STRING_LITERAL +NULL_LITERAL +LPAREN +RPAREN +LBRACE +RBRACE +LBRACK +RBRACK +SEMI +COMMA +DOT +ASSIGN +GT +LT +BANG +TILDE +QUESTION +COLON +EQUAL +LE +GE +NOTEQUAL +AND +OR +INC +DEC +ADD +SUB +MUL +DIV +BITAND +BITOR +CARET +MOD +ADD_ASSIGN +SUB_ASSIGN +MUL_ASSIGN +DIV_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +MOD_ASSIGN +LSHIFT_ASSIGN +RSHIFT_ASSIGN +URSHIFT_ASSIGN +TemplateStringLiteral +ARROW +COLONCOLON +AT +ELLIPSIS +WS +IDENTIFIER +ExponentPart +EscapeSequence +HexDigits +HexDigit +Digits +LetterOrDigit +Letter + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 65, 532, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 148, 10, 2, 12, 2, 14, 2, 151, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 162, 10, 3, 12, 3, 14, 3, 165, 11, 3, 3, 3, 3, 3, 3, 4, 3, 4, 7, 4, 171, 10, 4, 12, 4, 14, 4, 174, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 5, 5, 181, 10, 5, 3, 5, 6, 5, 184, 10, 5, 13, 5, 14, 5, 185, 3, 5, 5, 5, 189, 10, 5, 5, 5, 191, 10, 5, 3, 5, 5, 5, 194, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 200, 10, 6, 12, 6, 14, 6, 203, 11, 6, 3, 6, 5, 6, 206, 10, 6, 3, 6, 5, 6, 209, 10, 6, 3, 7, 3, 7, 7, 7, 213, 10, 7, 12, 7, 14, 7, 216, 11, 7, 3, 7, 3, 7, 7, 7, 220, 10, 7, 12, 7, 14, 7, 223, 11, 7, 3, 7, 5, 7, 226, 10, 7, 3, 7, 5, 7, 229, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 235, 10, 8, 12, 8, 14, 8, 238, 11, 8, 3, 8, 5, 8, 241, 10, 8, 3, 8, 5, 8, 244, 10, 8, 3, 9, 3, 9, 3, 9, 5, 9, 249, 10, 9, 3, 9, 3, 9, 5, 9, 253, 10, 9, 3, 9, 5, 9, 256, 10, 9, 3, 9, 5, 9, 259, 10, 9, 3, 9, 3, 9, 3, 9, 5, 9, 264, 10, 9, 3, 9, 5, 9, 267, 10, 9, 5, 9, 269, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 275, 10, 10, 3, 10, 5, 10, 278, 10, 10, 3, 10, 3, 10, 5, 10, 282, 10, 10, 3, 10, 3, 10, 5, 10, 286, 10, 10, 3, 10, 3, 10, 5, 10, 290, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 301, 10, 11, 3, 12, 3, 12, 3, 12, 5, 12, 306, 10, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 7, 13, 313, 10, 13, 12, 13, 14, 13, 316, 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 7, 58, 438, 10, 58, 12, 58, 14, 58, 441, 11, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 6, 63, 458, 10, 63, 13, 63, 14, 63, 459, 3, 63, 3, 63, 3, 64, 3, 64, 7, 64, 466, 10, 64, 12, 64, 14, 64, 469, 11, 64, 3, 65, 3, 65, 5, 65, 473, 10, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 481, 10, 66, 3, 66, 5, 66, 484, 10, 66, 3, 66, 3, 66, 3, 66, 6, 66, 489, 10, 66, 13, 66, 14, 66, 490, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 498, 10, 66, 3, 67, 3, 67, 3, 67, 7, 67, 503, 10, 67, 12, 67, 14, 67, 506, 11, 67, 3, 67, 5, 67, 509, 10, 67, 3, 68, 3, 68, 3, 69, 3, 69, 7, 69, 515, 10, 69, 12, 69, 14, 69, 518, 11, 69, 3, 69, 5, 69, 521, 10, 69, 3, 70, 3, 70, 5, 70, 525, 10, 70, 3, 71, 3, 71, 3, 71, 3, 71, 5, 71, 531, 10, 71, 3, 149, 2, 72, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 2, 131, 2, 133, 2, 135, 2, 137, 2, 139, 2, 141, 2, 3, 2, 30, 5, 2, 12, 12, 15, 15, 8234, 8235, 4, 2, 12, 12, 14, 15, 3, 2, 51, 59, 4, 2, 78, 78, 110, 110, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 6, 2, 50, 59, 67, 72, 97, 97, 99, 104, 3, 2, 50, 57, 4, 2, 50, 57, 97, 97, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 50, 51, 97, 97, 6, 2, 70, 70, 72, 72, 102, 102, 104, 104, 4, 2, 82, 82, 114, 114, 4, 2, 45, 45, 47, 47, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 3, 2, 98, 98, 5, 2, 11, 12, 14, 15, 34, 34, 4, 2, 71, 71, 103, 103, 10, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, 3, 2, 50, 53, 3, 2, 50, 59, 4, 2, 50, 59, 97, 97, 6, 2, 38, 38, 67, 92, 97, 97, 99, 124, 4, 2, 2, 129, 55298, 56321, 3, 2, 55298, 56321, 3, 2, 56322, 57345, 2, 576, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 3, 143, 3, 2, 2, 2, 5, 157, 3, 2, 2, 2, 7, 168, 3, 2, 2, 2, 9, 190, 3, 2, 2, 2, 11, 195, 3, 2, 2, 2, 13, 210, 3, 2, 2, 2, 15, 230, 3, 2, 2, 2, 17, 268, 3, 2, 2, 2, 19, 270, 3, 2, 2, 2, 21, 300, 3, 2, 2, 2, 23, 302, 3, 2, 2, 2, 25, 309, 3, 2, 2, 2, 27, 319, 3, 2, 2, 2, 29, 324, 3, 2, 2, 2, 31, 326, 3, 2, 2, 2, 33, 328, 3, 2, 2, 2, 35, 330, 3, 2, 2, 2, 37, 332, 3, 2, 2, 2, 39, 334, 3, 2, 2, 2, 41, 336, 3, 2, 2, 2, 43, 338, 3, 2, 2, 2, 45, 340, 3, 2, 2, 2, 47, 342, 3, 2, 2, 2, 49, 344, 3, 2, 2, 2, 51, 346, 3, 2, 2, 2, 53, 348, 3, 2, 2, 2, 55, 350, 3, 2, 2, 2, 57, 352, 3, 2, 2, 2, 59, 354, 3, 2, 2, 2, 61, 356, 3, 2, 2, 2, 63, 359, 3, 2, 2, 2, 65, 362, 3, 2, 2, 2, 67, 365, 3, 2, 2, 2, 69, 368, 3, 2, 2, 2, 71, 371, 3, 2, 2, 2, 73, 374, 3, 2, 2, 2, 75, 377, 3, 2, 2, 2, 77, 380, 3, 2, 2, 2, 79, 382, 3, 2, 2, 2, 81, 384, 3, 2, 2, 2, 83, 386, 3, 2, 2, 2, 85, 388, 3, 2, 2, 2, 87, 390, 3, 2, 2, 2, 89, 392, 3, 2, 2, 2, 91, 394, 3, 2, 2, 2, 93, 396, 3, 2, 2, 2, 95, 399, 3, 2, 2, 2, 97, 402, 3, 2, 2, 2, 99, 405, 3, 2, 2, 2, 101, 408, 3, 2, 2, 2, 103, 411, 3, 2, 2, 2, 105, 414, 3, 2, 2, 2, 107, 417, 3, 2, 2, 2, 109, 420, 3, 2, 2, 2, 111, 424, 3, 2, 2, 2, 113, 428, 3, 2, 2, 2, 115, 433, 3, 2, 2, 2, 117, 444, 3, 2, 2, 2, 119, 447, 3, 2, 2, 2, 121, 450, 3, 2, 2, 2, 123, 452, 3, 2, 2, 2, 125, 457, 3, 2, 2, 2, 127, 463, 3, 2, 2, 2, 129, 470, 3, 2, 2, 2, 131, 497, 3, 2, 2, 2, 133, 499, 3, 2, 2, 2, 135, 510, 3, 2, 2, 2, 137, 512, 3, 2, 2, 2, 139, 524, 3, 2, 2, 2, 141, 530, 3, 2, 2, 2, 143, 144, 7, 49, 2, 2, 144, 145, 7, 44, 2, 2, 145, 149, 3, 2, 2, 2, 146, 148, 11, 2, 2, 2, 147, 146, 3, 2, 2, 2, 148, 151, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 149, 147, 3, 2, 2, 2, 150, 152, 3, 2, 2, 2, 151, 149, 3, 2, 2, 2, 152, 153, 7, 44, 2, 2, 153, 154, 7, 49, 2, 2, 154, 155, 3, 2, 2, 2, 155, 156, 8, 2, 2, 2, 156, 4, 3, 2, 2, 2, 157, 158, 7, 49, 2, 2, 158, 159, 7, 49, 2, 2, 159, 163, 3, 2, 2, 2, 160, 162, 10, 2, 2, 2, 161, 160, 3, 2, 2, 2, 162, 165, 3, 2, 2, 2, 163, 161, 3, 2, 2, 2, 163, 164, 3, 2, 2, 2, 164, 166, 3, 2, 2, 2, 165, 163, 3, 2, 2, 2, 166, 167, 8, 3, 2, 2, 167, 6, 3, 2, 2, 2, 168, 172, 7, 37, 2, 2, 169, 171, 10, 3, 2, 2, 170, 169, 3, 2, 2, 2, 171, 174, 3, 2, 2, 2, 172, 170, 3, 2, 2, 2, 172, 173, 3, 2, 2, 2, 173, 175, 3, 2, 2, 2, 174, 172, 3, 2, 2, 2, 175, 176, 8, 4, 2, 2, 176, 8, 3, 2, 2, 2, 177, 191, 7, 50, 2, 2, 178, 188, 9, 4, 2, 2, 179, 181, 5, 137, 69, 2, 180, 179, 3, 2, 2, 2, 180, 181, 3, 2, 2, 2, 181, 189, 3, 2, 2, 2, 182, 184, 7, 97, 2, 2, 183, 182, 3, 2, 2, 2, 184, 185, 3, 2, 2, 2, 185, 183, 3, 2, 2, 2, 185, 186, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 189, 5, 137, 69, 2, 188, 180, 3, 2, 2, 2, 188, 183, 3, 2, 2, 2, 189, 191, 3, 2, 2, 2, 190, 177, 3, 2, 2, 2, 190, 178, 3, 2, 2, 2, 191, 193, 3, 2, 2, 2, 192, 194, 9, 5, 2, 2, 193, 192, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 10, 3, 2, 2, 2, 195, 196, 7, 50, 2, 2, 196, 197, 9, 6, 2, 2, 197, 205, 9, 7, 2, 2, 198, 200, 9, 8, 2, 2, 199, 198, 3, 2, 2, 2, 200, 203, 3, 2, 2, 2, 201, 199, 3, 2, 2, 2, 201, 202, 3, 2, 2, 2, 202, 204, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 204, 206, 9, 7, 2, 2, 205, 201, 3, 2, 2, 2, 205, 206, 3, 2, 2, 2, 206, 208, 3, 2, 2, 2, 207, 209, 9, 5, 2, 2, 208, 207, 3, 2, 2, 2, 208, 209, 3, 2, 2, 2, 209, 12, 3, 2, 2, 2, 210, 214, 7, 50, 2, 2, 211, 213, 7, 97, 2, 2, 212, 211, 3, 2, 2, 2, 213, 216, 3, 2, 2, 2, 214, 212, 3, 2, 2, 2, 214, 215, 3, 2, 2, 2, 215, 217, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 217, 225, 9, 9, 2, 2, 218, 220, 9, 10, 2, 2, 219, 218, 3, 2, 2, 2, 220, 223, 3, 2, 2, 2, 221, 219, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 224, 3, 2, 2, 2, 223, 221, 3, 2, 2, 2, 224, 226, 9, 9, 2, 2, 225, 221, 3, 2, 2, 2, 225, 226, 3, 2, 2, 2, 226, 228, 3, 2, 2, 2, 227, 229, 9, 5, 2, 2, 228, 227, 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229, 14, 3, 2, 2, 2, 230, 231, 7, 50, 2, 2, 231, 232, 9, 11, 2, 2, 232, 240, 9, 12, 2, 2, 233, 235, 9, 13, 2, 2, 234, 233, 3, 2, 2, 2, 235, 238, 3, 2, 2, 2, 236, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 239, 3, 2, 2, 2, 238, 236, 3, 2, 2, 2, 239, 241, 9, 12, 2, 2, 240, 236, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 243, 3, 2, 2, 2, 242, 244, 9, 5, 2, 2, 243, 242, 3, 2, 2, 2, 243, 244, 3, 2, 2, 2, 244, 16, 3, 2, 2, 2, 245, 246, 5, 137, 69, 2, 246, 248, 7, 48, 2, 2, 247, 249, 5, 137, 69, 2, 248, 247, 3, 2, 2, 2, 248, 249, 3, 2, 2, 2, 249, 253, 3, 2, 2, 2, 250, 251, 7, 48, 2, 2, 251, 253, 5, 137, 69, 2, 252, 245, 3, 2, 2, 2, 252, 250, 3, 2, 2, 2, 253, 255, 3, 2, 2, 2, 254, 256, 5, 129, 65, 2, 255, 254, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 256, 258, 3, 2, 2, 2, 257, 259, 9, 14, 2, 2, 258, 257, 3, 2, 2, 2, 258, 259, 3, 2, 2, 2, 259, 269, 3, 2, 2, 2, 260, 266, 5, 137, 69, 2, 261, 263, 5, 129, 65, 2, 262, 264, 9, 14, 2, 2, 263, 262, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 267, 3, 2, 2, 2, 265, 267, 9, 14, 2, 2, 266, 261, 3, 2, 2, 2, 266, 265, 3, 2, 2, 2, 267, 269, 3, 2, 2, 2, 268, 252, 3, 2, 2, 2, 268, 260, 3, 2, 2, 2, 269, 18, 3, 2, 2, 2, 270, 271, 7, 50, 2, 2, 271, 281, 9, 6, 2, 2, 272, 274, 5, 133, 67, 2, 273, 275, 7, 48, 2, 2, 274, 273, 3, 2, 2, 2, 274, 275, 3, 2, 2, 2, 275, 282, 3, 2, 2, 2, 276, 278, 5, 133, 67, 2, 277, 276, 3, 2, 2, 2, 277, 278, 3, 2, 2, 2, 278, 279, 3, 2, 2, 2, 279, 280, 7, 48, 2, 2, 280, 282, 5, 133, 67, 2, 281, 272, 3, 2, 2, 2, 281, 277, 3, 2, 2, 2, 282, 283, 3, 2, 2, 2, 283, 285, 9, 15, 2, 2, 284, 286, 9, 16, 2, 2, 285, 284, 3, 2, 2, 2, 285, 286, 3, 2, 2, 2, 286, 287, 3, 2, 2, 2, 287, 289, 5, 137, 69, 2, 288, 290, 9, 14, 2, 2, 289, 288, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 20, 3, 2, 2, 2, 291, 292, 7, 118, 2, 2, 292, 293, 7, 116, 2, 2, 293, 294, 7, 119, 2, 2, 294, 301, 7, 103, 2, 2, 295, 296, 7, 104, 2, 2, 296, 297, 7, 99, 2, 2, 297, 298, 7, 110, 2, 2, 298, 299, 7, 117, 2, 2, 299, 301, 7, 103, 2, 2, 300, 291, 3, 2, 2, 2, 300, 295, 3, 2, 2, 2, 301, 22, 3, 2, 2, 2, 302, 305, 7, 41, 2, 2, 303, 306, 10, 17, 2, 2, 304, 306, 5, 131, 66, 2, 305, 303, 3, 2, 2, 2, 305, 304, 3, 2, 2, 2, 306, 307, 3, 2, 2, 2, 307, 308, 7, 41, 2, 2, 308, 24, 3, 2, 2, 2, 309, 314, 7, 36, 2, 2, 310, 313, 10, 18, 2, 2, 311, 313, 5, 131, 66, 2, 312, 310, 3, 2, 2, 2, 312, 311, 3, 2, 2, 2, 313, 316, 3, 2, 2, 2, 314, 312, 3, 2, 2, 2, 314, 315, 3, 2, 2, 2, 315, 317, 3, 2, 2, 2, 316, 314, 3, 2, 2, 2, 317, 318, 7, 36, 2, 2, 318, 26, 3, 2, 2, 2, 319, 320, 7, 112, 2, 2, 320, 321, 7, 119, 2, 2, 321, 322, 7, 110, 2, 2, 322, 323, 7, 110, 2, 2, 323, 28, 3, 2, 2, 2, 324, 325, 7, 42, 2, 2, 325, 30, 3, 2, 2, 2, 326, 327, 7, 43, 2, 2, 327, 32, 3, 2, 2, 2, 328, 329, 7, 125, 2, 2, 329, 34, 3, 2, 2, 2, 330, 331, 7, 127, 2, 2, 331, 36, 3, 2, 2, 2, 332, 333, 7, 93, 2, 2, 333, 38, 3, 2, 2, 2, 334, 335, 7, 95, 2, 2, 335, 40, 3, 2, 2, 2, 336, 337, 7, 61, 2, 2, 337, 42, 3, 2, 2, 2, 338, 339, 7, 46, 2, 2, 339, 44, 3, 2, 2, 2, 340, 341, 7, 48, 2, 2, 341, 46, 3, 2, 2, 2, 342, 343, 7, 63, 2, 2, 343, 48, 3, 2, 2, 2, 344, 345, 7, 64, 2, 2, 345, 50, 3, 2, 2, 2, 346, 347, 7, 62, 2, 2, 347, 52, 3, 2, 2, 2, 348, 349, 7, 35, 2, 2, 349, 54, 3, 2, 2, 2, 350, 351, 7, 128, 2, 2, 351, 56, 3, 2, 2, 2, 352, 353, 7, 65, 2, 2, 353, 58, 3, 2, 2, 2, 354, 355, 7, 60, 2, 2, 355, 60, 3, 2, 2, 2, 356, 357, 7, 63, 2, 2, 357, 358, 7, 63, 2, 2, 358, 62, 3, 2, 2, 2, 359, 360, 7, 62, 2, 2, 360, 361, 7, 63, 2, 2, 361, 64, 3, 2, 2, 2, 362, 363, 7, 64, 2, 2, 363, 364, 7, 63, 2, 2, 364, 66, 3, 2, 2, 2, 365, 366, 7, 35, 2, 2, 366, 367, 7, 63, 2, 2, 367, 68, 3, 2, 2, 2, 368, 369, 7, 40, 2, 2, 369, 370, 7, 40, 2, 2, 370, 70, 3, 2, 2, 2, 371, 372, 7, 126, 2, 2, 372, 373, 7, 126, 2, 2, 373, 72, 3, 2, 2, 2, 374, 375, 7, 45, 2, 2, 375, 376, 7, 45, 2, 2, 376, 74, 3, 2, 2, 2, 377, 378, 7, 47, 2, 2, 378, 379, 7, 47, 2, 2, 379, 76, 3, 2, 2, 2, 380, 381, 7, 45, 2, 2, 381, 78, 3, 2, 2, 2, 382, 383, 7, 47, 2, 2, 383, 80, 3, 2, 2, 2, 384, 385, 7, 44, 2, 2, 385, 82, 3, 2, 2, 2, 386, 387, 7, 49, 2, 2, 387, 84, 3, 2, 2, 2, 388, 389, 7, 40, 2, 2, 389, 86, 3, 2, 2, 2, 390, 391, 7, 126, 2, 2, 391, 88, 3, 2, 2, 2, 392, 393, 7, 96, 2, 2, 393, 90, 3, 2, 2, 2, 394, 395, 7, 39, 2, 2, 395, 92, 3, 2, 2, 2, 396, 397, 7, 45, 2, 2, 397, 398, 7, 63, 2, 2, 398, 94, 3, 2, 2, 2, 399, 400, 7, 47, 2, 2, 400, 401, 7, 63, 2, 2, 401, 96, 3, 2, 2, 2, 402, 403, 7, 44, 2, 2, 403, 404, 7, 63, 2, 2, 404, 98, 3, 2, 2, 2, 405, 406, 7, 49, 2, 2, 406, 407, 7, 63, 2, 2, 407, 100, 3, 2, 2, 2, 408, 409, 7, 40, 2, 2, 409, 410, 7, 63, 2, 2, 410, 102, 3, 2, 2, 2, 411, 412, 7, 126, 2, 2, 412, 413, 7, 63, 2, 2, 413, 104, 3, 2, 2, 2, 414, 415, 7, 96, 2, 2, 415, 416, 7, 63, 2, 2, 416, 106, 3, 2, 2, 2, 417, 418, 7, 39, 2, 2, 418, 419, 7, 63, 2, 2, 419, 108, 3, 2, 2, 2, 420, 421, 7, 62, 2, 2, 421, 422, 7, 62, 2, 2, 422, 423, 7, 63, 2, 2, 423, 110, 3, 2, 2, 2, 424, 425, 7, 64, 2, 2, 425, 426, 7, 64, 2, 2, 426, 427, 7, 63, 2, 2, 427, 112, 3, 2, 2, 2, 428, 429, 7, 64, 2, 2, 429, 430, 7, 64, 2, 2, 430, 431, 7, 64, 2, 2, 431, 432, 7, 63, 2, 2, 432, 114, 3, 2, 2, 2, 433, 439, 7, 98, 2, 2, 434, 435, 7, 94, 2, 2, 435, 438, 7, 98, 2, 2, 436, 438, 10, 19, 2, 2, 437, 434, 3, 2, 2, 2, 437, 436, 3, 2, 2, 2, 438, 441, 3, 2, 2, 2, 439, 437, 3, 2, 2, 2, 439, 440, 3, 2, 2, 2, 440, 442, 3, 2, 2, 2, 441, 439, 3, 2, 2, 2, 442, 443, 7, 98, 2, 2, 443, 116, 3, 2, 2, 2, 444, 445, 7, 47, 2, 2, 445, 446, 7, 64, 2, 2, 446, 118, 3, 2, 2, 2, 447, 448, 7, 60, 2, 2, 448, 449, 7, 60, 2, 2, 449, 120, 3, 2, 2, 2, 450, 451, 7, 66, 2, 2, 451, 122, 3, 2, 2, 2, 452, 453, 7, 48, 2, 2, 453, 454, 7, 48, 2, 2, 454, 455, 7, 48, 2, 2, 455, 124, 3, 2, 2, 2, 456, 458, 9, 20, 2, 2, 457, 456, 3, 2, 2, 2, 458, 459, 3, 2, 2, 2, 459, 457, 3, 2, 2, 2, 459, 460, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 462, 8, 63, 2, 2, 462, 126, 3, 2, 2, 2, 463, 467, 5, 141, 71, 2, 464, 466, 5, 139, 70, 2, 465, 464, 3, 2, 2, 2, 466, 469, 3, 2, 2, 2, 467, 465, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 128, 3, 2, 2, 2, 469, 467, 3, 2, 2, 2, 470, 472, 9, 21, 2, 2, 471, 473, 9, 16, 2, 2, 472, 471, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 474, 3, 2, 2, 2, 474, 475, 5, 137, 69, 2, 475, 130, 3, 2, 2, 2, 476, 477, 7, 94, 2, 2, 477, 498, 9, 22, 2, 2, 478, 483, 7, 94, 2, 2, 479, 481, 9, 23, 2, 2, 480, 479, 3, 2, 2, 2, 480, 481, 3, 2, 2, 2, 481, 482, 3, 2, 2, 2, 482, 484, 9, 9, 2, 2, 483, 480, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 498, 9, 9, 2, 2, 486, 488, 7, 94, 2, 2, 487, 489, 7, 119, 2, 2, 488, 487, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 488, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 493, 5, 135, 68, 2, 493, 494, 5, 135, 68, 2, 494, 495, 5, 135, 68, 2, 495, 496, 5, 135, 68, 2, 496, 498, 3, 2, 2, 2, 497, 476, 3, 2, 2, 2, 497, 478, 3, 2, 2, 2, 497, 486, 3, 2, 2, 2, 498, 132, 3, 2, 2, 2, 499, 508, 5, 135, 68, 2, 500, 503, 5, 135, 68, 2, 501, 503, 7, 97, 2, 2, 502, 500, 3, 2, 2, 2, 502, 501, 3, 2, 2, 2, 503, 506, 3, 2, 2, 2, 504, 502, 3, 2, 2, 2, 504, 505, 3, 2, 2, 2, 505, 507, 3, 2, 2, 2, 506, 504, 3, 2, 2, 2, 507, 509, 5, 135, 68, 2, 508, 504, 3, 2, 2, 2, 508, 509, 3, 2, 2, 2, 509, 134, 3, 2, 2, 2, 510, 511, 9, 7, 2, 2, 511, 136, 3, 2, 2, 2, 512, 520, 9, 24, 2, 2, 513, 515, 9, 25, 2, 2, 514, 513, 3, 2, 2, 2, 515, 518, 3, 2, 2, 2, 516, 514, 3, 2, 2, 2, 516, 517, 3, 2, 2, 2, 517, 519, 3, 2, 2, 2, 518, 516, 3, 2, 2, 2, 519, 521, 9, 24, 2, 2, 520, 516, 3, 2, 2, 2, 520, 521, 3, 2, 2, 2, 521, 138, 3, 2, 2, 2, 522, 525, 5, 141, 71, 2, 523, 525, 9, 24, 2, 2, 524, 522, 3, 2, 2, 2, 524, 523, 3, 2, 2, 2, 525, 140, 3, 2, 2, 2, 526, 531, 9, 26, 2, 2, 527, 531, 10, 27, 2, 2, 528, 529, 9, 28, 2, 2, 529, 531, 9, 29, 2, 2, 530, 526, 3, 2, 2, 2, 530, 527, 3, 2, 2, 2, 530, 528, 3, 2, 2, 2, 531, 142, 3, 2, 2, 2, 53, 2, 149, 163, 172, 180, 185, 188, 190, 193, 201, 205, 208, 214, 221, 225, 228, 236, 240, 243, 248, 252, 255, 258, 263, 266, 268, 274, 277, 281, 285, 289, 300, 305, 312, 314, 437, 439, 459, 467, 472, 480, 483, 490, 497, 502, 504, 508, 516, 520, 524, 530, 3, 2, 3, 2] \ No newline at end of file diff --git a/languages/comment/CommentLexer.tokens b/languages/comment/CommentLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..6662b1e1a7261cdcbf878dc5b01f1bb9416d2ba8 --- /dev/null +++ b/languages/comment/CommentLexer.tokens @@ -0,0 +1,111 @@ +COMMENT=1 +LINE_COMMENT=2 +PYTHON_COMMENT=3 +DECIMAL_LITERAL=4 +HEX_LITERAL=5 +OCT_LITERAL=6 +BINARY_LITERAL=7 +FLOAT_LITERAL=8 +HEX_FLOAT_LITERAL=9 +BOOL_LITERAL=10 +CHAR_LITERAL=11 +STRING_LITERAL=12 +NULL_LITERAL=13 +LPAREN=14 +RPAREN=15 +LBRACE=16 +RBRACE=17 +LBRACK=18 +RBRACK=19 +SEMI=20 +COMMA=21 +DOT=22 +ASSIGN=23 +GT=24 +LT=25 +BANG=26 +TILDE=27 +QUESTION=28 +COLON=29 +EQUAL=30 +LE=31 +GE=32 +NOTEQUAL=33 +AND=34 +OR=35 +INC=36 +DEC=37 +ADD=38 +SUB=39 +MUL=40 +DIV=41 +BITAND=42 +BITOR=43 +CARET=44 +MOD=45 +ADD_ASSIGN=46 +SUB_ASSIGN=47 +MUL_ASSIGN=48 +DIV_ASSIGN=49 +AND_ASSIGN=50 +OR_ASSIGN=51 +XOR_ASSIGN=52 +MOD_ASSIGN=53 +LSHIFT_ASSIGN=54 +RSHIFT_ASSIGN=55 +URSHIFT_ASSIGN=56 +TemplateStringLiteral=57 +ARROW=58 +COLONCOLON=59 +AT=60 +ELLIPSIS=61 +WS=62 +IDENTIFIER=63 +'null'=13 +'('=14 +')'=15 +'{'=16 +'}'=17 +'['=18 +']'=19 +';'=20 +','=21 +'.'=22 +'='=23 +'>'=24 +'<'=25 +'!'=26 +'~'=27 +'?'=28 +':'=29 +'=='=30 +'<='=31 +'>='=32 +'!='=33 +'&&'=34 +'||'=35 +'++'=36 +'--'=37 +'+'=38 +'-'=39 +'*'=40 +'/'=41 +'&'=42 +'|'=43 +'^'=44 +'%'=45 +'+='=46 +'-='=47 +'*='=48 +'/='=49 +'&='=50 +'|='=51 +'^='=52 +'%='=53 +'<<='=54 +'>>='=55 +'>>>='=56 +'->'=58 +'::'=59 +'@'=60 +'...'=61 diff --git a/languages/comment/comment_lexer.go b/languages/comment/comment_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..376082366e06e6c4904e70b5db12cc8887f89053 --- /dev/null +++ b/languages/comment/comment_lexer.go @@ -0,0 +1,416 @@ +// Code generated from CommentLexer.g4 by ANTLR 4.8. DO NOT EDIT. + +package parser + +import ( + "fmt" + "unicode" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import error +var _ = fmt.Printf +var _ = unicode.IsLetter + +var serializedLexerAtn = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 65, 532, + 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, + 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, + 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, + 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, + 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, + 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, + 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, + 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, + 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, + 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, + 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, + 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, + 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, + 70, 4, 71, 9, 71, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 148, 10, 2, 12, 2, 14, + 2, 151, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, + 3, 162, 10, 3, 12, 3, 14, 3, 165, 11, 3, 3, 3, 3, 3, 3, 4, 3, 4, 7, 4, + 171, 10, 4, 12, 4, 14, 4, 174, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 5, + 5, 181, 10, 5, 3, 5, 6, 5, 184, 10, 5, 13, 5, 14, 5, 185, 3, 5, 5, 5, 189, + 10, 5, 5, 5, 191, 10, 5, 3, 5, 5, 5, 194, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, + 7, 6, 200, 10, 6, 12, 6, 14, 6, 203, 11, 6, 3, 6, 5, 6, 206, 10, 6, 3, + 6, 5, 6, 209, 10, 6, 3, 7, 3, 7, 7, 7, 213, 10, 7, 12, 7, 14, 7, 216, 11, + 7, 3, 7, 3, 7, 7, 7, 220, 10, 7, 12, 7, 14, 7, 223, 11, 7, 3, 7, 5, 7, + 226, 10, 7, 3, 7, 5, 7, 229, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 235, + 10, 8, 12, 8, 14, 8, 238, 11, 8, 3, 8, 5, 8, 241, 10, 8, 3, 8, 5, 8, 244, + 10, 8, 3, 9, 3, 9, 3, 9, 5, 9, 249, 10, 9, 3, 9, 3, 9, 5, 9, 253, 10, 9, + 3, 9, 5, 9, 256, 10, 9, 3, 9, 5, 9, 259, 10, 9, 3, 9, 3, 9, 3, 9, 5, 9, + 264, 10, 9, 3, 9, 5, 9, 267, 10, 9, 5, 9, 269, 10, 9, 3, 10, 3, 10, 3, + 10, 3, 10, 5, 10, 275, 10, 10, 3, 10, 5, 10, 278, 10, 10, 3, 10, 3, 10, + 5, 10, 282, 10, 10, 3, 10, 3, 10, 5, 10, 286, 10, 10, 3, 10, 3, 10, 5, + 10, 290, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, + 3, 11, 5, 11, 301, 10, 11, 3, 12, 3, 12, 3, 12, 5, 12, 306, 10, 12, 3, + 12, 3, 12, 3, 13, 3, 13, 3, 13, 7, 13, 313, 10, 13, 12, 13, 14, 13, 316, + 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, + 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, + 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, + 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, + 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, + 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, + 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, + 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, + 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, + 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, + 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, + 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 7, 58, 438, 10, 58, 12, 58, 14, + 58, 441, 11, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, + 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 6, 63, 458, 10, 63, 13, + 63, 14, 63, 459, 3, 63, 3, 63, 3, 64, 3, 64, 7, 64, 466, 10, 64, 12, 64, + 14, 64, 469, 11, 64, 3, 65, 3, 65, 5, 65, 473, 10, 65, 3, 65, 3, 65, 3, + 66, 3, 66, 3, 66, 3, 66, 5, 66, 481, 10, 66, 3, 66, 5, 66, 484, 10, 66, + 3, 66, 3, 66, 3, 66, 6, 66, 489, 10, 66, 13, 66, 14, 66, 490, 3, 66, 3, + 66, 3, 66, 3, 66, 3, 66, 5, 66, 498, 10, 66, 3, 67, 3, 67, 3, 67, 7, 67, + 503, 10, 67, 12, 67, 14, 67, 506, 11, 67, 3, 67, 5, 67, 509, 10, 67, 3, + 68, 3, 68, 3, 69, 3, 69, 7, 69, 515, 10, 69, 12, 69, 14, 69, 518, 11, 69, + 3, 69, 5, 69, 521, 10, 69, 3, 70, 3, 70, 5, 70, 525, 10, 70, 3, 71, 3, + 71, 3, 71, 3, 71, 5, 71, 531, 10, 71, 3, 149, 2, 72, 3, 3, 5, 4, 7, 5, + 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, + 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, + 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, + 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, + 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, + 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, + 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 2, 131, + 2, 133, 2, 135, 2, 137, 2, 139, 2, 141, 2, 3, 2, 30, 5, 2, 12, 12, 15, + 15, 8234, 8235, 4, 2, 12, 12, 14, 15, 3, 2, 51, 59, 4, 2, 78, 78, 110, + 110, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 6, 2, 50, 59, + 67, 72, 97, 97, 99, 104, 3, 2, 50, 57, 4, 2, 50, 57, 97, 97, 4, 2, 68, + 68, 100, 100, 3, 2, 50, 51, 4, 2, 50, 51, 97, 97, 6, 2, 70, 70, 72, 72, + 102, 102, 104, 104, 4, 2, 82, 82, 114, 114, 4, 2, 45, 45, 47, 47, 6, 2, + 12, 12, 15, 15, 41, 41, 94, 94, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 3, + 2, 98, 98, 5, 2, 11, 12, 14, 15, 34, 34, 4, 2, 71, 71, 103, 103, 10, 2, + 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, + 3, 2, 50, 53, 3, 2, 50, 59, 4, 2, 50, 59, 97, 97, 6, 2, 38, 38, 67, 92, + 97, 97, 99, 124, 4, 2, 2, 129, 55298, 56321, 3, 2, 55298, 56321, 3, 2, + 56322, 57345, 2, 576, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, + 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, + 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, + 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, + 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, + 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, + 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, + 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, + 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, + 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, + 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, + 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, + 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, + 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, + 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, + 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, + 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 3, + 143, 3, 2, 2, 2, 5, 157, 3, 2, 2, 2, 7, 168, 3, 2, 2, 2, 9, 190, 3, 2, + 2, 2, 11, 195, 3, 2, 2, 2, 13, 210, 3, 2, 2, 2, 15, 230, 3, 2, 2, 2, 17, + 268, 3, 2, 2, 2, 19, 270, 3, 2, 2, 2, 21, 300, 3, 2, 2, 2, 23, 302, 3, + 2, 2, 2, 25, 309, 3, 2, 2, 2, 27, 319, 3, 2, 2, 2, 29, 324, 3, 2, 2, 2, + 31, 326, 3, 2, 2, 2, 33, 328, 3, 2, 2, 2, 35, 330, 3, 2, 2, 2, 37, 332, + 3, 2, 2, 2, 39, 334, 3, 2, 2, 2, 41, 336, 3, 2, 2, 2, 43, 338, 3, 2, 2, + 2, 45, 340, 3, 2, 2, 2, 47, 342, 3, 2, 2, 2, 49, 344, 3, 2, 2, 2, 51, 346, + 3, 2, 2, 2, 53, 348, 3, 2, 2, 2, 55, 350, 3, 2, 2, 2, 57, 352, 3, 2, 2, + 2, 59, 354, 3, 2, 2, 2, 61, 356, 3, 2, 2, 2, 63, 359, 3, 2, 2, 2, 65, 362, + 3, 2, 2, 2, 67, 365, 3, 2, 2, 2, 69, 368, 3, 2, 2, 2, 71, 371, 3, 2, 2, + 2, 73, 374, 3, 2, 2, 2, 75, 377, 3, 2, 2, 2, 77, 380, 3, 2, 2, 2, 79, 382, + 3, 2, 2, 2, 81, 384, 3, 2, 2, 2, 83, 386, 3, 2, 2, 2, 85, 388, 3, 2, 2, + 2, 87, 390, 3, 2, 2, 2, 89, 392, 3, 2, 2, 2, 91, 394, 3, 2, 2, 2, 93, 396, + 3, 2, 2, 2, 95, 399, 3, 2, 2, 2, 97, 402, 3, 2, 2, 2, 99, 405, 3, 2, 2, + 2, 101, 408, 3, 2, 2, 2, 103, 411, 3, 2, 2, 2, 105, 414, 3, 2, 2, 2, 107, + 417, 3, 2, 2, 2, 109, 420, 3, 2, 2, 2, 111, 424, 3, 2, 2, 2, 113, 428, + 3, 2, 2, 2, 115, 433, 3, 2, 2, 2, 117, 444, 3, 2, 2, 2, 119, 447, 3, 2, + 2, 2, 121, 450, 3, 2, 2, 2, 123, 452, 3, 2, 2, 2, 125, 457, 3, 2, 2, 2, + 127, 463, 3, 2, 2, 2, 129, 470, 3, 2, 2, 2, 131, 497, 3, 2, 2, 2, 133, + 499, 3, 2, 2, 2, 135, 510, 3, 2, 2, 2, 137, 512, 3, 2, 2, 2, 139, 524, + 3, 2, 2, 2, 141, 530, 3, 2, 2, 2, 143, 144, 7, 49, 2, 2, 144, 145, 7, 44, + 2, 2, 145, 149, 3, 2, 2, 2, 146, 148, 11, 2, 2, 2, 147, 146, 3, 2, 2, 2, + 148, 151, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 149, 147, 3, 2, 2, 2, 150, + 152, 3, 2, 2, 2, 151, 149, 3, 2, 2, 2, 152, 153, 7, 44, 2, 2, 153, 154, + 7, 49, 2, 2, 154, 155, 3, 2, 2, 2, 155, 156, 8, 2, 2, 2, 156, 4, 3, 2, + 2, 2, 157, 158, 7, 49, 2, 2, 158, 159, 7, 49, 2, 2, 159, 163, 3, 2, 2, + 2, 160, 162, 10, 2, 2, 2, 161, 160, 3, 2, 2, 2, 162, 165, 3, 2, 2, 2, 163, + 161, 3, 2, 2, 2, 163, 164, 3, 2, 2, 2, 164, 166, 3, 2, 2, 2, 165, 163, + 3, 2, 2, 2, 166, 167, 8, 3, 2, 2, 167, 6, 3, 2, 2, 2, 168, 172, 7, 37, + 2, 2, 169, 171, 10, 3, 2, 2, 170, 169, 3, 2, 2, 2, 171, 174, 3, 2, 2, 2, + 172, 170, 3, 2, 2, 2, 172, 173, 3, 2, 2, 2, 173, 175, 3, 2, 2, 2, 174, + 172, 3, 2, 2, 2, 175, 176, 8, 4, 2, 2, 176, 8, 3, 2, 2, 2, 177, 191, 7, + 50, 2, 2, 178, 188, 9, 4, 2, 2, 179, 181, 5, 137, 69, 2, 180, 179, 3, 2, + 2, 2, 180, 181, 3, 2, 2, 2, 181, 189, 3, 2, 2, 2, 182, 184, 7, 97, 2, 2, + 183, 182, 3, 2, 2, 2, 184, 185, 3, 2, 2, 2, 185, 183, 3, 2, 2, 2, 185, + 186, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 189, 5, 137, 69, 2, 188, 180, + 3, 2, 2, 2, 188, 183, 3, 2, 2, 2, 189, 191, 3, 2, 2, 2, 190, 177, 3, 2, + 2, 2, 190, 178, 3, 2, 2, 2, 191, 193, 3, 2, 2, 2, 192, 194, 9, 5, 2, 2, + 193, 192, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 10, 3, 2, 2, 2, 195, 196, + 7, 50, 2, 2, 196, 197, 9, 6, 2, 2, 197, 205, 9, 7, 2, 2, 198, 200, 9, 8, + 2, 2, 199, 198, 3, 2, 2, 2, 200, 203, 3, 2, 2, 2, 201, 199, 3, 2, 2, 2, + 201, 202, 3, 2, 2, 2, 202, 204, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 204, + 206, 9, 7, 2, 2, 205, 201, 3, 2, 2, 2, 205, 206, 3, 2, 2, 2, 206, 208, + 3, 2, 2, 2, 207, 209, 9, 5, 2, 2, 208, 207, 3, 2, 2, 2, 208, 209, 3, 2, + 2, 2, 209, 12, 3, 2, 2, 2, 210, 214, 7, 50, 2, 2, 211, 213, 7, 97, 2, 2, + 212, 211, 3, 2, 2, 2, 213, 216, 3, 2, 2, 2, 214, 212, 3, 2, 2, 2, 214, + 215, 3, 2, 2, 2, 215, 217, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 217, 225, + 9, 9, 2, 2, 218, 220, 9, 10, 2, 2, 219, 218, 3, 2, 2, 2, 220, 223, 3, 2, + 2, 2, 221, 219, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 224, 3, 2, 2, 2, + 223, 221, 3, 2, 2, 2, 224, 226, 9, 9, 2, 2, 225, 221, 3, 2, 2, 2, 225, + 226, 3, 2, 2, 2, 226, 228, 3, 2, 2, 2, 227, 229, 9, 5, 2, 2, 228, 227, + 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229, 14, 3, 2, 2, 2, 230, 231, 7, 50, + 2, 2, 231, 232, 9, 11, 2, 2, 232, 240, 9, 12, 2, 2, 233, 235, 9, 13, 2, + 2, 234, 233, 3, 2, 2, 2, 235, 238, 3, 2, 2, 2, 236, 234, 3, 2, 2, 2, 236, + 237, 3, 2, 2, 2, 237, 239, 3, 2, 2, 2, 238, 236, 3, 2, 2, 2, 239, 241, + 9, 12, 2, 2, 240, 236, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 243, 3, 2, + 2, 2, 242, 244, 9, 5, 2, 2, 243, 242, 3, 2, 2, 2, 243, 244, 3, 2, 2, 2, + 244, 16, 3, 2, 2, 2, 245, 246, 5, 137, 69, 2, 246, 248, 7, 48, 2, 2, 247, + 249, 5, 137, 69, 2, 248, 247, 3, 2, 2, 2, 248, 249, 3, 2, 2, 2, 249, 253, + 3, 2, 2, 2, 250, 251, 7, 48, 2, 2, 251, 253, 5, 137, 69, 2, 252, 245, 3, + 2, 2, 2, 252, 250, 3, 2, 2, 2, 253, 255, 3, 2, 2, 2, 254, 256, 5, 129, + 65, 2, 255, 254, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 256, 258, 3, 2, 2, 2, + 257, 259, 9, 14, 2, 2, 258, 257, 3, 2, 2, 2, 258, 259, 3, 2, 2, 2, 259, + 269, 3, 2, 2, 2, 260, 266, 5, 137, 69, 2, 261, 263, 5, 129, 65, 2, 262, + 264, 9, 14, 2, 2, 263, 262, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 267, + 3, 2, 2, 2, 265, 267, 9, 14, 2, 2, 266, 261, 3, 2, 2, 2, 266, 265, 3, 2, + 2, 2, 267, 269, 3, 2, 2, 2, 268, 252, 3, 2, 2, 2, 268, 260, 3, 2, 2, 2, + 269, 18, 3, 2, 2, 2, 270, 271, 7, 50, 2, 2, 271, 281, 9, 6, 2, 2, 272, + 274, 5, 133, 67, 2, 273, 275, 7, 48, 2, 2, 274, 273, 3, 2, 2, 2, 274, 275, + 3, 2, 2, 2, 275, 282, 3, 2, 2, 2, 276, 278, 5, 133, 67, 2, 277, 276, 3, + 2, 2, 2, 277, 278, 3, 2, 2, 2, 278, 279, 3, 2, 2, 2, 279, 280, 7, 48, 2, + 2, 280, 282, 5, 133, 67, 2, 281, 272, 3, 2, 2, 2, 281, 277, 3, 2, 2, 2, + 282, 283, 3, 2, 2, 2, 283, 285, 9, 15, 2, 2, 284, 286, 9, 16, 2, 2, 285, + 284, 3, 2, 2, 2, 285, 286, 3, 2, 2, 2, 286, 287, 3, 2, 2, 2, 287, 289, + 5, 137, 69, 2, 288, 290, 9, 14, 2, 2, 289, 288, 3, 2, 2, 2, 289, 290, 3, + 2, 2, 2, 290, 20, 3, 2, 2, 2, 291, 292, 7, 118, 2, 2, 292, 293, 7, 116, + 2, 2, 293, 294, 7, 119, 2, 2, 294, 301, 7, 103, 2, 2, 295, 296, 7, 104, + 2, 2, 296, 297, 7, 99, 2, 2, 297, 298, 7, 110, 2, 2, 298, 299, 7, 117, + 2, 2, 299, 301, 7, 103, 2, 2, 300, 291, 3, 2, 2, 2, 300, 295, 3, 2, 2, + 2, 301, 22, 3, 2, 2, 2, 302, 305, 7, 41, 2, 2, 303, 306, 10, 17, 2, 2, + 304, 306, 5, 131, 66, 2, 305, 303, 3, 2, 2, 2, 305, 304, 3, 2, 2, 2, 306, + 307, 3, 2, 2, 2, 307, 308, 7, 41, 2, 2, 308, 24, 3, 2, 2, 2, 309, 314, + 7, 36, 2, 2, 310, 313, 10, 18, 2, 2, 311, 313, 5, 131, 66, 2, 312, 310, + 3, 2, 2, 2, 312, 311, 3, 2, 2, 2, 313, 316, 3, 2, 2, 2, 314, 312, 3, 2, + 2, 2, 314, 315, 3, 2, 2, 2, 315, 317, 3, 2, 2, 2, 316, 314, 3, 2, 2, 2, + 317, 318, 7, 36, 2, 2, 318, 26, 3, 2, 2, 2, 319, 320, 7, 112, 2, 2, 320, + 321, 7, 119, 2, 2, 321, 322, 7, 110, 2, 2, 322, 323, 7, 110, 2, 2, 323, + 28, 3, 2, 2, 2, 324, 325, 7, 42, 2, 2, 325, 30, 3, 2, 2, 2, 326, 327, 7, + 43, 2, 2, 327, 32, 3, 2, 2, 2, 328, 329, 7, 125, 2, 2, 329, 34, 3, 2, 2, + 2, 330, 331, 7, 127, 2, 2, 331, 36, 3, 2, 2, 2, 332, 333, 7, 93, 2, 2, + 333, 38, 3, 2, 2, 2, 334, 335, 7, 95, 2, 2, 335, 40, 3, 2, 2, 2, 336, 337, + 7, 61, 2, 2, 337, 42, 3, 2, 2, 2, 338, 339, 7, 46, 2, 2, 339, 44, 3, 2, + 2, 2, 340, 341, 7, 48, 2, 2, 341, 46, 3, 2, 2, 2, 342, 343, 7, 63, 2, 2, + 343, 48, 3, 2, 2, 2, 344, 345, 7, 64, 2, 2, 345, 50, 3, 2, 2, 2, 346, 347, + 7, 62, 2, 2, 347, 52, 3, 2, 2, 2, 348, 349, 7, 35, 2, 2, 349, 54, 3, 2, + 2, 2, 350, 351, 7, 128, 2, 2, 351, 56, 3, 2, 2, 2, 352, 353, 7, 65, 2, + 2, 353, 58, 3, 2, 2, 2, 354, 355, 7, 60, 2, 2, 355, 60, 3, 2, 2, 2, 356, + 357, 7, 63, 2, 2, 357, 358, 7, 63, 2, 2, 358, 62, 3, 2, 2, 2, 359, 360, + 7, 62, 2, 2, 360, 361, 7, 63, 2, 2, 361, 64, 3, 2, 2, 2, 362, 363, 7, 64, + 2, 2, 363, 364, 7, 63, 2, 2, 364, 66, 3, 2, 2, 2, 365, 366, 7, 35, 2, 2, + 366, 367, 7, 63, 2, 2, 367, 68, 3, 2, 2, 2, 368, 369, 7, 40, 2, 2, 369, + 370, 7, 40, 2, 2, 370, 70, 3, 2, 2, 2, 371, 372, 7, 126, 2, 2, 372, 373, + 7, 126, 2, 2, 373, 72, 3, 2, 2, 2, 374, 375, 7, 45, 2, 2, 375, 376, 7, + 45, 2, 2, 376, 74, 3, 2, 2, 2, 377, 378, 7, 47, 2, 2, 378, 379, 7, 47, + 2, 2, 379, 76, 3, 2, 2, 2, 380, 381, 7, 45, 2, 2, 381, 78, 3, 2, 2, 2, + 382, 383, 7, 47, 2, 2, 383, 80, 3, 2, 2, 2, 384, 385, 7, 44, 2, 2, 385, + 82, 3, 2, 2, 2, 386, 387, 7, 49, 2, 2, 387, 84, 3, 2, 2, 2, 388, 389, 7, + 40, 2, 2, 389, 86, 3, 2, 2, 2, 390, 391, 7, 126, 2, 2, 391, 88, 3, 2, 2, + 2, 392, 393, 7, 96, 2, 2, 393, 90, 3, 2, 2, 2, 394, 395, 7, 39, 2, 2, 395, + 92, 3, 2, 2, 2, 396, 397, 7, 45, 2, 2, 397, 398, 7, 63, 2, 2, 398, 94, + 3, 2, 2, 2, 399, 400, 7, 47, 2, 2, 400, 401, 7, 63, 2, 2, 401, 96, 3, 2, + 2, 2, 402, 403, 7, 44, 2, 2, 403, 404, 7, 63, 2, 2, 404, 98, 3, 2, 2, 2, + 405, 406, 7, 49, 2, 2, 406, 407, 7, 63, 2, 2, 407, 100, 3, 2, 2, 2, 408, + 409, 7, 40, 2, 2, 409, 410, 7, 63, 2, 2, 410, 102, 3, 2, 2, 2, 411, 412, + 7, 126, 2, 2, 412, 413, 7, 63, 2, 2, 413, 104, 3, 2, 2, 2, 414, 415, 7, + 96, 2, 2, 415, 416, 7, 63, 2, 2, 416, 106, 3, 2, 2, 2, 417, 418, 7, 39, + 2, 2, 418, 419, 7, 63, 2, 2, 419, 108, 3, 2, 2, 2, 420, 421, 7, 62, 2, + 2, 421, 422, 7, 62, 2, 2, 422, 423, 7, 63, 2, 2, 423, 110, 3, 2, 2, 2, + 424, 425, 7, 64, 2, 2, 425, 426, 7, 64, 2, 2, 426, 427, 7, 63, 2, 2, 427, + 112, 3, 2, 2, 2, 428, 429, 7, 64, 2, 2, 429, 430, 7, 64, 2, 2, 430, 431, + 7, 64, 2, 2, 431, 432, 7, 63, 2, 2, 432, 114, 3, 2, 2, 2, 433, 439, 7, + 98, 2, 2, 434, 435, 7, 94, 2, 2, 435, 438, 7, 98, 2, 2, 436, 438, 10, 19, + 2, 2, 437, 434, 3, 2, 2, 2, 437, 436, 3, 2, 2, 2, 438, 441, 3, 2, 2, 2, + 439, 437, 3, 2, 2, 2, 439, 440, 3, 2, 2, 2, 440, 442, 3, 2, 2, 2, 441, + 439, 3, 2, 2, 2, 442, 443, 7, 98, 2, 2, 443, 116, 3, 2, 2, 2, 444, 445, + 7, 47, 2, 2, 445, 446, 7, 64, 2, 2, 446, 118, 3, 2, 2, 2, 447, 448, 7, + 60, 2, 2, 448, 449, 7, 60, 2, 2, 449, 120, 3, 2, 2, 2, 450, 451, 7, 66, + 2, 2, 451, 122, 3, 2, 2, 2, 452, 453, 7, 48, 2, 2, 453, 454, 7, 48, 2, + 2, 454, 455, 7, 48, 2, 2, 455, 124, 3, 2, 2, 2, 456, 458, 9, 20, 2, 2, + 457, 456, 3, 2, 2, 2, 458, 459, 3, 2, 2, 2, 459, 457, 3, 2, 2, 2, 459, + 460, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 462, 8, 63, 2, 2, 462, 126, + 3, 2, 2, 2, 463, 467, 5, 141, 71, 2, 464, 466, 5, 139, 70, 2, 465, 464, + 3, 2, 2, 2, 466, 469, 3, 2, 2, 2, 467, 465, 3, 2, 2, 2, 467, 468, 3, 2, + 2, 2, 468, 128, 3, 2, 2, 2, 469, 467, 3, 2, 2, 2, 470, 472, 9, 21, 2, 2, + 471, 473, 9, 16, 2, 2, 472, 471, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, + 474, 3, 2, 2, 2, 474, 475, 5, 137, 69, 2, 475, 130, 3, 2, 2, 2, 476, 477, + 7, 94, 2, 2, 477, 498, 9, 22, 2, 2, 478, 483, 7, 94, 2, 2, 479, 481, 9, + 23, 2, 2, 480, 479, 3, 2, 2, 2, 480, 481, 3, 2, 2, 2, 481, 482, 3, 2, 2, + 2, 482, 484, 9, 9, 2, 2, 483, 480, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, + 485, 3, 2, 2, 2, 485, 498, 9, 9, 2, 2, 486, 488, 7, 94, 2, 2, 487, 489, + 7, 119, 2, 2, 488, 487, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 488, 3, + 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 493, 5, 135, + 68, 2, 493, 494, 5, 135, 68, 2, 494, 495, 5, 135, 68, 2, 495, 496, 5, 135, + 68, 2, 496, 498, 3, 2, 2, 2, 497, 476, 3, 2, 2, 2, 497, 478, 3, 2, 2, 2, + 497, 486, 3, 2, 2, 2, 498, 132, 3, 2, 2, 2, 499, 508, 5, 135, 68, 2, 500, + 503, 5, 135, 68, 2, 501, 503, 7, 97, 2, 2, 502, 500, 3, 2, 2, 2, 502, 501, + 3, 2, 2, 2, 503, 506, 3, 2, 2, 2, 504, 502, 3, 2, 2, 2, 504, 505, 3, 2, + 2, 2, 505, 507, 3, 2, 2, 2, 506, 504, 3, 2, 2, 2, 507, 509, 5, 135, 68, + 2, 508, 504, 3, 2, 2, 2, 508, 509, 3, 2, 2, 2, 509, 134, 3, 2, 2, 2, 510, + 511, 9, 7, 2, 2, 511, 136, 3, 2, 2, 2, 512, 520, 9, 24, 2, 2, 513, 515, + 9, 25, 2, 2, 514, 513, 3, 2, 2, 2, 515, 518, 3, 2, 2, 2, 516, 514, 3, 2, + 2, 2, 516, 517, 3, 2, 2, 2, 517, 519, 3, 2, 2, 2, 518, 516, 3, 2, 2, 2, + 519, 521, 9, 24, 2, 2, 520, 516, 3, 2, 2, 2, 520, 521, 3, 2, 2, 2, 521, + 138, 3, 2, 2, 2, 522, 525, 5, 141, 71, 2, 523, 525, 9, 24, 2, 2, 524, 522, + 3, 2, 2, 2, 524, 523, 3, 2, 2, 2, 525, 140, 3, 2, 2, 2, 526, 531, 9, 26, + 2, 2, 527, 531, 10, 27, 2, 2, 528, 529, 9, 28, 2, 2, 529, 531, 9, 29, 2, + 2, 530, 526, 3, 2, 2, 2, 530, 527, 3, 2, 2, 2, 530, 528, 3, 2, 2, 2, 531, + 142, 3, 2, 2, 2, 53, 2, 149, 163, 172, 180, 185, 188, 190, 193, 201, 205, + 208, 214, 221, 225, 228, 236, 240, 243, 248, 252, 255, 258, 263, 266, 268, + 274, 277, 281, 285, 289, 300, 305, 312, 314, 437, 439, 459, 467, 472, 480, + 483, 490, 497, 502, 504, 508, 516, 520, 524, 530, 3, 2, 3, 2, +} + +var lexerDeserializer = antlr.NewATNDeserializer(nil) +var lexerAtn = lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn) + +var lexerChannelNames = []string{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", +} + +var lexerModeNames = []string{ + "DEFAULT_MODE", +} + +var lexerLiteralNames = []string{ + "", "", "", "", "", "", "", "", "", "", "", "", "", "'null'", "'('", "')'", + "'{'", "'}'", "'['", "']'", "';'", "','", "'.'", "'='", "'>'", "'<'", "'!'", + "'~'", "'?'", "':'", "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", + "'--'", "'+'", "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", + "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", + "'>>>='", "", "'->'", "'::'", "'@'", "'...'", +} + +var lexerSymbolicNames = []string{ + "", "COMMENT", "LINE_COMMENT", "PYTHON_COMMENT", "DECIMAL_LITERAL", "HEX_LITERAL", + "OCT_LITERAL", "BINARY_LITERAL", "FLOAT_LITERAL", "HEX_FLOAT_LITERAL", + "BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL", "NULL_LITERAL", "LPAREN", + "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", + "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "EQUAL", "LE", + "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", "DIV", + "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", + "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", + "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "TemplateStringLiteral", "ARROW", "COLONCOLON", + "AT", "ELLIPSIS", "WS", "IDENTIFIER", +} + +var lexerRuleNames = []string{ + "COMMENT", "LINE_COMMENT", "PYTHON_COMMENT", "DECIMAL_LITERAL", "HEX_LITERAL", + "OCT_LITERAL", "BINARY_LITERAL", "FLOAT_LITERAL", "HEX_FLOAT_LITERAL", + "BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL", "NULL_LITERAL", "LPAREN", + "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", + "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "EQUAL", "LE", + "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", "DIV", + "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", + "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", + "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "TemplateStringLiteral", "ARROW", "COLONCOLON", + "AT", "ELLIPSIS", "WS", "IDENTIFIER", "ExponentPart", "EscapeSequence", + "HexDigits", "HexDigit", "Digits", "LetterOrDigit", "Letter", +} + +type CommentLexer struct { + *antlr.BaseLexer + channelNames []string + modeNames []string + // TODO: EOF string +} + +var lexerDecisionToDFA = make([]*antlr.DFA, len(lexerAtn.DecisionToState)) + +func init() { + for index, ds := range lexerAtn.DecisionToState { + lexerDecisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +func NewCommentLexer(input antlr.CharStream) *CommentLexer { + + l := new(CommentLexer) + + l.BaseLexer = antlr.NewBaseLexer(input) + l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache()) + + l.channelNames = lexerChannelNames + l.modeNames = lexerModeNames + l.RuleNames = lexerRuleNames + l.LiteralNames = lexerLiteralNames + l.SymbolicNames = lexerSymbolicNames + l.GrammarFileName = "CommentLexer.g4" + // TODO: l.EOF = antlr.TokenEOF + + return l +} + +// CommentLexer tokens. +const ( + CommentLexerCOMMENT = 1 + CommentLexerLINE_COMMENT = 2 + CommentLexerPYTHON_COMMENT = 3 + CommentLexerDECIMAL_LITERAL = 4 + CommentLexerHEX_LITERAL = 5 + CommentLexerOCT_LITERAL = 6 + CommentLexerBINARY_LITERAL = 7 + CommentLexerFLOAT_LITERAL = 8 + CommentLexerHEX_FLOAT_LITERAL = 9 + CommentLexerBOOL_LITERAL = 10 + CommentLexerCHAR_LITERAL = 11 + CommentLexerSTRING_LITERAL = 12 + CommentLexerNULL_LITERAL = 13 + CommentLexerLPAREN = 14 + CommentLexerRPAREN = 15 + CommentLexerLBRACE = 16 + CommentLexerRBRACE = 17 + CommentLexerLBRACK = 18 + CommentLexerRBRACK = 19 + CommentLexerSEMI = 20 + CommentLexerCOMMA = 21 + CommentLexerDOT = 22 + CommentLexerASSIGN = 23 + CommentLexerGT = 24 + CommentLexerLT = 25 + CommentLexerBANG = 26 + CommentLexerTILDE = 27 + CommentLexerQUESTION = 28 + CommentLexerCOLON = 29 + CommentLexerEQUAL = 30 + CommentLexerLE = 31 + CommentLexerGE = 32 + CommentLexerNOTEQUAL = 33 + CommentLexerAND = 34 + CommentLexerOR = 35 + CommentLexerINC = 36 + CommentLexerDEC = 37 + CommentLexerADD = 38 + CommentLexerSUB = 39 + CommentLexerMUL = 40 + CommentLexerDIV = 41 + CommentLexerBITAND = 42 + CommentLexerBITOR = 43 + CommentLexerCARET = 44 + CommentLexerMOD = 45 + CommentLexerADD_ASSIGN = 46 + CommentLexerSUB_ASSIGN = 47 + CommentLexerMUL_ASSIGN = 48 + CommentLexerDIV_ASSIGN = 49 + CommentLexerAND_ASSIGN = 50 + CommentLexerOR_ASSIGN = 51 + CommentLexerXOR_ASSIGN = 52 + CommentLexerMOD_ASSIGN = 53 + CommentLexerLSHIFT_ASSIGN = 54 + CommentLexerRSHIFT_ASSIGN = 55 + CommentLexerURSHIFT_ASSIGN = 56 + CommentLexerTemplateStringLiteral = 57 + CommentLexerARROW = 58 + CommentLexerCOLONCOLON = 59 + CommentLexerAT = 60 + CommentLexerELLIPSIS = 61 + CommentLexerWS = 62 + CommentLexerIDENTIFIER = 63 +) diff --git a/languages/g4/CommentLexer.g4 b/languages/g4/CommentLexer.g4 new file mode 100644 index 0000000000000000000000000000000000000000..680b46734872ea25d3fd2c93abfddb1089598ece --- /dev/null +++ b/languages/g4/CommentLexer.g4 @@ -0,0 +1,134 @@ +lexer grammar CommentLexer; + +COMMENT: '/*' .*? '*/' -> channel(HIDDEN); +LINE_COMMENT: '//' ~[\r\n\u2028\u2029]* -> channel(HIDDEN); +PYTHON_COMMENT: '#' ~[\r\n\f]* -> channel(HIDDEN); + + +// Literals + +DECIMAL_LITERAL: ('0' | [1-9] (Digits? | '_'+ Digits)) [lL]?; +HEX_LITERAL: '0' [xX] [0-9a-fA-F] ([0-9a-fA-F_]* [0-9a-fA-F])? [lL]?; +OCT_LITERAL: '0' '_'* [0-7] ([0-7_]* [0-7])? [lL]?; +BINARY_LITERAL: '0' [bB] [01] ([01_]* [01])? [lL]?; + +FLOAT_LITERAL: (Digits '.' Digits? | '.' Digits) ExponentPart? [fFdD]? + | Digits (ExponentPart [fFdD]? | [fFdD]) + ; + +HEX_FLOAT_LITERAL: '0' [xX] (HexDigits '.'? | HexDigits? '.' HexDigits) [pP] [+-]? Digits [fFdD]?; + +BOOL_LITERAL: 'true' + | 'false' + ; + +CHAR_LITERAL: '\'' (~['\\\r\n] | EscapeSequence) '\''; + +STRING_LITERAL: '"' (~["\\\r\n] | EscapeSequence)* '"'; + +NULL_LITERAL: 'null'; + +// Separators + +LPAREN: '('; +RPAREN: ')'; +LBRACE: '{'; +RBRACE: '}'; +LBRACK: '['; +RBRACK: ']'; +SEMI: ';'; +COMMA: ','; +DOT: '.'; + +// Operators + +ASSIGN: '='; +GT: '>'; +LT: '<'; +BANG: '!'; +TILDE: '~'; +QUESTION: '?'; +COLON: ':'; +EQUAL: '=='; +LE: '<='; +GE: '>='; +NOTEQUAL: '!='; +AND: '&&'; +OR: '||'; +INC: '++'; +DEC: '--'; +ADD: '+'; +SUB: '-'; +MUL: '*'; +DIV: '/'; +BITAND: '&'; +BITOR: '|'; +CARET: '^'; +MOD: '%'; + +ADD_ASSIGN: '+='; +SUB_ASSIGN: '-='; +MUL_ASSIGN: '*='; +DIV_ASSIGN: '/='; +AND_ASSIGN: '&='; +OR_ASSIGN: '|='; +XOR_ASSIGN: '^='; +MOD_ASSIGN: '%='; +LSHIFT_ASSIGN: '<<='; +RSHIFT_ASSIGN: '>>='; +URSHIFT_ASSIGN: '>>>='; + +TemplateStringLiteral: '`' ('\\`' | ~'`')* '`'; + +// Java 8 tokens + +ARROW: '->'; +COLONCOLON: '::'; + +// Additional symbols not defined in the lexical specification + +AT: '@'; +ELLIPSIS: '...'; + +// Whitespace and comments + +WS: [ \t\r\n\u000C]+ -> channel(HIDDEN); + +// Identifiers + +IDENTIFIER: Letter LetterOrDigit*; + +// Fragment rules + +fragment ExponentPart + : [eE] [+-]? Digits + ; + +fragment EscapeSequence + : '\\' [btnfr"'\\] + | '\\' ([0-3]? [0-7])? [0-7] + | '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit + ; + +fragment HexDigits + : HexDigit ((HexDigit | '_')* HexDigit)? + ; + +fragment HexDigit + : [0-9a-fA-F] + ; + +fragment Digits + : [0-9] ([0-9_]* [0-9])? + ; + +fragment LetterOrDigit + : Letter + | [0-9] + ; + +fragment Letter + : [a-zA-Z$_] // these are the "java letters" below 0x7F + | ~[\u0000-\u007F\uD800-\uDBFF] // covers all characters above 0x7F which are not a surrogate + | [\uD800-\uDBFF] [\uDC00-\uDFFF] // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + ; diff --git a/languages/g4/GoLexer.g4 b/languages/g4/GoLexer.g4 new file mode 100644 index 0000000000000000000000000000000000000000..a3de618369341d1848243e9a88260753083c27d0 --- /dev/null +++ b/languages/g4/GoLexer.g4 @@ -0,0 +1,468 @@ +/* + [The "BSD licence"] + Copyright (c) 2017 Sasa Coh, Michał Błotniak + Copyright (c) 2019 Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies + Copyright (c) 2019 Dmitry Rassadin, flipparassa@gmail.com, Positive Technologies + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * A Go grammar for ANTLR 4 derived from the Go Language Specification + * https://golang.org/ref/spec + */ + +lexer grammar GoLexer; + +// Keywords + +BREAK : 'break'; +DEFAULT : 'default'; +FUNC : 'func'; +INTERFACE : 'interface'; +SELECT : 'select'; +CASE : 'case'; +DEFER : 'defer'; +GO : 'go'; +MAP : 'map'; +STRUCT : 'struct'; +CHAN : 'chan'; +ELSE : 'else'; +GOTO : 'goto'; +PACKAGE : 'package'; +SWITCH : 'switch'; +CONST : 'const'; +FALLTHROUGH : 'fallthrough'; +IF : 'if'; +RANGE : 'range'; +TYPE : 'type'; +CONTINUE : 'continue'; +FOR : 'for'; +IMPORT : 'import'; +RETURN : 'return'; +VAR : 'var'; + +NIL_LIT : 'nil'; + +IDENTIFIER : LETTER (LETTER | UNICODE_DIGIT)*; + +// Punctuation + +L_PAREN : '('; +R_PAREN : ')'; +L_CURLY : '{'; +R_CURLY : '}'; +L_BRACKET : '['; +R_BRACKET : ']'; +ASSIGN : '='; +COMMA : ','; +SEMI : ';'; +COLON : ':'; +DOT : '.'; +PLUS_PLUS : '++'; +MINUS_MINUS : '--'; +DECLARE_ASSIGN : ':='; +ELLIPSIS : '...'; + +// Logical + +LOGICAL_OR : '||'; +LOGICAL_AND : '&&'; + +// Relation operators + +EQUALS : '=='; +NOT_EQUALS : '!='; +LESS : '<'; +LESS_OR_EQUALS : '<='; +GREATER : '>'; +GREATER_OR_EQUALS : '>='; + +// Arithmetic operators + +OR : '|'; +DIV : '/'; +MOD : '%'; +LSHIFT : '<<'; +RSHIFT : '>>'; +BIT_CLEAR : '&^'; + +// Unary operators + +EXCLAMATION : '!'; + +// Mixed operators + +PLUS : '+'; +MINUS : '-'; +CARET : '^'; +STAR : '*'; +AMPERSAND : '&'; +RECEIVE : '<-'; + +// Number literals + +DECIMAL_LIT : [1-9] [0-9]*; +OCTAL_LIT : '0' OCTAL_DIGIT*; +HEX_LIT : '0' [xX] HEX_DIGIT+; + +FLOAT_LIT : DECIMALS ('.' DECIMALS? EXPONENT? | EXPONENT) + | '.' DECIMALS EXPONENT? + ; + +IMAGINARY_LIT : (DECIMALS | FLOAT_LIT) 'i'; + +// Rune literals + +RUNE_LIT : '\'' (~[\n\\] | ESCAPED_VALUE) '\''; + +// String literals + +RAW_STRING_LIT : '`' ~'`'* '`'; +INTERPRETED_STRING_LIT : '"' (~["\\] | ESCAPED_VALUE)* '"'; + +// Hidden tokens + +WS : [ \t]+ -> channel(HIDDEN); +COMMENT : '/*' .*? '*/' -> channel(HIDDEN); +TERMINATOR : [\r\n]+ -> channel(HIDDEN); +LINE_COMMENT : '//' ~[\r\n]* -> channel(HIDDEN); + +// Fragments + +fragment ESCAPED_VALUE + : '\\' ('u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT + | 'U' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT + | [abfnrtv\\'"] + | OCTAL_DIGIT OCTAL_DIGIT OCTAL_DIGIT + | 'x' HEX_DIGIT HEX_DIGIT) + ; + +fragment DECIMALS + : [0-9]+ + ; + +fragment OCTAL_DIGIT + : [0-7] + ; + +fragment HEX_DIGIT + : [0-9a-fA-F] + ; + +fragment EXPONENT + : [eE] [+-]? DECIMALS + ; + +fragment LETTER + : UNICODE_LETTER + | '_' + ; + +fragment UNICODE_DIGIT + : [\u0030-\u0039] + | [\u0660-\u0669] + | [\u06F0-\u06F9] + | [\u0966-\u096F] + | [\u09E6-\u09EF] + | [\u0A66-\u0A6F] + | [\u0AE6-\u0AEF] + | [\u0B66-\u0B6F] + | [\u0BE7-\u0BEF] + | [\u0C66-\u0C6F] + | [\u0CE6-\u0CEF] + | [\u0D66-\u0D6F] + | [\u0E50-\u0E59] + | [\u0ED0-\u0ED9] + | [\u0F20-\u0F29] + | [\u1040-\u1049] + | [\u1369-\u1371] + | [\u17E0-\u17E9] + | [\u1810-\u1819] + | [\uFF10-\uFF19] + ; + +fragment UNICODE_LETTER + : [\u0041-\u005A] + | [\u0061-\u007A] + | [\u00AA] + | [\u00B5] + | [\u00BA] + | [\u00C0-\u00D6] + | [\u00D8-\u00F6] + | [\u00F8-\u021F] + | [\u0222-\u0233] + | [\u0250-\u02AD] + | [\u02B0-\u02B8] + | [\u02BB-\u02C1] + | [\u02D0-\u02D1] + | [\u02E0-\u02E4] + | [\u02EE] + | [\u037A] + | [\u0386] + | [\u0388-\u038A] + | [\u038C] + | [\u038E-\u03A1] + | [\u03A3-\u03CE] + | [\u03D0-\u03D7] + | [\u03DA-\u03F3] + | [\u0400-\u0481] + | [\u048C-\u04C4] + | [\u04C7-\u04C8] + | [\u04CB-\u04CC] + | [\u04D0-\u04F5] + | [\u04F8-\u04F9] + | [\u0531-\u0556] + | [\u0559] + | [\u0561-\u0587] + | [\u05D0-\u05EA] + | [\u05F0-\u05F2] + | [\u0621-\u063A] + | [\u0640-\u064A] + | [\u0671-\u06D3] + | [\u06D5] + | [\u06E5-\u06E6] + | [\u06FA-\u06FC] + | [\u0710] + | [\u0712-\u072C] + | [\u0780-\u07A5] + | [\u0905-\u0939] + | [\u093D] + | [\u0950] + | [\u0958-\u0961] + | [\u0985-\u098C] + | [\u098F-\u0990] + | [\u0993-\u09A8] + | [\u09AA-\u09B0] + | [\u09B2] + | [\u09B6-\u09B9] + | [\u09DC-\u09DD] + | [\u09DF-\u09E1] + | [\u09F0-\u09F1] + | [\u0A05-\u0A0A] + | [\u0A0F-\u0A10] + | [\u0A13-\u0A28] + | [\u0A2A-\u0A30] + | [\u0A32-\u0A33] + | [\u0A35-\u0A36] + | [\u0A38-\u0A39] + | [\u0A59-\u0A5C] + | [\u0A5E] + | [\u0A72-\u0A74] + | [\u0A85-\u0A8B] + | [\u0A8D] + | [\u0A8F-\u0A91] + | [\u0A93-\u0AA8] + | [\u0AAA-\u0AB0] + | [\u0AB2-\u0AB3] + | [\u0AB5-\u0AB9] + | [\u0ABD] + | [\u0AD0] + | [\u0AE0] + | [\u0B05-\u0B0C] + | [\u0B0F-\u0B10] + | [\u0B13-\u0B28] + | [\u0B2A-\u0B30] + | [\u0B32-\u0B33] + | [\u0B36-\u0B39] + | [\u0B3D] + | [\u0B5C-\u0B5D] + | [\u0B5F-\u0B61] + | [\u0B85-\u0B8A] + | [\u0B8E-\u0B90] + | [\u0B92-\u0B95] + | [\u0B99-\u0B9A] + | [\u0B9C] + | [\u0B9E-\u0B9F] + | [\u0BA3-\u0BA4] + | [\u0BA8-\u0BAA] + | [\u0BAE-\u0BB5] + | [\u0BB7-\u0BB9] + | [\u0C05-\u0C0C] + | [\u0C0E-\u0C10] + | [\u0C12-\u0C28] + | [\u0C2A-\u0C33] + | [\u0C35-\u0C39] + | [\u0C60-\u0C61] + | [\u0C85-\u0C8C] + | [\u0C8E-\u0C90] + | [\u0C92-\u0CA8] + | [\u0CAA-\u0CB3] + | [\u0CB5-\u0CB9] + | [\u0CDE] + | [\u0CE0-\u0CE1] + | [\u0D05-\u0D0C] + | [\u0D0E-\u0D10] + | [\u0D12-\u0D28] + | [\u0D2A-\u0D39] + | [\u0D60-\u0D61] + | [\u0D85-\u0D96] + | [\u0D9A-\u0DB1] + | [\u0DB3-\u0DBB] + | [\u0DBD] + | [\u0DC0-\u0DC6] + | [\u0E01-\u0E30] + | [\u0E32-\u0E33] + | [\u0E40-\u0E46] + | [\u0E81-\u0E82] + | [\u0E84] + | [\u0E87-\u0E88] + | [\u0E8A] + | [\u0E8D] + | [\u0E94-\u0E97] + | [\u0E99-\u0E9F] + | [\u0EA1-\u0EA3] + | [\u0EA5] + | [\u0EA7] + | [\u0EAA-\u0EAB] + | [\u0EAD-\u0EB0] + | [\u0EB2-\u0EB3] + | [\u0EBD-\u0EC4] + | [\u0EC6] + | [\u0EDC-\u0EDD] + | [\u0F00] + | [\u0F40-\u0F6A] + | [\u0F88-\u0F8B] + | [\u1000-\u1021] + | [\u1023-\u1027] + | [\u1029-\u102A] + | [\u1050-\u1055] + | [\u10A0-\u10C5] + | [\u10D0-\u10F6] + | [\u1100-\u1159] + | [\u115F-\u11A2] + | [\u11A8-\u11F9] + | [\u1200-\u1206] + | [\u1208-\u1246] + | [\u1248] + | [\u124A-\u124D] + | [\u1250-\u1256] + | [\u1258] + | [\u125A-\u125D] + | [\u1260-\u1286] + | [\u1288] + | [\u128A-\u128D] + | [\u1290-\u12AE] + | [\u12B0] + | [\u12B2-\u12B5] + | [\u12B8-\u12BE] + | [\u12C0] + | [\u12C2-\u12C5] + | [\u12C8-\u12CE] + | [\u12D0-\u12D6] + | [\u12D8-\u12EE] + | [\u12F0-\u130E] + | [\u1310] + | [\u1312-\u1315] + | [\u1318-\u131E] + | [\u1320-\u1346] + | [\u1348-\u135A] + | [\u13A0-\u13B0] + | [\u13B1-\u13F4] + | [\u1401-\u1676] + | [\u1681-\u169A] + | [\u16A0-\u16EA] + | [\u1780-\u17B3] + | [\u1820-\u1877] + | [\u1880-\u18A8] + | [\u1E00-\u1E9B] + | [\u1EA0-\u1EE0] + | [\u1EE1-\u1EF9] + | [\u1F00-\u1F15] + | [\u1F18-\u1F1D] + | [\u1F20-\u1F39] + | [\u1F3A-\u1F45] + | [\u1F48-\u1F4D] + | [\u1F50-\u1F57] + | [\u1F59] + | [\u1F5B] + | [\u1F5D] + | [\u1F5F-\u1F7D] + | [\u1F80-\u1FB4] + | [\u1FB6-\u1FBC] + | [\u1FBE] + | [\u1FC2-\u1FC4] + | [\u1FC6-\u1FCC] + | [\u1FD0-\u1FD3] + | [\u1FD6-\u1FDB] + | [\u1FE0-\u1FEC] + | [\u1FF2-\u1FF4] + | [\u1FF6-\u1FFC] + | [\u207F] + | [\u2102] + | [\u2107] + | [\u210A-\u2113] + | [\u2115] + | [\u2119-\u211D] + | [\u2124] + | [\u2126] + | [\u2128] + | [\u212A-\u212D] + | [\u212F-\u2131] + | [\u2133-\u2139] + | [\u2160-\u2183] + | [\u3005-\u3007] + | [\u3021-\u3029] + | [\u3031-\u3035] + | [\u3038-\u303A] + | [\u3041-\u3094] + | [\u309D-\u309E] + | [\u30A1-\u30FA] + | [\u30FC-\u30FE] + | [\u3105-\u312C] + | [\u3131-\u318E] + | [\u31A0-\u31B7] + | [\u3400] + | [\u4DB5] + | [\u4E00] + | [\u9FA5] + | [\uA000-\uA48C] + | [\uAC00] + | [\uD7A3] + | [\uF900-\uFA2D] + | [\uFB00-\uFB06] + | [\uFB13-\uFB17] + | [\uFB1D] + | [\uFB1F-\uFB28] + | [\uFB2A-\uFB36] + | [\uFB38-\uFB3C] + | [\uFB3E] + | [\uFB40-\uFB41] + | [\uFB43-\uFB44] + | [\uFB46-\uFBB1] + | [\uFBD3-\uFD3D] + | [\uFD50-\uFD8F] + | [\uFD92-\uFDC7] + | [\uFDF0-\uFDFB] + | [\uFE70-\uFE72] + | [\uFE74] + | [\uFE76-\uFEFC] + | [\uFF21-\uFF3A] + | [\uFF41-\uFF5A] + | [\uFF66-\uFFBE] + | [\uFFC2-\uFFC7] + | [\uFFCA-\uFFCF] + | [\uFFD2-\uFFD7] + | [\uFFDA-\uFFDC] + ; diff --git a/languages/g4/GoParser.g4 b/languages/g4/GoParser.g4 new file mode 100644 index 0000000000000000000000000000000000000000..2de42c127e743a7dbda569b627d435fe771f29d4 --- /dev/null +++ b/languages/g4/GoParser.g4 @@ -0,0 +1,521 @@ +/* + [The "BSD licence"] + Copyright (c) 2017 Sasa Coh, Michał Błotniak + Copyright (c) 2019 Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies + Copyright (c) 2019 Dmitry Rassadin, flipparassa@gmail.com, Positive Technologies + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * A Go grammar for ANTLR 4 derived from the Go Language Specification + * https://golang.org/ref/spec + */ + +parser grammar GoParser; + +options { + tokenVocab=GoLexer; + superClass=GoParserBase; +} + +sourceFile + : packageClause eos (importDecl eos)* ((functionDecl | methodDecl | declaration) eos)* + ; + +packageClause + : 'package' IDENTIFIER + ; + +importDecl + : 'import' (importSpec | '(' (importSpec eos)* ')') + ; + +importSpec + : ('.' | IDENTIFIER)? importPath + ; + +importPath + : string_ + ; + +declaration + : constDecl + | typeDecl + | varDecl + ; + +constDecl + : 'const' (constSpec | '(' (constSpec eos)* ')') + ; + +constSpec + : identifierList (type_? '=' expressionList)? + ; + +identifierList + : IDENTIFIER (',' IDENTIFIER)* + ; + +expressionList + : expression (',' expression)* + ; + +typeDecl + : 'type' (typeSpec | '(' (typeSpec eos)* ')') + ; + +typeSpec + : IDENTIFIER ASSIGN? type_ + ; + +// Function declarations + +functionDecl + : 'func' IDENTIFIER (signature block?) + ; + +methodDecl + : 'func' receiver IDENTIFIER (signature block?) + ; + +receiver + : parameters + ; + +varDecl + : 'var' (varSpec | '(' (varSpec eos)* ')') + ; + +varSpec + : identifierList (type_ ('=' expressionList)? | '=' expressionList) + ; + +block + : '{' statementList? '}' + ; + +statementList + : (statement eos)+ + ; + +statement + : declaration + | labeledStmt + | simpleStmt + | goStmt + | returnStmt + | breakStmt + | continueStmt + | gotoStmt + | fallthroughStmt + | block + | ifStmt + | switchStmt + | selectStmt + | forStmt + | deferStmt + ; + +simpleStmt + : sendStmt + | expressionStmt + | incDecStmt + | assignment + | shortVarDecl + | emptyStmt + ; + +expressionStmt + : expression + ; + +sendStmt + : expression '<-' expression + ; + +incDecStmt + : expression (PLUS_PLUS | MINUS_MINUS) + ; + +assignment + : expressionList assign_op expressionList + ; + +assign_op + : ('+' | '-' | '|' | '^' | '*' | '/' | '%' | '<<' | '>>' | '&' | '&^')? '=' + ; + +shortVarDecl + : identifierList ':=' expressionList + ; + +emptyStmt + : ';' + ; + +labeledStmt + : IDENTIFIER ':' statement + ; + +returnStmt + : 'return' expressionList? + ; + +breakStmt + : 'break' IDENTIFIER? + ; + +continueStmt + : 'continue' IDENTIFIER? + ; + +gotoStmt + : 'goto' IDENTIFIER + ; + +fallthroughStmt + : 'fallthrough' + ; + +deferStmt + : 'defer' expression + ; + +ifStmt + : 'if' (simpleStmt ';')? expression block ('else' (ifStmt | block))? + ; + +switchStmt + : exprSwitchStmt + | typeSwitchStmt + ; + +exprSwitchStmt + : 'switch' (simpleStmt ';')? expression? '{' exprCaseClause* '}' + ; + +exprCaseClause + : exprSwitchCase ':' statementList? + ; + +exprSwitchCase + : 'case' expressionList + | 'default' + ; + +typeSwitchStmt + : 'switch' (simpleStmt ';')? typeSwitchGuard '{' typeCaseClause* '}' + ; + +typeSwitchGuard + : (IDENTIFIER ':=')? primaryExpr '.' '(' 'type' ')' + ; + +typeCaseClause + : typeSwitchCase ':' statementList? + ; + +typeSwitchCase + : 'case' typeList + | 'default' + ; + +typeList + : (type_ | NIL_LIT) (',' (type_ | NIL_LIT))* + ; + +selectStmt + : 'select' '{' commClause* '}' + ; + +commClause + : commCase ':' statementList? + ; + +commCase + : 'case' (sendStmt | recvStmt) + | 'default' + ; + +recvStmt + : (expressionList '=' | identifierList ':=')? expression + ; + +forStmt + : 'for' (expression | forClause | rangeClause)? block + ; + +forClause + : simpleStmt? ';' expression? ';' simpleStmt? + ; + +rangeClause + : (expressionList '=' | identifierList ':=')? 'range' expression + ; + +goStmt + : 'go' expression + ; + +type_ + : typeName + | typeLit + | '(' type_ ')' + ; + +typeName + : IDENTIFIER + | qualifiedIdent + ; + +typeLit + : arrayType + | structType + | pointerType + | functionType + | interfaceType + | sliceType + | mapType + | channelType + ; + +arrayType + : '[' arrayLength ']' elementType + ; + +arrayLength + : expression + ; + +elementType + : type_ + ; + +pointerType + : '*' type_ + ; + +interfaceType + : 'interface' '{' (methodSpec eos)* '}' + ; + +sliceType + : '[' ']' elementType + ; + +// It's possible to replace `type` with more restricted typeLit list and also pay attention to nil maps +mapType + : 'map' '[' type_ ']' elementType + ; + +channelType + : ('chan' | 'chan' '<-' | '<-' 'chan') elementType + ; + +methodSpec + : {noTerminatorAfterParams(2)}? IDENTIFIER parameters result + | typeName + | IDENTIFIER parameters + ; + +functionType + : 'func' signature + ; + +signature + : {noTerminatorAfterParams(1)}? parameters result + | parameters + ; + +result + : parameters + | type_ + ; + +parameters + : '(' (parameterDecl (COMMA parameterDecl)* COMMA?)? ')' + ; + +parameterDecl + : identifierList? '...'? type_ + ; + +expression + : primaryExpr + | unaryExpr + | expression ('*' | '/' | '%' | '<<' | '>>' | '&' | '&^') expression + | expression ('+' | '-' | '|' | '^') expression + | expression ('==' | '!=' | '<' | '<=' | '>' | '>=') expression + | expression '&&' expression + | expression '||' expression + ; + +primaryExpr + : operand + | conversion + | primaryExpr ( DOT IDENTIFIER + | index + | slice + | typeAssertion + | arguments) + ; + +unaryExpr + : primaryExpr + | ('+' | '-' | '!' | '^' | '*' | '&' | '<-') expression + ; + +conversion + : type_ '(' expression ','? ')' + ; + +operand + : literal + | operandName + | methodExpr + | '(' expression ')' + ; + +literal + : basicLit + | compositeLit + | functionLit + ; + +basicLit + : NIL_LIT + | integer + | string_ + | FLOAT_LIT + | IMAGINARY_LIT + | RUNE_LIT + ; + +integer + : DECIMAL_LIT + | OCTAL_LIT + | HEX_LIT + | IMAGINARY_LIT + | RUNE_LIT + ; + +operandName + : IDENTIFIER + | qualifiedIdent + ; + +qualifiedIdent + : IDENTIFIER '.' IDENTIFIER + ; + +compositeLit + : literalType literalValue + ; + +literalType + : structType + | arrayType + | '[' '...' ']' elementType + | sliceType + | mapType + | typeName + ; + +literalValue + : '{' (elementList ','?)? '}' + ; + +elementList + : keyedElement (',' keyedElement)* + ; + +keyedElement + : (key ':')? element + ; + +key + : IDENTIFIER + | expression + | literalValue + ; + +element + : expression + | literalValue + ; + +structType + : 'struct' '{' (fieldDecl eos)* '}' + ; + +fieldDecl + : ({p.noTerminatorBetween(2)}? identifierList type_ | anonymousField) string_? + ; + +string_ + : RAW_STRING_LIT + | INTERPRETED_STRING_LIT + ; + +anonymousField + : '*'? typeName + ; + +functionLit + : 'func' signature block // function + ; + +index + : '[' expression ']' + ; + +slice + : '[' (expression? ':' expression? | expression? ':' expression ':' expression) ']' + ; + +typeAssertion + : '.' '(' type_ ')' + ; + +arguments + : '(' ((expressionList | type_ (',' expressionList)?) '...'? ','?)? ')' + ; + +methodExpr + : receiverType DOT IDENTIFIER + ; + +receiverType + : typeName + | '(' ('*' typeName | receiverType) ')' + ; + +eos + : ';' + | EOF + | {p.lineTerminatorAhead()}? + | {p.checkPreviousTokenText("}")}? + ; + diff --git a/languages/g4/GroovyLexer.g4 b/languages/g4/GroovyLexer.g4 new file mode 100644 index 0000000000000000000000000000000000000000..e31a7b701f0416ca881c9c07161c01713843af05 --- /dev/null +++ b/languages/g4/GroovyLexer.g4 @@ -0,0 +1,953 @@ +/* + * This file is adapted from the Antlr4 Java grammar which has the following license + * + * Copyright (c) 2013 Terence Parr, Sam Harwell + * All rights reserved. + * [The "BSD licence"] + * + * http://www.opensource.org/licenses/bsd-license.php + * + * Subsequent modifications by the Groovy community have been done under the Apache License v2: + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * The Groovy grammar is based on the official grammar for Java: + * https://github.com/antlr/grammars-v4/blob/master/java/Java.g4 + */ +lexer grammar GroovyLexer; + +//options { +// superClass = AbstractLexer; +//} +// +//@header { +// import static org.apache.groovy.parser.antlr4.SemanticPredicates.*; +// import java.util.Deque; +// import java.util.ArrayDeque; +// import java.util.Map; +// import java.util.HashMap; +// import java.util.Set; +// import java.util.HashSet; +// import java.util.Collections; +// import java.util.Arrays; +//} +// +//@members { +// private long tokenIndex = 0; +// private int lastTokenType = 0; +// private int invalidDigitCount = 0; +// +// /** +// * Record the index and token type of the current token while emitting tokens. +// */ +// @Override +// public void emit(Token token) { +// this.tokenIndex++; +// +// int tokenType = token.getType(); +// if (Token.DEFAULT_CHANNEL == token.getChannel()) { +// this.lastTokenType = tokenType; +// } +// +// if (RollBackOne == tokenType) { +// this.rollbackOneChar(); +// } +// +// super.emit(token); +// } +// +// private static final Set REGEX_CHECK_SET = +// Collections.unmodifiableSet( +// new HashSet<>(Arrays.asList(Identifier, CapitalizedIdentifier, NullLiteral, BooleanLiteral, THIS, RPAREN, RBRACK, RBRACE, IntegerLiteral, FloatingPointLiteral, StringLiteral, GStringEnd, INC, DEC))); +// private boolean isRegexAllowed() { +// if (REGEX_CHECK_SET.contains(this.lastTokenType)) { +// return false; +// } +// +// return true; +// } +// +// /** +// * just a hook, which will be overrided by GroovyLangLexer +// */ +// protected void rollbackOneChar() {} +// +// private static class Paren { +// private String text; +// private int lastTokenType; +// private int line; +// private int column; +// +// public Paren(String text, int lastTokenType, int line, int column) { +// this.text = text; +// this.lastTokenType = lastTokenType; +// this.line = line; +// this.column = column; +// } +// +// public String getText() { +// return this.text; +// } +// +// public int getLastTokenType() { +// return this.lastTokenType; +// } +// +// public int getLine() { +// return line; +// } +// +// public int getColumn() { +// return column; +// } +// +// @Override +// public int hashCode() { +// return (int) (text.hashCode() * line + column); +// } +// +// @Override +// public boolean equals(Object obj) { +// if (!(obj instanceof Paren)) { +// return false; +// } +// +// Paren other = (Paren) obj; +// +// return this.text.equals(other.text) && (this.line == other.line && this.column == other.column); +// } +// } +// +// private static final Map PAREN_MAP = Collections.unmodifiableMap(new HashMap() { +// { +// put("(", ")"); +// put("[", "]"); +// put("{", "}"); +// } +// }); +// +// protected void enterParenCallback(String text) {} +// +// protected void exitParenCallback(String text) {} +// +// private final Deque parenStack = new ArrayDeque<>(32); +// +// private void enterParen() { +// String text = getText(); +// enterParenCallback(text); +// parenStack.push(new Paren(text, this.lastTokenType, getLine(), getCharPositionInLine())); +// } +// +// private void exitParen() { +// Paren paren = parenStack.peek(); +// String text = getText(); +// +// require(null != paren, "Too many '" + text + "'"); +// require(text.equals(PAREN_MAP.get(paren.getText())), +// "'" + paren.getText() + "'" + new PositionInfo(paren.getLine(), paren.getColumn()) + " can not match '" + text + "'", -1); +// +// exitParenCallback(text); +// parenStack.pop(); +// } +// private boolean isInsideParens() { +// Paren paren = parenStack.peek(); +// +// // We just care about "(" and "[", inside which the new lines will be ignored. +// // Notice: the new lines between "{" and "}" can not be ignored. +// if (null == paren) { +// return false; +// } +// return ("(".equals(paren.getText()) && TRY != paren.getLastTokenType()) // we don't treat try-paren(i.e. try (....)) as parenthesis +// || "[".equals(paren.getText()); +// } +// private void ignoreTokenInsideParens() { +// if (!this.isInsideParens()) { +// return; +// } +// +// this.setChannel(Token.HIDDEN_CHANNEL); +// } +// private void ignoreMultiLineCommentConditionally() { +// if (!this.isInsideParens() && isFollowedByWhiteSpaces(_input)) { +// return; +// } +// +// this.setChannel(Token.HIDDEN_CHANNEL); +// } +// +// @Override +// public int getSyntaxErrorSource() { +// return GroovySyntaxError.LEXER; +// } +// +// @Override +// public int getErrorLine() { +// return getLine(); +// } +// +// @Override +// public int getErrorColumn() { +// return getCharPositionInLine() + 1; +// } +//} + + +// §3.10.5 String Literals +StringLiteral + : GStringQuotationMark DqStringCharacter* GStringQuotationMark + | SqStringQuotationMark SqStringCharacter* SqStringQuotationMark + + | Slash +// | Slash { this.isRegexAllowed() && _input.LA(1) != '*' }? + SlashyStringCharacter+ Slash + + | TdqStringQuotationMark TdqStringCharacter* TdqStringQuotationMark + | TsqStringQuotationMark TsqStringCharacter* TsqStringQuotationMark + | DollarSlashyGStringQuotationMarkBegin DollarSlashyStringCharacter+ DollarSlashyGStringQuotationMarkEnd + ; + +// Groovy gstring +GStringBegin + : GStringQuotationMark DqStringCharacter* Dollar -> pushMode(DQ_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; +TdqGStringBegin + : TdqStringQuotationMark TdqStringCharacter* Dollar -> type(GStringBegin), pushMode(TDQ_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; +SlashyGStringBegin + : Slash SlashyStringCharacter* Dollar -> type(GStringBegin), pushMode(SLASHY_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; +DollarSlashyGStringBegin + : DollarSlashyGStringQuotationMarkBegin DollarSlashyStringCharacter* Dollar -> type(GStringBegin), pushMode(DOLLAR_SLASHY_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; + +mode DQ_GSTRING_MODE; +GStringEnd + : GStringQuotationMark -> popMode + ; +GStringPart + : Dollar -> pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; +GStringCharacter + : DqStringCharacter -> more + ; + +mode TDQ_GSTRING_MODE; +TdqGStringEnd + : TdqStringQuotationMark -> type(GStringEnd), popMode + ; +TdqGStringPart + : Dollar -> type(GStringPart), pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; +TdqGStringCharacter + : TdqStringCharacter -> more + ; + +mode SLASHY_GSTRING_MODE; +SlashyGStringEnd + : Dollar? Slash -> type(GStringEnd), popMode + ; +SlashyGStringPart + : Dollar -> type(GStringPart), pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; +SlashyGStringCharacter + : SlashyStringCharacter -> more + ; + +mode DOLLAR_SLASHY_GSTRING_MODE; +DollarSlashyGStringEnd + : DollarSlashyGStringQuotationMarkEnd -> type(GStringEnd), popMode + ; +DollarSlashyGStringPart + : Dollar -> type(GStringPart), pushMode(GSTRING_TYPE_SELECTOR_MODE) + ; +DollarSlashyGStringCharacter + : DollarSlashyStringCharacter -> more + ; + +mode GSTRING_TYPE_SELECTOR_MODE; +GStringLBrace + : '{' -> type(LBRACE), popMode, pushMode(DEFAULT_MODE) + ; +GStringIdentifier + : IdentifierInGString -> type(Identifier), popMode, pushMode(GSTRING_PATH_MODE) + ; + + +mode GSTRING_PATH_MODE; +GStringPathPart + : Dot IdentifierInGString + ; +RollBackOne + : . -> popMode + ; + + +mode DEFAULT_MODE; +// character in the double quotation string. e.g. "a" +fragment +DqStringCharacter + : ~["\r\n\\$] + | EscapeSequence + ; + +// character in the single quotation string. e.g. 'a' +fragment +SqStringCharacter + : ~['\r\n\\] + | EscapeSequence + ; + +// character in the triple double quotation string. e.g. """a""" +fragment TdqStringCharacter + : ~["\\$] + | GStringQuotationMark + | EscapeSequence + ; + +// character in the triple single quotation string. e.g. '''a''' +fragment TsqStringCharacter + : ~['\\] + | SqStringQuotationMark + | EscapeSequence + ; + +// character in the slashy string. e.g. /a/ +fragment SlashyStringCharacter + : SlashEscape + | Dollar + | ~[/$\u0000] + ; + +// character in the collar slashy string. e.g. $/a/$ +fragment DollarSlashyStringCharacter + : SlashEscape | DollarSlashEscape | DollarDollarEscape + | Slash + | Dollar + | ~[/$\u0000] + ; + +// Groovy keywords +AS : 'as'; +DEF : 'def'; +IN : 'in'; +TRAIT : 'trait'; +THREADSAFE : 'threadsafe'; // reserved keyword + +// the reserved type name of Java10 +VAR : 'var'; + +// §3.9 Keywords +BuiltInPrimitiveType + : BOOLEAN + | CHAR + | BYTE + | SHORT + | INT + | LONG + | FLOAT + | DOUBLE + ; + +ABSTRACT : 'abstract'; +ASSERT : 'assert'; + +fragment +BOOLEAN : 'boolean'; + +BREAK : 'break'; + +fragment +BYTE : 'byte'; + +CASE : 'case'; +CATCH : 'catch'; + +fragment +CHAR : 'char'; + +CLASS : 'class'; +CONST : 'const'; +CONTINUE : 'continue'; +DEFAULT : 'default'; +DO : 'do'; + +fragment +DOUBLE : 'double'; + +ELSE : 'else'; +ENUM : 'enum'; +EXTENDS : 'extends'; +FINAL : 'final'; +FINALLY : 'finally'; + +fragment +FLOAT : 'float'; + + +FOR : 'for'; +IF : 'if'; +GOTO : 'goto'; +IMPLEMENTS : 'implements'; +IMPORT : 'import'; +INSTANCEOF : 'instanceof'; + +fragment +INT : 'int'; + +INTERFACE : 'interface'; + +fragment +LONG : 'long'; + +NATIVE : 'native'; +NEW : 'new'; +PACKAGE : 'package'; +PRIVATE : 'private'; +PROTECTED : 'protected'; +PUBLIC : 'public'; +RETURN : 'return'; + +fragment +SHORT : 'short'; + + +STATIC : 'static'; +STRICTFP : 'strictfp'; +SUPER : 'super'; +SWITCH : 'switch'; +SYNCHRONIZED : 'synchronized'; +THIS : 'this'; +THROW : 'throw'; +THROWS : 'throws'; +TRANSIENT : 'transient'; +TRY : 'try'; +VOID : 'void'; +VOLATILE : 'volatile'; +WHILE : 'while'; + + +// §3.10.1 Integer Literals + +IntegerLiteral + : ( DecimalIntegerLiteral + | HexIntegerLiteral + | OctalIntegerLiteral + | BinaryIntegerLiteral + ) (Underscore)? +// { require(false, "Number ending with underscores is invalid", -1, true); } + + // !!! Error Alternative !!! + | Zero ([0-9])+ IntegerTypeSuffix? +// | Zero ([0-9] { invalidDigitCount++; })+ { require(false, "Invalid octal number", -(invalidDigitCount + 1), true); } IntegerTypeSuffix? + ; + +fragment +Zero + : '0' + ; + +fragment +DecimalIntegerLiteral + : DecimalNumeral IntegerTypeSuffix? + ; + +fragment +HexIntegerLiteral + : HexNumeral IntegerTypeSuffix? + ; + +fragment +OctalIntegerLiteral + : OctalNumeral IntegerTypeSuffix? + ; + +fragment +BinaryIntegerLiteral + : BinaryNumeral IntegerTypeSuffix? + ; + +fragment +IntegerTypeSuffix + : [lLiIgG] + ; + +fragment +DecimalNumeral + : Zero + | NonZeroDigit (Digits? | Underscores Digits) + ; + +fragment +Digits + : Digit (DigitOrUnderscore* Digit)? + ; + +fragment +Digit + : Zero + | NonZeroDigit + ; + +fragment +NonZeroDigit + : [1-9] + ; + +fragment +DigitOrUnderscore + : Digit + | Underscore + ; + +fragment +Underscores + : Underscore+ + ; + +fragment +Underscore + : '_' + ; + +fragment +HexNumeral + : Zero [xX] HexDigits + ; + +fragment +HexDigits + : HexDigit (HexDigitOrUnderscore* HexDigit)? + ; + +fragment +HexDigit + : [0-9a-fA-F] + ; + +fragment +HexDigitOrUnderscore + : HexDigit + | Underscore + ; + +fragment +OctalNumeral + : Zero Underscores? OctalDigits + ; + +fragment +OctalDigits + : OctalDigit (OctalDigitOrUnderscore* OctalDigit)? + ; + +fragment +OctalDigit + : [0-7] + ; + +fragment +OctalDigitOrUnderscore + : OctalDigit + | Underscore + ; + +fragment +BinaryNumeral + : Zero [bB] BinaryDigits + ; + +fragment +BinaryDigits + : BinaryDigit (BinaryDigitOrUnderscore* BinaryDigit)? + ; + +fragment +BinaryDigit + : [01] + ; + +fragment +BinaryDigitOrUnderscore + : BinaryDigit + | Underscore + ; + +// §3.10.2 Floating-Point Literals + +FloatingPointLiteral + : ( DecimalFloatingPointLiteral + | HexadecimalFloatingPointLiteral + ) (Underscore)? + ; + +fragment +DecimalFloatingPointLiteral + : Digits Dot Digits ExponentPart? FloatTypeSuffix? + | Digits ExponentPart FloatTypeSuffix? + | Digits FloatTypeSuffix + ; + +fragment +ExponentPart + : ExponentIndicator SignedInteger + ; + +fragment +ExponentIndicator + : [eE] + ; + +fragment +SignedInteger + : Sign? Digits + ; + +fragment +Sign + : [+\-] + ; + +fragment +FloatTypeSuffix + : [fFdDgG] + ; + +fragment +HexadecimalFloatingPointLiteral + : HexSignificand BinaryExponent FloatTypeSuffix? + ; + +fragment +HexSignificand + : HexNumeral Dot? + | Zero [xX] HexDigits? Dot HexDigits + ; + +fragment +BinaryExponent + : BinaryExponentIndicator SignedInteger + ; + +fragment +BinaryExponentIndicator + : [pP] + ; + +fragment +Dot : '.' + ; + +// §3.10.3 Boolean Literals + +BooleanLiteral + : 'true' + | 'false' + ; + + +// §3.10.6 Escape Sequences for Character and String Literals + +fragment +EscapeSequence + : Backslash [btnfr"'\\] + | OctalEscape + | UnicodeEscape + | DollarEscape + | LineEscape + ; + + +fragment +OctalEscape + : Backslash OctalDigit + | Backslash OctalDigit OctalDigit + | Backslash ZeroToThree OctalDigit OctalDigit + ; + +// Groovy allows 1 or more u's after the backslash +fragment +UnicodeEscape + : Backslash 'u' HexDigit HexDigit HexDigit HexDigit + ; + +fragment +ZeroToThree + : [0-3] + ; + +// Groovy Escape Sequences + +fragment +DollarEscape + : Backslash Dollar + ; + +fragment +LineEscape + : Backslash '\r'? '\n' + ; + +fragment +SlashEscape + : Backslash Slash + ; + +fragment +Backslash + : '\\' + ; + +fragment +Slash + : '/' + ; + +fragment +Dollar + : '$' + ; + +fragment +GStringQuotationMark + : '"' + ; + +fragment +SqStringQuotationMark + : '\'' + ; + +fragment +TdqStringQuotationMark + : '"""' + ; + +fragment +TsqStringQuotationMark + : '\'\'\'' + ; + +fragment +DollarSlashyGStringQuotationMarkBegin + : '$/' + ; + +fragment +DollarSlashyGStringQuotationMarkEnd + : '/$' + ; + +fragment +DollarSlashEscape + : '$/$' + ; + +fragment +DollarDollarEscape + : '$$' + ; + +// §3.10.7 The Null Literal +NullLiteral + : 'null' + ; + +// Groovy Operators + +RANGE_INCLUSIVE : '..'; +RANGE_EXCLUSIVE : '..<'; +SPREAD_DOT : '*.'; +SAFE_DOT : '?.'; +SAFE_CHAIN_DOT : '??.'; +ELVIS : '?:'; +METHOD_POINTER : '.&'; +METHOD_REFERENCE : '::'; +REGEX_FIND : '=~'; +REGEX_MATCH : '==~'; +POWER : '**'; +POWER_ASSIGN : '**='; +SPACESHIP : '<=>'; +IDENTICAL : '==='; +NOT_IDENTICAL : '!=='; +ARROW : '->'; + +// !internalPromise will be parsed as !in ternalPromise, so semantic predicates are necessary +NOT_INSTANCEOF : '!instanceof' ; +NOT_IN : '!in' ; + + +// §3.11 Separators + +LPAREN : '(' -> pushMode(DEFAULT_MODE); +RPAREN : ')' -> popMode; +LBRACE : '{' -> pushMode(DEFAULT_MODE); +RBRACE : '}' -> popMode; +LBRACK : '[' -> pushMode(DEFAULT_MODE); +RBRACK : ']' -> popMode; +// +//LPAREN : '(' { this.enterParen(); } -> pushMode(DEFAULT_MODE); +//RPAREN : ')' { this.exitParen(); } -> popMode; +//LBRACE : '{' { this.enterParen(); } -> pushMode(DEFAULT_MODE); +//RBRACE : '}' { this.exitParen(); } -> popMode; +//LBRACK : '[' { this.enterParen(); } -> pushMode(DEFAULT_MODE); +//RBRACK : ']' { this.exitParen(); } -> popMode; + +SEMI : ';'; +COMMA : ','; +DOT : Dot; + +// §3.12 Operators + +ASSIGN : '='; +GT : '>'; +LT : '<'; +NOT : '!'; +BITNOT : '~'; +QUESTION : '?'; +COLON : ':'; +EQUAL : '=='; +LE : '<='; +GE : '>='; +NOTEQUAL : '!='; +AND : '&&'; +OR : '||'; +INC : '++'; +DEC : '--'; +ADD : '+'; +SUB : '-'; +MUL : '*'; +DIV : Slash; +BITAND : '&'; +BITOR : '|'; +XOR : '^'; +MOD : '%'; + + +ADD_ASSIGN : '+='; +SUB_ASSIGN : '-='; +MUL_ASSIGN : '*='; +DIV_ASSIGN : '/='; +AND_ASSIGN : '&='; +OR_ASSIGN : '|='; +XOR_ASSIGN : '^='; +MOD_ASSIGN : '%='; +LSHIFT_ASSIGN : '<<='; +RSHIFT_ASSIGN : '>>='; +URSHIFT_ASSIGN : '>>>='; +ELVIS_ASSIGN : '?='; + + +// §3.8 Identifiers (must appear after all keywords in the grammar) +CapitalizedIdentifier + : [A-Z] JavaLetterOrDigit* + ; + +Identifier + : JavaLetter JavaLetterOrDigit* + ; + +fragment +IdentifierInGString + : JavaLetterInGString JavaLetterOrDigitInGString* + ; + +fragment +JavaLetterInGString + : [a-zA-Z_] // these are the "java letters" below 0x7F, except for $ + | // covers all characters above 0x7F which are not a surrogate + ~[\u0000-\u007F\uD800-\uDBFF] +// {Character.isJavaIdentifierStart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] +// {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + +fragment +JavaLetterOrDigitInGString + : [a-zA-Z0-9_] // these are the "java letters or digits" below 0x7F, except for $ + | // covers all characters above 0x7F which are not a surrogate + ~[\u0000-\u007F\uD800-\uDBFF] +// {Character.isJavaIdentifierPart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] +// {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + + +fragment +JavaLetter + : [a-zA-Z$_] // these are the "java letters" below 0x7F + | // covers all characters above 0x7F which are not a surrogate + ~[\u0000-\u007F\uD800-\uDBFF] +// {Character.isJavaIdentifierStart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] +// {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + +fragment +JavaLetterOrDigit + : [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F + | // covers all characters above 0x7F which are not a surrogate + ~[\u0000-\u007F\uD800-\uDBFF] +// {Character.isJavaIdentifierPart(_input.LA(-1))}? + | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + [\uD800-\uDBFF] [\uDC00-\uDFFF] +// {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}? + ; + +// +// Additional symbols not defined in the lexical specification +// + +AT : '@'; +ELLIPSIS : '...'; + +// +// Whitespace, line escape and comments +// +WS : ([ \t\u000C]+ | LineEscape+) -> skip + ; + + +// Inside (...) and [...] but not {...}, ignore newlines. +NL : '\r'? '\n' + ; + +// Multiple-line comments(including groovydoc comments) +ML_COMMENT + : '/*' .*? '*/' -> type(NL) + ; + +// Single-line comments +SL_COMMENT + : '//' ~[\r\n\uFFFF]* -> type(NL) + ; + +// Script-header comments. +// The very first characters of the file may be "#!". If so, ignore the first line. +SH_COMMENT + : '#!' ~[\r\n\uFFFF]* -> skip + ; + +// Unexpected characters will be handled by groovy parser later. +UNEXPECTED_CHAR + : . + ; diff --git a/languages/g4/GroovyLexer.tokens b/languages/g4/GroovyLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..e86dacaff915bb9c2301caa6f620cdaa6bcaa326 --- /dev/null +++ b/languages/g4/GroovyLexer.tokens @@ -0,0 +1,240 @@ +StringLiteral=1 +GStringBegin=2 +GStringEnd=3 +GStringPart=4 +GStringPathPart=5 +RollBackOne=6 +AS=7 +DEF=8 +IN=9 +TRAIT=10 +THREADSAFE=11 +VAR=12 +BuiltInPrimitiveType=13 +ABSTRACT=14 +ASSERT=15 +BREAK=16 +CASE=17 +CATCH=18 +CLASS=19 +CONST=20 +CONTINUE=21 +DEFAULT=22 +DO=23 +ELSE=24 +ENUM=25 +EXTENDS=26 +FINAL=27 +FINALLY=28 +FOR=29 +IF=30 +GOTO=31 +IMPLEMENTS=32 +IMPORT=33 +INSTANCEOF=34 +INTERFACE=35 +NATIVE=36 +NEW=37 +PACKAGE=38 +PRIVATE=39 +PROTECTED=40 +PUBLIC=41 +RETURN=42 +STATIC=43 +STRICTFP=44 +SUPER=45 +SWITCH=46 +SYNCHRONIZED=47 +THIS=48 +THROW=49 +THROWS=50 +TRANSIENT=51 +TRY=52 +VOID=53 +VOLATILE=54 +WHILE=55 +IntegerLiteral=56 +FloatingPointLiteral=57 +BooleanLiteral=58 +NullLiteral=59 +RANGE_INCLUSIVE=60 +RANGE_EXCLUSIVE=61 +SPREAD_DOT=62 +SAFE_DOT=63 +SAFE_CHAIN_DOT=64 +ELVIS=65 +METHOD_POINTER=66 +METHOD_REFERENCE=67 +REGEX_FIND=68 +REGEX_MATCH=69 +POWER=70 +POWER_ASSIGN=71 +SPACESHIP=72 +IDENTICAL=73 +NOT_IDENTICAL=74 +ARROW=75 +NOT_INSTANCEOF=76 +NOT_IN=77 +LPAREN=78 +RPAREN=79 +LBRACE=80 +RBRACE=81 +LBRACK=82 +RBRACK=83 +SEMI=84 +COMMA=85 +DOT=86 +ASSIGN=87 +GT=88 +LT=89 +NOT=90 +BITNOT=91 +QUESTION=92 +COLON=93 +EQUAL=94 +LE=95 +GE=96 +NOTEQUAL=97 +AND=98 +OR=99 +INC=100 +DEC=101 +ADD=102 +SUB=103 +MUL=104 +DIV=105 +BITAND=106 +BITOR=107 +XOR=108 +MOD=109 +ADD_ASSIGN=110 +SUB_ASSIGN=111 +MUL_ASSIGN=112 +DIV_ASSIGN=113 +AND_ASSIGN=114 +OR_ASSIGN=115 +XOR_ASSIGN=116 +MOD_ASSIGN=117 +LSHIFT_ASSIGN=118 +RSHIFT_ASSIGN=119 +URSHIFT_ASSIGN=120 +ELVIS_ASSIGN=121 +CapitalizedIdentifier=122 +Identifier=123 +AT=124 +ELLIPSIS=125 +WS=126 +NL=127 +SH_COMMENT=128 +UNEXPECTED_CHAR=129 +'as'=7 +'def'=8 +'in'=9 +'trait'=10 +'threadsafe'=11 +'var'=12 +'abstract'=14 +'assert'=15 +'break'=16 +'case'=17 +'catch'=18 +'class'=19 +'const'=20 +'continue'=21 +'default'=22 +'do'=23 +'else'=24 +'enum'=25 +'extends'=26 +'final'=27 +'finally'=28 +'for'=29 +'if'=30 +'goto'=31 +'implements'=32 +'import'=33 +'instanceof'=34 +'interface'=35 +'native'=36 +'new'=37 +'package'=38 +'private'=39 +'protected'=40 +'public'=41 +'return'=42 +'static'=43 +'strictfp'=44 +'super'=45 +'switch'=46 +'synchronized'=47 +'this'=48 +'throw'=49 +'throws'=50 +'transient'=51 +'try'=52 +'void'=53 +'volatile'=54 +'while'=55 +'null'=59 +'..'=60 +'..<'=61 +'*.'=62 +'?.'=63 +'??.'=64 +'?:'=65 +'.&'=66 +'::'=67 +'=~'=68 +'==~'=69 +'**'=70 +'**='=71 +'<=>'=72 +'==='=73 +'!=='=74 +'->'=75 +'!instanceof'=76 +'!in'=77 +'('=78 +')'=79 +'{'=80 +'}'=81 +'['=82 +']'=83 +';'=84 +','=85 +'='=87 +'>'=88 +'<'=89 +'!'=90 +'~'=91 +'?'=92 +':'=93 +'=='=94 +'<='=95 +'>='=96 +'!='=97 +'&&'=98 +'||'=99 +'++'=100 +'--'=101 +'+'=102 +'-'=103 +'*'=104 +'&'=106 +'|'=107 +'^'=108 +'%'=109 +'+='=110 +'-='=111 +'*='=112 +'/='=113 +'&='=114 +'|='=115 +'^='=116 +'%='=117 +'<<='=118 +'>>='=119 +'>>>='=120 +'?='=121 +'@'=124 +'...'=125 diff --git a/languages/g4/GroovyParser.g4 b/languages/g4/GroovyParser.g4 new file mode 100644 index 0000000000000000000000000000000000000000..e6f8e620aaa25681914dac73c26e6556e266ae45 --- /dev/null +++ b/languages/g4/GroovyParser.g4 @@ -0,0 +1,1238 @@ +/* + * This file is adapted from the Antlr4 Java grammar which has the following license + * + * Copyright (c) 2013 Terence Parr, Sam Harwell + * All rights reserved. + * [The "BSD licence"] + * + * http://www.opensource.org/licenses/bsd-license.php + * + * Subsequent modifications by the Groovy community have been done under the Apache License v2: + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * The Groovy grammar is based on the official grammar for Java: + * https://github.com/antlr/grammars-v4/blob/master/java/Java.g4 + */ +parser grammar GroovyParser; + +options { + tokenVocab = GroovyLexer; +// contextSuperClass = GroovyParserRuleContext; +// superClass = AbstractParser; +} +// +//@header { +// import java.util.Map; +// import org.codehaus.groovy.ast.NodeMetaDataHandler; +// import org.apache.groovy.parser.antlr4.SemanticPredicates; +//} +// +//@members { +// +// public static class GroovyParserRuleContext extends ParserRuleContext implements NodeMetaDataHandler { +// private Map metaDataMap = null; +// +// public GroovyParserRuleContext() {} +// +// public GroovyParserRuleContext(ParserRuleContext parent, int invokingStateNumber) { +// super(parent, invokingStateNumber); +// } +// +// @Override +// public Map getMetaDataMap() { +// return this.metaDataMap; +// } +// +// @Override +// public void setMetaDataMap(Map metaDataMap) { +// this.metaDataMap = metaDataMap; +// } +// } +// +// @Override +// public int getSyntaxErrorSource() { +// return GroovySyntaxError.PARSER; +// } +// +// @Override +// public int getErrorLine() { +// Token token = _input.LT(-1); +// +// if (null == token) { +// return -1; +// } +// +// return token.getLine(); +// } +// +// @Override +// public int getErrorColumn() { +// Token token = _input.LT(-1); +// +// if (null == token) { +// return -1; +// } +// +// return token.getCharPositionInLine() + 1 + token.getText().length(); +// } +//} + +// starting point for parsing a groovy file +compilationUnit + : nls + packageDeclaration? sep? scriptStatements? EOF + ; + +scriptStatements + : scriptStatement (sep scriptStatement)* sep? + ; + +scriptStatement + : importDeclaration // Import statement. Can be used in any scope. Has "import x as y" also. + | typeDeclaration + | statement + ; + +packageDeclaration + : annotationsOpt PACKAGE qualifiedName + ; + +importDeclaration + : annotationsOpt IMPORT STATIC? qualifiedName (DOT MUL | AS alias=identifier)? + ; + + +typeDeclaration + : classOrInterfaceModifiersOpt classDeclaration + ; + +modifier + : classOrInterfaceModifier + | m=( NATIVE + | SYNCHRONIZED + | TRANSIENT + | VOLATILE + | DEF + | VAR + ) + ; + +modifiersOpt + : modifiers? + ; + +modifiers + : (modifier nls)+ + ; + +classOrInterfaceModifiersOpt + : classOrInterfaceModifiers? + ; + +classOrInterfaceModifiers + : (classOrInterfaceModifier nls)+ + ; + +classOrInterfaceModifier + : annotation // class or interface + | m=( PUBLIC // class or interface + | PROTECTED // class or interface + | PRIVATE // class or interface + | STATIC // class or interface + | ABSTRACT // class or interface + | FINAL // class only -- does not apply to interfaces + | STRICTFP // class or interface + | DEFAULT // interface only -- does not apply to classes + ) + ; + +variableModifier + : annotation + | m=( FINAL + | DEF + | VAR + // Groovy supports declaring local variables as instance/class fields, + // e.g. import groovy.transform.*; @Field static List awe = [1, 2, 3] + // e.g. import groovy.transform.*; def a = { @Field public List awe = [1, 2, 3] } + // Notice: Groovy 2.4.7 just allows to declare local variables with the following modifiers when using annotations(e.g. @Field) + // TODO check whether the following modifiers accompany annotations or not. Because the legacy codes(e.g. benchmark/bench/heapsort.groovy) allow to declare the special instance/class fields without annotations, we leave it as it is for the time being + | PUBLIC + | PROTECTED + | PRIVATE + | STATIC + | ABSTRACT + | STRICTFP + ) + ; + +variableModifiersOpt + : variableModifiers? + ; + +variableModifiers + : (variableModifier nls)+ + ; + +typeParameters + : LT nls typeParameter (COMMA nls typeParameter)* nls GT + ; + +typeParameter + : className (EXTENDS nls typeBound)? + ; + +typeBound + : typeType (BITAND nls typeType)* + ; + +typeList + : typeType (COMMA nls typeType)* + ; + + +/** + * t 0: class; 1: interface; 2: enum; 3: annotation; 4: trait + */ +classDeclaration +locals[ int t ] + : ( CLASS { $t = 0; } + | INTERFACE { $t = 1; } + | ENUM { $t = 2; } + | AT INTERFACE { $t = 3; } + | TRAIT { $t = 4; } + ) + identifier nls + + ( + { 3 != $t }? + typeParameters? nls + ( + { 2 != $t }? + (EXTENDS nls + ( + // Only interface can extend more than one super class + {1 == $t}? scs=typeList + | + sc=typeType + ) + nls)? + | + /* enum should not have type parameters and extends */ + ) + + ( + {1 != $t}? + (IMPLEMENTS nls is=typeList nls)? + | + /* interface should not implement other interfaces */ + ) + | + /* annotation should not have implements and extends*/ + ) + + classBody[$t] + ; + +// t see the comment of classDeclaration +classBody[int t] + : LBRACE nls + ( + /* Only enum can have enum constants */ + { 2 == $t }? + enumConstants? sep? + | + + ) + classBodyDeclaration[$t]? (sep classBodyDeclaration[$t])* sep? RBRACE + ; + +enumConstants + : enumConstant (nls COMMA nls enumConstant)* (nls COMMA)? + ; + +enumConstant + : annotationsOpt identifier arguments? anonymousInnerClassDeclaration[1]? + ; + +classBodyDeclaration[int t] + : SEMI + | (STATIC nls)? block + | memberDeclaration[$t] + ; + +memberDeclaration[int t] + : methodDeclaration[0, $t] + | fieldDeclaration + | modifiersOpt classDeclaration + ; + +/** + * t 0: *class member* all kinds of method declaration AND constructor declaration, + * 1: normal method declaration, 2: abstract method declaration + * 3: normal method declaration OR abstract method declaration + * ct 9: script, other see the comment of classDeclaration + */ +methodDeclaration[int t, int ct] + : { 3 == $ct }? + returnType[$ct] methodName LPAREN rparen (DEFAULT nls elementValue)? + | + modifiersOpt typeParameters? returnType[$ct]? + methodName formalParameters (nls THROWS nls qualifiedClassNameList)? + nls methodBody? + ; + +methodName + : identifier + | stringLiteral + ; + +returnType[int ct] + : + standardType + | + // annotation method can not have void return type + { 3 != $ct }? VOID + ; + +fieldDeclaration + : variableDeclaration[1] + ; + +variableDeclarators + : variableDeclarator (COMMA nls variableDeclarator)* + ; + +variableDeclarator + : variableDeclaratorId (nls ASSIGN nls variableInitializer)? + ; + +variableDeclaratorId + : identifier + ; + +variableInitializer + : enhancedStatementExpression + ; + +variableInitializers + : variableInitializer nls (COMMA nls variableInitializer nls)* nls COMMA? + ; + +dims + : (annotationsOpt LBRACK RBRACK)+ + ; + +dimsOpt + : dims? + ; + +standardType +options { baseContext = typeType; } + : annotationsOpt + ( + primitiveType + | + standardClassOrInterfaceType + ) + dimsOpt + ; + +typeType + : annotationsOpt + ( + ( + primitiveType + | + // !!! Error Alternative !!! + VOID + ) + | + generalClassOrInterfaceType + ) + dimsOpt + ; + +classOrInterfaceType + : ( qualifiedClassName + | qualifiedStandardClassName + ) typeArguments? + ; + +generalClassOrInterfaceType +options { baseContext = classOrInterfaceType; } + : qualifiedClassName typeArguments? + ; + +standardClassOrInterfaceType +options { baseContext = classOrInterfaceType; } + : qualifiedStandardClassName typeArguments? + ; + +primitiveType + : BuiltInPrimitiveType + ; + +typeArguments + : LT nls typeArgument (COMMA nls typeArgument)* nls GT + ; + +typeArgument + : typeType + | annotationsOpt QUESTION ((EXTENDS | SUPER) nls typeType)? + ; + +annotatedQualifiedClassName + : annotationsOpt qualifiedClassName + ; + +qualifiedClassNameList + : annotatedQualifiedClassName (COMMA nls annotatedQualifiedClassName)* + ; + +formalParameters + : LPAREN formalParameterList? rparen + ; + +formalParameterList + : (formalParameter | thisFormalParameter) (COMMA nls formalParameter)* + ; + +thisFormalParameter + : typeType THIS + ; + +formalParameter + : variableModifiersOpt typeType? ELLIPSIS? variableDeclaratorId (nls ASSIGN nls expression)? + ; + +methodBody + : block + ; + +qualifiedName + : qualifiedNameElement (DOT qualifiedNameElement)* + ; + +/** + * Java doesn't have the keywords 'as', 'in', 'def', 'trait' so we make some allowances + * for them in package names for better integration with existing Java packages + */ +qualifiedNameElement + : identifier + | DEF + | IN + | AS + | TRAIT + ; + +qualifiedNameElements + : (qualifiedNameElement DOT)* + ; + +qualifiedClassName + : qualifiedNameElements identifier + ; + +qualifiedStandardClassName + : qualifiedNameElements className (DOT className)* + ; + +literal + : IntegerLiteral #integerLiteralAlt + | FloatingPointLiteral #floatingPointLiteralAlt + | stringLiteral #stringLiteralAlt + | BooleanLiteral #boolLiteralAlt + | NullLiteral #nilLiteralAlt + ; + +// GSTRING + +gstring + : GStringBegin gstringValue (GStringPart gstringValue)* GStringEnd + ; + +gstringValue + : gstringPath + | LBRACE statementExpression? RBRACE + | closure + ; + +gstringPath + : identifier GStringPathPart* + ; + + +// LAMBDA EXPRESSION +lambdaExpression +options { baseContext = standardLambdaExpression; } + : lambdaParameters nls ARROW nls lambdaBody + ; + +// JAVA STANDARD LAMBDA EXPRESSION +standardLambdaExpression + : standardLambdaParameters nls ARROW nls lambdaBody + ; + +lambdaParameters +options { baseContext = standardLambdaParameters; } + : formalParameters + + // { a -> a * 2 } can be parsed as a lambda expression in a block, but we expect a closure. + // So it is better to put parameters in the parentheses and the following single parameter without parentheses is limited +// | variableDeclaratorId + ; + +standardLambdaParameters + : formalParameters + | variableDeclaratorId + ; + +lambdaBody + : block + | statementExpression + ; + +// CLOSURE +closure + : LBRACE nls (formalParameterList? nls ARROW nls)? blockStatementsOpt RBRACE + ; + +// GROOVY-8991: Difference in behaviour with closure and lambda +closureOrLambdaExpression + : closure + | lambdaExpression + ; + +blockStatementsOpt + : blockStatements? + ; + +blockStatements + : blockStatement (sep blockStatement)* sep? + ; + +// ANNOTATIONS + +annotationsOpt + : (annotation nls)* + ; + +annotation + : AT annotationName ( LPAREN elementValues? rparen )? + ; + +elementValues + : elementValuePairs + | elementValue + ; + +annotationName : qualifiedClassName ; + +elementValuePairs + : elementValuePair (COMMA elementValuePair)* + ; + +elementValuePair + : elementValuePairName nls ASSIGN nls elementValue + ; + +elementValuePairName + : identifier + | keywords + ; + +// TODO verify the potential performance issue because rule expression contains sub-rule assignments(https://github.com/antlr/grammars-v4/issues/215) +elementValue + : elementValueArrayInitializer + | annotation + | expression + ; + +elementValueArrayInitializer + : LBRACK (elementValue (COMMA elementValue)*)? (COMMA)? RBRACK + ; + +// STATEMENTS / BLOCKS + +block + : LBRACE (nls | sep*) blockStatementsOpt RBRACE + ; + +blockStatement + : localVariableDeclaration + | statement + ; + +localVariableDeclaration + : // { !SemanticPredicates.isInvalidLocalVariableDeclaration(_input) }? + variableDeclaration[0] + ; + +classifiedModifiers[int t] + : { 0 == $t }? variableModifiers + | { 1 == $t }? modifiers + ; + + +/** + * t 0: local variable declaration; 1: field declaration + */ +variableDeclaration[int t] +@leftfactor { classifiedModifiers } + : classifiedModifiers[$t] + ( typeType? variableDeclarators + | typeNamePairs nls ASSIGN nls variableInitializer + ) + | + classifiedModifiers[$t]? + typeType variableDeclarators + ; + +typeNamePairs + : LPAREN typeNamePair (COMMA typeNamePair)* rparen + ; + +typeNamePair + : typeType? variableDeclaratorId + ; + +variableNames + : LPAREN variableDeclaratorId (COMMA variableDeclaratorId)+ rparen + ; + +conditionalStatement + : ifElseStatement + | switchStatement + ; + +ifElseStatement + : IF expressionInPar nls tb=statement ((nls | sep) ELSE nls fb=statement)? + ; + +switchStatement + : SWITCH expressionInPar nls LBRACE nls switchBlockStatementGroup* nls RBRACE + ; + +loopStatement + : FOR LPAREN forControl rparen nls statement #forStmtAlt + | WHILE expressionInPar nls statement #whileStmtAlt + | DO nls statement nls WHILE expressionInPar #doWhileStmtAlt + ; + +continueStatement + : CONTINUE + identifier? + ; + +breakStatement + : BREAK + identifier? + ; + +tryCatchStatement + : TRY resources? nls block + (nls catchClause)* + (nls finallyBlock)? + ; + +assertStatement + : ASSERT ce=expression (nls (COLON | COMMA) nls me=expression)? + ; + +statement + : block #blockStmtAlt + | conditionalStatement #conditionalStmtAlt + | loopStatement #loopStmtAlt + + | tryCatchStatement #tryCatchStmtAlt + + | SYNCHRONIZED expressionInPar nls block #synchronizedStmtAlt + | RETURN expression? #returnStmtAlt + | THROW expression #throwStmtAlt + + | breakStatement #breakStmtAlt + | continueStatement #continueStmtAlt + + | identifier COLON nls statement #labeledStmtAlt + + | assertStatement #assertStmtAlt + + | localVariableDeclaration #localVariableDeclarationStmtAlt + + // validate the method in the AstBuilder#visitMethodDeclaration, e.g. method without method body is not allowed + | methodDeclaration[3, 9] #methodDeclarationStmtAlt + + | statementExpression #expressionStmtAlt + + | SEMI #emptyStmtAlt + ; + +catchClause + : CATCH LPAREN variableModifiersOpt catchType? identifier rparen nls block + ; + +catchType + : qualifiedClassName (BITOR qualifiedClassName)* + ; + +finallyBlock + : FINALLY nls block + ; + +resources + : LPAREN nls resourceList sep? rparen + ; + +resourceList + : resource (sep resource)* + ; + +resource + : localVariableDeclaration + | expression + ; + + +/** Matches cases then statements, both of which are mandatory. + * To handle empty cases at the end, we add switchLabel* to statement. + */ +switchBlockStatementGroup + : (switchLabel nls)+ blockStatements + ; + +switchLabel + : CASE expression COLON + | DEFAULT COLON + ; + +forControl + : enhancedForControl + | classicalForControl + ; + +enhancedForControl + : variableModifiersOpt typeType? variableDeclaratorId (COLON | IN) expression + ; + +classicalForControl + : forInit? SEMI expression? SEMI forUpdate? + ; + +forInit + : localVariableDeclaration + | expressionList[false] + ; + +forUpdate + : expressionList[false] + ; + + +// EXPRESSIONS + +castParExpression + : LPAREN typeType rparen + ; + +parExpression + : expressionInPar + ; + +expressionInPar + : LPAREN enhancedStatementExpression rparen + ; + +expressionList[bool canSpread] + : expressionListElement[$canSpread] (COMMA expressionListElement[$canSpread])* + ; + +expressionListElement[bool canSpread] + : (MUL | ) expression + ; + +enhancedStatementExpression + : statementExpression + | standardLambdaExpression + ; + +statementExpression + : commandExpression #commandExprAlt + ; + +postfixExpression + : pathExpression op=(INC | DEC)? + ; + +expression + // qualified names, array expressions, method invocation, post inc/dec, type casting (level 1) + // The cast expression must be put before pathExpression to resovle the ambiguities between type casting and call on parentheses expression, e.g. (int)(1 / 2) + : castParExpression castOperandExpression #castExprAltForExpr + | postfixExpression #postfixExprAltForExpr + + // ~(BNOT)/!(LNOT) (level 1) + | (BITNOT | NOT) nls expression #unaryNotExprAltForExpr + + // math power operator (**) (level 2) + | left=expression op=POWER nls right=expression #powerExprAlt + + // ++(prefix)/--(prefix)/+(unary)/-(unary) (level 3) + | op=(INC | DEC | ADD | SUB) expression #unaryAddExprAltForExpr + + // multiplication/division/modulo (level 4) + | left=expression nls op=(MUL | DIV | MOD) nls right=expression #multiplicativeExprAlt + + // binary addition/subtraction (level 5) + | left=expression op=(ADD | SUB) nls right=expression #additiveExprAlt + + // bit shift expressions (level 6) + | left=expression nls + ( ( dlOp=LT LT + | tgOp=GT GT GT + | dgOp=GT GT + ) + | rangeOp=( RANGE_INCLUSIVE + | RANGE_EXCLUSIVE + ) + ) nls + right=expression #shiftExprAlt + + // boolean relational expressions (level 7) + | left=expression nls op=(AS | INSTANCEOF | NOT_INSTANCEOF) nls typeType #relationalExprAlt + | left=expression nls op=(LE | GE | GT | LT | IN | NOT_IN) nls right=expression #relationalExprAlt + + // equality/inequality (==/!=) (level 8) + | left=expression nls + op=( IDENTICAL + | NOT_IDENTICAL + | EQUAL + | NOTEQUAL + | SPACESHIP + ) nls + right=expression #equalityExprAlt + + // regex find and match (=~ and ==~) (level 8.5) + // jez: moved =~ closer to precedence of == etc, as... + // 'if (foo =~ "a.c")' is very close in intent to 'if (foo == "abc")' + | left=expression nls op=(REGEX_FIND | REGEX_MATCH) nls right=expression #regexExprAlt + + // bitwise or non-short-circuiting and (&) (level 9) + | left=expression nls op=BITAND nls right=expression #andExprAlt + + // exclusive or (^) (level 10) + | left=expression nls op=XOR nls right=expression #exclusiveOrExprAlt + + // bitwise or non-short-circuiting or (|) (level 11) + | left=expression nls op=BITOR nls right=expression #inclusiveOrExprAlt + + // logical and (&&) (level 12) + | left=expression nls op=AND nls right=expression #logicalAndExprAlt + + // logical or (||) (level 13) + | left=expression nls op=OR nls right=expression #logicalOrExprAlt + + // conditional test (level 14) + | con=expression nls + ( QUESTION nls tb=expression nls COLON nls + | ELVIS nls + ) + fb=expression #conditionalExprAlt + + // assignment expression (level 15) + // "(a) = [1]" is a special case of multipleAssignmentExprAlt, it will be handle by assignmentExprAlt + | left=variableNames nls op=ASSIGN nls right=statementExpression #multipleAssignmentExprAlt + | left=expression nls + op=( ASSIGN + | ADD_ASSIGN + | SUB_ASSIGN + | MUL_ASSIGN + | DIV_ASSIGN + | AND_ASSIGN + | OR_ASSIGN + | XOR_ASSIGN + | RSHIFT_ASSIGN + | URSHIFT_ASSIGN + | LSHIFT_ASSIGN + | MOD_ASSIGN + | POWER_ASSIGN + | ELVIS_ASSIGN + ) nls + enhancedStatementExpression #assignmentExprAlt + ; + + +castOperandExpression +options { baseContext = expression; } + : castParExpression castOperandExpression #castExprAlt + | postfixExpression #postfixExprAlt + // ~(BNOT)/!(LNOT) (level 1) + | (BITNOT | NOT) nls castOperandExpression #unaryNotExprAlt + // ++(prefix)/--(prefix)/+(unary)/-(unary) (level 3) + | op=(INC | DEC | ADD | SUB) castOperandExpression #unaryAddExprAlt + ; + + +/* +enhancedExpression + : expression + | standardLambdaExpression + ; +*/ + +commandExpression + : expression + ( + argumentList + | + /* if pathExpression is a method call, no need to have any more arguments */ + ) + + commandArgument* + ; + +commandArgument + : primary + // what follows is either a normal argument, parens, + // an appended block, an index operation, or nothing + // parens (a b already processed): + // a b c() d e -> a(b).c().d(e) + // a b c()() d e -> a(b).c().call().d(e) + // index (a b already processed): + // a b c[x] d e -> a(b).c[x].d(e) + // a b c[x][y] d e -> a(b).c[x][y].d(e) + // block (a b already processed): + // a b c {x} d e -> a(b).c({x}).d(e) + // + // parens/block completes method call + // index makes method call to property get with index + // + ( pathElement+ + | argumentList + )? + ; + +/** + * A "path expression" is a name or other primary, possibly qualified by various + * forms of dot, and/or followed by various kinds of brackets. + * It can be used for value or assigned to, or else further qualified, indexed, or called. + * It is called a "path" because it looks like a linear path through a data structure. + * Examples: x.y, x?.y, x*.y, x.@y; x[], x[y], x[y,z]; x(), x(y), x(y,z); x{s}; a.b[n].c(x).d{s} + * (Compare to a C lvalue, or LeftHandSide in the JLS section 15.26.) + * General expressions are built up from path expressions, using operators like '+' and '='. + * + * t 0: primary, 1: namePart, 2: arguments, 3: closureOrLambdaExpression, 4: indexPropertyArgs, 5: namedPropertyArgs, + * 6: non-static inner class creator + */ +pathExpression returns [int t] + : primary (pathElement { $t = $pathElement.t; })* + ; + +pathElement returns [int t] + : nls + + // AT: foo.@bar selects the field (or attribute), not property + ( + ( DOT // The all-powerful dot. + | SPREAD_DOT // Spread operator: x*.y === x?.collect{it.y} + | SAFE_DOT // Optional-null operator: x?.y === (x==null)?null:x.y + | SAFE_CHAIN_DOT // Optional-null chain operator: x??.y.z === x?.y?.z + ) nls (AT | nonWildcardTypeArguments)? + | + METHOD_POINTER nls // Method pointer operator: foo.&y == foo.metaClass.getMethodPointer(foo, "y") + | + METHOD_REFERENCE nls // Method reference: System.out::println + ) + namePart + { $t = 1; } + | + nls DOT nls NEW creator[1] + { $t = 6; } + | arguments + { $t = 2; } + + // Can always append a block, as foo{bar} + | nls closureOrLambdaExpression + { $t = 3; } + + // Element selection is always an option, too. + // In Groovy, the stuff between brackets is a general argument list, + // since the bracket operator is transformed into a method call. + | indexPropertyArgs + { $t = 4; } + + | namedPropertyArgs + { $t = 5; } + ; + +/** + * This is the grammar for what can follow a dot: x.a, x.@a, x.&a, x.'a', etc. + */ +namePart + : + ( identifier + + // foo.'bar' is in all ways same as foo.bar, except that bar can have an arbitrary spelling + | stringLiteral + + | dynamicMemberName + + /* just a PROPOSAL, which has not been implemented yet! + // PROPOSAL, DECIDE: Is this inline form of the 'with' statement useful? + // Definition: a.{foo} === {with(a) {foo}} + // May cover some path expression use-cases previously handled by dynamic scoping (closure delegates). + | block + */ + + // let's allow common keywords as property names + | keywords + ) + ; + +/** + * If a dot is followed by a parenthesized or quoted expression, the member is computed dynamically, + * and the member selection is done only at runtime. This forces a statically unchecked member access. + */ +dynamicMemberName + : parExpression + | gstring + ; + +/** An expression may be followed by [...]. + * Unlike Java, these brackets may contain a general argument list, + * which is passed to the array element operator, which can make of it what it wants. + * The brackets may also be empty, as in T[]. This is how Groovy names array types. + */ +indexPropertyArgs + : QUESTION? LBRACK expressionList[true]? RBRACK + ; + +namedPropertyArgs + : QUESTION? LBRACK (mapEntryList | COLON) RBRACK + ; + +primary + : + // Append `typeArguments?` to `identifier` to support constructor reference with generics, e.g. HashMap::new + // Though this is not a graceful solution, it is much faster than replacing `builtInType` with `type` + identifier typeArguments? #identifierPrmrAlt + | literal #literalPrmrAlt + | gstring #gstringPrmrAlt + | NEW nls creator[0] #newPrmrAlt + | THIS #thisPrmrAlt + | SUPER #superPrmrAlt + | parExpression #parenPrmrAlt + | closureOrLambdaExpression #closureOrLambdaExpressionPrmrAlt + | list #listPrmrAlt + | normalMap #mapPrmrAlt + | builtInType #builtInTypePrmrAlt + ; + +list + : LBRACK expressionList[true]? COMMA? RBRACK + ; + +normalMap + : LBRACK + ( mapEntryList COMMA? + | COLON + ) + RBRACK + ; + +mapEntryList + : mapEntry (COMMA mapEntry)* + ; + +mapEntry + : mapEntryLabel COLON nls expression + | MUL COLON nls expression + ; + +mapEntryLabel + : keywords + | primary + ; + +/** + * t 0: general creation; 1: non-static inner class creation + */ +creator[int t] + : createdName + ( {0 == $t || 1 == $t}? nls arguments anonymousInnerClassDeclaration[0]? + | {0 == $t}? (annotationsOpt LBRACK expression RBRACK)+ dimsOpt + | {0 == $t}? dims nls arrayInitializer + ) + ; + +arrayInitializer + : LBRACE nls variableInitializers? nls RBRACE + ; + +/** + * t 0: anonymous inner class; 1: anonymous enum + */ +anonymousInnerClassDeclaration[int t] + : classBody[0] + ; + +createdName + : annotationsOpt + ( primitiveType + | qualifiedClassName typeArgumentsOrDiamond? + ) + ; + +nonWildcardTypeArguments + : LT nls typeList nls GT + ; + +typeArgumentsOrDiamond + : LT GT + | typeArguments + ; + +arguments + : LPAREN enhancedArgumentList? COMMA? rparen + ; + +argumentList +options { baseContext = enhancedArgumentList; } + : argumentListElement + ( COMMA nls + argumentListElement + )* + ; + +enhancedArgumentList + : enhancedArgumentListElement + ( COMMA nls + enhancedArgumentListElement + )* + ; + +argumentListElement +options { baseContext = enhancedArgumentListElement; } + : expressionListElement[true] + | mapEntry + ; + +enhancedArgumentListElement + : expressionListElement[true] + | standardLambdaExpression + | mapEntry + ; + +stringLiteral + : StringLiteral + ; + +className + : CapitalizedIdentifier + ; + +identifier + : Identifier + | CapitalizedIdentifier + | VAR + | + // if 'static' followed by DOT, we can treat them as identifiers, e.g. static.unused = { -> } +// { DOT == _input.LT(2).getType() }? + STATIC + | IN +// | DEF + | TRAIT + | AS + ; + +builtInType + : BuiltInPrimitiveType + | VOID + ; + +keywords + : ABSTRACT + | AS + | ASSERT + | BREAK + | CASE + | CATCH + | CLASS + | CONST + | CONTINUE + | DEF + | DEFAULT + | DO + | ELSE + | ENUM + | EXTENDS + | FINAL + | FINALLY + | FOR + | GOTO + | IF + | IMPLEMENTS + | IMPORT + | IN + | INSTANCEOF + | INTERFACE + | NATIVE + | NEW + | PACKAGE + | RETURN + | STATIC + | STRICTFP + | SUPER + | SWITCH + | SYNCHRONIZED + | THIS + | THROW + | THROWS + | TRANSIENT + | TRAIT + | THREADSAFE + | TRY + | VAR + | VOLATILE + | WHILE + + | NullLiteral + | BooleanLiteral + + | BuiltInPrimitiveType + | VOID + + | PUBLIC + | PROTECTED + | PRIVATE + ; + +rparen + : RPAREN + | + // !!!Error Alternative, impact the performance of parsing +// { require(false, "Missing ')'"); } + ; + +nls + : NL* + ; + +sep : (NL | SEMI)+ + ; diff --git a/languages/g4/JavaParser.g4 b/languages/g4/JavaParser.g4 index a64d24878cc69b888d29ab77b09230646f9af55f..70dafa69ebb5b7d50b0c6f33e8092a0e905d90fc 100644 --- a/languages/g4/JavaParser.g4 +++ b/languages/g4/JavaParser.g4 @@ -85,7 +85,7 @@ typeParameters ; typeParameter - : annotation* IDENTIFIER (EXTENDS typeBound)? + : annotation* IDENTIFIER (EXTENDS annotation* typeBound)? ; typeBound @@ -246,7 +246,7 @@ classOrInterfaceType typeArgument : typeType - | '?' ((EXTENDS | SUPER) typeType)? + | annotation* '?' ((EXTENDS | SUPER) typeType)? ; qualifiedNameList @@ -267,7 +267,7 @@ formalParameter ; lastFormalParameter - : variableModifier* typeType '...' variableDeclaratorId + : variableModifier* typeType annotation* '...' variableDeclaratorId ; qualifiedName @@ -296,9 +296,12 @@ floatLiteral ; // ANNOTATIONS +altAnnotationQualifiedName + : (IDENTIFIER DOT)* '@' IDENTIFIER + ; annotation - : '@' qualifiedName ('(' ( elementValuePairs | elementValue )? ')')? + : ('@' qualifiedName | altAnnotationQualifiedName) ('(' ( elementValuePairs | elementValue )? ')')? ; elementValuePairs @@ -478,7 +481,7 @@ expression | expression '[' expression ']' | methodCall | NEW creator - | '(' typeType ')' expression + | '(' annotation* typeType ')' expression | expression postfix=('++' | '--') | prefix=('+'|'-'|'++'|'--') expression | prefix=('~'|'!') expression @@ -582,7 +585,7 @@ typeList ; typeType - : annotation? (classOrInterfaceType | primitiveType) ('[' ']')* + : annotation* (classOrInterfaceType | primitiveType) (annotation* '[' ']')* ; primitiveType @@ -612,4 +615,4 @@ explicitGenericInvocationSuffix arguments : '(' expressionList? ')' - ; \ No newline at end of file + ; diff --git a/languages/g4/JavaScriptLexer.g4 b/languages/g4/JavaScriptLexer.g4 new file mode 100644 index 0000000000000000000000000000000000000000..d13eb4e4230553f5eaa224970bcc3273df3caff4 --- /dev/null +++ b/languages/g4/JavaScriptLexer.g4 @@ -0,0 +1,707 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp) + * Copyright (c) 2017 by Ivan Kochurkin (Positive Technologies): + added ECMAScript 6 support, cleared and transformed to the universal grammar. + * Copyright (c) 2018 by Juan Alvarez (contributor -> ported to Go) + * Copyright (c) 2019 by Student Main (contributor -> ES2020) + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +lexer grammar JavaScriptLexer; + +channels { ERROR } + +options { superClass=JavaScriptBaseLexer; } + +HashBangLine: { p.IsStartOfFile()}? '#!' ~[\r\n\u2028\u2029]*; // only allowed at start +MultiLineComment: '/*' .*? '*/' -> channel(HIDDEN); +SingleLineComment: '//' ~[\r\n\u2028\u2029]* -> channel(HIDDEN); +RegularExpressionLiteral: '/' RegularExpressionFirstChar RegularExpressionChar* {p.IsRegexPossible()}? '/' IdentifierPart*; + +OpenBracket: '['; +CloseBracket: ']'; +OpenParen: '('; +CloseParen: ')'; +OpenBrace: '{' {l.ProcessOpenBrace();}; +CloseBrace: '}' {l.ProcessCloseBrace();}; +SemiColon: ';'; +Comma: ','; +Assign: '='; +QuestionMark: '?'; +Colon: ':'; +Ellipsis: '...'; +Dot: '.'; +PlusPlus: '++'; +MinusMinus: '--'; +Plus: '+'; +Minus: '-'; +BitNot: '~'; +Not: '!'; +Multiply: '*'; +Divide: '/'; +Modulus: '%'; +Power: '**'; +NullCoalesce: '??'; +Hashtag: '#'; +RightShiftArithmetic: '>>'; +LeftShiftArithmetic: '<<'; +RightShiftLogical: '>>>'; +LessThan: '<'; +MoreThan: '>'; +LessThanEquals: '<='; +GreaterThanEquals: '>='; +Equals_: '=='; +NotEquals: '!='; +IdentityEquals: '==='; +IdentityNotEquals: '!=='; +BitAnd: '&'; +BitXOr: '^'; +BitOr: '|'; +And: '&&'; +Or: '||'; +MultiplyAssign: '*='; +DivideAssign: '/='; +ModulusAssign: '%='; +PlusAssign: '+='; +MinusAssign: '-='; +LeftShiftArithmeticAssign: '<<='; +RightShiftArithmeticAssign: '>>='; +RightShiftLogicalAssign: '>>>='; +BitAndAssign: '&='; +BitXorAssign: '^='; +BitOrAssign: '|='; +PowerAssign: '**='; +ARROW: '=>'; + +/// Null Literals + +NullLiteral: 'null'; + +/// Boolean Literals + +BooleanLiteral: 'true' + | 'false'; + +/// Numeric Literals + +DecimalLiteral: DecimalIntegerLiteral '.' [0-9] [0-9_]* ExponentPart? + | '.' [0-9] [0-9_]* ExponentPart? + | DecimalIntegerLiteral ExponentPart? + ; + +/// Numeric Literals + +HexIntegerLiteral: '0' [xX] [0-9a-fA-F] HexDigit*; +OctalIntegerLiteral: '0' [0-7]+ {!p.IsStrictMode()}?; +OctalIntegerLiteral2: '0' [oO] [0-7] [_0-7]*; +BinaryIntegerLiteral: '0' [bB] [01] [_01]*; + +BigHexIntegerLiteral: '0' [xX] [0-9a-fA-F] HexDigit* 'n'; +BigOctalIntegerLiteral: '0' [oO] [0-7] [_0-7]* 'n'; +BigBinaryIntegerLiteral: '0' [bB] [01] [_01]* 'n'; +BigDecimalIntegerLiteral: DecimalIntegerLiteral 'n'; + +/// Keywords + +Break: 'break'; +Do: 'do'; +Instanceof: 'instanceof'; +Typeof: 'typeof'; +Case: 'case'; +Else: 'else'; +New: 'new'; +Var: 'var'; +Catch: 'catch'; +Finally: 'finally'; +Return: 'return'; +Void: 'void'; +Continue: 'continue'; +For: 'for'; +Switch: 'switch'; +While: 'while'; +Debugger: 'debugger'; +Function: 'function'; +This: 'this'; +With: 'with'; +Default: 'default'; +If: 'if'; +Throw: 'throw'; +Delete: 'delete'; +In: 'in'; +Try: 'try'; +As: 'as'; +From: 'from'; + +/// Future Reserved Words + +Class: 'class'; +Enum: 'enum'; +Extends: 'extends'; +Super: 'super'; +Const: 'const'; +Export: 'export'; +Import: 'import'; + +Async: 'async'; +Await: 'await'; + +/// The following tokens are also considered to be FutureReservedWords +/// when parsing strict mode + +Implements: 'implements' {p.IsStrictMode()}?; +Let: 'let' {p.IsStrictMode()}?; +Private: 'private' {p.IsStrictMode()}?; +Public: 'public' {p.IsStrictMode()}?; +Interface: 'interface' {p.IsStrictMode()}?; +Package: 'package' {p.IsStrictMode()}?; +Protected: 'protected' {p.IsStrictMode()}?; +Static: 'static' {p.IsStrictMode()}?; +Yield: 'yield' {p.IsStrictMode()}?; + +/// Identifier Names and Identifiers + +Identifier: IdentifierStart IdentifierPart*; +/// String Literals +StringLiteral: ('"' DoubleStringCharacter* '"' + | '\'' SingleStringCharacter* '\'') {l.ProcessStringLiteral();} + ; + +// TODO: `${`tmp`}` +TemplateStringLiteral: '`' ('\\`' | ~'`')* '`'; + +WhiteSpaces: [\t\u000B\u000C\u0020\u00A0]+ -> channel(HIDDEN); + +LineTerminator: [\r\n\u2028\u2029] -> channel(HIDDEN); + +/// Comments + + +HtmlComment: '' -> channel(HIDDEN); +CDataComment: '' -> channel(HIDDEN); +UnexpectedCharacter: . -> channel(ERROR); + +// Fragment rules + +fragment DoubleStringCharacter + : ~["\\\r\n] + | '\\' EscapeSequence + | LineContinuation + ; + +fragment SingleStringCharacter + : ~['\\\r\n] + | '\\' EscapeSequence + | LineContinuation + ; + +fragment EscapeSequence + : CharacterEscapeSequence + | '0' // no digit ahead! TODO + | HexEscapeSequence + | UnicodeEscapeSequence + | ExtendedUnicodeEscapeSequence + ; + +fragment CharacterEscapeSequence + : SingleEscapeCharacter + | NonEscapeCharacter + ; + +fragment HexEscapeSequence + : 'x' HexDigit HexDigit + ; + +fragment UnicodeEscapeSequence + : 'u' HexDigit HexDigit HexDigit HexDigit + | 'u' '{' HexDigit HexDigit+ '}' + ; + +fragment ExtendedUnicodeEscapeSequence + : 'u' '{' HexDigit+ '}' + ; + +fragment SingleEscapeCharacter + : ['"\\bfnrtv] + ; + +fragment NonEscapeCharacter + : ~['"\\bfnrtv0-9xu\r\n] + ; + +fragment EscapeCharacter + : SingleEscapeCharacter + | [0-9] + | [xu] + ; + +fragment LineContinuation + : '\\' [\r\n\u2028\u2029] + ; + +fragment HexDigit + : [_0-9a-fA-F] + ; + +fragment DecimalIntegerLiteral + : '0' + | [1-9] [0-9_]* + ; + +fragment ExponentPart + : [eE] [+-]? [0-9_]+ + ; + +fragment IdentifierPart + : IdentifierStart + | UnicodeCombiningMark + | UnicodeDigit + | UnicodeConnectorPunctuation + | '\u200C' + | '\u200D' + ; + +fragment IdentifierStart + : UnicodeLetter + | [$_] + | '\\' UnicodeEscapeSequence + ; + +fragment UnicodeLetter + : [\u0041-\u005A] + | [\u0061-\u007A] + | [\u00AA] + | [\u00B5] + | [\u00BA] + | [\u00C0-\u00D6] + | [\u00D8-\u00F6] + | [\u00F8-\u021F] + | [\u0222-\u0233] + | [\u0250-\u02AD] + | [\u02B0-\u02B8] + | [\u02BB-\u02C1] + | [\u02D0-\u02D1] + | [\u02E0-\u02E4] + | [\u02EE] + | [\u037A] + | [\u0386] + | [\u0388-\u038A] + | [\u038C] + | [\u038E-\u03A1] + | [\u03A3-\u03CE] + | [\u03D0-\u03D7] + | [\u03DA-\u03F3] + | [\u0400-\u0481] + | [\u048C-\u04C4] + | [\u04C7-\u04C8] + | [\u04CB-\u04CC] + | [\u04D0-\u04F5] + | [\u04F8-\u04F9] + | [\u0531-\u0556] + | [\u0559] + | [\u0561-\u0587] + | [\u05D0-\u05EA] + | [\u05F0-\u05F2] + | [\u0621-\u063A] + | [\u0640-\u064A] + | [\u0671-\u06D3] + | [\u06D5] + | [\u06E5-\u06E6] + | [\u06FA-\u06FC] + | [\u0710] + | [\u0712-\u072C] + | [\u0780-\u07A5] + | [\u0905-\u0939] + | [\u093D] + | [\u0950] + | [\u0958-\u0961] + | [\u0985-\u098C] + | [\u098F-\u0990] + | [\u0993-\u09A8] + | [\u09AA-\u09B0] + | [\u09B2] + | [\u09B6-\u09B9] + | [\u09DC-\u09DD] + | [\u09DF-\u09E1] + | [\u09F0-\u09F1] + | [\u0A05-\u0A0A] + | [\u0A0F-\u0A10] + | [\u0A13-\u0A28] + | [\u0A2A-\u0A30] + | [\u0A32-\u0A33] + | [\u0A35-\u0A36] + | [\u0A38-\u0A39] + | [\u0A59-\u0A5C] + | [\u0A5E] + | [\u0A72-\u0A74] + | [\u0A85-\u0A8B] + | [\u0A8D] + | [\u0A8F-\u0A91] + | [\u0A93-\u0AA8] + | [\u0AAA-\u0AB0] + | [\u0AB2-\u0AB3] + | [\u0AB5-\u0AB9] + | [\u0ABD] + | [\u0AD0] + | [\u0AE0] + | [\u0B05-\u0B0C] + | [\u0B0F-\u0B10] + | [\u0B13-\u0B28] + | [\u0B2A-\u0B30] + | [\u0B32-\u0B33] + | [\u0B36-\u0B39] + | [\u0B3D] + | [\u0B5C-\u0B5D] + | [\u0B5F-\u0B61] + | [\u0B85-\u0B8A] + | [\u0B8E-\u0B90] + | [\u0B92-\u0B95] + | [\u0B99-\u0B9A] + | [\u0B9C] + | [\u0B9E-\u0B9F] + | [\u0BA3-\u0BA4] + | [\u0BA8-\u0BAA] + | [\u0BAE-\u0BB5] + | [\u0BB7-\u0BB9] + | [\u0C05-\u0C0C] + | [\u0C0E-\u0C10] + | [\u0C12-\u0C28] + | [\u0C2A-\u0C33] + | [\u0C35-\u0C39] + | [\u0C60-\u0C61] + | [\u0C85-\u0C8C] + | [\u0C8E-\u0C90] + | [\u0C92-\u0CA8] + | [\u0CAA-\u0CB3] + | [\u0CB5-\u0CB9] + | [\u0CDE] + | [\u0CE0-\u0CE1] + | [\u0D05-\u0D0C] + | [\u0D0E-\u0D10] + | [\u0D12-\u0D28] + | [\u0D2A-\u0D39] + | [\u0D60-\u0D61] + | [\u0D85-\u0D96] + | [\u0D9A-\u0DB1] + | [\u0DB3-\u0DBB] + | [\u0DBD] + | [\u0DC0-\u0DC6] + | [\u0E01-\u0E30] + | [\u0E32-\u0E33] + | [\u0E40-\u0E46] + | [\u0E81-\u0E82] + | [\u0E84] + | [\u0E87-\u0E88] + | [\u0E8A] + | [\u0E8D] + | [\u0E94-\u0E97] + | [\u0E99-\u0E9F] + | [\u0EA1-\u0EA3] + | [\u0EA5] + | [\u0EA7] + | [\u0EAA-\u0EAB] + | [\u0EAD-\u0EB0] + | [\u0EB2-\u0EB3] + | [\u0EBD-\u0EC4] + | [\u0EC6] + | [\u0EDC-\u0EDD] + | [\u0F00] + | [\u0F40-\u0F6A] + | [\u0F88-\u0F8B] + | [\u1000-\u1021] + | [\u1023-\u1027] + | [\u1029-\u102A] + | [\u1050-\u1055] + | [\u10A0-\u10C5] + | [\u10D0-\u10F6] + | [\u1100-\u1159] + | [\u115F-\u11A2] + | [\u11A8-\u11F9] + | [\u1200-\u1206] + | [\u1208-\u1246] + | [\u1248] + | [\u124A-\u124D] + | [\u1250-\u1256] + | [\u1258] + | [\u125A-\u125D] + | [\u1260-\u1286] + | [\u1288] + | [\u128A-\u128D] + | [\u1290-\u12AE] + | [\u12B0] + | [\u12B2-\u12B5] + | [\u12B8-\u12BE] + | [\u12C0] + | [\u12C2-\u12C5] + | [\u12C8-\u12CE] + | [\u12D0-\u12D6] + | [\u12D8-\u12EE] + | [\u12F0-\u130E] + | [\u1310] + | [\u1312-\u1315] + | [\u1318-\u131E] + | [\u1320-\u1346] + | [\u1348-\u135A] + | [\u13A0-\u13B0] + | [\u13B1-\u13F4] + | [\u1401-\u1676] + | [\u1681-\u169A] + | [\u16A0-\u16EA] + | [\u1780-\u17B3] + | [\u1820-\u1877] + | [\u1880-\u18A8] + | [\u1E00-\u1E9B] + | [\u1EA0-\u1EE0] + | [\u1EE1-\u1EF9] + | [\u1F00-\u1F15] + | [\u1F18-\u1F1D] + | [\u1F20-\u1F39] + | [\u1F3A-\u1F45] + | [\u1F48-\u1F4D] + | [\u1F50-\u1F57] + | [\u1F59] + | [\u1F5B] + | [\u1F5D] + | [\u1F5F-\u1F7D] + | [\u1F80-\u1FB4] + | [\u1FB6-\u1FBC] + | [\u1FBE] + | [\u1FC2-\u1FC4] + | [\u1FC6-\u1FCC] + | [\u1FD0-\u1FD3] + | [\u1FD6-\u1FDB] + | [\u1FE0-\u1FEC] + | [\u1FF2-\u1FF4] + | [\u1FF6-\u1FFC] + | [\u207F] + | [\u2102] + | [\u2107] + | [\u210A-\u2113] + | [\u2115] + | [\u2119-\u211D] + | [\u2124] + | [\u2126] + | [\u2128] + | [\u212A-\u212D] + | [\u212F-\u2131] + | [\u2133-\u2139] + | [\u2160-\u2183] + | [\u3005-\u3007] + | [\u3021-\u3029] + | [\u3031-\u3035] + | [\u3038-\u303A] + | [\u3041-\u3094] + | [\u309D-\u309E] + | [\u30A1-\u30FA] + | [\u30FC-\u30FE] + | [\u3105-\u312C] + | [\u3131-\u318E] + | [\u31A0-\u31B7] + | [\u3400-\u4DBF] + | [\u4E00-\u9FFF] + | [\uA000-\uA48C] + | [\uAC00] + | [\uD7A3] + | [\uF900-\uFA2D] + | [\uFB00-\uFB06] + | [\uFB13-\uFB17] + | [\uFB1D] + | [\uFB1F-\uFB28] + | [\uFB2A-\uFB36] + | [\uFB38-\uFB3C] + | [\uFB3E] + | [\uFB40-\uFB41] + | [\uFB43-\uFB44] + | [\uFB46-\uFBB1] + | [\uFBD3-\uFD3D] + | [\uFD50-\uFD8F] + | [\uFD92-\uFDC7] + | [\uFDF0-\uFDFB] + | [\uFE70-\uFE72] + | [\uFE74] + | [\uFE76-\uFEFC] + | [\uFF21-\uFF3A] + | [\uFF41-\uFF5A] + | [\uFF66-\uFFBE] + | [\uFFC2-\uFFC7] + | [\uFFCA-\uFFCF] + | [\uFFD2-\uFFD7] + | [\uFFDA-\uFFDC] + ; + +fragment UnicodeCombiningMark + : [\u0300-\u034E] + | [\u0360-\u0362] + | [\u0483-\u0486] + | [\u0591-\u05A1] + | [\u05A3-\u05B9] + | [\u05BB-\u05BD] + | [\u05BF] + | [\u05C1-\u05C2] + | [\u05C4] + | [\u064B-\u0655] + | [\u0670] + | [\u06D6-\u06DC] + | [\u06DF-\u06E4] + | [\u06E7-\u06E8] + | [\u06EA-\u06ED] + | [\u0711] + | [\u0730-\u074A] + | [\u07A6-\u07B0] + | [\u0901-\u0903] + | [\u093C] + | [\u093E-\u094D] + | [\u0951-\u0954] + | [\u0962-\u0963] + | [\u0981-\u0983] + | [\u09BC-\u09C4] + | [\u09C7-\u09C8] + | [\u09CB-\u09CD] + | [\u09D7] + | [\u09E2-\u09E3] + | [\u0A02] + | [\u0A3C] + | [\u0A3E-\u0A42] + | [\u0A47-\u0A48] + | [\u0A4B-\u0A4D] + | [\u0A70-\u0A71] + | [\u0A81-\u0A83] + | [\u0ABC] + | [\u0ABE-\u0AC5] + | [\u0AC7-\u0AC9] + | [\u0ACB-\u0ACD] + | [\u0B01-\u0B03] + | [\u0B3C] + | [\u0B3E-\u0B43] + | [\u0B47-\u0B48] + | [\u0B4B-\u0B4D] + | [\u0B56-\u0B57] + | [\u0B82-\u0B83] + | [\u0BBE-\u0BC2] + | [\u0BC6-\u0BC8] + | [\u0BCA-\u0BCD] + | [\u0BD7] + | [\u0C01-\u0C03] + | [\u0C3E-\u0C44] + | [\u0C46-\u0C48] + | [\u0C4A-\u0C4D] + | [\u0C55-\u0C56] + | [\u0C82-\u0C83] + | [\u0CBE-\u0CC4] + | [\u0CC6-\u0CC8] + | [\u0CCA-\u0CCD] + | [\u0CD5-\u0CD6] + | [\u0D02-\u0D03] + | [\u0D3E-\u0D43] + | [\u0D46-\u0D48] + | [\u0D4A-\u0D4D] + | [\u0D57] + | [\u0D82-\u0D83] + | [\u0DCA] + | [\u0DCF-\u0DD4] + | [\u0DD6] + | [\u0DD8-\u0DDF] + | [\u0DF2-\u0DF3] + | [\u0E31] + | [\u0E34-\u0E3A] + | [\u0E47-\u0E4E] + | [\u0EB1] + | [\u0EB4-\u0EB9] + | [\u0EBB-\u0EBC] + | [\u0EC8-\u0ECD] + | [\u0F18-\u0F19] + | [\u0F35] + | [\u0F37] + | [\u0F39] + | [\u0F3E-\u0F3F] + | [\u0F71-\u0F84] + | [\u0F86-\u0F87] + | [\u0F90-\u0F97] + | [\u0F99-\u0FBC] + | [\u0FC6] + | [\u102C-\u1032] + | [\u1036-\u1039] + | [\u1056-\u1059] + | [\u17B4-\u17D3] + | [\u18A9] + | [\u20D0-\u20DC] + | [\u20E1] + | [\u302A-\u302F] + | [\u3099-\u309A] + | [\uFB1E] + | [\uFE20-\uFE23] + ; + +fragment UnicodeDigit + : [\u0030-\u0039] + | [\u0660-\u0669] + | [\u06F0-\u06F9] + | [\u0966-\u096F] + | [\u09E6-\u09EF] + | [\u0A66-\u0A6F] + | [\u0AE6-\u0AEF] + | [\u0B66-\u0B6F] + | [\u0BE7-\u0BEF] + | [\u0C66-\u0C6F] + | [\u0CE6-\u0CEF] + | [\u0D66-\u0D6F] + | [\u0E50-\u0E59] + | [\u0ED0-\u0ED9] + | [\u0F20-\u0F29] + | [\u1040-\u1049] + | [\u1369-\u1371] + | [\u17E0-\u17E9] + | [\u1810-\u1819] + | [\uFF10-\uFF19] + ; + +fragment UnicodeConnectorPunctuation + : [\u005F] + | [\u203F-\u2040] + | [\u30FB] + | [\uFE33-\uFE34] + | [\uFE4D-\uFE4F] + | [\uFF3F] + | [\uFF65] + ; + +fragment RegularExpressionFirstChar + : ~[*\r\n\u2028\u2029\\/[] + | RegularExpressionBackslashSequence + | '[' RegularExpressionClassChar* ']' + ; + +fragment RegularExpressionChar + : ~[\r\n\u2028\u2029\\/[] + | RegularExpressionBackslashSequence + | '[' RegularExpressionClassChar* ']' + ; + +fragment RegularExpressionClassChar + : ~[\r\n\u2028\u2029\]\\] + | RegularExpressionBackslashSequence + ; + +fragment RegularExpressionBackslashSequence + : '\\' ~[\r\n\u2028\u2029] + ; diff --git a/languages/g4/JavaScriptLexer.tokens b/languages/g4/JavaScriptLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..d0a4ef4c70c2165ec2c3d876abeafc9ca1b24cbf --- /dev/null +++ b/languages/g4/JavaScriptLexer.tokens @@ -0,0 +1,224 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Divide=25 +Modulus=26 +Power=27 +NullCoalesce=28 +Hashtag=29 +RightShiftArithmetic=30 +LeftShiftArithmetic=31 +RightShiftLogical=32 +LessThan=33 +MoreThan=34 +LessThanEquals=35 +GreaterThanEquals=36 +Equals_=37 +NotEquals=38 +IdentityEquals=39 +IdentityNotEquals=40 +BitAnd=41 +BitXOr=42 +BitOr=43 +And=44 +Or=45 +MultiplyAssign=46 +DivideAssign=47 +ModulusAssign=48 +PlusAssign=49 +MinusAssign=50 +LeftShiftArithmeticAssign=51 +RightShiftArithmeticAssign=52 +RightShiftLogicalAssign=53 +BitAndAssign=54 +BitXorAssign=55 +BitOrAssign=56 +PowerAssign=57 +ARROW=58 +NullLiteral=59 +BooleanLiteral=60 +DecimalLiteral=61 +HexIntegerLiteral=62 +OctalIntegerLiteral=63 +OctalIntegerLiteral2=64 +BinaryIntegerLiteral=65 +BigHexIntegerLiteral=66 +BigOctalIntegerLiteral=67 +BigBinaryIntegerLiteral=68 +BigDecimalIntegerLiteral=69 +Break=70 +Do=71 +Instanceof=72 +Typeof=73 +Case=74 +Else=75 +New=76 +Var=77 +Catch=78 +Finally=79 +Return=80 +Void=81 +Continue=82 +For=83 +Switch=84 +While=85 +Debugger=86 +Function=87 +This=88 +With=89 +Default=90 +If=91 +Throw=92 +Delete=93 +In=94 +Try=95 +As=96 +From=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Async=105 +Await=106 +Implements=107 +Let=108 +Private=109 +Public=110 +Interface=111 +Package=112 +Protected=113 +Static=114 +Yield=115 +Identifier=116 +StringLiteral=117 +TemplateStringLiteral=118 +WhiteSpaces=119 +LineTerminator=120 +HtmlComment=121 +CDataComment=122 +UnexpectedCharacter=123 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'/'=25 +'%'=26 +'**'=27 +'??'=28 +'#'=29 +'>>'=30 +'<<'=31 +'>>>'=32 +'<'=33 +'>'=34 +'<='=35 +'>='=36 +'=='=37 +'!='=38 +'==='=39 +'!=='=40 +'&'=41 +'^'=42 +'|'=43 +'&&'=44 +'||'=45 +'*='=46 +'/='=47 +'%='=48 +'+='=49 +'-='=50 +'<<='=51 +'>>='=52 +'>>>='=53 +'&='=54 +'^='=55 +'|='=56 +'**='=57 +'=>'=58 +'null'=59 +'break'=70 +'do'=71 +'instanceof'=72 +'typeof'=73 +'case'=74 +'else'=75 +'new'=76 +'var'=77 +'catch'=78 +'finally'=79 +'return'=80 +'void'=81 +'continue'=82 +'for'=83 +'switch'=84 +'while'=85 +'debugger'=86 +'function'=87 +'this'=88 +'with'=89 +'default'=90 +'if'=91 +'throw'=92 +'delete'=93 +'in'=94 +'try'=95 +'as'=96 +'from'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'async'=105 +'await'=106 +'implements'=107 +'let'=108 +'private'=109 +'public'=110 +'interface'=111 +'package'=112 +'protected'=113 +'static'=114 +'yield'=115 diff --git a/languages/g4/JavaScriptParser.g4 b/languages/g4/JavaScriptParser.g4 new file mode 100644 index 0000000000000000000000000000000000000000..35b04b698d8b07efed85e8577b42e1de5ff49e65 --- /dev/null +++ b/languages/g4/JavaScriptParser.g4 @@ -0,0 +1,500 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp) + * Copyright (c) 2017 by Ivan Kochurkin (Positive Technologies): + added ECMAScript 6 support, cleared and transformed to the universal grammar. + * Copyright (c) 2018 by Juan Alvarez (contributor -> ported to Go) + * Copyright (c) 2019 by Student Main (contributor -> ES2020) + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of p.software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and p.permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +parser grammar JavaScriptParser; + +options { + tokenVocab=JavaScriptLexer; + superClass=JavaScriptBaseParser; +} + +program + : HashBangLine? sourceElements? EOF + ; + +sourceElement + : statement + ; + +statement + : block + | variableStatement + | importStatement + | exportStatement + | emptyStatement_ + | classDeclaration + | expressionStatement + | ifStatement + | iterationStatement + | continueStatement + | breakStatement + | returnStatement + | yieldStatement + | withStatement + | labelledStatement + | switchStatement + | throwStatement + | tryStatement + | debuggerStatement + | functionDeclaration + ; + +block + : '{' statementList? '}' + ; + +statementList + : statement+ + ; + +importStatement + : Import importFromBlock + ; + +importFromBlock + : importDefault? (importNamespace | moduleItems) importFrom eos + | StringLiteral eos + ; + +moduleItems + : '{' (aliasName ',')* (aliasName ','?)? '}' + ; + +importDefault + : aliasName ',' + ; + +importNamespace + : '*' (As identifierName)? + ; + +importFrom + : From StringLiteral + ; + +aliasName + : identifierName (As identifierName )? + ; + +exportStatement + : Export (exportFromBlock | declaration) eos # ExportDeclaration + | Export Default singleExpression eos # ExportDefaultDeclaration + ; + +exportFromBlock + : importNamespace importFrom eos + | moduleItems importFrom? eos + ; + +declaration + : variableStatement + | classDeclaration + | functionDeclaration + ; + +variableStatement + : varModifier variableDeclarationList eos + ; + +variableDeclarationList + : variableDeclaration (',' variableDeclaration)* + ; + +variableDeclaration + : assignable ('=' singleExpression)? // ECMAScript 6: Array & Object Matching + ; + +emptyStatement_ + : SemiColon + ; + +expressionStatement + : {p.notOpenBraceAndNotFunction()}? expressionSequence eos + ; + +ifStatement + : If '(' expressionSequence ')' statement (Else statement)? + ; + + +iterationStatement + : Do statement While '(' expressionSequence ')' eos # DoStatement + | While '(' expressionSequence ')' statement # WhileStatement + | For '(' (expressionSequence | variableStatement)? ';' expressionSequence? ';' expressionSequence? ')' statement # ForStatement + | For '(' (singleExpression | variableStatement) In expressionSequence ')' statement # ForInStatement + // strange, 'of' is an identifier. and p.p("of") not work in sometime. + | For Await? '(' (singleExpression | variableStatement) Identifier{p.p("of")}? expressionSequence ')' statement # ForOfStatement + ; + +varModifier // let, const - ECMAScript 6 + : Var + | Let + | Const + ; + +continueStatement + : Continue ({p.notLineTerminator()}? Identifier)? eos + ; + +breakStatement + : Break ({p.notLineTerminator()}? Identifier)? eos + ; + +returnStatement + : Return ({p.notLineTerminator()}? expressionSequence)? eos + ; + +yieldStatement + : Yield ({p.notLineTerminator()}? expressionSequence)? eos + ; + +withStatement + : With '(' expressionSequence ')' statement + ; + +switchStatement + : Switch '(' expressionSequence ')' caseBlock + ; + +caseBlock + : '{' caseClauses? (defaultClause caseClauses?)? '}' + ; + +caseClauses + : caseClause+ + ; + +caseClause + : Case expressionSequence ':' statementList? + ; + +defaultClause + : Default ':' statementList? + ; + +labelledStatement + : Identifier ':' statement + ; + +throwStatement + : Throw {p.notLineTerminator()}? expressionSequence eos + ; + +tryStatement + : Try block (catchProduction finallyProduction? | finallyProduction) + ; + +catchProduction + : Catch ('(' assignable? ')')? block + ; + +finallyProduction + : Finally block + ; + +debuggerStatement + : Debugger eos + ; + +functionDeclaration + : Async? Function '*'? Identifier '(' formalParameterList? ')' '{' functionBody '}' + ; + +classDeclaration + : Class Identifier classTail + ; + +classTail + : (Extends singleExpression)? '{' classElement* '}' + ; + +classElement + : (Static | {p.n("static")}? Identifier | Async)* methodDefinition + | emptyStatement_ + | '#'? propertyName '=' singleExpression + ; + +methodDefinition + : '*'? '#'? propertyName '(' formalParameterList? ')' '{' functionBody '}' + | '*'? '#'? getter '(' ')' '{' functionBody '}' + | '*'? '#'? setter '(' formalParameterList? ')' '{' functionBody '}' + ; + +formalParameterList + : formalParameterArg (',' formalParameterArg)* (',' lastFormalParameterArg)? + | lastFormalParameterArg + ; + +formalParameterArg + : assignable ('=' singleExpression)? // ECMAScript 6: Initialization + ; + +lastFormalParameterArg // ECMAScript 6: Rest Parameter + : Ellipsis singleExpression + ; + +functionBody + : sourceElements? + ; + +sourceElements + : sourceElement+ + ; + +arrayLiteral + : ('[' elementList ']') + ; + +elementList + : ','* arrayElement? (','+ arrayElement)* ','* // Yes, everything is optional + ; + +arrayElement + : Ellipsis? singleExpression + ; + +objectLiteral + : '{' (propertyAssignment (',' propertyAssignment)*)? ','? '}' + ; + +propertyAssignment + : propertyName ':' singleExpression # PropertyExpressionAssignment + | '[' singleExpression ']' ':' singleExpression # ComputedPropertyExpressionAssignment + | Async? '*'? propertyName '(' formalParameterList? ')' '{' functionBody '}' # FunctionProperty + | getter '(' ')' '{' functionBody '}' # PropertyGetter + | setter '(' formalParameterArg ')' '{' functionBody '}' # PropertySetter + | Ellipsis? singleExpression # PropertyShorthand + ; + +propertyName + : identifierName + | StringLiteral + | numericLiteral + | '[' singleExpression ']' + ; + +arguments + : '('(argument (',' argument)* ','?)?')' + ; + +argument + : Ellipsis? (singleExpression | Identifier) + ; + +expressionSequence + : singleExpression (',' singleExpression)* + ; + +singleExpression + : anoymousFunction # FunctionExpression + | Class Identifier? classTail # ClassExpression + | singleExpression '[' expressionSequence ']' # MemberIndexExpression + | singleExpression '?'? '.' '#'? identifierName # MemberDotExpression + | singleExpression arguments # ArgumentsExpression + | New singleExpression arguments? # NewExpression + | New '.' Identifier # MetaExpression // new.target + | singleExpression {p.notLineTerminator()}? '++' # PostIncrementExpression + | singleExpression {p.notLineTerminator()}? '--' # PostDecreaseExpression + | Delete singleExpression # DeleteExpression + | Void singleExpression # VoidExpression + | Typeof singleExpression # TypeofExpression + | '++' singleExpression # PreIncrementExpression + | '--' singleExpression # PreDecreaseExpression + | '+' singleExpression # UnaryPlusExpression + | '-' singleExpression # UnaryMinusExpression + | '~' singleExpression # BitNotExpression + | '!' singleExpression # NotExpression + | Await singleExpression # AwaitExpression + | singleExpression '**' singleExpression # PowerExpression + | singleExpression ('*' | '/' | '%') singleExpression # MultiplicativeExpression + | singleExpression ('+' | '-') singleExpression # AdditiveExpression + | singleExpression '??' singleExpression # CoalesceExpression + | singleExpression ('<<' | '>>' | '>>>') singleExpression # BitShiftExpression + | singleExpression ('<' | '>' | '<=' | '>=') singleExpression # RelationalExpression + | singleExpression Instanceof singleExpression # InstanceofExpression + | singleExpression In singleExpression # InExpression + | singleExpression ('==' | '!=' | '===' | '!==') singleExpression # EqualityExpression + | singleExpression '&' singleExpression # BitAndExpression + | singleExpression '^' singleExpression # BitXOrExpression + | singleExpression '|' singleExpression # BitOrExpression + | singleExpression '&&' singleExpression # LogicalAndExpression + | singleExpression '||' singleExpression # LogicalOrExpression + | singleExpression '?' singleExpression ':' singleExpression # TernaryExpression + | singleExpression '=' singleExpression # AssignmentExpression + | singleExpression assignmentOperator singleExpression # AssignmentOperatorExpression + | Import '(' singleExpression ')' # ImportExpression + | singleExpression TemplateStringLiteral # TemplateStringExpression // ECMAScript 6 + | yieldStatement # YieldExpression // ECMAScript 6 + | This # ThisExpression + | Identifier # IdentifierExpression + | Super # SuperExpression + | literal # LiteralExpression + | arrayLiteral # ArrayLiteralExpression + | objectLiteral # ObjectLiteralExpression + | '(' expressionSequence ')' # ParenthesizedExpression + ; + +assignable + : Identifier + | arrayLiteral + | objectLiteral + ; + +anoymousFunction + : functionDeclaration # FunctionDecl + | Async? Function '*'? '(' formalParameterList? ')' '{' functionBody '}' # AnoymousFunctionDecl + | Async? arrowFunctionParameters '=>' arrowFunctionBody # ArrowFunction + ; + +arrowFunctionParameters + : Identifier + | '(' formalParameterList? ')' + ; + +arrowFunctionBody + : singleExpression + | '{' functionBody '}' + ; + +assignmentOperator + : '*=' + | '/=' + | '%=' + | '+=' + | '-=' + | '<<=' + | '>>=' + | '>>>=' + | '&=' + | '^=' + | '|=' + | '**=' + ; + +literal + : NullLiteral + | BooleanLiteral + | StringLiteral + | TemplateStringLiteral + | RegularExpressionLiteral + | numericLiteral + | bigintLiteral + ; + +numericLiteral + : DecimalLiteral + | HexIntegerLiteral + | OctalIntegerLiteral + | OctalIntegerLiteral2 + | BinaryIntegerLiteral + ; + +bigintLiteral + : BigDecimalIntegerLiteral + | BigHexIntegerLiteral + | BigOctalIntegerLiteral + | BigBinaryIntegerLiteral + ; + +identifierName + : Identifier + | reservedWord + ; + +reservedWord + : keyword + | NullLiteral + | BooleanLiteral + ; + +keyword + : Break + | Do + | Instanceof + | Typeof + | Case + | Else + | New + | Var + | Catch + | Finally + | Return + | Void + | Continue + | For + | Switch + | While + | Debugger + | Function + | This + | With + | Default + | If + | Throw + | Delete + | In + | Try + + | Class + | Enum + | Extends + | Super + | Const + | Export + | Import + | Implements + | Let + | Private + | Public + | Interface + | Package + | Protected + | Static + | Yield + | Async + | Await + | From + | As + ; + +getter + : Identifier {p.p("get")}? propertyName + ; + +setter + : Identifier {p.p("set")}? propertyName + ; + +eos + : SemiColon + | EOF + | {p.lineTerminatorAhead()}? + | {p.closeBrace()}? + ; diff --git a/languages/g4/PythonLexer.g4 b/languages/g4/PythonLexer.g4 new file mode 100644 index 0000000000000000000000000000000000000000..0e937c08a2aef138d5bf3c4984f4af934607913b --- /dev/null +++ b/languages/g4/PythonLexer.g4 @@ -0,0 +1,757 @@ +/* +Python grammar. +The MIT License (MIT). +Copyright (c) 2014, Bart Kiers, bart@big-o.nl +Copyright (c) 2019, Dmitriy Litovchenko, Dmitry.Litovchenko1@yandex.ru, Positive Technologies +Copyright (c) 2019, Nikita Subbotin, sub.nik.and@gmail.com, Positive Technologies +Copyright (c) 2019, Ivan Kochurkin, kvanttt@gmail.com, Positive Technologies + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +lexer grammar PythonLexer; + +options { superClass=PythonBaseLexer; } + +// Artificial tokens only for parser purposes + +tokens { INDENT, DEDENT, LINE_BREAK } + +// Keywords + +DEF : 'def'; +RETURN : 'return'; +RAISE : 'raise'; +FROM : 'from'; +IMPORT : 'import'; +NONLOCAL : 'nonlocal'; +AS : 'as'; +GLOBAL : 'global'; +ASSERT : 'assert'; +IF : 'if'; +ELIF : 'elif'; +ELSE : 'else'; +WHILE : 'while'; +FOR : 'for'; +IN : 'in'; +TRY : 'try'; +NONE : 'None'; +FINALLY : 'finally'; +WITH : 'with'; +EXCEPT : 'except'; +LAMBDA : 'lambda'; +OR : 'or'; +AND : 'and'; +NOT : 'not'; +IS : 'is'; +CLASS : 'class'; +YIELD : 'yield'; +DEL : 'del'; +PASS : 'pass'; +CONTINUE : 'continue'; +BREAK : 'break'; +ASYNC : 'async'; +AWAIT : 'await'; +PRINT : 'print'; +EXEC : 'exec'; +TRUE : 'True'; +FALSE : 'False'; + +// Operators + +DOT : '.'; +ELLIPSIS : '...'; +REVERSE_QUOTE : '`'; +STAR : '*'; +COMMA : ','; +COLON : ':'; +SEMI_COLON : ';'; +POWER : '**'; +ASSIGN : '='; +OR_OP : '|'; +XOR : '^'; +AND_OP : '&'; +LEFT_SHIFT : '<<'; +RIGHT_SHIFT : '>>'; +ADD : '+'; +MINUS : '-'; +DIV : '/'; +MOD : '%'; +IDIV : '//'; +NOT_OP : '~'; +LESS_THAN : '<'; +GREATER_THAN : '>'; +EQUALS : '=='; +GT_EQ : '>='; +LT_EQ : '<='; +NOT_EQ_1 : '<>'; +NOT_EQ_2 : '!='; +AT : '@'; +ARROW : '->'; +ADD_ASSIGN : '+='; +SUB_ASSIGN : '-='; +MULT_ASSIGN : '*='; +AT_ASSIGN : '@='; +DIV_ASSIGN : '/='; +MOD_ASSIGN : '%='; +AND_ASSIGN : '&='; +OR_ASSIGN : '|='; +XOR_ASSIGN : '^='; +LEFT_SHIFT_ASSIGN : '<<='; +RIGHT_SHIFT_ASSIGN : '>>='; +POWER_ASSIGN : '**='; +IDIV_ASSIGN : '//='; + +STRING : ([uU] | [fF] [rR]? | [rR] [fF]?)? (SHORT_STRING | LONG_STRING) + | ([bB] [rR]? | [rR] [bB]) (SHORT_BYTES | LONG_BYTES) + ; + +DECIMAL_INTEGER : [1-9] [0-9]* + | '0'+ + ; +OCT_INTEGER : '0' [oO] [0-7]+; +HEX_INTEGER : '0' [xX] [0-9a-fA-F]+; +BIN_INTEGER : '0' [bB] [01]+; + +IMAG_NUMBER : (EXPONENT_OR_POINT_FLOAT | [0-9]+) [jJ]; +FLOAT_NUMBER : EXPONENT_OR_POINT_FLOAT; + +OPEN_PAREN : '(' {l.IncIndentLevel();}; +CLOSE_PAREN : ')' {l.DecIndentLevel();}; +OPEN_BRACE : '{' {l.IncIndentLevel();}; +CLOSE_BRACE : '}' {l.DecIndentLevel();}; +OPEN_BRACKET : '[' {l.IncIndentLevel();}; +CLOSE_BRACKET : ']' {l.DecIndentLevel();}; + +NAME : ID_START ID_CONTINUE*; + +LINE_JOIN : '\\' [ \t]* RN -> channel(HIDDEN); +NEWLINE : RN {l.HandleNewLine();} -> channel(HIDDEN); +WS : [ \t]+ {l.HandleSpaces();} -> channel(HIDDEN); +COMMENT : '#' ~[\r\n\f]* -> channel(HIDDEN); + +// Fragments + +fragment SHORT_STRING + : '\'' ('\\' (RN | .) | ~[\\\r\n'])* '\'' + | '"' ('\\' (RN | .) | ~[\\\r\n"])* '"' + ; + +fragment LONG_STRING + : '\'\'\'' LONG_STRING_ITEM*? '\'\'\'' + | '"""' LONG_STRING_ITEM*? '"""' + ; + +fragment LONG_STRING_ITEM + : ~'\\' + | '\\' (RN | .) + ; + +fragment RN + : '\r'? '\n' + ; + +fragment EXPONENT_OR_POINT_FLOAT + : ([0-9]+ | POINT_FLOAT) [eE] [+-]? [0-9]+ + | POINT_FLOAT + ; + +fragment POINT_FLOAT + : [0-9]* '.' [0-9]+ + | [0-9]+ '.' + ; + +fragment SHORT_BYTES + : '\'' (SHORT_BYTES_CHAR_NO_SINGLE_QUOTE | BYTES_ESCAPE_SEQ)* '\'' + | '"' (SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE | BYTES_ESCAPE_SEQ)* '"' + ; + +fragment LONG_BYTES + : '\'\'\'' LONG_BYTES_ITEM*? '\'\'\'' + | '"""' LONG_BYTES_ITEM*? '"""' + ; + +fragment LONG_BYTES_ITEM + : LONG_BYTES_CHAR + | BYTES_ESCAPE_SEQ + ; + +fragment SHORT_BYTES_CHAR_NO_SINGLE_QUOTE + : [\u0000-\u0009] + | [\u000B-\u000C] + | [\u000E-\u0026] + | [\u0028-\u005B] + | [\u005D-\u007F] + ; + +fragment SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE + : [\u0000-\u0009] + | [\u000B-\u000C] + | [\u000E-\u0021] + | [\u0023-\u005B] + | [\u005D-\u007F] + ; + +/// Any ASCII character except "\" +fragment LONG_BYTES_CHAR + : [\u0000-\u005B] + | [\u005D-\u007F] + ; + +/// "\" +fragment BYTES_ESCAPE_SEQ + : '\\' [\u0000-\u007F] + ; + +/// All characters in id_start, plus characters in the categories Mn, Mc, Nd, Pc and others with the Other_ID_Continue property +fragment ID_CONTINUE + : ID_START + | [0-9] + | [\u0300-\u036F] + | [\u0483-\u0486] + | [\u0591-\u05B9] + | [\u05BB-\u05BD] + | '\u05BF' + | [\u05C1-\u05C2] + | [\u05C4-\u05C5] + | '\u05C7' + | [\u0610-\u0615] + | [\u064B-\u065E] + | [\u0660-\u0669] + | '\u0670' + | [\u06D6-\u06DC] + | [\u06DF-\u06E4] + | [\u06E7-\u06E8] + | [\u06EA-\u06ED] + | [\u06F0-\u06F9] + | '\u0711' + | [\u0730-\u074A] + | [\u07A6-\u07B0] + | [\u0901-\u0902] + | '\u0903' + | '\u093C' + | [\u093E-\u0940] + | [\u0941-\u0948] + | [\u0949-\u094C] + | '\u094D' + | [\u0951-\u0954] + | [\u0962-\u0963] + | [\u0966-\u096F] + | '\u0981' + | [\u0982-\u0983] + | '\u09BC' + | [\u09BE-\u09C0] + | [\u09C1-\u09C4] + | [\u09C7-\u09C8] + | [\u09CB-\u09CC] + | '\u09CD' + | '\u09D7' + | [\u09E2-\u09E3] + | [\u09E6-\u09EF] + | [\u0A01-\u0A02] + | '\u0A03' + | '\u0A3C' + | [\u0A3E-\u0A40] + | [\u0A41-\u0A42] + | [\u0A47-\u0A48] + | [\u0A4B-\u0A4D] + | [\u0A66-\u0A6F] + | [\u0A70-\u0A71] + | [\u0A81-\u0A82] + | '\u0A83' + | '\u0ABC' + | [\u0ABE-\u0AC0] + | [\u0AC1-\u0AC5] + | [\u0AC7-\u0AC8] + | '\u0AC9' + | [\u0ACB-\u0ACC] + | '\u0ACD' + | [\u0AE2-\u0AE3] + | [\u0AE6-\u0AEF] + | '\u0B01' + | [\u0B02-\u0B03] + | '\u0B3C' + | '\u0B3E' + | '\u0B3F' + | '\u0B40' + | [\u0B41-\u0B43] + | [\u0B47-\u0B48] + | [\u0B4B-\u0B4C] + | '\u0B4D' + | '\u0B56' + | '\u0B57' + | [\u0B66-\u0B6F] + | '\u0B82' + | [\u0BBE-\u0BBF] + | '\u0BC0' + | [\u0BC1-\u0BC2] + | [\u0BC6-\u0BC8] + | [\u0BCA-\u0BCC] + | '\u0BCD' + | '\u0BD7' + | [\u0BE6-\u0BEF] + | [\u0C01-\u0C03] + | [\u0C3E-\u0C40] + | [\u0C41-\u0C44] + | [\u0C46-\u0C48] + | [\u0C4A-\u0C4D] + | [\u0C55-\u0C56] + | [\u0C66-\u0C6F] + | [\u0C82-\u0C83] + | '\u0CBC' + | '\u0CBE' + | '\u0CBF' + | [\u0CC0-\u0CC4] + | '\u0CC6' + | [\u0CC7-\u0CC8] + | [\u0CCA-\u0CCB] + | [\u0CCC-\u0CCD] + | [\u0CD5-\u0CD6] + | [\u0CE6-\u0CEF] + | [\u0D02-\u0D03] + | [\u0D3E-\u0D40] + | [\u0D41-\u0D43] + | [\u0D46-\u0D48] + | [\u0D4A-\u0D4C] + | '\u0D4D' + | '\u0D57' + | [\u0D66-\u0D6F] + | [\u0D82-\u0D83] + | '\u0DCA' + | [\u0DCF-\u0DD1] + | [\u0DD2-\u0DD4] + | '\u0DD6' + | [\u0DD8-\u0DDF] + | [\u0DF2-\u0DF3] + | '\u0E31' + | [\u0E34-\u0E3A] + | [\u0E47-\u0E4E] + | [\u0E50-\u0E59] + | '\u0EB1' + | [\u0EB4-\u0EB9] + | [\u0EBB-\u0EBC] + | [\u0EC8-\u0ECD] + | [\u0ED0-\u0ED9] + | [\u0F18-\u0F19] + | [\u0F20-\u0F29] + | '\u0F35' + | '\u0F37' + | '\u0F39' + | [\u0F3E-\u0F3F] + | [\u0F71-\u0F7E] + | '\u0F7F' + | [\u0F80-\u0F84] + | [\u0F86-\u0F87] + | [\u0F90-\u0F97] + | [\u0F99-\u0FBC] + | '\u0FC6' + | '\u102C' + | [\u102D-\u1030] + | '\u1031' + | '\u1032' + | [\u1036-\u1037] + | '\u1038' + | '\u1039' + | [\u1040-\u1049] + | [\u1056-\u1057] + | [\u1058-\u1059] + | '\u135F' + | [\u1369-\u1371] + | [\u1712-\u1714] + | [\u1732-\u1734] + | [\u1752-\u1753] + | [\u1772-\u1773] + | '\u17B6' + | [\u17B7-\u17BD] + | [\u17BE-\u17C5] + | '\u17C6' + | [\u17C7-\u17C8] + | [\u17C9-\u17D3] + | '\u17DD' + | [\u17E0-\u17E9] + | [\u180B-\u180D] + | [\u1810-\u1819] + | '\u18A9' + | [\u1920-\u1922] + | [\u1923-\u1926] + | [\u1927-\u1928] + | [\u1929-\u192B] + | [\u1930-\u1931] + | '\u1932' + | [\u1933-\u1938] + | [\u1939-\u193B] + | [\u1946-\u194F] + | [\u19B0-\u19C0] + | [\u19C8-\u19C9] + | [\u19D0-\u19D9] + | [\u1A17-\u1A18] + | [\u1A19-\u1A1B] + | [\u1DC0-\u1DC3] + | [\u203F-\u2040] + | '\u2054' + | [\u20D0-\u20DC] + | '\u20E1' + | [\u20E5-\u20EB] + | [\u302A-\u302F] + | [\u3099-\u309A] + | '\uA802' + | '\uA806' + | '\uA80B' + | [\uA823-\uA824] + | [\uA825-\uA826] + | '\uA827' + | '\uFB1E' + | [\uFE00-\uFE0F] + | [\uFE20-\uFE23] + | [\uFE33-\uFE34] + | [\uFE4D-\uFE4F] + | [\uFF10-\uFF19] + | '\uFF3F' + ; + +/// All characters in general categories Lu, Ll, Lt, Lm, Lo, Nl, the underscore, and characters with the Other_ID_Start property +fragment ID_START + : '_' + | [A-Z] + | [a-z] + | '\u00AA' + | '\u00B5' + | '\u00BA' + | [\u00C0-\u00D6] + | [\u00D8-\u00F6] + | [\u00F8-\u01BA] + | '\u01BB' + | [\u01BC-\u01BF] + | [\u01C0-\u01C3] + | [\u01C4-\u0241] + | [\u0250-\u02AF] + | [\u02B0-\u02C1] + | [\u02C6-\u02D1] + | [\u02E0-\u02E4] + | '\u02EE' + | '\u037A' + | '\u0386' + | [\u0388-\u038A] + | '\u038C' + | [\u038E-\u03A1] + | [\u03A3-\u03CE] + | [\u03D0-\u03F5] + | [\u03F7-\u0481] + | [\u048A-\u04CE] + | [\u04D0-\u04F9] + | [\u0500-\u050F] + | [\u0531-\u0556] + | '\u0559' + | [\u0561-\u0587] + | [\u05D0-\u05EA] + | [\u05F0-\u05F2] + | [\u0621-\u063A] + | '\u0640' + | [\u0641-\u064A] + | [\u066E-\u066F] + | [\u0671-\u06D3] + | '\u06D5' + | [\u06E5-\u06E6] + | [\u06EE-\u06EF] + | [\u06FA-\u06FC] + | '\u06FF' + | '\u0710' + | [\u0712-\u072F] + | [\u074D-\u076D] + | [\u0780-\u07A5] + | '\u07B1' + | [\u0904-\u0939] + | '\u093D' + | '\u0950' + | [\u0958-\u0961] + | '\u097D' + | [\u0985-\u098C] + | [\u098F-\u0990] + | [\u0993-\u09A8] + | [\u09AA-\u09B0] + | '\u09B2' + | [\u09B6-\u09B9] + | '\u09BD' + | '\u09CE' + | [\u09DC-\u09DD] + | [\u09DF-\u09E1] + | [\u09F0-\u09F1] + | [\u0A05-\u0A0A] + | [\u0A0F-\u0A10] + | [\u0A13-\u0A28] + | [\u0A2A-\u0A30] + | [\u0A32-\u0A33] + | [\u0A35-\u0A36] + | [\u0A38-\u0A39] + | [\u0A59-\u0A5C] + | '\u0A5E' + | [\u0A72-\u0A74] + | [\u0A85-\u0A8D] + | [\u0A8F-\u0A91] + | [\u0A93-\u0AA8] + | [\u0AAA-\u0AB0] + | [\u0AB2-\u0AB3] + | [\u0AB5-\u0AB9] + | '\u0ABD' + | '\u0AD0' + | [\u0AE0-\u0AE1] + | [\u0B05-\u0B0C] + | [\u0B0F-\u0B10] + | [\u0B13-\u0B28] + | [\u0B2A-\u0B30] + | [\u0B32-\u0B33] + | [\u0B35-\u0B39] + | '\u0B3D' + | [\u0B5C-\u0B5D] + | [\u0B5F-\u0B61] + | '\u0B71' + | '\u0B83' + | [\u0B85-\u0B8A] + | [\u0B8E-\u0B90] + | [\u0B92-\u0B95] + | [\u0B99-\u0B9A] + | '\u0B9C' + | [\u0B9E-\u0B9F] + | [\u0BA3-\u0BA4] + | [\u0BA8-\u0BAA] + | [\u0BAE-\u0BB9] + | [\u0C05-\u0C0C] + | [\u0C0E-\u0C10] + | [\u0C12-\u0C28] + | [\u0C2A-\u0C33] + | [\u0C35-\u0C39] + | [\u0C60-\u0C61] + | [\u0C85-\u0C8C] + | [\u0C8E-\u0C90] + | [\u0C92-\u0CA8] + | [\u0CAA-\u0CB3] + | [\u0CB5-\u0CB9] + | '\u0CBD' + | '\u0CDE' + | [\u0CE0-\u0CE1] + | [\u0D05-\u0D0C] + | [\u0D0E-\u0D10] + | [\u0D12-\u0D28] + | [\u0D2A-\u0D39] + | [\u0D60-\u0D61] + | [\u0D85-\u0D96] + | [\u0D9A-\u0DB1] + | [\u0DB3-\u0DBB] + | '\u0DBD' + | [\u0DC0-\u0DC6] + | [\u0E01-\u0E30] + | [\u0E32-\u0E33] + | [\u0E40-\u0E45] + | '\u0E46' + | [\u0E81-\u0E82] + | '\u0E84' + | [\u0E87-\u0E88] + | '\u0E8A' + | '\u0E8D' + | [\u0E94-\u0E97] + | [\u0E99-\u0E9F] + | [\u0EA1-\u0EA3] + | '\u0EA5' + | '\u0EA7' + | [\u0EAA-\u0EAB] + | [\u0EAD-\u0EB0] + | [\u0EB2-\u0EB3] + | '\u0EBD' + | [\u0EC0-\u0EC4] + | '\u0EC6' + | [\u0EDC-\u0EDD] + | '\u0F00' + | [\u0F40-\u0F47] + | [\u0F49-\u0F6A] + | [\u0F88-\u0F8B] + | [\u1000-\u1021] + | [\u1023-\u1027] + | [\u1029-\u102A] + | [\u1050-\u1055] + | [\u10A0-\u10C5] + | [\u10D0-\u10FA] + | '\u10FC' + | [\u1100-\u1159] + | [\u115F-\u11A2] + | [\u11A8-\u11F9] + | [\u1200-\u1248] + | [\u124A-\u124D] + | [\u1250-\u1256] + | '\u1258' + | [\u125A-\u125D] + | [\u1260-\u1288] + | [\u128A-\u128D] + | [\u1290-\u12B0] + | [\u12B2-\u12B5] + | [\u12B8-\u12BE] + | '\u12C0' + | [\u12C2-\u12C5] + | [\u12C8-\u12D6] + | [\u12D8-\u1310] + | [\u1312-\u1315] + | [\u1318-\u135A] + | [\u1380-\u138F] + | [\u13A0-\u13F4] + | [\u1401-\u166C] + | [\u166F-\u1676] + | [\u1681-\u169A] + | [\u16A0-\u16EA] + | [\u16EE-\u16F0] + | [\u1700-\u170C] + | [\u170E-\u1711] + | [\u1720-\u1731] + | [\u1740-\u1751] + | [\u1760-\u176C] + | [\u176E-\u1770] + | [\u1780-\u17B3] + | '\u17D7' + | '\u17DC' + | [\u1820-\u1842] + | '\u1843' + | [\u1844-\u1877] + | [\u1880-\u18A8] + | [\u1900-\u191C] + | [\u1950-\u196D] + | [\u1970-\u1974] + | [\u1980-\u19A9] + | [\u19C1-\u19C7] + | [\u1A00-\u1A16] + | [\u1D00-\u1D2B] + | [\u1D2C-\u1D61] + | [\u1D62-\u1D77] + | '\u1D78' + | [\u1D79-\u1D9A] + | [\u1D9B-\u1DBF] + | [\u1E00-\u1E9B] + | [\u1EA0-\u1EF9] + | [\u1F00-\u1F15] + | [\u1F18-\u1F1D] + | [\u1F20-\u1F45] + | [\u1F48-\u1F4D] + | [\u1F50-\u1F57] + | '\u1F59' + | '\u1F5B' + | '\u1F5D' + | [\u1F5F-\u1F7D] + | [\u1F80-\u1FB4] + | [\u1FB6-\u1FBC] + | '\u1FBE' + | [\u1FC2-\u1FC4] + | [\u1FC6-\u1FCC] + | [\u1FD0-\u1FD3] + | [\u1FD6-\u1FDB] + | [\u1FE0-\u1FEC] + | [\u1FF2-\u1FF4] + | [\u1FF6-\u1FFC] + | '\u2071' + | '\u207F' + | [\u2090-\u2094] + | '\u2102' + | '\u2107' + | [\u210A-\u2113] + | '\u2115' + | '\u2118' + | [\u2119-\u211D] + | '\u2124' + | '\u2126' + | '\u2128' + | [\u212A-\u212D] + | '\u212E' + | [\u212F-\u2131] + | [\u2133-\u2134] + | [\u2135-\u2138] + | '\u2139' + | [\u213C-\u213F] + | [\u2145-\u2149] + | [\u2160-\u2183] + | [\u2C00-\u2C2E] + | [\u2C30-\u2C5E] + | [\u2C80-\u2CE4] + | [\u2D00-\u2D25] + | [\u2D30-\u2D65] + | '\u2D6F' + | [\u2D80-\u2D96] + | [\u2DA0-\u2DA6] + | [\u2DA8-\u2DAE] + | [\u2DB0-\u2DB6] + | [\u2DB8-\u2DBE] + | [\u2DC0-\u2DC6] + | [\u2DC8-\u2DCE] + | [\u2DD0-\u2DD6] + | [\u2DD8-\u2DDE] + | '\u3005' + | '\u3006' + | '\u3007' + | [\u3021-\u3029] + | [\u3031-\u3035] + | [\u3038-\u303A] + | '\u303B' + | '\u303C' + | [\u3041-\u3096] + | [\u309B-\u309C] + | [\u309D-\u309E] + | '\u309F' + | [\u30A1-\u30FA] + | [\u30FC-\u30FE] + | '\u30FF' + | [\u3105-\u312C] + | [\u3131-\u318E] + | [\u31A0-\u31B7] + | [\u31F0-\u31FF] + | [\u3400-\u4DB5] + | [\u4E00-\u9FBB] + | [\uA000-\uA014] + | '\uA015' + | [\uA016-\uA48C] + | [\uA800-\uA801] + | [\uA803-\uA805] + | [\uA807-\uA80A] + | [\uA80C-\uA822] + | [\uAC00-\uD7A3] + | [\uF900-\uFA2D] + | [\uFA30-\uFA6A] + | [\uFA70-\uFAD9] + | [\uFB00-\uFB06] + | [\uFB13-\uFB17] + | '\uFB1D' + | [\uFB1F-\uFB28] + | [\uFB2A-\uFB36] + | [\uFB38-\uFB3C] + | '\uFB3E' + | [\uFB40-\uFB41] + | [\uFB43-\uFB44] + | [\uFB46-\uFBB1] + | [\uFBD3-\uFD3D] + | [\uFD50-\uFD8F] + | [\uFD92-\uFDC7] + | [\uFDF0-\uFDFB] + | [\uFE70-\uFE74] + | [\uFE76-\uFEFC] + | [\uFF21-\uFF3A] + | [\uFF41-\uFF5A] + | [\uFF66-\uFF6F] + | '\uFF70' + | [\uFF71-\uFF9D] + | [\uFF9E-\uFF9F] + | [\uFFA0-\uFFBE] + | [\uFFC2-\uFFC7] + | [\uFFCA-\uFFCF] + | [\uFFD2-\uFFD7] + | [\uFFDA-\uFFDC] + ; diff --git a/languages/g4/PythonLexer.tokens b/languages/g4/PythonLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..1282117c8ef2e08acdfa44e74aad5fe6a8549244 --- /dev/null +++ b/languages/g4/PythonLexer.tokens @@ -0,0 +1,185 @@ +INDENT=1 +DEDENT=2 +LINE_BREAK=3 +DEF=4 +RETURN=5 +RAISE=6 +FROM=7 +IMPORT=8 +NONLOCAL=9 +AS=10 +GLOBAL=11 +ASSERT=12 +IF=13 +ELIF=14 +ELSE=15 +WHILE=16 +FOR=17 +IN=18 +TRY=19 +NONE=20 +FINALLY=21 +WITH=22 +EXCEPT=23 +LAMBDA=24 +OR=25 +AND=26 +NOT=27 +IS=28 +CLASS=29 +YIELD=30 +DEL=31 +PASS=32 +CONTINUE=33 +BREAK=34 +ASYNC=35 +AWAIT=36 +PRINT=37 +EXEC=38 +TRUE=39 +FALSE=40 +DOT=41 +ELLIPSIS=42 +REVERSE_QUOTE=43 +STAR=44 +COMMA=45 +COLON=46 +SEMI_COLON=47 +POWER=48 +ASSIGN=49 +OR_OP=50 +XOR=51 +AND_OP=52 +LEFT_SHIFT=53 +RIGHT_SHIFT=54 +ADD=55 +MINUS=56 +DIV=57 +MOD=58 +IDIV=59 +NOT_OP=60 +LESS_THAN=61 +GREATER_THAN=62 +EQUALS=63 +GT_EQ=64 +LT_EQ=65 +NOT_EQ_1=66 +NOT_EQ_2=67 +AT=68 +ARROW=69 +ADD_ASSIGN=70 +SUB_ASSIGN=71 +MULT_ASSIGN=72 +AT_ASSIGN=73 +DIV_ASSIGN=74 +MOD_ASSIGN=75 +AND_ASSIGN=76 +OR_ASSIGN=77 +XOR_ASSIGN=78 +LEFT_SHIFT_ASSIGN=79 +RIGHT_SHIFT_ASSIGN=80 +POWER_ASSIGN=81 +IDIV_ASSIGN=82 +STRING=83 +DECIMAL_INTEGER=84 +OCT_INTEGER=85 +HEX_INTEGER=86 +BIN_INTEGER=87 +IMAG_NUMBER=88 +FLOAT_NUMBER=89 +OPEN_PAREN=90 +CLOSE_PAREN=91 +OPEN_BRACE=92 +CLOSE_BRACE=93 +OPEN_BRACKET=94 +CLOSE_BRACKET=95 +NAME=96 +LINE_JOIN=97 +NEWLINE=98 +WS=99 +COMMENT=100 +'def'=4 +'return'=5 +'raise'=6 +'from'=7 +'import'=8 +'nonlocal'=9 +'as'=10 +'global'=11 +'assert'=12 +'if'=13 +'elif'=14 +'else'=15 +'while'=16 +'for'=17 +'in'=18 +'try'=19 +'None'=20 +'finally'=21 +'with'=22 +'except'=23 +'lambda'=24 +'or'=25 +'and'=26 +'not'=27 +'is'=28 +'class'=29 +'yield'=30 +'del'=31 +'pass'=32 +'continue'=33 +'break'=34 +'async'=35 +'await'=36 +'print'=37 +'exec'=38 +'True'=39 +'False'=40 +'.'=41 +'...'=42 +'`'=43 +'*'=44 +','=45 +':'=46 +';'=47 +'**'=48 +'='=49 +'|'=50 +'^'=51 +'&'=52 +'<<'=53 +'>>'=54 +'+'=55 +'-'=56 +'/'=57 +'%'=58 +'//'=59 +'~'=60 +'<'=61 +'>'=62 +'=='=63 +'>='=64 +'<='=65 +'<>'=66 +'!='=67 +'@'=68 +'->'=69 +'+='=70 +'-='=71 +'*='=72 +'@='=73 +'/='=74 +'%='=75 +'&='=76 +'|='=77 +'^='=78 +'<<='=79 +'>>='=80 +'**='=81 +'//='=82 +'('=90 +')'=91 +'{'=92 +'}'=93 +'['=94 +']'=95 diff --git a/languages/g4/PythonParser.g4 b/languages/g4/PythonParser.g4 new file mode 100644 index 0000000000000000000000000000000000000000..01b322555f2ec8978ed1373d0f1111a891726524 --- /dev/null +++ b/languages/g4/PythonParser.g4 @@ -0,0 +1,386 @@ +/* +Python grammar. +The MIT License (MIT). +Copyright (c) 2014, Bart Kiers, bart@big-o.nl +Copyright (c) 2019, Dmitriy Litovchenko, Dmitry.Litovchenko1@yandex.ru, Positive Technologies +Copyright (c) 2019, Nikita Subbotin, sub.nik.and@gmaip.com, Positive Technologies +Copyright (c) 2019, Ivan Kochurkin, kvanttt@gmaip.com, Positive Technologies + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +parser grammar PythonParser; + +options { tokenVocab=PythonLexer; superClass=PythonBaseParser; } + +root + : (single_input + | file_input + | eval_input)? EOF + ; + +// A single interactive statement; +single_input + : LINE_BREAK + | simple_stmt + | compound_stmt LINE_BREAK + ; + +// A module or sequence of commands read from an input file +file_input + : (LINE_BREAK | stmt)+ + ; + +// An input for the eval() and input() functions +eval_input + : testlist LINE_BREAK* + ; + +stmt + : simple_stmt + | compound_stmt + ; + +compound_stmt + : IF cond=test COLON suite elif_clause* else_clause? #if_stmt + | WHILE test COLON suite else_clause? #while_stmt + | ASYNC? FOR exprlist IN testlist COLON suite else_clause? #for_stmt + | TRY COLON suite (except_clause+ else_clause? finally_clause? | finally_clause) #try_stmt + | ASYNC? WITH with_item (COMMA with_item)* COLON suite #with_stmt + | decorator* (classdef | funcdef) #class_or_func_def_stmt + ; + +suite + : simple_stmt + | LINE_BREAK INDENT stmt+ DEDENT + ; + +decorator + : AT dotted_name (OPEN_PAREN arglist? CLOSE_PAREN)? LINE_BREAK + ; + +elif_clause + : ELIF test COLON suite + ; + +else_clause + : ELSE COLON suite + ; + +finally_clause + : FINALLY COLON suite + ; + +with_item + // NB compile.c makes sure that the default except clause is last + : test (AS expr)? + ; + +// Python 2 : EXCEPT test COMMA name +// Python 3 : EXCEPT test AS name +except_clause + : EXCEPT (test ({p.CheckVersion(2)}? COMMA name {p.SetVersion(2);} | {p.CheckVersion(3)}? AS name {p.SetVersion(3);})?)? COLON suite + ; + +classdef + : CLASS name (OPEN_PAREN arglist? CLOSE_PAREN)? COLON suite + ; + +funcdef + : ASYNC? DEF name OPEN_PAREN typedargslist? CLOSE_PAREN (ARROW test)? COLON suite + ; + +// python 3 paramters +// parameters list may have a trailing comma +typedargslist + : (def_parameters COMMA)? (args (COMMA def_parameters)? (COMMA kwargs)? | kwargs) COMMA? + | def_parameters COMMA? + ; + +args + : STAR named_parameter + ; + +kwargs + : POWER named_parameter + ; + +def_parameters + : def_parameter (COMMA def_parameter)* + ; + +// TODO: bare STAR parameter must follow named ones +def_parameter + : named_parameter (ASSIGN test)? + | STAR + ; + +named_parameter + : name (COLON test)? + ; + +simple_stmt + : small_stmt (SEMI_COLON small_stmt)* SEMI_COLON? (LINE_BREAK | EOF) + ; + +// TODO 1: left part augmented assignment should be `test` only, no stars or lists +// TODO 2: semantically annotated declaration is not an assignment +small_stmt + : testlist_star_expr assign_part? #expr_stmt + | {p.CheckVersion(2)}? PRINT ((test (COMMA test)* COMMA?) + | RIGHT_SHIFT test ((COMMA test)+ COMMA?)) {p.SetVersion(2);} #print_stmt // Python 2 + | DEL exprlist #del_stmt + | PASS #pass_stmt + | BREAK #break_stmt + | CONTINUE #continue_stmt + | RETURN testlist? #return_stmt + | RAISE (test (COMMA test (COMMA test)?)?)? (FROM test)? #raise_stmt + | yield_expr #yield_stmt + | IMPORT dotted_as_names #import_stmt + | FROM from_stmt_source IMPORT from_stmt_as_names #from_stmt + | GLOBAL name (COMMA name)* #global_stmt + | {p.CheckVersion(2)}? EXEC expr (IN test (COMMA test)?)? {p.SetVersion(2);} #exec_stmt // Python 2 + | ASSERT test (COMMA test)? #assert_stmt + | {p.CheckVersion(3)}? NONLOCAL name (COMMA name)* {p.SetVersion(3);} #nonlocal_stmt // Python 3 + ; + +from_stmt_source : ((DOT | ELLIPSIS)* dotted_name | (DOT | ELLIPSIS)+) ; +from_stmt_as_names : (STAR | OPEN_PAREN import_as_names CLOSE_PAREN | import_as_names); + +testlist_star_expr + : ((test | star_expr) COMMA)+ (test | star_expr)? + | testlist + ; + +star_expr + : STAR expr + ; + +assign_part + // if left expression in assign is bool literal, it's mean that is Python 2 here + : ASSIGN ( testlist_star_expr (ASSIGN testlist_star_expr)* (ASSIGN yield_expr)? + | yield_expr) + | {p.CheckVersion(3)}? COLON test (ASSIGN testlist)? {p.SetVersion(3);} // annassign Python3 rule + | op=( ADD_ASSIGN + | SUB_ASSIGN + | MULT_ASSIGN + | AT_ASSIGN + | DIV_ASSIGN + | MOD_ASSIGN + | AND_ASSIGN + | OR_ASSIGN + | XOR_ASSIGN + | LEFT_SHIFT_ASSIGN + | RIGHT_SHIFT_ASSIGN + | POWER_ASSIGN + | IDIV_ASSIGN + ) + (yield_expr | testlist) + ; + +exprlist + : expr (COMMA expr)* COMMA? + ; + +import_as_names + : import_as_name (COMMA import_as_name)* COMMA? + ; + +// TODO: that means we can use keyword True as the name here: `from foo import bar as True` -- no +import_as_name + : name (AS name)? + ; + +dotted_as_names + : dotted_as_name (COMMA dotted_as_name)* + ; + +dotted_as_name + : dotted_name (AS name)? + ; + +/* + * Warning! + * According to https://docs.python.org/3/reference/expressions.html#lambda LAMBDA should be followed by + * `parameter_list` (in our case it is `typedargslist`) + * But that's not true! `typedargslist` may have parameters with type hinting, but that's not permitted in lambda + * definition + */ +// https://docs.python.org/3/reference/expressions.html#operator-precedence +test + : logical_test (IF logical_test ELSE test)? + | LAMBDA varargslist? COLON test + ; + +// the same as `typedargslist`, but with no types +varargslist + : (vardef_parameters COMMA)? (varargs (COMMA vardef_parameters)? (COMMA varkwargs)? | varkwargs) COMMA? + | vardef_parameters COMMA? + ; + +vardef_parameters + : vardef_parameter (COMMA vardef_parameter)* + ; + +// TODO: bare STAR parameter must follow named ones +vardef_parameter + : name (ASSIGN test)? + | STAR + ; + +varargs + : STAR name + ; + +varkwargs + : POWER name + ; + +logical_test + : comparison + | NOT logical_test + | logical_test op=AND logical_test + | logical_test op=OR logical_test + ; + +comparison + : comparison (LESS_THAN | GREATER_THAN | EQUALS | GT_EQ | LT_EQ | NOT_EQ_1 | NOT_EQ_2 | optional=NOT? IN | IS optional=NOT?) comparison + | expr + ; + +expr + : AWAIT? atom trailer* + | expr op=POWER expr + | op=(ADD | MINUS | NOT_OP) expr + | expr op=(STAR | DIV | MOD | IDIV | AT) expr + | expr op=(ADD | MINUS) expr + | expr op=(LEFT_SHIFT | RIGHT_SHIFT) expr + | expr op=AND_OP expr + | expr op=XOR expr + | expr op=OR_OP expr + ; + +atom + : OPEN_PAREN (yield_expr | testlist_comp)? CLOSE_PAREN + | OPEN_BRACKET testlist_comp? CLOSE_BRACKET + | OPEN_BRACE dictorsetmaker? CLOSE_BRACE + | REVERSE_QUOTE testlist COMMA? REVERSE_QUOTE + | ELLIPSIS + | name + | PRINT + | EXEC + | MINUS? number + | NONE + | STRING+ + ; + +dictorsetmaker + : (test COLON test | POWER expr) (COMMA (test COLON test | POWER expr))* COMMA? // key_datum_list + | test COLON test comp_for // dict_comprehension + | testlist_comp + ; + +testlist_comp + : (test | star_expr) (comp_for | (COMMA (test | star_expr))* COMMA?) + ; + +testlist + : test (COMMA test)* COMMA? + ; + +dotted_name + : dotted_name DOT name + | name + ; + +name + : NAME + | TRUE + | FALSE + ; + +number + : integer + | IMAG_NUMBER + | FLOAT_NUMBER + ; + +integer + : DECIMAL_INTEGER + | OCT_INTEGER + | HEX_INTEGER + | BIN_INTEGER + ; + +yield_expr + : YIELD yield_arg? + ; + +yield_arg + : FROM test + | testlist + ; + +// TODO: this way we can pass: `f(x for x in i, a)`, but it's invalid. +// See: https://docs.python.org/3/reference/expressions.html#calls +trailer + : DOT name arguments? + | arguments + ; + +arguments + : OPEN_PAREN arglist? CLOSE_PAREN + | OPEN_BRACKET subscriptlist CLOSE_BRACKET + ; + +arglist + // The reason that keywords are test nodes instead of name is that using name + // results in an ambiguity. ast.c makes sure it's a name. + : argument (COMMA argument)* COMMA? + ; + +argument + : test (comp_for | ASSIGN test)? + | (POWER | STAR) test + ; + +// TODO: maybe inline? +subscriptlist + : subscript (COMMA subscript)* COMMA? + ; + +subscript + : ELLIPSIS + | test (COLON test? sliceop?)? + | COLON test? sliceop? + ; + +// TODO: maybe inline? +sliceop + : COLON test? + ; + +comp_for + : FOR exprlist IN logical_test comp_iter? + ; + +comp_iter + : comp_for + | IF test comp_iter? + ; diff --git a/languages/g4/TypeScriptLexer.g4 b/languages/g4/TypeScriptLexer.g4 new file mode 100644 index 0000000000000000000000000000000000000000..29d296acd505cf0a70e72eebed1759fb42e20cf3 --- /dev/null +++ b/languages/g4/TypeScriptLexer.g4 @@ -0,0 +1,707 @@ +lexer grammar TypeScriptLexer; + +channels { ERROR } + +options { + superClass=TypeScriptBaseLexer; +} + + +HashBangLine: { p.IsStartOfFile()}? '#!' ~[\r\n\u2028\u2029]*; // only allowed at start +MultiLineComment: '/*' .*? '*/' -> channel(HIDDEN); +SingleLineComment: '//' ~[\r\n\u2028\u2029]* -> channel(HIDDEN); +RegularExpressionLiteral: '/' RegularExpressionFirstChar RegularExpressionChar* {p.IsRegexPossible()}? '/' IdentifierPart*; + +OpenBracket: '['; +CloseBracket: ']'; +OpenParen: '('; +CloseParen: ')'; +OpenBrace: '{' {l.ProcessOpenBrace();}; +CloseBrace: '}' {l.ProcessCloseBrace();}; +SemiColon: ';'; +Comma: ','; +Assign: '='; +QuestionMark: '?'; +Colon: ':'; +Ellipsis: '...'; +Dot: '.'; +PlusPlus: '++'; +MinusMinus: '--'; +Plus: '+'; +Minus: '-'; +BitNot: '~'; +Not: '!'; +Multiply: '*'; +Lodash: '_'; +Dollar: '$'; +Divide: '/'; +Modulus: '%'; +Power: '**'; +NullCoalesce: '??'; +Hashtag: '#'; +RightShiftArithmetic: '>>'; +LeftShiftArithmetic: '<<'; +RightShiftLogical: '>>>'; +LessThan: '<'; +MoreThan: '>'; +LessThanEquals: '<='; +GreaterThanEquals: '>='; +Equals_: '=='; +NotEquals: '!='; +IdentityEquals: '==='; +IdentityNotEquals: '!=='; +BitAnd: '&'; +BitXOr: '^'; +BitOr: '|'; +And: '&&'; +Or: '||'; +MultiplyAssign: '*='; +DivideAssign: '/='; +ModulusAssign: '%='; +PlusAssign: '+='; +MinusAssign: '-='; +LeftShiftArithmeticAssign: '<<='; +RightShiftArithmeticAssign: '>>='; +RightShiftLogicalAssign: '>>>='; +BitAndAssign: '&='; +BitXorAssign: '^='; +BitOrAssign: '|='; +ARROW: '=>'; +PowerAssign: '**='; + +/// Null Literals + +NullLiteral: 'null'; + +/// Boolean Literals + +BooleanLiteral: 'true' + | 'false'; + +/// Numeric Literals + +DecimalLiteral: DecimalIntegerLiteral '.' [0-9]* ExponentPart? + | '.' [0-9]+ ExponentPart? + | DecimalIntegerLiteral ExponentPart? + ; + +/// Numeric Literals + +HexIntegerLiteral: '0' [xX] HexDigit+; +OctalIntegerLiteral: '0' [0-7]+ {!p.IsStrictMode()}?; +OctalIntegerLiteral2: '0' [oO] [0-7]+; +BinaryIntegerLiteral: '0' [bB] [01]+; + +/// Keywords + +Break: 'break'; +Do: 'do'; +Instanceof: 'instanceof'; +Typeof: 'typeof'; +Case: 'case'; +Else: 'else'; +New: 'new'; +Var: 'var'; +Catch: 'catch'; +Finally: 'finally'; +Return: 'return'; +Void: 'void'; +Continue: 'continue'; +For: 'for'; +Switch: 'switch'; +While: 'while'; +Debugger: 'debugger'; +Function: 'function'; +This: 'this'; +With: 'with'; +Default: 'default'; +If: 'if'; +Throw: 'throw'; +Delete: 'delete'; +In: 'in'; +Try: 'try'; +As: 'as'; +From: 'from'; +ReadOnly: 'readonly'; +Async: 'async'; + +/// Future Reserved Words + +Class: 'class'; +Enum: 'enum'; +Extends: 'extends'; +Super: 'super'; +Const: 'const'; +Export: 'export'; +Import: 'import'; + +Await: 'await'; + +/// The following tokens are also considered to be FutureReservedWords +/// when parsing strict mode + +Implements: 'implements' ; +Let: 'let' ; +Private: 'private' ; +Public: 'public' ; +Interface: 'interface' ; +Package: 'package' ; +Protected: 'protected' ; +Static: 'static' ; +Yield: 'yield' ; + +//keywords: + +ANY : 'any'; +NUMBER: 'number'; +BOOLEAN: 'boolean'; +STRING: 'string'; +SYMBOL: 'symbol'; + + +Type: 'type'; + +Get: 'get '; +Set: 'set '; + +Constructor: 'constructor'; +Namespace: 'namespace'; +Require: 'require'; +Module: 'module'; +Declare: 'declare'; + +Abstract: 'abstract'; + +Is: 'is'; + +// +// Ext.2 Additions to 1.8: Decorators +// +At: '@'; + +/// Identifier Names and Identifiers + +Identifier: IdentifierStart IdentifierPart*; + +/// String Literals +StringLiteral: ('"' DoubleStringCharacter* '"' + | '\'' SingleStringCharacter* '\'') {l.ProcessStringLiteral();} + ; + +TemplateStringLiteral: '`' ('\\`' | ~'`')* '`'; + +WhiteSpaces: [\t\u000B\u000C\u0020\u00A0]+ -> channel(HIDDEN); + +LineTerminator: [\r\n\u2028\u2029] -> channel(HIDDEN); + +/// Comments + + +HtmlComment: '' -> channel(HIDDEN); +CDataComment: '' -> channel(HIDDEN); +UnexpectedCharacter: . -> channel(ERROR); + +// Fragment rules + +fragment DoubleStringCharacter + : ~["\\\r\n] + | '\\' EscapeSequence + | LineContinuation + ; + +fragment SingleStringCharacter + : ~['\\\r\n] + | '\\' EscapeSequence + | LineContinuation + ; + +fragment EscapeSequence + : CharacterEscapeSequence + | '0' // no digit ahead! TODO + | HexEscapeSequence + | UnicodeEscapeSequence + | ExtendedUnicodeEscapeSequence + ; + +fragment CharacterEscapeSequence + : SingleEscapeCharacter + | NonEscapeCharacter + ; + +fragment HexEscapeSequence + : 'x' HexDigit HexDigit + ; + +fragment UnicodeEscapeSequence + : 'u' HexDigit HexDigit HexDigit HexDigit + ; + +fragment ExtendedUnicodeEscapeSequence + : 'u' '{' HexDigit+ '}' + ; + +fragment SingleEscapeCharacter + : ['"\\bfnrtv] + ; + +fragment NonEscapeCharacter + : ~['"\\bfnrtv0-9xu\r\n] + ; + +fragment EscapeCharacter + : SingleEscapeCharacter + | [0-9] + | [xu] + ; + +fragment LineContinuation + : '\\' [\r\n\u2028\u2029] + ; + +fragment HexDigit + : [0-9a-fA-F] + ; + +fragment DecimalIntegerLiteral + : '0' + | [1-9] [0-9]* + ; + +fragment ExponentPart + : [eE] [+-]? [0-9]+ + ; + +fragment IdentifierPart + : IdentifierStart + | UnicodeCombiningMark + | UnicodeDigit + | UnicodeConnectorPunctuation + | '\u200C' + | '\u200D' + ; + +fragment IdentifierStart + : UnicodeLetter + | [$_] + | '\\' UnicodeEscapeSequence + ; + +fragment UnicodeLetter + : [\u0041-\u005A] + | [\u0061-\u007A] + | [\u00AA] + | [\u00B5] + | [\u00BA] + | [\u00C0-\u00D6] + | [\u00D8-\u00F6] + | [\u00F8-\u021F] + | [\u0222-\u0233] + | [\u0250-\u02AD] + | [\u02B0-\u02B8] + | [\u02BB-\u02C1] + | [\u02D0-\u02D1] + | [\u02E0-\u02E4] + | [\u02EE] + | [\u037A] + | [\u0386] + | [\u0388-\u038A] + | [\u038C] + | [\u038E-\u03A1] + | [\u03A3-\u03CE] + | [\u03D0-\u03D7] + | [\u03DA-\u03F3] + | [\u0400-\u0481] + | [\u048C-\u04C4] + | [\u04C7-\u04C8] + | [\u04CB-\u04CC] + | [\u04D0-\u04F5] + | [\u04F8-\u04F9] + | [\u0531-\u0556] + | [\u0559] + | [\u0561-\u0587] + | [\u05D0-\u05EA] + | [\u05F0-\u05F2] + | [\u0621-\u063A] + | [\u0640-\u064A] + | [\u0671-\u06D3] + | [\u06D5] + | [\u06E5-\u06E6] + | [\u06FA-\u06FC] + | [\u0710] + | [\u0712-\u072C] + | [\u0780-\u07A5] + | [\u0905-\u0939] + | [\u093D] + | [\u0950] + | [\u0958-\u0961] + | [\u0985-\u098C] + | [\u098F-\u0990] + | [\u0993-\u09A8] + | [\u09AA-\u09B0] + | [\u09B2] + | [\u09B6-\u09B9] + | [\u09DC-\u09DD] + | [\u09DF-\u09E1] + | [\u09F0-\u09F1] + | [\u0A05-\u0A0A] + | [\u0A0F-\u0A10] + | [\u0A13-\u0A28] + | [\u0A2A-\u0A30] + | [\u0A32-\u0A33] + | [\u0A35-\u0A36] + | [\u0A38-\u0A39] + | [\u0A59-\u0A5C] + | [\u0A5E] + | [\u0A72-\u0A74] + | [\u0A85-\u0A8B] + | [\u0A8D] + | [\u0A8F-\u0A91] + | [\u0A93-\u0AA8] + | [\u0AAA-\u0AB0] + | [\u0AB2-\u0AB3] + | [\u0AB5-\u0AB9] + | [\u0ABD] + | [\u0AD0] + | [\u0AE0] + | [\u0B05-\u0B0C] + | [\u0B0F-\u0B10] + | [\u0B13-\u0B28] + | [\u0B2A-\u0B30] + | [\u0B32-\u0B33] + | [\u0B36-\u0B39] + | [\u0B3D] + | [\u0B5C-\u0B5D] + | [\u0B5F-\u0B61] + | [\u0B85-\u0B8A] + | [\u0B8E-\u0B90] + | [\u0B92-\u0B95] + | [\u0B99-\u0B9A] + | [\u0B9C] + | [\u0B9E-\u0B9F] + | [\u0BA3-\u0BA4] + | [\u0BA8-\u0BAA] + | [\u0BAE-\u0BB5] + | [\u0BB7-\u0BB9] + | [\u0C05-\u0C0C] + | [\u0C0E-\u0C10] + | [\u0C12-\u0C28] + | [\u0C2A-\u0C33] + | [\u0C35-\u0C39] + | [\u0C60-\u0C61] + | [\u0C85-\u0C8C] + | [\u0C8E-\u0C90] + | [\u0C92-\u0CA8] + | [\u0CAA-\u0CB3] + | [\u0CB5-\u0CB9] + | [\u0CDE] + | [\u0CE0-\u0CE1] + | [\u0D05-\u0D0C] + | [\u0D0E-\u0D10] + | [\u0D12-\u0D28] + | [\u0D2A-\u0D39] + | [\u0D60-\u0D61] + | [\u0D85-\u0D96] + | [\u0D9A-\u0DB1] + | [\u0DB3-\u0DBB] + | [\u0DBD] + | [\u0DC0-\u0DC6] + | [\u0E01-\u0E30] + | [\u0E32-\u0E33] + | [\u0E40-\u0E46] + | [\u0E81-\u0E82] + | [\u0E84] + | [\u0E87-\u0E88] + | [\u0E8A] + | [\u0E8D] + | [\u0E94-\u0E97] + | [\u0E99-\u0E9F] + | [\u0EA1-\u0EA3] + | [\u0EA5] + | [\u0EA7] + | [\u0EAA-\u0EAB] + | [\u0EAD-\u0EB0] + | [\u0EB2-\u0EB3] + | [\u0EBD-\u0EC4] + | [\u0EC6] + | [\u0EDC-\u0EDD] + | [\u0F00] + | [\u0F40-\u0F6A] + | [\u0F88-\u0F8B] + | [\u1000-\u1021] + | [\u1023-\u1027] + | [\u1029-\u102A] + | [\u1050-\u1055] + | [\u10A0-\u10C5] + | [\u10D0-\u10F6] + | [\u1100-\u1159] + | [\u115F-\u11A2] + | [\u11A8-\u11F9] + | [\u1200-\u1206] + | [\u1208-\u1246] + | [\u1248] + | [\u124A-\u124D] + | [\u1250-\u1256] + | [\u1258] + | [\u125A-\u125D] + | [\u1260-\u1286] + | [\u1288] + | [\u128A-\u128D] + | [\u1290-\u12AE] + | [\u12B0] + | [\u12B2-\u12B5] + | [\u12B8-\u12BE] + | [\u12C0] + | [\u12C2-\u12C5] + | [\u12C8-\u12CE] + | [\u12D0-\u12D6] + | [\u12D8-\u12EE] + | [\u12F0-\u130E] + | [\u1310] + | [\u1312-\u1315] + | [\u1318-\u131E] + | [\u1320-\u1346] + | [\u1348-\u135A] + | [\u13A0-\u13B0] + | [\u13B1-\u13F4] + | [\u1401-\u1676] + | [\u1681-\u169A] + | [\u16A0-\u16EA] + | [\u1780-\u17B3] + | [\u1820-\u1877] + | [\u1880-\u18A8] + | [\u1E00-\u1E9B] + | [\u1EA0-\u1EE0] + | [\u1EE1-\u1EF9] + | [\u1F00-\u1F15] + | [\u1F18-\u1F1D] + | [\u1F20-\u1F39] + | [\u1F3A-\u1F45] + | [\u1F48-\u1F4D] + | [\u1F50-\u1F57] + | [\u1F59] + | [\u1F5B] + | [\u1F5D] + | [\u1F5F-\u1F7D] + | [\u1F80-\u1FB4] + | [\u1FB6-\u1FBC] + | [\u1FBE] + | [\u1FC2-\u1FC4] + | [\u1FC6-\u1FCC] + | [\u1FD0-\u1FD3] + | [\u1FD6-\u1FDB] + | [\u1FE0-\u1FEC] + | [\u1FF2-\u1FF4] + | [\u1FF6-\u1FFC] + | [\u207F] + | [\u2102] + | [\u2107] + | [\u210A-\u2113] + | [\u2115] + | [\u2119-\u211D] + | [\u2124] + | [\u2126] + | [\u2128] + | [\u212A-\u212D] + | [\u212F-\u2131] + | [\u2133-\u2139] + | [\u2160-\u2183] + | [\u3005-\u3007] + | [\u3021-\u3029] + | [\u3031-\u3035] + | [\u3038-\u303A] + | [\u3041-\u3094] + | [\u309D-\u309E] + | [\u30A1-\u30FA] + | [\u30FC-\u30FE] + | [\u3105-\u312C] + | [\u3131-\u318E] + | [\u31A0-\u31B7] + | [\u3400-\u4DBF] + | [\u4E00-\u9FFF] + | [\uA000-\uA48C] + | [\uAC00] + | [\uD7A3] + | [\uF900-\uFA2D] + | [\uFB00-\uFB06] + | [\uFB13-\uFB17] + | [\uFB1D] + | [\uFB1F-\uFB28] + | [\uFB2A-\uFB36] + | [\uFB38-\uFB3C] + | [\uFB3E] + | [\uFB40-\uFB41] + | [\uFB43-\uFB44] + | [\uFB46-\uFBB1] + | [\uFBD3-\uFD3D] + | [\uFD50-\uFD8F] + | [\uFD92-\uFDC7] + | [\uFDF0-\uFDFB] + | [\uFE70-\uFE72] + | [\uFE74] + | [\uFE76-\uFEFC] + | [\uFF21-\uFF3A] + | [\uFF41-\uFF5A] + | [\uFF66-\uFFBE] + | [\uFFC2-\uFFC7] + | [\uFFCA-\uFFCF] + | [\uFFD2-\uFFD7] + | [\uFFDA-\uFFDC] + ; + +fragment UnicodeCombiningMark + : [\u0300-\u034E] + | [\u0360-\u0362] + | [\u0483-\u0486] + | [\u0591-\u05A1] + | [\u05A3-\u05B9] + | [\u05BB-\u05BD] + | [\u05BF] + | [\u05C1-\u05C2] + | [\u05C4] + | [\u064B-\u0655] + | [\u0670] + | [\u06D6-\u06DC] + | [\u06DF-\u06E4] + | [\u06E7-\u06E8] + | [\u06EA-\u06ED] + | [\u0711] + | [\u0730-\u074A] + | [\u07A6-\u07B0] + | [\u0901-\u0903] + | [\u093C] + | [\u093E-\u094D] + | [\u0951-\u0954] + | [\u0962-\u0963] + | [\u0981-\u0983] + | [\u09BC-\u09C4] + | [\u09C7-\u09C8] + | [\u09CB-\u09CD] + | [\u09D7] + | [\u09E2-\u09E3] + | [\u0A02] + | [\u0A3C] + | [\u0A3E-\u0A42] + | [\u0A47-\u0A48] + | [\u0A4B-\u0A4D] + | [\u0A70-\u0A71] + | [\u0A81-\u0A83] + | [\u0ABC] + | [\u0ABE-\u0AC5] + | [\u0AC7-\u0AC9] + | [\u0ACB-\u0ACD] + | [\u0B01-\u0B03] + | [\u0B3C] + | [\u0B3E-\u0B43] + | [\u0B47-\u0B48] + | [\u0B4B-\u0B4D] + | [\u0B56-\u0B57] + | [\u0B82-\u0B83] + | [\u0BBE-\u0BC2] + | [\u0BC6-\u0BC8] + | [\u0BCA-\u0BCD] + | [\u0BD7] + | [\u0C01-\u0C03] + | [\u0C3E-\u0C44] + | [\u0C46-\u0C48] + | [\u0C4A-\u0C4D] + | [\u0C55-\u0C56] + | [\u0C82-\u0C83] + | [\u0CBE-\u0CC4] + | [\u0CC6-\u0CC8] + | [\u0CCA-\u0CCD] + | [\u0CD5-\u0CD6] + | [\u0D02-\u0D03] + | [\u0D3E-\u0D43] + | [\u0D46-\u0D48] + | [\u0D4A-\u0D4D] + | [\u0D57] + | [\u0D82-\u0D83] + | [\u0DCA] + | [\u0DCF-\u0DD4] + | [\u0DD6] + | [\u0DD8-\u0DDF] + | [\u0DF2-\u0DF3] + | [\u0E31] + | [\u0E34-\u0E3A] + | [\u0E47-\u0E4E] + | [\u0EB1] + | [\u0EB4-\u0EB9] + | [\u0EBB-\u0EBC] + | [\u0EC8-\u0ECD] + | [\u0F18-\u0F19] + | [\u0F35] + | [\u0F37] + | [\u0F39] + | [\u0F3E-\u0F3F] + | [\u0F71-\u0F84] + | [\u0F86-\u0F87] + | [\u0F90-\u0F97] + | [\u0F99-\u0FBC] + | [\u0FC6] + | [\u102C-\u1032] + | [\u1036-\u1039] + | [\u1056-\u1059] + | [\u17B4-\u17D3] + | [\u18A9] + | [\u20D0-\u20DC] + | [\u20E1] + | [\u302A-\u302F] + | [\u3099-\u309A] + | [\uFB1E] + | [\uFE20-\uFE23] + ; + +fragment UnicodeDigit + : [\u0030-\u0039] + | [\u0660-\u0669] + | [\u06F0-\u06F9] + | [\u0966-\u096F] + | [\u09E6-\u09EF] + | [\u0A66-\u0A6F] + | [\u0AE6-\u0AEF] + | [\u0B66-\u0B6F] + | [\u0BE7-\u0BEF] + | [\u0C66-\u0C6F] + | [\u0CE6-\u0CEF] + | [\u0D66-\u0D6F] + | [\u0E50-\u0E59] + | [\u0ED0-\u0ED9] + | [\u0F20-\u0F29] + | [\u1040-\u1049] + | [\u1369-\u1371] + | [\u17E0-\u17E9] + | [\u1810-\u1819] + | [\uFF10-\uFF19] + ; + +fragment UnicodeConnectorPunctuation + : [\u005F] + | [\u203F-\u2040] + | [\u30FB] + | [\uFE33-\uFE34] + | [\uFE4D-\uFE4F] + | [\uFF3F] + | [\uFF65] + ; + +fragment RegularExpressionFirstChar + : ~[*\r\n\u2028\u2029\\/[] + | RegularExpressionBackslashSequence + | '[' RegularExpressionClassChar* ']' + ; + +fragment RegularExpressionChar + : ~[\r\n\u2028\u2029\\/[] + | RegularExpressionBackslashSequence + | '[' RegularExpressionClassChar* ']' + ; + +fragment RegularExpressionClassChar + : ~[\r\n\u2028\u2029\]\\] + | RegularExpressionBackslashSequence + ; + +fragment RegularExpressionBackslashSequence + : '\\' ~[\r\n\u2028\u2029] + ; + diff --git a/languages/g4/TypeScriptLexer.tokens b/languages/g4/TypeScriptLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..64e7e7ca3af11c442acdcce28ca3070682075e69 --- /dev/null +++ b/languages/g4/TypeScriptLexer.tokens @@ -0,0 +1,258 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Lodash=25 +Dollar=26 +Divide=27 +Modulus=28 +Power=29 +NullCoalesce=30 +Hashtag=31 +RightShiftArithmetic=32 +LeftShiftArithmetic=33 +RightShiftLogical=34 +LessThan=35 +MoreThan=36 +LessThanEquals=37 +GreaterThanEquals=38 +Equals_=39 +NotEquals=40 +IdentityEquals=41 +IdentityNotEquals=42 +BitAnd=43 +BitXOr=44 +BitOr=45 +And=46 +Or=47 +MultiplyAssign=48 +DivideAssign=49 +ModulusAssign=50 +PlusAssign=51 +MinusAssign=52 +LeftShiftArithmeticAssign=53 +RightShiftArithmeticAssign=54 +RightShiftLogicalAssign=55 +BitAndAssign=56 +BitXorAssign=57 +BitOrAssign=58 +ARROW=59 +PowerAssign=60 +NullLiteral=61 +BooleanLiteral=62 +DecimalLiteral=63 +HexIntegerLiteral=64 +OctalIntegerLiteral=65 +OctalIntegerLiteral2=66 +BinaryIntegerLiteral=67 +Break=68 +Do=69 +Instanceof=70 +Typeof=71 +Case=72 +Else=73 +New=74 +Var=75 +Catch=76 +Finally=77 +Return=78 +Void=79 +Continue=80 +For=81 +Switch=82 +While=83 +Debugger=84 +Function=85 +This=86 +With=87 +Default=88 +If=89 +Throw=90 +Delete=91 +In=92 +Try=93 +As=94 +From=95 +ReadOnly=96 +Async=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Await=105 +Implements=106 +Let=107 +Private=108 +Public=109 +Interface=110 +Package=111 +Protected=112 +Static=113 +Yield=114 +ANY=115 +NUMBER=116 +BOOLEAN=117 +STRING=118 +SYMBOL=119 +Type=120 +Get=121 +Set=122 +Constructor=123 +Namespace=124 +Require=125 +Module=126 +Declare=127 +Abstract=128 +Is=129 +At=130 +Identifier=131 +StringLiteral=132 +TemplateStringLiteral=133 +WhiteSpaces=134 +LineTerminator=135 +HtmlComment=136 +CDataComment=137 +UnexpectedCharacter=138 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'_'=25 +'$'=26 +'/'=27 +'%'=28 +'**'=29 +'??'=30 +'#'=31 +'>>'=32 +'<<'=33 +'>>>'=34 +'<'=35 +'>'=36 +'<='=37 +'>='=38 +'=='=39 +'!='=40 +'==='=41 +'!=='=42 +'&'=43 +'^'=44 +'|'=45 +'&&'=46 +'||'=47 +'*='=48 +'/='=49 +'%='=50 +'+='=51 +'-='=52 +'<<='=53 +'>>='=54 +'>>>='=55 +'&='=56 +'^='=57 +'|='=58 +'=>'=59 +'**='=60 +'null'=61 +'break'=68 +'do'=69 +'instanceof'=70 +'typeof'=71 +'case'=72 +'else'=73 +'new'=74 +'var'=75 +'catch'=76 +'finally'=77 +'return'=78 +'void'=79 +'continue'=80 +'for'=81 +'switch'=82 +'while'=83 +'debugger'=84 +'function'=85 +'this'=86 +'with'=87 +'default'=88 +'if'=89 +'throw'=90 +'delete'=91 +'in'=92 +'try'=93 +'as'=94 +'from'=95 +'readonly'=96 +'async'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'await'=105 +'implements'=106 +'let'=107 +'private'=108 +'public'=109 +'interface'=110 +'package'=111 +'protected'=112 +'static'=113 +'yield'=114 +'any'=115 +'number'=116 +'boolean'=117 +'string'=118 +'symbol'=119 +'type'=120 +'get '=121 +'set '=122 +'constructor'=123 +'namespace'=124 +'require'=125 +'module'=126 +'declare'=127 +'abstract'=128 +'is'=129 +'@'=130 diff --git a/languages/g4/TypeScriptParser.g4 b/languages/g4/TypeScriptParser.g4 new file mode 100644 index 0000000000000000000000000000000000000000..92c92e5e70759e471995f73435c37d8c15c6e858 --- /dev/null +++ b/languages/g4/TypeScriptParser.g4 @@ -0,0 +1,839 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp) + * Copyright (c) 2017 by Ivan Kochurkin (Positive Technologies): + added ECMAScript 6 support, cleared and transformed to the universal grammar. + * Copyright (c) 2018 by Juan Alvarez (contributor -> ported to Go) + * Copyright (c) 2019 by Andrii Artiushok (contributor -> added TypeScript support) + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +parser grammar TypeScriptParser; + +options { + tokenVocab=TypeScriptLexer; + superClass=TypeScriptBaseParser; +} + +// SupportSyntax + +initializer + : '=' singleExpression + ; + +bindingPattern + : (arrayLiteral | objectLiteral) + ; + +// TypeScript SPart +// A.1 Types + +typeParameters + : '<' typeParameterList? '>' + ; + +typeParameterList + : typeParameter (',' typeParameter)* + ; + +typeParameter + : Identifier constraint? + | typeParameters + ; + +constraint + : 'extends' type_ + ; + +typeArguments + : '<' typeArgumentList? '>' + ; + +typeArgumentList + : typeArgument (',' typeArgument)* + ; + +typeArgument + : type_ + ; + +type_ + : unionOrIntersectionOrPrimaryType + | functionType + | constructorType + | typeGeneric + | StringLiteral + ; + +unionOrIntersectionOrPrimaryType + : unionOrIntersectionOrPrimaryType '|' unionOrIntersectionOrPrimaryType #Union + | unionOrIntersectionOrPrimaryType '&' unionOrIntersectionOrPrimaryType #Intersection + | primaryType #Primary + ; + +primaryType + : '(' type_ ')' #ParenthesizedPrimType + | predefinedType #PredefinedPrimType + | typeReference #ReferencePrimType + | objectType #ObjectPrimType + | primaryType {p.notLineTerminator()}? '[' ']' #ArrayPrimType + | '[' tupleElementTypes ']' #TuplePrimType + | typeQuery #QueryPrimType + | This #ThisPrimType + | typeReference Is primaryType #RedefinitionOfType + ; + +predefinedType + : ANY + | NUMBER + | BOOLEAN + | STRING + | SYMBOL + | Void + ; + +typeReference + : typeName ( typeIncludeGeneric | typeGeneric)? + ; + +// I tried recursive include, but it's not working. +// typeGeneric +// : '<' typeArgumentList typeGeneric?'>' +// ; +// +// TODO: Fix recursive +// +typeGeneric + : '<' typeArgumentList '>' + ; + +typeIncludeGeneric + :'<' typeArgumentList '<' typeArgumentList ('>' bindingPattern '>' | '>>') + ; + +typeName + : Identifier + | namespaceName + ; + +objectType + : '{' typeBody? '}' + ; + +typeBody + : typeMemberList (SemiColon | ',')? + ; + +typeMemberList + : typeMember ((SemiColon | ',') typeMember)* + ; + +typeMember + : propertySignature + | callSignature + | constructSignature + | indexSignature + | methodSignature ('=>' type_)? + ; + +arrayType + : primaryType {p.notLineTerminator()}? '[' ']' + ; + +tupleType + : '[' tupleElementTypes ']' + ; + +tupleElementTypes + : type_ (',' type_)* + ; + +functionType + : typeParameters? '(' parameterList? ')' '=>' type_ + ; + +constructorType + : 'new' typeParameters? '(' parameterList? ')' '=>' type_ + ; + +typeQuery + : 'typeof' typeQueryExpression + ; + +typeQueryExpression + : Identifier + | (identifierName '.')+ identifierName + ; + +propertySignature + : ReadOnly? propertyName '?'? typeAnnotation? ('=>' type_)? + ; + +typeAnnotation + : ':' type_ + ; + +callSignature + : typeParameters? '(' parameterList? ')' typeAnnotation? + ; + +parameterList + : restParameter + | predefinedType (',' predefinedType)* + | optionalParameterList (',' restParameter)? + | requiredParameterList (',' (optionalParameterList (',' restParameter)? | restParameter))? + ; + +requiredParameterList + : requiredParameter (',' requiredParameter)* + ; + +requiredParameter + : decoratorList? accessibilityModifier? identifierOrPattern typeAnnotation? + ; + +accessibilityModifier + : Public + | Private + | Protected + ; + +identifierOrPattern + : identifierName + | bindingPattern + ; + +optionalParameterList + : optionalParameter (',' optionalParameter)* + ; + +optionalParameter + : decoratorList? ( accessibilityModifier? identifierOrPattern ('?' typeAnnotation? | typeAnnotation? initializer)) + ; + +// todo: align typescript grammers +restParameter + : '...' requiredParameter + | '...' singleExpression + ; + +constructSignature + : 'new' typeParameters? '(' parameterList? ')' typeAnnotation? + ; + +indexSignature + : '[' Identifier ':' (NUMBER|STRING) ']' typeAnnotation + ; + +methodSignature + : propertyName '?'? callSignature + ; + +typeAliasDeclaration + : 'type' Identifier typeParameters? '=' type_ SemiColon + ; + +constructorDeclaration + : accessibilityModifier? Constructor '(' formalParameterList? ')' ( ('{' functionBody '}') | SemiColon)? + ; + +// A.5 Interface + +interfaceDeclaration + : Export? Interface Identifier typeParameters? interfaceExtendsClause? objectType SemiColon? + ; + +interfaceExtendsClause + : Extends classOrInterfaceTypeList + ; + +classOrInterfaceTypeList + : typeReference (',' typeReference)* + ; + +// A.7 Interface + +enumDeclaration + : Const? Enum Identifier '{' enumBody? '}' + ; + +enumBody + : enumMemberList ','? + ; + +enumMemberList + : enumMember (',' enumMember)* + ; + +enumMember + : propertyName ('=' singleExpression)? + ; + +// A.8 Namespaces + +namespaceDeclaration + : Namespace namespaceName '{' statementList? '}' + ; + +namespaceName + : Identifier ('.'+ Identifier)* + ; + +importAliasDeclaration + : Identifier '=' namespaceName SemiColon + | Identifier '=' 'require' '(' StringLiteral ')' SemiColon + ; + +importAll + : StringLiteral + ; + +// Ext.2 Additions to 1.8: Decorators + +decoratorList + : decorator+ ; + +decorator + : '@' (decoratorMemberExpression | decoratorCallExpression) + ; + +decoratorMemberExpression + : Identifier + | decoratorMemberExpression '.' identifierName + | '(' singleExpression ')' + ; + +decoratorCallExpression + : decoratorMemberExpression arguments; + +// ECMAPart +program + : sourceElements? EOF + ; + +sourceElement + : Export? statement + ; + +statement + : block + | variableStatement + | importStatement + | exportStatement + | emptyStatement_ + | abstractDeclaration //ADDED + | classDeclaration + | interfaceDeclaration //ADDED + | namespaceDeclaration //ADDED + | ifStatement + | iterationStatement + | continueStatement + | breakStatement + | returnStatement + | yieldStatement + | withStatement + | labelledStatement + | switchStatement + | throwStatement + | tryStatement + | debuggerStatement + | functionDeclaration + | arrowFunctionDeclaration + | generatorFunctionDeclaration + | typeAliasDeclaration //ADDED + | enumDeclaration //ADDED + | expressionStatement + | Export statement + ; + +block + : '{' statementList? '}' + ; + +statementList + : statement+ + ; + +abstractDeclaration + : Abstract (Identifier callSignature | variableStatement) eos + ; + +importStatement + : Import (importFromBlock | importAliasDeclaration | importAll) eos + ; + +importFromBlock + : (Dollar | Lodash | Multiply | multipleImportStatement | identifierName) (As identifierName)? From StringLiteral + ; + +multipleImportStatement + : (identifierName ',')? '{' identifierName (',' identifierName)* '}' + ; + +exportStatement + : Export Default? (importFromBlock | statement) + ; + +variableStatement + : bindingPattern typeAnnotation? initializer SemiColon? + | accessibilityModifier? varModifier? ReadOnly? variableDeclarationList SemiColon? + ; + +variableDeclarationList + : variableDeclaration (',' variableDeclaration)* + ; + +variableDeclaration + : assignable typeAnnotation? singleExpression? ('=' typeParameters? singleExpression)? // ECMAScript 6: Array & Object Matching + ; + +emptyStatement_ + : SemiColon + ; + +expressionStatement + : {p.notOpenBraceAndNotFunction()}? expressionSequence SemiColon? + ; + +ifStatement + : If '(' expressionSequence ')' statement (Else statement)? + ; + + +iterationStatement + : Do statement While '(' expressionSequence ')' eos # DoStatement + | While '(' expressionSequence ')' statement # WhileStatement + | For '(' expressionSequence? SemiColon expressionSequence? SemiColon expressionSequence? ')' statement # ForStatement + | For '(' varModifier variableDeclarationList SemiColon expressionSequence? SemiColon expressionSequence? ')' +statement # ForVarStatement + | For Await? '(' singleExpression (In | Identifier{p.p("of")}?) expressionSequence ')' statement # ForInStatement + | For Await? '(' varModifier variableDeclaration (In | Identifier{p.p("of")}?) expressionSequence ')' statement # ForVarInStatement + // strange, 'of' is an identifier. and p.p("of") not work in sometime. + ; + +varModifier + : Var + | Let + | Const + ; + +continueStatement + : Continue ({p.notLineTerminator()}? Identifier)? eos + ; + +breakStatement + : Break ({p.notLineTerminator()}? Identifier)? eos + ; + +returnStatement + : Return ({p.notLineTerminator()}? expressionSequence)? eos + ; + +yieldStatement + : Yield ({p.notLineTerminator()}? expressionSequence)? eos + ; + +withStatement + : With '(' expressionSequence ')' statement + ; + +switchStatement + : Switch '(' expressionSequence ')' caseBlock + ; + +caseBlock + : '{' caseClauses? (defaultClause caseClauses?)? '}' + ; + +caseClauses + : caseClause+ + ; + +caseClause + : Case expressionSequence ':' statementList? + ; + +defaultClause + : Default ':' statementList? + ; + +labelledStatement + : Identifier ':' statement + ; + +throwStatement + : Throw {p.notLineTerminator()}? expressionSequence eos + ; + +tryStatement + : Try block (catchProduction finallyProduction? | finallyProduction) + ; + +catchProduction + : Catch ('(' assignable? ')')? block + ; + +assignable + : Identifier + | arrayLiteral + | objectLiteral + ; + +finallyProduction + : Finally block + ; + +debuggerStatement + : Debugger eos + ; + +functionDeclaration + : Async? Function '*'? Identifier callSignature ( ('{' functionBody '}') | SemiColon) + ; + +//Ovveride ECMA +classDeclaration + : Abstract? Class Identifier typeParameters? classHeritage classTail + ; + +classHeritage + : classExtendsClause? implementsClause? + ; + +classTail + : '{' classElement* '}' + ; + +classExtendsClause + : Extends typeReference + ; + +implementsClause + : Implements classOrInterfaceTypeList + ; + +// Classes modified +classElement + : constructorDeclaration + | propertyMemberDeclaration + | indexMemberDeclaration + | statement + ; + +propertyMemberDeclaration + : propertyMemberBase '*'? '#'? propertyName typeAnnotation? initializer? SemiColon + | propertyMemberBase '*'? '#'? propertyName callSignature ( ('{' functionBody '}') | SemiColon) + | propertyMemberBase '*'? '#'? (getAccessor | setAccessor) + | abstractDeclaration + ; + +propertyMemberBase + : Async? accessibilityModifier? Static? ReadOnly? + ; + +indexMemberDeclaration + : indexSignature SemiColon + ; + +generatorMethod + : '*'? Identifier '(' formalParameterList? ')' '{' functionBody '}' + ; + +generatorFunctionDeclaration + : Function '*' Identifier? '(' formalParameterList? ')' '{' functionBody '}' + ; + +generatorBlock + : '{' generatorDefinition (',' generatorDefinition)* ','? '}' + ; + +generatorDefinition + : '*' iteratorDefinition + ; + +iteratorBlock + : '{' iteratorDefinition (',' iteratorDefinition)* ','? '}' + ; + +iteratorDefinition + : '[' singleExpression ']' '(' formalParameterList? ')' '{' functionBody '}' + ; + +formalParameterList + : formalParameterArg (',' formalParameterArg)* (',' lastFormalParameterArg)? + | lastFormalParameterArg + | arrayLiteral // ECMAScript 6: Parameter Context Matching + | objectLiteral (':' formalParameterList)? // ECMAScript 6: Parameter Context Matching + ; + +formalParameterArg + : accessibilityModifier? Identifier typeAnnotation? ('=' singleExpression)? // ECMAScript 6: Initialization + ; + +lastFormalParameterArg // ECMAScript 6: Rest Parameter + : Ellipsis Identifier + ; + +functionBody + : sourceElements? + ; + +sourceElements + : sourceElement+ + ; + +arrayLiteral + : ('[' elementList? ']') + ; + +elementList + : singleExpression (','+ singleExpression)* (','+ lastElement)? + | lastElement + ; + +lastElement // ECMAScript 6: Spread Operator + : Ellipsis (Identifier | singleExpression) + ; + +objectLiteral + : '{' (propertyAssignment (',' propertyAssignment)*)? ','? '}' + ; + +// MODIFIED +propertyAssignment + : propertyName (':' |'=') singleExpression # PropertyExpressionAssignment + | '[' singleExpression ']' ':' singleExpression # ComputedPropertyExpressionAssignment + | Async? '*'? propertyName '(' formalParameterList? ')' '{' functionBody '}' # FunctionProperty + | getAccessor # PropertyGetter + | setAccessor # PropertySetter + | generatorMethod # MethodProperty + | Identifier # PropertyShorthand + | restParameter # RestParameterInObject + ; + +getAccessor + : getter '(' ')' typeAnnotation? '{' functionBody '}' + ; + +setAccessor + : setter '(' ( Identifier | bindingPattern) typeAnnotation? ')' '{' functionBody '}' + ; + +propertyName + : identifierName + | StringLiteral + | numericLiteral + | '[' singleExpression ']' + ; + +arguments + : '('(singleExpression (',' singleExpression)* (',' lastArgument)? | lastArgument)?')' + ; + +lastArgument // ECMAScript 6: Spread Operator + : Ellipsis Identifier + ; + +expressionSequence + : singleExpression (',' singleExpression)* ','? + ; + +functionExpressionDeclaration + : Async? Function Identifier? '(' formalParameterList? ')' typeAnnotation? '{' functionBody '}' + ; + +singleExpression + : functionExpressionDeclaration # FunctionExpression + | arrowFunctionDeclaration # ArrowFunctionExpression // ECMAScript 6 + | Class Identifier? classTail # ClassExpression + | singleExpression '[' expressionSequence ']' # MemberIndexExpression + | singleExpression '?'? '.' '#'? identifierName # MemberDotExpression + | singleExpression arguments # ArgumentsExpression + | New singleExpression typeArguments? arguments? # NewExpression + | singleExpression {p.notLineTerminator()}? '++' # PostIncrementExpression + | singleExpression {p.notLineTerminator()}? '--' # PostDecreaseExpression + | Delete singleExpression # DeleteExpression + | Void singleExpression # VoidExpression + | Typeof singleExpression # TypeofExpression + | '++' singleExpression # PreIncrementExpression + | '--' singleExpression # PreDecreaseExpression + | '+' singleExpression # UnaryPlusExpression + | '-' singleExpression # UnaryMinusExpression + | '~' singleExpression # BitNotExpression + | '!' singleExpression # NotExpression + | Await singleExpression # AwaitExpression + | singleExpression '**' singleExpression # PowerExpression + | singleExpression ('*' | '/' | '%') singleExpression # MultiplicativeExpression + | singleExpression ('+' | '-') singleExpression # AdditiveExpression + | singleExpression ('<<' | '>>' | '>>>') singleExpression # BitShiftExpression + | singleExpression ('<' | '>' | '<=' | '>=') singleExpression # RelationalExpression + | singleExpression Instanceof singleExpression # InstanceofExpression + | singleExpression In singleExpression # InExpression + | singleExpression ('==' | '!=' | '===' | '!==') singleExpression # EqualityExpression + | singleExpression '&' singleExpression # BitAndExpression + | singleExpression '^' singleExpression # BitXOrExpression + | singleExpression '|' singleExpression # BitOrExpression + | singleExpression '&&' singleExpression # LogicalAndExpression + | singleExpression '||' singleExpression # LogicalOrExpression + | singleExpression '?' singleExpression ':' singleExpression # TernaryExpression + | singleExpression '??' singleExpression # CoalesceExpression + | singleExpression '=' singleExpression # AssignmentExpression + | singleExpression assignmentOperator singleExpression # AssignmentOperatorExpression + | singleExpression TemplateStringLiteral # TemplateStringExpression // ECMAScript 6 + | iteratorBlock # IteratorsExpression // ECMAScript 6 + | generatorBlock # GeneratorsExpression // ECMAScript 6 + | generatorFunctionDeclaration # GeneratorsFunctionExpression // ECMAScript 6 + | yieldStatement # YieldExpression // ECMAScript 6 + | This # ThisExpression + | identifierName singleExpression? # IdentifierExpression + | Super # SuperExpression + | literal # LiteralExpression + | arrayLiteral # ArrayLiteralExpression + | objectLiteral # ObjectLiteralExpression + | '(' expressionSequence ')' # ParenthesizedExpression + | typeArguments expressionSequence? # GenericTypes + ; + +arrowFunctionDeclaration + : Async? arrowFunctionParameters typeAnnotation? '=>' arrowFunctionBody + ; + +arrowFunctionParameters + : Identifier + | '(' formalParameterList? ')' + ; + +arrowFunctionBody + : singleExpression + | '{' functionBody '}' + ; + +assignmentOperator + : '*=' + | '/=' + | '%=' + | '+=' + | '-=' + | '<<=' + | '>>=' + | '>>>=' + | '&=' + | '^=' + | '|=' + | '**=' + ; + +literal + : NullLiteral + | BooleanLiteral + | StringLiteral + | TemplateStringLiteral + | RegularExpressionLiteral + | numericLiteral + ; + +numericLiteral + : DecimalLiteral + | HexIntegerLiteral + | OctalIntegerLiteral + | OctalIntegerLiteral2 + | BinaryIntegerLiteral + ; + +identifierName + : Identifier + | reservedWord + ; + +reservedWord + : keyword + | NullLiteral + | BooleanLiteral + ; + +keyword + : Break + | Do + | Instanceof + | Typeof + | Case + | Else + | New + | Var + | Catch + | Finally + | Return + | Void + | Continue + | For + | Switch + | While + | Debugger + | Function + | This + | With + | Default + | If + | Throw + | Delete + | In + | Try + | ReadOnly + | Async + | From + + | Class + | Enum + | Extends + | Super + | Const + | Export + | Import + | Implements + | Let + | Private + | Public + | Interface + | Package + | Protected + | Static + | Yield + | Await + | From + | As + ; + +getter + : Identifier{p.p("get")}? propertyName + ; + +setter + : Identifier{p.p("set")}? propertyName + ; + +eos + : SemiColon + | EOF + | {p.lineTerminatorAhead()}? + | {p.closeBrace()}? + ; \ No newline at end of file diff --git a/languages/go/go_parser_base.go.future b/languages/go/go_parser_base.go.future new file mode 100644 index 0000000000000000000000000000000000000000..efaf59cd886b4679654f2e6a48d498241e415efa --- /dev/null +++ b/languages/go/go_parser_base.go.future @@ -0,0 +1,90 @@ +package GoParseTree + +import ( + "strings" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// GoParserBase implementation. +type GoParserBase struct { + *antlr.BaseParser +} + +// Returns true if on the current index of the parser's +// token stream a token exists on the Hidden channel which +// either is a line terminator, or is a multi line comment that +// contains a line terminator. +func (p *GoParserBase) lineTerminatorAhead() bool { + // Get the token ahead of the current index. + possibleIndexEosToken := p.GetCurrentToken().GetTokenIndex() - 1 + ahead := p.GetTokenStream().Get(possibleIndexEosToken) + + if ahead.GetChannel() != antlr.LexerHidden { + // We're only interested in tokens on the HIDDEN channel. + return true + } + + if ahead.GetTokenType() == GoParserTERMINATOR { + // There is definitely a line terminator ahead. + return true + } + + if ahead.GetTokenType() == GoParserWS { + // Get the token ahead of the current whitespaces. + possibleIndexEosToken = p.GetCurrentToken().GetTokenIndex() - 2 + ahead = p.GetTokenStream().Get(possibleIndexEosToken) + } + + // Get the token's text and type. + text := ahead.GetText() + _type := ahead.GetTokenType() + + // Check if the token is, or contains a line terminator. + return (_type == GoParserCOMMENT && (strings.Contains(text, "\r") || strings.Contains(text, "\n"))) || + (_type == GoParserTERMINATOR) +} + +func (p *GoParserBase) noTerminatorBetween(tokenOffset int) bool { + var s antlr.TokenStream + s = p.GetTokenStream() + stream := s.(*antlr.CommonTokenStream) + tokens := stream.GetHiddenTokensToLeft(stream.LT(tokenOffset).GetTokenIndex(), -1) + if tokens == nil { + return true + } + + for _, token := range tokens { + if strings.Contains(token.GetText(), "\n") { + return false + } + } + return true +} + +func (p *GoParserBase) noTerminatorAfterParams(tokenOffset int) bool { + stream := p.GetTokenStream() + leftParams := 1 + rightParams := 0 + var tokenType int + + if stream.LT(tokenOffset).GetTokenType() == GoParserL_PAREN { + for leftParams != rightParams { + tokenOffset++ + tokenType = stream.LT(tokenOffset).GetTokenType() + if tokenType == GoParserL_PAREN { + leftParams++ + } else if tokenType == GoParserR_PAREN { + rightParams++ + } + } + tokenOffset++ + return p.noTerminatorBetween(tokenOffset) + } + return true +} + +func (p *GoParserBase) checkPreviousTokenText(text string) bool { + stream := p.GetTokenStream() + return stream.LT(1).GetText() == text +} diff --git a/languages/groovy/GroovyLexer.interp b/languages/groovy/GroovyLexer.interp new file mode 100644 index 0000000000000000000000000000000000000000..41ef1ccb579fc86c155286c8df66c67fe240737f --- /dev/null +++ b/languages/groovy/GroovyLexer.interp @@ -0,0 +1,500 @@ +token literal names: +null +null +null +null +null +null +null +'as' +'def' +'in' +'trait' +'threadsafe' +'var' +null +'abstract' +'assert' +'break' +'case' +'catch' +'class' +'const' +'continue' +'default' +'do' +'else' +'enum' +'extends' +'final' +'finally' +'for' +'if' +'goto' +'implements' +'import' +'instanceof' +'interface' +'native' +'new' +'package' +'private' +'protected' +'public' +'return' +'static' +'strictfp' +'super' +'switch' +'synchronized' +'this' +'throw' +'throws' +'transient' +'try' +'void' +'volatile' +'while' +null +null +null +'null' +'..' +'..<' +'*.' +'?.' +'??.' +'?:' +'.&' +'::' +'=~' +'==~' +'**' +'**=' +'<=>' +'===' +'!==' +'->' +'!instanceof' +'!in' +'(' +')' +'{' +'}' +'[' +']' +';' +',' +null +'=' +'>' +'<' +'!' +'~' +'?' +':' +'==' +'<=' +'>=' +'!=' +'&&' +'||' +'++' +'--' +'+' +'-' +'*' +null +'&' +'|' +'^' +'%' +'+=' +'-=' +'*=' +'/=' +'&=' +'|=' +'^=' +'%=' +'<<=' +'>>=' +'>>>=' +'?=' +null +null +'@' +'...' +null +null +null +null + +token symbolic names: +null +StringLiteral +GStringBegin +GStringEnd +GStringPart +GStringPathPart +RollBackOne +AS +DEF +IN +TRAIT +THREADSAFE +VAR +BuiltInPrimitiveType +ABSTRACT +ASSERT +BREAK +CASE +CATCH +CLASS +CONST +CONTINUE +DEFAULT +DO +ELSE +ENUM +EXTENDS +FINAL +FINALLY +FOR +IF +GOTO +IMPLEMENTS +IMPORT +INSTANCEOF +INTERFACE +NATIVE +NEW +PACKAGE +PRIVATE +PROTECTED +PUBLIC +RETURN +STATIC +STRICTFP +SUPER +SWITCH +SYNCHRONIZED +THIS +THROW +THROWS +TRANSIENT +TRY +VOID +VOLATILE +WHILE +IntegerLiteral +FloatingPointLiteral +BooleanLiteral +NullLiteral +RANGE_INCLUSIVE +RANGE_EXCLUSIVE +SPREAD_DOT +SAFE_DOT +SAFE_CHAIN_DOT +ELVIS +METHOD_POINTER +METHOD_REFERENCE +REGEX_FIND +REGEX_MATCH +POWER +POWER_ASSIGN +SPACESHIP +IDENTICAL +NOT_IDENTICAL +ARROW +NOT_INSTANCEOF +NOT_IN +LPAREN +RPAREN +LBRACE +RBRACE +LBRACK +RBRACK +SEMI +COMMA +DOT +ASSIGN +GT +LT +NOT +BITNOT +QUESTION +COLON +EQUAL +LE +GE +NOTEQUAL +AND +OR +INC +DEC +ADD +SUB +MUL +DIV +BITAND +BITOR +XOR +MOD +ADD_ASSIGN +SUB_ASSIGN +MUL_ASSIGN +DIV_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +MOD_ASSIGN +LSHIFT_ASSIGN +RSHIFT_ASSIGN +URSHIFT_ASSIGN +ELVIS_ASSIGN +CapitalizedIdentifier +Identifier +AT +ELLIPSIS +WS +NL +SH_COMMENT +UNEXPECTED_CHAR + +rule names: +StringLiteral +GStringBegin +TdqGStringBegin +SlashyGStringBegin +DollarSlashyGStringBegin +GStringEnd +GStringPart +GStringCharacter +TdqGStringEnd +TdqGStringPart +TdqGStringCharacter +SlashyGStringEnd +SlashyGStringPart +SlashyGStringCharacter +DollarSlashyGStringEnd +DollarSlashyGStringPart +DollarSlashyGStringCharacter +GStringLBrace +GStringIdentifier +GStringPathPart +RollBackOne +DqStringCharacter +SqStringCharacter +TdqStringCharacter +TsqStringCharacter +SlashyStringCharacter +DollarSlashyStringCharacter +AS +DEF +IN +TRAIT +THREADSAFE +VAR +BuiltInPrimitiveType +ABSTRACT +ASSERT +BOOLEAN +BREAK +BYTE +CASE +CATCH +CHAR +CLASS +CONST +CONTINUE +DEFAULT +DO +DOUBLE +ELSE +ENUM +EXTENDS +FINAL +FINALLY +FLOAT +FOR +IF +GOTO +IMPLEMENTS +IMPORT +INSTANCEOF +INT +INTERFACE +LONG +NATIVE +NEW +PACKAGE +PRIVATE +PROTECTED +PUBLIC +RETURN +SHORT +STATIC +STRICTFP +SUPER +SWITCH +SYNCHRONIZED +THIS +THROW +THROWS +TRANSIENT +TRY +VOID +VOLATILE +WHILE +IntegerLiteral +Zero +DecimalIntegerLiteral +HexIntegerLiteral +OctalIntegerLiteral +BinaryIntegerLiteral +IntegerTypeSuffix +DecimalNumeral +Digits +Digit +NonZeroDigit +DigitOrUnderscore +Underscores +Underscore +HexNumeral +HexDigits +HexDigit +HexDigitOrUnderscore +OctalNumeral +OctalDigits +OctalDigit +OctalDigitOrUnderscore +BinaryNumeral +BinaryDigits +BinaryDigit +BinaryDigitOrUnderscore +FloatingPointLiteral +DecimalFloatingPointLiteral +ExponentPart +ExponentIndicator +SignedInteger +Sign +FloatTypeSuffix +HexadecimalFloatingPointLiteral +HexSignificand +BinaryExponent +BinaryExponentIndicator +Dot +BooleanLiteral +EscapeSequence +OctalEscape +UnicodeEscape +ZeroToThree +DollarEscape +LineEscape +SlashEscape +Backslash +Slash +Dollar +GStringQuotationMark +SqStringQuotationMark +TdqStringQuotationMark +TsqStringQuotationMark +DollarSlashyGStringQuotationMarkBegin +DollarSlashyGStringQuotationMarkEnd +DollarSlashEscape +DollarDollarEscape +NullLiteral +RANGE_INCLUSIVE +RANGE_EXCLUSIVE +SPREAD_DOT +SAFE_DOT +SAFE_CHAIN_DOT +ELVIS +METHOD_POINTER +METHOD_REFERENCE +REGEX_FIND +REGEX_MATCH +POWER +POWER_ASSIGN +SPACESHIP +IDENTICAL +NOT_IDENTICAL +ARROW +NOT_INSTANCEOF +NOT_IN +LPAREN +RPAREN +LBRACE +RBRACE +LBRACK +RBRACK +SEMI +COMMA +DOT +ASSIGN +GT +LT +NOT +BITNOT +QUESTION +COLON +EQUAL +LE +GE +NOTEQUAL +AND +OR +INC +DEC +ADD +SUB +MUL +DIV +BITAND +BITOR +XOR +MOD +ADD_ASSIGN +SUB_ASSIGN +MUL_ASSIGN +DIV_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +MOD_ASSIGN +LSHIFT_ASSIGN +RSHIFT_ASSIGN +URSHIFT_ASSIGN +ELVIS_ASSIGN +CapitalizedIdentifier +Identifier +IdentifierInGString +JavaLetterInGString +JavaLetterOrDigitInGString +JavaLetter +JavaLetterOrDigit +AT +ELLIPSIS +WS +NL +ML_COMMENT +SL_COMMENT +SH_COMMENT +UNEXPECTED_CHAR + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE +DQ_GSTRING_MODE +TDQ_GSTRING_MODE +SLASHY_GSTRING_MODE +DOLLAR_SLASHY_GSTRING_MODE +GSTRING_TYPE_SELECTOR_MODE +GSTRING_PATH_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 131, 1640, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 4, 153, 9, 153, 4, 154, 9, 154, 4, 155, 9, 155, 4, 156, 9, 156, 4, 157, 9, 157, 4, 158, 9, 158, 4, 159, 9, 159, 4, 160, 9, 160, 4, 161, 9, 161, 4, 162, 9, 162, 4, 163, 9, 163, 4, 164, 9, 164, 4, 165, 9, 165, 4, 166, 9, 166, 4, 167, 9, 167, 4, 168, 9, 168, 4, 169, 9, 169, 4, 170, 9, 170, 4, 171, 9, 171, 4, 172, 9, 172, 4, 173, 9, 173, 4, 174, 9, 174, 4, 175, 9, 175, 4, 176, 9, 176, 4, 177, 9, 177, 4, 178, 9, 178, 4, 179, 9, 179, 4, 180, 9, 180, 4, 181, 9, 181, 4, 182, 9, 182, 4, 183, 9, 183, 4, 184, 9, 184, 4, 185, 9, 185, 4, 186, 9, 186, 4, 187, 9, 187, 4, 188, 9, 188, 4, 189, 9, 189, 4, 190, 9, 190, 4, 191, 9, 191, 4, 192, 9, 192, 4, 193, 9, 193, 4, 194, 9, 194, 4, 195, 9, 195, 4, 196, 9, 196, 4, 197, 9, 197, 4, 198, 9, 198, 4, 199, 9, 199, 4, 200, 9, 200, 4, 201, 9, 201, 4, 202, 9, 202, 4, 203, 9, 203, 4, 204, 9, 204, 4, 205, 9, 205, 4, 206, 9, 206, 4, 207, 9, 207, 4, 208, 9, 208, 4, 209, 9, 209, 4, 210, 9, 210, 4, 211, 9, 211, 4, 212, 9, 212, 4, 213, 9, 213, 4, 214, 9, 214, 4, 215, 9, 215, 4, 216, 9, 216, 4, 217, 9, 217, 4, 218, 9, 218, 4, 219, 9, 219, 4, 220, 9, 220, 3, 2, 3, 2, 7, 2, 450, 10, 2, 12, 2, 14, 2, 453, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 459, 10, 2, 12, 2, 14, 2, 462, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 6, 2, 468, 10, 2, 13, 2, 14, 2, 469, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 476, 10, 2, 12, 2, 14, 2, 479, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 485, 10, 2, 12, 2, 14, 2, 488, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 6, 2, 494, 10, 2, 13, 2, 14, 2, 495, 3, 2, 3, 2, 5, 2, 500, 10, 2, 3, 3, 3, 3, 7, 3, 504, 10, 3, 12, 3, 14, 3, 507, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 7, 4, 516, 10, 4, 12, 4, 14, 4, 519, 11, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 7, 5, 529, 10, 5, 12, 5, 14, 5, 532, 11, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 7, 6, 542, 10, 6, 12, 6, 14, 6, 545, 11, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 5, 13, 580, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 5, 23, 631, 10, 23, 3, 24, 3, 24, 5, 24, 635, 10, 24, 3, 25, 3, 25, 3, 25, 5, 25, 640, 10, 25, 3, 26, 3, 26, 3, 26, 5, 26, 645, 10, 26, 3, 27, 3, 27, 3, 27, 5, 27, 650, 10, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 658, 10, 28, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 699, 10, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, 3, 86, 5, 86, 1044, 10, 86, 3, 86, 5, 86, 1047, 10, 86, 3, 86, 3, 86, 6, 86, 1051, 10, 86, 13, 86, 14, 86, 1052, 3, 86, 5, 86, 1056, 10, 86, 5, 86, 1058, 10, 86, 3, 87, 3, 87, 3, 88, 3, 88, 5, 88, 1064, 10, 88, 3, 89, 3, 89, 5, 89, 1068, 10, 89, 3, 90, 3, 90, 5, 90, 1072, 10, 90, 3, 91, 3, 91, 5, 91, 1076, 10, 91, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 5, 93, 1083, 10, 93, 3, 93, 3, 93, 3, 93, 5, 93, 1088, 10, 93, 5, 93, 1090, 10, 93, 3, 94, 3, 94, 7, 94, 1094, 10, 94, 12, 94, 14, 94, 1097, 11, 94, 3, 94, 5, 94, 1100, 10, 94, 3, 95, 3, 95, 5, 95, 1104, 10, 95, 3, 96, 3, 96, 3, 97, 3, 97, 5, 97, 1110, 10, 97, 3, 98, 6, 98, 1113, 10, 98, 13, 98, 14, 98, 1114, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 7, 101, 1125, 10, 101, 12, 101, 14, 101, 1128, 11, 101, 3, 101, 5, 101, 1131, 10, 101, 3, 102, 3, 102, 3, 103, 3, 103, 5, 103, 1137, 10, 103, 3, 104, 3, 104, 5, 104, 1141, 10, 104, 3, 104, 3, 104, 3, 105, 3, 105, 7, 105, 1147, 10, 105, 12, 105, 14, 105, 1150, 11, 105, 3, 105, 5, 105, 1153, 10, 105, 3, 106, 3, 106, 3, 107, 3, 107, 5, 107, 1159, 10, 107, 3, 108, 3, 108, 3, 108, 3, 108, 3, 109, 3, 109, 7, 109, 1167, 10, 109, 12, 109, 14, 109, 1170, 11, 109, 3, 109, 5, 109, 1173, 10, 109, 3, 110, 3, 110, 3, 111, 3, 111, 5, 111, 1179, 10, 111, 3, 112, 3, 112, 5, 112, 1183, 10, 112, 3, 112, 5, 112, 1186, 10, 112, 3, 113, 3, 113, 3, 113, 3, 113, 5, 113, 1192, 10, 113, 3, 113, 5, 113, 1195, 10, 113, 3, 113, 3, 113, 3, 113, 5, 113, 1200, 10, 113, 3, 113, 3, 113, 3, 113, 5, 113, 1205, 10, 113, 3, 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 116, 5, 116, 1213, 10, 116, 3, 116, 3, 116, 3, 117, 3, 117, 3, 118, 3, 118, 3, 119, 3, 119, 3, 119, 5, 119, 1224, 10, 119, 3, 120, 3, 120, 5, 120, 1228, 10, 120, 3, 120, 3, 120, 3, 120, 5, 120, 1233, 10, 120, 3, 120, 3, 120, 3, 120, 5, 120, 1238, 10, 120, 3, 121, 3, 121, 3, 121, 3, 122, 3, 122, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 5, 124, 1256, 10, 124, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 5, 125, 1265, 10, 125, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 5, 126, 1279, 10, 126, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 128, 3, 128, 3, 129, 3, 129, 3, 129, 3, 130, 3, 130, 5, 130, 1295, 10, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 131, 3, 132, 3, 132, 3, 133, 3, 133, 3, 134, 3, 134, 3, 135, 3, 135, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 3, 137, 3, 138, 3, 138, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, 3, 141, 3, 141, 3, 141, 3, 141, 3, 142, 3, 142, 3, 142, 3, 143, 3, 143, 3, 143, 3, 143, 3, 143, 3, 144, 3, 144, 3, 144, 3, 145, 3, 145, 3, 145, 3, 145, 3, 146, 3, 146, 3, 146, 3, 147, 3, 147, 3, 147, 3, 148, 3, 148, 3, 148, 3, 148, 3, 149, 3, 149, 3, 149, 3, 150, 3, 150, 3, 150, 3, 151, 3, 151, 3, 151, 3, 152, 3, 152, 3, 152, 3, 153, 3, 153, 3, 153, 3, 153, 3, 154, 3, 154, 3, 154, 3, 155, 3, 155, 3, 155, 3, 155, 3, 156, 3, 156, 3, 156, 3, 156, 3, 157, 3, 157, 3, 157, 3, 157, 3, 158, 3, 158, 3, 158, 3, 158, 3, 159, 3, 159, 3, 159, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 161, 3, 161, 3, 161, 3, 161, 3, 162, 3, 162, 3, 162, 3, 162, 3, 163, 3, 163, 3, 163, 3, 163, 3, 164, 3, 164, 3, 164, 3, 164, 3, 165, 3, 165, 3, 165, 3, 165, 3, 166, 3, 166, 3, 166, 3, 166, 3, 167, 3, 167, 3, 167, 3, 167, 3, 168, 3, 168, 3, 169, 3, 169, 3, 170, 3, 170, 3, 171, 3, 171, 3, 172, 3, 172, 3, 173, 3, 173, 3, 174, 3, 174, 3, 175, 3, 175, 3, 176, 3, 176, 3, 177, 3, 177, 3, 178, 3, 178, 3, 178, 3, 179, 3, 179, 3, 179, 3, 180, 3, 180, 3, 180, 3, 181, 3, 181, 3, 181, 3, 182, 3, 182, 3, 182, 3, 183, 3, 183, 3, 183, 3, 184, 3, 184, 3, 184, 3, 185, 3, 185, 3, 185, 3, 186, 3, 186, 3, 187, 3, 187, 3, 188, 3, 188, 3, 189, 3, 189, 3, 190, 3, 190, 3, 191, 3, 191, 3, 192, 3, 192, 3, 193, 3, 193, 3, 194, 3, 194, 3, 194, 3, 195, 3, 195, 3, 195, 3, 196, 3, 196, 3, 196, 3, 197, 3, 197, 3, 197, 3, 198, 3, 198, 3, 198, 3, 199, 3, 199, 3, 199, 3, 200, 3, 200, 3, 200, 3, 201, 3, 201, 3, 201, 3, 202, 3, 202, 3, 202, 3, 202, 3, 203, 3, 203, 3, 203, 3, 203, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 205, 3, 205, 3, 205, 3, 206, 3, 206, 7, 206, 1535, 10, 206, 12, 206, 14, 206, 1538, 11, 206, 3, 207, 3, 207, 7, 207, 1542, 10, 207, 12, 207, 14, 207, 1545, 11, 207, 3, 208, 3, 208, 7, 208, 1549, 10, 208, 12, 208, 14, 208, 1552, 11, 208, 3, 209, 3, 209, 3, 209, 3, 209, 5, 209, 1558, 10, 209, 3, 210, 3, 210, 3, 210, 3, 210, 5, 210, 1564, 10, 210, 3, 211, 3, 211, 3, 211, 3, 211, 5, 211, 1570, 10, 211, 3, 212, 3, 212, 3, 212, 3, 212, 5, 212, 1576, 10, 212, 3, 213, 3, 213, 3, 214, 3, 214, 3, 214, 3, 214, 3, 215, 6, 215, 1585, 10, 215, 13, 215, 14, 215, 1586, 3, 215, 6, 215, 1590, 10, 215, 13, 215, 14, 215, 1591, 5, 215, 1594, 10, 215, 3, 215, 3, 215, 3, 216, 5, 216, 1599, 10, 216, 3, 216, 3, 216, 3, 217, 3, 217, 3, 217, 3, 217, 7, 217, 1607, 10, 217, 12, 217, 14, 217, 1610, 11, 217, 3, 217, 3, 217, 3, 217, 3, 217, 3, 217, 3, 218, 3, 218, 3, 218, 3, 218, 7, 218, 1621, 10, 218, 12, 218, 14, 218, 1624, 11, 218, 3, 218, 3, 218, 3, 219, 3, 219, 3, 219, 3, 219, 7, 219, 1632, 10, 219, 12, 219, 14, 219, 1635, 11, 219, 3, 219, 3, 219, 3, 220, 3, 220, 3, 1608, 2, 221, 9, 3, 11, 4, 13, 2, 15, 2, 17, 2, 19, 5, 21, 6, 23, 2, 25, 2, 27, 2, 29, 2, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, 41, 2, 43, 2, 45, 2, 47, 7, 49, 8, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 9, 65, 10, 67, 11, 69, 12, 71, 13, 73, 14, 75, 15, 77, 16, 79, 17, 81, 2, 83, 18, 85, 2, 87, 19, 89, 20, 91, 2, 93, 21, 95, 22, 97, 23, 99, 24, 101, 25, 103, 2, 105, 26, 107, 27, 109, 28, 111, 29, 113, 30, 115, 2, 117, 31, 119, 32, 121, 33, 123, 34, 125, 35, 127, 36, 129, 2, 131, 37, 133, 2, 135, 38, 137, 39, 139, 40, 141, 41, 143, 42, 145, 43, 147, 44, 149, 2, 151, 45, 153, 46, 155, 47, 157, 48, 159, 49, 161, 50, 163, 51, 165, 52, 167, 53, 169, 54, 171, 55, 173, 56, 175, 57, 177, 58, 179, 2, 181, 2, 183, 2, 185, 2, 187, 2, 189, 2, 191, 2, 193, 2, 195, 2, 197, 2, 199, 2, 201, 2, 203, 2, 205, 2, 207, 2, 209, 2, 211, 2, 213, 2, 215, 2, 217, 2, 219, 2, 221, 2, 223, 2, 225, 2, 227, 2, 229, 59, 231, 2, 233, 2, 235, 2, 237, 2, 239, 2, 241, 2, 243, 2, 245, 2, 247, 2, 249, 2, 251, 2, 253, 60, 255, 2, 257, 2, 259, 2, 261, 2, 263, 2, 265, 2, 267, 2, 269, 2, 271, 2, 273, 2, 275, 2, 277, 2, 279, 2, 281, 2, 283, 2, 285, 2, 287, 2, 289, 2, 291, 61, 293, 62, 295, 63, 297, 64, 299, 65, 301, 66, 303, 67, 305, 68, 307, 69, 309, 70, 311, 71, 313, 72, 315, 73, 317, 74, 319, 75, 321, 76, 323, 77, 325, 78, 327, 79, 329, 80, 331, 81, 333, 82, 335, 83, 337, 84, 339, 85, 341, 86, 343, 87, 345, 88, 347, 89, 349, 90, 351, 91, 353, 92, 355, 93, 357, 94, 359, 95, 361, 96, 363, 97, 365, 98, 367, 99, 369, 100, 371, 101, 373, 102, 375, 103, 377, 104, 379, 105, 381, 106, 383, 107, 385, 108, 387, 109, 389, 110, 391, 111, 393, 112, 395, 113, 397, 114, 399, 115, 401, 116, 403, 117, 405, 118, 407, 119, 409, 120, 411, 121, 413, 122, 415, 123, 417, 124, 419, 125, 421, 2, 423, 2, 425, 2, 427, 2, 429, 2, 431, 126, 433, 127, 435, 128, 437, 129, 439, 2, 441, 2, 443, 130, 445, 131, 9, 2, 3, 4, 5, 6, 7, 8, 31, 7, 2, 12, 12, 15, 15, 36, 36, 38, 38, 94, 94, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 5, 2, 36, 36, 38, 38, 94, 94, 4, 2, 41, 41, 94, 94, 5, 2, 2, 2, 38, 38, 49, 49, 3, 2, 50, 59, 8, 2, 73, 73, 75, 75, 78, 78, 105, 105, 107, 107, 110, 110, 3, 2, 51, 59, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 57, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 6, 2, 70, 70, 72, 73, 102, 102, 104, 105, 4, 2, 82, 82, 114, 114, 10, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, 3, 2, 50, 53, 3, 2, 67, 92, 5, 2, 67, 92, 97, 97, 99, 124, 4, 2, 2, 129, 55298, 56321, 3, 2, 55298, 56321, 3, 2, 56322, 57345, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 6, 2, 38, 38, 67, 92, 97, 97, 99, 124, 7, 2, 38, 38, 50, 59, 67, 92, 97, 97, 99, 124, 5, 2, 11, 11, 14, 14, 34, 34, 5, 2, 12, 12, 15, 15, 1, 1, 2, 1663, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 253, 3, 2, 2, 2, 2, 291, 3, 2, 2, 2, 2, 293, 3, 2, 2, 2, 2, 295, 3, 2, 2, 2, 2, 297, 3, 2, 2, 2, 2, 299, 3, 2, 2, 2, 2, 301, 3, 2, 2, 2, 2, 303, 3, 2, 2, 2, 2, 305, 3, 2, 2, 2, 2, 307, 3, 2, 2, 2, 2, 309, 3, 2, 2, 2, 2, 311, 3, 2, 2, 2, 2, 313, 3, 2, 2, 2, 2, 315, 3, 2, 2, 2, 2, 317, 3, 2, 2, 2, 2, 319, 3, 2, 2, 2, 2, 321, 3, 2, 2, 2, 2, 323, 3, 2, 2, 2, 2, 325, 3, 2, 2, 2, 2, 327, 3, 2, 2, 2, 2, 329, 3, 2, 2, 2, 2, 331, 3, 2, 2, 2, 2, 333, 3, 2, 2, 2, 2, 335, 3, 2, 2, 2, 2, 337, 3, 2, 2, 2, 2, 339, 3, 2, 2, 2, 2, 341, 3, 2, 2, 2, 2, 343, 3, 2, 2, 2, 2, 345, 3, 2, 2, 2, 2, 347, 3, 2, 2, 2, 2, 349, 3, 2, 2, 2, 2, 351, 3, 2, 2, 2, 2, 353, 3, 2, 2, 2, 2, 355, 3, 2, 2, 2, 2, 357, 3, 2, 2, 2, 2, 359, 3, 2, 2, 2, 2, 361, 3, 2, 2, 2, 2, 363, 3, 2, 2, 2, 2, 365, 3, 2, 2, 2, 2, 367, 3, 2, 2, 2, 2, 369, 3, 2, 2, 2, 2, 371, 3, 2, 2, 2, 2, 373, 3, 2, 2, 2, 2, 375, 3, 2, 2, 2, 2, 377, 3, 2, 2, 2, 2, 379, 3, 2, 2, 2, 2, 381, 3, 2, 2, 2, 2, 383, 3, 2, 2, 2, 2, 385, 3, 2, 2, 2, 2, 387, 3, 2, 2, 2, 2, 389, 3, 2, 2, 2, 2, 391, 3, 2, 2, 2, 2, 393, 3, 2, 2, 2, 2, 395, 3, 2, 2, 2, 2, 397, 3, 2, 2, 2, 2, 399, 3, 2, 2, 2, 2, 401, 3, 2, 2, 2, 2, 403, 3, 2, 2, 2, 2, 405, 3, 2, 2, 2, 2, 407, 3, 2, 2, 2, 2, 409, 3, 2, 2, 2, 2, 411, 3, 2, 2, 2, 2, 413, 3, 2, 2, 2, 2, 415, 3, 2, 2, 2, 2, 417, 3, 2, 2, 2, 2, 419, 3, 2, 2, 2, 2, 431, 3, 2, 2, 2, 2, 433, 3, 2, 2, 2, 2, 435, 3, 2, 2, 2, 2, 437, 3, 2, 2, 2, 2, 439, 3, 2, 2, 2, 2, 441, 3, 2, 2, 2, 2, 443, 3, 2, 2, 2, 2, 445, 3, 2, 2, 2, 3, 19, 3, 2, 2, 2, 3, 21, 3, 2, 2, 2, 3, 23, 3, 2, 2, 2, 4, 25, 3, 2, 2, 2, 4, 27, 3, 2, 2, 2, 4, 29, 3, 2, 2, 2, 5, 31, 3, 2, 2, 2, 5, 33, 3, 2, 2, 2, 5, 35, 3, 2, 2, 2, 6, 37, 3, 2, 2, 2, 6, 39, 3, 2, 2, 2, 6, 41, 3, 2, 2, 2, 7, 43, 3, 2, 2, 2, 7, 45, 3, 2, 2, 2, 8, 47, 3, 2, 2, 2, 8, 49, 3, 2, 2, 2, 9, 499, 3, 2, 2, 2, 11, 501, 3, 2, 2, 2, 13, 513, 3, 2, 2, 2, 15, 526, 3, 2, 2, 2, 17, 539, 3, 2, 2, 2, 19, 552, 3, 2, 2, 2, 21, 556, 3, 2, 2, 2, 23, 560, 3, 2, 2, 2, 25, 564, 3, 2, 2, 2, 27, 569, 3, 2, 2, 2, 29, 574, 3, 2, 2, 2, 31, 579, 3, 2, 2, 2, 33, 586, 3, 2, 2, 2, 35, 591, 3, 2, 2, 2, 37, 595, 3, 2, 2, 2, 39, 600, 3, 2, 2, 2, 41, 605, 3, 2, 2, 2, 43, 609, 3, 2, 2, 2, 45, 615, 3, 2, 2, 2, 47, 621, 3, 2, 2, 2, 49, 624, 3, 2, 2, 2, 51, 630, 3, 2, 2, 2, 53, 634, 3, 2, 2, 2, 55, 639, 3, 2, 2, 2, 57, 644, 3, 2, 2, 2, 59, 649, 3, 2, 2, 2, 61, 657, 3, 2, 2, 2, 63, 659, 3, 2, 2, 2, 65, 662, 3, 2, 2, 2, 67, 666, 3, 2, 2, 2, 69, 669, 3, 2, 2, 2, 71, 675, 3, 2, 2, 2, 73, 686, 3, 2, 2, 2, 75, 698, 3, 2, 2, 2, 77, 700, 3, 2, 2, 2, 79, 709, 3, 2, 2, 2, 81, 716, 3, 2, 2, 2, 83, 724, 3, 2, 2, 2, 85, 730, 3, 2, 2, 2, 87, 735, 3, 2, 2, 2, 89, 740, 3, 2, 2, 2, 91, 746, 3, 2, 2, 2, 93, 751, 3, 2, 2, 2, 95, 757, 3, 2, 2, 2, 97, 763, 3, 2, 2, 2, 99, 772, 3, 2, 2, 2, 101, 780, 3, 2, 2, 2, 103, 783, 3, 2, 2, 2, 105, 790, 3, 2, 2, 2, 107, 795, 3, 2, 2, 2, 109, 800, 3, 2, 2, 2, 111, 808, 3, 2, 2, 2, 113, 814, 3, 2, 2, 2, 115, 822, 3, 2, 2, 2, 117, 828, 3, 2, 2, 2, 119, 832, 3, 2, 2, 2, 121, 835, 3, 2, 2, 2, 123, 840, 3, 2, 2, 2, 125, 851, 3, 2, 2, 2, 127, 858, 3, 2, 2, 2, 129, 869, 3, 2, 2, 2, 131, 873, 3, 2, 2, 2, 133, 883, 3, 2, 2, 2, 135, 888, 3, 2, 2, 2, 137, 895, 3, 2, 2, 2, 139, 899, 3, 2, 2, 2, 141, 907, 3, 2, 2, 2, 143, 915, 3, 2, 2, 2, 145, 925, 3, 2, 2, 2, 147, 932, 3, 2, 2, 2, 149, 939, 3, 2, 2, 2, 151, 945, 3, 2, 2, 2, 153, 952, 3, 2, 2, 2, 155, 961, 3, 2, 2, 2, 157, 967, 3, 2, 2, 2, 159, 974, 3, 2, 2, 2, 161, 987, 3, 2, 2, 2, 163, 992, 3, 2, 2, 2, 165, 998, 3, 2, 2, 2, 167, 1005, 3, 2, 2, 2, 169, 1015, 3, 2, 2, 2, 171, 1019, 3, 2, 2, 2, 173, 1024, 3, 2, 2, 2, 175, 1033, 3, 2, 2, 2, 177, 1057, 3, 2, 2, 2, 179, 1059, 3, 2, 2, 2, 181, 1061, 3, 2, 2, 2, 183, 1065, 3, 2, 2, 2, 185, 1069, 3, 2, 2, 2, 187, 1073, 3, 2, 2, 2, 189, 1077, 3, 2, 2, 2, 191, 1089, 3, 2, 2, 2, 193, 1091, 3, 2, 2, 2, 195, 1103, 3, 2, 2, 2, 197, 1105, 3, 2, 2, 2, 199, 1109, 3, 2, 2, 2, 201, 1112, 3, 2, 2, 2, 203, 1116, 3, 2, 2, 2, 205, 1118, 3, 2, 2, 2, 207, 1122, 3, 2, 2, 2, 209, 1132, 3, 2, 2, 2, 211, 1136, 3, 2, 2, 2, 213, 1138, 3, 2, 2, 2, 215, 1144, 3, 2, 2, 2, 217, 1154, 3, 2, 2, 2, 219, 1158, 3, 2, 2, 2, 221, 1160, 3, 2, 2, 2, 223, 1164, 3, 2, 2, 2, 225, 1174, 3, 2, 2, 2, 227, 1178, 3, 2, 2, 2, 229, 1182, 3, 2, 2, 2, 231, 1204, 3, 2, 2, 2, 233, 1206, 3, 2, 2, 2, 235, 1209, 3, 2, 2, 2, 237, 1212, 3, 2, 2, 2, 239, 1216, 3, 2, 2, 2, 241, 1218, 3, 2, 2, 2, 243, 1220, 3, 2, 2, 2, 245, 1237, 3, 2, 2, 2, 247, 1239, 3, 2, 2, 2, 249, 1242, 3, 2, 2, 2, 251, 1244, 3, 2, 2, 2, 253, 1255, 3, 2, 2, 2, 255, 1264, 3, 2, 2, 2, 257, 1278, 3, 2, 2, 2, 259, 1280, 3, 2, 2, 2, 261, 1287, 3, 2, 2, 2, 263, 1289, 3, 2, 2, 2, 265, 1292, 3, 2, 2, 2, 267, 1298, 3, 2, 2, 2, 269, 1301, 3, 2, 2, 2, 271, 1303, 3, 2, 2, 2, 273, 1305, 3, 2, 2, 2, 275, 1307, 3, 2, 2, 2, 277, 1309, 3, 2, 2, 2, 279, 1311, 3, 2, 2, 2, 281, 1315, 3, 2, 2, 2, 283, 1319, 3, 2, 2, 2, 285, 1322, 3, 2, 2, 2, 287, 1325, 3, 2, 2, 2, 289, 1329, 3, 2, 2, 2, 291, 1332, 3, 2, 2, 2, 293, 1337, 3, 2, 2, 2, 295, 1340, 3, 2, 2, 2, 297, 1344, 3, 2, 2, 2, 299, 1347, 3, 2, 2, 2, 301, 1350, 3, 2, 2, 2, 303, 1354, 3, 2, 2, 2, 305, 1357, 3, 2, 2, 2, 307, 1360, 3, 2, 2, 2, 309, 1363, 3, 2, 2, 2, 311, 1366, 3, 2, 2, 2, 313, 1370, 3, 2, 2, 2, 315, 1373, 3, 2, 2, 2, 317, 1377, 3, 2, 2, 2, 319, 1381, 3, 2, 2, 2, 321, 1385, 3, 2, 2, 2, 323, 1389, 3, 2, 2, 2, 325, 1392, 3, 2, 2, 2, 327, 1404, 3, 2, 2, 2, 329, 1408, 3, 2, 2, 2, 331, 1412, 3, 2, 2, 2, 333, 1416, 3, 2, 2, 2, 335, 1420, 3, 2, 2, 2, 337, 1424, 3, 2, 2, 2, 339, 1428, 3, 2, 2, 2, 341, 1432, 3, 2, 2, 2, 343, 1434, 3, 2, 2, 2, 345, 1436, 3, 2, 2, 2, 347, 1438, 3, 2, 2, 2, 349, 1440, 3, 2, 2, 2, 351, 1442, 3, 2, 2, 2, 353, 1444, 3, 2, 2, 2, 355, 1446, 3, 2, 2, 2, 357, 1448, 3, 2, 2, 2, 359, 1450, 3, 2, 2, 2, 361, 1452, 3, 2, 2, 2, 363, 1455, 3, 2, 2, 2, 365, 1458, 3, 2, 2, 2, 367, 1461, 3, 2, 2, 2, 369, 1464, 3, 2, 2, 2, 371, 1467, 3, 2, 2, 2, 373, 1470, 3, 2, 2, 2, 375, 1473, 3, 2, 2, 2, 377, 1476, 3, 2, 2, 2, 379, 1478, 3, 2, 2, 2, 381, 1480, 3, 2, 2, 2, 383, 1482, 3, 2, 2, 2, 385, 1484, 3, 2, 2, 2, 387, 1486, 3, 2, 2, 2, 389, 1488, 3, 2, 2, 2, 391, 1490, 3, 2, 2, 2, 393, 1492, 3, 2, 2, 2, 395, 1495, 3, 2, 2, 2, 397, 1498, 3, 2, 2, 2, 399, 1501, 3, 2, 2, 2, 401, 1504, 3, 2, 2, 2, 403, 1507, 3, 2, 2, 2, 405, 1510, 3, 2, 2, 2, 407, 1513, 3, 2, 2, 2, 409, 1516, 3, 2, 2, 2, 411, 1520, 3, 2, 2, 2, 413, 1524, 3, 2, 2, 2, 415, 1529, 3, 2, 2, 2, 417, 1532, 3, 2, 2, 2, 419, 1539, 3, 2, 2, 2, 421, 1546, 3, 2, 2, 2, 423, 1557, 3, 2, 2, 2, 425, 1563, 3, 2, 2, 2, 427, 1569, 3, 2, 2, 2, 429, 1575, 3, 2, 2, 2, 431, 1577, 3, 2, 2, 2, 433, 1579, 3, 2, 2, 2, 435, 1593, 3, 2, 2, 2, 437, 1598, 3, 2, 2, 2, 439, 1602, 3, 2, 2, 2, 441, 1616, 3, 2, 2, 2, 443, 1627, 3, 2, 2, 2, 445, 1638, 3, 2, 2, 2, 447, 451, 5, 275, 135, 2, 448, 450, 5, 51, 23, 2, 449, 448, 3, 2, 2, 2, 450, 453, 3, 2, 2, 2, 451, 449, 3, 2, 2, 2, 451, 452, 3, 2, 2, 2, 452, 454, 3, 2, 2, 2, 453, 451, 3, 2, 2, 2, 454, 455, 5, 275, 135, 2, 455, 500, 3, 2, 2, 2, 456, 460, 5, 277, 136, 2, 457, 459, 5, 53, 24, 2, 458, 457, 3, 2, 2, 2, 459, 462, 3, 2, 2, 2, 460, 458, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 463, 3, 2, 2, 2, 462, 460, 3, 2, 2, 2, 463, 464, 5, 277, 136, 2, 464, 500, 3, 2, 2, 2, 465, 467, 5, 271, 133, 2, 466, 468, 5, 59, 27, 2, 467, 466, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 467, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 3, 2, 2, 2, 471, 472, 5, 271, 133, 2, 472, 500, 3, 2, 2, 2, 473, 477, 5, 279, 137, 2, 474, 476, 5, 55, 25, 2, 475, 474, 3, 2, 2, 2, 476, 479, 3, 2, 2, 2, 477, 475, 3, 2, 2, 2, 477, 478, 3, 2, 2, 2, 478, 480, 3, 2, 2, 2, 479, 477, 3, 2, 2, 2, 480, 481, 5, 279, 137, 2, 481, 500, 3, 2, 2, 2, 482, 486, 5, 281, 138, 2, 483, 485, 5, 57, 26, 2, 484, 483, 3, 2, 2, 2, 485, 488, 3, 2, 2, 2, 486, 484, 3, 2, 2, 2, 486, 487, 3, 2, 2, 2, 487, 489, 3, 2, 2, 2, 488, 486, 3, 2, 2, 2, 489, 490, 5, 281, 138, 2, 490, 500, 3, 2, 2, 2, 491, 493, 5, 283, 139, 2, 492, 494, 5, 61, 28, 2, 493, 492, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 493, 3, 2, 2, 2, 495, 496, 3, 2, 2, 2, 496, 497, 3, 2, 2, 2, 497, 498, 5, 285, 140, 2, 498, 500, 3, 2, 2, 2, 499, 447, 3, 2, 2, 2, 499, 456, 3, 2, 2, 2, 499, 465, 3, 2, 2, 2, 499, 473, 3, 2, 2, 2, 499, 482, 3, 2, 2, 2, 499, 491, 3, 2, 2, 2, 500, 10, 3, 2, 2, 2, 501, 505, 5, 275, 135, 2, 502, 504, 5, 51, 23, 2, 503, 502, 3, 2, 2, 2, 504, 507, 3, 2, 2, 2, 505, 503, 3, 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 508, 3, 2, 2, 2, 507, 505, 3, 2, 2, 2, 508, 509, 5, 273, 134, 2, 509, 510, 3, 2, 2, 2, 510, 511, 8, 3, 2, 2, 511, 512, 8, 3, 3, 2, 512, 12, 3, 2, 2, 2, 513, 517, 5, 279, 137, 2, 514, 516, 5, 55, 25, 2, 515, 514, 3, 2, 2, 2, 516, 519, 3, 2, 2, 2, 517, 515, 3, 2, 2, 2, 517, 518, 3, 2, 2, 2, 518, 520, 3, 2, 2, 2, 519, 517, 3, 2, 2, 2, 520, 521, 5, 273, 134, 2, 521, 522, 3, 2, 2, 2, 522, 523, 8, 4, 4, 2, 523, 524, 8, 4, 5, 2, 524, 525, 8, 4, 3, 2, 525, 14, 3, 2, 2, 2, 526, 530, 5, 271, 133, 2, 527, 529, 5, 59, 27, 2, 528, 527, 3, 2, 2, 2, 529, 532, 3, 2, 2, 2, 530, 528, 3, 2, 2, 2, 530, 531, 3, 2, 2, 2, 531, 533, 3, 2, 2, 2, 532, 530, 3, 2, 2, 2, 533, 534, 5, 273, 134, 2, 534, 535, 3, 2, 2, 2, 535, 536, 8, 5, 4, 2, 536, 537, 8, 5, 6, 2, 537, 538, 8, 5, 3, 2, 538, 16, 3, 2, 2, 2, 539, 543, 5, 283, 139, 2, 540, 542, 5, 61, 28, 2, 541, 540, 3, 2, 2, 2, 542, 545, 3, 2, 2, 2, 543, 541, 3, 2, 2, 2, 543, 544, 3, 2, 2, 2, 544, 546, 3, 2, 2, 2, 545, 543, 3, 2, 2, 2, 546, 547, 5, 273, 134, 2, 547, 548, 3, 2, 2, 2, 548, 549, 8, 6, 4, 2, 549, 550, 8, 6, 7, 2, 550, 551, 8, 6, 3, 2, 551, 18, 3, 2, 2, 2, 552, 553, 5, 275, 135, 2, 553, 554, 3, 2, 2, 2, 554, 555, 8, 7, 8, 2, 555, 20, 3, 2, 2, 2, 556, 557, 5, 273, 134, 2, 557, 558, 3, 2, 2, 2, 558, 559, 8, 8, 3, 2, 559, 22, 3, 2, 2, 2, 560, 561, 5, 51, 23, 2, 561, 562, 3, 2, 2, 2, 562, 563, 8, 9, 9, 2, 563, 24, 3, 2, 2, 2, 564, 565, 5, 279, 137, 2, 565, 566, 3, 2, 2, 2, 566, 567, 8, 10, 10, 2, 567, 568, 8, 10, 8, 2, 568, 26, 3, 2, 2, 2, 569, 570, 5, 273, 134, 2, 570, 571, 3, 2, 2, 2, 571, 572, 8, 11, 11, 2, 572, 573, 8, 11, 3, 2, 573, 28, 3, 2, 2, 2, 574, 575, 5, 55, 25, 2, 575, 576, 3, 2, 2, 2, 576, 577, 8, 12, 9, 2, 577, 30, 3, 2, 2, 2, 578, 580, 5, 273, 134, 2, 579, 578, 3, 2, 2, 2, 579, 580, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 582, 5, 271, 133, 2, 582, 583, 3, 2, 2, 2, 583, 584, 8, 13, 10, 2, 584, 585, 8, 13, 8, 2, 585, 32, 3, 2, 2, 2, 586, 587, 5, 273, 134, 2, 587, 588, 3, 2, 2, 2, 588, 589, 8, 14, 11, 2, 589, 590, 8, 14, 3, 2, 590, 34, 3, 2, 2, 2, 591, 592, 5, 59, 27, 2, 592, 593, 3, 2, 2, 2, 593, 594, 8, 15, 9, 2, 594, 36, 3, 2, 2, 2, 595, 596, 5, 285, 140, 2, 596, 597, 3, 2, 2, 2, 597, 598, 8, 16, 10, 2, 598, 599, 8, 16, 8, 2, 599, 38, 3, 2, 2, 2, 600, 601, 5, 273, 134, 2, 601, 602, 3, 2, 2, 2, 602, 603, 8, 17, 11, 2, 603, 604, 8, 17, 3, 2, 604, 40, 3, 2, 2, 2, 605, 606, 5, 61, 28, 2, 606, 607, 3, 2, 2, 2, 607, 608, 8, 18, 9, 2, 608, 42, 3, 2, 2, 2, 609, 610, 7, 125, 2, 2, 610, 611, 3, 2, 2, 2, 611, 612, 8, 19, 12, 2, 612, 613, 8, 19, 8, 2, 613, 614, 8, 19, 13, 2, 614, 44, 3, 2, 2, 2, 615, 616, 5, 421, 208, 2, 616, 617, 3, 2, 2, 2, 617, 618, 8, 20, 14, 2, 618, 619, 8, 20, 8, 2, 619, 620, 8, 20, 15, 2, 620, 46, 3, 2, 2, 2, 621, 622, 5, 251, 123, 2, 622, 623, 5, 421, 208, 2, 623, 48, 3, 2, 2, 2, 624, 625, 11, 2, 2, 2, 625, 626, 3, 2, 2, 2, 626, 627, 8, 22, 8, 2, 627, 50, 3, 2, 2, 2, 628, 631, 10, 2, 2, 2, 629, 631, 5, 255, 125, 2, 630, 628, 3, 2, 2, 2, 630, 629, 3, 2, 2, 2, 631, 52, 3, 2, 2, 2, 632, 635, 10, 3, 2, 2, 633, 635, 5, 255, 125, 2, 634, 632, 3, 2, 2, 2, 634, 633, 3, 2, 2, 2, 635, 54, 3, 2, 2, 2, 636, 640, 10, 4, 2, 2, 637, 640, 5, 275, 135, 2, 638, 640, 5, 255, 125, 2, 639, 636, 3, 2, 2, 2, 639, 637, 3, 2, 2, 2, 639, 638, 3, 2, 2, 2, 640, 56, 3, 2, 2, 2, 641, 645, 10, 5, 2, 2, 642, 645, 5, 277, 136, 2, 643, 645, 5, 255, 125, 2, 644, 641, 3, 2, 2, 2, 644, 642, 3, 2, 2, 2, 644, 643, 3, 2, 2, 2, 645, 58, 3, 2, 2, 2, 646, 650, 5, 267, 131, 2, 647, 650, 5, 273, 134, 2, 648, 650, 10, 6, 2, 2, 649, 646, 3, 2, 2, 2, 649, 647, 3, 2, 2, 2, 649, 648, 3, 2, 2, 2, 650, 60, 3, 2, 2, 2, 651, 658, 5, 267, 131, 2, 652, 658, 5, 287, 141, 2, 653, 658, 5, 289, 142, 2, 654, 658, 5, 271, 133, 2, 655, 658, 5, 273, 134, 2, 656, 658, 10, 6, 2, 2, 657, 651, 3, 2, 2, 2, 657, 652, 3, 2, 2, 2, 657, 653, 3, 2, 2, 2, 657, 654, 3, 2, 2, 2, 657, 655, 3, 2, 2, 2, 657, 656, 3, 2, 2, 2, 658, 62, 3, 2, 2, 2, 659, 660, 7, 99, 2, 2, 660, 661, 7, 117, 2, 2, 661, 64, 3, 2, 2, 2, 662, 663, 7, 102, 2, 2, 663, 664, 7, 103, 2, 2, 664, 665, 7, 104, 2, 2, 665, 66, 3, 2, 2, 2, 666, 667, 7, 107, 2, 2, 667, 668, 7, 112, 2, 2, 668, 68, 3, 2, 2, 2, 669, 670, 7, 118, 2, 2, 670, 671, 7, 116, 2, 2, 671, 672, 7, 99, 2, 2, 672, 673, 7, 107, 2, 2, 673, 674, 7, 118, 2, 2, 674, 70, 3, 2, 2, 2, 675, 676, 7, 118, 2, 2, 676, 677, 7, 106, 2, 2, 677, 678, 7, 116, 2, 2, 678, 679, 7, 103, 2, 2, 679, 680, 7, 99, 2, 2, 680, 681, 7, 102, 2, 2, 681, 682, 7, 117, 2, 2, 682, 683, 7, 99, 2, 2, 683, 684, 7, 104, 2, 2, 684, 685, 7, 103, 2, 2, 685, 72, 3, 2, 2, 2, 686, 687, 7, 120, 2, 2, 687, 688, 7, 99, 2, 2, 688, 689, 7, 116, 2, 2, 689, 74, 3, 2, 2, 2, 690, 699, 5, 81, 38, 2, 691, 699, 5, 91, 43, 2, 692, 699, 5, 85, 40, 2, 693, 699, 5, 149, 72, 2, 694, 699, 5, 129, 62, 2, 695, 699, 5, 133, 64, 2, 696, 699, 5, 115, 55, 2, 697, 699, 5, 103, 49, 2, 698, 690, 3, 2, 2, 2, 698, 691, 3, 2, 2, 2, 698, 692, 3, 2, 2, 2, 698, 693, 3, 2, 2, 2, 698, 694, 3, 2, 2, 2, 698, 695, 3, 2, 2, 2, 698, 696, 3, 2, 2, 2, 698, 697, 3, 2, 2, 2, 699, 76, 3, 2, 2, 2, 700, 701, 7, 99, 2, 2, 701, 702, 7, 100, 2, 2, 702, 703, 7, 117, 2, 2, 703, 704, 7, 118, 2, 2, 704, 705, 7, 116, 2, 2, 705, 706, 7, 99, 2, 2, 706, 707, 7, 101, 2, 2, 707, 708, 7, 118, 2, 2, 708, 78, 3, 2, 2, 2, 709, 710, 7, 99, 2, 2, 710, 711, 7, 117, 2, 2, 711, 712, 7, 117, 2, 2, 712, 713, 7, 103, 2, 2, 713, 714, 7, 116, 2, 2, 714, 715, 7, 118, 2, 2, 715, 80, 3, 2, 2, 2, 716, 717, 7, 100, 2, 2, 717, 718, 7, 113, 2, 2, 718, 719, 7, 113, 2, 2, 719, 720, 7, 110, 2, 2, 720, 721, 7, 103, 2, 2, 721, 722, 7, 99, 2, 2, 722, 723, 7, 112, 2, 2, 723, 82, 3, 2, 2, 2, 724, 725, 7, 100, 2, 2, 725, 726, 7, 116, 2, 2, 726, 727, 7, 103, 2, 2, 727, 728, 7, 99, 2, 2, 728, 729, 7, 109, 2, 2, 729, 84, 3, 2, 2, 2, 730, 731, 7, 100, 2, 2, 731, 732, 7, 123, 2, 2, 732, 733, 7, 118, 2, 2, 733, 734, 7, 103, 2, 2, 734, 86, 3, 2, 2, 2, 735, 736, 7, 101, 2, 2, 736, 737, 7, 99, 2, 2, 737, 738, 7, 117, 2, 2, 738, 739, 7, 103, 2, 2, 739, 88, 3, 2, 2, 2, 740, 741, 7, 101, 2, 2, 741, 742, 7, 99, 2, 2, 742, 743, 7, 118, 2, 2, 743, 744, 7, 101, 2, 2, 744, 745, 7, 106, 2, 2, 745, 90, 3, 2, 2, 2, 746, 747, 7, 101, 2, 2, 747, 748, 7, 106, 2, 2, 748, 749, 7, 99, 2, 2, 749, 750, 7, 116, 2, 2, 750, 92, 3, 2, 2, 2, 751, 752, 7, 101, 2, 2, 752, 753, 7, 110, 2, 2, 753, 754, 7, 99, 2, 2, 754, 755, 7, 117, 2, 2, 755, 756, 7, 117, 2, 2, 756, 94, 3, 2, 2, 2, 757, 758, 7, 101, 2, 2, 758, 759, 7, 113, 2, 2, 759, 760, 7, 112, 2, 2, 760, 761, 7, 117, 2, 2, 761, 762, 7, 118, 2, 2, 762, 96, 3, 2, 2, 2, 763, 764, 7, 101, 2, 2, 764, 765, 7, 113, 2, 2, 765, 766, 7, 112, 2, 2, 766, 767, 7, 118, 2, 2, 767, 768, 7, 107, 2, 2, 768, 769, 7, 112, 2, 2, 769, 770, 7, 119, 2, 2, 770, 771, 7, 103, 2, 2, 771, 98, 3, 2, 2, 2, 772, 773, 7, 102, 2, 2, 773, 774, 7, 103, 2, 2, 774, 775, 7, 104, 2, 2, 775, 776, 7, 99, 2, 2, 776, 777, 7, 119, 2, 2, 777, 778, 7, 110, 2, 2, 778, 779, 7, 118, 2, 2, 779, 100, 3, 2, 2, 2, 780, 781, 7, 102, 2, 2, 781, 782, 7, 113, 2, 2, 782, 102, 3, 2, 2, 2, 783, 784, 7, 102, 2, 2, 784, 785, 7, 113, 2, 2, 785, 786, 7, 119, 2, 2, 786, 787, 7, 100, 2, 2, 787, 788, 7, 110, 2, 2, 788, 789, 7, 103, 2, 2, 789, 104, 3, 2, 2, 2, 790, 791, 7, 103, 2, 2, 791, 792, 7, 110, 2, 2, 792, 793, 7, 117, 2, 2, 793, 794, 7, 103, 2, 2, 794, 106, 3, 2, 2, 2, 795, 796, 7, 103, 2, 2, 796, 797, 7, 112, 2, 2, 797, 798, 7, 119, 2, 2, 798, 799, 7, 111, 2, 2, 799, 108, 3, 2, 2, 2, 800, 801, 7, 103, 2, 2, 801, 802, 7, 122, 2, 2, 802, 803, 7, 118, 2, 2, 803, 804, 7, 103, 2, 2, 804, 805, 7, 112, 2, 2, 805, 806, 7, 102, 2, 2, 806, 807, 7, 117, 2, 2, 807, 110, 3, 2, 2, 2, 808, 809, 7, 104, 2, 2, 809, 810, 7, 107, 2, 2, 810, 811, 7, 112, 2, 2, 811, 812, 7, 99, 2, 2, 812, 813, 7, 110, 2, 2, 813, 112, 3, 2, 2, 2, 814, 815, 7, 104, 2, 2, 815, 816, 7, 107, 2, 2, 816, 817, 7, 112, 2, 2, 817, 818, 7, 99, 2, 2, 818, 819, 7, 110, 2, 2, 819, 820, 7, 110, 2, 2, 820, 821, 7, 123, 2, 2, 821, 114, 3, 2, 2, 2, 822, 823, 7, 104, 2, 2, 823, 824, 7, 110, 2, 2, 824, 825, 7, 113, 2, 2, 825, 826, 7, 99, 2, 2, 826, 827, 7, 118, 2, 2, 827, 116, 3, 2, 2, 2, 828, 829, 7, 104, 2, 2, 829, 830, 7, 113, 2, 2, 830, 831, 7, 116, 2, 2, 831, 118, 3, 2, 2, 2, 832, 833, 7, 107, 2, 2, 833, 834, 7, 104, 2, 2, 834, 120, 3, 2, 2, 2, 835, 836, 7, 105, 2, 2, 836, 837, 7, 113, 2, 2, 837, 838, 7, 118, 2, 2, 838, 839, 7, 113, 2, 2, 839, 122, 3, 2, 2, 2, 840, 841, 7, 107, 2, 2, 841, 842, 7, 111, 2, 2, 842, 843, 7, 114, 2, 2, 843, 844, 7, 110, 2, 2, 844, 845, 7, 103, 2, 2, 845, 846, 7, 111, 2, 2, 846, 847, 7, 103, 2, 2, 847, 848, 7, 112, 2, 2, 848, 849, 7, 118, 2, 2, 849, 850, 7, 117, 2, 2, 850, 124, 3, 2, 2, 2, 851, 852, 7, 107, 2, 2, 852, 853, 7, 111, 2, 2, 853, 854, 7, 114, 2, 2, 854, 855, 7, 113, 2, 2, 855, 856, 7, 116, 2, 2, 856, 857, 7, 118, 2, 2, 857, 126, 3, 2, 2, 2, 858, 859, 7, 107, 2, 2, 859, 860, 7, 112, 2, 2, 860, 861, 7, 117, 2, 2, 861, 862, 7, 118, 2, 2, 862, 863, 7, 99, 2, 2, 863, 864, 7, 112, 2, 2, 864, 865, 7, 101, 2, 2, 865, 866, 7, 103, 2, 2, 866, 867, 7, 113, 2, 2, 867, 868, 7, 104, 2, 2, 868, 128, 3, 2, 2, 2, 869, 870, 7, 107, 2, 2, 870, 871, 7, 112, 2, 2, 871, 872, 7, 118, 2, 2, 872, 130, 3, 2, 2, 2, 873, 874, 7, 107, 2, 2, 874, 875, 7, 112, 2, 2, 875, 876, 7, 118, 2, 2, 876, 877, 7, 103, 2, 2, 877, 878, 7, 116, 2, 2, 878, 879, 7, 104, 2, 2, 879, 880, 7, 99, 2, 2, 880, 881, 7, 101, 2, 2, 881, 882, 7, 103, 2, 2, 882, 132, 3, 2, 2, 2, 883, 884, 7, 110, 2, 2, 884, 885, 7, 113, 2, 2, 885, 886, 7, 112, 2, 2, 886, 887, 7, 105, 2, 2, 887, 134, 3, 2, 2, 2, 888, 889, 7, 112, 2, 2, 889, 890, 7, 99, 2, 2, 890, 891, 7, 118, 2, 2, 891, 892, 7, 107, 2, 2, 892, 893, 7, 120, 2, 2, 893, 894, 7, 103, 2, 2, 894, 136, 3, 2, 2, 2, 895, 896, 7, 112, 2, 2, 896, 897, 7, 103, 2, 2, 897, 898, 7, 121, 2, 2, 898, 138, 3, 2, 2, 2, 899, 900, 7, 114, 2, 2, 900, 901, 7, 99, 2, 2, 901, 902, 7, 101, 2, 2, 902, 903, 7, 109, 2, 2, 903, 904, 7, 99, 2, 2, 904, 905, 7, 105, 2, 2, 905, 906, 7, 103, 2, 2, 906, 140, 3, 2, 2, 2, 907, 908, 7, 114, 2, 2, 908, 909, 7, 116, 2, 2, 909, 910, 7, 107, 2, 2, 910, 911, 7, 120, 2, 2, 911, 912, 7, 99, 2, 2, 912, 913, 7, 118, 2, 2, 913, 914, 7, 103, 2, 2, 914, 142, 3, 2, 2, 2, 915, 916, 7, 114, 2, 2, 916, 917, 7, 116, 2, 2, 917, 918, 7, 113, 2, 2, 918, 919, 7, 118, 2, 2, 919, 920, 7, 103, 2, 2, 920, 921, 7, 101, 2, 2, 921, 922, 7, 118, 2, 2, 922, 923, 7, 103, 2, 2, 923, 924, 7, 102, 2, 2, 924, 144, 3, 2, 2, 2, 925, 926, 7, 114, 2, 2, 926, 927, 7, 119, 2, 2, 927, 928, 7, 100, 2, 2, 928, 929, 7, 110, 2, 2, 929, 930, 7, 107, 2, 2, 930, 931, 7, 101, 2, 2, 931, 146, 3, 2, 2, 2, 932, 933, 7, 116, 2, 2, 933, 934, 7, 103, 2, 2, 934, 935, 7, 118, 2, 2, 935, 936, 7, 119, 2, 2, 936, 937, 7, 116, 2, 2, 937, 938, 7, 112, 2, 2, 938, 148, 3, 2, 2, 2, 939, 940, 7, 117, 2, 2, 940, 941, 7, 106, 2, 2, 941, 942, 7, 113, 2, 2, 942, 943, 7, 116, 2, 2, 943, 944, 7, 118, 2, 2, 944, 150, 3, 2, 2, 2, 945, 946, 7, 117, 2, 2, 946, 947, 7, 118, 2, 2, 947, 948, 7, 99, 2, 2, 948, 949, 7, 118, 2, 2, 949, 950, 7, 107, 2, 2, 950, 951, 7, 101, 2, 2, 951, 152, 3, 2, 2, 2, 952, 953, 7, 117, 2, 2, 953, 954, 7, 118, 2, 2, 954, 955, 7, 116, 2, 2, 955, 956, 7, 107, 2, 2, 956, 957, 7, 101, 2, 2, 957, 958, 7, 118, 2, 2, 958, 959, 7, 104, 2, 2, 959, 960, 7, 114, 2, 2, 960, 154, 3, 2, 2, 2, 961, 962, 7, 117, 2, 2, 962, 963, 7, 119, 2, 2, 963, 964, 7, 114, 2, 2, 964, 965, 7, 103, 2, 2, 965, 966, 7, 116, 2, 2, 966, 156, 3, 2, 2, 2, 967, 968, 7, 117, 2, 2, 968, 969, 7, 121, 2, 2, 969, 970, 7, 107, 2, 2, 970, 971, 7, 118, 2, 2, 971, 972, 7, 101, 2, 2, 972, 973, 7, 106, 2, 2, 973, 158, 3, 2, 2, 2, 974, 975, 7, 117, 2, 2, 975, 976, 7, 123, 2, 2, 976, 977, 7, 112, 2, 2, 977, 978, 7, 101, 2, 2, 978, 979, 7, 106, 2, 2, 979, 980, 7, 116, 2, 2, 980, 981, 7, 113, 2, 2, 981, 982, 7, 112, 2, 2, 982, 983, 7, 107, 2, 2, 983, 984, 7, 124, 2, 2, 984, 985, 7, 103, 2, 2, 985, 986, 7, 102, 2, 2, 986, 160, 3, 2, 2, 2, 987, 988, 7, 118, 2, 2, 988, 989, 7, 106, 2, 2, 989, 990, 7, 107, 2, 2, 990, 991, 7, 117, 2, 2, 991, 162, 3, 2, 2, 2, 992, 993, 7, 118, 2, 2, 993, 994, 7, 106, 2, 2, 994, 995, 7, 116, 2, 2, 995, 996, 7, 113, 2, 2, 996, 997, 7, 121, 2, 2, 997, 164, 3, 2, 2, 2, 998, 999, 7, 118, 2, 2, 999, 1000, 7, 106, 2, 2, 1000, 1001, 7, 116, 2, 2, 1001, 1002, 7, 113, 2, 2, 1002, 1003, 7, 121, 2, 2, 1003, 1004, 7, 117, 2, 2, 1004, 166, 3, 2, 2, 2, 1005, 1006, 7, 118, 2, 2, 1006, 1007, 7, 116, 2, 2, 1007, 1008, 7, 99, 2, 2, 1008, 1009, 7, 112, 2, 2, 1009, 1010, 7, 117, 2, 2, 1010, 1011, 7, 107, 2, 2, 1011, 1012, 7, 103, 2, 2, 1012, 1013, 7, 112, 2, 2, 1013, 1014, 7, 118, 2, 2, 1014, 168, 3, 2, 2, 2, 1015, 1016, 7, 118, 2, 2, 1016, 1017, 7, 116, 2, 2, 1017, 1018, 7, 123, 2, 2, 1018, 170, 3, 2, 2, 2, 1019, 1020, 7, 120, 2, 2, 1020, 1021, 7, 113, 2, 2, 1021, 1022, 7, 107, 2, 2, 1022, 1023, 7, 102, 2, 2, 1023, 172, 3, 2, 2, 2, 1024, 1025, 7, 120, 2, 2, 1025, 1026, 7, 113, 2, 2, 1026, 1027, 7, 110, 2, 2, 1027, 1028, 7, 99, 2, 2, 1028, 1029, 7, 118, 2, 2, 1029, 1030, 7, 107, 2, 2, 1030, 1031, 7, 110, 2, 2, 1031, 1032, 7, 103, 2, 2, 1032, 174, 3, 2, 2, 2, 1033, 1034, 7, 121, 2, 2, 1034, 1035, 7, 106, 2, 2, 1035, 1036, 7, 107, 2, 2, 1036, 1037, 7, 110, 2, 2, 1037, 1038, 7, 103, 2, 2, 1038, 176, 3, 2, 2, 2, 1039, 1044, 5, 181, 88, 2, 1040, 1044, 5, 183, 89, 2, 1041, 1044, 5, 185, 90, 2, 1042, 1044, 5, 187, 91, 2, 1043, 1039, 3, 2, 2, 2, 1043, 1040, 3, 2, 2, 2, 1043, 1041, 3, 2, 2, 2, 1043, 1042, 3, 2, 2, 2, 1044, 1046, 3, 2, 2, 2, 1045, 1047, 5, 203, 99, 2, 1046, 1045, 3, 2, 2, 2, 1046, 1047, 3, 2, 2, 2, 1047, 1058, 3, 2, 2, 2, 1048, 1050, 5, 179, 87, 2, 1049, 1051, 9, 7, 2, 2, 1050, 1049, 3, 2, 2, 2, 1051, 1052, 3, 2, 2, 2, 1052, 1050, 3, 2, 2, 2, 1052, 1053, 3, 2, 2, 2, 1053, 1055, 3, 2, 2, 2, 1054, 1056, 5, 189, 92, 2, 1055, 1054, 3, 2, 2, 2, 1055, 1056, 3, 2, 2, 2, 1056, 1058, 3, 2, 2, 2, 1057, 1043, 3, 2, 2, 2, 1057, 1048, 3, 2, 2, 2, 1058, 178, 3, 2, 2, 2, 1059, 1060, 7, 50, 2, 2, 1060, 180, 3, 2, 2, 2, 1061, 1063, 5, 191, 93, 2, 1062, 1064, 5, 189, 92, 2, 1063, 1062, 3, 2, 2, 2, 1063, 1064, 3, 2, 2, 2, 1064, 182, 3, 2, 2, 2, 1065, 1067, 5, 205, 100, 2, 1066, 1068, 5, 189, 92, 2, 1067, 1066, 3, 2, 2, 2, 1067, 1068, 3, 2, 2, 2, 1068, 184, 3, 2, 2, 2, 1069, 1071, 5, 213, 104, 2, 1070, 1072, 5, 189, 92, 2, 1071, 1070, 3, 2, 2, 2, 1071, 1072, 3, 2, 2, 2, 1072, 186, 3, 2, 2, 2, 1073, 1075, 5, 221, 108, 2, 1074, 1076, 5, 189, 92, 2, 1075, 1074, 3, 2, 2, 2, 1075, 1076, 3, 2, 2, 2, 1076, 188, 3, 2, 2, 2, 1077, 1078, 9, 8, 2, 2, 1078, 190, 3, 2, 2, 2, 1079, 1090, 5, 179, 87, 2, 1080, 1087, 5, 197, 96, 2, 1081, 1083, 5, 193, 94, 2, 1082, 1081, 3, 2, 2, 2, 1082, 1083, 3, 2, 2, 2, 1083, 1088, 3, 2, 2, 2, 1084, 1085, 5, 201, 98, 2, 1085, 1086, 5, 193, 94, 2, 1086, 1088, 3, 2, 2, 2, 1087, 1082, 3, 2, 2, 2, 1087, 1084, 3, 2, 2, 2, 1088, 1090, 3, 2, 2, 2, 1089, 1079, 3, 2, 2, 2, 1089, 1080, 3, 2, 2, 2, 1090, 192, 3, 2, 2, 2, 1091, 1099, 5, 195, 95, 2, 1092, 1094, 5, 199, 97, 2, 1093, 1092, 3, 2, 2, 2, 1094, 1097, 3, 2, 2, 2, 1095, 1093, 3, 2, 2, 2, 1095, 1096, 3, 2, 2, 2, 1096, 1098, 3, 2, 2, 2, 1097, 1095, 3, 2, 2, 2, 1098, 1100, 5, 195, 95, 2, 1099, 1095, 3, 2, 2, 2, 1099, 1100, 3, 2, 2, 2, 1100, 194, 3, 2, 2, 2, 1101, 1104, 5, 179, 87, 2, 1102, 1104, 5, 197, 96, 2, 1103, 1101, 3, 2, 2, 2, 1103, 1102, 3, 2, 2, 2, 1104, 196, 3, 2, 2, 2, 1105, 1106, 9, 9, 2, 2, 1106, 198, 3, 2, 2, 2, 1107, 1110, 5, 195, 95, 2, 1108, 1110, 5, 203, 99, 2, 1109, 1107, 3, 2, 2, 2, 1109, 1108, 3, 2, 2, 2, 1110, 200, 3, 2, 2, 2, 1111, 1113, 5, 203, 99, 2, 1112, 1111, 3, 2, 2, 2, 1113, 1114, 3, 2, 2, 2, 1114, 1112, 3, 2, 2, 2, 1114, 1115, 3, 2, 2, 2, 1115, 202, 3, 2, 2, 2, 1116, 1117, 7, 97, 2, 2, 1117, 204, 3, 2, 2, 2, 1118, 1119, 5, 179, 87, 2, 1119, 1120, 9, 10, 2, 2, 1120, 1121, 5, 207, 101, 2, 1121, 206, 3, 2, 2, 2, 1122, 1130, 5, 209, 102, 2, 1123, 1125, 5, 211, 103, 2, 1124, 1123, 3, 2, 2, 2, 1125, 1128, 3, 2, 2, 2, 1126, 1124, 3, 2, 2, 2, 1126, 1127, 3, 2, 2, 2, 1127, 1129, 3, 2, 2, 2, 1128, 1126, 3, 2, 2, 2, 1129, 1131, 5, 209, 102, 2, 1130, 1126, 3, 2, 2, 2, 1130, 1131, 3, 2, 2, 2, 1131, 208, 3, 2, 2, 2, 1132, 1133, 9, 11, 2, 2, 1133, 210, 3, 2, 2, 2, 1134, 1137, 5, 209, 102, 2, 1135, 1137, 5, 203, 99, 2, 1136, 1134, 3, 2, 2, 2, 1136, 1135, 3, 2, 2, 2, 1137, 212, 3, 2, 2, 2, 1138, 1140, 5, 179, 87, 2, 1139, 1141, 5, 201, 98, 2, 1140, 1139, 3, 2, 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 3, 2, 2, 2, 1142, 1143, 5, 215, 105, 2, 1143, 214, 3, 2, 2, 2, 1144, 1152, 5, 217, 106, 2, 1145, 1147, 5, 219, 107, 2, 1146, 1145, 3, 2, 2, 2, 1147, 1150, 3, 2, 2, 2, 1148, 1146, 3, 2, 2, 2, 1148, 1149, 3, 2, 2, 2, 1149, 1151, 3, 2, 2, 2, 1150, 1148, 3, 2, 2, 2, 1151, 1153, 5, 217, 106, 2, 1152, 1148, 3, 2, 2, 2, 1152, 1153, 3, 2, 2, 2, 1153, 216, 3, 2, 2, 2, 1154, 1155, 9, 12, 2, 2, 1155, 218, 3, 2, 2, 2, 1156, 1159, 5, 217, 106, 2, 1157, 1159, 5, 203, 99, 2, 1158, 1156, 3, 2, 2, 2, 1158, 1157, 3, 2, 2, 2, 1159, 220, 3, 2, 2, 2, 1160, 1161, 5, 179, 87, 2, 1161, 1162, 9, 13, 2, 2, 1162, 1163, 5, 223, 109, 2, 1163, 222, 3, 2, 2, 2, 1164, 1172, 5, 225, 110, 2, 1165, 1167, 5, 227, 111, 2, 1166, 1165, 3, 2, 2, 2, 1167, 1170, 3, 2, 2, 2, 1168, 1166, 3, 2, 2, 2, 1168, 1169, 3, 2, 2, 2, 1169, 1171, 3, 2, 2, 2, 1170, 1168, 3, 2, 2, 2, 1171, 1173, 5, 225, 110, 2, 1172, 1168, 3, 2, 2, 2, 1172, 1173, 3, 2, 2, 2, 1173, 224, 3, 2, 2, 2, 1174, 1175, 9, 14, 2, 2, 1175, 226, 3, 2, 2, 2, 1176, 1179, 5, 225, 110, 2, 1177, 1179, 5, 203, 99, 2, 1178, 1176, 3, 2, 2, 2, 1178, 1177, 3, 2, 2, 2, 1179, 228, 3, 2, 2, 2, 1180, 1183, 5, 231, 113, 2, 1181, 1183, 5, 243, 119, 2, 1182, 1180, 3, 2, 2, 2, 1182, 1181, 3, 2, 2, 2, 1183, 1185, 3, 2, 2, 2, 1184, 1186, 5, 203, 99, 2, 1185, 1184, 3, 2, 2, 2, 1185, 1186, 3, 2, 2, 2, 1186, 230, 3, 2, 2, 2, 1187, 1188, 5, 193, 94, 2, 1188, 1189, 5, 251, 123, 2, 1189, 1191, 5, 193, 94, 2, 1190, 1192, 5, 233, 114, 2, 1191, 1190, 3, 2, 2, 2, 1191, 1192, 3, 2, 2, 2, 1192, 1194, 3, 2, 2, 2, 1193, 1195, 5, 241, 118, 2, 1194, 1193, 3, 2, 2, 2, 1194, 1195, 3, 2, 2, 2, 1195, 1205, 3, 2, 2, 2, 1196, 1197, 5, 193, 94, 2, 1197, 1199, 5, 233, 114, 2, 1198, 1200, 5, 241, 118, 2, 1199, 1198, 3, 2, 2, 2, 1199, 1200, 3, 2, 2, 2, 1200, 1205, 3, 2, 2, 2, 1201, 1202, 5, 193, 94, 2, 1202, 1203, 5, 241, 118, 2, 1203, 1205, 3, 2, 2, 2, 1204, 1187, 3, 2, 2, 2, 1204, 1196, 3, 2, 2, 2, 1204, 1201, 3, 2, 2, 2, 1205, 232, 3, 2, 2, 2, 1206, 1207, 5, 235, 115, 2, 1207, 1208, 5, 237, 116, 2, 1208, 234, 3, 2, 2, 2, 1209, 1210, 9, 15, 2, 2, 1210, 236, 3, 2, 2, 2, 1211, 1213, 5, 239, 117, 2, 1212, 1211, 3, 2, 2, 2, 1212, 1213, 3, 2, 2, 2, 1213, 1214, 3, 2, 2, 2, 1214, 1215, 5, 193, 94, 2, 1215, 238, 3, 2, 2, 2, 1216, 1217, 9, 16, 2, 2, 1217, 240, 3, 2, 2, 2, 1218, 1219, 9, 17, 2, 2, 1219, 242, 3, 2, 2, 2, 1220, 1221, 5, 245, 120, 2, 1221, 1223, 5, 247, 121, 2, 1222, 1224, 5, 241, 118, 2, 1223, 1222, 3, 2, 2, 2, 1223, 1224, 3, 2, 2, 2, 1224, 244, 3, 2, 2, 2, 1225, 1227, 5, 205, 100, 2, 1226, 1228, 5, 251, 123, 2, 1227, 1226, 3, 2, 2, 2, 1227, 1228, 3, 2, 2, 2, 1228, 1238, 3, 2, 2, 2, 1229, 1230, 5, 179, 87, 2, 1230, 1232, 9, 10, 2, 2, 1231, 1233, 5, 207, 101, 2, 1232, 1231, 3, 2, 2, 2, 1232, 1233, 3, 2, 2, 2, 1233, 1234, 3, 2, 2, 2, 1234, 1235, 5, 251, 123, 2, 1235, 1236, 5, 207, 101, 2, 1236, 1238, 3, 2, 2, 2, 1237, 1225, 3, 2, 2, 2, 1237, 1229, 3, 2, 2, 2, 1238, 246, 3, 2, 2, 2, 1239, 1240, 5, 249, 122, 2, 1240, 1241, 5, 237, 116, 2, 1241, 248, 3, 2, 2, 2, 1242, 1243, 9, 18, 2, 2, 1243, 250, 3, 2, 2, 2, 1244, 1245, 7, 48, 2, 2, 1245, 252, 3, 2, 2, 2, 1246, 1247, 7, 118, 2, 2, 1247, 1248, 7, 116, 2, 2, 1248, 1249, 7, 119, 2, 2, 1249, 1256, 7, 103, 2, 2, 1250, 1251, 7, 104, 2, 2, 1251, 1252, 7, 99, 2, 2, 1252, 1253, 7, 110, 2, 2, 1253, 1254, 7, 117, 2, 2, 1254, 1256, 7, 103, 2, 2, 1255, 1246, 3, 2, 2, 2, 1255, 1250, 3, 2, 2, 2, 1256, 254, 3, 2, 2, 2, 1257, 1258, 5, 269, 132, 2, 1258, 1259, 9, 19, 2, 2, 1259, 1265, 3, 2, 2, 2, 1260, 1265, 5, 257, 126, 2, 1261, 1265, 5, 259, 127, 2, 1262, 1265, 5, 263, 129, 2, 1263, 1265, 5, 265, 130, 2, 1264, 1257, 3, 2, 2, 2, 1264, 1260, 3, 2, 2, 2, 1264, 1261, 3, 2, 2, 2, 1264, 1262, 3, 2, 2, 2, 1264, 1263, 3, 2, 2, 2, 1265, 256, 3, 2, 2, 2, 1266, 1267, 5, 269, 132, 2, 1267, 1268, 5, 217, 106, 2, 1268, 1279, 3, 2, 2, 2, 1269, 1270, 5, 269, 132, 2, 1270, 1271, 5, 217, 106, 2, 1271, 1272, 5, 217, 106, 2, 1272, 1279, 3, 2, 2, 2, 1273, 1274, 5, 269, 132, 2, 1274, 1275, 5, 261, 128, 2, 1275, 1276, 5, 217, 106, 2, 1276, 1277, 5, 217, 106, 2, 1277, 1279, 3, 2, 2, 2, 1278, 1266, 3, 2, 2, 2, 1278, 1269, 3, 2, 2, 2, 1278, 1273, 3, 2, 2, 2, 1279, 258, 3, 2, 2, 2, 1280, 1281, 5, 269, 132, 2, 1281, 1282, 7, 119, 2, 2, 1282, 1283, 5, 209, 102, 2, 1283, 1284, 5, 209, 102, 2, 1284, 1285, 5, 209, 102, 2, 1285, 1286, 5, 209, 102, 2, 1286, 260, 3, 2, 2, 2, 1287, 1288, 9, 20, 2, 2, 1288, 262, 3, 2, 2, 2, 1289, 1290, 5, 269, 132, 2, 1290, 1291, 5, 273, 134, 2, 1291, 264, 3, 2, 2, 2, 1292, 1294, 5, 269, 132, 2, 1293, 1295, 7, 15, 2, 2, 1294, 1293, 3, 2, 2, 2, 1294, 1295, 3, 2, 2, 2, 1295, 1296, 3, 2, 2, 2, 1296, 1297, 7, 12, 2, 2, 1297, 266, 3, 2, 2, 2, 1298, 1299, 5, 269, 132, 2, 1299, 1300, 5, 271, 133, 2, 1300, 268, 3, 2, 2, 2, 1301, 1302, 7, 94, 2, 2, 1302, 270, 3, 2, 2, 2, 1303, 1304, 7, 49, 2, 2, 1304, 272, 3, 2, 2, 2, 1305, 1306, 7, 38, 2, 2, 1306, 274, 3, 2, 2, 2, 1307, 1308, 7, 36, 2, 2, 1308, 276, 3, 2, 2, 2, 1309, 1310, 7, 41, 2, 2, 1310, 278, 3, 2, 2, 2, 1311, 1312, 7, 36, 2, 2, 1312, 1313, 7, 36, 2, 2, 1313, 1314, 7, 36, 2, 2, 1314, 280, 3, 2, 2, 2, 1315, 1316, 7, 41, 2, 2, 1316, 1317, 7, 41, 2, 2, 1317, 1318, 7, 41, 2, 2, 1318, 282, 3, 2, 2, 2, 1319, 1320, 7, 38, 2, 2, 1320, 1321, 7, 49, 2, 2, 1321, 284, 3, 2, 2, 2, 1322, 1323, 7, 49, 2, 2, 1323, 1324, 7, 38, 2, 2, 1324, 286, 3, 2, 2, 2, 1325, 1326, 7, 38, 2, 2, 1326, 1327, 7, 49, 2, 2, 1327, 1328, 7, 38, 2, 2, 1328, 288, 3, 2, 2, 2, 1329, 1330, 7, 38, 2, 2, 1330, 1331, 7, 38, 2, 2, 1331, 290, 3, 2, 2, 2, 1332, 1333, 7, 112, 2, 2, 1333, 1334, 7, 119, 2, 2, 1334, 1335, 7, 110, 2, 2, 1335, 1336, 7, 110, 2, 2, 1336, 292, 3, 2, 2, 2, 1337, 1338, 7, 48, 2, 2, 1338, 1339, 7, 48, 2, 2, 1339, 294, 3, 2, 2, 2, 1340, 1341, 7, 48, 2, 2, 1341, 1342, 7, 48, 2, 2, 1342, 1343, 7, 62, 2, 2, 1343, 296, 3, 2, 2, 2, 1344, 1345, 7, 44, 2, 2, 1345, 1346, 7, 48, 2, 2, 1346, 298, 3, 2, 2, 2, 1347, 1348, 7, 65, 2, 2, 1348, 1349, 7, 48, 2, 2, 1349, 300, 3, 2, 2, 2, 1350, 1351, 7, 65, 2, 2, 1351, 1352, 7, 65, 2, 2, 1352, 1353, 7, 48, 2, 2, 1353, 302, 3, 2, 2, 2, 1354, 1355, 7, 65, 2, 2, 1355, 1356, 7, 60, 2, 2, 1356, 304, 3, 2, 2, 2, 1357, 1358, 7, 48, 2, 2, 1358, 1359, 7, 40, 2, 2, 1359, 306, 3, 2, 2, 2, 1360, 1361, 7, 60, 2, 2, 1361, 1362, 7, 60, 2, 2, 1362, 308, 3, 2, 2, 2, 1363, 1364, 7, 63, 2, 2, 1364, 1365, 7, 128, 2, 2, 1365, 310, 3, 2, 2, 2, 1366, 1367, 7, 63, 2, 2, 1367, 1368, 7, 63, 2, 2, 1368, 1369, 7, 128, 2, 2, 1369, 312, 3, 2, 2, 2, 1370, 1371, 7, 44, 2, 2, 1371, 1372, 7, 44, 2, 2, 1372, 314, 3, 2, 2, 2, 1373, 1374, 7, 44, 2, 2, 1374, 1375, 7, 44, 2, 2, 1375, 1376, 7, 63, 2, 2, 1376, 316, 3, 2, 2, 2, 1377, 1378, 7, 62, 2, 2, 1378, 1379, 7, 63, 2, 2, 1379, 1380, 7, 64, 2, 2, 1380, 318, 3, 2, 2, 2, 1381, 1382, 7, 63, 2, 2, 1382, 1383, 7, 63, 2, 2, 1383, 1384, 7, 63, 2, 2, 1384, 320, 3, 2, 2, 2, 1385, 1386, 7, 35, 2, 2, 1386, 1387, 7, 63, 2, 2, 1387, 1388, 7, 63, 2, 2, 1388, 322, 3, 2, 2, 2, 1389, 1390, 7, 47, 2, 2, 1390, 1391, 7, 64, 2, 2, 1391, 324, 3, 2, 2, 2, 1392, 1393, 7, 35, 2, 2, 1393, 1394, 7, 107, 2, 2, 1394, 1395, 7, 112, 2, 2, 1395, 1396, 7, 117, 2, 2, 1396, 1397, 7, 118, 2, 2, 1397, 1398, 7, 99, 2, 2, 1398, 1399, 7, 112, 2, 2, 1399, 1400, 7, 101, 2, 2, 1400, 1401, 7, 103, 2, 2, 1401, 1402, 7, 113, 2, 2, 1402, 1403, 7, 104, 2, 2, 1403, 326, 3, 2, 2, 2, 1404, 1405, 7, 35, 2, 2, 1405, 1406, 7, 107, 2, 2, 1406, 1407, 7, 112, 2, 2, 1407, 328, 3, 2, 2, 2, 1408, 1409, 7, 42, 2, 2, 1409, 1410, 3, 2, 2, 2, 1410, 1411, 8, 162, 13, 2, 1411, 330, 3, 2, 2, 2, 1412, 1413, 7, 43, 2, 2, 1413, 1414, 3, 2, 2, 2, 1414, 1415, 8, 163, 8, 2, 1415, 332, 3, 2, 2, 2, 1416, 1417, 7, 125, 2, 2, 1417, 1418, 3, 2, 2, 2, 1418, 1419, 8, 164, 13, 2, 1419, 334, 3, 2, 2, 2, 1420, 1421, 7, 127, 2, 2, 1421, 1422, 3, 2, 2, 2, 1422, 1423, 8, 165, 8, 2, 1423, 336, 3, 2, 2, 2, 1424, 1425, 7, 93, 2, 2, 1425, 1426, 3, 2, 2, 2, 1426, 1427, 8, 166, 13, 2, 1427, 338, 3, 2, 2, 2, 1428, 1429, 7, 95, 2, 2, 1429, 1430, 3, 2, 2, 2, 1430, 1431, 8, 167, 8, 2, 1431, 340, 3, 2, 2, 2, 1432, 1433, 7, 61, 2, 2, 1433, 342, 3, 2, 2, 2, 1434, 1435, 7, 46, 2, 2, 1435, 344, 3, 2, 2, 2, 1436, 1437, 5, 251, 123, 2, 1437, 346, 3, 2, 2, 2, 1438, 1439, 7, 63, 2, 2, 1439, 348, 3, 2, 2, 2, 1440, 1441, 7, 64, 2, 2, 1441, 350, 3, 2, 2, 2, 1442, 1443, 7, 62, 2, 2, 1443, 352, 3, 2, 2, 2, 1444, 1445, 7, 35, 2, 2, 1445, 354, 3, 2, 2, 2, 1446, 1447, 7, 128, 2, 2, 1447, 356, 3, 2, 2, 2, 1448, 1449, 7, 65, 2, 2, 1449, 358, 3, 2, 2, 2, 1450, 1451, 7, 60, 2, 2, 1451, 360, 3, 2, 2, 2, 1452, 1453, 7, 63, 2, 2, 1453, 1454, 7, 63, 2, 2, 1454, 362, 3, 2, 2, 2, 1455, 1456, 7, 62, 2, 2, 1456, 1457, 7, 63, 2, 2, 1457, 364, 3, 2, 2, 2, 1458, 1459, 7, 64, 2, 2, 1459, 1460, 7, 63, 2, 2, 1460, 366, 3, 2, 2, 2, 1461, 1462, 7, 35, 2, 2, 1462, 1463, 7, 63, 2, 2, 1463, 368, 3, 2, 2, 2, 1464, 1465, 7, 40, 2, 2, 1465, 1466, 7, 40, 2, 2, 1466, 370, 3, 2, 2, 2, 1467, 1468, 7, 126, 2, 2, 1468, 1469, 7, 126, 2, 2, 1469, 372, 3, 2, 2, 2, 1470, 1471, 7, 45, 2, 2, 1471, 1472, 7, 45, 2, 2, 1472, 374, 3, 2, 2, 2, 1473, 1474, 7, 47, 2, 2, 1474, 1475, 7, 47, 2, 2, 1475, 376, 3, 2, 2, 2, 1476, 1477, 7, 45, 2, 2, 1477, 378, 3, 2, 2, 2, 1478, 1479, 7, 47, 2, 2, 1479, 380, 3, 2, 2, 2, 1480, 1481, 7, 44, 2, 2, 1481, 382, 3, 2, 2, 2, 1482, 1483, 5, 271, 133, 2, 1483, 384, 3, 2, 2, 2, 1484, 1485, 7, 40, 2, 2, 1485, 386, 3, 2, 2, 2, 1486, 1487, 7, 126, 2, 2, 1487, 388, 3, 2, 2, 2, 1488, 1489, 7, 96, 2, 2, 1489, 390, 3, 2, 2, 2, 1490, 1491, 7, 39, 2, 2, 1491, 392, 3, 2, 2, 2, 1492, 1493, 7, 45, 2, 2, 1493, 1494, 7, 63, 2, 2, 1494, 394, 3, 2, 2, 2, 1495, 1496, 7, 47, 2, 2, 1496, 1497, 7, 63, 2, 2, 1497, 396, 3, 2, 2, 2, 1498, 1499, 7, 44, 2, 2, 1499, 1500, 7, 63, 2, 2, 1500, 398, 3, 2, 2, 2, 1501, 1502, 7, 49, 2, 2, 1502, 1503, 7, 63, 2, 2, 1503, 400, 3, 2, 2, 2, 1504, 1505, 7, 40, 2, 2, 1505, 1506, 7, 63, 2, 2, 1506, 402, 3, 2, 2, 2, 1507, 1508, 7, 126, 2, 2, 1508, 1509, 7, 63, 2, 2, 1509, 404, 3, 2, 2, 2, 1510, 1511, 7, 96, 2, 2, 1511, 1512, 7, 63, 2, 2, 1512, 406, 3, 2, 2, 2, 1513, 1514, 7, 39, 2, 2, 1514, 1515, 7, 63, 2, 2, 1515, 408, 3, 2, 2, 2, 1516, 1517, 7, 62, 2, 2, 1517, 1518, 7, 62, 2, 2, 1518, 1519, 7, 63, 2, 2, 1519, 410, 3, 2, 2, 2, 1520, 1521, 7, 64, 2, 2, 1521, 1522, 7, 64, 2, 2, 1522, 1523, 7, 63, 2, 2, 1523, 412, 3, 2, 2, 2, 1524, 1525, 7, 64, 2, 2, 1525, 1526, 7, 64, 2, 2, 1526, 1527, 7, 64, 2, 2, 1527, 1528, 7, 63, 2, 2, 1528, 414, 3, 2, 2, 2, 1529, 1530, 7, 65, 2, 2, 1530, 1531, 7, 63, 2, 2, 1531, 416, 3, 2, 2, 2, 1532, 1536, 9, 21, 2, 2, 1533, 1535, 5, 429, 212, 2, 1534, 1533, 3, 2, 2, 2, 1535, 1538, 3, 2, 2, 2, 1536, 1534, 3, 2, 2, 2, 1536, 1537, 3, 2, 2, 2, 1537, 418, 3, 2, 2, 2, 1538, 1536, 3, 2, 2, 2, 1539, 1543, 5, 427, 211, 2, 1540, 1542, 5, 429, 212, 2, 1541, 1540, 3, 2, 2, 2, 1542, 1545, 3, 2, 2, 2, 1543, 1541, 3, 2, 2, 2, 1543, 1544, 3, 2, 2, 2, 1544, 420, 3, 2, 2, 2, 1545, 1543, 3, 2, 2, 2, 1546, 1550, 5, 423, 209, 2, 1547, 1549, 5, 425, 210, 2, 1548, 1547, 3, 2, 2, 2, 1549, 1552, 3, 2, 2, 2, 1550, 1548, 3, 2, 2, 2, 1550, 1551, 3, 2, 2, 2, 1551, 422, 3, 2, 2, 2, 1552, 1550, 3, 2, 2, 2, 1553, 1558, 9, 22, 2, 2, 1554, 1558, 10, 23, 2, 2, 1555, 1556, 9, 24, 2, 2, 1556, 1558, 9, 25, 2, 2, 1557, 1553, 3, 2, 2, 2, 1557, 1554, 3, 2, 2, 2, 1557, 1555, 3, 2, 2, 2, 1558, 424, 3, 2, 2, 2, 1559, 1564, 9, 26, 2, 2, 1560, 1564, 10, 23, 2, 2, 1561, 1562, 9, 24, 2, 2, 1562, 1564, 9, 25, 2, 2, 1563, 1559, 3, 2, 2, 2, 1563, 1560, 3, 2, 2, 2, 1563, 1561, 3, 2, 2, 2, 1564, 426, 3, 2, 2, 2, 1565, 1570, 9, 27, 2, 2, 1566, 1570, 10, 23, 2, 2, 1567, 1568, 9, 24, 2, 2, 1568, 1570, 9, 25, 2, 2, 1569, 1565, 3, 2, 2, 2, 1569, 1566, 3, 2, 2, 2, 1569, 1567, 3, 2, 2, 2, 1570, 428, 3, 2, 2, 2, 1571, 1576, 9, 28, 2, 2, 1572, 1576, 10, 23, 2, 2, 1573, 1574, 9, 24, 2, 2, 1574, 1576, 9, 25, 2, 2, 1575, 1571, 3, 2, 2, 2, 1575, 1572, 3, 2, 2, 2, 1575, 1573, 3, 2, 2, 2, 1576, 430, 3, 2, 2, 2, 1577, 1578, 7, 66, 2, 2, 1578, 432, 3, 2, 2, 2, 1579, 1580, 7, 48, 2, 2, 1580, 1581, 7, 48, 2, 2, 1581, 1582, 7, 48, 2, 2, 1582, 434, 3, 2, 2, 2, 1583, 1585, 9, 29, 2, 2, 1584, 1583, 3, 2, 2, 2, 1585, 1586, 3, 2, 2, 2, 1586, 1584, 3, 2, 2, 2, 1586, 1587, 3, 2, 2, 2, 1587, 1594, 3, 2, 2, 2, 1588, 1590, 5, 265, 130, 2, 1589, 1588, 3, 2, 2, 2, 1590, 1591, 3, 2, 2, 2, 1591, 1589, 3, 2, 2, 2, 1591, 1592, 3, 2, 2, 2, 1592, 1594, 3, 2, 2, 2, 1593, 1584, 3, 2, 2, 2, 1593, 1589, 3, 2, 2, 2, 1594, 1595, 3, 2, 2, 2, 1595, 1596, 8, 215, 16, 2, 1596, 436, 3, 2, 2, 2, 1597, 1599, 7, 15, 2, 2, 1598, 1597, 3, 2, 2, 2, 1598, 1599, 3, 2, 2, 2, 1599, 1600, 3, 2, 2, 2, 1600, 1601, 7, 12, 2, 2, 1601, 438, 3, 2, 2, 2, 1602, 1603, 7, 49, 2, 2, 1603, 1604, 7, 44, 2, 2, 1604, 1608, 3, 2, 2, 2, 1605, 1607, 11, 2, 2, 2, 1606, 1605, 3, 2, 2, 2, 1607, 1610, 3, 2, 2, 2, 1608, 1609, 3, 2, 2, 2, 1608, 1606, 3, 2, 2, 2, 1609, 1611, 3, 2, 2, 2, 1610, 1608, 3, 2, 2, 2, 1611, 1612, 7, 44, 2, 2, 1612, 1613, 7, 49, 2, 2, 1613, 1614, 3, 2, 2, 2, 1614, 1615, 8, 217, 17, 2, 1615, 440, 3, 2, 2, 2, 1616, 1617, 7, 49, 2, 2, 1617, 1618, 7, 49, 2, 2, 1618, 1622, 3, 2, 2, 2, 1619, 1621, 10, 30, 2, 2, 1620, 1619, 3, 2, 2, 2, 1621, 1624, 3, 2, 2, 2, 1622, 1620, 3, 2, 2, 2, 1622, 1623, 3, 2, 2, 2, 1623, 1625, 3, 2, 2, 2, 1624, 1622, 3, 2, 2, 2, 1625, 1626, 8, 218, 17, 2, 1626, 442, 3, 2, 2, 2, 1627, 1628, 7, 37, 2, 2, 1628, 1629, 7, 35, 2, 2, 1629, 1633, 3, 2, 2, 2, 1630, 1632, 10, 30, 2, 2, 1631, 1630, 3, 2, 2, 2, 1632, 1635, 3, 2, 2, 2, 1633, 1631, 3, 2, 2, 2, 1633, 1634, 3, 2, 2, 2, 1634, 1636, 3, 2, 2, 2, 1635, 1633, 3, 2, 2, 2, 1636, 1637, 8, 219, 16, 2, 1637, 444, 3, 2, 2, 2, 1638, 1639, 11, 2, 2, 2, 1639, 446, 3, 2, 2, 2, 84, 2, 3, 4, 5, 6, 7, 8, 451, 460, 469, 477, 486, 495, 499, 505, 517, 530, 543, 579, 630, 634, 639, 644, 649, 657, 698, 1043, 1046, 1052, 1055, 1057, 1063, 1067, 1071, 1075, 1082, 1087, 1089, 1095, 1099, 1103, 1109, 1114, 1126, 1130, 1136, 1140, 1148, 1152, 1158, 1168, 1172, 1178, 1182, 1185, 1191, 1194, 1199, 1204, 1212, 1223, 1227, 1232, 1237, 1255, 1264, 1278, 1294, 1536, 1543, 1550, 1557, 1563, 1569, 1575, 1586, 1591, 1593, 1598, 1608, 1622, 1633, 18, 7, 3, 2, 7, 7, 2, 9, 4, 2, 7, 4, 2, 7, 5, 2, 7, 6, 2, 6, 2, 2, 5, 2, 2, 9, 5, 2, 9, 6, 2, 9, 82, 2, 7, 2, 2, 9, 125, 2, 7, 8, 2, 8, 2, 2, 9, 129, 2] \ No newline at end of file diff --git a/languages/groovy/GroovyLexer.tokens b/languages/groovy/GroovyLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..e86dacaff915bb9c2301caa6f620cdaa6bcaa326 --- /dev/null +++ b/languages/groovy/GroovyLexer.tokens @@ -0,0 +1,240 @@ +StringLiteral=1 +GStringBegin=2 +GStringEnd=3 +GStringPart=4 +GStringPathPart=5 +RollBackOne=6 +AS=7 +DEF=8 +IN=9 +TRAIT=10 +THREADSAFE=11 +VAR=12 +BuiltInPrimitiveType=13 +ABSTRACT=14 +ASSERT=15 +BREAK=16 +CASE=17 +CATCH=18 +CLASS=19 +CONST=20 +CONTINUE=21 +DEFAULT=22 +DO=23 +ELSE=24 +ENUM=25 +EXTENDS=26 +FINAL=27 +FINALLY=28 +FOR=29 +IF=30 +GOTO=31 +IMPLEMENTS=32 +IMPORT=33 +INSTANCEOF=34 +INTERFACE=35 +NATIVE=36 +NEW=37 +PACKAGE=38 +PRIVATE=39 +PROTECTED=40 +PUBLIC=41 +RETURN=42 +STATIC=43 +STRICTFP=44 +SUPER=45 +SWITCH=46 +SYNCHRONIZED=47 +THIS=48 +THROW=49 +THROWS=50 +TRANSIENT=51 +TRY=52 +VOID=53 +VOLATILE=54 +WHILE=55 +IntegerLiteral=56 +FloatingPointLiteral=57 +BooleanLiteral=58 +NullLiteral=59 +RANGE_INCLUSIVE=60 +RANGE_EXCLUSIVE=61 +SPREAD_DOT=62 +SAFE_DOT=63 +SAFE_CHAIN_DOT=64 +ELVIS=65 +METHOD_POINTER=66 +METHOD_REFERENCE=67 +REGEX_FIND=68 +REGEX_MATCH=69 +POWER=70 +POWER_ASSIGN=71 +SPACESHIP=72 +IDENTICAL=73 +NOT_IDENTICAL=74 +ARROW=75 +NOT_INSTANCEOF=76 +NOT_IN=77 +LPAREN=78 +RPAREN=79 +LBRACE=80 +RBRACE=81 +LBRACK=82 +RBRACK=83 +SEMI=84 +COMMA=85 +DOT=86 +ASSIGN=87 +GT=88 +LT=89 +NOT=90 +BITNOT=91 +QUESTION=92 +COLON=93 +EQUAL=94 +LE=95 +GE=96 +NOTEQUAL=97 +AND=98 +OR=99 +INC=100 +DEC=101 +ADD=102 +SUB=103 +MUL=104 +DIV=105 +BITAND=106 +BITOR=107 +XOR=108 +MOD=109 +ADD_ASSIGN=110 +SUB_ASSIGN=111 +MUL_ASSIGN=112 +DIV_ASSIGN=113 +AND_ASSIGN=114 +OR_ASSIGN=115 +XOR_ASSIGN=116 +MOD_ASSIGN=117 +LSHIFT_ASSIGN=118 +RSHIFT_ASSIGN=119 +URSHIFT_ASSIGN=120 +ELVIS_ASSIGN=121 +CapitalizedIdentifier=122 +Identifier=123 +AT=124 +ELLIPSIS=125 +WS=126 +NL=127 +SH_COMMENT=128 +UNEXPECTED_CHAR=129 +'as'=7 +'def'=8 +'in'=9 +'trait'=10 +'threadsafe'=11 +'var'=12 +'abstract'=14 +'assert'=15 +'break'=16 +'case'=17 +'catch'=18 +'class'=19 +'const'=20 +'continue'=21 +'default'=22 +'do'=23 +'else'=24 +'enum'=25 +'extends'=26 +'final'=27 +'finally'=28 +'for'=29 +'if'=30 +'goto'=31 +'implements'=32 +'import'=33 +'instanceof'=34 +'interface'=35 +'native'=36 +'new'=37 +'package'=38 +'private'=39 +'protected'=40 +'public'=41 +'return'=42 +'static'=43 +'strictfp'=44 +'super'=45 +'switch'=46 +'synchronized'=47 +'this'=48 +'throw'=49 +'throws'=50 +'transient'=51 +'try'=52 +'void'=53 +'volatile'=54 +'while'=55 +'null'=59 +'..'=60 +'..<'=61 +'*.'=62 +'?.'=63 +'??.'=64 +'?:'=65 +'.&'=66 +'::'=67 +'=~'=68 +'==~'=69 +'**'=70 +'**='=71 +'<=>'=72 +'==='=73 +'!=='=74 +'->'=75 +'!instanceof'=76 +'!in'=77 +'('=78 +')'=79 +'{'=80 +'}'=81 +'['=82 +']'=83 +';'=84 +','=85 +'='=87 +'>'=88 +'<'=89 +'!'=90 +'~'=91 +'?'=92 +':'=93 +'=='=94 +'<='=95 +'>='=96 +'!='=97 +'&&'=98 +'||'=99 +'++'=100 +'--'=101 +'+'=102 +'-'=103 +'*'=104 +'&'=106 +'|'=107 +'^'=108 +'%'=109 +'+='=110 +'-='=111 +'*='=112 +'/='=113 +'&='=114 +'|='=115 +'^='=116 +'%='=117 +'<<='=118 +'>>='=119 +'>>>='=120 +'?='=121 +'@'=124 +'...'=125 diff --git a/languages/groovy/GroovyParser.interp b/languages/groovy/GroovyParser.interp new file mode 100644 index 0000000000000000000000000000000000000000..a02ff1be4df0ed2f8bc63e30f90c6982b9d08f74 --- /dev/null +++ b/languages/groovy/GroovyParser.interp @@ -0,0 +1,420 @@ +token literal names: +null +null +null +null +null +null +null +'as' +'def' +'in' +'trait' +'threadsafe' +'var' +null +'abstract' +'assert' +'break' +'case' +'catch' +'class' +'const' +'continue' +'default' +'do' +'else' +'enum' +'extends' +'final' +'finally' +'for' +'if' +'goto' +'implements' +'import' +'instanceof' +'interface' +'native' +'new' +'package' +'private' +'protected' +'public' +'return' +'static' +'strictfp' +'super' +'switch' +'synchronized' +'this' +'throw' +'throws' +'transient' +'try' +'void' +'volatile' +'while' +null +null +null +'null' +'..' +'..<' +'*.' +'?.' +'??.' +'?:' +'.&' +'::' +'=~' +'==~' +'**' +'**=' +'<=>' +'===' +'!==' +'->' +'!instanceof' +'!in' +'(' +')' +'{' +'}' +'[' +']' +';' +',' +null +'=' +'>' +'<' +'!' +'~' +'?' +':' +'==' +'<=' +'>=' +'!=' +'&&' +'||' +'++' +'--' +'+' +'-' +'*' +null +'&' +'|' +'^' +'%' +'+=' +'-=' +'*=' +'/=' +'&=' +'|=' +'^=' +'%=' +'<<=' +'>>=' +'>>>=' +'?=' +null +null +'@' +'...' +null +null +null +null + +token symbolic names: +null +StringLiteral +GStringBegin +GStringEnd +GStringPart +GStringPathPart +RollBackOne +AS +DEF +IN +TRAIT +THREADSAFE +VAR +BuiltInPrimitiveType +ABSTRACT +ASSERT +BREAK +CASE +CATCH +CLASS +CONST +CONTINUE +DEFAULT +DO +ELSE +ENUM +EXTENDS +FINAL +FINALLY +FOR +IF +GOTO +IMPLEMENTS +IMPORT +INSTANCEOF +INTERFACE +NATIVE +NEW +PACKAGE +PRIVATE +PROTECTED +PUBLIC +RETURN +STATIC +STRICTFP +SUPER +SWITCH +SYNCHRONIZED +THIS +THROW +THROWS +TRANSIENT +TRY +VOID +VOLATILE +WHILE +IntegerLiteral +FloatingPointLiteral +BooleanLiteral +NullLiteral +RANGE_INCLUSIVE +RANGE_EXCLUSIVE +SPREAD_DOT +SAFE_DOT +SAFE_CHAIN_DOT +ELVIS +METHOD_POINTER +METHOD_REFERENCE +REGEX_FIND +REGEX_MATCH +POWER +POWER_ASSIGN +SPACESHIP +IDENTICAL +NOT_IDENTICAL +ARROW +NOT_INSTANCEOF +NOT_IN +LPAREN +RPAREN +LBRACE +RBRACE +LBRACK +RBRACK +SEMI +COMMA +DOT +ASSIGN +GT +LT +NOT +BITNOT +QUESTION +COLON +EQUAL +LE +GE +NOTEQUAL +AND +OR +INC +DEC +ADD +SUB +MUL +DIV +BITAND +BITOR +XOR +MOD +ADD_ASSIGN +SUB_ASSIGN +MUL_ASSIGN +DIV_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +MOD_ASSIGN +LSHIFT_ASSIGN +RSHIFT_ASSIGN +URSHIFT_ASSIGN +ELVIS_ASSIGN +CapitalizedIdentifier +Identifier +AT +ELLIPSIS +WS +NL +SH_COMMENT +UNEXPECTED_CHAR + +rule names: +compilationUnit +scriptStatements +scriptStatement +packageDeclaration +importDeclaration +typeDeclaration +modifier +modifiersOpt +modifiers +classOrInterfaceModifiersOpt +classOrInterfaceModifiers +classOrInterfaceModifier +variableModifier +variableModifiersOpt +variableModifiers +typeParameters +typeParameter +typeBound +typeList +classDeclaration +classBody +enumConstants +enumConstant +classBodyDeclaration +memberDeclaration +methodDeclaration +methodName +returnType +fieldDeclaration +variableDeclarators +variableDeclarator +variableDeclaratorId +variableInitializer +variableInitializers +dims +dimsOpt +standardType +typeType +classOrInterfaceType +generalClassOrInterfaceType +standardClassOrInterfaceType +primitiveType +typeArguments +typeArgument +annotatedQualifiedClassName +qualifiedClassNameList +formalParameters +formalParameterList +thisFormalParameter +formalParameter +methodBody +qualifiedName +qualifiedNameElement +qualifiedNameElements +qualifiedClassName +qualifiedStandardClassName +literal +gstring +gstringValue +gstringPath +lambdaExpression +standardLambdaExpression +lambdaParameters +standardLambdaParameters +lambdaBody +closure +closureOrLambdaExpression +blockStatementsOpt +blockStatements +annotationsOpt +annotation +elementValues +annotationName +elementValuePairs +elementValuePair +elementValuePairName +elementValue +elementValueArrayInitializer +block +blockStatement +localVariableDeclaration +classifiedModifiers +variableDeclaration +typeNamePairs +typeNamePair +variableNames +conditionalStatement +ifElseStatement +switchStatement +loopStatement +continueStatement +breakStatement +tryCatchStatement +assertStatement +statement +catchClause +catchType +finallyBlock +resources +resourceList +resource +switchBlockStatementGroup +switchLabel +forControl +enhancedForControl +classicalForControl +forInit +forUpdate +castParExpression +parExpression +expressionInPar +expressionList +expressionListElement +enhancedStatementExpression +statementExpression +postfixExpression +expression +castOperandExpression +commandExpression +commandArgument +pathExpression +pathElement +namePart +dynamicMemberName +indexPropertyArgs +namedPropertyArgs +primary +list +normalMap +mapEntryList +mapEntry +mapEntryLabel +creator +arrayInitializer +anonymousInnerClassDeclaration +createdName +nonWildcardTypeArguments +typeArgumentsOrDiamond +arguments +argumentList +enhancedArgumentList +argumentListElement +enhancedArgumentListElement +stringLiteral +className +identifier +builtInType +keywords +rparen +nls +sep + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 131, 1681, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 3, 2, 3, 2, 5, 2, 307, 10, 2, 3, 2, 5, 2, 310, 10, 2, 3, 2, 5, 2, 313, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 321, 10, 3, 12, 3, 14, 3, 324, 11, 3, 3, 3, 5, 3, 327, 10, 3, 3, 4, 3, 4, 3, 4, 5, 4, 332, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 5, 6, 341, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 348, 10, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 5, 8, 355, 10, 8, 3, 9, 5, 9, 358, 10, 9, 3, 10, 3, 10, 3, 10, 6, 10, 363, 10, 10, 13, 10, 14, 10, 364, 3, 11, 5, 11, 368, 10, 11, 3, 12, 3, 12, 3, 12, 6, 12, 373, 10, 12, 13, 12, 14, 12, 374, 3, 13, 3, 13, 5, 13, 379, 10, 13, 3, 14, 3, 14, 5, 14, 383, 10, 14, 3, 15, 5, 15, 386, 10, 15, 3, 16, 3, 16, 3, 16, 6, 16, 391, 10, 16, 13, 16, 14, 16, 392, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 7, 17, 402, 10, 17, 12, 17, 14, 17, 405, 11, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 415, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 422, 10, 19, 12, 19, 14, 19, 425, 11, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 432, 10, 20, 12, 20, 14, 20, 435, 11, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 448, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 454, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 463, 10, 21, 3, 21, 3, 21, 5, 21, 467, 10, 21, 3, 21, 5, 21, 470, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 478, 10, 21, 3, 21, 5, 21, 481, 10, 21, 3, 21, 5, 21, 484, 10, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 492, 10, 22, 3, 22, 5, 22, 495, 10, 22, 3, 22, 5, 22, 498, 10, 22, 3, 22, 5, 22, 501, 10, 22, 3, 22, 3, 22, 3, 22, 7, 22, 506, 10, 22, 12, 22, 14, 22, 509, 11, 22, 3, 22, 5, 22, 512, 10, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 7, 23, 522, 10, 23, 12, 23, 14, 23, 525, 11, 23, 3, 23, 3, 23, 3, 23, 5, 23, 530, 10, 23, 3, 24, 3, 24, 3, 24, 5, 24, 535, 10, 24, 3, 24, 5, 24, 538, 10, 24, 3, 25, 3, 25, 3, 25, 5, 25, 543, 10, 25, 3, 25, 3, 25, 5, 25, 547, 10, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 554, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 565, 10, 27, 3, 27, 3, 27, 5, 27, 569, 10, 27, 3, 27, 5, 27, 572, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 581, 10, 27, 3, 27, 3, 27, 5, 27, 585, 10, 27, 5, 27, 587, 10, 27, 3, 28, 3, 28, 5, 28, 591, 10, 28, 3, 29, 3, 29, 3, 29, 5, 29, 596, 10, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 7, 31, 605, 10, 31, 12, 31, 14, 31, 608, 11, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 616, 10, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 7, 35, 629, 10, 35, 12, 35, 14, 35, 632, 11, 35, 3, 35, 3, 35, 5, 35, 636, 10, 35, 3, 36, 3, 36, 3, 36, 3, 36, 6, 36, 642, 10, 36, 13, 36, 14, 36, 643, 3, 37, 5, 37, 647, 10, 37, 3, 38, 3, 38, 3, 38, 5, 38, 652, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 5, 39, 659, 10, 39, 3, 39, 5, 39, 662, 10, 39, 3, 39, 3, 39, 3, 40, 3, 40, 5, 40, 668, 10, 40, 3, 40, 5, 40, 671, 10, 40, 3, 41, 3, 41, 5, 41, 675, 10, 41, 3, 42, 3, 42, 5, 42, 679, 10, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 7, 44, 690, 10, 44, 12, 44, 14, 44, 693, 11, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 705, 10, 45, 5, 45, 707, 10, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 7, 47, 717, 10, 47, 12, 47, 14, 47, 720, 11, 47, 3, 48, 3, 48, 5, 48, 724, 10, 48, 3, 48, 3, 48, 3, 49, 3, 49, 5, 49, 730, 10, 49, 3, 49, 3, 49, 3, 49, 3, 49, 7, 49, 736, 10, 49, 12, 49, 14, 49, 739, 11, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 5, 51, 746, 10, 51, 3, 51, 5, 51, 749, 10, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 5, 51, 757, 10, 51, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 7, 53, 764, 10, 53, 12, 53, 14, 53, 767, 11, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 5, 54, 774, 10, 54, 3, 55, 3, 55, 3, 55, 7, 55, 779, 10, 55, 12, 55, 14, 55, 782, 11, 55, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 7, 57, 791, 10, 57, 12, 57, 14, 57, 794, 11, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 5, 58, 801, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 7, 59, 807, 10, 59, 12, 59, 14, 59, 810, 11, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 5, 60, 817, 10, 60, 3, 60, 3, 60, 5, 60, 821, 10, 60, 3, 61, 3, 61, 7, 61, 825, 10, 61, 12, 61, 14, 61, 828, 11, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 65, 3, 65, 5, 65, 846, 10, 65, 3, 66, 3, 66, 5, 66, 850, 10, 66, 3, 67, 3, 67, 3, 67, 5, 67, 855, 10, 67, 3, 67, 3, 67, 3, 67, 3, 67, 5, 67, 861, 10, 67, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 5, 68, 868, 10, 68, 3, 69, 5, 69, 871, 10, 69, 3, 70, 3, 70, 3, 70, 3, 70, 7, 70, 877, 10, 70, 12, 70, 14, 70, 880, 11, 70, 3, 70, 5, 70, 883, 10, 70, 3, 71, 3, 71, 3, 71, 7, 71, 888, 10, 71, 12, 71, 14, 71, 891, 11, 71, 3, 72, 3, 72, 3, 72, 3, 72, 5, 72, 897, 10, 72, 3, 72, 5, 72, 900, 10, 72, 3, 73, 3, 73, 5, 73, 904, 10, 73, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 7, 75, 911, 10, 75, 12, 75, 14, 75, 914, 11, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 5, 77, 924, 10, 77, 3, 78, 3, 78, 3, 78, 5, 78, 929, 10, 78, 3, 79, 3, 79, 3, 79, 3, 79, 7, 79, 935, 10, 79, 12, 79, 14, 79, 938, 11, 79, 5, 79, 940, 10, 79, 3, 79, 5, 79, 943, 10, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 7, 80, 950, 10, 80, 12, 80, 14, 80, 953, 11, 80, 5, 80, 955, 10, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 5, 81, 962, 10, 81, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 5, 83, 970, 10, 83, 3, 84, 3, 84, 5, 84, 974, 10, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 5, 84, 983, 10, 84, 3, 84, 5, 84, 986, 10, 84, 3, 84, 3, 84, 3, 84, 5, 84, 991, 10, 84, 3, 85, 3, 85, 3, 85, 3, 85, 7, 85, 997, 10, 85, 12, 85, 14, 85, 1000, 11, 85, 3, 85, 3, 85, 3, 86, 5, 86, 1005, 10, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 6, 87, 1013, 10, 87, 13, 87, 14, 87, 1014, 3, 87, 3, 87, 3, 88, 3, 88, 5, 88, 1021, 10, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 5, 89, 1029, 10, 89, 3, 89, 3, 89, 3, 89, 3, 89, 5, 89, 1035, 10, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 7, 90, 1043, 10, 90, 12, 90, 14, 90, 1046, 11, 90, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 5, 91, 1070, 10, 91, 3, 92, 3, 92, 5, 92, 1074, 10, 92, 3, 93, 3, 93, 5, 93, 1078, 10, 93, 3, 94, 3, 94, 5, 94, 1082, 10, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 7, 94, 1089, 10, 94, 12, 94, 14, 94, 1092, 11, 94, 3, 94, 3, 94, 3, 94, 5, 94, 1097, 10, 94, 3, 95, 3, 95, 3, 95, 3, 95, 3, 95, 3, 95, 3, 95, 5, 95, 1106, 10, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 5, 96, 1119, 10, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 5, 96, 1135, 10, 96, 3, 97, 3, 97, 3, 97, 3, 97, 5, 97, 1141, 10, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 7, 98, 1151, 10, 98, 12, 98, 14, 98, 1154, 11, 98, 3, 99, 3, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 5, 100, 1164, 10, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 101, 7, 101, 1172, 10, 101, 12, 101, 14, 101, 1175, 11, 101, 3, 102, 3, 102, 5, 102, 1179, 10, 102, 3, 103, 3, 103, 3, 103, 6, 103, 1184, 10, 103, 13, 103, 14, 103, 1185, 3, 103, 3, 103, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 5, 104, 1196, 10, 104, 3, 105, 3, 105, 5, 105, 1200, 10, 105, 3, 106, 3, 106, 5, 106, 1204, 10, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 5, 107, 1211, 10, 107, 3, 107, 3, 107, 5, 107, 1215, 10, 107, 3, 107, 3, 107, 5, 107, 1219, 10, 107, 3, 108, 3, 108, 5, 108, 1223, 10, 108, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, 7, 113, 1240, 10, 113, 12, 113, 14, 113, 1243, 11, 113, 3, 114, 3, 114, 5, 114, 1247, 10, 114, 3, 114, 3, 114, 3, 115, 3, 115, 5, 115, 1253, 10, 115, 3, 116, 3, 116, 3, 117, 3, 117, 5, 117, 1259, 10, 117, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 5, 118, 1278, 10, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 5, 118, 1305, 10, 118, 3, 118, 5, 118, 1308, 10, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 5, 118, 1372, 10, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 7, 118, 1388, 10, 118, 12, 118, 14, 118, 1391, 11, 118, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 5, 119, 1403, 10, 119, 3, 120, 3, 120, 3, 120, 5, 120, 1408, 10, 120, 3, 120, 7, 120, 1411, 10, 120, 12, 120, 14, 120, 1414, 11, 120, 3, 121, 3, 121, 6, 121, 1418, 10, 121, 13, 121, 14, 121, 1419, 3, 121, 5, 121, 1423, 10, 121, 3, 122, 3, 122, 3, 122, 3, 122, 7, 122, 1429, 10, 122, 12, 122, 14, 122, 1432, 11, 122, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 5, 123, 1439, 10, 123, 3, 123, 3, 123, 3, 123, 3, 123, 5, 123, 1445, 10, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 5, 123, 1470, 10, 123, 3, 124, 3, 124, 3, 124, 3, 124, 5, 124, 1476, 10, 124, 3, 125, 3, 125, 5, 125, 1480, 10, 125, 3, 126, 5, 126, 1483, 10, 126, 3, 126, 3, 126, 5, 126, 1487, 10, 126, 3, 126, 3, 126, 3, 127, 5, 127, 1492, 10, 127, 3, 127, 3, 127, 3, 127, 5, 127, 1497, 10, 127, 3, 127, 3, 127, 3, 128, 3, 128, 5, 128, 1503, 10, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 5, 128, 1518, 10, 128, 3, 129, 3, 129, 5, 129, 1522, 10, 129, 3, 129, 5, 129, 1525, 10, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, 5, 130, 1532, 10, 130, 3, 130, 5, 130, 1535, 10, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 131, 7, 131, 1542, 10, 131, 12, 131, 14, 131, 1545, 11, 131, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 5, 132, 1557, 10, 132, 3, 133, 3, 133, 5, 133, 1561, 10, 133, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1568, 10, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 6, 134, 1576, 10, 134, 13, 134, 14, 134, 1577, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1587, 10, 134, 3, 135, 3, 135, 3, 135, 5, 135, 1592, 10, 135, 3, 135, 3, 135, 3, 135, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 3, 137, 5, 137, 1603, 10, 137, 5, 137, 1605, 10, 137, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 5, 139, 1616, 10, 139, 3, 140, 3, 140, 5, 140, 1620, 10, 140, 3, 140, 5, 140, 1623, 10, 140, 3, 140, 3, 140, 3, 141, 3, 141, 3, 141, 3, 141, 3, 141, 7, 141, 1632, 10, 141, 12, 141, 14, 141, 1635, 11, 141, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, 7, 142, 1642, 10, 142, 12, 142, 14, 142, 1645, 11, 142, 3, 143, 3, 143, 5, 143, 1649, 10, 143, 3, 144, 3, 144, 3, 144, 5, 144, 1654, 10, 144, 3, 145, 3, 145, 3, 146, 3, 146, 3, 147, 3, 147, 3, 148, 3, 148, 3, 149, 3, 149, 3, 150, 3, 150, 5, 150, 1668, 10, 150, 3, 151, 7, 151, 1671, 10, 151, 12, 151, 14, 151, 1674, 11, 151, 3, 152, 6, 152, 1677, 10, 152, 13, 152, 14, 152, 1678, 3, 152, 2, 3, 234, 153, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 2, 24, 8, 2, 10, 10, 14, 14, 38, 38, 49, 49, 53, 53, 56, 56, 7, 2, 16, 16, 24, 24, 29, 29, 41, 43, 45, 46, 8, 2, 10, 10, 14, 14, 16, 16, 29, 29, 41, 43, 45, 46, 4, 2, 28, 28, 47, 47, 4, 2, 87, 87, 95, 95, 4, 2, 11, 11, 95, 95, 3, 2, 102, 103, 3, 2, 92, 93, 3, 2, 102, 105, 4, 2, 106, 107, 111, 111, 3, 2, 104, 105, 3, 2, 62, 63, 6, 2, 11, 11, 79, 79, 90, 91, 97, 98, 5, 2, 74, 76, 96, 96, 99, 99, 3, 2, 70, 71, 5, 2, 9, 9, 36, 36, 78, 78, 5, 2, 73, 73, 89, 89, 112, 123, 4, 2, 64, 66, 88, 88, 7, 2, 9, 9, 11, 12, 14, 14, 45, 45, 124, 125, 4, 2, 15, 15, 55, 55, 4, 2, 9, 57, 60, 61, 4, 2, 86, 86, 129, 129, 2, 1784, 2, 304, 3, 2, 2, 2, 4, 316, 3, 2, 2, 2, 6, 331, 3, 2, 2, 2, 8, 333, 3, 2, 2, 2, 10, 337, 3, 2, 2, 2, 12, 349, 3, 2, 2, 2, 14, 354, 3, 2, 2, 2, 16, 357, 3, 2, 2, 2, 18, 362, 3, 2, 2, 2, 20, 367, 3, 2, 2, 2, 22, 372, 3, 2, 2, 2, 24, 378, 3, 2, 2, 2, 26, 382, 3, 2, 2, 2, 28, 385, 3, 2, 2, 2, 30, 390, 3, 2, 2, 2, 32, 394, 3, 2, 2, 2, 34, 409, 3, 2, 2, 2, 36, 416, 3, 2, 2, 2, 38, 426, 3, 2, 2, 2, 40, 447, 3, 2, 2, 2, 42, 487, 3, 2, 2, 2, 44, 515, 3, 2, 2, 2, 46, 531, 3, 2, 2, 2, 48, 546, 3, 2, 2, 2, 50, 553, 3, 2, 2, 2, 52, 586, 3, 2, 2, 2, 54, 590, 3, 2, 2, 2, 56, 595, 3, 2, 2, 2, 58, 597, 3, 2, 2, 2, 60, 599, 3, 2, 2, 2, 62, 609, 3, 2, 2, 2, 64, 617, 3, 2, 2, 2, 66, 619, 3, 2, 2, 2, 68, 621, 3, 2, 2, 2, 70, 641, 3, 2, 2, 2, 72, 646, 3, 2, 2, 2, 74, 648, 3, 2, 2, 2, 76, 655, 3, 2, 2, 2, 78, 667, 3, 2, 2, 2, 80, 672, 3, 2, 2, 2, 82, 676, 3, 2, 2, 2, 84, 680, 3, 2, 2, 2, 86, 682, 3, 2, 2, 2, 88, 706, 3, 2, 2, 2, 90, 708, 3, 2, 2, 2, 92, 711, 3, 2, 2, 2, 94, 721, 3, 2, 2, 2, 96, 729, 3, 2, 2, 2, 98, 740, 3, 2, 2, 2, 100, 743, 3, 2, 2, 2, 102, 758, 3, 2, 2, 2, 104, 760, 3, 2, 2, 2, 106, 773, 3, 2, 2, 2, 108, 780, 3, 2, 2, 2, 110, 783, 3, 2, 2, 2, 112, 786, 3, 2, 2, 2, 114, 800, 3, 2, 2, 2, 116, 802, 3, 2, 2, 2, 118, 820, 3, 2, 2, 2, 120, 822, 3, 2, 2, 2, 122, 829, 3, 2, 2, 2, 124, 835, 3, 2, 2, 2, 126, 841, 3, 2, 2, 2, 128, 845, 3, 2, 2, 2, 130, 849, 3, 2, 2, 2, 132, 851, 3, 2, 2, 2, 134, 867, 3, 2, 2, 2, 136, 870, 3, 2, 2, 2, 138, 872, 3, 2, 2, 2, 140, 889, 3, 2, 2, 2, 142, 892, 3, 2, 2, 2, 144, 903, 3, 2, 2, 2, 146, 905, 3, 2, 2, 2, 148, 907, 3, 2, 2, 2, 150, 915, 3, 2, 2, 2, 152, 923, 3, 2, 2, 2, 154, 928, 3, 2, 2, 2, 156, 930, 3, 2, 2, 2, 158, 946, 3, 2, 2, 2, 160, 961, 3, 2, 2, 2, 162, 963, 3, 2, 2, 2, 164, 969, 3, 2, 2, 2, 166, 990, 3, 2, 2, 2, 168, 992, 3, 2, 2, 2, 170, 1004, 3, 2, 2, 2, 172, 1008, 3, 2, 2, 2, 174, 1020, 3, 2, 2, 2, 176, 1022, 3, 2, 2, 2, 178, 1036, 3, 2, 2, 2, 180, 1069, 3, 2, 2, 2, 182, 1071, 3, 2, 2, 2, 184, 1075, 3, 2, 2, 2, 186, 1079, 3, 2, 2, 2, 188, 1098, 3, 2, 2, 2, 190, 1134, 3, 2, 2, 2, 192, 1136, 3, 2, 2, 2, 194, 1147, 3, 2, 2, 2, 196, 1155, 3, 2, 2, 2, 198, 1159, 3, 2, 2, 2, 200, 1167, 3, 2, 2, 2, 202, 1178, 3, 2, 2, 2, 204, 1183, 3, 2, 2, 2, 206, 1195, 3, 2, 2, 2, 208, 1199, 3, 2, 2, 2, 210, 1201, 3, 2, 2, 2, 212, 1210, 3, 2, 2, 2, 214, 1222, 3, 2, 2, 2, 216, 1224, 3, 2, 2, 2, 218, 1226, 3, 2, 2, 2, 220, 1230, 3, 2, 2, 2, 222, 1232, 3, 2, 2, 2, 224, 1236, 3, 2, 2, 2, 226, 1246, 3, 2, 2, 2, 228, 1252, 3, 2, 2, 2, 230, 1254, 3, 2, 2, 2, 232, 1256, 3, 2, 2, 2, 234, 1277, 3, 2, 2, 2, 236, 1402, 3, 2, 2, 2, 238, 1404, 3, 2, 2, 2, 240, 1415, 3, 2, 2, 2, 242, 1424, 3, 2, 2, 2, 244, 1469, 3, 2, 2, 2, 246, 1475, 3, 2, 2, 2, 248, 1479, 3, 2, 2, 2, 250, 1482, 3, 2, 2, 2, 252, 1491, 3, 2, 2, 2, 254, 1517, 3, 2, 2, 2, 256, 1519, 3, 2, 2, 2, 258, 1528, 3, 2, 2, 2, 260, 1538, 3, 2, 2, 2, 262, 1556, 3, 2, 2, 2, 264, 1560, 3, 2, 2, 2, 266, 1562, 3, 2, 2, 2, 268, 1588, 3, 2, 2, 2, 270, 1596, 3, 2, 2, 2, 272, 1598, 3, 2, 2, 2, 274, 1606, 3, 2, 2, 2, 276, 1615, 3, 2, 2, 2, 278, 1617, 3, 2, 2, 2, 280, 1626, 3, 2, 2, 2, 282, 1636, 3, 2, 2, 2, 284, 1648, 3, 2, 2, 2, 286, 1653, 3, 2, 2, 2, 288, 1655, 3, 2, 2, 2, 290, 1657, 3, 2, 2, 2, 292, 1659, 3, 2, 2, 2, 294, 1661, 3, 2, 2, 2, 296, 1663, 3, 2, 2, 2, 298, 1667, 3, 2, 2, 2, 300, 1672, 3, 2, 2, 2, 302, 1676, 3, 2, 2, 2, 304, 306, 5, 300, 151, 2, 305, 307, 5, 8, 5, 2, 306, 305, 3, 2, 2, 2, 306, 307, 3, 2, 2, 2, 307, 309, 3, 2, 2, 2, 308, 310, 5, 302, 152, 2, 309, 308, 3, 2, 2, 2, 309, 310, 3, 2, 2, 2, 310, 312, 3, 2, 2, 2, 311, 313, 5, 4, 3, 2, 312, 311, 3, 2, 2, 2, 312, 313, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, 314, 315, 7, 2, 2, 3, 315, 3, 3, 2, 2, 2, 316, 322, 5, 6, 4, 2, 317, 318, 5, 302, 152, 2, 318, 319, 5, 6, 4, 2, 319, 321, 3, 2, 2, 2, 320, 317, 3, 2, 2, 2, 321, 324, 3, 2, 2, 2, 322, 320, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 326, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 325, 327, 5, 302, 152, 2, 326, 325, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 5, 3, 2, 2, 2, 328, 332, 5, 10, 6, 2, 329, 332, 5, 12, 7, 2, 330, 332, 5, 190, 96, 2, 331, 328, 3, 2, 2, 2, 331, 329, 3, 2, 2, 2, 331, 330, 3, 2, 2, 2, 332, 7, 3, 2, 2, 2, 333, 334, 5, 140, 71, 2, 334, 335, 7, 40, 2, 2, 335, 336, 5, 104, 53, 2, 336, 9, 3, 2, 2, 2, 337, 338, 5, 140, 71, 2, 338, 340, 7, 35, 2, 2, 339, 341, 7, 45, 2, 2, 340, 339, 3, 2, 2, 2, 340, 341, 3, 2, 2, 2, 341, 342, 3, 2, 2, 2, 342, 347, 5, 104, 53, 2, 343, 344, 7, 88, 2, 2, 344, 348, 7, 106, 2, 2, 345, 346, 7, 9, 2, 2, 346, 348, 5, 292, 147, 2, 347, 343, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 11, 3, 2, 2, 2, 349, 350, 5, 20, 11, 2, 350, 351, 5, 40, 21, 2, 351, 13, 3, 2, 2, 2, 352, 355, 5, 24, 13, 2, 353, 355, 9, 2, 2, 2, 354, 352, 3, 2, 2, 2, 354, 353, 3, 2, 2, 2, 355, 15, 3, 2, 2, 2, 356, 358, 5, 18, 10, 2, 357, 356, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 17, 3, 2, 2, 2, 359, 360, 5, 14, 8, 2, 360, 361, 5, 300, 151, 2, 361, 363, 3, 2, 2, 2, 362, 359, 3, 2, 2, 2, 363, 364, 3, 2, 2, 2, 364, 362, 3, 2, 2, 2, 364, 365, 3, 2, 2, 2, 365, 19, 3, 2, 2, 2, 366, 368, 5, 22, 12, 2, 367, 366, 3, 2, 2, 2, 367, 368, 3, 2, 2, 2, 368, 21, 3, 2, 2, 2, 369, 370, 5, 24, 13, 2, 370, 371, 5, 300, 151, 2, 371, 373, 3, 2, 2, 2, 372, 369, 3, 2, 2, 2, 373, 374, 3, 2, 2, 2, 374, 372, 3, 2, 2, 2, 374, 375, 3, 2, 2, 2, 375, 23, 3, 2, 2, 2, 376, 379, 5, 142, 72, 2, 377, 379, 9, 3, 2, 2, 378, 376, 3, 2, 2, 2, 378, 377, 3, 2, 2, 2, 379, 25, 3, 2, 2, 2, 380, 383, 5, 142, 72, 2, 381, 383, 9, 4, 2, 2, 382, 380, 3, 2, 2, 2, 382, 381, 3, 2, 2, 2, 383, 27, 3, 2, 2, 2, 384, 386, 5, 30, 16, 2, 385, 384, 3, 2, 2, 2, 385, 386, 3, 2, 2, 2, 386, 29, 3, 2, 2, 2, 387, 388, 5, 26, 14, 2, 388, 389, 5, 300, 151, 2, 389, 391, 3, 2, 2, 2, 390, 387, 3, 2, 2, 2, 391, 392, 3, 2, 2, 2, 392, 390, 3, 2, 2, 2, 392, 393, 3, 2, 2, 2, 393, 31, 3, 2, 2, 2, 394, 395, 7, 91, 2, 2, 395, 396, 5, 300, 151, 2, 396, 403, 5, 34, 18, 2, 397, 398, 7, 87, 2, 2, 398, 399, 5, 300, 151, 2, 399, 400, 5, 34, 18, 2, 400, 402, 3, 2, 2, 2, 401, 397, 3, 2, 2, 2, 402, 405, 3, 2, 2, 2, 403, 401, 3, 2, 2, 2, 403, 404, 3, 2, 2, 2, 404, 406, 3, 2, 2, 2, 405, 403, 3, 2, 2, 2, 406, 407, 5, 300, 151, 2, 407, 408, 7, 90, 2, 2, 408, 33, 3, 2, 2, 2, 409, 414, 5, 290, 146, 2, 410, 411, 7, 28, 2, 2, 411, 412, 5, 300, 151, 2, 412, 413, 5, 36, 19, 2, 413, 415, 3, 2, 2, 2, 414, 410, 3, 2, 2, 2, 414, 415, 3, 2, 2, 2, 415, 35, 3, 2, 2, 2, 416, 423, 5, 76, 39, 2, 417, 418, 7, 108, 2, 2, 418, 419, 5, 300, 151, 2, 419, 420, 5, 76, 39, 2, 420, 422, 3, 2, 2, 2, 421, 417, 3, 2, 2, 2, 422, 425, 3, 2, 2, 2, 423, 421, 3, 2, 2, 2, 423, 424, 3, 2, 2, 2, 424, 37, 3, 2, 2, 2, 425, 423, 3, 2, 2, 2, 426, 433, 5, 76, 39, 2, 427, 428, 7, 87, 2, 2, 428, 429, 5, 300, 151, 2, 429, 430, 5, 76, 39, 2, 430, 432, 3, 2, 2, 2, 431, 427, 3, 2, 2, 2, 432, 435, 3, 2, 2, 2, 433, 431, 3, 2, 2, 2, 433, 434, 3, 2, 2, 2, 434, 39, 3, 2, 2, 2, 435, 433, 3, 2, 2, 2, 436, 437, 7, 21, 2, 2, 437, 448, 8, 21, 1, 2, 438, 439, 7, 37, 2, 2, 439, 448, 8, 21, 1, 2, 440, 441, 7, 27, 2, 2, 441, 448, 8, 21, 1, 2, 442, 443, 7, 126, 2, 2, 443, 444, 7, 37, 2, 2, 444, 448, 8, 21, 1, 2, 445, 446, 7, 12, 2, 2, 446, 448, 8, 21, 1, 2, 447, 436, 3, 2, 2, 2, 447, 438, 3, 2, 2, 2, 447, 440, 3, 2, 2, 2, 447, 442, 3, 2, 2, 2, 447, 445, 3, 2, 2, 2, 448, 449, 3, 2, 2, 2, 449, 450, 5, 292, 147, 2, 450, 483, 5, 300, 151, 2, 451, 453, 6, 21, 2, 3, 452, 454, 5, 32, 17, 2, 453, 452, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 455, 3, 2, 2, 2, 455, 469, 5, 300, 151, 2, 456, 466, 6, 21, 3, 3, 457, 458, 7, 28, 2, 2, 458, 462, 5, 300, 151, 2, 459, 460, 6, 21, 4, 3, 460, 463, 5, 38, 20, 2, 461, 463, 5, 76, 39, 2, 462, 459, 3, 2, 2, 2, 462, 461, 3, 2, 2, 2, 463, 464, 3, 2, 2, 2, 464, 465, 5, 300, 151, 2, 465, 467, 3, 2, 2, 2, 466, 457, 3, 2, 2, 2, 466, 467, 3, 2, 2, 2, 467, 470, 3, 2, 2, 2, 468, 470, 3, 2, 2, 2, 469, 456, 3, 2, 2, 2, 469, 468, 3, 2, 2, 2, 470, 480, 3, 2, 2, 2, 471, 477, 6, 21, 5, 3, 472, 473, 7, 34, 2, 2, 473, 474, 5, 300, 151, 2, 474, 475, 5, 38, 20, 2, 475, 476, 5, 300, 151, 2, 476, 478, 3, 2, 2, 2, 477, 472, 3, 2, 2, 2, 477, 478, 3, 2, 2, 2, 478, 481, 3, 2, 2, 2, 479, 481, 3, 2, 2, 2, 480, 471, 3, 2, 2, 2, 480, 479, 3, 2, 2, 2, 481, 484, 3, 2, 2, 2, 482, 484, 3, 2, 2, 2, 483, 451, 3, 2, 2, 2, 483, 482, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 486, 5, 42, 22, 2, 486, 41, 3, 2, 2, 2, 487, 488, 7, 82, 2, 2, 488, 497, 5, 300, 151, 2, 489, 491, 6, 22, 6, 3, 490, 492, 5, 44, 23, 2, 491, 490, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 494, 3, 2, 2, 2, 493, 495, 5, 302, 152, 2, 494, 493, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 498, 3, 2, 2, 2, 496, 498, 3, 2, 2, 2, 497, 489, 3, 2, 2, 2, 497, 496, 3, 2, 2, 2, 498, 500, 3, 2, 2, 2, 499, 501, 5, 48, 25, 2, 500, 499, 3, 2, 2, 2, 500, 501, 3, 2, 2, 2, 501, 507, 3, 2, 2, 2, 502, 503, 5, 302, 152, 2, 503, 504, 5, 48, 25, 2, 504, 506, 3, 2, 2, 2, 505, 502, 3, 2, 2, 2, 506, 509, 3, 2, 2, 2, 507, 505, 3, 2, 2, 2, 507, 508, 3, 2, 2, 2, 508, 511, 3, 2, 2, 2, 509, 507, 3, 2, 2, 2, 510, 512, 5, 302, 152, 2, 511, 510, 3, 2, 2, 2, 511, 512, 3, 2, 2, 2, 512, 513, 3, 2, 2, 2, 513, 514, 7, 83, 2, 2, 514, 43, 3, 2, 2, 2, 515, 523, 5, 46, 24, 2, 516, 517, 5, 300, 151, 2, 517, 518, 7, 87, 2, 2, 518, 519, 5, 300, 151, 2, 519, 520, 5, 46, 24, 2, 520, 522, 3, 2, 2, 2, 521, 516, 3, 2, 2, 2, 522, 525, 3, 2, 2, 2, 523, 521, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 529, 3, 2, 2, 2, 525, 523, 3, 2, 2, 2, 526, 527, 5, 300, 151, 2, 527, 528, 7, 87, 2, 2, 528, 530, 3, 2, 2, 2, 529, 526, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 45, 3, 2, 2, 2, 531, 532, 5, 140, 71, 2, 532, 534, 5, 292, 147, 2, 533, 535, 5, 278, 140, 2, 534, 533, 3, 2, 2, 2, 534, 535, 3, 2, 2, 2, 535, 537, 3, 2, 2, 2, 536, 538, 5, 270, 136, 2, 537, 536, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 47, 3, 2, 2, 2, 539, 547, 7, 86, 2, 2, 540, 541, 7, 45, 2, 2, 541, 543, 5, 300, 151, 2, 542, 540, 3, 2, 2, 2, 542, 543, 3, 2, 2, 2, 543, 544, 3, 2, 2, 2, 544, 547, 5, 158, 80, 2, 545, 547, 5, 50, 26, 2, 546, 539, 3, 2, 2, 2, 546, 542, 3, 2, 2, 2, 546, 545, 3, 2, 2, 2, 547, 49, 3, 2, 2, 2, 548, 554, 5, 52, 27, 2, 549, 554, 5, 58, 30, 2, 550, 551, 5, 16, 9, 2, 551, 552, 5, 40, 21, 2, 552, 554, 3, 2, 2, 2, 553, 548, 3, 2, 2, 2, 553, 549, 3, 2, 2, 2, 553, 550, 3, 2, 2, 2, 554, 51, 3, 2, 2, 2, 555, 556, 6, 27, 7, 3, 556, 557, 5, 56, 29, 2, 557, 558, 5, 54, 28, 2, 558, 559, 7, 80, 2, 2, 559, 564, 5, 298, 150, 2, 560, 561, 7, 24, 2, 2, 561, 562, 5, 300, 151, 2, 562, 563, 5, 154, 78, 2, 563, 565, 3, 2, 2, 2, 564, 560, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 587, 3, 2, 2, 2, 566, 568, 5, 16, 9, 2, 567, 569, 5, 32, 17, 2, 568, 567, 3, 2, 2, 2, 568, 569, 3, 2, 2, 2, 569, 571, 3, 2, 2, 2, 570, 572, 5, 56, 29, 2, 571, 570, 3, 2, 2, 2, 571, 572, 3, 2, 2, 2, 572, 573, 3, 2, 2, 2, 573, 574, 5, 54, 28, 2, 574, 580, 5, 94, 48, 2, 575, 576, 5, 300, 151, 2, 576, 577, 7, 52, 2, 2, 577, 578, 5, 300, 151, 2, 578, 579, 5, 92, 47, 2, 579, 581, 3, 2, 2, 2, 580, 575, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 584, 5, 300, 151, 2, 583, 585, 5, 102, 52, 2, 584, 583, 3, 2, 2, 2, 584, 585, 3, 2, 2, 2, 585, 587, 3, 2, 2, 2, 586, 555, 3, 2, 2, 2, 586, 566, 3, 2, 2, 2, 587, 53, 3, 2, 2, 2, 588, 591, 5, 292, 147, 2, 589, 591, 5, 288, 145, 2, 590, 588, 3, 2, 2, 2, 590, 589, 3, 2, 2, 2, 591, 55, 3, 2, 2, 2, 592, 596, 5, 74, 38, 2, 593, 594, 6, 29, 8, 3, 594, 596, 7, 55, 2, 2, 595, 592, 3, 2, 2, 2, 595, 593, 3, 2, 2, 2, 596, 57, 3, 2, 2, 2, 597, 598, 5, 166, 84, 2, 598, 59, 3, 2, 2, 2, 599, 606, 5, 62, 32, 2, 600, 601, 7, 87, 2, 2, 601, 602, 5, 300, 151, 2, 602, 603, 5, 62, 32, 2, 603, 605, 3, 2, 2, 2, 604, 600, 3, 2, 2, 2, 605, 608, 3, 2, 2, 2, 606, 604, 3, 2, 2, 2, 606, 607, 3, 2, 2, 2, 607, 61, 3, 2, 2, 2, 608, 606, 3, 2, 2, 2, 609, 615, 5, 64, 33, 2, 610, 611, 5, 300, 151, 2, 611, 612, 7, 89, 2, 2, 612, 613, 5, 300, 151, 2, 613, 614, 5, 66, 34, 2, 614, 616, 3, 2, 2, 2, 615, 610, 3, 2, 2, 2, 615, 616, 3, 2, 2, 2, 616, 63, 3, 2, 2, 2, 617, 618, 5, 292, 147, 2, 618, 65, 3, 2, 2, 2, 619, 620, 5, 228, 115, 2, 620, 67, 3, 2, 2, 2, 621, 622, 5, 66, 34, 2, 622, 630, 5, 300, 151, 2, 623, 624, 7, 87, 2, 2, 624, 625, 5, 300, 151, 2, 625, 626, 5, 66, 34, 2, 626, 627, 5, 300, 151, 2, 627, 629, 3, 2, 2, 2, 628, 623, 3, 2, 2, 2, 629, 632, 3, 2, 2, 2, 630, 628, 3, 2, 2, 2, 630, 631, 3, 2, 2, 2, 631, 633, 3, 2, 2, 2, 632, 630, 3, 2, 2, 2, 633, 635, 5, 300, 151, 2, 634, 636, 7, 87, 2, 2, 635, 634, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 69, 3, 2, 2, 2, 637, 638, 5, 140, 71, 2, 638, 639, 7, 84, 2, 2, 639, 640, 7, 85, 2, 2, 640, 642, 3, 2, 2, 2, 641, 637, 3, 2, 2, 2, 642, 643, 3, 2, 2, 2, 643, 641, 3, 2, 2, 2, 643, 644, 3, 2, 2, 2, 644, 71, 3, 2, 2, 2, 645, 647, 5, 70, 36, 2, 646, 645, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 73, 3, 2, 2, 2, 648, 651, 5, 140, 71, 2, 649, 652, 5, 84, 43, 2, 650, 652, 5, 82, 42, 2, 651, 649, 3, 2, 2, 2, 651, 650, 3, 2, 2, 2, 652, 653, 3, 2, 2, 2, 653, 654, 5, 72, 37, 2, 654, 75, 3, 2, 2, 2, 655, 661, 5, 140, 71, 2, 656, 659, 5, 84, 43, 2, 657, 659, 7, 55, 2, 2, 658, 656, 3, 2, 2, 2, 658, 657, 3, 2, 2, 2, 659, 662, 3, 2, 2, 2, 660, 662, 5, 80, 41, 2, 661, 658, 3, 2, 2, 2, 661, 660, 3, 2, 2, 2, 662, 663, 3, 2, 2, 2, 663, 664, 5, 72, 37, 2, 664, 77, 3, 2, 2, 2, 665, 668, 5, 110, 56, 2, 666, 668, 5, 112, 57, 2, 667, 665, 3, 2, 2, 2, 667, 666, 3, 2, 2, 2, 668, 670, 3, 2, 2, 2, 669, 671, 5, 86, 44, 2, 670, 669, 3, 2, 2, 2, 670, 671, 3, 2, 2, 2, 671, 79, 3, 2, 2, 2, 672, 674, 5, 110, 56, 2, 673, 675, 5, 86, 44, 2, 674, 673, 3, 2, 2, 2, 674, 675, 3, 2, 2, 2, 675, 81, 3, 2, 2, 2, 676, 678, 5, 112, 57, 2, 677, 679, 5, 86, 44, 2, 678, 677, 3, 2, 2, 2, 678, 679, 3, 2, 2, 2, 679, 83, 3, 2, 2, 2, 680, 681, 7, 15, 2, 2, 681, 85, 3, 2, 2, 2, 682, 683, 7, 91, 2, 2, 683, 684, 5, 300, 151, 2, 684, 691, 5, 88, 45, 2, 685, 686, 7, 87, 2, 2, 686, 687, 5, 300, 151, 2, 687, 688, 5, 88, 45, 2, 688, 690, 3, 2, 2, 2, 689, 685, 3, 2, 2, 2, 690, 693, 3, 2, 2, 2, 691, 689, 3, 2, 2, 2, 691, 692, 3, 2, 2, 2, 692, 694, 3, 2, 2, 2, 693, 691, 3, 2, 2, 2, 694, 695, 5, 300, 151, 2, 695, 696, 7, 90, 2, 2, 696, 87, 3, 2, 2, 2, 697, 707, 5, 76, 39, 2, 698, 699, 5, 140, 71, 2, 699, 704, 7, 94, 2, 2, 700, 701, 9, 5, 2, 2, 701, 702, 5, 300, 151, 2, 702, 703, 5, 76, 39, 2, 703, 705, 3, 2, 2, 2, 704, 700, 3, 2, 2, 2, 704, 705, 3, 2, 2, 2, 705, 707, 3, 2, 2, 2, 706, 697, 3, 2, 2, 2, 706, 698, 3, 2, 2, 2, 707, 89, 3, 2, 2, 2, 708, 709, 5, 140, 71, 2, 709, 710, 5, 110, 56, 2, 710, 91, 3, 2, 2, 2, 711, 718, 5, 90, 46, 2, 712, 713, 7, 87, 2, 2, 713, 714, 5, 300, 151, 2, 714, 715, 5, 90, 46, 2, 715, 717, 3, 2, 2, 2, 716, 712, 3, 2, 2, 2, 717, 720, 3, 2, 2, 2, 718, 716, 3, 2, 2, 2, 718, 719, 3, 2, 2, 2, 719, 93, 3, 2, 2, 2, 720, 718, 3, 2, 2, 2, 721, 723, 7, 80, 2, 2, 722, 724, 5, 96, 49, 2, 723, 722, 3, 2, 2, 2, 723, 724, 3, 2, 2, 2, 724, 725, 3, 2, 2, 2, 725, 726, 5, 298, 150, 2, 726, 95, 3, 2, 2, 2, 727, 730, 5, 100, 51, 2, 728, 730, 5, 98, 50, 2, 729, 727, 3, 2, 2, 2, 729, 728, 3, 2, 2, 2, 730, 737, 3, 2, 2, 2, 731, 732, 7, 87, 2, 2, 732, 733, 5, 300, 151, 2, 733, 734, 5, 100, 51, 2, 734, 736, 3, 2, 2, 2, 735, 731, 3, 2, 2, 2, 736, 739, 3, 2, 2, 2, 737, 735, 3, 2, 2, 2, 737, 738, 3, 2, 2, 2, 738, 97, 3, 2, 2, 2, 739, 737, 3, 2, 2, 2, 740, 741, 5, 76, 39, 2, 741, 742, 7, 50, 2, 2, 742, 99, 3, 2, 2, 2, 743, 745, 5, 28, 15, 2, 744, 746, 5, 76, 39, 2, 745, 744, 3, 2, 2, 2, 745, 746, 3, 2, 2, 2, 746, 748, 3, 2, 2, 2, 747, 749, 7, 127, 2, 2, 748, 747, 3, 2, 2, 2, 748, 749, 3, 2, 2, 2, 749, 750, 3, 2, 2, 2, 750, 756, 5, 64, 33, 2, 751, 752, 5, 300, 151, 2, 752, 753, 7, 89, 2, 2, 753, 754, 5, 300, 151, 2, 754, 755, 5, 234, 118, 2, 755, 757, 3, 2, 2, 2, 756, 751, 3, 2, 2, 2, 756, 757, 3, 2, 2, 2, 757, 101, 3, 2, 2, 2, 758, 759, 5, 158, 80, 2, 759, 103, 3, 2, 2, 2, 760, 765, 5, 106, 54, 2, 761, 762, 7, 88, 2, 2, 762, 764, 5, 106, 54, 2, 763, 761, 3, 2, 2, 2, 764, 767, 3, 2, 2, 2, 765, 763, 3, 2, 2, 2, 765, 766, 3, 2, 2, 2, 766, 105, 3, 2, 2, 2, 767, 765, 3, 2, 2, 2, 768, 774, 5, 292, 147, 2, 769, 774, 7, 10, 2, 2, 770, 774, 7, 11, 2, 2, 771, 774, 7, 9, 2, 2, 772, 774, 7, 12, 2, 2, 773, 768, 3, 2, 2, 2, 773, 769, 3, 2, 2, 2, 773, 770, 3, 2, 2, 2, 773, 771, 3, 2, 2, 2, 773, 772, 3, 2, 2, 2, 774, 107, 3, 2, 2, 2, 775, 776, 5, 106, 54, 2, 776, 777, 7, 88, 2, 2, 777, 779, 3, 2, 2, 2, 778, 775, 3, 2, 2, 2, 779, 782, 3, 2, 2, 2, 780, 778, 3, 2, 2, 2, 780, 781, 3, 2, 2, 2, 781, 109, 3, 2, 2, 2, 782, 780, 3, 2, 2, 2, 783, 784, 5, 108, 55, 2, 784, 785, 5, 292, 147, 2, 785, 111, 3, 2, 2, 2, 786, 787, 5, 108, 55, 2, 787, 792, 5, 290, 146, 2, 788, 789, 7, 88, 2, 2, 789, 791, 5, 290, 146, 2, 790, 788, 3, 2, 2, 2, 791, 794, 3, 2, 2, 2, 792, 790, 3, 2, 2, 2, 792, 793, 3, 2, 2, 2, 793, 113, 3, 2, 2, 2, 794, 792, 3, 2, 2, 2, 795, 801, 7, 58, 2, 2, 796, 801, 7, 59, 2, 2, 797, 801, 5, 288, 145, 2, 798, 801, 7, 60, 2, 2, 799, 801, 7, 61, 2, 2, 800, 795, 3, 2, 2, 2, 800, 796, 3, 2, 2, 2, 800, 797, 3, 2, 2, 2, 800, 798, 3, 2, 2, 2, 800, 799, 3, 2, 2, 2, 801, 115, 3, 2, 2, 2, 802, 803, 7, 4, 2, 2, 803, 808, 5, 118, 60, 2, 804, 805, 7, 6, 2, 2, 805, 807, 5, 118, 60, 2, 806, 804, 3, 2, 2, 2, 807, 810, 3, 2, 2, 2, 808, 806, 3, 2, 2, 2, 808, 809, 3, 2, 2, 2, 809, 811, 3, 2, 2, 2, 810, 808, 3, 2, 2, 2, 811, 812, 7, 5, 2, 2, 812, 117, 3, 2, 2, 2, 813, 821, 5, 120, 61, 2, 814, 816, 7, 82, 2, 2, 815, 817, 5, 230, 116, 2, 816, 815, 3, 2, 2, 2, 816, 817, 3, 2, 2, 2, 817, 818, 3, 2, 2, 2, 818, 821, 7, 83, 2, 2, 819, 821, 5, 132, 67, 2, 820, 813, 3, 2, 2, 2, 820, 814, 3, 2, 2, 2, 820, 819, 3, 2, 2, 2, 821, 119, 3, 2, 2, 2, 822, 826, 5, 292, 147, 2, 823, 825, 7, 7, 2, 2, 824, 823, 3, 2, 2, 2, 825, 828, 3, 2, 2, 2, 826, 824, 3, 2, 2, 2, 826, 827, 3, 2, 2, 2, 827, 121, 3, 2, 2, 2, 828, 826, 3, 2, 2, 2, 829, 830, 5, 126, 64, 2, 830, 831, 5, 300, 151, 2, 831, 832, 7, 77, 2, 2, 832, 833, 5, 300, 151, 2, 833, 834, 5, 130, 66, 2, 834, 123, 3, 2, 2, 2, 835, 836, 5, 128, 65, 2, 836, 837, 5, 300, 151, 2, 837, 838, 7, 77, 2, 2, 838, 839, 5, 300, 151, 2, 839, 840, 5, 130, 66, 2, 840, 125, 3, 2, 2, 2, 841, 842, 5, 94, 48, 2, 842, 127, 3, 2, 2, 2, 843, 846, 5, 94, 48, 2, 844, 846, 5, 64, 33, 2, 845, 843, 3, 2, 2, 2, 845, 844, 3, 2, 2, 2, 846, 129, 3, 2, 2, 2, 847, 850, 5, 158, 80, 2, 848, 850, 5, 230, 116, 2, 849, 847, 3, 2, 2, 2, 849, 848, 3, 2, 2, 2, 850, 131, 3, 2, 2, 2, 851, 852, 7, 82, 2, 2, 852, 860, 5, 300, 151, 2, 853, 855, 5, 96, 49, 2, 854, 853, 3, 2, 2, 2, 854, 855, 3, 2, 2, 2, 855, 856, 3, 2, 2, 2, 856, 857, 5, 300, 151, 2, 857, 858, 7, 77, 2, 2, 858, 859, 5, 300, 151, 2, 859, 861, 3, 2, 2, 2, 860, 854, 3, 2, 2, 2, 860, 861, 3, 2, 2, 2, 861, 862, 3, 2, 2, 2, 862, 863, 5, 136, 69, 2, 863, 864, 7, 83, 2, 2, 864, 133, 3, 2, 2, 2, 865, 868, 5, 132, 67, 2, 866, 868, 5, 122, 62, 2, 867, 865, 3, 2, 2, 2, 867, 866, 3, 2, 2, 2, 868, 135, 3, 2, 2, 2, 869, 871, 5, 138, 70, 2, 870, 869, 3, 2, 2, 2, 870, 871, 3, 2, 2, 2, 871, 137, 3, 2, 2, 2, 872, 878, 5, 160, 81, 2, 873, 874, 5, 302, 152, 2, 874, 875, 5, 160, 81, 2, 875, 877, 3, 2, 2, 2, 876, 873, 3, 2, 2, 2, 877, 880, 3, 2, 2, 2, 878, 876, 3, 2, 2, 2, 878, 879, 3, 2, 2, 2, 879, 882, 3, 2, 2, 2, 880, 878, 3, 2, 2, 2, 881, 883, 5, 302, 152, 2, 882, 881, 3, 2, 2, 2, 882, 883, 3, 2, 2, 2, 883, 139, 3, 2, 2, 2, 884, 885, 5, 142, 72, 2, 885, 886, 5, 300, 151, 2, 886, 888, 3, 2, 2, 2, 887, 884, 3, 2, 2, 2, 888, 891, 3, 2, 2, 2, 889, 887, 3, 2, 2, 2, 889, 890, 3, 2, 2, 2, 890, 141, 3, 2, 2, 2, 891, 889, 3, 2, 2, 2, 892, 893, 7, 126, 2, 2, 893, 899, 5, 146, 74, 2, 894, 896, 7, 80, 2, 2, 895, 897, 5, 144, 73, 2, 896, 895, 3, 2, 2, 2, 896, 897, 3, 2, 2, 2, 897, 898, 3, 2, 2, 2, 898, 900, 5, 298, 150, 2, 899, 894, 3, 2, 2, 2, 899, 900, 3, 2, 2, 2, 900, 143, 3, 2, 2, 2, 901, 904, 5, 148, 75, 2, 902, 904, 5, 154, 78, 2, 903, 901, 3, 2, 2, 2, 903, 902, 3, 2, 2, 2, 904, 145, 3, 2, 2, 2, 905, 906, 5, 110, 56, 2, 906, 147, 3, 2, 2, 2, 907, 912, 5, 150, 76, 2, 908, 909, 7, 87, 2, 2, 909, 911, 5, 150, 76, 2, 910, 908, 3, 2, 2, 2, 911, 914, 3, 2, 2, 2, 912, 910, 3, 2, 2, 2, 912, 913, 3, 2, 2, 2, 913, 149, 3, 2, 2, 2, 914, 912, 3, 2, 2, 2, 915, 916, 5, 152, 77, 2, 916, 917, 5, 300, 151, 2, 917, 918, 7, 89, 2, 2, 918, 919, 5, 300, 151, 2, 919, 920, 5, 154, 78, 2, 920, 151, 3, 2, 2, 2, 921, 924, 5, 292, 147, 2, 922, 924, 5, 296, 149, 2, 923, 921, 3, 2, 2, 2, 923, 922, 3, 2, 2, 2, 924, 153, 3, 2, 2, 2, 925, 929, 5, 156, 79, 2, 926, 929, 5, 142, 72, 2, 927, 929, 5, 234, 118, 2, 928, 925, 3, 2, 2, 2, 928, 926, 3, 2, 2, 2, 928, 927, 3, 2, 2, 2, 929, 155, 3, 2, 2, 2, 930, 939, 7, 84, 2, 2, 931, 936, 5, 154, 78, 2, 932, 933, 7, 87, 2, 2, 933, 935, 5, 154, 78, 2, 934, 932, 3, 2, 2, 2, 935, 938, 3, 2, 2, 2, 936, 934, 3, 2, 2, 2, 936, 937, 3, 2, 2, 2, 937, 940, 3, 2, 2, 2, 938, 936, 3, 2, 2, 2, 939, 931, 3, 2, 2, 2, 939, 940, 3, 2, 2, 2, 940, 942, 3, 2, 2, 2, 941, 943, 7, 87, 2, 2, 942, 941, 3, 2, 2, 2, 942, 943, 3, 2, 2, 2, 943, 944, 3, 2, 2, 2, 944, 945, 7, 85, 2, 2, 945, 157, 3, 2, 2, 2, 946, 954, 7, 82, 2, 2, 947, 955, 5, 300, 151, 2, 948, 950, 5, 302, 152, 2, 949, 948, 3, 2, 2, 2, 950, 953, 3, 2, 2, 2, 951, 949, 3, 2, 2, 2, 951, 952, 3, 2, 2, 2, 952, 955, 3, 2, 2, 2, 953, 951, 3, 2, 2, 2, 954, 947, 3, 2, 2, 2, 954, 951, 3, 2, 2, 2, 955, 956, 3, 2, 2, 2, 956, 957, 5, 136, 69, 2, 957, 958, 7, 83, 2, 2, 958, 159, 3, 2, 2, 2, 959, 962, 5, 162, 82, 2, 960, 962, 5, 190, 96, 2, 961, 959, 3, 2, 2, 2, 961, 960, 3, 2, 2, 2, 962, 161, 3, 2, 2, 2, 963, 964, 5, 166, 84, 2, 964, 163, 3, 2, 2, 2, 965, 966, 6, 83, 9, 3, 966, 970, 5, 30, 16, 2, 967, 968, 6, 83, 10, 3, 968, 970, 5, 18, 10, 2, 969, 965, 3, 2, 2, 2, 969, 967, 3, 2, 2, 2, 970, 165, 3, 2, 2, 2, 971, 982, 5, 164, 83, 2, 972, 974, 5, 76, 39, 2, 973, 972, 3, 2, 2, 2, 973, 974, 3, 2, 2, 2, 974, 975, 3, 2, 2, 2, 975, 983, 5, 60, 31, 2, 976, 977, 5, 168, 85, 2, 977, 978, 5, 300, 151, 2, 978, 979, 7, 89, 2, 2, 979, 980, 5, 300, 151, 2, 980, 981, 5, 66, 34, 2, 981, 983, 3, 2, 2, 2, 982, 973, 3, 2, 2, 2, 982, 976, 3, 2, 2, 2, 983, 991, 3, 2, 2, 2, 984, 986, 5, 164, 83, 2, 985, 984, 3, 2, 2, 2, 985, 986, 3, 2, 2, 2, 986, 987, 3, 2, 2, 2, 987, 988, 5, 76, 39, 2, 988, 989, 5, 60, 31, 2, 989, 991, 3, 2, 2, 2, 990, 971, 3, 2, 2, 2, 990, 985, 3, 2, 2, 2, 991, 167, 3, 2, 2, 2, 992, 993, 7, 80, 2, 2, 993, 998, 5, 170, 86, 2, 994, 995, 7, 87, 2, 2, 995, 997, 5, 170, 86, 2, 996, 994, 3, 2, 2, 2, 997, 1000, 3, 2, 2, 2, 998, 996, 3, 2, 2, 2, 998, 999, 3, 2, 2, 2, 999, 1001, 3, 2, 2, 2, 1000, 998, 3, 2, 2, 2, 1001, 1002, 5, 298, 150, 2, 1002, 169, 3, 2, 2, 2, 1003, 1005, 5, 76, 39, 2, 1004, 1003, 3, 2, 2, 2, 1004, 1005, 3, 2, 2, 2, 1005, 1006, 3, 2, 2, 2, 1006, 1007, 5, 64, 33, 2, 1007, 171, 3, 2, 2, 2, 1008, 1009, 7, 80, 2, 2, 1009, 1012, 5, 64, 33, 2, 1010, 1011, 7, 87, 2, 2, 1011, 1013, 5, 64, 33, 2, 1012, 1010, 3, 2, 2, 2, 1013, 1014, 3, 2, 2, 2, 1014, 1012, 3, 2, 2, 2, 1014, 1015, 3, 2, 2, 2, 1015, 1016, 3, 2, 2, 2, 1016, 1017, 5, 298, 150, 2, 1017, 173, 3, 2, 2, 2, 1018, 1021, 5, 176, 89, 2, 1019, 1021, 5, 178, 90, 2, 1020, 1018, 3, 2, 2, 2, 1020, 1019, 3, 2, 2, 2, 1021, 175, 3, 2, 2, 2, 1022, 1023, 7, 32, 2, 2, 1023, 1024, 5, 222, 112, 2, 1024, 1025, 5, 300, 151, 2, 1025, 1034, 5, 190, 96, 2, 1026, 1029, 5, 300, 151, 2, 1027, 1029, 5, 302, 152, 2, 1028, 1026, 3, 2, 2, 2, 1028, 1027, 3, 2, 2, 2, 1029, 1030, 3, 2, 2, 2, 1030, 1031, 7, 26, 2, 2, 1031, 1032, 5, 300, 151, 2, 1032, 1033, 5, 190, 96, 2, 1033, 1035, 3, 2, 2, 2, 1034, 1028, 3, 2, 2, 2, 1034, 1035, 3, 2, 2, 2, 1035, 177, 3, 2, 2, 2, 1036, 1037, 7, 48, 2, 2, 1037, 1038, 5, 222, 112, 2, 1038, 1039, 5, 300, 151, 2, 1039, 1040, 7, 82, 2, 2, 1040, 1044, 5, 300, 151, 2, 1041, 1043, 5, 204, 103, 2, 1042, 1041, 3, 2, 2, 2, 1043, 1046, 3, 2, 2, 2, 1044, 1042, 3, 2, 2, 2, 1044, 1045, 3, 2, 2, 2, 1045, 1047, 3, 2, 2, 2, 1046, 1044, 3, 2, 2, 2, 1047, 1048, 5, 300, 151, 2, 1048, 1049, 7, 83, 2, 2, 1049, 179, 3, 2, 2, 2, 1050, 1051, 7, 31, 2, 2, 1051, 1052, 7, 80, 2, 2, 1052, 1053, 5, 208, 105, 2, 1053, 1054, 5, 298, 150, 2, 1054, 1055, 5, 300, 151, 2, 1055, 1056, 5, 190, 96, 2, 1056, 1070, 3, 2, 2, 2, 1057, 1058, 7, 57, 2, 2, 1058, 1059, 5, 222, 112, 2, 1059, 1060, 5, 300, 151, 2, 1060, 1061, 5, 190, 96, 2, 1061, 1070, 3, 2, 2, 2, 1062, 1063, 7, 25, 2, 2, 1063, 1064, 5, 300, 151, 2, 1064, 1065, 5, 190, 96, 2, 1065, 1066, 5, 300, 151, 2, 1066, 1067, 7, 57, 2, 2, 1067, 1068, 5, 222, 112, 2, 1068, 1070, 3, 2, 2, 2, 1069, 1050, 3, 2, 2, 2, 1069, 1057, 3, 2, 2, 2, 1069, 1062, 3, 2, 2, 2, 1070, 181, 3, 2, 2, 2, 1071, 1073, 7, 23, 2, 2, 1072, 1074, 5, 292, 147, 2, 1073, 1072, 3, 2, 2, 2, 1073, 1074, 3, 2, 2, 2, 1074, 183, 3, 2, 2, 2, 1075, 1077, 7, 18, 2, 2, 1076, 1078, 5, 292, 147, 2, 1077, 1076, 3, 2, 2, 2, 1077, 1078, 3, 2, 2, 2, 1078, 185, 3, 2, 2, 2, 1079, 1081, 7, 54, 2, 2, 1080, 1082, 5, 198, 100, 2, 1081, 1080, 3, 2, 2, 2, 1081, 1082, 3, 2, 2, 2, 1082, 1083, 3, 2, 2, 2, 1083, 1084, 5, 300, 151, 2, 1084, 1090, 5, 158, 80, 2, 1085, 1086, 5, 300, 151, 2, 1086, 1087, 5, 192, 97, 2, 1087, 1089, 3, 2, 2, 2, 1088, 1085, 3, 2, 2, 2, 1089, 1092, 3, 2, 2, 2, 1090, 1088, 3, 2, 2, 2, 1090, 1091, 3, 2, 2, 2, 1091, 1096, 3, 2, 2, 2, 1092, 1090, 3, 2, 2, 2, 1093, 1094, 5, 300, 151, 2, 1094, 1095, 5, 196, 99, 2, 1095, 1097, 3, 2, 2, 2, 1096, 1093, 3, 2, 2, 2, 1096, 1097, 3, 2, 2, 2, 1097, 187, 3, 2, 2, 2, 1098, 1099, 7, 17, 2, 2, 1099, 1105, 5, 234, 118, 2, 1100, 1101, 5, 300, 151, 2, 1101, 1102, 9, 6, 2, 2, 1102, 1103, 5, 300, 151, 2, 1103, 1104, 5, 234, 118, 2, 1104, 1106, 3, 2, 2, 2, 1105, 1100, 3, 2, 2, 2, 1105, 1106, 3, 2, 2, 2, 1106, 189, 3, 2, 2, 2, 1107, 1135, 5, 158, 80, 2, 1108, 1135, 5, 174, 88, 2, 1109, 1135, 5, 180, 91, 2, 1110, 1135, 5, 186, 94, 2, 1111, 1112, 7, 49, 2, 2, 1112, 1113, 5, 222, 112, 2, 1113, 1114, 5, 300, 151, 2, 1114, 1115, 5, 158, 80, 2, 1115, 1135, 3, 2, 2, 2, 1116, 1118, 7, 44, 2, 2, 1117, 1119, 5, 234, 118, 2, 1118, 1117, 3, 2, 2, 2, 1118, 1119, 3, 2, 2, 2, 1119, 1135, 3, 2, 2, 2, 1120, 1121, 7, 51, 2, 2, 1121, 1135, 5, 234, 118, 2, 1122, 1135, 5, 184, 93, 2, 1123, 1135, 5, 182, 92, 2, 1124, 1125, 5, 292, 147, 2, 1125, 1126, 7, 95, 2, 2, 1126, 1127, 5, 300, 151, 2, 1127, 1128, 5, 190, 96, 2, 1128, 1135, 3, 2, 2, 2, 1129, 1135, 5, 188, 95, 2, 1130, 1135, 5, 162, 82, 2, 1131, 1135, 5, 52, 27, 2, 1132, 1135, 5, 230, 116, 2, 1133, 1135, 7, 86, 2, 2, 1134, 1107, 3, 2, 2, 2, 1134, 1108, 3, 2, 2, 2, 1134, 1109, 3, 2, 2, 2, 1134, 1110, 3, 2, 2, 2, 1134, 1111, 3, 2, 2, 2, 1134, 1116, 3, 2, 2, 2, 1134, 1120, 3, 2, 2, 2, 1134, 1122, 3, 2, 2, 2, 1134, 1123, 3, 2, 2, 2, 1134, 1124, 3, 2, 2, 2, 1134, 1129, 3, 2, 2, 2, 1134, 1130, 3, 2, 2, 2, 1134, 1131, 3, 2, 2, 2, 1134, 1132, 3, 2, 2, 2, 1134, 1133, 3, 2, 2, 2, 1135, 191, 3, 2, 2, 2, 1136, 1137, 7, 20, 2, 2, 1137, 1138, 7, 80, 2, 2, 1138, 1140, 5, 28, 15, 2, 1139, 1141, 5, 194, 98, 2, 1140, 1139, 3, 2, 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 3, 2, 2, 2, 1142, 1143, 5, 292, 147, 2, 1143, 1144, 5, 298, 150, 2, 1144, 1145, 5, 300, 151, 2, 1145, 1146, 5, 158, 80, 2, 1146, 193, 3, 2, 2, 2, 1147, 1152, 5, 110, 56, 2, 1148, 1149, 7, 109, 2, 2, 1149, 1151, 5, 110, 56, 2, 1150, 1148, 3, 2, 2, 2, 1151, 1154, 3, 2, 2, 2, 1152, 1150, 3, 2, 2, 2, 1152, 1153, 3, 2, 2, 2, 1153, 195, 3, 2, 2, 2, 1154, 1152, 3, 2, 2, 2, 1155, 1156, 7, 30, 2, 2, 1156, 1157, 5, 300, 151, 2, 1157, 1158, 5, 158, 80, 2, 1158, 197, 3, 2, 2, 2, 1159, 1160, 7, 80, 2, 2, 1160, 1161, 5, 300, 151, 2, 1161, 1163, 5, 200, 101, 2, 1162, 1164, 5, 302, 152, 2, 1163, 1162, 3, 2, 2, 2, 1163, 1164, 3, 2, 2, 2, 1164, 1165, 3, 2, 2, 2, 1165, 1166, 5, 298, 150, 2, 1166, 199, 3, 2, 2, 2, 1167, 1173, 5, 202, 102, 2, 1168, 1169, 5, 302, 152, 2, 1169, 1170, 5, 202, 102, 2, 1170, 1172, 3, 2, 2, 2, 1171, 1168, 3, 2, 2, 2, 1172, 1175, 3, 2, 2, 2, 1173, 1171, 3, 2, 2, 2, 1173, 1174, 3, 2, 2, 2, 1174, 201, 3, 2, 2, 2, 1175, 1173, 3, 2, 2, 2, 1176, 1179, 5, 162, 82, 2, 1177, 1179, 5, 234, 118, 2, 1178, 1176, 3, 2, 2, 2, 1178, 1177, 3, 2, 2, 2, 1179, 203, 3, 2, 2, 2, 1180, 1181, 5, 206, 104, 2, 1181, 1182, 5, 300, 151, 2, 1182, 1184, 3, 2, 2, 2, 1183, 1180, 3, 2, 2, 2, 1184, 1185, 3, 2, 2, 2, 1185, 1183, 3, 2, 2, 2, 1185, 1186, 3, 2, 2, 2, 1186, 1187, 3, 2, 2, 2, 1187, 1188, 5, 138, 70, 2, 1188, 205, 3, 2, 2, 2, 1189, 1190, 7, 19, 2, 2, 1190, 1191, 5, 234, 118, 2, 1191, 1192, 7, 95, 2, 2, 1192, 1196, 3, 2, 2, 2, 1193, 1194, 7, 24, 2, 2, 1194, 1196, 7, 95, 2, 2, 1195, 1189, 3, 2, 2, 2, 1195, 1193, 3, 2, 2, 2, 1196, 207, 3, 2, 2, 2, 1197, 1200, 5, 210, 106, 2, 1198, 1200, 5, 212, 107, 2, 1199, 1197, 3, 2, 2, 2, 1199, 1198, 3, 2, 2, 2, 1200, 209, 3, 2, 2, 2, 1201, 1203, 5, 28, 15, 2, 1202, 1204, 5, 76, 39, 2, 1203, 1202, 3, 2, 2, 2, 1203, 1204, 3, 2, 2, 2, 1204, 1205, 3, 2, 2, 2, 1205, 1206, 5, 64, 33, 2, 1206, 1207, 9, 7, 2, 2, 1207, 1208, 5, 234, 118, 2, 1208, 211, 3, 2, 2, 2, 1209, 1211, 5, 214, 108, 2, 1210, 1209, 3, 2, 2, 2, 1210, 1211, 3, 2, 2, 2, 1211, 1212, 3, 2, 2, 2, 1212, 1214, 7, 86, 2, 2, 1213, 1215, 5, 234, 118, 2, 1214, 1213, 3, 2, 2, 2, 1214, 1215, 3, 2, 2, 2, 1215, 1216, 3, 2, 2, 2, 1216, 1218, 7, 86, 2, 2, 1217, 1219, 5, 216, 109, 2, 1218, 1217, 3, 2, 2, 2, 1218, 1219, 3, 2, 2, 2, 1219, 213, 3, 2, 2, 2, 1220, 1223, 5, 162, 82, 2, 1221, 1223, 5, 224, 113, 2, 1222, 1220, 3, 2, 2, 2, 1222, 1221, 3, 2, 2, 2, 1223, 215, 3, 2, 2, 2, 1224, 1225, 5, 224, 113, 2, 1225, 217, 3, 2, 2, 2, 1226, 1227, 7, 80, 2, 2, 1227, 1228, 5, 76, 39, 2, 1228, 1229, 5, 298, 150, 2, 1229, 219, 3, 2, 2, 2, 1230, 1231, 5, 222, 112, 2, 1231, 221, 3, 2, 2, 2, 1232, 1233, 7, 80, 2, 2, 1233, 1234, 5, 228, 115, 2, 1234, 1235, 5, 298, 150, 2, 1235, 223, 3, 2, 2, 2, 1236, 1241, 5, 226, 114, 2, 1237, 1238, 7, 87, 2, 2, 1238, 1240, 5, 226, 114, 2, 1239, 1237, 3, 2, 2, 2, 1240, 1243, 3, 2, 2, 2, 1241, 1239, 3, 2, 2, 2, 1241, 1242, 3, 2, 2, 2, 1242, 225, 3, 2, 2, 2, 1243, 1241, 3, 2, 2, 2, 1244, 1247, 7, 106, 2, 2, 1245, 1247, 3, 2, 2, 2, 1246, 1244, 3, 2, 2, 2, 1246, 1245, 3, 2, 2, 2, 1247, 1248, 3, 2, 2, 2, 1248, 1249, 5, 234, 118, 2, 1249, 227, 3, 2, 2, 2, 1250, 1253, 5, 230, 116, 2, 1251, 1253, 5, 124, 63, 2, 1252, 1250, 3, 2, 2, 2, 1252, 1251, 3, 2, 2, 2, 1253, 229, 3, 2, 2, 2, 1254, 1255, 5, 238, 120, 2, 1255, 231, 3, 2, 2, 2, 1256, 1258, 5, 242, 122, 2, 1257, 1259, 9, 8, 2, 2, 1258, 1257, 3, 2, 2, 2, 1258, 1259, 3, 2, 2, 2, 1259, 233, 3, 2, 2, 2, 1260, 1261, 8, 118, 1, 2, 1261, 1262, 5, 218, 110, 2, 1262, 1263, 5, 236, 119, 2, 1263, 1278, 3, 2, 2, 2, 1264, 1278, 5, 232, 117, 2, 1265, 1266, 9, 9, 2, 2, 1266, 1267, 5, 300, 151, 2, 1267, 1268, 5, 234, 118, 20, 1268, 1278, 3, 2, 2, 2, 1269, 1270, 9, 10, 2, 2, 1270, 1278, 5, 234, 118, 18, 1271, 1272, 5, 172, 87, 2, 1272, 1273, 5, 300, 151, 2, 1273, 1274, 7, 89, 2, 2, 1274, 1275, 5, 300, 151, 2, 1275, 1276, 5, 230, 116, 2, 1276, 1278, 3, 2, 2, 2, 1277, 1260, 3, 2, 2, 2, 1277, 1264, 3, 2, 2, 2, 1277, 1265, 3, 2, 2, 2, 1277, 1269, 3, 2, 2, 2, 1277, 1271, 3, 2, 2, 2, 1278, 1389, 3, 2, 2, 2, 1279, 1280, 12, 19, 2, 2, 1280, 1281, 7, 72, 2, 2, 1281, 1282, 5, 300, 151, 2, 1282, 1283, 5, 234, 118, 20, 1283, 1388, 3, 2, 2, 2, 1284, 1285, 12, 17, 2, 2, 1285, 1286, 5, 300, 151, 2, 1286, 1287, 9, 11, 2, 2, 1287, 1288, 5, 300, 151, 2, 1288, 1289, 5, 234, 118, 18, 1289, 1388, 3, 2, 2, 2, 1290, 1291, 12, 16, 2, 2, 1291, 1292, 9, 12, 2, 2, 1292, 1293, 5, 300, 151, 2, 1293, 1294, 5, 234, 118, 17, 1294, 1388, 3, 2, 2, 2, 1295, 1296, 12, 15, 2, 2, 1296, 1307, 5, 300, 151, 2, 1297, 1298, 7, 91, 2, 2, 1298, 1305, 7, 91, 2, 2, 1299, 1300, 7, 90, 2, 2, 1300, 1301, 7, 90, 2, 2, 1301, 1305, 7, 90, 2, 2, 1302, 1303, 7, 90, 2, 2, 1303, 1305, 7, 90, 2, 2, 1304, 1297, 3, 2, 2, 2, 1304, 1299, 3, 2, 2, 2, 1304, 1302, 3, 2, 2, 2, 1305, 1308, 3, 2, 2, 2, 1306, 1308, 9, 13, 2, 2, 1307, 1304, 3, 2, 2, 2, 1307, 1306, 3, 2, 2, 2, 1308, 1309, 3, 2, 2, 2, 1309, 1310, 5, 300, 151, 2, 1310, 1311, 5, 234, 118, 16, 1311, 1388, 3, 2, 2, 2, 1312, 1313, 12, 13, 2, 2, 1313, 1314, 5, 300, 151, 2, 1314, 1315, 9, 14, 2, 2, 1315, 1316, 5, 300, 151, 2, 1316, 1317, 5, 234, 118, 14, 1317, 1388, 3, 2, 2, 2, 1318, 1319, 12, 12, 2, 2, 1319, 1320, 5, 300, 151, 2, 1320, 1321, 9, 15, 2, 2, 1321, 1322, 5, 300, 151, 2, 1322, 1323, 5, 234, 118, 13, 1323, 1388, 3, 2, 2, 2, 1324, 1325, 12, 11, 2, 2, 1325, 1326, 5, 300, 151, 2, 1326, 1327, 9, 16, 2, 2, 1327, 1328, 5, 300, 151, 2, 1328, 1329, 5, 234, 118, 12, 1329, 1388, 3, 2, 2, 2, 1330, 1331, 12, 10, 2, 2, 1331, 1332, 5, 300, 151, 2, 1332, 1333, 7, 108, 2, 2, 1333, 1334, 5, 300, 151, 2, 1334, 1335, 5, 234, 118, 11, 1335, 1388, 3, 2, 2, 2, 1336, 1337, 12, 9, 2, 2, 1337, 1338, 5, 300, 151, 2, 1338, 1339, 7, 110, 2, 2, 1339, 1340, 5, 300, 151, 2, 1340, 1341, 5, 234, 118, 10, 1341, 1388, 3, 2, 2, 2, 1342, 1343, 12, 8, 2, 2, 1343, 1344, 5, 300, 151, 2, 1344, 1345, 7, 109, 2, 2, 1345, 1346, 5, 300, 151, 2, 1346, 1347, 5, 234, 118, 9, 1347, 1388, 3, 2, 2, 2, 1348, 1349, 12, 7, 2, 2, 1349, 1350, 5, 300, 151, 2, 1350, 1351, 7, 100, 2, 2, 1351, 1352, 5, 300, 151, 2, 1352, 1353, 5, 234, 118, 8, 1353, 1388, 3, 2, 2, 2, 1354, 1355, 12, 6, 2, 2, 1355, 1356, 5, 300, 151, 2, 1356, 1357, 7, 101, 2, 2, 1357, 1358, 5, 300, 151, 2, 1358, 1359, 5, 234, 118, 7, 1359, 1388, 3, 2, 2, 2, 1360, 1361, 12, 5, 2, 2, 1361, 1371, 5, 300, 151, 2, 1362, 1363, 7, 94, 2, 2, 1363, 1364, 5, 300, 151, 2, 1364, 1365, 5, 234, 118, 2, 1365, 1366, 5, 300, 151, 2, 1366, 1367, 7, 95, 2, 2, 1367, 1368, 5, 300, 151, 2, 1368, 1372, 3, 2, 2, 2, 1369, 1370, 7, 67, 2, 2, 1370, 1372, 5, 300, 151, 2, 1371, 1362, 3, 2, 2, 2, 1371, 1369, 3, 2, 2, 2, 1372, 1373, 3, 2, 2, 2, 1373, 1374, 5, 234, 118, 5, 1374, 1388, 3, 2, 2, 2, 1375, 1376, 12, 14, 2, 2, 1376, 1377, 5, 300, 151, 2, 1377, 1378, 9, 17, 2, 2, 1378, 1379, 5, 300, 151, 2, 1379, 1380, 5, 76, 39, 2, 1380, 1388, 3, 2, 2, 2, 1381, 1382, 12, 3, 2, 2, 1382, 1383, 5, 300, 151, 2, 1383, 1384, 9, 18, 2, 2, 1384, 1385, 5, 300, 151, 2, 1385, 1386, 5, 228, 115, 2, 1386, 1388, 3, 2, 2, 2, 1387, 1279, 3, 2, 2, 2, 1387, 1284, 3, 2, 2, 2, 1387, 1290, 3, 2, 2, 2, 1387, 1295, 3, 2, 2, 2, 1387, 1312, 3, 2, 2, 2, 1387, 1318, 3, 2, 2, 2, 1387, 1324, 3, 2, 2, 2, 1387, 1330, 3, 2, 2, 2, 1387, 1336, 3, 2, 2, 2, 1387, 1342, 3, 2, 2, 2, 1387, 1348, 3, 2, 2, 2, 1387, 1354, 3, 2, 2, 2, 1387, 1360, 3, 2, 2, 2, 1387, 1375, 3, 2, 2, 2, 1387, 1381, 3, 2, 2, 2, 1388, 1391, 3, 2, 2, 2, 1389, 1387, 3, 2, 2, 2, 1389, 1390, 3, 2, 2, 2, 1390, 235, 3, 2, 2, 2, 1391, 1389, 3, 2, 2, 2, 1392, 1393, 5, 218, 110, 2, 1393, 1394, 5, 236, 119, 2, 1394, 1403, 3, 2, 2, 2, 1395, 1403, 5, 232, 117, 2, 1396, 1397, 9, 9, 2, 2, 1397, 1398, 5, 300, 151, 2, 1398, 1399, 5, 236, 119, 2, 1399, 1403, 3, 2, 2, 2, 1400, 1401, 9, 10, 2, 2, 1401, 1403, 5, 236, 119, 2, 1402, 1392, 3, 2, 2, 2, 1402, 1395, 3, 2, 2, 2, 1402, 1396, 3, 2, 2, 2, 1402, 1400, 3, 2, 2, 2, 1403, 237, 3, 2, 2, 2, 1404, 1407, 5, 234, 118, 2, 1405, 1408, 5, 280, 141, 2, 1406, 1408, 3, 2, 2, 2, 1407, 1405, 3, 2, 2, 2, 1407, 1406, 3, 2, 2, 2, 1408, 1412, 3, 2, 2, 2, 1409, 1411, 5, 240, 121, 2, 1410, 1409, 3, 2, 2, 2, 1411, 1414, 3, 2, 2, 2, 1412, 1410, 3, 2, 2, 2, 1412, 1413, 3, 2, 2, 2, 1413, 239, 3, 2, 2, 2, 1414, 1412, 3, 2, 2, 2, 1415, 1422, 5, 254, 128, 2, 1416, 1418, 5, 244, 123, 2, 1417, 1416, 3, 2, 2, 2, 1418, 1419, 3, 2, 2, 2, 1419, 1417, 3, 2, 2, 2, 1419, 1420, 3, 2, 2, 2, 1420, 1423, 3, 2, 2, 2, 1421, 1423, 5, 280, 141, 2, 1422, 1417, 3, 2, 2, 2, 1422, 1421, 3, 2, 2, 2, 1422, 1423, 3, 2, 2, 2, 1423, 241, 3, 2, 2, 2, 1424, 1430, 5, 254, 128, 2, 1425, 1426, 5, 244, 123, 2, 1426, 1427, 8, 122, 1, 2, 1427, 1429, 3, 2, 2, 2, 1428, 1425, 3, 2, 2, 2, 1429, 1432, 3, 2, 2, 2, 1430, 1428, 3, 2, 2, 2, 1430, 1431, 3, 2, 2, 2, 1431, 243, 3, 2, 2, 2, 1432, 1430, 3, 2, 2, 2, 1433, 1444, 5, 300, 151, 2, 1434, 1435, 9, 19, 2, 2, 1435, 1438, 5, 300, 151, 2, 1436, 1439, 7, 126, 2, 2, 1437, 1439, 5, 274, 138, 2, 1438, 1436, 3, 2, 2, 2, 1438, 1437, 3, 2, 2, 2, 1438, 1439, 3, 2, 2, 2, 1439, 1445, 3, 2, 2, 2, 1440, 1441, 7, 68, 2, 2, 1441, 1445, 5, 300, 151, 2, 1442, 1443, 7, 69, 2, 2, 1443, 1445, 5, 300, 151, 2, 1444, 1434, 3, 2, 2, 2, 1444, 1440, 3, 2, 2, 2, 1444, 1442, 3, 2, 2, 2, 1445, 1446, 3, 2, 2, 2, 1446, 1447, 5, 246, 124, 2, 1447, 1448, 8, 123, 1, 2, 1448, 1470, 3, 2, 2, 2, 1449, 1450, 5, 300, 151, 2, 1450, 1451, 7, 88, 2, 2, 1451, 1452, 5, 300, 151, 2, 1452, 1453, 7, 39, 2, 2, 1453, 1454, 5, 266, 134, 2, 1454, 1455, 8, 123, 1, 2, 1455, 1470, 3, 2, 2, 2, 1456, 1457, 5, 278, 140, 2, 1457, 1458, 8, 123, 1, 2, 1458, 1470, 3, 2, 2, 2, 1459, 1460, 5, 300, 151, 2, 1460, 1461, 5, 134, 68, 2, 1461, 1462, 8, 123, 1, 2, 1462, 1470, 3, 2, 2, 2, 1463, 1464, 5, 250, 126, 2, 1464, 1465, 8, 123, 1, 2, 1465, 1470, 3, 2, 2, 2, 1466, 1467, 5, 252, 127, 2, 1467, 1468, 8, 123, 1, 2, 1468, 1470, 3, 2, 2, 2, 1469, 1433, 3, 2, 2, 2, 1469, 1449, 3, 2, 2, 2, 1469, 1456, 3, 2, 2, 2, 1469, 1459, 3, 2, 2, 2, 1469, 1463, 3, 2, 2, 2, 1469, 1466, 3, 2, 2, 2, 1470, 245, 3, 2, 2, 2, 1471, 1476, 5, 292, 147, 2, 1472, 1476, 5, 288, 145, 2, 1473, 1476, 5, 248, 125, 2, 1474, 1476, 5, 296, 149, 2, 1475, 1471, 3, 2, 2, 2, 1475, 1472, 3, 2, 2, 2, 1475, 1473, 3, 2, 2, 2, 1475, 1474, 3, 2, 2, 2, 1476, 247, 3, 2, 2, 2, 1477, 1480, 5, 220, 111, 2, 1478, 1480, 5, 116, 59, 2, 1479, 1477, 3, 2, 2, 2, 1479, 1478, 3, 2, 2, 2, 1480, 249, 3, 2, 2, 2, 1481, 1483, 7, 94, 2, 2, 1482, 1481, 3, 2, 2, 2, 1482, 1483, 3, 2, 2, 2, 1483, 1484, 3, 2, 2, 2, 1484, 1486, 7, 84, 2, 2, 1485, 1487, 5, 224, 113, 2, 1486, 1485, 3, 2, 2, 2, 1486, 1487, 3, 2, 2, 2, 1487, 1488, 3, 2, 2, 2, 1488, 1489, 7, 85, 2, 2, 1489, 251, 3, 2, 2, 2, 1490, 1492, 7, 94, 2, 2, 1491, 1490, 3, 2, 2, 2, 1491, 1492, 3, 2, 2, 2, 1492, 1493, 3, 2, 2, 2, 1493, 1496, 7, 84, 2, 2, 1494, 1497, 5, 260, 131, 2, 1495, 1497, 7, 95, 2, 2, 1496, 1494, 3, 2, 2, 2, 1496, 1495, 3, 2, 2, 2, 1497, 1498, 3, 2, 2, 2, 1498, 1499, 7, 85, 2, 2, 1499, 253, 3, 2, 2, 2, 1500, 1502, 5, 292, 147, 2, 1501, 1503, 5, 86, 44, 2, 1502, 1501, 3, 2, 2, 2, 1502, 1503, 3, 2, 2, 2, 1503, 1518, 3, 2, 2, 2, 1504, 1518, 5, 114, 58, 2, 1505, 1518, 5, 116, 59, 2, 1506, 1507, 7, 39, 2, 2, 1507, 1508, 5, 300, 151, 2, 1508, 1509, 5, 266, 134, 2, 1509, 1518, 3, 2, 2, 2, 1510, 1518, 7, 50, 2, 2, 1511, 1518, 7, 47, 2, 2, 1512, 1518, 5, 220, 111, 2, 1513, 1518, 5, 134, 68, 2, 1514, 1518, 5, 256, 129, 2, 1515, 1518, 5, 258, 130, 2, 1516, 1518, 5, 294, 148, 2, 1517, 1500, 3, 2, 2, 2, 1517, 1504, 3, 2, 2, 2, 1517, 1505, 3, 2, 2, 2, 1517, 1506, 3, 2, 2, 2, 1517, 1510, 3, 2, 2, 2, 1517, 1511, 3, 2, 2, 2, 1517, 1512, 3, 2, 2, 2, 1517, 1513, 3, 2, 2, 2, 1517, 1514, 3, 2, 2, 2, 1517, 1515, 3, 2, 2, 2, 1517, 1516, 3, 2, 2, 2, 1518, 255, 3, 2, 2, 2, 1519, 1521, 7, 84, 2, 2, 1520, 1522, 5, 224, 113, 2, 1521, 1520, 3, 2, 2, 2, 1521, 1522, 3, 2, 2, 2, 1522, 1524, 3, 2, 2, 2, 1523, 1525, 7, 87, 2, 2, 1524, 1523, 3, 2, 2, 2, 1524, 1525, 3, 2, 2, 2, 1525, 1526, 3, 2, 2, 2, 1526, 1527, 7, 85, 2, 2, 1527, 257, 3, 2, 2, 2, 1528, 1534, 7, 84, 2, 2, 1529, 1531, 5, 260, 131, 2, 1530, 1532, 7, 87, 2, 2, 1531, 1530, 3, 2, 2, 2, 1531, 1532, 3, 2, 2, 2, 1532, 1535, 3, 2, 2, 2, 1533, 1535, 7, 95, 2, 2, 1534, 1529, 3, 2, 2, 2, 1534, 1533, 3, 2, 2, 2, 1535, 1536, 3, 2, 2, 2, 1536, 1537, 7, 85, 2, 2, 1537, 259, 3, 2, 2, 2, 1538, 1543, 5, 262, 132, 2, 1539, 1540, 7, 87, 2, 2, 1540, 1542, 5, 262, 132, 2, 1541, 1539, 3, 2, 2, 2, 1542, 1545, 3, 2, 2, 2, 1543, 1541, 3, 2, 2, 2, 1543, 1544, 3, 2, 2, 2, 1544, 261, 3, 2, 2, 2, 1545, 1543, 3, 2, 2, 2, 1546, 1547, 5, 264, 133, 2, 1547, 1548, 7, 95, 2, 2, 1548, 1549, 5, 300, 151, 2, 1549, 1550, 5, 234, 118, 2, 1550, 1557, 3, 2, 2, 2, 1551, 1552, 7, 106, 2, 2, 1552, 1553, 7, 95, 2, 2, 1553, 1554, 5, 300, 151, 2, 1554, 1555, 5, 234, 118, 2, 1555, 1557, 3, 2, 2, 2, 1556, 1546, 3, 2, 2, 2, 1556, 1551, 3, 2, 2, 2, 1557, 263, 3, 2, 2, 2, 1558, 1561, 5, 296, 149, 2, 1559, 1561, 5, 254, 128, 2, 1560, 1558, 3, 2, 2, 2, 1560, 1559, 3, 2, 2, 2, 1561, 265, 3, 2, 2, 2, 1562, 1586, 5, 272, 137, 2, 1563, 1564, 6, 134, 26, 3, 1564, 1565, 5, 300, 151, 2, 1565, 1567, 5, 278, 140, 2, 1566, 1568, 5, 270, 136, 2, 1567, 1566, 3, 2, 2, 2, 1567, 1568, 3, 2, 2, 2, 1568, 1587, 3, 2, 2, 2, 1569, 1575, 6, 134, 27, 3, 1570, 1571, 5, 140, 71, 2, 1571, 1572, 7, 84, 2, 2, 1572, 1573, 5, 234, 118, 2, 1573, 1574, 7, 85, 2, 2, 1574, 1576, 3, 2, 2, 2, 1575, 1570, 3, 2, 2, 2, 1576, 1577, 3, 2, 2, 2, 1577, 1575, 3, 2, 2, 2, 1577, 1578, 3, 2, 2, 2, 1578, 1579, 3, 2, 2, 2, 1579, 1580, 5, 72, 37, 2, 1580, 1587, 3, 2, 2, 2, 1581, 1582, 6, 134, 28, 3, 1582, 1583, 5, 70, 36, 2, 1583, 1584, 5, 300, 151, 2, 1584, 1585, 5, 268, 135, 2, 1585, 1587, 3, 2, 2, 2, 1586, 1563, 3, 2, 2, 2, 1586, 1569, 3, 2, 2, 2, 1586, 1581, 3, 2, 2, 2, 1587, 267, 3, 2, 2, 2, 1588, 1589, 7, 82, 2, 2, 1589, 1591, 5, 300, 151, 2, 1590, 1592, 5, 68, 35, 2, 1591, 1590, 3, 2, 2, 2, 1591, 1592, 3, 2, 2, 2, 1592, 1593, 3, 2, 2, 2, 1593, 1594, 5, 300, 151, 2, 1594, 1595, 7, 83, 2, 2, 1595, 269, 3, 2, 2, 2, 1596, 1597, 5, 42, 22, 2, 1597, 271, 3, 2, 2, 2, 1598, 1604, 5, 140, 71, 2, 1599, 1605, 5, 84, 43, 2, 1600, 1602, 5, 110, 56, 2, 1601, 1603, 5, 276, 139, 2, 1602, 1601, 3, 2, 2, 2, 1602, 1603, 3, 2, 2, 2, 1603, 1605, 3, 2, 2, 2, 1604, 1599, 3, 2, 2, 2, 1604, 1600, 3, 2, 2, 2, 1605, 273, 3, 2, 2, 2, 1606, 1607, 7, 91, 2, 2, 1607, 1608, 5, 300, 151, 2, 1608, 1609, 5, 38, 20, 2, 1609, 1610, 5, 300, 151, 2, 1610, 1611, 7, 90, 2, 2, 1611, 275, 3, 2, 2, 2, 1612, 1613, 7, 91, 2, 2, 1613, 1616, 7, 90, 2, 2, 1614, 1616, 5, 86, 44, 2, 1615, 1612, 3, 2, 2, 2, 1615, 1614, 3, 2, 2, 2, 1616, 277, 3, 2, 2, 2, 1617, 1619, 7, 80, 2, 2, 1618, 1620, 5, 282, 142, 2, 1619, 1618, 3, 2, 2, 2, 1619, 1620, 3, 2, 2, 2, 1620, 1622, 3, 2, 2, 2, 1621, 1623, 7, 87, 2, 2, 1622, 1621, 3, 2, 2, 2, 1622, 1623, 3, 2, 2, 2, 1623, 1624, 3, 2, 2, 2, 1624, 1625, 5, 298, 150, 2, 1625, 279, 3, 2, 2, 2, 1626, 1633, 5, 284, 143, 2, 1627, 1628, 7, 87, 2, 2, 1628, 1629, 5, 300, 151, 2, 1629, 1630, 5, 284, 143, 2, 1630, 1632, 3, 2, 2, 2, 1631, 1627, 3, 2, 2, 2, 1632, 1635, 3, 2, 2, 2, 1633, 1631, 3, 2, 2, 2, 1633, 1634, 3, 2, 2, 2, 1634, 281, 3, 2, 2, 2, 1635, 1633, 3, 2, 2, 2, 1636, 1643, 5, 286, 144, 2, 1637, 1638, 7, 87, 2, 2, 1638, 1639, 5, 300, 151, 2, 1639, 1640, 5, 286, 144, 2, 1640, 1642, 3, 2, 2, 2, 1641, 1637, 3, 2, 2, 2, 1642, 1645, 3, 2, 2, 2, 1643, 1641, 3, 2, 2, 2, 1643, 1644, 3, 2, 2, 2, 1644, 283, 3, 2, 2, 2, 1645, 1643, 3, 2, 2, 2, 1646, 1649, 5, 226, 114, 2, 1647, 1649, 5, 262, 132, 2, 1648, 1646, 3, 2, 2, 2, 1648, 1647, 3, 2, 2, 2, 1649, 285, 3, 2, 2, 2, 1650, 1654, 5, 226, 114, 2, 1651, 1654, 5, 124, 63, 2, 1652, 1654, 5, 262, 132, 2, 1653, 1650, 3, 2, 2, 2, 1653, 1651, 3, 2, 2, 2, 1653, 1652, 3, 2, 2, 2, 1654, 287, 3, 2, 2, 2, 1655, 1656, 7, 3, 2, 2, 1656, 289, 3, 2, 2, 2, 1657, 1658, 7, 124, 2, 2, 1658, 291, 3, 2, 2, 2, 1659, 1660, 9, 20, 2, 2, 1660, 293, 3, 2, 2, 2, 1661, 1662, 9, 21, 2, 2, 1662, 295, 3, 2, 2, 2, 1663, 1664, 9, 22, 2, 2, 1664, 297, 3, 2, 2, 2, 1665, 1668, 7, 81, 2, 2, 1666, 1668, 3, 2, 2, 2, 1667, 1665, 3, 2, 2, 2, 1667, 1666, 3, 2, 2, 2, 1668, 299, 3, 2, 2, 2, 1669, 1671, 7, 129, 2, 2, 1670, 1669, 3, 2, 2, 2, 1671, 1674, 3, 2, 2, 2, 1672, 1670, 3, 2, 2, 2, 1672, 1673, 3, 2, 2, 2, 1673, 301, 3, 2, 2, 2, 1674, 1672, 3, 2, 2, 2, 1675, 1677, 9, 23, 2, 2, 1676, 1675, 3, 2, 2, 2, 1677, 1678, 3, 2, 2, 2, 1678, 1676, 3, 2, 2, 2, 1678, 1679, 3, 2, 2, 2, 1679, 303, 3, 2, 2, 2, 189, 306, 309, 312, 322, 326, 331, 340, 347, 354, 357, 364, 367, 374, 378, 382, 385, 392, 403, 414, 423, 433, 447, 453, 462, 466, 469, 477, 480, 483, 491, 494, 497, 500, 507, 511, 523, 529, 534, 537, 542, 546, 553, 564, 568, 571, 580, 584, 586, 590, 595, 606, 615, 630, 635, 643, 646, 651, 658, 661, 667, 670, 674, 678, 691, 704, 706, 718, 723, 729, 737, 745, 748, 756, 765, 773, 780, 792, 800, 808, 816, 820, 826, 845, 849, 854, 860, 867, 870, 878, 882, 889, 896, 899, 903, 912, 923, 928, 936, 939, 942, 951, 954, 961, 969, 973, 982, 985, 990, 998, 1004, 1014, 1020, 1028, 1034, 1044, 1069, 1073, 1077, 1081, 1090, 1096, 1105, 1118, 1134, 1140, 1152, 1163, 1173, 1178, 1185, 1195, 1199, 1203, 1210, 1214, 1218, 1222, 1241, 1246, 1252, 1258, 1277, 1304, 1307, 1371, 1387, 1389, 1402, 1407, 1412, 1419, 1422, 1430, 1438, 1444, 1469, 1475, 1479, 1482, 1486, 1491, 1496, 1502, 1517, 1521, 1524, 1531, 1534, 1543, 1556, 1560, 1567, 1577, 1586, 1591, 1602, 1604, 1615, 1619, 1622, 1633, 1643, 1648, 1653, 1667, 1672, 1678] \ No newline at end of file diff --git a/languages/groovy/GroovyParser.tokens b/languages/groovy/GroovyParser.tokens new file mode 100644 index 0000000000000000000000000000000000000000..e86dacaff915bb9c2301caa6f620cdaa6bcaa326 --- /dev/null +++ b/languages/groovy/GroovyParser.tokens @@ -0,0 +1,240 @@ +StringLiteral=1 +GStringBegin=2 +GStringEnd=3 +GStringPart=4 +GStringPathPart=5 +RollBackOne=6 +AS=7 +DEF=8 +IN=9 +TRAIT=10 +THREADSAFE=11 +VAR=12 +BuiltInPrimitiveType=13 +ABSTRACT=14 +ASSERT=15 +BREAK=16 +CASE=17 +CATCH=18 +CLASS=19 +CONST=20 +CONTINUE=21 +DEFAULT=22 +DO=23 +ELSE=24 +ENUM=25 +EXTENDS=26 +FINAL=27 +FINALLY=28 +FOR=29 +IF=30 +GOTO=31 +IMPLEMENTS=32 +IMPORT=33 +INSTANCEOF=34 +INTERFACE=35 +NATIVE=36 +NEW=37 +PACKAGE=38 +PRIVATE=39 +PROTECTED=40 +PUBLIC=41 +RETURN=42 +STATIC=43 +STRICTFP=44 +SUPER=45 +SWITCH=46 +SYNCHRONIZED=47 +THIS=48 +THROW=49 +THROWS=50 +TRANSIENT=51 +TRY=52 +VOID=53 +VOLATILE=54 +WHILE=55 +IntegerLiteral=56 +FloatingPointLiteral=57 +BooleanLiteral=58 +NullLiteral=59 +RANGE_INCLUSIVE=60 +RANGE_EXCLUSIVE=61 +SPREAD_DOT=62 +SAFE_DOT=63 +SAFE_CHAIN_DOT=64 +ELVIS=65 +METHOD_POINTER=66 +METHOD_REFERENCE=67 +REGEX_FIND=68 +REGEX_MATCH=69 +POWER=70 +POWER_ASSIGN=71 +SPACESHIP=72 +IDENTICAL=73 +NOT_IDENTICAL=74 +ARROW=75 +NOT_INSTANCEOF=76 +NOT_IN=77 +LPAREN=78 +RPAREN=79 +LBRACE=80 +RBRACE=81 +LBRACK=82 +RBRACK=83 +SEMI=84 +COMMA=85 +DOT=86 +ASSIGN=87 +GT=88 +LT=89 +NOT=90 +BITNOT=91 +QUESTION=92 +COLON=93 +EQUAL=94 +LE=95 +GE=96 +NOTEQUAL=97 +AND=98 +OR=99 +INC=100 +DEC=101 +ADD=102 +SUB=103 +MUL=104 +DIV=105 +BITAND=106 +BITOR=107 +XOR=108 +MOD=109 +ADD_ASSIGN=110 +SUB_ASSIGN=111 +MUL_ASSIGN=112 +DIV_ASSIGN=113 +AND_ASSIGN=114 +OR_ASSIGN=115 +XOR_ASSIGN=116 +MOD_ASSIGN=117 +LSHIFT_ASSIGN=118 +RSHIFT_ASSIGN=119 +URSHIFT_ASSIGN=120 +ELVIS_ASSIGN=121 +CapitalizedIdentifier=122 +Identifier=123 +AT=124 +ELLIPSIS=125 +WS=126 +NL=127 +SH_COMMENT=128 +UNEXPECTED_CHAR=129 +'as'=7 +'def'=8 +'in'=9 +'trait'=10 +'threadsafe'=11 +'var'=12 +'abstract'=14 +'assert'=15 +'break'=16 +'case'=17 +'catch'=18 +'class'=19 +'const'=20 +'continue'=21 +'default'=22 +'do'=23 +'else'=24 +'enum'=25 +'extends'=26 +'final'=27 +'finally'=28 +'for'=29 +'if'=30 +'goto'=31 +'implements'=32 +'import'=33 +'instanceof'=34 +'interface'=35 +'native'=36 +'new'=37 +'package'=38 +'private'=39 +'protected'=40 +'public'=41 +'return'=42 +'static'=43 +'strictfp'=44 +'super'=45 +'switch'=46 +'synchronized'=47 +'this'=48 +'throw'=49 +'throws'=50 +'transient'=51 +'try'=52 +'void'=53 +'volatile'=54 +'while'=55 +'null'=59 +'..'=60 +'..<'=61 +'*.'=62 +'?.'=63 +'??.'=64 +'?:'=65 +'.&'=66 +'::'=67 +'=~'=68 +'==~'=69 +'**'=70 +'**='=71 +'<=>'=72 +'==='=73 +'!=='=74 +'->'=75 +'!instanceof'=76 +'!in'=77 +'('=78 +')'=79 +'{'=80 +'}'=81 +'['=82 +']'=83 +';'=84 +','=85 +'='=87 +'>'=88 +'<'=89 +'!'=90 +'~'=91 +'?'=92 +':'=93 +'=='=94 +'<='=95 +'>='=96 +'!='=97 +'&&'=98 +'||'=99 +'++'=100 +'--'=101 +'+'=102 +'-'=103 +'*'=104 +'&'=106 +'|'=107 +'^'=108 +'%'=109 +'+='=110 +'-='=111 +'*='=112 +'/='=113 +'&='=114 +'|='=115 +'^='=116 +'%='=117 +'<<='=118 +'>>='=119 +'>>>='=120 +'?='=121 +'@'=124 +'...'=125 diff --git a/languages/groovy/groovy_lexer.go b/languages/groovy/groovy_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..45b3d842872c36d90d8286ac2d36f285b2eafb27 --- /dev/null +++ b/languages/groovy/groovy_lexer.go @@ -0,0 +1,1051 @@ +// Code generated from GroovyLexer.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser + +import ( + "fmt" + "unicode" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import error +var _ = fmt.Printf +var _ = unicode.IsLetter + +var serializedLexerAtn = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 131, 1640, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, + 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, + 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, + 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, + 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, + 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, + 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, + 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, + 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, + 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, + 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, + 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, + 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, + 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, + 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, + 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, + 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, + 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, + 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, + 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, + 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, + 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, + 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, + 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, + 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, + 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, + 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, + 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, + 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, + 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, + 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 4, 153, 9, + 153, 4, 154, 9, 154, 4, 155, 9, 155, 4, 156, 9, 156, 4, 157, 9, 157, 4, + 158, 9, 158, 4, 159, 9, 159, 4, 160, 9, 160, 4, 161, 9, 161, 4, 162, 9, + 162, 4, 163, 9, 163, 4, 164, 9, 164, 4, 165, 9, 165, 4, 166, 9, 166, 4, + 167, 9, 167, 4, 168, 9, 168, 4, 169, 9, 169, 4, 170, 9, 170, 4, 171, 9, + 171, 4, 172, 9, 172, 4, 173, 9, 173, 4, 174, 9, 174, 4, 175, 9, 175, 4, + 176, 9, 176, 4, 177, 9, 177, 4, 178, 9, 178, 4, 179, 9, 179, 4, 180, 9, + 180, 4, 181, 9, 181, 4, 182, 9, 182, 4, 183, 9, 183, 4, 184, 9, 184, 4, + 185, 9, 185, 4, 186, 9, 186, 4, 187, 9, 187, 4, 188, 9, 188, 4, 189, 9, + 189, 4, 190, 9, 190, 4, 191, 9, 191, 4, 192, 9, 192, 4, 193, 9, 193, 4, + 194, 9, 194, 4, 195, 9, 195, 4, 196, 9, 196, 4, 197, 9, 197, 4, 198, 9, + 198, 4, 199, 9, 199, 4, 200, 9, 200, 4, 201, 9, 201, 4, 202, 9, 202, 4, + 203, 9, 203, 4, 204, 9, 204, 4, 205, 9, 205, 4, 206, 9, 206, 4, 207, 9, + 207, 4, 208, 9, 208, 4, 209, 9, 209, 4, 210, 9, 210, 4, 211, 9, 211, 4, + 212, 9, 212, 4, 213, 9, 213, 4, 214, 9, 214, 4, 215, 9, 215, 4, 216, 9, + 216, 4, 217, 9, 217, 4, 218, 9, 218, 4, 219, 9, 219, 4, 220, 9, 220, 3, + 2, 3, 2, 7, 2, 450, 10, 2, 12, 2, 14, 2, 453, 11, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 7, 2, 459, 10, 2, 12, 2, 14, 2, 462, 11, 2, 3, 2, 3, 2, 3, 2, 3, + 2, 6, 2, 468, 10, 2, 13, 2, 14, 2, 469, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 476, + 10, 2, 12, 2, 14, 2, 479, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 485, 10, + 2, 12, 2, 14, 2, 488, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 6, 2, 494, 10, 2, + 13, 2, 14, 2, 495, 3, 2, 3, 2, 5, 2, 500, 10, 2, 3, 3, 3, 3, 7, 3, 504, + 10, 3, 12, 3, 14, 3, 507, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, + 4, 7, 4, 516, 10, 4, 12, 4, 14, 4, 519, 11, 4, 3, 4, 3, 4, 3, 4, 3, 4, + 3, 4, 3, 4, 3, 5, 3, 5, 7, 5, 529, 10, 5, 12, 5, 14, 5, 532, 11, 5, 3, + 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 7, 6, 542, 10, 6, 12, 6, 14, + 6, 545, 11, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, + 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, + 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, + 12, 3, 13, 5, 13, 580, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, + 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, + 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, + 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, + 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, + 3, 23, 5, 23, 631, 10, 23, 3, 24, 3, 24, 5, 24, 635, 10, 24, 3, 25, 3, + 25, 3, 25, 5, 25, 640, 10, 25, 3, 26, 3, 26, 3, 26, 5, 26, 645, 10, 26, + 3, 27, 3, 27, 3, 27, 5, 27, 650, 10, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, + 28, 3, 28, 5, 28, 658, 10, 28, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, + 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, + 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, + 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, + 35, 3, 35, 5, 35, 699, 10, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, + 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, + 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, + 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, + 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, + 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, + 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, + 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, + 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, + 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, + 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, + 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, + 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, + 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, + 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, + 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, + 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, + 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 64, 3, + 64, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, + 3, 66, 3, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, + 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, + 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 3, + 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, + 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, + 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, + 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, + 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, + 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, + 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, + 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, + 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, + 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, + 84, 3, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, + 3, 86, 5, 86, 1044, 10, 86, 3, 86, 5, 86, 1047, 10, 86, 3, 86, 3, 86, 6, + 86, 1051, 10, 86, 13, 86, 14, 86, 1052, 3, 86, 5, 86, 1056, 10, 86, 5, + 86, 1058, 10, 86, 3, 87, 3, 87, 3, 88, 3, 88, 5, 88, 1064, 10, 88, 3, 89, + 3, 89, 5, 89, 1068, 10, 89, 3, 90, 3, 90, 5, 90, 1072, 10, 90, 3, 91, 3, + 91, 5, 91, 1076, 10, 91, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 5, 93, 1083, + 10, 93, 3, 93, 3, 93, 3, 93, 5, 93, 1088, 10, 93, 5, 93, 1090, 10, 93, + 3, 94, 3, 94, 7, 94, 1094, 10, 94, 12, 94, 14, 94, 1097, 11, 94, 3, 94, + 5, 94, 1100, 10, 94, 3, 95, 3, 95, 5, 95, 1104, 10, 95, 3, 96, 3, 96, 3, + 97, 3, 97, 5, 97, 1110, 10, 97, 3, 98, 6, 98, 1113, 10, 98, 13, 98, 14, + 98, 1114, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, + 7, 101, 1125, 10, 101, 12, 101, 14, 101, 1128, 11, 101, 3, 101, 5, 101, + 1131, 10, 101, 3, 102, 3, 102, 3, 103, 3, 103, 5, 103, 1137, 10, 103, 3, + 104, 3, 104, 5, 104, 1141, 10, 104, 3, 104, 3, 104, 3, 105, 3, 105, 7, + 105, 1147, 10, 105, 12, 105, 14, 105, 1150, 11, 105, 3, 105, 5, 105, 1153, + 10, 105, 3, 106, 3, 106, 3, 107, 3, 107, 5, 107, 1159, 10, 107, 3, 108, + 3, 108, 3, 108, 3, 108, 3, 109, 3, 109, 7, 109, 1167, 10, 109, 12, 109, + 14, 109, 1170, 11, 109, 3, 109, 5, 109, 1173, 10, 109, 3, 110, 3, 110, + 3, 111, 3, 111, 5, 111, 1179, 10, 111, 3, 112, 3, 112, 5, 112, 1183, 10, + 112, 3, 112, 5, 112, 1186, 10, 112, 3, 113, 3, 113, 3, 113, 3, 113, 5, + 113, 1192, 10, 113, 3, 113, 5, 113, 1195, 10, 113, 3, 113, 3, 113, 3, 113, + 5, 113, 1200, 10, 113, 3, 113, 3, 113, 3, 113, 5, 113, 1205, 10, 113, 3, + 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 116, 5, 116, 1213, 10, 116, 3, + 116, 3, 116, 3, 117, 3, 117, 3, 118, 3, 118, 3, 119, 3, 119, 3, 119, 5, + 119, 1224, 10, 119, 3, 120, 3, 120, 5, 120, 1228, 10, 120, 3, 120, 3, 120, + 3, 120, 5, 120, 1233, 10, 120, 3, 120, 3, 120, 3, 120, 5, 120, 1238, 10, + 120, 3, 121, 3, 121, 3, 121, 3, 122, 3, 122, 3, 123, 3, 123, 3, 124, 3, + 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 5, 124, 1256, + 10, 124, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 5, 125, + 1265, 10, 125, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, + 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 5, 126, 1279, 10, 126, 3, 127, + 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 128, 3, 128, 3, 129, + 3, 129, 3, 129, 3, 130, 3, 130, 5, 130, 1295, 10, 130, 3, 130, 3, 130, + 3, 131, 3, 131, 3, 131, 3, 132, 3, 132, 3, 133, 3, 133, 3, 134, 3, 134, + 3, 135, 3, 135, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 3, 137, 3, 138, + 3, 138, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, + 3, 141, 3, 141, 3, 141, 3, 141, 3, 142, 3, 142, 3, 142, 3, 143, 3, 143, + 3, 143, 3, 143, 3, 143, 3, 144, 3, 144, 3, 144, 3, 145, 3, 145, 3, 145, + 3, 145, 3, 146, 3, 146, 3, 146, 3, 147, 3, 147, 3, 147, 3, 148, 3, 148, + 3, 148, 3, 148, 3, 149, 3, 149, 3, 149, 3, 150, 3, 150, 3, 150, 3, 151, + 3, 151, 3, 151, 3, 152, 3, 152, 3, 152, 3, 153, 3, 153, 3, 153, 3, 153, + 3, 154, 3, 154, 3, 154, 3, 155, 3, 155, 3, 155, 3, 155, 3, 156, 3, 156, + 3, 156, 3, 156, 3, 157, 3, 157, 3, 157, 3, 157, 3, 158, 3, 158, 3, 158, + 3, 158, 3, 159, 3, 159, 3, 159, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, + 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 161, 3, 161, + 3, 161, 3, 161, 3, 162, 3, 162, 3, 162, 3, 162, 3, 163, 3, 163, 3, 163, + 3, 163, 3, 164, 3, 164, 3, 164, 3, 164, 3, 165, 3, 165, 3, 165, 3, 165, + 3, 166, 3, 166, 3, 166, 3, 166, 3, 167, 3, 167, 3, 167, 3, 167, 3, 168, + 3, 168, 3, 169, 3, 169, 3, 170, 3, 170, 3, 171, 3, 171, 3, 172, 3, 172, + 3, 173, 3, 173, 3, 174, 3, 174, 3, 175, 3, 175, 3, 176, 3, 176, 3, 177, + 3, 177, 3, 178, 3, 178, 3, 178, 3, 179, 3, 179, 3, 179, 3, 180, 3, 180, + 3, 180, 3, 181, 3, 181, 3, 181, 3, 182, 3, 182, 3, 182, 3, 183, 3, 183, + 3, 183, 3, 184, 3, 184, 3, 184, 3, 185, 3, 185, 3, 185, 3, 186, 3, 186, + 3, 187, 3, 187, 3, 188, 3, 188, 3, 189, 3, 189, 3, 190, 3, 190, 3, 191, + 3, 191, 3, 192, 3, 192, 3, 193, 3, 193, 3, 194, 3, 194, 3, 194, 3, 195, + 3, 195, 3, 195, 3, 196, 3, 196, 3, 196, 3, 197, 3, 197, 3, 197, 3, 198, + 3, 198, 3, 198, 3, 199, 3, 199, 3, 199, 3, 200, 3, 200, 3, 200, 3, 201, + 3, 201, 3, 201, 3, 202, 3, 202, 3, 202, 3, 202, 3, 203, 3, 203, 3, 203, + 3, 203, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 205, 3, 205, 3, 205, + 3, 206, 3, 206, 7, 206, 1535, 10, 206, 12, 206, 14, 206, 1538, 11, 206, + 3, 207, 3, 207, 7, 207, 1542, 10, 207, 12, 207, 14, 207, 1545, 11, 207, + 3, 208, 3, 208, 7, 208, 1549, 10, 208, 12, 208, 14, 208, 1552, 11, 208, + 3, 209, 3, 209, 3, 209, 3, 209, 5, 209, 1558, 10, 209, 3, 210, 3, 210, + 3, 210, 3, 210, 5, 210, 1564, 10, 210, 3, 211, 3, 211, 3, 211, 3, 211, + 5, 211, 1570, 10, 211, 3, 212, 3, 212, 3, 212, 3, 212, 5, 212, 1576, 10, + 212, 3, 213, 3, 213, 3, 214, 3, 214, 3, 214, 3, 214, 3, 215, 6, 215, 1585, + 10, 215, 13, 215, 14, 215, 1586, 3, 215, 6, 215, 1590, 10, 215, 13, 215, + 14, 215, 1591, 5, 215, 1594, 10, 215, 3, 215, 3, 215, 3, 216, 5, 216, 1599, + 10, 216, 3, 216, 3, 216, 3, 217, 3, 217, 3, 217, 3, 217, 7, 217, 1607, + 10, 217, 12, 217, 14, 217, 1610, 11, 217, 3, 217, 3, 217, 3, 217, 3, 217, + 3, 217, 3, 218, 3, 218, 3, 218, 3, 218, 7, 218, 1621, 10, 218, 12, 218, + 14, 218, 1624, 11, 218, 3, 218, 3, 218, 3, 219, 3, 219, 3, 219, 3, 219, + 7, 219, 1632, 10, 219, 12, 219, 14, 219, 1635, 11, 219, 3, 219, 3, 219, + 3, 220, 3, 220, 3, 1608, 2, 221, 9, 3, 11, 4, 13, 2, 15, 2, 17, 2, 19, + 5, 21, 6, 23, 2, 25, 2, 27, 2, 29, 2, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, + 41, 2, 43, 2, 45, 2, 47, 7, 49, 8, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, + 2, 63, 9, 65, 10, 67, 11, 69, 12, 71, 13, 73, 14, 75, 15, 77, 16, 79, 17, + 81, 2, 83, 18, 85, 2, 87, 19, 89, 20, 91, 2, 93, 21, 95, 22, 97, 23, 99, + 24, 101, 25, 103, 2, 105, 26, 107, 27, 109, 28, 111, 29, 113, 30, 115, + 2, 117, 31, 119, 32, 121, 33, 123, 34, 125, 35, 127, 36, 129, 2, 131, 37, + 133, 2, 135, 38, 137, 39, 139, 40, 141, 41, 143, 42, 145, 43, 147, 44, + 149, 2, 151, 45, 153, 46, 155, 47, 157, 48, 159, 49, 161, 50, 163, 51, + 165, 52, 167, 53, 169, 54, 171, 55, 173, 56, 175, 57, 177, 58, 179, 2, + 181, 2, 183, 2, 185, 2, 187, 2, 189, 2, 191, 2, 193, 2, 195, 2, 197, 2, + 199, 2, 201, 2, 203, 2, 205, 2, 207, 2, 209, 2, 211, 2, 213, 2, 215, 2, + 217, 2, 219, 2, 221, 2, 223, 2, 225, 2, 227, 2, 229, 59, 231, 2, 233, 2, + 235, 2, 237, 2, 239, 2, 241, 2, 243, 2, 245, 2, 247, 2, 249, 2, 251, 2, + 253, 60, 255, 2, 257, 2, 259, 2, 261, 2, 263, 2, 265, 2, 267, 2, 269, 2, + 271, 2, 273, 2, 275, 2, 277, 2, 279, 2, 281, 2, 283, 2, 285, 2, 287, 2, + 289, 2, 291, 61, 293, 62, 295, 63, 297, 64, 299, 65, 301, 66, 303, 67, + 305, 68, 307, 69, 309, 70, 311, 71, 313, 72, 315, 73, 317, 74, 319, 75, + 321, 76, 323, 77, 325, 78, 327, 79, 329, 80, 331, 81, 333, 82, 335, 83, + 337, 84, 339, 85, 341, 86, 343, 87, 345, 88, 347, 89, 349, 90, 351, 91, + 353, 92, 355, 93, 357, 94, 359, 95, 361, 96, 363, 97, 365, 98, 367, 99, + 369, 100, 371, 101, 373, 102, 375, 103, 377, 104, 379, 105, 381, 106, 383, + 107, 385, 108, 387, 109, 389, 110, 391, 111, 393, 112, 395, 113, 397, 114, + 399, 115, 401, 116, 403, 117, 405, 118, 407, 119, 409, 120, 411, 121, 413, + 122, 415, 123, 417, 124, 419, 125, 421, 2, 423, 2, 425, 2, 427, 2, 429, + 2, 431, 126, 433, 127, 435, 128, 437, 129, 439, 2, 441, 2, 443, 130, 445, + 131, 9, 2, 3, 4, 5, 6, 7, 8, 31, 7, 2, 12, 12, 15, 15, 36, 36, 38, 38, + 94, 94, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 5, 2, 36, 36, 38, 38, 94, + 94, 4, 2, 41, 41, 94, 94, 5, 2, 2, 2, 38, 38, 49, 49, 3, 2, 50, 59, 8, + 2, 73, 73, 75, 75, 78, 78, 105, 105, 107, 107, 110, 110, 3, 2, 51, 59, + 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 57, 4, + 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, + 47, 47, 6, 2, 70, 70, 72, 73, 102, 102, 104, 105, 4, 2, 82, 82, 114, 114, + 10, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, + 118, 118, 3, 2, 50, 53, 3, 2, 67, 92, 5, 2, 67, 92, 97, 97, 99, 124, 4, + 2, 2, 129, 55298, 56321, 3, 2, 55298, 56321, 3, 2, 56322, 57345, 6, 2, + 50, 59, 67, 92, 97, 97, 99, 124, 6, 2, 38, 38, 67, 92, 97, 97, 99, 124, + 7, 2, 38, 38, 50, 59, 67, 92, 97, 97, 99, 124, 5, 2, 11, 11, 14, 14, 34, + 34, 5, 2, 12, 12, 15, 15, 1, 1, 2, 1663, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, + 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 63, 3, + 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, + 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, + 79, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, + 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, + 2, 2, 101, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, + 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, + 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, + 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, + 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, + 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, + 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, + 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, + 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, + 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 253, 3, 2, + 2, 2, 2, 291, 3, 2, 2, 2, 2, 293, 3, 2, 2, 2, 2, 295, 3, 2, 2, 2, 2, 297, + 3, 2, 2, 2, 2, 299, 3, 2, 2, 2, 2, 301, 3, 2, 2, 2, 2, 303, 3, 2, 2, 2, + 2, 305, 3, 2, 2, 2, 2, 307, 3, 2, 2, 2, 2, 309, 3, 2, 2, 2, 2, 311, 3, + 2, 2, 2, 2, 313, 3, 2, 2, 2, 2, 315, 3, 2, 2, 2, 2, 317, 3, 2, 2, 2, 2, + 319, 3, 2, 2, 2, 2, 321, 3, 2, 2, 2, 2, 323, 3, 2, 2, 2, 2, 325, 3, 2, + 2, 2, 2, 327, 3, 2, 2, 2, 2, 329, 3, 2, 2, 2, 2, 331, 3, 2, 2, 2, 2, 333, + 3, 2, 2, 2, 2, 335, 3, 2, 2, 2, 2, 337, 3, 2, 2, 2, 2, 339, 3, 2, 2, 2, + 2, 341, 3, 2, 2, 2, 2, 343, 3, 2, 2, 2, 2, 345, 3, 2, 2, 2, 2, 347, 3, + 2, 2, 2, 2, 349, 3, 2, 2, 2, 2, 351, 3, 2, 2, 2, 2, 353, 3, 2, 2, 2, 2, + 355, 3, 2, 2, 2, 2, 357, 3, 2, 2, 2, 2, 359, 3, 2, 2, 2, 2, 361, 3, 2, + 2, 2, 2, 363, 3, 2, 2, 2, 2, 365, 3, 2, 2, 2, 2, 367, 3, 2, 2, 2, 2, 369, + 3, 2, 2, 2, 2, 371, 3, 2, 2, 2, 2, 373, 3, 2, 2, 2, 2, 375, 3, 2, 2, 2, + 2, 377, 3, 2, 2, 2, 2, 379, 3, 2, 2, 2, 2, 381, 3, 2, 2, 2, 2, 383, 3, + 2, 2, 2, 2, 385, 3, 2, 2, 2, 2, 387, 3, 2, 2, 2, 2, 389, 3, 2, 2, 2, 2, + 391, 3, 2, 2, 2, 2, 393, 3, 2, 2, 2, 2, 395, 3, 2, 2, 2, 2, 397, 3, 2, + 2, 2, 2, 399, 3, 2, 2, 2, 2, 401, 3, 2, 2, 2, 2, 403, 3, 2, 2, 2, 2, 405, + 3, 2, 2, 2, 2, 407, 3, 2, 2, 2, 2, 409, 3, 2, 2, 2, 2, 411, 3, 2, 2, 2, + 2, 413, 3, 2, 2, 2, 2, 415, 3, 2, 2, 2, 2, 417, 3, 2, 2, 2, 2, 419, 3, + 2, 2, 2, 2, 431, 3, 2, 2, 2, 2, 433, 3, 2, 2, 2, 2, 435, 3, 2, 2, 2, 2, + 437, 3, 2, 2, 2, 2, 439, 3, 2, 2, 2, 2, 441, 3, 2, 2, 2, 2, 443, 3, 2, + 2, 2, 2, 445, 3, 2, 2, 2, 3, 19, 3, 2, 2, 2, 3, 21, 3, 2, 2, 2, 3, 23, + 3, 2, 2, 2, 4, 25, 3, 2, 2, 2, 4, 27, 3, 2, 2, 2, 4, 29, 3, 2, 2, 2, 5, + 31, 3, 2, 2, 2, 5, 33, 3, 2, 2, 2, 5, 35, 3, 2, 2, 2, 6, 37, 3, 2, 2, 2, + 6, 39, 3, 2, 2, 2, 6, 41, 3, 2, 2, 2, 7, 43, 3, 2, 2, 2, 7, 45, 3, 2, 2, + 2, 8, 47, 3, 2, 2, 2, 8, 49, 3, 2, 2, 2, 9, 499, 3, 2, 2, 2, 11, 501, 3, + 2, 2, 2, 13, 513, 3, 2, 2, 2, 15, 526, 3, 2, 2, 2, 17, 539, 3, 2, 2, 2, + 19, 552, 3, 2, 2, 2, 21, 556, 3, 2, 2, 2, 23, 560, 3, 2, 2, 2, 25, 564, + 3, 2, 2, 2, 27, 569, 3, 2, 2, 2, 29, 574, 3, 2, 2, 2, 31, 579, 3, 2, 2, + 2, 33, 586, 3, 2, 2, 2, 35, 591, 3, 2, 2, 2, 37, 595, 3, 2, 2, 2, 39, 600, + 3, 2, 2, 2, 41, 605, 3, 2, 2, 2, 43, 609, 3, 2, 2, 2, 45, 615, 3, 2, 2, + 2, 47, 621, 3, 2, 2, 2, 49, 624, 3, 2, 2, 2, 51, 630, 3, 2, 2, 2, 53, 634, + 3, 2, 2, 2, 55, 639, 3, 2, 2, 2, 57, 644, 3, 2, 2, 2, 59, 649, 3, 2, 2, + 2, 61, 657, 3, 2, 2, 2, 63, 659, 3, 2, 2, 2, 65, 662, 3, 2, 2, 2, 67, 666, + 3, 2, 2, 2, 69, 669, 3, 2, 2, 2, 71, 675, 3, 2, 2, 2, 73, 686, 3, 2, 2, + 2, 75, 698, 3, 2, 2, 2, 77, 700, 3, 2, 2, 2, 79, 709, 3, 2, 2, 2, 81, 716, + 3, 2, 2, 2, 83, 724, 3, 2, 2, 2, 85, 730, 3, 2, 2, 2, 87, 735, 3, 2, 2, + 2, 89, 740, 3, 2, 2, 2, 91, 746, 3, 2, 2, 2, 93, 751, 3, 2, 2, 2, 95, 757, + 3, 2, 2, 2, 97, 763, 3, 2, 2, 2, 99, 772, 3, 2, 2, 2, 101, 780, 3, 2, 2, + 2, 103, 783, 3, 2, 2, 2, 105, 790, 3, 2, 2, 2, 107, 795, 3, 2, 2, 2, 109, + 800, 3, 2, 2, 2, 111, 808, 3, 2, 2, 2, 113, 814, 3, 2, 2, 2, 115, 822, + 3, 2, 2, 2, 117, 828, 3, 2, 2, 2, 119, 832, 3, 2, 2, 2, 121, 835, 3, 2, + 2, 2, 123, 840, 3, 2, 2, 2, 125, 851, 3, 2, 2, 2, 127, 858, 3, 2, 2, 2, + 129, 869, 3, 2, 2, 2, 131, 873, 3, 2, 2, 2, 133, 883, 3, 2, 2, 2, 135, + 888, 3, 2, 2, 2, 137, 895, 3, 2, 2, 2, 139, 899, 3, 2, 2, 2, 141, 907, + 3, 2, 2, 2, 143, 915, 3, 2, 2, 2, 145, 925, 3, 2, 2, 2, 147, 932, 3, 2, + 2, 2, 149, 939, 3, 2, 2, 2, 151, 945, 3, 2, 2, 2, 153, 952, 3, 2, 2, 2, + 155, 961, 3, 2, 2, 2, 157, 967, 3, 2, 2, 2, 159, 974, 3, 2, 2, 2, 161, + 987, 3, 2, 2, 2, 163, 992, 3, 2, 2, 2, 165, 998, 3, 2, 2, 2, 167, 1005, + 3, 2, 2, 2, 169, 1015, 3, 2, 2, 2, 171, 1019, 3, 2, 2, 2, 173, 1024, 3, + 2, 2, 2, 175, 1033, 3, 2, 2, 2, 177, 1057, 3, 2, 2, 2, 179, 1059, 3, 2, + 2, 2, 181, 1061, 3, 2, 2, 2, 183, 1065, 3, 2, 2, 2, 185, 1069, 3, 2, 2, + 2, 187, 1073, 3, 2, 2, 2, 189, 1077, 3, 2, 2, 2, 191, 1089, 3, 2, 2, 2, + 193, 1091, 3, 2, 2, 2, 195, 1103, 3, 2, 2, 2, 197, 1105, 3, 2, 2, 2, 199, + 1109, 3, 2, 2, 2, 201, 1112, 3, 2, 2, 2, 203, 1116, 3, 2, 2, 2, 205, 1118, + 3, 2, 2, 2, 207, 1122, 3, 2, 2, 2, 209, 1132, 3, 2, 2, 2, 211, 1136, 3, + 2, 2, 2, 213, 1138, 3, 2, 2, 2, 215, 1144, 3, 2, 2, 2, 217, 1154, 3, 2, + 2, 2, 219, 1158, 3, 2, 2, 2, 221, 1160, 3, 2, 2, 2, 223, 1164, 3, 2, 2, + 2, 225, 1174, 3, 2, 2, 2, 227, 1178, 3, 2, 2, 2, 229, 1182, 3, 2, 2, 2, + 231, 1204, 3, 2, 2, 2, 233, 1206, 3, 2, 2, 2, 235, 1209, 3, 2, 2, 2, 237, + 1212, 3, 2, 2, 2, 239, 1216, 3, 2, 2, 2, 241, 1218, 3, 2, 2, 2, 243, 1220, + 3, 2, 2, 2, 245, 1237, 3, 2, 2, 2, 247, 1239, 3, 2, 2, 2, 249, 1242, 3, + 2, 2, 2, 251, 1244, 3, 2, 2, 2, 253, 1255, 3, 2, 2, 2, 255, 1264, 3, 2, + 2, 2, 257, 1278, 3, 2, 2, 2, 259, 1280, 3, 2, 2, 2, 261, 1287, 3, 2, 2, + 2, 263, 1289, 3, 2, 2, 2, 265, 1292, 3, 2, 2, 2, 267, 1298, 3, 2, 2, 2, + 269, 1301, 3, 2, 2, 2, 271, 1303, 3, 2, 2, 2, 273, 1305, 3, 2, 2, 2, 275, + 1307, 3, 2, 2, 2, 277, 1309, 3, 2, 2, 2, 279, 1311, 3, 2, 2, 2, 281, 1315, + 3, 2, 2, 2, 283, 1319, 3, 2, 2, 2, 285, 1322, 3, 2, 2, 2, 287, 1325, 3, + 2, 2, 2, 289, 1329, 3, 2, 2, 2, 291, 1332, 3, 2, 2, 2, 293, 1337, 3, 2, + 2, 2, 295, 1340, 3, 2, 2, 2, 297, 1344, 3, 2, 2, 2, 299, 1347, 3, 2, 2, + 2, 301, 1350, 3, 2, 2, 2, 303, 1354, 3, 2, 2, 2, 305, 1357, 3, 2, 2, 2, + 307, 1360, 3, 2, 2, 2, 309, 1363, 3, 2, 2, 2, 311, 1366, 3, 2, 2, 2, 313, + 1370, 3, 2, 2, 2, 315, 1373, 3, 2, 2, 2, 317, 1377, 3, 2, 2, 2, 319, 1381, + 3, 2, 2, 2, 321, 1385, 3, 2, 2, 2, 323, 1389, 3, 2, 2, 2, 325, 1392, 3, + 2, 2, 2, 327, 1404, 3, 2, 2, 2, 329, 1408, 3, 2, 2, 2, 331, 1412, 3, 2, + 2, 2, 333, 1416, 3, 2, 2, 2, 335, 1420, 3, 2, 2, 2, 337, 1424, 3, 2, 2, + 2, 339, 1428, 3, 2, 2, 2, 341, 1432, 3, 2, 2, 2, 343, 1434, 3, 2, 2, 2, + 345, 1436, 3, 2, 2, 2, 347, 1438, 3, 2, 2, 2, 349, 1440, 3, 2, 2, 2, 351, + 1442, 3, 2, 2, 2, 353, 1444, 3, 2, 2, 2, 355, 1446, 3, 2, 2, 2, 357, 1448, + 3, 2, 2, 2, 359, 1450, 3, 2, 2, 2, 361, 1452, 3, 2, 2, 2, 363, 1455, 3, + 2, 2, 2, 365, 1458, 3, 2, 2, 2, 367, 1461, 3, 2, 2, 2, 369, 1464, 3, 2, + 2, 2, 371, 1467, 3, 2, 2, 2, 373, 1470, 3, 2, 2, 2, 375, 1473, 3, 2, 2, + 2, 377, 1476, 3, 2, 2, 2, 379, 1478, 3, 2, 2, 2, 381, 1480, 3, 2, 2, 2, + 383, 1482, 3, 2, 2, 2, 385, 1484, 3, 2, 2, 2, 387, 1486, 3, 2, 2, 2, 389, + 1488, 3, 2, 2, 2, 391, 1490, 3, 2, 2, 2, 393, 1492, 3, 2, 2, 2, 395, 1495, + 3, 2, 2, 2, 397, 1498, 3, 2, 2, 2, 399, 1501, 3, 2, 2, 2, 401, 1504, 3, + 2, 2, 2, 403, 1507, 3, 2, 2, 2, 405, 1510, 3, 2, 2, 2, 407, 1513, 3, 2, + 2, 2, 409, 1516, 3, 2, 2, 2, 411, 1520, 3, 2, 2, 2, 413, 1524, 3, 2, 2, + 2, 415, 1529, 3, 2, 2, 2, 417, 1532, 3, 2, 2, 2, 419, 1539, 3, 2, 2, 2, + 421, 1546, 3, 2, 2, 2, 423, 1557, 3, 2, 2, 2, 425, 1563, 3, 2, 2, 2, 427, + 1569, 3, 2, 2, 2, 429, 1575, 3, 2, 2, 2, 431, 1577, 3, 2, 2, 2, 433, 1579, + 3, 2, 2, 2, 435, 1593, 3, 2, 2, 2, 437, 1598, 3, 2, 2, 2, 439, 1602, 3, + 2, 2, 2, 441, 1616, 3, 2, 2, 2, 443, 1627, 3, 2, 2, 2, 445, 1638, 3, 2, + 2, 2, 447, 451, 5, 275, 135, 2, 448, 450, 5, 51, 23, 2, 449, 448, 3, 2, + 2, 2, 450, 453, 3, 2, 2, 2, 451, 449, 3, 2, 2, 2, 451, 452, 3, 2, 2, 2, + 452, 454, 3, 2, 2, 2, 453, 451, 3, 2, 2, 2, 454, 455, 5, 275, 135, 2, 455, + 500, 3, 2, 2, 2, 456, 460, 5, 277, 136, 2, 457, 459, 5, 53, 24, 2, 458, + 457, 3, 2, 2, 2, 459, 462, 3, 2, 2, 2, 460, 458, 3, 2, 2, 2, 460, 461, + 3, 2, 2, 2, 461, 463, 3, 2, 2, 2, 462, 460, 3, 2, 2, 2, 463, 464, 5, 277, + 136, 2, 464, 500, 3, 2, 2, 2, 465, 467, 5, 271, 133, 2, 466, 468, 5, 59, + 27, 2, 467, 466, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 467, 3, 2, 2, 2, + 469, 470, 3, 2, 2, 2, 470, 471, 3, 2, 2, 2, 471, 472, 5, 271, 133, 2, 472, + 500, 3, 2, 2, 2, 473, 477, 5, 279, 137, 2, 474, 476, 5, 55, 25, 2, 475, + 474, 3, 2, 2, 2, 476, 479, 3, 2, 2, 2, 477, 475, 3, 2, 2, 2, 477, 478, + 3, 2, 2, 2, 478, 480, 3, 2, 2, 2, 479, 477, 3, 2, 2, 2, 480, 481, 5, 279, + 137, 2, 481, 500, 3, 2, 2, 2, 482, 486, 5, 281, 138, 2, 483, 485, 5, 57, + 26, 2, 484, 483, 3, 2, 2, 2, 485, 488, 3, 2, 2, 2, 486, 484, 3, 2, 2, 2, + 486, 487, 3, 2, 2, 2, 487, 489, 3, 2, 2, 2, 488, 486, 3, 2, 2, 2, 489, + 490, 5, 281, 138, 2, 490, 500, 3, 2, 2, 2, 491, 493, 5, 283, 139, 2, 492, + 494, 5, 61, 28, 2, 493, 492, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 493, + 3, 2, 2, 2, 495, 496, 3, 2, 2, 2, 496, 497, 3, 2, 2, 2, 497, 498, 5, 285, + 140, 2, 498, 500, 3, 2, 2, 2, 499, 447, 3, 2, 2, 2, 499, 456, 3, 2, 2, + 2, 499, 465, 3, 2, 2, 2, 499, 473, 3, 2, 2, 2, 499, 482, 3, 2, 2, 2, 499, + 491, 3, 2, 2, 2, 500, 10, 3, 2, 2, 2, 501, 505, 5, 275, 135, 2, 502, 504, + 5, 51, 23, 2, 503, 502, 3, 2, 2, 2, 504, 507, 3, 2, 2, 2, 505, 503, 3, + 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 508, 3, 2, 2, 2, 507, 505, 3, 2, 2, + 2, 508, 509, 5, 273, 134, 2, 509, 510, 3, 2, 2, 2, 510, 511, 8, 3, 2, 2, + 511, 512, 8, 3, 3, 2, 512, 12, 3, 2, 2, 2, 513, 517, 5, 279, 137, 2, 514, + 516, 5, 55, 25, 2, 515, 514, 3, 2, 2, 2, 516, 519, 3, 2, 2, 2, 517, 515, + 3, 2, 2, 2, 517, 518, 3, 2, 2, 2, 518, 520, 3, 2, 2, 2, 519, 517, 3, 2, + 2, 2, 520, 521, 5, 273, 134, 2, 521, 522, 3, 2, 2, 2, 522, 523, 8, 4, 4, + 2, 523, 524, 8, 4, 5, 2, 524, 525, 8, 4, 3, 2, 525, 14, 3, 2, 2, 2, 526, + 530, 5, 271, 133, 2, 527, 529, 5, 59, 27, 2, 528, 527, 3, 2, 2, 2, 529, + 532, 3, 2, 2, 2, 530, 528, 3, 2, 2, 2, 530, 531, 3, 2, 2, 2, 531, 533, + 3, 2, 2, 2, 532, 530, 3, 2, 2, 2, 533, 534, 5, 273, 134, 2, 534, 535, 3, + 2, 2, 2, 535, 536, 8, 5, 4, 2, 536, 537, 8, 5, 6, 2, 537, 538, 8, 5, 3, + 2, 538, 16, 3, 2, 2, 2, 539, 543, 5, 283, 139, 2, 540, 542, 5, 61, 28, + 2, 541, 540, 3, 2, 2, 2, 542, 545, 3, 2, 2, 2, 543, 541, 3, 2, 2, 2, 543, + 544, 3, 2, 2, 2, 544, 546, 3, 2, 2, 2, 545, 543, 3, 2, 2, 2, 546, 547, + 5, 273, 134, 2, 547, 548, 3, 2, 2, 2, 548, 549, 8, 6, 4, 2, 549, 550, 8, + 6, 7, 2, 550, 551, 8, 6, 3, 2, 551, 18, 3, 2, 2, 2, 552, 553, 5, 275, 135, + 2, 553, 554, 3, 2, 2, 2, 554, 555, 8, 7, 8, 2, 555, 20, 3, 2, 2, 2, 556, + 557, 5, 273, 134, 2, 557, 558, 3, 2, 2, 2, 558, 559, 8, 8, 3, 2, 559, 22, + 3, 2, 2, 2, 560, 561, 5, 51, 23, 2, 561, 562, 3, 2, 2, 2, 562, 563, 8, + 9, 9, 2, 563, 24, 3, 2, 2, 2, 564, 565, 5, 279, 137, 2, 565, 566, 3, 2, + 2, 2, 566, 567, 8, 10, 10, 2, 567, 568, 8, 10, 8, 2, 568, 26, 3, 2, 2, + 2, 569, 570, 5, 273, 134, 2, 570, 571, 3, 2, 2, 2, 571, 572, 8, 11, 11, + 2, 572, 573, 8, 11, 3, 2, 573, 28, 3, 2, 2, 2, 574, 575, 5, 55, 25, 2, + 575, 576, 3, 2, 2, 2, 576, 577, 8, 12, 9, 2, 577, 30, 3, 2, 2, 2, 578, + 580, 5, 273, 134, 2, 579, 578, 3, 2, 2, 2, 579, 580, 3, 2, 2, 2, 580, 581, + 3, 2, 2, 2, 581, 582, 5, 271, 133, 2, 582, 583, 3, 2, 2, 2, 583, 584, 8, + 13, 10, 2, 584, 585, 8, 13, 8, 2, 585, 32, 3, 2, 2, 2, 586, 587, 5, 273, + 134, 2, 587, 588, 3, 2, 2, 2, 588, 589, 8, 14, 11, 2, 589, 590, 8, 14, + 3, 2, 590, 34, 3, 2, 2, 2, 591, 592, 5, 59, 27, 2, 592, 593, 3, 2, 2, 2, + 593, 594, 8, 15, 9, 2, 594, 36, 3, 2, 2, 2, 595, 596, 5, 285, 140, 2, 596, + 597, 3, 2, 2, 2, 597, 598, 8, 16, 10, 2, 598, 599, 8, 16, 8, 2, 599, 38, + 3, 2, 2, 2, 600, 601, 5, 273, 134, 2, 601, 602, 3, 2, 2, 2, 602, 603, 8, + 17, 11, 2, 603, 604, 8, 17, 3, 2, 604, 40, 3, 2, 2, 2, 605, 606, 5, 61, + 28, 2, 606, 607, 3, 2, 2, 2, 607, 608, 8, 18, 9, 2, 608, 42, 3, 2, 2, 2, + 609, 610, 7, 125, 2, 2, 610, 611, 3, 2, 2, 2, 611, 612, 8, 19, 12, 2, 612, + 613, 8, 19, 8, 2, 613, 614, 8, 19, 13, 2, 614, 44, 3, 2, 2, 2, 615, 616, + 5, 421, 208, 2, 616, 617, 3, 2, 2, 2, 617, 618, 8, 20, 14, 2, 618, 619, + 8, 20, 8, 2, 619, 620, 8, 20, 15, 2, 620, 46, 3, 2, 2, 2, 621, 622, 5, + 251, 123, 2, 622, 623, 5, 421, 208, 2, 623, 48, 3, 2, 2, 2, 624, 625, 11, + 2, 2, 2, 625, 626, 3, 2, 2, 2, 626, 627, 8, 22, 8, 2, 627, 50, 3, 2, 2, + 2, 628, 631, 10, 2, 2, 2, 629, 631, 5, 255, 125, 2, 630, 628, 3, 2, 2, + 2, 630, 629, 3, 2, 2, 2, 631, 52, 3, 2, 2, 2, 632, 635, 10, 3, 2, 2, 633, + 635, 5, 255, 125, 2, 634, 632, 3, 2, 2, 2, 634, 633, 3, 2, 2, 2, 635, 54, + 3, 2, 2, 2, 636, 640, 10, 4, 2, 2, 637, 640, 5, 275, 135, 2, 638, 640, + 5, 255, 125, 2, 639, 636, 3, 2, 2, 2, 639, 637, 3, 2, 2, 2, 639, 638, 3, + 2, 2, 2, 640, 56, 3, 2, 2, 2, 641, 645, 10, 5, 2, 2, 642, 645, 5, 277, + 136, 2, 643, 645, 5, 255, 125, 2, 644, 641, 3, 2, 2, 2, 644, 642, 3, 2, + 2, 2, 644, 643, 3, 2, 2, 2, 645, 58, 3, 2, 2, 2, 646, 650, 5, 267, 131, + 2, 647, 650, 5, 273, 134, 2, 648, 650, 10, 6, 2, 2, 649, 646, 3, 2, 2, + 2, 649, 647, 3, 2, 2, 2, 649, 648, 3, 2, 2, 2, 650, 60, 3, 2, 2, 2, 651, + 658, 5, 267, 131, 2, 652, 658, 5, 287, 141, 2, 653, 658, 5, 289, 142, 2, + 654, 658, 5, 271, 133, 2, 655, 658, 5, 273, 134, 2, 656, 658, 10, 6, 2, + 2, 657, 651, 3, 2, 2, 2, 657, 652, 3, 2, 2, 2, 657, 653, 3, 2, 2, 2, 657, + 654, 3, 2, 2, 2, 657, 655, 3, 2, 2, 2, 657, 656, 3, 2, 2, 2, 658, 62, 3, + 2, 2, 2, 659, 660, 7, 99, 2, 2, 660, 661, 7, 117, 2, 2, 661, 64, 3, 2, + 2, 2, 662, 663, 7, 102, 2, 2, 663, 664, 7, 103, 2, 2, 664, 665, 7, 104, + 2, 2, 665, 66, 3, 2, 2, 2, 666, 667, 7, 107, 2, 2, 667, 668, 7, 112, 2, + 2, 668, 68, 3, 2, 2, 2, 669, 670, 7, 118, 2, 2, 670, 671, 7, 116, 2, 2, + 671, 672, 7, 99, 2, 2, 672, 673, 7, 107, 2, 2, 673, 674, 7, 118, 2, 2, + 674, 70, 3, 2, 2, 2, 675, 676, 7, 118, 2, 2, 676, 677, 7, 106, 2, 2, 677, + 678, 7, 116, 2, 2, 678, 679, 7, 103, 2, 2, 679, 680, 7, 99, 2, 2, 680, + 681, 7, 102, 2, 2, 681, 682, 7, 117, 2, 2, 682, 683, 7, 99, 2, 2, 683, + 684, 7, 104, 2, 2, 684, 685, 7, 103, 2, 2, 685, 72, 3, 2, 2, 2, 686, 687, + 7, 120, 2, 2, 687, 688, 7, 99, 2, 2, 688, 689, 7, 116, 2, 2, 689, 74, 3, + 2, 2, 2, 690, 699, 5, 81, 38, 2, 691, 699, 5, 91, 43, 2, 692, 699, 5, 85, + 40, 2, 693, 699, 5, 149, 72, 2, 694, 699, 5, 129, 62, 2, 695, 699, 5, 133, + 64, 2, 696, 699, 5, 115, 55, 2, 697, 699, 5, 103, 49, 2, 698, 690, 3, 2, + 2, 2, 698, 691, 3, 2, 2, 2, 698, 692, 3, 2, 2, 2, 698, 693, 3, 2, 2, 2, + 698, 694, 3, 2, 2, 2, 698, 695, 3, 2, 2, 2, 698, 696, 3, 2, 2, 2, 698, + 697, 3, 2, 2, 2, 699, 76, 3, 2, 2, 2, 700, 701, 7, 99, 2, 2, 701, 702, + 7, 100, 2, 2, 702, 703, 7, 117, 2, 2, 703, 704, 7, 118, 2, 2, 704, 705, + 7, 116, 2, 2, 705, 706, 7, 99, 2, 2, 706, 707, 7, 101, 2, 2, 707, 708, + 7, 118, 2, 2, 708, 78, 3, 2, 2, 2, 709, 710, 7, 99, 2, 2, 710, 711, 7, + 117, 2, 2, 711, 712, 7, 117, 2, 2, 712, 713, 7, 103, 2, 2, 713, 714, 7, + 116, 2, 2, 714, 715, 7, 118, 2, 2, 715, 80, 3, 2, 2, 2, 716, 717, 7, 100, + 2, 2, 717, 718, 7, 113, 2, 2, 718, 719, 7, 113, 2, 2, 719, 720, 7, 110, + 2, 2, 720, 721, 7, 103, 2, 2, 721, 722, 7, 99, 2, 2, 722, 723, 7, 112, + 2, 2, 723, 82, 3, 2, 2, 2, 724, 725, 7, 100, 2, 2, 725, 726, 7, 116, 2, + 2, 726, 727, 7, 103, 2, 2, 727, 728, 7, 99, 2, 2, 728, 729, 7, 109, 2, + 2, 729, 84, 3, 2, 2, 2, 730, 731, 7, 100, 2, 2, 731, 732, 7, 123, 2, 2, + 732, 733, 7, 118, 2, 2, 733, 734, 7, 103, 2, 2, 734, 86, 3, 2, 2, 2, 735, + 736, 7, 101, 2, 2, 736, 737, 7, 99, 2, 2, 737, 738, 7, 117, 2, 2, 738, + 739, 7, 103, 2, 2, 739, 88, 3, 2, 2, 2, 740, 741, 7, 101, 2, 2, 741, 742, + 7, 99, 2, 2, 742, 743, 7, 118, 2, 2, 743, 744, 7, 101, 2, 2, 744, 745, + 7, 106, 2, 2, 745, 90, 3, 2, 2, 2, 746, 747, 7, 101, 2, 2, 747, 748, 7, + 106, 2, 2, 748, 749, 7, 99, 2, 2, 749, 750, 7, 116, 2, 2, 750, 92, 3, 2, + 2, 2, 751, 752, 7, 101, 2, 2, 752, 753, 7, 110, 2, 2, 753, 754, 7, 99, + 2, 2, 754, 755, 7, 117, 2, 2, 755, 756, 7, 117, 2, 2, 756, 94, 3, 2, 2, + 2, 757, 758, 7, 101, 2, 2, 758, 759, 7, 113, 2, 2, 759, 760, 7, 112, 2, + 2, 760, 761, 7, 117, 2, 2, 761, 762, 7, 118, 2, 2, 762, 96, 3, 2, 2, 2, + 763, 764, 7, 101, 2, 2, 764, 765, 7, 113, 2, 2, 765, 766, 7, 112, 2, 2, + 766, 767, 7, 118, 2, 2, 767, 768, 7, 107, 2, 2, 768, 769, 7, 112, 2, 2, + 769, 770, 7, 119, 2, 2, 770, 771, 7, 103, 2, 2, 771, 98, 3, 2, 2, 2, 772, + 773, 7, 102, 2, 2, 773, 774, 7, 103, 2, 2, 774, 775, 7, 104, 2, 2, 775, + 776, 7, 99, 2, 2, 776, 777, 7, 119, 2, 2, 777, 778, 7, 110, 2, 2, 778, + 779, 7, 118, 2, 2, 779, 100, 3, 2, 2, 2, 780, 781, 7, 102, 2, 2, 781, 782, + 7, 113, 2, 2, 782, 102, 3, 2, 2, 2, 783, 784, 7, 102, 2, 2, 784, 785, 7, + 113, 2, 2, 785, 786, 7, 119, 2, 2, 786, 787, 7, 100, 2, 2, 787, 788, 7, + 110, 2, 2, 788, 789, 7, 103, 2, 2, 789, 104, 3, 2, 2, 2, 790, 791, 7, 103, + 2, 2, 791, 792, 7, 110, 2, 2, 792, 793, 7, 117, 2, 2, 793, 794, 7, 103, + 2, 2, 794, 106, 3, 2, 2, 2, 795, 796, 7, 103, 2, 2, 796, 797, 7, 112, 2, + 2, 797, 798, 7, 119, 2, 2, 798, 799, 7, 111, 2, 2, 799, 108, 3, 2, 2, 2, + 800, 801, 7, 103, 2, 2, 801, 802, 7, 122, 2, 2, 802, 803, 7, 118, 2, 2, + 803, 804, 7, 103, 2, 2, 804, 805, 7, 112, 2, 2, 805, 806, 7, 102, 2, 2, + 806, 807, 7, 117, 2, 2, 807, 110, 3, 2, 2, 2, 808, 809, 7, 104, 2, 2, 809, + 810, 7, 107, 2, 2, 810, 811, 7, 112, 2, 2, 811, 812, 7, 99, 2, 2, 812, + 813, 7, 110, 2, 2, 813, 112, 3, 2, 2, 2, 814, 815, 7, 104, 2, 2, 815, 816, + 7, 107, 2, 2, 816, 817, 7, 112, 2, 2, 817, 818, 7, 99, 2, 2, 818, 819, + 7, 110, 2, 2, 819, 820, 7, 110, 2, 2, 820, 821, 7, 123, 2, 2, 821, 114, + 3, 2, 2, 2, 822, 823, 7, 104, 2, 2, 823, 824, 7, 110, 2, 2, 824, 825, 7, + 113, 2, 2, 825, 826, 7, 99, 2, 2, 826, 827, 7, 118, 2, 2, 827, 116, 3, + 2, 2, 2, 828, 829, 7, 104, 2, 2, 829, 830, 7, 113, 2, 2, 830, 831, 7, 116, + 2, 2, 831, 118, 3, 2, 2, 2, 832, 833, 7, 107, 2, 2, 833, 834, 7, 104, 2, + 2, 834, 120, 3, 2, 2, 2, 835, 836, 7, 105, 2, 2, 836, 837, 7, 113, 2, 2, + 837, 838, 7, 118, 2, 2, 838, 839, 7, 113, 2, 2, 839, 122, 3, 2, 2, 2, 840, + 841, 7, 107, 2, 2, 841, 842, 7, 111, 2, 2, 842, 843, 7, 114, 2, 2, 843, + 844, 7, 110, 2, 2, 844, 845, 7, 103, 2, 2, 845, 846, 7, 111, 2, 2, 846, + 847, 7, 103, 2, 2, 847, 848, 7, 112, 2, 2, 848, 849, 7, 118, 2, 2, 849, + 850, 7, 117, 2, 2, 850, 124, 3, 2, 2, 2, 851, 852, 7, 107, 2, 2, 852, 853, + 7, 111, 2, 2, 853, 854, 7, 114, 2, 2, 854, 855, 7, 113, 2, 2, 855, 856, + 7, 116, 2, 2, 856, 857, 7, 118, 2, 2, 857, 126, 3, 2, 2, 2, 858, 859, 7, + 107, 2, 2, 859, 860, 7, 112, 2, 2, 860, 861, 7, 117, 2, 2, 861, 862, 7, + 118, 2, 2, 862, 863, 7, 99, 2, 2, 863, 864, 7, 112, 2, 2, 864, 865, 7, + 101, 2, 2, 865, 866, 7, 103, 2, 2, 866, 867, 7, 113, 2, 2, 867, 868, 7, + 104, 2, 2, 868, 128, 3, 2, 2, 2, 869, 870, 7, 107, 2, 2, 870, 871, 7, 112, + 2, 2, 871, 872, 7, 118, 2, 2, 872, 130, 3, 2, 2, 2, 873, 874, 7, 107, 2, + 2, 874, 875, 7, 112, 2, 2, 875, 876, 7, 118, 2, 2, 876, 877, 7, 103, 2, + 2, 877, 878, 7, 116, 2, 2, 878, 879, 7, 104, 2, 2, 879, 880, 7, 99, 2, + 2, 880, 881, 7, 101, 2, 2, 881, 882, 7, 103, 2, 2, 882, 132, 3, 2, 2, 2, + 883, 884, 7, 110, 2, 2, 884, 885, 7, 113, 2, 2, 885, 886, 7, 112, 2, 2, + 886, 887, 7, 105, 2, 2, 887, 134, 3, 2, 2, 2, 888, 889, 7, 112, 2, 2, 889, + 890, 7, 99, 2, 2, 890, 891, 7, 118, 2, 2, 891, 892, 7, 107, 2, 2, 892, + 893, 7, 120, 2, 2, 893, 894, 7, 103, 2, 2, 894, 136, 3, 2, 2, 2, 895, 896, + 7, 112, 2, 2, 896, 897, 7, 103, 2, 2, 897, 898, 7, 121, 2, 2, 898, 138, + 3, 2, 2, 2, 899, 900, 7, 114, 2, 2, 900, 901, 7, 99, 2, 2, 901, 902, 7, + 101, 2, 2, 902, 903, 7, 109, 2, 2, 903, 904, 7, 99, 2, 2, 904, 905, 7, + 105, 2, 2, 905, 906, 7, 103, 2, 2, 906, 140, 3, 2, 2, 2, 907, 908, 7, 114, + 2, 2, 908, 909, 7, 116, 2, 2, 909, 910, 7, 107, 2, 2, 910, 911, 7, 120, + 2, 2, 911, 912, 7, 99, 2, 2, 912, 913, 7, 118, 2, 2, 913, 914, 7, 103, + 2, 2, 914, 142, 3, 2, 2, 2, 915, 916, 7, 114, 2, 2, 916, 917, 7, 116, 2, + 2, 917, 918, 7, 113, 2, 2, 918, 919, 7, 118, 2, 2, 919, 920, 7, 103, 2, + 2, 920, 921, 7, 101, 2, 2, 921, 922, 7, 118, 2, 2, 922, 923, 7, 103, 2, + 2, 923, 924, 7, 102, 2, 2, 924, 144, 3, 2, 2, 2, 925, 926, 7, 114, 2, 2, + 926, 927, 7, 119, 2, 2, 927, 928, 7, 100, 2, 2, 928, 929, 7, 110, 2, 2, + 929, 930, 7, 107, 2, 2, 930, 931, 7, 101, 2, 2, 931, 146, 3, 2, 2, 2, 932, + 933, 7, 116, 2, 2, 933, 934, 7, 103, 2, 2, 934, 935, 7, 118, 2, 2, 935, + 936, 7, 119, 2, 2, 936, 937, 7, 116, 2, 2, 937, 938, 7, 112, 2, 2, 938, + 148, 3, 2, 2, 2, 939, 940, 7, 117, 2, 2, 940, 941, 7, 106, 2, 2, 941, 942, + 7, 113, 2, 2, 942, 943, 7, 116, 2, 2, 943, 944, 7, 118, 2, 2, 944, 150, + 3, 2, 2, 2, 945, 946, 7, 117, 2, 2, 946, 947, 7, 118, 2, 2, 947, 948, 7, + 99, 2, 2, 948, 949, 7, 118, 2, 2, 949, 950, 7, 107, 2, 2, 950, 951, 7, + 101, 2, 2, 951, 152, 3, 2, 2, 2, 952, 953, 7, 117, 2, 2, 953, 954, 7, 118, + 2, 2, 954, 955, 7, 116, 2, 2, 955, 956, 7, 107, 2, 2, 956, 957, 7, 101, + 2, 2, 957, 958, 7, 118, 2, 2, 958, 959, 7, 104, 2, 2, 959, 960, 7, 114, + 2, 2, 960, 154, 3, 2, 2, 2, 961, 962, 7, 117, 2, 2, 962, 963, 7, 119, 2, + 2, 963, 964, 7, 114, 2, 2, 964, 965, 7, 103, 2, 2, 965, 966, 7, 116, 2, + 2, 966, 156, 3, 2, 2, 2, 967, 968, 7, 117, 2, 2, 968, 969, 7, 121, 2, 2, + 969, 970, 7, 107, 2, 2, 970, 971, 7, 118, 2, 2, 971, 972, 7, 101, 2, 2, + 972, 973, 7, 106, 2, 2, 973, 158, 3, 2, 2, 2, 974, 975, 7, 117, 2, 2, 975, + 976, 7, 123, 2, 2, 976, 977, 7, 112, 2, 2, 977, 978, 7, 101, 2, 2, 978, + 979, 7, 106, 2, 2, 979, 980, 7, 116, 2, 2, 980, 981, 7, 113, 2, 2, 981, + 982, 7, 112, 2, 2, 982, 983, 7, 107, 2, 2, 983, 984, 7, 124, 2, 2, 984, + 985, 7, 103, 2, 2, 985, 986, 7, 102, 2, 2, 986, 160, 3, 2, 2, 2, 987, 988, + 7, 118, 2, 2, 988, 989, 7, 106, 2, 2, 989, 990, 7, 107, 2, 2, 990, 991, + 7, 117, 2, 2, 991, 162, 3, 2, 2, 2, 992, 993, 7, 118, 2, 2, 993, 994, 7, + 106, 2, 2, 994, 995, 7, 116, 2, 2, 995, 996, 7, 113, 2, 2, 996, 997, 7, + 121, 2, 2, 997, 164, 3, 2, 2, 2, 998, 999, 7, 118, 2, 2, 999, 1000, 7, + 106, 2, 2, 1000, 1001, 7, 116, 2, 2, 1001, 1002, 7, 113, 2, 2, 1002, 1003, + 7, 121, 2, 2, 1003, 1004, 7, 117, 2, 2, 1004, 166, 3, 2, 2, 2, 1005, 1006, + 7, 118, 2, 2, 1006, 1007, 7, 116, 2, 2, 1007, 1008, 7, 99, 2, 2, 1008, + 1009, 7, 112, 2, 2, 1009, 1010, 7, 117, 2, 2, 1010, 1011, 7, 107, 2, 2, + 1011, 1012, 7, 103, 2, 2, 1012, 1013, 7, 112, 2, 2, 1013, 1014, 7, 118, + 2, 2, 1014, 168, 3, 2, 2, 2, 1015, 1016, 7, 118, 2, 2, 1016, 1017, 7, 116, + 2, 2, 1017, 1018, 7, 123, 2, 2, 1018, 170, 3, 2, 2, 2, 1019, 1020, 7, 120, + 2, 2, 1020, 1021, 7, 113, 2, 2, 1021, 1022, 7, 107, 2, 2, 1022, 1023, 7, + 102, 2, 2, 1023, 172, 3, 2, 2, 2, 1024, 1025, 7, 120, 2, 2, 1025, 1026, + 7, 113, 2, 2, 1026, 1027, 7, 110, 2, 2, 1027, 1028, 7, 99, 2, 2, 1028, + 1029, 7, 118, 2, 2, 1029, 1030, 7, 107, 2, 2, 1030, 1031, 7, 110, 2, 2, + 1031, 1032, 7, 103, 2, 2, 1032, 174, 3, 2, 2, 2, 1033, 1034, 7, 121, 2, + 2, 1034, 1035, 7, 106, 2, 2, 1035, 1036, 7, 107, 2, 2, 1036, 1037, 7, 110, + 2, 2, 1037, 1038, 7, 103, 2, 2, 1038, 176, 3, 2, 2, 2, 1039, 1044, 5, 181, + 88, 2, 1040, 1044, 5, 183, 89, 2, 1041, 1044, 5, 185, 90, 2, 1042, 1044, + 5, 187, 91, 2, 1043, 1039, 3, 2, 2, 2, 1043, 1040, 3, 2, 2, 2, 1043, 1041, + 3, 2, 2, 2, 1043, 1042, 3, 2, 2, 2, 1044, 1046, 3, 2, 2, 2, 1045, 1047, + 5, 203, 99, 2, 1046, 1045, 3, 2, 2, 2, 1046, 1047, 3, 2, 2, 2, 1047, 1058, + 3, 2, 2, 2, 1048, 1050, 5, 179, 87, 2, 1049, 1051, 9, 7, 2, 2, 1050, 1049, + 3, 2, 2, 2, 1051, 1052, 3, 2, 2, 2, 1052, 1050, 3, 2, 2, 2, 1052, 1053, + 3, 2, 2, 2, 1053, 1055, 3, 2, 2, 2, 1054, 1056, 5, 189, 92, 2, 1055, 1054, + 3, 2, 2, 2, 1055, 1056, 3, 2, 2, 2, 1056, 1058, 3, 2, 2, 2, 1057, 1043, + 3, 2, 2, 2, 1057, 1048, 3, 2, 2, 2, 1058, 178, 3, 2, 2, 2, 1059, 1060, + 7, 50, 2, 2, 1060, 180, 3, 2, 2, 2, 1061, 1063, 5, 191, 93, 2, 1062, 1064, + 5, 189, 92, 2, 1063, 1062, 3, 2, 2, 2, 1063, 1064, 3, 2, 2, 2, 1064, 182, + 3, 2, 2, 2, 1065, 1067, 5, 205, 100, 2, 1066, 1068, 5, 189, 92, 2, 1067, + 1066, 3, 2, 2, 2, 1067, 1068, 3, 2, 2, 2, 1068, 184, 3, 2, 2, 2, 1069, + 1071, 5, 213, 104, 2, 1070, 1072, 5, 189, 92, 2, 1071, 1070, 3, 2, 2, 2, + 1071, 1072, 3, 2, 2, 2, 1072, 186, 3, 2, 2, 2, 1073, 1075, 5, 221, 108, + 2, 1074, 1076, 5, 189, 92, 2, 1075, 1074, 3, 2, 2, 2, 1075, 1076, 3, 2, + 2, 2, 1076, 188, 3, 2, 2, 2, 1077, 1078, 9, 8, 2, 2, 1078, 190, 3, 2, 2, + 2, 1079, 1090, 5, 179, 87, 2, 1080, 1087, 5, 197, 96, 2, 1081, 1083, 5, + 193, 94, 2, 1082, 1081, 3, 2, 2, 2, 1082, 1083, 3, 2, 2, 2, 1083, 1088, + 3, 2, 2, 2, 1084, 1085, 5, 201, 98, 2, 1085, 1086, 5, 193, 94, 2, 1086, + 1088, 3, 2, 2, 2, 1087, 1082, 3, 2, 2, 2, 1087, 1084, 3, 2, 2, 2, 1088, + 1090, 3, 2, 2, 2, 1089, 1079, 3, 2, 2, 2, 1089, 1080, 3, 2, 2, 2, 1090, + 192, 3, 2, 2, 2, 1091, 1099, 5, 195, 95, 2, 1092, 1094, 5, 199, 97, 2, + 1093, 1092, 3, 2, 2, 2, 1094, 1097, 3, 2, 2, 2, 1095, 1093, 3, 2, 2, 2, + 1095, 1096, 3, 2, 2, 2, 1096, 1098, 3, 2, 2, 2, 1097, 1095, 3, 2, 2, 2, + 1098, 1100, 5, 195, 95, 2, 1099, 1095, 3, 2, 2, 2, 1099, 1100, 3, 2, 2, + 2, 1100, 194, 3, 2, 2, 2, 1101, 1104, 5, 179, 87, 2, 1102, 1104, 5, 197, + 96, 2, 1103, 1101, 3, 2, 2, 2, 1103, 1102, 3, 2, 2, 2, 1104, 196, 3, 2, + 2, 2, 1105, 1106, 9, 9, 2, 2, 1106, 198, 3, 2, 2, 2, 1107, 1110, 5, 195, + 95, 2, 1108, 1110, 5, 203, 99, 2, 1109, 1107, 3, 2, 2, 2, 1109, 1108, 3, + 2, 2, 2, 1110, 200, 3, 2, 2, 2, 1111, 1113, 5, 203, 99, 2, 1112, 1111, + 3, 2, 2, 2, 1113, 1114, 3, 2, 2, 2, 1114, 1112, 3, 2, 2, 2, 1114, 1115, + 3, 2, 2, 2, 1115, 202, 3, 2, 2, 2, 1116, 1117, 7, 97, 2, 2, 1117, 204, + 3, 2, 2, 2, 1118, 1119, 5, 179, 87, 2, 1119, 1120, 9, 10, 2, 2, 1120, 1121, + 5, 207, 101, 2, 1121, 206, 3, 2, 2, 2, 1122, 1130, 5, 209, 102, 2, 1123, + 1125, 5, 211, 103, 2, 1124, 1123, 3, 2, 2, 2, 1125, 1128, 3, 2, 2, 2, 1126, + 1124, 3, 2, 2, 2, 1126, 1127, 3, 2, 2, 2, 1127, 1129, 3, 2, 2, 2, 1128, + 1126, 3, 2, 2, 2, 1129, 1131, 5, 209, 102, 2, 1130, 1126, 3, 2, 2, 2, 1130, + 1131, 3, 2, 2, 2, 1131, 208, 3, 2, 2, 2, 1132, 1133, 9, 11, 2, 2, 1133, + 210, 3, 2, 2, 2, 1134, 1137, 5, 209, 102, 2, 1135, 1137, 5, 203, 99, 2, + 1136, 1134, 3, 2, 2, 2, 1136, 1135, 3, 2, 2, 2, 1137, 212, 3, 2, 2, 2, + 1138, 1140, 5, 179, 87, 2, 1139, 1141, 5, 201, 98, 2, 1140, 1139, 3, 2, + 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 3, 2, 2, 2, 1142, 1143, 5, 215, + 105, 2, 1143, 214, 3, 2, 2, 2, 1144, 1152, 5, 217, 106, 2, 1145, 1147, + 5, 219, 107, 2, 1146, 1145, 3, 2, 2, 2, 1147, 1150, 3, 2, 2, 2, 1148, 1146, + 3, 2, 2, 2, 1148, 1149, 3, 2, 2, 2, 1149, 1151, 3, 2, 2, 2, 1150, 1148, + 3, 2, 2, 2, 1151, 1153, 5, 217, 106, 2, 1152, 1148, 3, 2, 2, 2, 1152, 1153, + 3, 2, 2, 2, 1153, 216, 3, 2, 2, 2, 1154, 1155, 9, 12, 2, 2, 1155, 218, + 3, 2, 2, 2, 1156, 1159, 5, 217, 106, 2, 1157, 1159, 5, 203, 99, 2, 1158, + 1156, 3, 2, 2, 2, 1158, 1157, 3, 2, 2, 2, 1159, 220, 3, 2, 2, 2, 1160, + 1161, 5, 179, 87, 2, 1161, 1162, 9, 13, 2, 2, 1162, 1163, 5, 223, 109, + 2, 1163, 222, 3, 2, 2, 2, 1164, 1172, 5, 225, 110, 2, 1165, 1167, 5, 227, + 111, 2, 1166, 1165, 3, 2, 2, 2, 1167, 1170, 3, 2, 2, 2, 1168, 1166, 3, + 2, 2, 2, 1168, 1169, 3, 2, 2, 2, 1169, 1171, 3, 2, 2, 2, 1170, 1168, 3, + 2, 2, 2, 1171, 1173, 5, 225, 110, 2, 1172, 1168, 3, 2, 2, 2, 1172, 1173, + 3, 2, 2, 2, 1173, 224, 3, 2, 2, 2, 1174, 1175, 9, 14, 2, 2, 1175, 226, + 3, 2, 2, 2, 1176, 1179, 5, 225, 110, 2, 1177, 1179, 5, 203, 99, 2, 1178, + 1176, 3, 2, 2, 2, 1178, 1177, 3, 2, 2, 2, 1179, 228, 3, 2, 2, 2, 1180, + 1183, 5, 231, 113, 2, 1181, 1183, 5, 243, 119, 2, 1182, 1180, 3, 2, 2, + 2, 1182, 1181, 3, 2, 2, 2, 1183, 1185, 3, 2, 2, 2, 1184, 1186, 5, 203, + 99, 2, 1185, 1184, 3, 2, 2, 2, 1185, 1186, 3, 2, 2, 2, 1186, 230, 3, 2, + 2, 2, 1187, 1188, 5, 193, 94, 2, 1188, 1189, 5, 251, 123, 2, 1189, 1191, + 5, 193, 94, 2, 1190, 1192, 5, 233, 114, 2, 1191, 1190, 3, 2, 2, 2, 1191, + 1192, 3, 2, 2, 2, 1192, 1194, 3, 2, 2, 2, 1193, 1195, 5, 241, 118, 2, 1194, + 1193, 3, 2, 2, 2, 1194, 1195, 3, 2, 2, 2, 1195, 1205, 3, 2, 2, 2, 1196, + 1197, 5, 193, 94, 2, 1197, 1199, 5, 233, 114, 2, 1198, 1200, 5, 241, 118, + 2, 1199, 1198, 3, 2, 2, 2, 1199, 1200, 3, 2, 2, 2, 1200, 1205, 3, 2, 2, + 2, 1201, 1202, 5, 193, 94, 2, 1202, 1203, 5, 241, 118, 2, 1203, 1205, 3, + 2, 2, 2, 1204, 1187, 3, 2, 2, 2, 1204, 1196, 3, 2, 2, 2, 1204, 1201, 3, + 2, 2, 2, 1205, 232, 3, 2, 2, 2, 1206, 1207, 5, 235, 115, 2, 1207, 1208, + 5, 237, 116, 2, 1208, 234, 3, 2, 2, 2, 1209, 1210, 9, 15, 2, 2, 1210, 236, + 3, 2, 2, 2, 1211, 1213, 5, 239, 117, 2, 1212, 1211, 3, 2, 2, 2, 1212, 1213, + 3, 2, 2, 2, 1213, 1214, 3, 2, 2, 2, 1214, 1215, 5, 193, 94, 2, 1215, 238, + 3, 2, 2, 2, 1216, 1217, 9, 16, 2, 2, 1217, 240, 3, 2, 2, 2, 1218, 1219, + 9, 17, 2, 2, 1219, 242, 3, 2, 2, 2, 1220, 1221, 5, 245, 120, 2, 1221, 1223, + 5, 247, 121, 2, 1222, 1224, 5, 241, 118, 2, 1223, 1222, 3, 2, 2, 2, 1223, + 1224, 3, 2, 2, 2, 1224, 244, 3, 2, 2, 2, 1225, 1227, 5, 205, 100, 2, 1226, + 1228, 5, 251, 123, 2, 1227, 1226, 3, 2, 2, 2, 1227, 1228, 3, 2, 2, 2, 1228, + 1238, 3, 2, 2, 2, 1229, 1230, 5, 179, 87, 2, 1230, 1232, 9, 10, 2, 2, 1231, + 1233, 5, 207, 101, 2, 1232, 1231, 3, 2, 2, 2, 1232, 1233, 3, 2, 2, 2, 1233, + 1234, 3, 2, 2, 2, 1234, 1235, 5, 251, 123, 2, 1235, 1236, 5, 207, 101, + 2, 1236, 1238, 3, 2, 2, 2, 1237, 1225, 3, 2, 2, 2, 1237, 1229, 3, 2, 2, + 2, 1238, 246, 3, 2, 2, 2, 1239, 1240, 5, 249, 122, 2, 1240, 1241, 5, 237, + 116, 2, 1241, 248, 3, 2, 2, 2, 1242, 1243, 9, 18, 2, 2, 1243, 250, 3, 2, + 2, 2, 1244, 1245, 7, 48, 2, 2, 1245, 252, 3, 2, 2, 2, 1246, 1247, 7, 118, + 2, 2, 1247, 1248, 7, 116, 2, 2, 1248, 1249, 7, 119, 2, 2, 1249, 1256, 7, + 103, 2, 2, 1250, 1251, 7, 104, 2, 2, 1251, 1252, 7, 99, 2, 2, 1252, 1253, + 7, 110, 2, 2, 1253, 1254, 7, 117, 2, 2, 1254, 1256, 7, 103, 2, 2, 1255, + 1246, 3, 2, 2, 2, 1255, 1250, 3, 2, 2, 2, 1256, 254, 3, 2, 2, 2, 1257, + 1258, 5, 269, 132, 2, 1258, 1259, 9, 19, 2, 2, 1259, 1265, 3, 2, 2, 2, + 1260, 1265, 5, 257, 126, 2, 1261, 1265, 5, 259, 127, 2, 1262, 1265, 5, + 263, 129, 2, 1263, 1265, 5, 265, 130, 2, 1264, 1257, 3, 2, 2, 2, 1264, + 1260, 3, 2, 2, 2, 1264, 1261, 3, 2, 2, 2, 1264, 1262, 3, 2, 2, 2, 1264, + 1263, 3, 2, 2, 2, 1265, 256, 3, 2, 2, 2, 1266, 1267, 5, 269, 132, 2, 1267, + 1268, 5, 217, 106, 2, 1268, 1279, 3, 2, 2, 2, 1269, 1270, 5, 269, 132, + 2, 1270, 1271, 5, 217, 106, 2, 1271, 1272, 5, 217, 106, 2, 1272, 1279, + 3, 2, 2, 2, 1273, 1274, 5, 269, 132, 2, 1274, 1275, 5, 261, 128, 2, 1275, + 1276, 5, 217, 106, 2, 1276, 1277, 5, 217, 106, 2, 1277, 1279, 3, 2, 2, + 2, 1278, 1266, 3, 2, 2, 2, 1278, 1269, 3, 2, 2, 2, 1278, 1273, 3, 2, 2, + 2, 1279, 258, 3, 2, 2, 2, 1280, 1281, 5, 269, 132, 2, 1281, 1282, 7, 119, + 2, 2, 1282, 1283, 5, 209, 102, 2, 1283, 1284, 5, 209, 102, 2, 1284, 1285, + 5, 209, 102, 2, 1285, 1286, 5, 209, 102, 2, 1286, 260, 3, 2, 2, 2, 1287, + 1288, 9, 20, 2, 2, 1288, 262, 3, 2, 2, 2, 1289, 1290, 5, 269, 132, 2, 1290, + 1291, 5, 273, 134, 2, 1291, 264, 3, 2, 2, 2, 1292, 1294, 5, 269, 132, 2, + 1293, 1295, 7, 15, 2, 2, 1294, 1293, 3, 2, 2, 2, 1294, 1295, 3, 2, 2, 2, + 1295, 1296, 3, 2, 2, 2, 1296, 1297, 7, 12, 2, 2, 1297, 266, 3, 2, 2, 2, + 1298, 1299, 5, 269, 132, 2, 1299, 1300, 5, 271, 133, 2, 1300, 268, 3, 2, + 2, 2, 1301, 1302, 7, 94, 2, 2, 1302, 270, 3, 2, 2, 2, 1303, 1304, 7, 49, + 2, 2, 1304, 272, 3, 2, 2, 2, 1305, 1306, 7, 38, 2, 2, 1306, 274, 3, 2, + 2, 2, 1307, 1308, 7, 36, 2, 2, 1308, 276, 3, 2, 2, 2, 1309, 1310, 7, 41, + 2, 2, 1310, 278, 3, 2, 2, 2, 1311, 1312, 7, 36, 2, 2, 1312, 1313, 7, 36, + 2, 2, 1313, 1314, 7, 36, 2, 2, 1314, 280, 3, 2, 2, 2, 1315, 1316, 7, 41, + 2, 2, 1316, 1317, 7, 41, 2, 2, 1317, 1318, 7, 41, 2, 2, 1318, 282, 3, 2, + 2, 2, 1319, 1320, 7, 38, 2, 2, 1320, 1321, 7, 49, 2, 2, 1321, 284, 3, 2, + 2, 2, 1322, 1323, 7, 49, 2, 2, 1323, 1324, 7, 38, 2, 2, 1324, 286, 3, 2, + 2, 2, 1325, 1326, 7, 38, 2, 2, 1326, 1327, 7, 49, 2, 2, 1327, 1328, 7, + 38, 2, 2, 1328, 288, 3, 2, 2, 2, 1329, 1330, 7, 38, 2, 2, 1330, 1331, 7, + 38, 2, 2, 1331, 290, 3, 2, 2, 2, 1332, 1333, 7, 112, 2, 2, 1333, 1334, + 7, 119, 2, 2, 1334, 1335, 7, 110, 2, 2, 1335, 1336, 7, 110, 2, 2, 1336, + 292, 3, 2, 2, 2, 1337, 1338, 7, 48, 2, 2, 1338, 1339, 7, 48, 2, 2, 1339, + 294, 3, 2, 2, 2, 1340, 1341, 7, 48, 2, 2, 1341, 1342, 7, 48, 2, 2, 1342, + 1343, 7, 62, 2, 2, 1343, 296, 3, 2, 2, 2, 1344, 1345, 7, 44, 2, 2, 1345, + 1346, 7, 48, 2, 2, 1346, 298, 3, 2, 2, 2, 1347, 1348, 7, 65, 2, 2, 1348, + 1349, 7, 48, 2, 2, 1349, 300, 3, 2, 2, 2, 1350, 1351, 7, 65, 2, 2, 1351, + 1352, 7, 65, 2, 2, 1352, 1353, 7, 48, 2, 2, 1353, 302, 3, 2, 2, 2, 1354, + 1355, 7, 65, 2, 2, 1355, 1356, 7, 60, 2, 2, 1356, 304, 3, 2, 2, 2, 1357, + 1358, 7, 48, 2, 2, 1358, 1359, 7, 40, 2, 2, 1359, 306, 3, 2, 2, 2, 1360, + 1361, 7, 60, 2, 2, 1361, 1362, 7, 60, 2, 2, 1362, 308, 3, 2, 2, 2, 1363, + 1364, 7, 63, 2, 2, 1364, 1365, 7, 128, 2, 2, 1365, 310, 3, 2, 2, 2, 1366, + 1367, 7, 63, 2, 2, 1367, 1368, 7, 63, 2, 2, 1368, 1369, 7, 128, 2, 2, 1369, + 312, 3, 2, 2, 2, 1370, 1371, 7, 44, 2, 2, 1371, 1372, 7, 44, 2, 2, 1372, + 314, 3, 2, 2, 2, 1373, 1374, 7, 44, 2, 2, 1374, 1375, 7, 44, 2, 2, 1375, + 1376, 7, 63, 2, 2, 1376, 316, 3, 2, 2, 2, 1377, 1378, 7, 62, 2, 2, 1378, + 1379, 7, 63, 2, 2, 1379, 1380, 7, 64, 2, 2, 1380, 318, 3, 2, 2, 2, 1381, + 1382, 7, 63, 2, 2, 1382, 1383, 7, 63, 2, 2, 1383, 1384, 7, 63, 2, 2, 1384, + 320, 3, 2, 2, 2, 1385, 1386, 7, 35, 2, 2, 1386, 1387, 7, 63, 2, 2, 1387, + 1388, 7, 63, 2, 2, 1388, 322, 3, 2, 2, 2, 1389, 1390, 7, 47, 2, 2, 1390, + 1391, 7, 64, 2, 2, 1391, 324, 3, 2, 2, 2, 1392, 1393, 7, 35, 2, 2, 1393, + 1394, 7, 107, 2, 2, 1394, 1395, 7, 112, 2, 2, 1395, 1396, 7, 117, 2, 2, + 1396, 1397, 7, 118, 2, 2, 1397, 1398, 7, 99, 2, 2, 1398, 1399, 7, 112, + 2, 2, 1399, 1400, 7, 101, 2, 2, 1400, 1401, 7, 103, 2, 2, 1401, 1402, 7, + 113, 2, 2, 1402, 1403, 7, 104, 2, 2, 1403, 326, 3, 2, 2, 2, 1404, 1405, + 7, 35, 2, 2, 1405, 1406, 7, 107, 2, 2, 1406, 1407, 7, 112, 2, 2, 1407, + 328, 3, 2, 2, 2, 1408, 1409, 7, 42, 2, 2, 1409, 1410, 3, 2, 2, 2, 1410, + 1411, 8, 162, 13, 2, 1411, 330, 3, 2, 2, 2, 1412, 1413, 7, 43, 2, 2, 1413, + 1414, 3, 2, 2, 2, 1414, 1415, 8, 163, 8, 2, 1415, 332, 3, 2, 2, 2, 1416, + 1417, 7, 125, 2, 2, 1417, 1418, 3, 2, 2, 2, 1418, 1419, 8, 164, 13, 2, + 1419, 334, 3, 2, 2, 2, 1420, 1421, 7, 127, 2, 2, 1421, 1422, 3, 2, 2, 2, + 1422, 1423, 8, 165, 8, 2, 1423, 336, 3, 2, 2, 2, 1424, 1425, 7, 93, 2, + 2, 1425, 1426, 3, 2, 2, 2, 1426, 1427, 8, 166, 13, 2, 1427, 338, 3, 2, + 2, 2, 1428, 1429, 7, 95, 2, 2, 1429, 1430, 3, 2, 2, 2, 1430, 1431, 8, 167, + 8, 2, 1431, 340, 3, 2, 2, 2, 1432, 1433, 7, 61, 2, 2, 1433, 342, 3, 2, + 2, 2, 1434, 1435, 7, 46, 2, 2, 1435, 344, 3, 2, 2, 2, 1436, 1437, 5, 251, + 123, 2, 1437, 346, 3, 2, 2, 2, 1438, 1439, 7, 63, 2, 2, 1439, 348, 3, 2, + 2, 2, 1440, 1441, 7, 64, 2, 2, 1441, 350, 3, 2, 2, 2, 1442, 1443, 7, 62, + 2, 2, 1443, 352, 3, 2, 2, 2, 1444, 1445, 7, 35, 2, 2, 1445, 354, 3, 2, + 2, 2, 1446, 1447, 7, 128, 2, 2, 1447, 356, 3, 2, 2, 2, 1448, 1449, 7, 65, + 2, 2, 1449, 358, 3, 2, 2, 2, 1450, 1451, 7, 60, 2, 2, 1451, 360, 3, 2, + 2, 2, 1452, 1453, 7, 63, 2, 2, 1453, 1454, 7, 63, 2, 2, 1454, 362, 3, 2, + 2, 2, 1455, 1456, 7, 62, 2, 2, 1456, 1457, 7, 63, 2, 2, 1457, 364, 3, 2, + 2, 2, 1458, 1459, 7, 64, 2, 2, 1459, 1460, 7, 63, 2, 2, 1460, 366, 3, 2, + 2, 2, 1461, 1462, 7, 35, 2, 2, 1462, 1463, 7, 63, 2, 2, 1463, 368, 3, 2, + 2, 2, 1464, 1465, 7, 40, 2, 2, 1465, 1466, 7, 40, 2, 2, 1466, 370, 3, 2, + 2, 2, 1467, 1468, 7, 126, 2, 2, 1468, 1469, 7, 126, 2, 2, 1469, 372, 3, + 2, 2, 2, 1470, 1471, 7, 45, 2, 2, 1471, 1472, 7, 45, 2, 2, 1472, 374, 3, + 2, 2, 2, 1473, 1474, 7, 47, 2, 2, 1474, 1475, 7, 47, 2, 2, 1475, 376, 3, + 2, 2, 2, 1476, 1477, 7, 45, 2, 2, 1477, 378, 3, 2, 2, 2, 1478, 1479, 7, + 47, 2, 2, 1479, 380, 3, 2, 2, 2, 1480, 1481, 7, 44, 2, 2, 1481, 382, 3, + 2, 2, 2, 1482, 1483, 5, 271, 133, 2, 1483, 384, 3, 2, 2, 2, 1484, 1485, + 7, 40, 2, 2, 1485, 386, 3, 2, 2, 2, 1486, 1487, 7, 126, 2, 2, 1487, 388, + 3, 2, 2, 2, 1488, 1489, 7, 96, 2, 2, 1489, 390, 3, 2, 2, 2, 1490, 1491, + 7, 39, 2, 2, 1491, 392, 3, 2, 2, 2, 1492, 1493, 7, 45, 2, 2, 1493, 1494, + 7, 63, 2, 2, 1494, 394, 3, 2, 2, 2, 1495, 1496, 7, 47, 2, 2, 1496, 1497, + 7, 63, 2, 2, 1497, 396, 3, 2, 2, 2, 1498, 1499, 7, 44, 2, 2, 1499, 1500, + 7, 63, 2, 2, 1500, 398, 3, 2, 2, 2, 1501, 1502, 7, 49, 2, 2, 1502, 1503, + 7, 63, 2, 2, 1503, 400, 3, 2, 2, 2, 1504, 1505, 7, 40, 2, 2, 1505, 1506, + 7, 63, 2, 2, 1506, 402, 3, 2, 2, 2, 1507, 1508, 7, 126, 2, 2, 1508, 1509, + 7, 63, 2, 2, 1509, 404, 3, 2, 2, 2, 1510, 1511, 7, 96, 2, 2, 1511, 1512, + 7, 63, 2, 2, 1512, 406, 3, 2, 2, 2, 1513, 1514, 7, 39, 2, 2, 1514, 1515, + 7, 63, 2, 2, 1515, 408, 3, 2, 2, 2, 1516, 1517, 7, 62, 2, 2, 1517, 1518, + 7, 62, 2, 2, 1518, 1519, 7, 63, 2, 2, 1519, 410, 3, 2, 2, 2, 1520, 1521, + 7, 64, 2, 2, 1521, 1522, 7, 64, 2, 2, 1522, 1523, 7, 63, 2, 2, 1523, 412, + 3, 2, 2, 2, 1524, 1525, 7, 64, 2, 2, 1525, 1526, 7, 64, 2, 2, 1526, 1527, + 7, 64, 2, 2, 1527, 1528, 7, 63, 2, 2, 1528, 414, 3, 2, 2, 2, 1529, 1530, + 7, 65, 2, 2, 1530, 1531, 7, 63, 2, 2, 1531, 416, 3, 2, 2, 2, 1532, 1536, + 9, 21, 2, 2, 1533, 1535, 5, 429, 212, 2, 1534, 1533, 3, 2, 2, 2, 1535, + 1538, 3, 2, 2, 2, 1536, 1534, 3, 2, 2, 2, 1536, 1537, 3, 2, 2, 2, 1537, + 418, 3, 2, 2, 2, 1538, 1536, 3, 2, 2, 2, 1539, 1543, 5, 427, 211, 2, 1540, + 1542, 5, 429, 212, 2, 1541, 1540, 3, 2, 2, 2, 1542, 1545, 3, 2, 2, 2, 1543, + 1541, 3, 2, 2, 2, 1543, 1544, 3, 2, 2, 2, 1544, 420, 3, 2, 2, 2, 1545, + 1543, 3, 2, 2, 2, 1546, 1550, 5, 423, 209, 2, 1547, 1549, 5, 425, 210, + 2, 1548, 1547, 3, 2, 2, 2, 1549, 1552, 3, 2, 2, 2, 1550, 1548, 3, 2, 2, + 2, 1550, 1551, 3, 2, 2, 2, 1551, 422, 3, 2, 2, 2, 1552, 1550, 3, 2, 2, + 2, 1553, 1558, 9, 22, 2, 2, 1554, 1558, 10, 23, 2, 2, 1555, 1556, 9, 24, + 2, 2, 1556, 1558, 9, 25, 2, 2, 1557, 1553, 3, 2, 2, 2, 1557, 1554, 3, 2, + 2, 2, 1557, 1555, 3, 2, 2, 2, 1558, 424, 3, 2, 2, 2, 1559, 1564, 9, 26, + 2, 2, 1560, 1564, 10, 23, 2, 2, 1561, 1562, 9, 24, 2, 2, 1562, 1564, 9, + 25, 2, 2, 1563, 1559, 3, 2, 2, 2, 1563, 1560, 3, 2, 2, 2, 1563, 1561, 3, + 2, 2, 2, 1564, 426, 3, 2, 2, 2, 1565, 1570, 9, 27, 2, 2, 1566, 1570, 10, + 23, 2, 2, 1567, 1568, 9, 24, 2, 2, 1568, 1570, 9, 25, 2, 2, 1569, 1565, + 3, 2, 2, 2, 1569, 1566, 3, 2, 2, 2, 1569, 1567, 3, 2, 2, 2, 1570, 428, + 3, 2, 2, 2, 1571, 1576, 9, 28, 2, 2, 1572, 1576, 10, 23, 2, 2, 1573, 1574, + 9, 24, 2, 2, 1574, 1576, 9, 25, 2, 2, 1575, 1571, 3, 2, 2, 2, 1575, 1572, + 3, 2, 2, 2, 1575, 1573, 3, 2, 2, 2, 1576, 430, 3, 2, 2, 2, 1577, 1578, + 7, 66, 2, 2, 1578, 432, 3, 2, 2, 2, 1579, 1580, 7, 48, 2, 2, 1580, 1581, + 7, 48, 2, 2, 1581, 1582, 7, 48, 2, 2, 1582, 434, 3, 2, 2, 2, 1583, 1585, + 9, 29, 2, 2, 1584, 1583, 3, 2, 2, 2, 1585, 1586, 3, 2, 2, 2, 1586, 1584, + 3, 2, 2, 2, 1586, 1587, 3, 2, 2, 2, 1587, 1594, 3, 2, 2, 2, 1588, 1590, + 5, 265, 130, 2, 1589, 1588, 3, 2, 2, 2, 1590, 1591, 3, 2, 2, 2, 1591, 1589, + 3, 2, 2, 2, 1591, 1592, 3, 2, 2, 2, 1592, 1594, 3, 2, 2, 2, 1593, 1584, + 3, 2, 2, 2, 1593, 1589, 3, 2, 2, 2, 1594, 1595, 3, 2, 2, 2, 1595, 1596, + 8, 215, 16, 2, 1596, 436, 3, 2, 2, 2, 1597, 1599, 7, 15, 2, 2, 1598, 1597, + 3, 2, 2, 2, 1598, 1599, 3, 2, 2, 2, 1599, 1600, 3, 2, 2, 2, 1600, 1601, + 7, 12, 2, 2, 1601, 438, 3, 2, 2, 2, 1602, 1603, 7, 49, 2, 2, 1603, 1604, + 7, 44, 2, 2, 1604, 1608, 3, 2, 2, 2, 1605, 1607, 11, 2, 2, 2, 1606, 1605, + 3, 2, 2, 2, 1607, 1610, 3, 2, 2, 2, 1608, 1609, 3, 2, 2, 2, 1608, 1606, + 3, 2, 2, 2, 1609, 1611, 3, 2, 2, 2, 1610, 1608, 3, 2, 2, 2, 1611, 1612, + 7, 44, 2, 2, 1612, 1613, 7, 49, 2, 2, 1613, 1614, 3, 2, 2, 2, 1614, 1615, + 8, 217, 17, 2, 1615, 440, 3, 2, 2, 2, 1616, 1617, 7, 49, 2, 2, 1617, 1618, + 7, 49, 2, 2, 1618, 1622, 3, 2, 2, 2, 1619, 1621, 10, 30, 2, 2, 1620, 1619, + 3, 2, 2, 2, 1621, 1624, 3, 2, 2, 2, 1622, 1620, 3, 2, 2, 2, 1622, 1623, + 3, 2, 2, 2, 1623, 1625, 3, 2, 2, 2, 1624, 1622, 3, 2, 2, 2, 1625, 1626, + 8, 218, 17, 2, 1626, 442, 3, 2, 2, 2, 1627, 1628, 7, 37, 2, 2, 1628, 1629, + 7, 35, 2, 2, 1629, 1633, 3, 2, 2, 2, 1630, 1632, 10, 30, 2, 2, 1631, 1630, + 3, 2, 2, 2, 1632, 1635, 3, 2, 2, 2, 1633, 1631, 3, 2, 2, 2, 1633, 1634, + 3, 2, 2, 2, 1634, 1636, 3, 2, 2, 2, 1635, 1633, 3, 2, 2, 2, 1636, 1637, + 8, 219, 16, 2, 1637, 444, 3, 2, 2, 2, 1638, 1639, 11, 2, 2, 2, 1639, 446, + 3, 2, 2, 2, 84, 2, 3, 4, 5, 6, 7, 8, 451, 460, 469, 477, 486, 495, 499, + 505, 517, 530, 543, 579, 630, 634, 639, 644, 649, 657, 698, 1043, 1046, + 1052, 1055, 1057, 1063, 1067, 1071, 1075, 1082, 1087, 1089, 1095, 1099, + 1103, 1109, 1114, 1126, 1130, 1136, 1140, 1148, 1152, 1158, 1168, 1172, + 1178, 1182, 1185, 1191, 1194, 1199, 1204, 1212, 1223, 1227, 1232, 1237, + 1255, 1264, 1278, 1294, 1536, 1543, 1550, 1557, 1563, 1569, 1575, 1586, + 1591, 1593, 1598, 1608, 1622, 1633, 18, 7, 3, 2, 7, 7, 2, 9, 4, 2, 7, 4, + 2, 7, 5, 2, 7, 6, 2, 6, 2, 2, 5, 2, 2, 9, 5, 2, 9, 6, 2, 9, 82, 2, 7, 2, + 2, 9, 125, 2, 7, 8, 2, 8, 2, 2, 9, 129, 2, +} + +var lexerDeserializer = antlr.NewATNDeserializer(nil) +var lexerAtn = lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn) + +var lexerChannelNames = []string{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", +} + +var lexerModeNames = []string{ + "DEFAULT_MODE", "DQ_GSTRING_MODE", "TDQ_GSTRING_MODE", "SLASHY_GSTRING_MODE", + "DOLLAR_SLASHY_GSTRING_MODE", "GSTRING_TYPE_SELECTOR_MODE", "GSTRING_PATH_MODE", +} + +var lexerLiteralNames = []string{ + "", "", "", "", "", "", "", "'as'", "'def'", "'in'", "'trait'", "'threadsafe'", + "'var'", "", "'abstract'", "'assert'", "'break'", "'case'", "'catch'", + "'class'", "'const'", "'continue'", "'default'", "'do'", "'else'", "'enum'", + "'extends'", "'final'", "'finally'", "'for'", "'if'", "'goto'", "'implements'", + "'import'", "'instanceof'", "'interface'", "'native'", "'new'", "'package'", + "'private'", "'protected'", "'public'", "'return'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", "", "", "", + "'null'", "'..'", "'..<'", "'*.'", "'?.'", "'??.'", "'?:'", "'.&'", "'::'", + "'=~'", "'==~'", "'**'", "'**='", "'<=>'", "'==='", "'!=='", "'->'", "'!instanceof'", + "'!in'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "", "'='", + "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", "'<='", "'>='", "'!='", + "'&&'", "'||'", "'++'", "'--'", "'+'", "'-'", "'*'", "", "'&'", "'|'", + "'^'", "'%'", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", + "'<<='", "'>>='", "'>>>='", "'?='", "", "", "'@'", "'...'", +} + +var lexerSymbolicNames = []string{ + "", "StringLiteral", "GStringBegin", "GStringEnd", "GStringPart", "GStringPathPart", + "RollBackOne", "AS", "DEF", "IN", "TRAIT", "THREADSAFE", "VAR", "BuiltInPrimitiveType", + "ABSTRACT", "ASSERT", "BREAK", "CASE", "CATCH", "CLASS", "CONST", "CONTINUE", + "DEFAULT", "DO", "ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FOR", + "IF", "GOTO", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INTERFACE", "NATIVE", + "NEW", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "STATIC", + "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", + "TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "FloatingPointLiteral", + "BooleanLiteral", "NullLiteral", "RANGE_INCLUSIVE", "RANGE_EXCLUSIVE", + "SPREAD_DOT", "SAFE_DOT", "SAFE_CHAIN_DOT", "ELVIS", "METHOD_POINTER", + "METHOD_REFERENCE", "REGEX_FIND", "REGEX_MATCH", "POWER", "POWER_ASSIGN", + "SPACESHIP", "IDENTICAL", "NOT_IDENTICAL", "ARROW", "NOT_INSTANCEOF", "NOT_IN", + "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", + "DOT", "ASSIGN", "GT", "LT", "NOT", "BITNOT", "QUESTION", "COLON", "EQUAL", + "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", + "DIV", "BITAND", "BITOR", "XOR", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", + "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", + "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "ELVIS_ASSIGN", "CapitalizedIdentifier", + "Identifier", "AT", "ELLIPSIS", "WS", "NL", "SH_COMMENT", "UNEXPECTED_CHAR", +} + +var lexerRuleNames = []string{ + "StringLiteral", "GStringBegin", "TdqGStringBegin", "SlashyGStringBegin", + "DollarSlashyGStringBegin", "GStringEnd", "GStringPart", "GStringCharacter", + "TdqGStringEnd", "TdqGStringPart", "TdqGStringCharacter", "SlashyGStringEnd", + "SlashyGStringPart", "SlashyGStringCharacter", "DollarSlashyGStringEnd", + "DollarSlashyGStringPart", "DollarSlashyGStringCharacter", "GStringLBrace", + "GStringIdentifier", "GStringPathPart", "RollBackOne", "DqStringCharacter", + "SqStringCharacter", "TdqStringCharacter", "TsqStringCharacter", "SlashyStringCharacter", + "DollarSlashyStringCharacter", "AS", "DEF", "IN", "TRAIT", "THREADSAFE", + "VAR", "BuiltInPrimitiveType", "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", + "BYTE", "CASE", "CATCH", "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", + "DO", "DOUBLE", "ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", + "FOR", "IF", "GOTO", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", + "LONG", "NATIVE", "NEW", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", + "SHORT", "STATIC", "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", + "THROW", "THROWS", "TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", + "Zero", "DecimalIntegerLiteral", "HexIntegerLiteral", "OctalIntegerLiteral", + "BinaryIntegerLiteral", "IntegerTypeSuffix", "DecimalNumeral", "Digits", + "Digit", "NonZeroDigit", "DigitOrUnderscore", "Underscores", "Underscore", + "HexNumeral", "HexDigits", "HexDigit", "HexDigitOrUnderscore", "OctalNumeral", + "OctalDigits", "OctalDigit", "OctalDigitOrUnderscore", "BinaryNumeral", + "BinaryDigits", "BinaryDigit", "BinaryDigitOrUnderscore", "FloatingPointLiteral", + "DecimalFloatingPointLiteral", "ExponentPart", "ExponentIndicator", "SignedInteger", + "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral", "HexSignificand", + "BinaryExponent", "BinaryExponentIndicator", "Dot", "BooleanLiteral", "EscapeSequence", + "OctalEscape", "UnicodeEscape", "ZeroToThree", "DollarEscape", "LineEscape", + "SlashEscape", "Backslash", "Slash", "Dollar", "GStringQuotationMark", + "SqStringQuotationMark", "TdqStringQuotationMark", "TsqStringQuotationMark", + "DollarSlashyGStringQuotationMarkBegin", "DollarSlashyGStringQuotationMarkEnd", + "DollarSlashEscape", "DollarDollarEscape", "NullLiteral", "RANGE_INCLUSIVE", + "RANGE_EXCLUSIVE", "SPREAD_DOT", "SAFE_DOT", "SAFE_CHAIN_DOT", "ELVIS", + "METHOD_POINTER", "METHOD_REFERENCE", "REGEX_FIND", "REGEX_MATCH", "POWER", + "POWER_ASSIGN", "SPACESHIP", "IDENTICAL", "NOT_IDENTICAL", "ARROW", "NOT_INSTANCEOF", + "NOT_IN", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", + "COMMA", "DOT", "ASSIGN", "GT", "LT", "NOT", "BITNOT", "QUESTION", "COLON", + "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", + "MUL", "DIV", "BITAND", "BITOR", "XOR", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", + "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", + "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "ELVIS_ASSIGN", "CapitalizedIdentifier", + "Identifier", "IdentifierInGString", "JavaLetterInGString", "JavaLetterOrDigitInGString", + "JavaLetter", "JavaLetterOrDigit", "AT", "ELLIPSIS", "WS", "NL", "ML_COMMENT", + "SL_COMMENT", "SH_COMMENT", "UNEXPECTED_CHAR", +} + +type GroovyLexer struct { + *antlr.BaseLexer + channelNames []string + modeNames []string + // TODO: EOF string +} + +var lexerDecisionToDFA = make([]*antlr.DFA, len(lexerAtn.DecisionToState)) + +func init() { + for index, ds := range lexerAtn.DecisionToState { + lexerDecisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +func NewGroovyLexer(input antlr.CharStream) *GroovyLexer { + + l := new(GroovyLexer) + + l.BaseLexer = antlr.NewBaseLexer(input) + l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache()) + + l.channelNames = lexerChannelNames + l.modeNames = lexerModeNames + l.RuleNames = lexerRuleNames + l.LiteralNames = lexerLiteralNames + l.SymbolicNames = lexerSymbolicNames + l.GrammarFileName = "GroovyLexer.g4" + // TODO: l.EOF = antlr.TokenEOF + + return l +} + +// GroovyLexer tokens. +const ( + GroovyLexerStringLiteral = 1 + GroovyLexerGStringBegin = 2 + GroovyLexerGStringEnd = 3 + GroovyLexerGStringPart = 4 + GroovyLexerGStringPathPart = 5 + GroovyLexerRollBackOne = 6 + GroovyLexerAS = 7 + GroovyLexerDEF = 8 + GroovyLexerIN = 9 + GroovyLexerTRAIT = 10 + GroovyLexerTHREADSAFE = 11 + GroovyLexerVAR = 12 + GroovyLexerBuiltInPrimitiveType = 13 + GroovyLexerABSTRACT = 14 + GroovyLexerASSERT = 15 + GroovyLexerBREAK = 16 + GroovyLexerCASE = 17 + GroovyLexerCATCH = 18 + GroovyLexerCLASS = 19 + GroovyLexerCONST = 20 + GroovyLexerCONTINUE = 21 + GroovyLexerDEFAULT = 22 + GroovyLexerDO = 23 + GroovyLexerELSE = 24 + GroovyLexerENUM = 25 + GroovyLexerEXTENDS = 26 + GroovyLexerFINAL = 27 + GroovyLexerFINALLY = 28 + GroovyLexerFOR = 29 + GroovyLexerIF = 30 + GroovyLexerGOTO = 31 + GroovyLexerIMPLEMENTS = 32 + GroovyLexerIMPORT = 33 + GroovyLexerINSTANCEOF = 34 + GroovyLexerINTERFACE = 35 + GroovyLexerNATIVE = 36 + GroovyLexerNEW = 37 + GroovyLexerPACKAGE = 38 + GroovyLexerPRIVATE = 39 + GroovyLexerPROTECTED = 40 + GroovyLexerPUBLIC = 41 + GroovyLexerRETURN = 42 + GroovyLexerSTATIC = 43 + GroovyLexerSTRICTFP = 44 + GroovyLexerSUPER = 45 + GroovyLexerSWITCH = 46 + GroovyLexerSYNCHRONIZED = 47 + GroovyLexerTHIS = 48 + GroovyLexerTHROW = 49 + GroovyLexerTHROWS = 50 + GroovyLexerTRANSIENT = 51 + GroovyLexerTRY = 52 + GroovyLexerVOID = 53 + GroovyLexerVOLATILE = 54 + GroovyLexerWHILE = 55 + GroovyLexerIntegerLiteral = 56 + GroovyLexerFloatingPointLiteral = 57 + GroovyLexerBooleanLiteral = 58 + GroovyLexerNullLiteral = 59 + GroovyLexerRANGE_INCLUSIVE = 60 + GroovyLexerRANGE_EXCLUSIVE = 61 + GroovyLexerSPREAD_DOT = 62 + GroovyLexerSAFE_DOT = 63 + GroovyLexerSAFE_CHAIN_DOT = 64 + GroovyLexerELVIS = 65 + GroovyLexerMETHOD_POINTER = 66 + GroovyLexerMETHOD_REFERENCE = 67 + GroovyLexerREGEX_FIND = 68 + GroovyLexerREGEX_MATCH = 69 + GroovyLexerPOWER = 70 + GroovyLexerPOWER_ASSIGN = 71 + GroovyLexerSPACESHIP = 72 + GroovyLexerIDENTICAL = 73 + GroovyLexerNOT_IDENTICAL = 74 + GroovyLexerARROW = 75 + GroovyLexerNOT_INSTANCEOF = 76 + GroovyLexerNOT_IN = 77 + GroovyLexerLPAREN = 78 + GroovyLexerRPAREN = 79 + GroovyLexerLBRACE = 80 + GroovyLexerRBRACE = 81 + GroovyLexerLBRACK = 82 + GroovyLexerRBRACK = 83 + GroovyLexerSEMI = 84 + GroovyLexerCOMMA = 85 + GroovyLexerDOT = 86 + GroovyLexerASSIGN = 87 + GroovyLexerGT = 88 + GroovyLexerLT = 89 + GroovyLexerNOT = 90 + GroovyLexerBITNOT = 91 + GroovyLexerQUESTION = 92 + GroovyLexerCOLON = 93 + GroovyLexerEQUAL = 94 + GroovyLexerLE = 95 + GroovyLexerGE = 96 + GroovyLexerNOTEQUAL = 97 + GroovyLexerAND = 98 + GroovyLexerOR = 99 + GroovyLexerINC = 100 + GroovyLexerDEC = 101 + GroovyLexerADD = 102 + GroovyLexerSUB = 103 + GroovyLexerMUL = 104 + GroovyLexerDIV = 105 + GroovyLexerBITAND = 106 + GroovyLexerBITOR = 107 + GroovyLexerXOR = 108 + GroovyLexerMOD = 109 + GroovyLexerADD_ASSIGN = 110 + GroovyLexerSUB_ASSIGN = 111 + GroovyLexerMUL_ASSIGN = 112 + GroovyLexerDIV_ASSIGN = 113 + GroovyLexerAND_ASSIGN = 114 + GroovyLexerOR_ASSIGN = 115 + GroovyLexerXOR_ASSIGN = 116 + GroovyLexerMOD_ASSIGN = 117 + GroovyLexerLSHIFT_ASSIGN = 118 + GroovyLexerRSHIFT_ASSIGN = 119 + GroovyLexerURSHIFT_ASSIGN = 120 + GroovyLexerELVIS_ASSIGN = 121 + GroovyLexerCapitalizedIdentifier = 122 + GroovyLexerIdentifier = 123 + GroovyLexerAT = 124 + GroovyLexerELLIPSIS = 125 + GroovyLexerWS = 126 + GroovyLexerNL = 127 + GroovyLexerSH_COMMENT = 128 + GroovyLexerUNEXPECTED_CHAR = 129 +) + +// GroovyLexer modes. +const ( + GroovyLexerDQ_GSTRING_MODE = iota + 1 + GroovyLexerTDQ_GSTRING_MODE + GroovyLexerSLASHY_GSTRING_MODE + GroovyLexerDOLLAR_SLASHY_GSTRING_MODE + GroovyLexerGSTRING_TYPE_SELECTOR_MODE + GroovyLexerGSTRING_PATH_MODE +) diff --git a/languages/groovy/groovy_parser.go b/languages/groovy/groovy_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..b7bd6d1afb437665ec4a5a603565cddb76f582b3 --- /dev/null +++ b/languages/groovy/groovy_parser.go @@ -0,0 +1,28352 @@ +// Code generated from GroovyParser.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser // GroovyParser + +import ( + "fmt" + "reflect" + "strconv" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import errors +var _ = fmt.Printf +var _ = reflect.Copy +var _ = strconv.Itoa + +var parserATN = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 131, 1681, + 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, + 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, + 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, + 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, + 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, + 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, + 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, + 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, + 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, + 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, + 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, + 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, + 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, + 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, + 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, + 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, + 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, + 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, + 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, + 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, + 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, + 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, + 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, + 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, + 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, + 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, + 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, + 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, + 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, + 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, + 4, 152, 9, 152, 3, 2, 3, 2, 5, 2, 307, 10, 2, 3, 2, 5, 2, 310, 10, 2, 3, + 2, 5, 2, 313, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 321, 10, + 3, 12, 3, 14, 3, 324, 11, 3, 3, 3, 5, 3, 327, 10, 3, 3, 4, 3, 4, 3, 4, + 5, 4, 332, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 5, 6, 341, + 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 348, 10, 6, 3, 7, 3, 7, 3, 7, + 3, 8, 3, 8, 5, 8, 355, 10, 8, 3, 9, 5, 9, 358, 10, 9, 3, 10, 3, 10, 3, + 10, 6, 10, 363, 10, 10, 13, 10, 14, 10, 364, 3, 11, 5, 11, 368, 10, 11, + 3, 12, 3, 12, 3, 12, 6, 12, 373, 10, 12, 13, 12, 14, 12, 374, 3, 13, 3, + 13, 5, 13, 379, 10, 13, 3, 14, 3, 14, 5, 14, 383, 10, 14, 3, 15, 5, 15, + 386, 10, 15, 3, 16, 3, 16, 3, 16, 6, 16, 391, 10, 16, 13, 16, 14, 16, 392, + 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 7, 17, 402, 10, 17, 12, + 17, 14, 17, 405, 11, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, + 3, 18, 5, 18, 415, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 422, + 10, 19, 12, 19, 14, 19, 425, 11, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, + 7, 20, 432, 10, 20, 12, 20, 14, 20, 435, 11, 20, 3, 21, 3, 21, 3, 21, 3, + 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 448, 10, 21, + 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 454, 10, 21, 3, 21, 3, 21, 3, 21, 3, + 21, 3, 21, 3, 21, 3, 21, 5, 21, 463, 10, 21, 3, 21, 3, 21, 5, 21, 467, + 10, 21, 3, 21, 5, 21, 470, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, + 21, 5, 21, 478, 10, 21, 3, 21, 5, 21, 481, 10, 21, 3, 21, 5, 21, 484, 10, + 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 492, 10, 22, 3, 22, + 5, 22, 495, 10, 22, 3, 22, 5, 22, 498, 10, 22, 3, 22, 5, 22, 501, 10, 22, + 3, 22, 3, 22, 3, 22, 7, 22, 506, 10, 22, 12, 22, 14, 22, 509, 11, 22, 3, + 22, 5, 22, 512, 10, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, + 3, 23, 7, 23, 522, 10, 23, 12, 23, 14, 23, 525, 11, 23, 3, 23, 3, 23, 3, + 23, 5, 23, 530, 10, 23, 3, 24, 3, 24, 3, 24, 5, 24, 535, 10, 24, 3, 24, + 5, 24, 538, 10, 24, 3, 25, 3, 25, 3, 25, 5, 25, 543, 10, 25, 3, 25, 3, + 25, 5, 25, 547, 10, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 554, + 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, + 5, 27, 565, 10, 27, 3, 27, 3, 27, 5, 27, 569, 10, 27, 3, 27, 5, 27, 572, + 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 581, 10, + 27, 3, 27, 3, 27, 5, 27, 585, 10, 27, 5, 27, 587, 10, 27, 3, 28, 3, 28, + 5, 28, 591, 10, 28, 3, 29, 3, 29, 3, 29, 5, 29, 596, 10, 29, 3, 30, 3, + 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 7, 31, 605, 10, 31, 12, 31, 14, + 31, 608, 11, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 616, + 10, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, + 3, 35, 3, 35, 7, 35, 629, 10, 35, 12, 35, 14, 35, 632, 11, 35, 3, 35, 3, + 35, 5, 35, 636, 10, 35, 3, 36, 3, 36, 3, 36, 3, 36, 6, 36, 642, 10, 36, + 13, 36, 14, 36, 643, 3, 37, 5, 37, 647, 10, 37, 3, 38, 3, 38, 3, 38, 5, + 38, 652, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 5, 39, 659, 10, 39, + 3, 39, 5, 39, 662, 10, 39, 3, 39, 3, 39, 3, 40, 3, 40, 5, 40, 668, 10, + 40, 3, 40, 5, 40, 671, 10, 40, 3, 41, 3, 41, 5, 41, 675, 10, 41, 3, 42, + 3, 42, 5, 42, 679, 10, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, + 44, 3, 44, 3, 44, 7, 44, 690, 10, 44, 12, 44, 14, 44, 693, 11, 44, 3, 44, + 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 705, + 10, 45, 5, 45, 707, 10, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, + 47, 3, 47, 7, 47, 717, 10, 47, 12, 47, 14, 47, 720, 11, 47, 3, 48, 3, 48, + 5, 48, 724, 10, 48, 3, 48, 3, 48, 3, 49, 3, 49, 5, 49, 730, 10, 49, 3, + 49, 3, 49, 3, 49, 3, 49, 7, 49, 736, 10, 49, 12, 49, 14, 49, 739, 11, 49, + 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 5, 51, 746, 10, 51, 3, 51, 5, 51, 749, + 10, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 5, 51, 757, 10, 51, 3, + 52, 3, 52, 3, 53, 3, 53, 3, 53, 7, 53, 764, 10, 53, 12, 53, 14, 53, 767, + 11, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 5, 54, 774, 10, 54, 3, 55, 3, + 55, 3, 55, 7, 55, 779, 10, 55, 12, 55, 14, 55, 782, 11, 55, 3, 56, 3, 56, + 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 7, 57, 791, 10, 57, 12, 57, 14, 57, + 794, 11, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 5, 58, 801, 10, 58, 3, + 59, 3, 59, 3, 59, 3, 59, 7, 59, 807, 10, 59, 12, 59, 14, 59, 810, 11, 59, + 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 5, 60, 817, 10, 60, 3, 60, 3, 60, 5, + 60, 821, 10, 60, 3, 61, 3, 61, 7, 61, 825, 10, 61, 12, 61, 14, 61, 828, + 11, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, + 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 65, 3, 65, 5, 65, 846, 10, 65, 3, + 66, 3, 66, 5, 66, 850, 10, 66, 3, 67, 3, 67, 3, 67, 5, 67, 855, 10, 67, + 3, 67, 3, 67, 3, 67, 3, 67, 5, 67, 861, 10, 67, 3, 67, 3, 67, 3, 67, 3, + 68, 3, 68, 5, 68, 868, 10, 68, 3, 69, 5, 69, 871, 10, 69, 3, 70, 3, 70, + 3, 70, 3, 70, 7, 70, 877, 10, 70, 12, 70, 14, 70, 880, 11, 70, 3, 70, 5, + 70, 883, 10, 70, 3, 71, 3, 71, 3, 71, 7, 71, 888, 10, 71, 12, 71, 14, 71, + 891, 11, 71, 3, 72, 3, 72, 3, 72, 3, 72, 5, 72, 897, 10, 72, 3, 72, 5, + 72, 900, 10, 72, 3, 73, 3, 73, 5, 73, 904, 10, 73, 3, 74, 3, 74, 3, 75, + 3, 75, 3, 75, 7, 75, 911, 10, 75, 12, 75, 14, 75, 914, 11, 75, 3, 76, 3, + 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 5, 77, 924, 10, 77, 3, 78, + 3, 78, 3, 78, 5, 78, 929, 10, 78, 3, 79, 3, 79, 3, 79, 3, 79, 7, 79, 935, + 10, 79, 12, 79, 14, 79, 938, 11, 79, 5, 79, 940, 10, 79, 3, 79, 5, 79, + 943, 10, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 7, 80, 950, 10, 80, 12, + 80, 14, 80, 953, 11, 80, 5, 80, 955, 10, 80, 3, 80, 3, 80, 3, 80, 3, 81, + 3, 81, 5, 81, 962, 10, 81, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 5, + 83, 970, 10, 83, 3, 84, 3, 84, 5, 84, 974, 10, 84, 3, 84, 3, 84, 3, 84, + 3, 84, 3, 84, 3, 84, 3, 84, 5, 84, 983, 10, 84, 3, 84, 5, 84, 986, 10, + 84, 3, 84, 3, 84, 3, 84, 5, 84, 991, 10, 84, 3, 85, 3, 85, 3, 85, 3, 85, + 7, 85, 997, 10, 85, 12, 85, 14, 85, 1000, 11, 85, 3, 85, 3, 85, 3, 86, + 5, 86, 1005, 10, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 6, 87, 1013, + 10, 87, 13, 87, 14, 87, 1014, 3, 87, 3, 87, 3, 88, 3, 88, 5, 88, 1021, + 10, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 5, 89, 1029, 10, 89, + 3, 89, 3, 89, 3, 89, 3, 89, 5, 89, 1035, 10, 89, 3, 90, 3, 90, 3, 90, 3, + 90, 3, 90, 3, 90, 7, 90, 1043, 10, 90, 12, 90, 14, 90, 1046, 11, 90, 3, + 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, + 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, + 91, 5, 91, 1070, 10, 91, 3, 92, 3, 92, 5, 92, 1074, 10, 92, 3, 93, 3, 93, + 5, 93, 1078, 10, 93, 3, 94, 3, 94, 5, 94, 1082, 10, 94, 3, 94, 3, 94, 3, + 94, 3, 94, 3, 94, 7, 94, 1089, 10, 94, 12, 94, 14, 94, 1092, 11, 94, 3, + 94, 3, 94, 3, 94, 5, 94, 1097, 10, 94, 3, 95, 3, 95, 3, 95, 3, 95, 3, 95, + 3, 95, 3, 95, 5, 95, 1106, 10, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, + 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 5, 96, 1119, 10, 96, 3, 96, 3, 96, + 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, + 96, 3, 96, 5, 96, 1135, 10, 96, 3, 97, 3, 97, 3, 97, 3, 97, 5, 97, 1141, + 10, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 7, 98, + 1151, 10, 98, 12, 98, 14, 98, 1154, 11, 98, 3, 99, 3, 99, 3, 99, 3, 99, + 3, 100, 3, 100, 3, 100, 3, 100, 5, 100, 1164, 10, 100, 3, 100, 3, 100, + 3, 101, 3, 101, 3, 101, 3, 101, 7, 101, 1172, 10, 101, 12, 101, 14, 101, + 1175, 11, 101, 3, 102, 3, 102, 5, 102, 1179, 10, 102, 3, 103, 3, 103, 3, + 103, 6, 103, 1184, 10, 103, 13, 103, 14, 103, 1185, 3, 103, 3, 103, 3, + 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 5, 104, 1196, 10, 104, 3, + 105, 3, 105, 5, 105, 1200, 10, 105, 3, 106, 3, 106, 5, 106, 1204, 10, 106, + 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 5, 107, 1211, 10, 107, 3, 107, + 3, 107, 5, 107, 1215, 10, 107, 3, 107, 3, 107, 5, 107, 1219, 10, 107, 3, + 108, 3, 108, 5, 108, 1223, 10, 108, 3, 109, 3, 109, 3, 110, 3, 110, 3, + 110, 3, 110, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 3, 112, 3, 113, 3, + 113, 3, 113, 7, 113, 1240, 10, 113, 12, 113, 14, 113, 1243, 11, 113, 3, + 114, 3, 114, 5, 114, 1247, 10, 114, 3, 114, 3, 114, 3, 115, 3, 115, 5, + 115, 1253, 10, 115, 3, 116, 3, 116, 3, 117, 3, 117, 5, 117, 1259, 10, 117, + 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, + 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 5, 118, + 1278, 10, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, + 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, + 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, + 5, 118, 1305, 10, 118, 3, 118, 5, 118, 1308, 10, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 5, 118, 1372, 10, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, + 118, 3, 118, 3, 118, 3, 118, 3, 118, 7, 118, 1388, 10, 118, 12, 118, 14, + 118, 1391, 11, 118, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, + 119, 3, 119, 3, 119, 3, 119, 5, 119, 1403, 10, 119, 3, 120, 3, 120, 3, + 120, 5, 120, 1408, 10, 120, 3, 120, 7, 120, 1411, 10, 120, 12, 120, 14, + 120, 1414, 11, 120, 3, 121, 3, 121, 6, 121, 1418, 10, 121, 13, 121, 14, + 121, 1419, 3, 121, 5, 121, 1423, 10, 121, 3, 122, 3, 122, 3, 122, 3, 122, + 7, 122, 1429, 10, 122, 12, 122, 14, 122, 1432, 11, 122, 3, 123, 3, 123, + 3, 123, 3, 123, 3, 123, 5, 123, 1439, 10, 123, 3, 123, 3, 123, 3, 123, + 3, 123, 5, 123, 1445, 10, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, + 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, + 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, + 5, 123, 1470, 10, 123, 3, 124, 3, 124, 3, 124, 3, 124, 5, 124, 1476, 10, + 124, 3, 125, 3, 125, 5, 125, 1480, 10, 125, 3, 126, 5, 126, 1483, 10, 126, + 3, 126, 3, 126, 5, 126, 1487, 10, 126, 3, 126, 3, 126, 3, 127, 5, 127, + 1492, 10, 127, 3, 127, 3, 127, 3, 127, 5, 127, 1497, 10, 127, 3, 127, 3, + 127, 3, 128, 3, 128, 5, 128, 1503, 10, 128, 3, 128, 3, 128, 3, 128, 3, + 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, + 128, 5, 128, 1518, 10, 128, 3, 129, 3, 129, 5, 129, 1522, 10, 129, 3, 129, + 5, 129, 1525, 10, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, 5, 130, + 1532, 10, 130, 3, 130, 5, 130, 1535, 10, 130, 3, 130, 3, 130, 3, 131, 3, + 131, 3, 131, 7, 131, 1542, 10, 131, 12, 131, 14, 131, 1545, 11, 131, 3, + 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, + 132, 5, 132, 1557, 10, 132, 3, 133, 3, 133, 5, 133, 1561, 10, 133, 3, 134, + 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1568, 10, 134, 3, 134, 3, 134, + 3, 134, 3, 134, 3, 134, 3, 134, 6, 134, 1576, 10, 134, 13, 134, 14, 134, + 1577, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1587, + 10, 134, 3, 135, 3, 135, 3, 135, 5, 135, 1592, 10, 135, 3, 135, 3, 135, + 3, 135, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 3, 137, 5, 137, 1603, 10, + 137, 5, 137, 1605, 10, 137, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, + 138, 3, 139, 3, 139, 3, 139, 5, 139, 1616, 10, 139, 3, 140, 3, 140, 5, + 140, 1620, 10, 140, 3, 140, 5, 140, 1623, 10, 140, 3, 140, 3, 140, 3, 141, + 3, 141, 3, 141, 3, 141, 3, 141, 7, 141, 1632, 10, 141, 12, 141, 14, 141, + 1635, 11, 141, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, 7, 142, 1642, 10, + 142, 12, 142, 14, 142, 1645, 11, 142, 3, 143, 3, 143, 5, 143, 1649, 10, + 143, 3, 144, 3, 144, 3, 144, 5, 144, 1654, 10, 144, 3, 145, 3, 145, 3, + 146, 3, 146, 3, 147, 3, 147, 3, 148, 3, 148, 3, 149, 3, 149, 3, 150, 3, + 150, 5, 150, 1668, 10, 150, 3, 151, 7, 151, 1671, 10, 151, 12, 151, 14, + 151, 1674, 11, 151, 3, 152, 6, 152, 1677, 10, 152, 13, 152, 14, 152, 1678, + 3, 152, 2, 3, 234, 153, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, + 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, + 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, + 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, + 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, + 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, + 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, + 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, + 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 2, 24, 8, 2, + 10, 10, 14, 14, 38, 38, 49, 49, 53, 53, 56, 56, 7, 2, 16, 16, 24, 24, 29, + 29, 41, 43, 45, 46, 8, 2, 10, 10, 14, 14, 16, 16, 29, 29, 41, 43, 45, 46, + 4, 2, 28, 28, 47, 47, 4, 2, 87, 87, 95, 95, 4, 2, 11, 11, 95, 95, 3, 2, + 102, 103, 3, 2, 92, 93, 3, 2, 102, 105, 4, 2, 106, 107, 111, 111, 3, 2, + 104, 105, 3, 2, 62, 63, 6, 2, 11, 11, 79, 79, 90, 91, 97, 98, 5, 2, 74, + 76, 96, 96, 99, 99, 3, 2, 70, 71, 5, 2, 9, 9, 36, 36, 78, 78, 5, 2, 73, + 73, 89, 89, 112, 123, 4, 2, 64, 66, 88, 88, 7, 2, 9, 9, 11, 12, 14, 14, + 45, 45, 124, 125, 4, 2, 15, 15, 55, 55, 4, 2, 9, 57, 60, 61, 4, 2, 86, + 86, 129, 129, 2, 1784, 2, 304, 3, 2, 2, 2, 4, 316, 3, 2, 2, 2, 6, 331, + 3, 2, 2, 2, 8, 333, 3, 2, 2, 2, 10, 337, 3, 2, 2, 2, 12, 349, 3, 2, 2, + 2, 14, 354, 3, 2, 2, 2, 16, 357, 3, 2, 2, 2, 18, 362, 3, 2, 2, 2, 20, 367, + 3, 2, 2, 2, 22, 372, 3, 2, 2, 2, 24, 378, 3, 2, 2, 2, 26, 382, 3, 2, 2, + 2, 28, 385, 3, 2, 2, 2, 30, 390, 3, 2, 2, 2, 32, 394, 3, 2, 2, 2, 34, 409, + 3, 2, 2, 2, 36, 416, 3, 2, 2, 2, 38, 426, 3, 2, 2, 2, 40, 447, 3, 2, 2, + 2, 42, 487, 3, 2, 2, 2, 44, 515, 3, 2, 2, 2, 46, 531, 3, 2, 2, 2, 48, 546, + 3, 2, 2, 2, 50, 553, 3, 2, 2, 2, 52, 586, 3, 2, 2, 2, 54, 590, 3, 2, 2, + 2, 56, 595, 3, 2, 2, 2, 58, 597, 3, 2, 2, 2, 60, 599, 3, 2, 2, 2, 62, 609, + 3, 2, 2, 2, 64, 617, 3, 2, 2, 2, 66, 619, 3, 2, 2, 2, 68, 621, 3, 2, 2, + 2, 70, 641, 3, 2, 2, 2, 72, 646, 3, 2, 2, 2, 74, 648, 3, 2, 2, 2, 76, 655, + 3, 2, 2, 2, 78, 667, 3, 2, 2, 2, 80, 672, 3, 2, 2, 2, 82, 676, 3, 2, 2, + 2, 84, 680, 3, 2, 2, 2, 86, 682, 3, 2, 2, 2, 88, 706, 3, 2, 2, 2, 90, 708, + 3, 2, 2, 2, 92, 711, 3, 2, 2, 2, 94, 721, 3, 2, 2, 2, 96, 729, 3, 2, 2, + 2, 98, 740, 3, 2, 2, 2, 100, 743, 3, 2, 2, 2, 102, 758, 3, 2, 2, 2, 104, + 760, 3, 2, 2, 2, 106, 773, 3, 2, 2, 2, 108, 780, 3, 2, 2, 2, 110, 783, + 3, 2, 2, 2, 112, 786, 3, 2, 2, 2, 114, 800, 3, 2, 2, 2, 116, 802, 3, 2, + 2, 2, 118, 820, 3, 2, 2, 2, 120, 822, 3, 2, 2, 2, 122, 829, 3, 2, 2, 2, + 124, 835, 3, 2, 2, 2, 126, 841, 3, 2, 2, 2, 128, 845, 3, 2, 2, 2, 130, + 849, 3, 2, 2, 2, 132, 851, 3, 2, 2, 2, 134, 867, 3, 2, 2, 2, 136, 870, + 3, 2, 2, 2, 138, 872, 3, 2, 2, 2, 140, 889, 3, 2, 2, 2, 142, 892, 3, 2, + 2, 2, 144, 903, 3, 2, 2, 2, 146, 905, 3, 2, 2, 2, 148, 907, 3, 2, 2, 2, + 150, 915, 3, 2, 2, 2, 152, 923, 3, 2, 2, 2, 154, 928, 3, 2, 2, 2, 156, + 930, 3, 2, 2, 2, 158, 946, 3, 2, 2, 2, 160, 961, 3, 2, 2, 2, 162, 963, + 3, 2, 2, 2, 164, 969, 3, 2, 2, 2, 166, 990, 3, 2, 2, 2, 168, 992, 3, 2, + 2, 2, 170, 1004, 3, 2, 2, 2, 172, 1008, 3, 2, 2, 2, 174, 1020, 3, 2, 2, + 2, 176, 1022, 3, 2, 2, 2, 178, 1036, 3, 2, 2, 2, 180, 1069, 3, 2, 2, 2, + 182, 1071, 3, 2, 2, 2, 184, 1075, 3, 2, 2, 2, 186, 1079, 3, 2, 2, 2, 188, + 1098, 3, 2, 2, 2, 190, 1134, 3, 2, 2, 2, 192, 1136, 3, 2, 2, 2, 194, 1147, + 3, 2, 2, 2, 196, 1155, 3, 2, 2, 2, 198, 1159, 3, 2, 2, 2, 200, 1167, 3, + 2, 2, 2, 202, 1178, 3, 2, 2, 2, 204, 1183, 3, 2, 2, 2, 206, 1195, 3, 2, + 2, 2, 208, 1199, 3, 2, 2, 2, 210, 1201, 3, 2, 2, 2, 212, 1210, 3, 2, 2, + 2, 214, 1222, 3, 2, 2, 2, 216, 1224, 3, 2, 2, 2, 218, 1226, 3, 2, 2, 2, + 220, 1230, 3, 2, 2, 2, 222, 1232, 3, 2, 2, 2, 224, 1236, 3, 2, 2, 2, 226, + 1246, 3, 2, 2, 2, 228, 1252, 3, 2, 2, 2, 230, 1254, 3, 2, 2, 2, 232, 1256, + 3, 2, 2, 2, 234, 1277, 3, 2, 2, 2, 236, 1402, 3, 2, 2, 2, 238, 1404, 3, + 2, 2, 2, 240, 1415, 3, 2, 2, 2, 242, 1424, 3, 2, 2, 2, 244, 1469, 3, 2, + 2, 2, 246, 1475, 3, 2, 2, 2, 248, 1479, 3, 2, 2, 2, 250, 1482, 3, 2, 2, + 2, 252, 1491, 3, 2, 2, 2, 254, 1517, 3, 2, 2, 2, 256, 1519, 3, 2, 2, 2, + 258, 1528, 3, 2, 2, 2, 260, 1538, 3, 2, 2, 2, 262, 1556, 3, 2, 2, 2, 264, + 1560, 3, 2, 2, 2, 266, 1562, 3, 2, 2, 2, 268, 1588, 3, 2, 2, 2, 270, 1596, + 3, 2, 2, 2, 272, 1598, 3, 2, 2, 2, 274, 1606, 3, 2, 2, 2, 276, 1615, 3, + 2, 2, 2, 278, 1617, 3, 2, 2, 2, 280, 1626, 3, 2, 2, 2, 282, 1636, 3, 2, + 2, 2, 284, 1648, 3, 2, 2, 2, 286, 1653, 3, 2, 2, 2, 288, 1655, 3, 2, 2, + 2, 290, 1657, 3, 2, 2, 2, 292, 1659, 3, 2, 2, 2, 294, 1661, 3, 2, 2, 2, + 296, 1663, 3, 2, 2, 2, 298, 1667, 3, 2, 2, 2, 300, 1672, 3, 2, 2, 2, 302, + 1676, 3, 2, 2, 2, 304, 306, 5, 300, 151, 2, 305, 307, 5, 8, 5, 2, 306, + 305, 3, 2, 2, 2, 306, 307, 3, 2, 2, 2, 307, 309, 3, 2, 2, 2, 308, 310, + 5, 302, 152, 2, 309, 308, 3, 2, 2, 2, 309, 310, 3, 2, 2, 2, 310, 312, 3, + 2, 2, 2, 311, 313, 5, 4, 3, 2, 312, 311, 3, 2, 2, 2, 312, 313, 3, 2, 2, + 2, 313, 314, 3, 2, 2, 2, 314, 315, 7, 2, 2, 3, 315, 3, 3, 2, 2, 2, 316, + 322, 5, 6, 4, 2, 317, 318, 5, 302, 152, 2, 318, 319, 5, 6, 4, 2, 319, 321, + 3, 2, 2, 2, 320, 317, 3, 2, 2, 2, 321, 324, 3, 2, 2, 2, 322, 320, 3, 2, + 2, 2, 322, 323, 3, 2, 2, 2, 323, 326, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, + 325, 327, 5, 302, 152, 2, 326, 325, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, + 5, 3, 2, 2, 2, 328, 332, 5, 10, 6, 2, 329, 332, 5, 12, 7, 2, 330, 332, + 5, 190, 96, 2, 331, 328, 3, 2, 2, 2, 331, 329, 3, 2, 2, 2, 331, 330, 3, + 2, 2, 2, 332, 7, 3, 2, 2, 2, 333, 334, 5, 140, 71, 2, 334, 335, 7, 40, + 2, 2, 335, 336, 5, 104, 53, 2, 336, 9, 3, 2, 2, 2, 337, 338, 5, 140, 71, + 2, 338, 340, 7, 35, 2, 2, 339, 341, 7, 45, 2, 2, 340, 339, 3, 2, 2, 2, + 340, 341, 3, 2, 2, 2, 341, 342, 3, 2, 2, 2, 342, 347, 5, 104, 53, 2, 343, + 344, 7, 88, 2, 2, 344, 348, 7, 106, 2, 2, 345, 346, 7, 9, 2, 2, 346, 348, + 5, 292, 147, 2, 347, 343, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 347, 348, 3, + 2, 2, 2, 348, 11, 3, 2, 2, 2, 349, 350, 5, 20, 11, 2, 350, 351, 5, 40, + 21, 2, 351, 13, 3, 2, 2, 2, 352, 355, 5, 24, 13, 2, 353, 355, 9, 2, 2, + 2, 354, 352, 3, 2, 2, 2, 354, 353, 3, 2, 2, 2, 355, 15, 3, 2, 2, 2, 356, + 358, 5, 18, 10, 2, 357, 356, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 17, + 3, 2, 2, 2, 359, 360, 5, 14, 8, 2, 360, 361, 5, 300, 151, 2, 361, 363, + 3, 2, 2, 2, 362, 359, 3, 2, 2, 2, 363, 364, 3, 2, 2, 2, 364, 362, 3, 2, + 2, 2, 364, 365, 3, 2, 2, 2, 365, 19, 3, 2, 2, 2, 366, 368, 5, 22, 12, 2, + 367, 366, 3, 2, 2, 2, 367, 368, 3, 2, 2, 2, 368, 21, 3, 2, 2, 2, 369, 370, + 5, 24, 13, 2, 370, 371, 5, 300, 151, 2, 371, 373, 3, 2, 2, 2, 372, 369, + 3, 2, 2, 2, 373, 374, 3, 2, 2, 2, 374, 372, 3, 2, 2, 2, 374, 375, 3, 2, + 2, 2, 375, 23, 3, 2, 2, 2, 376, 379, 5, 142, 72, 2, 377, 379, 9, 3, 2, + 2, 378, 376, 3, 2, 2, 2, 378, 377, 3, 2, 2, 2, 379, 25, 3, 2, 2, 2, 380, + 383, 5, 142, 72, 2, 381, 383, 9, 4, 2, 2, 382, 380, 3, 2, 2, 2, 382, 381, + 3, 2, 2, 2, 383, 27, 3, 2, 2, 2, 384, 386, 5, 30, 16, 2, 385, 384, 3, 2, + 2, 2, 385, 386, 3, 2, 2, 2, 386, 29, 3, 2, 2, 2, 387, 388, 5, 26, 14, 2, + 388, 389, 5, 300, 151, 2, 389, 391, 3, 2, 2, 2, 390, 387, 3, 2, 2, 2, 391, + 392, 3, 2, 2, 2, 392, 390, 3, 2, 2, 2, 392, 393, 3, 2, 2, 2, 393, 31, 3, + 2, 2, 2, 394, 395, 7, 91, 2, 2, 395, 396, 5, 300, 151, 2, 396, 403, 5, + 34, 18, 2, 397, 398, 7, 87, 2, 2, 398, 399, 5, 300, 151, 2, 399, 400, 5, + 34, 18, 2, 400, 402, 3, 2, 2, 2, 401, 397, 3, 2, 2, 2, 402, 405, 3, 2, + 2, 2, 403, 401, 3, 2, 2, 2, 403, 404, 3, 2, 2, 2, 404, 406, 3, 2, 2, 2, + 405, 403, 3, 2, 2, 2, 406, 407, 5, 300, 151, 2, 407, 408, 7, 90, 2, 2, + 408, 33, 3, 2, 2, 2, 409, 414, 5, 290, 146, 2, 410, 411, 7, 28, 2, 2, 411, + 412, 5, 300, 151, 2, 412, 413, 5, 36, 19, 2, 413, 415, 3, 2, 2, 2, 414, + 410, 3, 2, 2, 2, 414, 415, 3, 2, 2, 2, 415, 35, 3, 2, 2, 2, 416, 423, 5, + 76, 39, 2, 417, 418, 7, 108, 2, 2, 418, 419, 5, 300, 151, 2, 419, 420, + 5, 76, 39, 2, 420, 422, 3, 2, 2, 2, 421, 417, 3, 2, 2, 2, 422, 425, 3, + 2, 2, 2, 423, 421, 3, 2, 2, 2, 423, 424, 3, 2, 2, 2, 424, 37, 3, 2, 2, + 2, 425, 423, 3, 2, 2, 2, 426, 433, 5, 76, 39, 2, 427, 428, 7, 87, 2, 2, + 428, 429, 5, 300, 151, 2, 429, 430, 5, 76, 39, 2, 430, 432, 3, 2, 2, 2, + 431, 427, 3, 2, 2, 2, 432, 435, 3, 2, 2, 2, 433, 431, 3, 2, 2, 2, 433, + 434, 3, 2, 2, 2, 434, 39, 3, 2, 2, 2, 435, 433, 3, 2, 2, 2, 436, 437, 7, + 21, 2, 2, 437, 448, 8, 21, 1, 2, 438, 439, 7, 37, 2, 2, 439, 448, 8, 21, + 1, 2, 440, 441, 7, 27, 2, 2, 441, 448, 8, 21, 1, 2, 442, 443, 7, 126, 2, + 2, 443, 444, 7, 37, 2, 2, 444, 448, 8, 21, 1, 2, 445, 446, 7, 12, 2, 2, + 446, 448, 8, 21, 1, 2, 447, 436, 3, 2, 2, 2, 447, 438, 3, 2, 2, 2, 447, + 440, 3, 2, 2, 2, 447, 442, 3, 2, 2, 2, 447, 445, 3, 2, 2, 2, 448, 449, + 3, 2, 2, 2, 449, 450, 5, 292, 147, 2, 450, 483, 5, 300, 151, 2, 451, 453, + 6, 21, 2, 3, 452, 454, 5, 32, 17, 2, 453, 452, 3, 2, 2, 2, 453, 454, 3, + 2, 2, 2, 454, 455, 3, 2, 2, 2, 455, 469, 5, 300, 151, 2, 456, 466, 6, 21, + 3, 3, 457, 458, 7, 28, 2, 2, 458, 462, 5, 300, 151, 2, 459, 460, 6, 21, + 4, 3, 460, 463, 5, 38, 20, 2, 461, 463, 5, 76, 39, 2, 462, 459, 3, 2, 2, + 2, 462, 461, 3, 2, 2, 2, 463, 464, 3, 2, 2, 2, 464, 465, 5, 300, 151, 2, + 465, 467, 3, 2, 2, 2, 466, 457, 3, 2, 2, 2, 466, 467, 3, 2, 2, 2, 467, + 470, 3, 2, 2, 2, 468, 470, 3, 2, 2, 2, 469, 456, 3, 2, 2, 2, 469, 468, + 3, 2, 2, 2, 470, 480, 3, 2, 2, 2, 471, 477, 6, 21, 5, 3, 472, 473, 7, 34, + 2, 2, 473, 474, 5, 300, 151, 2, 474, 475, 5, 38, 20, 2, 475, 476, 5, 300, + 151, 2, 476, 478, 3, 2, 2, 2, 477, 472, 3, 2, 2, 2, 477, 478, 3, 2, 2, + 2, 478, 481, 3, 2, 2, 2, 479, 481, 3, 2, 2, 2, 480, 471, 3, 2, 2, 2, 480, + 479, 3, 2, 2, 2, 481, 484, 3, 2, 2, 2, 482, 484, 3, 2, 2, 2, 483, 451, + 3, 2, 2, 2, 483, 482, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 486, 5, 42, + 22, 2, 486, 41, 3, 2, 2, 2, 487, 488, 7, 82, 2, 2, 488, 497, 5, 300, 151, + 2, 489, 491, 6, 22, 6, 3, 490, 492, 5, 44, 23, 2, 491, 490, 3, 2, 2, 2, + 491, 492, 3, 2, 2, 2, 492, 494, 3, 2, 2, 2, 493, 495, 5, 302, 152, 2, 494, + 493, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 498, 3, 2, 2, 2, 496, 498, + 3, 2, 2, 2, 497, 489, 3, 2, 2, 2, 497, 496, 3, 2, 2, 2, 498, 500, 3, 2, + 2, 2, 499, 501, 5, 48, 25, 2, 500, 499, 3, 2, 2, 2, 500, 501, 3, 2, 2, + 2, 501, 507, 3, 2, 2, 2, 502, 503, 5, 302, 152, 2, 503, 504, 5, 48, 25, + 2, 504, 506, 3, 2, 2, 2, 505, 502, 3, 2, 2, 2, 506, 509, 3, 2, 2, 2, 507, + 505, 3, 2, 2, 2, 507, 508, 3, 2, 2, 2, 508, 511, 3, 2, 2, 2, 509, 507, + 3, 2, 2, 2, 510, 512, 5, 302, 152, 2, 511, 510, 3, 2, 2, 2, 511, 512, 3, + 2, 2, 2, 512, 513, 3, 2, 2, 2, 513, 514, 7, 83, 2, 2, 514, 43, 3, 2, 2, + 2, 515, 523, 5, 46, 24, 2, 516, 517, 5, 300, 151, 2, 517, 518, 7, 87, 2, + 2, 518, 519, 5, 300, 151, 2, 519, 520, 5, 46, 24, 2, 520, 522, 3, 2, 2, + 2, 521, 516, 3, 2, 2, 2, 522, 525, 3, 2, 2, 2, 523, 521, 3, 2, 2, 2, 523, + 524, 3, 2, 2, 2, 524, 529, 3, 2, 2, 2, 525, 523, 3, 2, 2, 2, 526, 527, + 5, 300, 151, 2, 527, 528, 7, 87, 2, 2, 528, 530, 3, 2, 2, 2, 529, 526, + 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 45, 3, 2, 2, 2, 531, 532, 5, 140, + 71, 2, 532, 534, 5, 292, 147, 2, 533, 535, 5, 278, 140, 2, 534, 533, 3, + 2, 2, 2, 534, 535, 3, 2, 2, 2, 535, 537, 3, 2, 2, 2, 536, 538, 5, 270, + 136, 2, 537, 536, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 47, 3, 2, 2, 2, + 539, 547, 7, 86, 2, 2, 540, 541, 7, 45, 2, 2, 541, 543, 5, 300, 151, 2, + 542, 540, 3, 2, 2, 2, 542, 543, 3, 2, 2, 2, 543, 544, 3, 2, 2, 2, 544, + 547, 5, 158, 80, 2, 545, 547, 5, 50, 26, 2, 546, 539, 3, 2, 2, 2, 546, + 542, 3, 2, 2, 2, 546, 545, 3, 2, 2, 2, 547, 49, 3, 2, 2, 2, 548, 554, 5, + 52, 27, 2, 549, 554, 5, 58, 30, 2, 550, 551, 5, 16, 9, 2, 551, 552, 5, + 40, 21, 2, 552, 554, 3, 2, 2, 2, 553, 548, 3, 2, 2, 2, 553, 549, 3, 2, + 2, 2, 553, 550, 3, 2, 2, 2, 554, 51, 3, 2, 2, 2, 555, 556, 6, 27, 7, 3, + 556, 557, 5, 56, 29, 2, 557, 558, 5, 54, 28, 2, 558, 559, 7, 80, 2, 2, + 559, 564, 5, 298, 150, 2, 560, 561, 7, 24, 2, 2, 561, 562, 5, 300, 151, + 2, 562, 563, 5, 154, 78, 2, 563, 565, 3, 2, 2, 2, 564, 560, 3, 2, 2, 2, + 564, 565, 3, 2, 2, 2, 565, 587, 3, 2, 2, 2, 566, 568, 5, 16, 9, 2, 567, + 569, 5, 32, 17, 2, 568, 567, 3, 2, 2, 2, 568, 569, 3, 2, 2, 2, 569, 571, + 3, 2, 2, 2, 570, 572, 5, 56, 29, 2, 571, 570, 3, 2, 2, 2, 571, 572, 3, + 2, 2, 2, 572, 573, 3, 2, 2, 2, 573, 574, 5, 54, 28, 2, 574, 580, 5, 94, + 48, 2, 575, 576, 5, 300, 151, 2, 576, 577, 7, 52, 2, 2, 577, 578, 5, 300, + 151, 2, 578, 579, 5, 92, 47, 2, 579, 581, 3, 2, 2, 2, 580, 575, 3, 2, 2, + 2, 580, 581, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 584, 5, 300, 151, 2, + 583, 585, 5, 102, 52, 2, 584, 583, 3, 2, 2, 2, 584, 585, 3, 2, 2, 2, 585, + 587, 3, 2, 2, 2, 586, 555, 3, 2, 2, 2, 586, 566, 3, 2, 2, 2, 587, 53, 3, + 2, 2, 2, 588, 591, 5, 292, 147, 2, 589, 591, 5, 288, 145, 2, 590, 588, + 3, 2, 2, 2, 590, 589, 3, 2, 2, 2, 591, 55, 3, 2, 2, 2, 592, 596, 5, 74, + 38, 2, 593, 594, 6, 29, 8, 3, 594, 596, 7, 55, 2, 2, 595, 592, 3, 2, 2, + 2, 595, 593, 3, 2, 2, 2, 596, 57, 3, 2, 2, 2, 597, 598, 5, 166, 84, 2, + 598, 59, 3, 2, 2, 2, 599, 606, 5, 62, 32, 2, 600, 601, 7, 87, 2, 2, 601, + 602, 5, 300, 151, 2, 602, 603, 5, 62, 32, 2, 603, 605, 3, 2, 2, 2, 604, + 600, 3, 2, 2, 2, 605, 608, 3, 2, 2, 2, 606, 604, 3, 2, 2, 2, 606, 607, + 3, 2, 2, 2, 607, 61, 3, 2, 2, 2, 608, 606, 3, 2, 2, 2, 609, 615, 5, 64, + 33, 2, 610, 611, 5, 300, 151, 2, 611, 612, 7, 89, 2, 2, 612, 613, 5, 300, + 151, 2, 613, 614, 5, 66, 34, 2, 614, 616, 3, 2, 2, 2, 615, 610, 3, 2, 2, + 2, 615, 616, 3, 2, 2, 2, 616, 63, 3, 2, 2, 2, 617, 618, 5, 292, 147, 2, + 618, 65, 3, 2, 2, 2, 619, 620, 5, 228, 115, 2, 620, 67, 3, 2, 2, 2, 621, + 622, 5, 66, 34, 2, 622, 630, 5, 300, 151, 2, 623, 624, 7, 87, 2, 2, 624, + 625, 5, 300, 151, 2, 625, 626, 5, 66, 34, 2, 626, 627, 5, 300, 151, 2, + 627, 629, 3, 2, 2, 2, 628, 623, 3, 2, 2, 2, 629, 632, 3, 2, 2, 2, 630, + 628, 3, 2, 2, 2, 630, 631, 3, 2, 2, 2, 631, 633, 3, 2, 2, 2, 632, 630, + 3, 2, 2, 2, 633, 635, 5, 300, 151, 2, 634, 636, 7, 87, 2, 2, 635, 634, + 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 69, 3, 2, 2, 2, 637, 638, 5, 140, + 71, 2, 638, 639, 7, 84, 2, 2, 639, 640, 7, 85, 2, 2, 640, 642, 3, 2, 2, + 2, 641, 637, 3, 2, 2, 2, 642, 643, 3, 2, 2, 2, 643, 641, 3, 2, 2, 2, 643, + 644, 3, 2, 2, 2, 644, 71, 3, 2, 2, 2, 645, 647, 5, 70, 36, 2, 646, 645, + 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 73, 3, 2, 2, 2, 648, 651, 5, 140, + 71, 2, 649, 652, 5, 84, 43, 2, 650, 652, 5, 82, 42, 2, 651, 649, 3, 2, + 2, 2, 651, 650, 3, 2, 2, 2, 652, 653, 3, 2, 2, 2, 653, 654, 5, 72, 37, + 2, 654, 75, 3, 2, 2, 2, 655, 661, 5, 140, 71, 2, 656, 659, 5, 84, 43, 2, + 657, 659, 7, 55, 2, 2, 658, 656, 3, 2, 2, 2, 658, 657, 3, 2, 2, 2, 659, + 662, 3, 2, 2, 2, 660, 662, 5, 80, 41, 2, 661, 658, 3, 2, 2, 2, 661, 660, + 3, 2, 2, 2, 662, 663, 3, 2, 2, 2, 663, 664, 5, 72, 37, 2, 664, 77, 3, 2, + 2, 2, 665, 668, 5, 110, 56, 2, 666, 668, 5, 112, 57, 2, 667, 665, 3, 2, + 2, 2, 667, 666, 3, 2, 2, 2, 668, 670, 3, 2, 2, 2, 669, 671, 5, 86, 44, + 2, 670, 669, 3, 2, 2, 2, 670, 671, 3, 2, 2, 2, 671, 79, 3, 2, 2, 2, 672, + 674, 5, 110, 56, 2, 673, 675, 5, 86, 44, 2, 674, 673, 3, 2, 2, 2, 674, + 675, 3, 2, 2, 2, 675, 81, 3, 2, 2, 2, 676, 678, 5, 112, 57, 2, 677, 679, + 5, 86, 44, 2, 678, 677, 3, 2, 2, 2, 678, 679, 3, 2, 2, 2, 679, 83, 3, 2, + 2, 2, 680, 681, 7, 15, 2, 2, 681, 85, 3, 2, 2, 2, 682, 683, 7, 91, 2, 2, + 683, 684, 5, 300, 151, 2, 684, 691, 5, 88, 45, 2, 685, 686, 7, 87, 2, 2, + 686, 687, 5, 300, 151, 2, 687, 688, 5, 88, 45, 2, 688, 690, 3, 2, 2, 2, + 689, 685, 3, 2, 2, 2, 690, 693, 3, 2, 2, 2, 691, 689, 3, 2, 2, 2, 691, + 692, 3, 2, 2, 2, 692, 694, 3, 2, 2, 2, 693, 691, 3, 2, 2, 2, 694, 695, + 5, 300, 151, 2, 695, 696, 7, 90, 2, 2, 696, 87, 3, 2, 2, 2, 697, 707, 5, + 76, 39, 2, 698, 699, 5, 140, 71, 2, 699, 704, 7, 94, 2, 2, 700, 701, 9, + 5, 2, 2, 701, 702, 5, 300, 151, 2, 702, 703, 5, 76, 39, 2, 703, 705, 3, + 2, 2, 2, 704, 700, 3, 2, 2, 2, 704, 705, 3, 2, 2, 2, 705, 707, 3, 2, 2, + 2, 706, 697, 3, 2, 2, 2, 706, 698, 3, 2, 2, 2, 707, 89, 3, 2, 2, 2, 708, + 709, 5, 140, 71, 2, 709, 710, 5, 110, 56, 2, 710, 91, 3, 2, 2, 2, 711, + 718, 5, 90, 46, 2, 712, 713, 7, 87, 2, 2, 713, 714, 5, 300, 151, 2, 714, + 715, 5, 90, 46, 2, 715, 717, 3, 2, 2, 2, 716, 712, 3, 2, 2, 2, 717, 720, + 3, 2, 2, 2, 718, 716, 3, 2, 2, 2, 718, 719, 3, 2, 2, 2, 719, 93, 3, 2, + 2, 2, 720, 718, 3, 2, 2, 2, 721, 723, 7, 80, 2, 2, 722, 724, 5, 96, 49, + 2, 723, 722, 3, 2, 2, 2, 723, 724, 3, 2, 2, 2, 724, 725, 3, 2, 2, 2, 725, + 726, 5, 298, 150, 2, 726, 95, 3, 2, 2, 2, 727, 730, 5, 100, 51, 2, 728, + 730, 5, 98, 50, 2, 729, 727, 3, 2, 2, 2, 729, 728, 3, 2, 2, 2, 730, 737, + 3, 2, 2, 2, 731, 732, 7, 87, 2, 2, 732, 733, 5, 300, 151, 2, 733, 734, + 5, 100, 51, 2, 734, 736, 3, 2, 2, 2, 735, 731, 3, 2, 2, 2, 736, 739, 3, + 2, 2, 2, 737, 735, 3, 2, 2, 2, 737, 738, 3, 2, 2, 2, 738, 97, 3, 2, 2, + 2, 739, 737, 3, 2, 2, 2, 740, 741, 5, 76, 39, 2, 741, 742, 7, 50, 2, 2, + 742, 99, 3, 2, 2, 2, 743, 745, 5, 28, 15, 2, 744, 746, 5, 76, 39, 2, 745, + 744, 3, 2, 2, 2, 745, 746, 3, 2, 2, 2, 746, 748, 3, 2, 2, 2, 747, 749, + 7, 127, 2, 2, 748, 747, 3, 2, 2, 2, 748, 749, 3, 2, 2, 2, 749, 750, 3, + 2, 2, 2, 750, 756, 5, 64, 33, 2, 751, 752, 5, 300, 151, 2, 752, 753, 7, + 89, 2, 2, 753, 754, 5, 300, 151, 2, 754, 755, 5, 234, 118, 2, 755, 757, + 3, 2, 2, 2, 756, 751, 3, 2, 2, 2, 756, 757, 3, 2, 2, 2, 757, 101, 3, 2, + 2, 2, 758, 759, 5, 158, 80, 2, 759, 103, 3, 2, 2, 2, 760, 765, 5, 106, + 54, 2, 761, 762, 7, 88, 2, 2, 762, 764, 5, 106, 54, 2, 763, 761, 3, 2, + 2, 2, 764, 767, 3, 2, 2, 2, 765, 763, 3, 2, 2, 2, 765, 766, 3, 2, 2, 2, + 766, 105, 3, 2, 2, 2, 767, 765, 3, 2, 2, 2, 768, 774, 5, 292, 147, 2, 769, + 774, 7, 10, 2, 2, 770, 774, 7, 11, 2, 2, 771, 774, 7, 9, 2, 2, 772, 774, + 7, 12, 2, 2, 773, 768, 3, 2, 2, 2, 773, 769, 3, 2, 2, 2, 773, 770, 3, 2, + 2, 2, 773, 771, 3, 2, 2, 2, 773, 772, 3, 2, 2, 2, 774, 107, 3, 2, 2, 2, + 775, 776, 5, 106, 54, 2, 776, 777, 7, 88, 2, 2, 777, 779, 3, 2, 2, 2, 778, + 775, 3, 2, 2, 2, 779, 782, 3, 2, 2, 2, 780, 778, 3, 2, 2, 2, 780, 781, + 3, 2, 2, 2, 781, 109, 3, 2, 2, 2, 782, 780, 3, 2, 2, 2, 783, 784, 5, 108, + 55, 2, 784, 785, 5, 292, 147, 2, 785, 111, 3, 2, 2, 2, 786, 787, 5, 108, + 55, 2, 787, 792, 5, 290, 146, 2, 788, 789, 7, 88, 2, 2, 789, 791, 5, 290, + 146, 2, 790, 788, 3, 2, 2, 2, 791, 794, 3, 2, 2, 2, 792, 790, 3, 2, 2, + 2, 792, 793, 3, 2, 2, 2, 793, 113, 3, 2, 2, 2, 794, 792, 3, 2, 2, 2, 795, + 801, 7, 58, 2, 2, 796, 801, 7, 59, 2, 2, 797, 801, 5, 288, 145, 2, 798, + 801, 7, 60, 2, 2, 799, 801, 7, 61, 2, 2, 800, 795, 3, 2, 2, 2, 800, 796, + 3, 2, 2, 2, 800, 797, 3, 2, 2, 2, 800, 798, 3, 2, 2, 2, 800, 799, 3, 2, + 2, 2, 801, 115, 3, 2, 2, 2, 802, 803, 7, 4, 2, 2, 803, 808, 5, 118, 60, + 2, 804, 805, 7, 6, 2, 2, 805, 807, 5, 118, 60, 2, 806, 804, 3, 2, 2, 2, + 807, 810, 3, 2, 2, 2, 808, 806, 3, 2, 2, 2, 808, 809, 3, 2, 2, 2, 809, + 811, 3, 2, 2, 2, 810, 808, 3, 2, 2, 2, 811, 812, 7, 5, 2, 2, 812, 117, + 3, 2, 2, 2, 813, 821, 5, 120, 61, 2, 814, 816, 7, 82, 2, 2, 815, 817, 5, + 230, 116, 2, 816, 815, 3, 2, 2, 2, 816, 817, 3, 2, 2, 2, 817, 818, 3, 2, + 2, 2, 818, 821, 7, 83, 2, 2, 819, 821, 5, 132, 67, 2, 820, 813, 3, 2, 2, + 2, 820, 814, 3, 2, 2, 2, 820, 819, 3, 2, 2, 2, 821, 119, 3, 2, 2, 2, 822, + 826, 5, 292, 147, 2, 823, 825, 7, 7, 2, 2, 824, 823, 3, 2, 2, 2, 825, 828, + 3, 2, 2, 2, 826, 824, 3, 2, 2, 2, 826, 827, 3, 2, 2, 2, 827, 121, 3, 2, + 2, 2, 828, 826, 3, 2, 2, 2, 829, 830, 5, 126, 64, 2, 830, 831, 5, 300, + 151, 2, 831, 832, 7, 77, 2, 2, 832, 833, 5, 300, 151, 2, 833, 834, 5, 130, + 66, 2, 834, 123, 3, 2, 2, 2, 835, 836, 5, 128, 65, 2, 836, 837, 5, 300, + 151, 2, 837, 838, 7, 77, 2, 2, 838, 839, 5, 300, 151, 2, 839, 840, 5, 130, + 66, 2, 840, 125, 3, 2, 2, 2, 841, 842, 5, 94, 48, 2, 842, 127, 3, 2, 2, + 2, 843, 846, 5, 94, 48, 2, 844, 846, 5, 64, 33, 2, 845, 843, 3, 2, 2, 2, + 845, 844, 3, 2, 2, 2, 846, 129, 3, 2, 2, 2, 847, 850, 5, 158, 80, 2, 848, + 850, 5, 230, 116, 2, 849, 847, 3, 2, 2, 2, 849, 848, 3, 2, 2, 2, 850, 131, + 3, 2, 2, 2, 851, 852, 7, 82, 2, 2, 852, 860, 5, 300, 151, 2, 853, 855, + 5, 96, 49, 2, 854, 853, 3, 2, 2, 2, 854, 855, 3, 2, 2, 2, 855, 856, 3, + 2, 2, 2, 856, 857, 5, 300, 151, 2, 857, 858, 7, 77, 2, 2, 858, 859, 5, + 300, 151, 2, 859, 861, 3, 2, 2, 2, 860, 854, 3, 2, 2, 2, 860, 861, 3, 2, + 2, 2, 861, 862, 3, 2, 2, 2, 862, 863, 5, 136, 69, 2, 863, 864, 7, 83, 2, + 2, 864, 133, 3, 2, 2, 2, 865, 868, 5, 132, 67, 2, 866, 868, 5, 122, 62, + 2, 867, 865, 3, 2, 2, 2, 867, 866, 3, 2, 2, 2, 868, 135, 3, 2, 2, 2, 869, + 871, 5, 138, 70, 2, 870, 869, 3, 2, 2, 2, 870, 871, 3, 2, 2, 2, 871, 137, + 3, 2, 2, 2, 872, 878, 5, 160, 81, 2, 873, 874, 5, 302, 152, 2, 874, 875, + 5, 160, 81, 2, 875, 877, 3, 2, 2, 2, 876, 873, 3, 2, 2, 2, 877, 880, 3, + 2, 2, 2, 878, 876, 3, 2, 2, 2, 878, 879, 3, 2, 2, 2, 879, 882, 3, 2, 2, + 2, 880, 878, 3, 2, 2, 2, 881, 883, 5, 302, 152, 2, 882, 881, 3, 2, 2, 2, + 882, 883, 3, 2, 2, 2, 883, 139, 3, 2, 2, 2, 884, 885, 5, 142, 72, 2, 885, + 886, 5, 300, 151, 2, 886, 888, 3, 2, 2, 2, 887, 884, 3, 2, 2, 2, 888, 891, + 3, 2, 2, 2, 889, 887, 3, 2, 2, 2, 889, 890, 3, 2, 2, 2, 890, 141, 3, 2, + 2, 2, 891, 889, 3, 2, 2, 2, 892, 893, 7, 126, 2, 2, 893, 899, 5, 146, 74, + 2, 894, 896, 7, 80, 2, 2, 895, 897, 5, 144, 73, 2, 896, 895, 3, 2, 2, 2, + 896, 897, 3, 2, 2, 2, 897, 898, 3, 2, 2, 2, 898, 900, 5, 298, 150, 2, 899, + 894, 3, 2, 2, 2, 899, 900, 3, 2, 2, 2, 900, 143, 3, 2, 2, 2, 901, 904, + 5, 148, 75, 2, 902, 904, 5, 154, 78, 2, 903, 901, 3, 2, 2, 2, 903, 902, + 3, 2, 2, 2, 904, 145, 3, 2, 2, 2, 905, 906, 5, 110, 56, 2, 906, 147, 3, + 2, 2, 2, 907, 912, 5, 150, 76, 2, 908, 909, 7, 87, 2, 2, 909, 911, 5, 150, + 76, 2, 910, 908, 3, 2, 2, 2, 911, 914, 3, 2, 2, 2, 912, 910, 3, 2, 2, 2, + 912, 913, 3, 2, 2, 2, 913, 149, 3, 2, 2, 2, 914, 912, 3, 2, 2, 2, 915, + 916, 5, 152, 77, 2, 916, 917, 5, 300, 151, 2, 917, 918, 7, 89, 2, 2, 918, + 919, 5, 300, 151, 2, 919, 920, 5, 154, 78, 2, 920, 151, 3, 2, 2, 2, 921, + 924, 5, 292, 147, 2, 922, 924, 5, 296, 149, 2, 923, 921, 3, 2, 2, 2, 923, + 922, 3, 2, 2, 2, 924, 153, 3, 2, 2, 2, 925, 929, 5, 156, 79, 2, 926, 929, + 5, 142, 72, 2, 927, 929, 5, 234, 118, 2, 928, 925, 3, 2, 2, 2, 928, 926, + 3, 2, 2, 2, 928, 927, 3, 2, 2, 2, 929, 155, 3, 2, 2, 2, 930, 939, 7, 84, + 2, 2, 931, 936, 5, 154, 78, 2, 932, 933, 7, 87, 2, 2, 933, 935, 5, 154, + 78, 2, 934, 932, 3, 2, 2, 2, 935, 938, 3, 2, 2, 2, 936, 934, 3, 2, 2, 2, + 936, 937, 3, 2, 2, 2, 937, 940, 3, 2, 2, 2, 938, 936, 3, 2, 2, 2, 939, + 931, 3, 2, 2, 2, 939, 940, 3, 2, 2, 2, 940, 942, 3, 2, 2, 2, 941, 943, + 7, 87, 2, 2, 942, 941, 3, 2, 2, 2, 942, 943, 3, 2, 2, 2, 943, 944, 3, 2, + 2, 2, 944, 945, 7, 85, 2, 2, 945, 157, 3, 2, 2, 2, 946, 954, 7, 82, 2, + 2, 947, 955, 5, 300, 151, 2, 948, 950, 5, 302, 152, 2, 949, 948, 3, 2, + 2, 2, 950, 953, 3, 2, 2, 2, 951, 949, 3, 2, 2, 2, 951, 952, 3, 2, 2, 2, + 952, 955, 3, 2, 2, 2, 953, 951, 3, 2, 2, 2, 954, 947, 3, 2, 2, 2, 954, + 951, 3, 2, 2, 2, 955, 956, 3, 2, 2, 2, 956, 957, 5, 136, 69, 2, 957, 958, + 7, 83, 2, 2, 958, 159, 3, 2, 2, 2, 959, 962, 5, 162, 82, 2, 960, 962, 5, + 190, 96, 2, 961, 959, 3, 2, 2, 2, 961, 960, 3, 2, 2, 2, 962, 161, 3, 2, + 2, 2, 963, 964, 5, 166, 84, 2, 964, 163, 3, 2, 2, 2, 965, 966, 6, 83, 9, + 3, 966, 970, 5, 30, 16, 2, 967, 968, 6, 83, 10, 3, 968, 970, 5, 18, 10, + 2, 969, 965, 3, 2, 2, 2, 969, 967, 3, 2, 2, 2, 970, 165, 3, 2, 2, 2, 971, + 982, 5, 164, 83, 2, 972, 974, 5, 76, 39, 2, 973, 972, 3, 2, 2, 2, 973, + 974, 3, 2, 2, 2, 974, 975, 3, 2, 2, 2, 975, 983, 5, 60, 31, 2, 976, 977, + 5, 168, 85, 2, 977, 978, 5, 300, 151, 2, 978, 979, 7, 89, 2, 2, 979, 980, + 5, 300, 151, 2, 980, 981, 5, 66, 34, 2, 981, 983, 3, 2, 2, 2, 982, 973, + 3, 2, 2, 2, 982, 976, 3, 2, 2, 2, 983, 991, 3, 2, 2, 2, 984, 986, 5, 164, + 83, 2, 985, 984, 3, 2, 2, 2, 985, 986, 3, 2, 2, 2, 986, 987, 3, 2, 2, 2, + 987, 988, 5, 76, 39, 2, 988, 989, 5, 60, 31, 2, 989, 991, 3, 2, 2, 2, 990, + 971, 3, 2, 2, 2, 990, 985, 3, 2, 2, 2, 991, 167, 3, 2, 2, 2, 992, 993, + 7, 80, 2, 2, 993, 998, 5, 170, 86, 2, 994, 995, 7, 87, 2, 2, 995, 997, + 5, 170, 86, 2, 996, 994, 3, 2, 2, 2, 997, 1000, 3, 2, 2, 2, 998, 996, 3, + 2, 2, 2, 998, 999, 3, 2, 2, 2, 999, 1001, 3, 2, 2, 2, 1000, 998, 3, 2, + 2, 2, 1001, 1002, 5, 298, 150, 2, 1002, 169, 3, 2, 2, 2, 1003, 1005, 5, + 76, 39, 2, 1004, 1003, 3, 2, 2, 2, 1004, 1005, 3, 2, 2, 2, 1005, 1006, + 3, 2, 2, 2, 1006, 1007, 5, 64, 33, 2, 1007, 171, 3, 2, 2, 2, 1008, 1009, + 7, 80, 2, 2, 1009, 1012, 5, 64, 33, 2, 1010, 1011, 7, 87, 2, 2, 1011, 1013, + 5, 64, 33, 2, 1012, 1010, 3, 2, 2, 2, 1013, 1014, 3, 2, 2, 2, 1014, 1012, + 3, 2, 2, 2, 1014, 1015, 3, 2, 2, 2, 1015, 1016, 3, 2, 2, 2, 1016, 1017, + 5, 298, 150, 2, 1017, 173, 3, 2, 2, 2, 1018, 1021, 5, 176, 89, 2, 1019, + 1021, 5, 178, 90, 2, 1020, 1018, 3, 2, 2, 2, 1020, 1019, 3, 2, 2, 2, 1021, + 175, 3, 2, 2, 2, 1022, 1023, 7, 32, 2, 2, 1023, 1024, 5, 222, 112, 2, 1024, + 1025, 5, 300, 151, 2, 1025, 1034, 5, 190, 96, 2, 1026, 1029, 5, 300, 151, + 2, 1027, 1029, 5, 302, 152, 2, 1028, 1026, 3, 2, 2, 2, 1028, 1027, 3, 2, + 2, 2, 1029, 1030, 3, 2, 2, 2, 1030, 1031, 7, 26, 2, 2, 1031, 1032, 5, 300, + 151, 2, 1032, 1033, 5, 190, 96, 2, 1033, 1035, 3, 2, 2, 2, 1034, 1028, + 3, 2, 2, 2, 1034, 1035, 3, 2, 2, 2, 1035, 177, 3, 2, 2, 2, 1036, 1037, + 7, 48, 2, 2, 1037, 1038, 5, 222, 112, 2, 1038, 1039, 5, 300, 151, 2, 1039, + 1040, 7, 82, 2, 2, 1040, 1044, 5, 300, 151, 2, 1041, 1043, 5, 204, 103, + 2, 1042, 1041, 3, 2, 2, 2, 1043, 1046, 3, 2, 2, 2, 1044, 1042, 3, 2, 2, + 2, 1044, 1045, 3, 2, 2, 2, 1045, 1047, 3, 2, 2, 2, 1046, 1044, 3, 2, 2, + 2, 1047, 1048, 5, 300, 151, 2, 1048, 1049, 7, 83, 2, 2, 1049, 179, 3, 2, + 2, 2, 1050, 1051, 7, 31, 2, 2, 1051, 1052, 7, 80, 2, 2, 1052, 1053, 5, + 208, 105, 2, 1053, 1054, 5, 298, 150, 2, 1054, 1055, 5, 300, 151, 2, 1055, + 1056, 5, 190, 96, 2, 1056, 1070, 3, 2, 2, 2, 1057, 1058, 7, 57, 2, 2, 1058, + 1059, 5, 222, 112, 2, 1059, 1060, 5, 300, 151, 2, 1060, 1061, 5, 190, 96, + 2, 1061, 1070, 3, 2, 2, 2, 1062, 1063, 7, 25, 2, 2, 1063, 1064, 5, 300, + 151, 2, 1064, 1065, 5, 190, 96, 2, 1065, 1066, 5, 300, 151, 2, 1066, 1067, + 7, 57, 2, 2, 1067, 1068, 5, 222, 112, 2, 1068, 1070, 3, 2, 2, 2, 1069, + 1050, 3, 2, 2, 2, 1069, 1057, 3, 2, 2, 2, 1069, 1062, 3, 2, 2, 2, 1070, + 181, 3, 2, 2, 2, 1071, 1073, 7, 23, 2, 2, 1072, 1074, 5, 292, 147, 2, 1073, + 1072, 3, 2, 2, 2, 1073, 1074, 3, 2, 2, 2, 1074, 183, 3, 2, 2, 2, 1075, + 1077, 7, 18, 2, 2, 1076, 1078, 5, 292, 147, 2, 1077, 1076, 3, 2, 2, 2, + 1077, 1078, 3, 2, 2, 2, 1078, 185, 3, 2, 2, 2, 1079, 1081, 7, 54, 2, 2, + 1080, 1082, 5, 198, 100, 2, 1081, 1080, 3, 2, 2, 2, 1081, 1082, 3, 2, 2, + 2, 1082, 1083, 3, 2, 2, 2, 1083, 1084, 5, 300, 151, 2, 1084, 1090, 5, 158, + 80, 2, 1085, 1086, 5, 300, 151, 2, 1086, 1087, 5, 192, 97, 2, 1087, 1089, + 3, 2, 2, 2, 1088, 1085, 3, 2, 2, 2, 1089, 1092, 3, 2, 2, 2, 1090, 1088, + 3, 2, 2, 2, 1090, 1091, 3, 2, 2, 2, 1091, 1096, 3, 2, 2, 2, 1092, 1090, + 3, 2, 2, 2, 1093, 1094, 5, 300, 151, 2, 1094, 1095, 5, 196, 99, 2, 1095, + 1097, 3, 2, 2, 2, 1096, 1093, 3, 2, 2, 2, 1096, 1097, 3, 2, 2, 2, 1097, + 187, 3, 2, 2, 2, 1098, 1099, 7, 17, 2, 2, 1099, 1105, 5, 234, 118, 2, 1100, + 1101, 5, 300, 151, 2, 1101, 1102, 9, 6, 2, 2, 1102, 1103, 5, 300, 151, + 2, 1103, 1104, 5, 234, 118, 2, 1104, 1106, 3, 2, 2, 2, 1105, 1100, 3, 2, + 2, 2, 1105, 1106, 3, 2, 2, 2, 1106, 189, 3, 2, 2, 2, 1107, 1135, 5, 158, + 80, 2, 1108, 1135, 5, 174, 88, 2, 1109, 1135, 5, 180, 91, 2, 1110, 1135, + 5, 186, 94, 2, 1111, 1112, 7, 49, 2, 2, 1112, 1113, 5, 222, 112, 2, 1113, + 1114, 5, 300, 151, 2, 1114, 1115, 5, 158, 80, 2, 1115, 1135, 3, 2, 2, 2, + 1116, 1118, 7, 44, 2, 2, 1117, 1119, 5, 234, 118, 2, 1118, 1117, 3, 2, + 2, 2, 1118, 1119, 3, 2, 2, 2, 1119, 1135, 3, 2, 2, 2, 1120, 1121, 7, 51, + 2, 2, 1121, 1135, 5, 234, 118, 2, 1122, 1135, 5, 184, 93, 2, 1123, 1135, + 5, 182, 92, 2, 1124, 1125, 5, 292, 147, 2, 1125, 1126, 7, 95, 2, 2, 1126, + 1127, 5, 300, 151, 2, 1127, 1128, 5, 190, 96, 2, 1128, 1135, 3, 2, 2, 2, + 1129, 1135, 5, 188, 95, 2, 1130, 1135, 5, 162, 82, 2, 1131, 1135, 5, 52, + 27, 2, 1132, 1135, 5, 230, 116, 2, 1133, 1135, 7, 86, 2, 2, 1134, 1107, + 3, 2, 2, 2, 1134, 1108, 3, 2, 2, 2, 1134, 1109, 3, 2, 2, 2, 1134, 1110, + 3, 2, 2, 2, 1134, 1111, 3, 2, 2, 2, 1134, 1116, 3, 2, 2, 2, 1134, 1120, + 3, 2, 2, 2, 1134, 1122, 3, 2, 2, 2, 1134, 1123, 3, 2, 2, 2, 1134, 1124, + 3, 2, 2, 2, 1134, 1129, 3, 2, 2, 2, 1134, 1130, 3, 2, 2, 2, 1134, 1131, + 3, 2, 2, 2, 1134, 1132, 3, 2, 2, 2, 1134, 1133, 3, 2, 2, 2, 1135, 191, + 3, 2, 2, 2, 1136, 1137, 7, 20, 2, 2, 1137, 1138, 7, 80, 2, 2, 1138, 1140, + 5, 28, 15, 2, 1139, 1141, 5, 194, 98, 2, 1140, 1139, 3, 2, 2, 2, 1140, + 1141, 3, 2, 2, 2, 1141, 1142, 3, 2, 2, 2, 1142, 1143, 5, 292, 147, 2, 1143, + 1144, 5, 298, 150, 2, 1144, 1145, 5, 300, 151, 2, 1145, 1146, 5, 158, 80, + 2, 1146, 193, 3, 2, 2, 2, 1147, 1152, 5, 110, 56, 2, 1148, 1149, 7, 109, + 2, 2, 1149, 1151, 5, 110, 56, 2, 1150, 1148, 3, 2, 2, 2, 1151, 1154, 3, + 2, 2, 2, 1152, 1150, 3, 2, 2, 2, 1152, 1153, 3, 2, 2, 2, 1153, 195, 3, + 2, 2, 2, 1154, 1152, 3, 2, 2, 2, 1155, 1156, 7, 30, 2, 2, 1156, 1157, 5, + 300, 151, 2, 1157, 1158, 5, 158, 80, 2, 1158, 197, 3, 2, 2, 2, 1159, 1160, + 7, 80, 2, 2, 1160, 1161, 5, 300, 151, 2, 1161, 1163, 5, 200, 101, 2, 1162, + 1164, 5, 302, 152, 2, 1163, 1162, 3, 2, 2, 2, 1163, 1164, 3, 2, 2, 2, 1164, + 1165, 3, 2, 2, 2, 1165, 1166, 5, 298, 150, 2, 1166, 199, 3, 2, 2, 2, 1167, + 1173, 5, 202, 102, 2, 1168, 1169, 5, 302, 152, 2, 1169, 1170, 5, 202, 102, + 2, 1170, 1172, 3, 2, 2, 2, 1171, 1168, 3, 2, 2, 2, 1172, 1175, 3, 2, 2, + 2, 1173, 1171, 3, 2, 2, 2, 1173, 1174, 3, 2, 2, 2, 1174, 201, 3, 2, 2, + 2, 1175, 1173, 3, 2, 2, 2, 1176, 1179, 5, 162, 82, 2, 1177, 1179, 5, 234, + 118, 2, 1178, 1176, 3, 2, 2, 2, 1178, 1177, 3, 2, 2, 2, 1179, 203, 3, 2, + 2, 2, 1180, 1181, 5, 206, 104, 2, 1181, 1182, 5, 300, 151, 2, 1182, 1184, + 3, 2, 2, 2, 1183, 1180, 3, 2, 2, 2, 1184, 1185, 3, 2, 2, 2, 1185, 1183, + 3, 2, 2, 2, 1185, 1186, 3, 2, 2, 2, 1186, 1187, 3, 2, 2, 2, 1187, 1188, + 5, 138, 70, 2, 1188, 205, 3, 2, 2, 2, 1189, 1190, 7, 19, 2, 2, 1190, 1191, + 5, 234, 118, 2, 1191, 1192, 7, 95, 2, 2, 1192, 1196, 3, 2, 2, 2, 1193, + 1194, 7, 24, 2, 2, 1194, 1196, 7, 95, 2, 2, 1195, 1189, 3, 2, 2, 2, 1195, + 1193, 3, 2, 2, 2, 1196, 207, 3, 2, 2, 2, 1197, 1200, 5, 210, 106, 2, 1198, + 1200, 5, 212, 107, 2, 1199, 1197, 3, 2, 2, 2, 1199, 1198, 3, 2, 2, 2, 1200, + 209, 3, 2, 2, 2, 1201, 1203, 5, 28, 15, 2, 1202, 1204, 5, 76, 39, 2, 1203, + 1202, 3, 2, 2, 2, 1203, 1204, 3, 2, 2, 2, 1204, 1205, 3, 2, 2, 2, 1205, + 1206, 5, 64, 33, 2, 1206, 1207, 9, 7, 2, 2, 1207, 1208, 5, 234, 118, 2, + 1208, 211, 3, 2, 2, 2, 1209, 1211, 5, 214, 108, 2, 1210, 1209, 3, 2, 2, + 2, 1210, 1211, 3, 2, 2, 2, 1211, 1212, 3, 2, 2, 2, 1212, 1214, 7, 86, 2, + 2, 1213, 1215, 5, 234, 118, 2, 1214, 1213, 3, 2, 2, 2, 1214, 1215, 3, 2, + 2, 2, 1215, 1216, 3, 2, 2, 2, 1216, 1218, 7, 86, 2, 2, 1217, 1219, 5, 216, + 109, 2, 1218, 1217, 3, 2, 2, 2, 1218, 1219, 3, 2, 2, 2, 1219, 213, 3, 2, + 2, 2, 1220, 1223, 5, 162, 82, 2, 1221, 1223, 5, 224, 113, 2, 1222, 1220, + 3, 2, 2, 2, 1222, 1221, 3, 2, 2, 2, 1223, 215, 3, 2, 2, 2, 1224, 1225, + 5, 224, 113, 2, 1225, 217, 3, 2, 2, 2, 1226, 1227, 7, 80, 2, 2, 1227, 1228, + 5, 76, 39, 2, 1228, 1229, 5, 298, 150, 2, 1229, 219, 3, 2, 2, 2, 1230, + 1231, 5, 222, 112, 2, 1231, 221, 3, 2, 2, 2, 1232, 1233, 7, 80, 2, 2, 1233, + 1234, 5, 228, 115, 2, 1234, 1235, 5, 298, 150, 2, 1235, 223, 3, 2, 2, 2, + 1236, 1241, 5, 226, 114, 2, 1237, 1238, 7, 87, 2, 2, 1238, 1240, 5, 226, + 114, 2, 1239, 1237, 3, 2, 2, 2, 1240, 1243, 3, 2, 2, 2, 1241, 1239, 3, + 2, 2, 2, 1241, 1242, 3, 2, 2, 2, 1242, 225, 3, 2, 2, 2, 1243, 1241, 3, + 2, 2, 2, 1244, 1247, 7, 106, 2, 2, 1245, 1247, 3, 2, 2, 2, 1246, 1244, + 3, 2, 2, 2, 1246, 1245, 3, 2, 2, 2, 1247, 1248, 3, 2, 2, 2, 1248, 1249, + 5, 234, 118, 2, 1249, 227, 3, 2, 2, 2, 1250, 1253, 5, 230, 116, 2, 1251, + 1253, 5, 124, 63, 2, 1252, 1250, 3, 2, 2, 2, 1252, 1251, 3, 2, 2, 2, 1253, + 229, 3, 2, 2, 2, 1254, 1255, 5, 238, 120, 2, 1255, 231, 3, 2, 2, 2, 1256, + 1258, 5, 242, 122, 2, 1257, 1259, 9, 8, 2, 2, 1258, 1257, 3, 2, 2, 2, 1258, + 1259, 3, 2, 2, 2, 1259, 233, 3, 2, 2, 2, 1260, 1261, 8, 118, 1, 2, 1261, + 1262, 5, 218, 110, 2, 1262, 1263, 5, 236, 119, 2, 1263, 1278, 3, 2, 2, + 2, 1264, 1278, 5, 232, 117, 2, 1265, 1266, 9, 9, 2, 2, 1266, 1267, 5, 300, + 151, 2, 1267, 1268, 5, 234, 118, 20, 1268, 1278, 3, 2, 2, 2, 1269, 1270, + 9, 10, 2, 2, 1270, 1278, 5, 234, 118, 18, 1271, 1272, 5, 172, 87, 2, 1272, + 1273, 5, 300, 151, 2, 1273, 1274, 7, 89, 2, 2, 1274, 1275, 5, 300, 151, + 2, 1275, 1276, 5, 230, 116, 2, 1276, 1278, 3, 2, 2, 2, 1277, 1260, 3, 2, + 2, 2, 1277, 1264, 3, 2, 2, 2, 1277, 1265, 3, 2, 2, 2, 1277, 1269, 3, 2, + 2, 2, 1277, 1271, 3, 2, 2, 2, 1278, 1389, 3, 2, 2, 2, 1279, 1280, 12, 19, + 2, 2, 1280, 1281, 7, 72, 2, 2, 1281, 1282, 5, 300, 151, 2, 1282, 1283, + 5, 234, 118, 20, 1283, 1388, 3, 2, 2, 2, 1284, 1285, 12, 17, 2, 2, 1285, + 1286, 5, 300, 151, 2, 1286, 1287, 9, 11, 2, 2, 1287, 1288, 5, 300, 151, + 2, 1288, 1289, 5, 234, 118, 18, 1289, 1388, 3, 2, 2, 2, 1290, 1291, 12, + 16, 2, 2, 1291, 1292, 9, 12, 2, 2, 1292, 1293, 5, 300, 151, 2, 1293, 1294, + 5, 234, 118, 17, 1294, 1388, 3, 2, 2, 2, 1295, 1296, 12, 15, 2, 2, 1296, + 1307, 5, 300, 151, 2, 1297, 1298, 7, 91, 2, 2, 1298, 1305, 7, 91, 2, 2, + 1299, 1300, 7, 90, 2, 2, 1300, 1301, 7, 90, 2, 2, 1301, 1305, 7, 90, 2, + 2, 1302, 1303, 7, 90, 2, 2, 1303, 1305, 7, 90, 2, 2, 1304, 1297, 3, 2, + 2, 2, 1304, 1299, 3, 2, 2, 2, 1304, 1302, 3, 2, 2, 2, 1305, 1308, 3, 2, + 2, 2, 1306, 1308, 9, 13, 2, 2, 1307, 1304, 3, 2, 2, 2, 1307, 1306, 3, 2, + 2, 2, 1308, 1309, 3, 2, 2, 2, 1309, 1310, 5, 300, 151, 2, 1310, 1311, 5, + 234, 118, 16, 1311, 1388, 3, 2, 2, 2, 1312, 1313, 12, 13, 2, 2, 1313, 1314, + 5, 300, 151, 2, 1314, 1315, 9, 14, 2, 2, 1315, 1316, 5, 300, 151, 2, 1316, + 1317, 5, 234, 118, 14, 1317, 1388, 3, 2, 2, 2, 1318, 1319, 12, 12, 2, 2, + 1319, 1320, 5, 300, 151, 2, 1320, 1321, 9, 15, 2, 2, 1321, 1322, 5, 300, + 151, 2, 1322, 1323, 5, 234, 118, 13, 1323, 1388, 3, 2, 2, 2, 1324, 1325, + 12, 11, 2, 2, 1325, 1326, 5, 300, 151, 2, 1326, 1327, 9, 16, 2, 2, 1327, + 1328, 5, 300, 151, 2, 1328, 1329, 5, 234, 118, 12, 1329, 1388, 3, 2, 2, + 2, 1330, 1331, 12, 10, 2, 2, 1331, 1332, 5, 300, 151, 2, 1332, 1333, 7, + 108, 2, 2, 1333, 1334, 5, 300, 151, 2, 1334, 1335, 5, 234, 118, 11, 1335, + 1388, 3, 2, 2, 2, 1336, 1337, 12, 9, 2, 2, 1337, 1338, 5, 300, 151, 2, + 1338, 1339, 7, 110, 2, 2, 1339, 1340, 5, 300, 151, 2, 1340, 1341, 5, 234, + 118, 10, 1341, 1388, 3, 2, 2, 2, 1342, 1343, 12, 8, 2, 2, 1343, 1344, 5, + 300, 151, 2, 1344, 1345, 7, 109, 2, 2, 1345, 1346, 5, 300, 151, 2, 1346, + 1347, 5, 234, 118, 9, 1347, 1388, 3, 2, 2, 2, 1348, 1349, 12, 7, 2, 2, + 1349, 1350, 5, 300, 151, 2, 1350, 1351, 7, 100, 2, 2, 1351, 1352, 5, 300, + 151, 2, 1352, 1353, 5, 234, 118, 8, 1353, 1388, 3, 2, 2, 2, 1354, 1355, + 12, 6, 2, 2, 1355, 1356, 5, 300, 151, 2, 1356, 1357, 7, 101, 2, 2, 1357, + 1358, 5, 300, 151, 2, 1358, 1359, 5, 234, 118, 7, 1359, 1388, 3, 2, 2, + 2, 1360, 1361, 12, 5, 2, 2, 1361, 1371, 5, 300, 151, 2, 1362, 1363, 7, + 94, 2, 2, 1363, 1364, 5, 300, 151, 2, 1364, 1365, 5, 234, 118, 2, 1365, + 1366, 5, 300, 151, 2, 1366, 1367, 7, 95, 2, 2, 1367, 1368, 5, 300, 151, + 2, 1368, 1372, 3, 2, 2, 2, 1369, 1370, 7, 67, 2, 2, 1370, 1372, 5, 300, + 151, 2, 1371, 1362, 3, 2, 2, 2, 1371, 1369, 3, 2, 2, 2, 1372, 1373, 3, + 2, 2, 2, 1373, 1374, 5, 234, 118, 5, 1374, 1388, 3, 2, 2, 2, 1375, 1376, + 12, 14, 2, 2, 1376, 1377, 5, 300, 151, 2, 1377, 1378, 9, 17, 2, 2, 1378, + 1379, 5, 300, 151, 2, 1379, 1380, 5, 76, 39, 2, 1380, 1388, 3, 2, 2, 2, + 1381, 1382, 12, 3, 2, 2, 1382, 1383, 5, 300, 151, 2, 1383, 1384, 9, 18, + 2, 2, 1384, 1385, 5, 300, 151, 2, 1385, 1386, 5, 228, 115, 2, 1386, 1388, + 3, 2, 2, 2, 1387, 1279, 3, 2, 2, 2, 1387, 1284, 3, 2, 2, 2, 1387, 1290, + 3, 2, 2, 2, 1387, 1295, 3, 2, 2, 2, 1387, 1312, 3, 2, 2, 2, 1387, 1318, + 3, 2, 2, 2, 1387, 1324, 3, 2, 2, 2, 1387, 1330, 3, 2, 2, 2, 1387, 1336, + 3, 2, 2, 2, 1387, 1342, 3, 2, 2, 2, 1387, 1348, 3, 2, 2, 2, 1387, 1354, + 3, 2, 2, 2, 1387, 1360, 3, 2, 2, 2, 1387, 1375, 3, 2, 2, 2, 1387, 1381, + 3, 2, 2, 2, 1388, 1391, 3, 2, 2, 2, 1389, 1387, 3, 2, 2, 2, 1389, 1390, + 3, 2, 2, 2, 1390, 235, 3, 2, 2, 2, 1391, 1389, 3, 2, 2, 2, 1392, 1393, + 5, 218, 110, 2, 1393, 1394, 5, 236, 119, 2, 1394, 1403, 3, 2, 2, 2, 1395, + 1403, 5, 232, 117, 2, 1396, 1397, 9, 9, 2, 2, 1397, 1398, 5, 300, 151, + 2, 1398, 1399, 5, 236, 119, 2, 1399, 1403, 3, 2, 2, 2, 1400, 1401, 9, 10, + 2, 2, 1401, 1403, 5, 236, 119, 2, 1402, 1392, 3, 2, 2, 2, 1402, 1395, 3, + 2, 2, 2, 1402, 1396, 3, 2, 2, 2, 1402, 1400, 3, 2, 2, 2, 1403, 237, 3, + 2, 2, 2, 1404, 1407, 5, 234, 118, 2, 1405, 1408, 5, 280, 141, 2, 1406, + 1408, 3, 2, 2, 2, 1407, 1405, 3, 2, 2, 2, 1407, 1406, 3, 2, 2, 2, 1408, + 1412, 3, 2, 2, 2, 1409, 1411, 5, 240, 121, 2, 1410, 1409, 3, 2, 2, 2, 1411, + 1414, 3, 2, 2, 2, 1412, 1410, 3, 2, 2, 2, 1412, 1413, 3, 2, 2, 2, 1413, + 239, 3, 2, 2, 2, 1414, 1412, 3, 2, 2, 2, 1415, 1422, 5, 254, 128, 2, 1416, + 1418, 5, 244, 123, 2, 1417, 1416, 3, 2, 2, 2, 1418, 1419, 3, 2, 2, 2, 1419, + 1417, 3, 2, 2, 2, 1419, 1420, 3, 2, 2, 2, 1420, 1423, 3, 2, 2, 2, 1421, + 1423, 5, 280, 141, 2, 1422, 1417, 3, 2, 2, 2, 1422, 1421, 3, 2, 2, 2, 1422, + 1423, 3, 2, 2, 2, 1423, 241, 3, 2, 2, 2, 1424, 1430, 5, 254, 128, 2, 1425, + 1426, 5, 244, 123, 2, 1426, 1427, 8, 122, 1, 2, 1427, 1429, 3, 2, 2, 2, + 1428, 1425, 3, 2, 2, 2, 1429, 1432, 3, 2, 2, 2, 1430, 1428, 3, 2, 2, 2, + 1430, 1431, 3, 2, 2, 2, 1431, 243, 3, 2, 2, 2, 1432, 1430, 3, 2, 2, 2, + 1433, 1444, 5, 300, 151, 2, 1434, 1435, 9, 19, 2, 2, 1435, 1438, 5, 300, + 151, 2, 1436, 1439, 7, 126, 2, 2, 1437, 1439, 5, 274, 138, 2, 1438, 1436, + 3, 2, 2, 2, 1438, 1437, 3, 2, 2, 2, 1438, 1439, 3, 2, 2, 2, 1439, 1445, + 3, 2, 2, 2, 1440, 1441, 7, 68, 2, 2, 1441, 1445, 5, 300, 151, 2, 1442, + 1443, 7, 69, 2, 2, 1443, 1445, 5, 300, 151, 2, 1444, 1434, 3, 2, 2, 2, + 1444, 1440, 3, 2, 2, 2, 1444, 1442, 3, 2, 2, 2, 1445, 1446, 3, 2, 2, 2, + 1446, 1447, 5, 246, 124, 2, 1447, 1448, 8, 123, 1, 2, 1448, 1470, 3, 2, + 2, 2, 1449, 1450, 5, 300, 151, 2, 1450, 1451, 7, 88, 2, 2, 1451, 1452, + 5, 300, 151, 2, 1452, 1453, 7, 39, 2, 2, 1453, 1454, 5, 266, 134, 2, 1454, + 1455, 8, 123, 1, 2, 1455, 1470, 3, 2, 2, 2, 1456, 1457, 5, 278, 140, 2, + 1457, 1458, 8, 123, 1, 2, 1458, 1470, 3, 2, 2, 2, 1459, 1460, 5, 300, 151, + 2, 1460, 1461, 5, 134, 68, 2, 1461, 1462, 8, 123, 1, 2, 1462, 1470, 3, + 2, 2, 2, 1463, 1464, 5, 250, 126, 2, 1464, 1465, 8, 123, 1, 2, 1465, 1470, + 3, 2, 2, 2, 1466, 1467, 5, 252, 127, 2, 1467, 1468, 8, 123, 1, 2, 1468, + 1470, 3, 2, 2, 2, 1469, 1433, 3, 2, 2, 2, 1469, 1449, 3, 2, 2, 2, 1469, + 1456, 3, 2, 2, 2, 1469, 1459, 3, 2, 2, 2, 1469, 1463, 3, 2, 2, 2, 1469, + 1466, 3, 2, 2, 2, 1470, 245, 3, 2, 2, 2, 1471, 1476, 5, 292, 147, 2, 1472, + 1476, 5, 288, 145, 2, 1473, 1476, 5, 248, 125, 2, 1474, 1476, 5, 296, 149, + 2, 1475, 1471, 3, 2, 2, 2, 1475, 1472, 3, 2, 2, 2, 1475, 1473, 3, 2, 2, + 2, 1475, 1474, 3, 2, 2, 2, 1476, 247, 3, 2, 2, 2, 1477, 1480, 5, 220, 111, + 2, 1478, 1480, 5, 116, 59, 2, 1479, 1477, 3, 2, 2, 2, 1479, 1478, 3, 2, + 2, 2, 1480, 249, 3, 2, 2, 2, 1481, 1483, 7, 94, 2, 2, 1482, 1481, 3, 2, + 2, 2, 1482, 1483, 3, 2, 2, 2, 1483, 1484, 3, 2, 2, 2, 1484, 1486, 7, 84, + 2, 2, 1485, 1487, 5, 224, 113, 2, 1486, 1485, 3, 2, 2, 2, 1486, 1487, 3, + 2, 2, 2, 1487, 1488, 3, 2, 2, 2, 1488, 1489, 7, 85, 2, 2, 1489, 251, 3, + 2, 2, 2, 1490, 1492, 7, 94, 2, 2, 1491, 1490, 3, 2, 2, 2, 1491, 1492, 3, + 2, 2, 2, 1492, 1493, 3, 2, 2, 2, 1493, 1496, 7, 84, 2, 2, 1494, 1497, 5, + 260, 131, 2, 1495, 1497, 7, 95, 2, 2, 1496, 1494, 3, 2, 2, 2, 1496, 1495, + 3, 2, 2, 2, 1497, 1498, 3, 2, 2, 2, 1498, 1499, 7, 85, 2, 2, 1499, 253, + 3, 2, 2, 2, 1500, 1502, 5, 292, 147, 2, 1501, 1503, 5, 86, 44, 2, 1502, + 1501, 3, 2, 2, 2, 1502, 1503, 3, 2, 2, 2, 1503, 1518, 3, 2, 2, 2, 1504, + 1518, 5, 114, 58, 2, 1505, 1518, 5, 116, 59, 2, 1506, 1507, 7, 39, 2, 2, + 1507, 1508, 5, 300, 151, 2, 1508, 1509, 5, 266, 134, 2, 1509, 1518, 3, + 2, 2, 2, 1510, 1518, 7, 50, 2, 2, 1511, 1518, 7, 47, 2, 2, 1512, 1518, + 5, 220, 111, 2, 1513, 1518, 5, 134, 68, 2, 1514, 1518, 5, 256, 129, 2, + 1515, 1518, 5, 258, 130, 2, 1516, 1518, 5, 294, 148, 2, 1517, 1500, 3, + 2, 2, 2, 1517, 1504, 3, 2, 2, 2, 1517, 1505, 3, 2, 2, 2, 1517, 1506, 3, + 2, 2, 2, 1517, 1510, 3, 2, 2, 2, 1517, 1511, 3, 2, 2, 2, 1517, 1512, 3, + 2, 2, 2, 1517, 1513, 3, 2, 2, 2, 1517, 1514, 3, 2, 2, 2, 1517, 1515, 3, + 2, 2, 2, 1517, 1516, 3, 2, 2, 2, 1518, 255, 3, 2, 2, 2, 1519, 1521, 7, + 84, 2, 2, 1520, 1522, 5, 224, 113, 2, 1521, 1520, 3, 2, 2, 2, 1521, 1522, + 3, 2, 2, 2, 1522, 1524, 3, 2, 2, 2, 1523, 1525, 7, 87, 2, 2, 1524, 1523, + 3, 2, 2, 2, 1524, 1525, 3, 2, 2, 2, 1525, 1526, 3, 2, 2, 2, 1526, 1527, + 7, 85, 2, 2, 1527, 257, 3, 2, 2, 2, 1528, 1534, 7, 84, 2, 2, 1529, 1531, + 5, 260, 131, 2, 1530, 1532, 7, 87, 2, 2, 1531, 1530, 3, 2, 2, 2, 1531, + 1532, 3, 2, 2, 2, 1532, 1535, 3, 2, 2, 2, 1533, 1535, 7, 95, 2, 2, 1534, + 1529, 3, 2, 2, 2, 1534, 1533, 3, 2, 2, 2, 1535, 1536, 3, 2, 2, 2, 1536, + 1537, 7, 85, 2, 2, 1537, 259, 3, 2, 2, 2, 1538, 1543, 5, 262, 132, 2, 1539, + 1540, 7, 87, 2, 2, 1540, 1542, 5, 262, 132, 2, 1541, 1539, 3, 2, 2, 2, + 1542, 1545, 3, 2, 2, 2, 1543, 1541, 3, 2, 2, 2, 1543, 1544, 3, 2, 2, 2, + 1544, 261, 3, 2, 2, 2, 1545, 1543, 3, 2, 2, 2, 1546, 1547, 5, 264, 133, + 2, 1547, 1548, 7, 95, 2, 2, 1548, 1549, 5, 300, 151, 2, 1549, 1550, 5, + 234, 118, 2, 1550, 1557, 3, 2, 2, 2, 1551, 1552, 7, 106, 2, 2, 1552, 1553, + 7, 95, 2, 2, 1553, 1554, 5, 300, 151, 2, 1554, 1555, 5, 234, 118, 2, 1555, + 1557, 3, 2, 2, 2, 1556, 1546, 3, 2, 2, 2, 1556, 1551, 3, 2, 2, 2, 1557, + 263, 3, 2, 2, 2, 1558, 1561, 5, 296, 149, 2, 1559, 1561, 5, 254, 128, 2, + 1560, 1558, 3, 2, 2, 2, 1560, 1559, 3, 2, 2, 2, 1561, 265, 3, 2, 2, 2, + 1562, 1586, 5, 272, 137, 2, 1563, 1564, 6, 134, 26, 3, 1564, 1565, 5, 300, + 151, 2, 1565, 1567, 5, 278, 140, 2, 1566, 1568, 5, 270, 136, 2, 1567, 1566, + 3, 2, 2, 2, 1567, 1568, 3, 2, 2, 2, 1568, 1587, 3, 2, 2, 2, 1569, 1575, + 6, 134, 27, 3, 1570, 1571, 5, 140, 71, 2, 1571, 1572, 7, 84, 2, 2, 1572, + 1573, 5, 234, 118, 2, 1573, 1574, 7, 85, 2, 2, 1574, 1576, 3, 2, 2, 2, + 1575, 1570, 3, 2, 2, 2, 1576, 1577, 3, 2, 2, 2, 1577, 1575, 3, 2, 2, 2, + 1577, 1578, 3, 2, 2, 2, 1578, 1579, 3, 2, 2, 2, 1579, 1580, 5, 72, 37, + 2, 1580, 1587, 3, 2, 2, 2, 1581, 1582, 6, 134, 28, 3, 1582, 1583, 5, 70, + 36, 2, 1583, 1584, 5, 300, 151, 2, 1584, 1585, 5, 268, 135, 2, 1585, 1587, + 3, 2, 2, 2, 1586, 1563, 3, 2, 2, 2, 1586, 1569, 3, 2, 2, 2, 1586, 1581, + 3, 2, 2, 2, 1587, 267, 3, 2, 2, 2, 1588, 1589, 7, 82, 2, 2, 1589, 1591, + 5, 300, 151, 2, 1590, 1592, 5, 68, 35, 2, 1591, 1590, 3, 2, 2, 2, 1591, + 1592, 3, 2, 2, 2, 1592, 1593, 3, 2, 2, 2, 1593, 1594, 5, 300, 151, 2, 1594, + 1595, 7, 83, 2, 2, 1595, 269, 3, 2, 2, 2, 1596, 1597, 5, 42, 22, 2, 1597, + 271, 3, 2, 2, 2, 1598, 1604, 5, 140, 71, 2, 1599, 1605, 5, 84, 43, 2, 1600, + 1602, 5, 110, 56, 2, 1601, 1603, 5, 276, 139, 2, 1602, 1601, 3, 2, 2, 2, + 1602, 1603, 3, 2, 2, 2, 1603, 1605, 3, 2, 2, 2, 1604, 1599, 3, 2, 2, 2, + 1604, 1600, 3, 2, 2, 2, 1605, 273, 3, 2, 2, 2, 1606, 1607, 7, 91, 2, 2, + 1607, 1608, 5, 300, 151, 2, 1608, 1609, 5, 38, 20, 2, 1609, 1610, 5, 300, + 151, 2, 1610, 1611, 7, 90, 2, 2, 1611, 275, 3, 2, 2, 2, 1612, 1613, 7, + 91, 2, 2, 1613, 1616, 7, 90, 2, 2, 1614, 1616, 5, 86, 44, 2, 1615, 1612, + 3, 2, 2, 2, 1615, 1614, 3, 2, 2, 2, 1616, 277, 3, 2, 2, 2, 1617, 1619, + 7, 80, 2, 2, 1618, 1620, 5, 282, 142, 2, 1619, 1618, 3, 2, 2, 2, 1619, + 1620, 3, 2, 2, 2, 1620, 1622, 3, 2, 2, 2, 1621, 1623, 7, 87, 2, 2, 1622, + 1621, 3, 2, 2, 2, 1622, 1623, 3, 2, 2, 2, 1623, 1624, 3, 2, 2, 2, 1624, + 1625, 5, 298, 150, 2, 1625, 279, 3, 2, 2, 2, 1626, 1633, 5, 284, 143, 2, + 1627, 1628, 7, 87, 2, 2, 1628, 1629, 5, 300, 151, 2, 1629, 1630, 5, 284, + 143, 2, 1630, 1632, 3, 2, 2, 2, 1631, 1627, 3, 2, 2, 2, 1632, 1635, 3, + 2, 2, 2, 1633, 1631, 3, 2, 2, 2, 1633, 1634, 3, 2, 2, 2, 1634, 281, 3, + 2, 2, 2, 1635, 1633, 3, 2, 2, 2, 1636, 1643, 5, 286, 144, 2, 1637, 1638, + 7, 87, 2, 2, 1638, 1639, 5, 300, 151, 2, 1639, 1640, 5, 286, 144, 2, 1640, + 1642, 3, 2, 2, 2, 1641, 1637, 3, 2, 2, 2, 1642, 1645, 3, 2, 2, 2, 1643, + 1641, 3, 2, 2, 2, 1643, 1644, 3, 2, 2, 2, 1644, 283, 3, 2, 2, 2, 1645, + 1643, 3, 2, 2, 2, 1646, 1649, 5, 226, 114, 2, 1647, 1649, 5, 262, 132, + 2, 1648, 1646, 3, 2, 2, 2, 1648, 1647, 3, 2, 2, 2, 1649, 285, 3, 2, 2, + 2, 1650, 1654, 5, 226, 114, 2, 1651, 1654, 5, 124, 63, 2, 1652, 1654, 5, + 262, 132, 2, 1653, 1650, 3, 2, 2, 2, 1653, 1651, 3, 2, 2, 2, 1653, 1652, + 3, 2, 2, 2, 1654, 287, 3, 2, 2, 2, 1655, 1656, 7, 3, 2, 2, 1656, 289, 3, + 2, 2, 2, 1657, 1658, 7, 124, 2, 2, 1658, 291, 3, 2, 2, 2, 1659, 1660, 9, + 20, 2, 2, 1660, 293, 3, 2, 2, 2, 1661, 1662, 9, 21, 2, 2, 1662, 295, 3, + 2, 2, 2, 1663, 1664, 9, 22, 2, 2, 1664, 297, 3, 2, 2, 2, 1665, 1668, 7, + 81, 2, 2, 1666, 1668, 3, 2, 2, 2, 1667, 1665, 3, 2, 2, 2, 1667, 1666, 3, + 2, 2, 2, 1668, 299, 3, 2, 2, 2, 1669, 1671, 7, 129, 2, 2, 1670, 1669, 3, + 2, 2, 2, 1671, 1674, 3, 2, 2, 2, 1672, 1670, 3, 2, 2, 2, 1672, 1673, 3, + 2, 2, 2, 1673, 301, 3, 2, 2, 2, 1674, 1672, 3, 2, 2, 2, 1675, 1677, 9, + 23, 2, 2, 1676, 1675, 3, 2, 2, 2, 1677, 1678, 3, 2, 2, 2, 1678, 1676, 3, + 2, 2, 2, 1678, 1679, 3, 2, 2, 2, 1679, 303, 3, 2, 2, 2, 189, 306, 309, + 312, 322, 326, 331, 340, 347, 354, 357, 364, 367, 374, 378, 382, 385, 392, + 403, 414, 423, 433, 447, 453, 462, 466, 469, 477, 480, 483, 491, 494, 497, + 500, 507, 511, 523, 529, 534, 537, 542, 546, 553, 564, 568, 571, 580, 584, + 586, 590, 595, 606, 615, 630, 635, 643, 646, 651, 658, 661, 667, 670, 674, + 678, 691, 704, 706, 718, 723, 729, 737, 745, 748, 756, 765, 773, 780, 792, + 800, 808, 816, 820, 826, 845, 849, 854, 860, 867, 870, 878, 882, 889, 896, + 899, 903, 912, 923, 928, 936, 939, 942, 951, 954, 961, 969, 973, 982, 985, + 990, 998, 1004, 1014, 1020, 1028, 1034, 1044, 1069, 1073, 1077, 1081, 1090, + 1096, 1105, 1118, 1134, 1140, 1152, 1163, 1173, 1178, 1185, 1195, 1199, + 1203, 1210, 1214, 1218, 1222, 1241, 1246, 1252, 1258, 1277, 1304, 1307, + 1371, 1387, 1389, 1402, 1407, 1412, 1419, 1422, 1430, 1438, 1444, 1469, + 1475, 1479, 1482, 1486, 1491, 1496, 1502, 1517, 1521, 1524, 1531, 1534, + 1543, 1556, 1560, 1567, 1577, 1586, 1591, 1602, 1604, 1615, 1619, 1622, + 1633, 1643, 1648, 1653, 1667, 1672, 1678, +} +var deserializer = antlr.NewATNDeserializer(nil) +var deserializedATN = deserializer.DeserializeFromUInt16(parserATN) + +var literalNames = []string{ + "", "", "", "", "", "", "", "'as'", "'def'", "'in'", "'trait'", "'threadsafe'", + "'var'", "", "'abstract'", "'assert'", "'break'", "'case'", "'catch'", + "'class'", "'const'", "'continue'", "'default'", "'do'", "'else'", "'enum'", + "'extends'", "'final'", "'finally'", "'for'", "'if'", "'goto'", "'implements'", + "'import'", "'instanceof'", "'interface'", "'native'", "'new'", "'package'", + "'private'", "'protected'", "'public'", "'return'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", "", "", "", + "'null'", "'..'", "'..<'", "'*.'", "'?.'", "'??.'", "'?:'", "'.&'", "'::'", + "'=~'", "'==~'", "'**'", "'**='", "'<=>'", "'==='", "'!=='", "'->'", "'!instanceof'", + "'!in'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "", "'='", + "'>'", "'<'", "'!'", "'~'", "'?'", "':'", "'=='", "'<='", "'>='", "'!='", + "'&&'", "'||'", "'++'", "'--'", "'+'", "'-'", "'*'", "", "'&'", "'|'", + "'^'", "'%'", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", + "'<<='", "'>>='", "'>>>='", "'?='", "", "", "'@'", "'...'", +} +var symbolicNames = []string{ + "", "StringLiteral", "GStringBegin", "GStringEnd", "GStringPart", "GStringPathPart", + "RollBackOne", "AS", "DEF", "IN", "TRAIT", "THREADSAFE", "VAR", "BuiltInPrimitiveType", + "ABSTRACT", "ASSERT", "BREAK", "CASE", "CATCH", "CLASS", "CONST", "CONTINUE", + "DEFAULT", "DO", "ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FOR", + "IF", "GOTO", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INTERFACE", "NATIVE", + "NEW", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "STATIC", + "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", + "TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "FloatingPointLiteral", + "BooleanLiteral", "NullLiteral", "RANGE_INCLUSIVE", "RANGE_EXCLUSIVE", + "SPREAD_DOT", "SAFE_DOT", "SAFE_CHAIN_DOT", "ELVIS", "METHOD_POINTER", + "METHOD_REFERENCE", "REGEX_FIND", "REGEX_MATCH", "POWER", "POWER_ASSIGN", + "SPACESHIP", "IDENTICAL", "NOT_IDENTICAL", "ARROW", "NOT_INSTANCEOF", "NOT_IN", + "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", + "DOT", "ASSIGN", "GT", "LT", "NOT", "BITNOT", "QUESTION", "COLON", "EQUAL", + "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", + "DIV", "BITAND", "BITOR", "XOR", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", + "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", + "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "ELVIS_ASSIGN", "CapitalizedIdentifier", + "Identifier", "AT", "ELLIPSIS", "WS", "NL", "SH_COMMENT", "UNEXPECTED_CHAR", +} + +var ruleNames = []string{ + "compilationUnit", "scriptStatements", "scriptStatement", "packageDeclaration", + "importDeclaration", "typeDeclaration", "modifier", "modifiersOpt", "modifiers", + "classOrInterfaceModifiersOpt", "classOrInterfaceModifiers", "classOrInterfaceModifier", + "variableModifier", "variableModifiersOpt", "variableModifiers", "typeParameters", + "typeParameter", "typeBound", "typeList", "classDeclaration", "classBody", + "enumConstants", "enumConstant", "classBodyDeclaration", "memberDeclaration", + "methodDeclaration", "FunctionName", "returnType", "fieldDeclaration", "variableDeclarators", + "variableDeclarator", "variableDeclaratorId", "variableInitializer", "variableInitializers", + "dims", "dimsOpt", "standardType", "typeType", "classOrInterfaceType", + "generalClassOrInterfaceType", "standardClassOrInterfaceType", "primitiveType", + "typeArguments", "typeArgument", "annotatedQualifiedClassName", "qualifiedClassNameList", + "formalParameters", "formalParameterList", "thisFormalParameter", "formalParameter", + "methodBody", "qualifiedName", "qualifiedNameElement", "qualifiedNameElements", + "qualifiedClassName", "qualifiedStandardClassName", "literal", "gstring", + "gstringValue", "gstringPath", "lambdaExpression", "standardLambdaExpression", + "lambdaParameters", "standardLambdaParameters", "lambdaBody", "closure", + "closureOrLambdaExpression", "blockStatementsOpt", "blockStatements", "annotationsOpt", + "annotation", "elementValues", "annotationName", "elementValuePairs", "elementValuePair", + "elementValuePairName", "elementValue", "elementValueArrayInitializer", + "block", "blockStatement", "localVariableDeclaration", "classifiedModifiers", + "variableDeclaration", "typeNamePairs", "typeNamePair", "variableNames", + "conditionalStatement", "ifElseStatement", "switchStatement", "loopStatement", + "continueStatement", "breakStatement", "tryCatchStatement", "assertStatement", + "statement", "catchClause", "catchType", "finallyBlock", "resources", "resourceList", + "resource", "switchBlockStatementGroup", "switchLabel", "forControl", "enhancedForControl", + "classicalForControl", "forInit", "forUpdate", "castParExpression", "parExpression", + "expressionInPar", "expressionList", "expressionListElement", "enhancedStatementExpression", + "statementExpression", "postfixExpression", "expression", "castOperandExpression", + "commandExpression", "commandArgument", "pathExpression", "pathElement", + "namePart", "dynamicMemberName", "indexPropertyArgs", "namedPropertyArgs", + "primary", "list", "normalMap", "mapEntryList", "mapEntry", "mapEntryLabel", + "creator", "arrayInitializer", "anonymousInnerClassDeclaration", "createdName", + "nonWildcardTypeArguments", "typeArgumentsOrDiamond", "arguments", "argumentList", + "enhancedArgumentList", "argumentListElement", "enhancedArgumentListElement", + "stringLiteral", "className", "identifier", "builtInType", "keywords", + "rparen", "nls", "sep", +} +var decisionToDFA = make([]*antlr.DFA, len(deserializedATN.DecisionToState)) + +func init() { + for index, ds := range deserializedATN.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +type GroovyParser struct { + *antlr.BaseParser +} + +func NewGroovyParser(input antlr.TokenStream) *GroovyParser { + this := new(GroovyParser) + + this.BaseParser = antlr.NewBaseParser(input) + + this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache()) + this.RuleNames = ruleNames + this.LiteralNames = literalNames + this.SymbolicNames = symbolicNames + this.GrammarFileName = "GroovyParser.g4" + + return this +} + +// GroovyParser tokens. +const ( + GroovyParserEOF = antlr.TokenEOF + GroovyParserStringLiteral = 1 + GroovyParserGStringBegin = 2 + GroovyParserGStringEnd = 3 + GroovyParserGStringPart = 4 + GroovyParserGStringPathPart = 5 + GroovyParserRollBackOne = 6 + GroovyParserAS = 7 + GroovyParserDEF = 8 + GroovyParserIN = 9 + GroovyParserTRAIT = 10 + GroovyParserTHREADSAFE = 11 + GroovyParserVAR = 12 + GroovyParserBuiltInPrimitiveType = 13 + GroovyParserABSTRACT = 14 + GroovyParserASSERT = 15 + GroovyParserBREAK = 16 + GroovyParserCASE = 17 + GroovyParserCATCH = 18 + GroovyParserCLASS = 19 + GroovyParserCONST = 20 + GroovyParserCONTINUE = 21 + GroovyParserDEFAULT = 22 + GroovyParserDO = 23 + GroovyParserELSE = 24 + GroovyParserENUM = 25 + GroovyParserEXTENDS = 26 + GroovyParserFINAL = 27 + GroovyParserFINALLY = 28 + GroovyParserFOR = 29 + GroovyParserIF = 30 + GroovyParserGOTO = 31 + GroovyParserIMPLEMENTS = 32 + GroovyParserIMPORT = 33 + GroovyParserINSTANCEOF = 34 + GroovyParserINTERFACE = 35 + GroovyParserNATIVE = 36 + GroovyParserNEW = 37 + GroovyParserPACKAGE = 38 + GroovyParserPRIVATE = 39 + GroovyParserPROTECTED = 40 + GroovyParserPUBLIC = 41 + GroovyParserRETURN = 42 + GroovyParserSTATIC = 43 + GroovyParserSTRICTFP = 44 + GroovyParserSUPER = 45 + GroovyParserSWITCH = 46 + GroovyParserSYNCHRONIZED = 47 + GroovyParserTHIS = 48 + GroovyParserTHROW = 49 + GroovyParserTHROWS = 50 + GroovyParserTRANSIENT = 51 + GroovyParserTRY = 52 + GroovyParserVOID = 53 + GroovyParserVOLATILE = 54 + GroovyParserWHILE = 55 + GroovyParserIntegerLiteral = 56 + GroovyParserFloatingPointLiteral = 57 + GroovyParserBooleanLiteral = 58 + GroovyParserNullLiteral = 59 + GroovyParserRANGE_INCLUSIVE = 60 + GroovyParserRANGE_EXCLUSIVE = 61 + GroovyParserSPREAD_DOT = 62 + GroovyParserSAFE_DOT = 63 + GroovyParserSAFE_CHAIN_DOT = 64 + GroovyParserELVIS = 65 + GroovyParserMETHOD_POINTER = 66 + GroovyParserMETHOD_REFERENCE = 67 + GroovyParserREGEX_FIND = 68 + GroovyParserREGEX_MATCH = 69 + GroovyParserPOWER = 70 + GroovyParserPOWER_ASSIGN = 71 + GroovyParserSPACESHIP = 72 + GroovyParserIDENTICAL = 73 + GroovyParserNOT_IDENTICAL = 74 + GroovyParserARROW = 75 + GroovyParserNOT_INSTANCEOF = 76 + GroovyParserNOT_IN = 77 + GroovyParserLPAREN = 78 + GroovyParserRPAREN = 79 + GroovyParserLBRACE = 80 + GroovyParserRBRACE = 81 + GroovyParserLBRACK = 82 + GroovyParserRBRACK = 83 + GroovyParserSEMI = 84 + GroovyParserCOMMA = 85 + GroovyParserDOT = 86 + GroovyParserASSIGN = 87 + GroovyParserGT = 88 + GroovyParserLT = 89 + GroovyParserNOT = 90 + GroovyParserBITNOT = 91 + GroovyParserQUESTION = 92 + GroovyParserCOLON = 93 + GroovyParserEQUAL = 94 + GroovyParserLE = 95 + GroovyParserGE = 96 + GroovyParserNOTEQUAL = 97 + GroovyParserAND = 98 + GroovyParserOR = 99 + GroovyParserINC = 100 + GroovyParserDEC = 101 + GroovyParserADD = 102 + GroovyParserSUB = 103 + GroovyParserMUL = 104 + GroovyParserDIV = 105 + GroovyParserBITAND = 106 + GroovyParserBITOR = 107 + GroovyParserXOR = 108 + GroovyParserMOD = 109 + GroovyParserADD_ASSIGN = 110 + GroovyParserSUB_ASSIGN = 111 + GroovyParserMUL_ASSIGN = 112 + GroovyParserDIV_ASSIGN = 113 + GroovyParserAND_ASSIGN = 114 + GroovyParserOR_ASSIGN = 115 + GroovyParserXOR_ASSIGN = 116 + GroovyParserMOD_ASSIGN = 117 + GroovyParserLSHIFT_ASSIGN = 118 + GroovyParserRSHIFT_ASSIGN = 119 + GroovyParserURSHIFT_ASSIGN = 120 + GroovyParserELVIS_ASSIGN = 121 + GroovyParserCapitalizedIdentifier = 122 + GroovyParserIdentifier = 123 + GroovyParserAT = 124 + GroovyParserELLIPSIS = 125 + GroovyParserWS = 126 + GroovyParserNL = 127 + GroovyParserSH_COMMENT = 128 + GroovyParserUNEXPECTED_CHAR = 129 +) + +// GroovyParser rules. +const ( + GroovyParserRULE_compilationUnit = 0 + GroovyParserRULE_scriptStatements = 1 + GroovyParserRULE_scriptStatement = 2 + GroovyParserRULE_packageDeclaration = 3 + GroovyParserRULE_importDeclaration = 4 + GroovyParserRULE_typeDeclaration = 5 + GroovyParserRULE_modifier = 6 + GroovyParserRULE_modifiersOpt = 7 + GroovyParserRULE_modifiers = 8 + GroovyParserRULE_classOrInterfaceModifiersOpt = 9 + GroovyParserRULE_classOrInterfaceModifiers = 10 + GroovyParserRULE_classOrInterfaceModifier = 11 + GroovyParserRULE_variableModifier = 12 + GroovyParserRULE_variableModifiersOpt = 13 + GroovyParserRULE_variableModifiers = 14 + GroovyParserRULE_typeParameters = 15 + GroovyParserRULE_typeParameter = 16 + GroovyParserRULE_typeBound = 17 + GroovyParserRULE_typeList = 18 + GroovyParserRULE_classDeclaration = 19 + GroovyParserRULE_classBody = 20 + GroovyParserRULE_enumConstants = 21 + GroovyParserRULE_enumConstant = 22 + GroovyParserRULE_classBodyDeclaration = 23 + GroovyParserRULE_memberDeclaration = 24 + GroovyParserRULE_methodDeclaration = 25 + GroovyParserRULE_methodName = 26 + GroovyParserRULE_returnType = 27 + GroovyParserRULE_fieldDeclaration = 28 + GroovyParserRULE_variableDeclarators = 29 + GroovyParserRULE_variableDeclarator = 30 + GroovyParserRULE_variableDeclaratorId = 31 + GroovyParserRULE_variableInitializer = 32 + GroovyParserRULE_variableInitializers = 33 + GroovyParserRULE_dims = 34 + GroovyParserRULE_dimsOpt = 35 + GroovyParserRULE_standardType = 36 + GroovyParserRULE_typeType = 37 + GroovyParserRULE_classOrInterfaceType = 38 + GroovyParserRULE_generalClassOrInterfaceType = 39 + GroovyParserRULE_standardClassOrInterfaceType = 40 + GroovyParserRULE_primitiveType = 41 + GroovyParserRULE_typeArguments = 42 + GroovyParserRULE_typeArgument = 43 + GroovyParserRULE_annotatedQualifiedClassName = 44 + GroovyParserRULE_qualifiedClassNameList = 45 + GroovyParserRULE_formalParameters = 46 + GroovyParserRULE_formalParameterList = 47 + GroovyParserRULE_thisFormalParameter = 48 + GroovyParserRULE_formalParameter = 49 + GroovyParserRULE_methodBody = 50 + GroovyParserRULE_qualifiedName = 51 + GroovyParserRULE_qualifiedNameElement = 52 + GroovyParserRULE_qualifiedNameElements = 53 + GroovyParserRULE_qualifiedClassName = 54 + GroovyParserRULE_qualifiedStandardClassName = 55 + GroovyParserRULE_literal = 56 + GroovyParserRULE_gstring = 57 + GroovyParserRULE_gstringValue = 58 + GroovyParserRULE_gstringPath = 59 + GroovyParserRULE_lambdaExpression = 60 + GroovyParserRULE_standardLambdaExpression = 61 + GroovyParserRULE_lambdaParameters = 62 + GroovyParserRULE_standardLambdaParameters = 63 + GroovyParserRULE_lambdaBody = 64 + GroovyParserRULE_closure = 65 + GroovyParserRULE_closureOrLambdaExpression = 66 + GroovyParserRULE_blockStatementsOpt = 67 + GroovyParserRULE_blockStatements = 68 + GroovyParserRULE_annotationsOpt = 69 + GroovyParserRULE_annotation = 70 + GroovyParserRULE_elementValues = 71 + GroovyParserRULE_annotationName = 72 + GroovyParserRULE_elementValuePairs = 73 + GroovyParserRULE_elementValuePair = 74 + GroovyParserRULE_elementValuePairName = 75 + GroovyParserRULE_elementValue = 76 + GroovyParserRULE_elementValueArrayInitializer = 77 + GroovyParserRULE_block = 78 + GroovyParserRULE_blockStatement = 79 + GroovyParserRULE_localVariableDeclaration = 80 + GroovyParserRULE_classifiedModifiers = 81 + GroovyParserRULE_variableDeclaration = 82 + GroovyParserRULE_typeNamePairs = 83 + GroovyParserRULE_typeNamePair = 84 + GroovyParserRULE_variableNames = 85 + GroovyParserRULE_conditionalStatement = 86 + GroovyParserRULE_ifElseStatement = 87 + GroovyParserRULE_switchStatement = 88 + GroovyParserRULE_loopStatement = 89 + GroovyParserRULE_continueStatement = 90 + GroovyParserRULE_breakStatement = 91 + GroovyParserRULE_tryCatchStatement = 92 + GroovyParserRULE_assertStatement = 93 + GroovyParserRULE_statement = 94 + GroovyParserRULE_catchClause = 95 + GroovyParserRULE_catchType = 96 + GroovyParserRULE_finallyBlock = 97 + GroovyParserRULE_resources = 98 + GroovyParserRULE_resourceList = 99 + GroovyParserRULE_resource = 100 + GroovyParserRULE_switchBlockStatementGroup = 101 + GroovyParserRULE_switchLabel = 102 + GroovyParserRULE_forControl = 103 + GroovyParserRULE_enhancedForControl = 104 + GroovyParserRULE_classicalForControl = 105 + GroovyParserRULE_forInit = 106 + GroovyParserRULE_forUpdate = 107 + GroovyParserRULE_castParExpression = 108 + GroovyParserRULE_parExpression = 109 + GroovyParserRULE_expressionInPar = 110 + GroovyParserRULE_expressionList = 111 + GroovyParserRULE_expressionListElement = 112 + GroovyParserRULE_enhancedStatementExpression = 113 + GroovyParserRULE_statementExpression = 114 + GroovyParserRULE_postfixExpression = 115 + GroovyParserRULE_expression = 116 + GroovyParserRULE_castOperandExpression = 117 + GroovyParserRULE_commandExpression = 118 + GroovyParserRULE_commandArgument = 119 + GroovyParserRULE_pathExpression = 120 + GroovyParserRULE_pathElement = 121 + GroovyParserRULE_namePart = 122 + GroovyParserRULE_dynamicMemberName = 123 + GroovyParserRULE_indexPropertyArgs = 124 + GroovyParserRULE_namedPropertyArgs = 125 + GroovyParserRULE_primary = 126 + GroovyParserRULE_list = 127 + GroovyParserRULE_normalMap = 128 + GroovyParserRULE_mapEntryList = 129 + GroovyParserRULE_mapEntry = 130 + GroovyParserRULE_mapEntryLabel = 131 + GroovyParserRULE_creator = 132 + GroovyParserRULE_arrayInitializer = 133 + GroovyParserRULE_anonymousInnerClassDeclaration = 134 + GroovyParserRULE_createdName = 135 + GroovyParserRULE_nonWildcardTypeArguments = 136 + GroovyParserRULE_typeArgumentsOrDiamond = 137 + GroovyParserRULE_arguments = 138 + GroovyParserRULE_argumentList = 139 + GroovyParserRULE_enhancedArgumentList = 140 + GroovyParserRULE_argumentListElement = 141 + GroovyParserRULE_enhancedArgumentListElement = 142 + GroovyParserRULE_stringLiteral = 143 + GroovyParserRULE_className = 144 + GroovyParserRULE_identifier = 145 + GroovyParserRULE_builtInType = 146 + GroovyParserRULE_keywords = 147 + GroovyParserRULE_rparen = 148 + GroovyParserRULE_nls = 149 + GroovyParserRULE_sep = 150 +) + +// ICompilationUnitContext is an interface to support dynamic dispatch. +type ICompilationUnitContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsCompilationUnitContext differentiates from other interfaces. + IsCompilationUnitContext() +} + +type CompilationUnitContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyCompilationUnitContext() *CompilationUnitContext { + var p = new(CompilationUnitContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = GroovyParserRULE_compilationUnit + return p +} + +func (*CompilationUnitContext) IsCompilationUnitContext() {} + +func NewCompilationUnitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CompilationUnitContext { + var p = new(CompilationUnitContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = GroovyParserRULE_compilationUnit + + return p +} + +func (s *CompilationUnitContext) GetParser() antlr.Parser { return s.parser } + +func (s *CompilationUnitContext) Nls() INlsContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*INlsContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(INlsContext) +} + +func (s *CompilationUnitContext) EOF() antlr.TerminalNode { + return s.GetToken(GroovyParserEOF, 0) +} + +func (s *CompilationUnitContext) PackageDeclaration() IPackageDeclarationContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IPackageDeclarationContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IPackageDeclarationContext) +} + +func (s *CompilationUnitContext) Sep() ISepContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISepContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISepContext) +} + +func (s *CompilationUnitContext) ScriptStatements() IScriptStatementsContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IScriptStatementsContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IScriptStatementsContext) +} + +func (s *CompilationUnitContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CompilationUnitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *CompilationUnitContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.EnterCompilationUnit(s) + } +} + +func (s *CompilationUnitContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.ExitCompilationUnit(s) + } +} + +func (p *GroovyParser) CompilationUnit() (localctx ICompilationUnitContext) { + localctx = NewCompilationUnitContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 0, GroovyParserRULE_compilationUnit) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(302) + p.Nls() + } + p.SetState(304) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) == 1 { + { + p.SetState(303) + p.PackageDeclaration() + } + + } + p.SetState(307) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) == 1 { + { + p.SetState(306) + p.Sep() + } + + } + p.SetState(310) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 2, p.GetParserRuleContext()) == 1 { + { + p.SetState(309) + p.ScriptStatements() + } + + } + { + p.SetState(312) + p.Match(GroovyParserEOF) + } + + return localctx +} + +// IScriptStatementsContext is an interface to support dynamic dispatch. +type IScriptStatementsContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsScriptStatementsContext differentiates from other interfaces. + IsScriptStatementsContext() +} + +type ScriptStatementsContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyScriptStatementsContext() *ScriptStatementsContext { + var p = new(ScriptStatementsContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = GroovyParserRULE_scriptStatements + return p +} + +func (*ScriptStatementsContext) IsScriptStatementsContext() {} + +func NewScriptStatementsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ScriptStatementsContext { + var p = new(ScriptStatementsContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = GroovyParserRULE_scriptStatements + + return p +} + +func (s *ScriptStatementsContext) GetParser() antlr.Parser { return s.parser } + +func (s *ScriptStatementsContext) AllScriptStatement() []IScriptStatementContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IScriptStatementContext)(nil)).Elem()) + var tst = make([]IScriptStatementContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IScriptStatementContext) + } + } + + return tst +} + +func (s *ScriptStatementsContext) ScriptStatement(i int) IScriptStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IScriptStatementContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IScriptStatementContext) +} + +func (s *ScriptStatementsContext) AllSep() []ISepContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ISepContext)(nil)).Elem()) + var tst = make([]ISepContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(ISepContext) + } + } + + return tst +} + +func (s *ScriptStatementsContext) Sep(i int) ISepContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISepContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(ISepContext) +} + +func (s *ScriptStatementsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ScriptStatementsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ScriptStatementsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.EnterScriptStatements(s) + } +} + +func (s *ScriptStatementsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.ExitScriptStatements(s) + } +} + +func (p *GroovyParser) ScriptStatements() (localctx IScriptStatementsContext) { + localctx = NewScriptStatementsContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 2, GroovyParserRULE_scriptStatements) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + var _alt int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(314) + p.ScriptStatement() + } + p.SetState(320) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) + + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(315) + p.Sep() + } + { + p.SetState(316) + p.ScriptStatement() + } + + } + p.SetState(322) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) + } + p.SetState(324) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if _la == GroovyParserSEMI || _la == GroovyParserNL { + { + p.SetState(323) + p.Sep() + } + + } + + return localctx +} + +// IScriptStatementContext is an interface to support dynamic dispatch. +type IScriptStatementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsScriptStatementContext differentiates from other interfaces. + IsScriptStatementContext() +} + +type ScriptStatementContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyScriptStatementContext() *ScriptStatementContext { + var p = new(ScriptStatementContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = GroovyParserRULE_scriptStatement + return p +} + +func (*ScriptStatementContext) IsScriptStatementContext() {} + +func NewScriptStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ScriptStatementContext { + var p = new(ScriptStatementContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = GroovyParserRULE_scriptStatement + + return p +} + +func (s *ScriptStatementContext) GetParser() antlr.Parser { return s.parser } + +func (s *ScriptStatementContext) ImportDeclaration() IImportDeclarationContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportDeclarationContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IImportDeclarationContext) +} + +func (s *ScriptStatementContext) TypeDeclaration() ITypeDeclarationContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeDeclarationContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITypeDeclarationContext) +} + +func (s *ScriptStatementContext) Statement() IStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IStatementContext) +} + +func (s *ScriptStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ScriptStatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ScriptStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.EnterScriptStatement(s) + } +} + +func (s *ScriptStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.ExitScriptStatement(s) + } +} + +func (p *GroovyParser) ScriptStatement() (localctx IScriptStatementContext) { + localctx = NewScriptStatementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 4, GroovyParserRULE_scriptStatement) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.SetState(329) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(326) + p.ImportDeclaration() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(327) + p.TypeDeclaration() + } + + case 3: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(328) + p.Statement() + } + + } + + return localctx +} + +// IPackageDeclarationContext is an interface to support dynamic dispatch. +type IPackageDeclarationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsPackageDeclarationContext differentiates from other interfaces. + IsPackageDeclarationContext() +} + +type PackageDeclarationContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPackageDeclarationContext() *PackageDeclarationContext { + var p = new(PackageDeclarationContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = GroovyParserRULE_packageDeclaration + return p +} + +func (*PackageDeclarationContext) IsPackageDeclarationContext() {} + +func NewPackageDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PackageDeclarationContext { + var p = new(PackageDeclarationContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = GroovyParserRULE_packageDeclaration + + return p +} + +func (s *PackageDeclarationContext) GetParser() antlr.Parser { return s.parser } + +func (s *PackageDeclarationContext) AnnotationsOpt() IAnnotationsOptContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IAnnotationsOptContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IAnnotationsOptContext) +} + +func (s *PackageDeclarationContext) PACKAGE() antlr.TerminalNode { + return s.GetToken(GroovyParserPACKAGE, 0) +} + +func (s *PackageDeclarationContext) QualifiedName() IQualifiedNameContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IQualifiedNameContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *PackageDeclarationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PackageDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *PackageDeclarationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.EnterPackageDeclaration(s) + } +} + +func (s *PackageDeclarationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.ExitPackageDeclaration(s) + } +} + +func (p *GroovyParser) PackageDeclaration() (localctx IPackageDeclarationContext) { + localctx = NewPackageDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 6, GroovyParserRULE_packageDeclaration) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(331) + p.AnnotationsOpt() + } + { + p.SetState(332) + p.Match(GroovyParserPACKAGE) + } + { + p.SetState(333) + p.QualifiedName() + } + + return localctx +} + +// IImportDeclarationContext is an interface to support dynamic dispatch. +type IImportDeclarationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetAlias returns the alias rule contexts. + GetAlias() IIdentifierContext + + // SetAlias sets the alias rule contexts. + SetAlias(IIdentifierContext) + + // IsImportDeclarationContext differentiates from other interfaces. + IsImportDeclarationContext() +} + +type ImportDeclarationContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser + alias IIdentifierContext +} + +func NewEmptyImportDeclarationContext() *ImportDeclarationContext { + var p = new(ImportDeclarationContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = GroovyParserRULE_importDeclaration + return p +} + +func (*ImportDeclarationContext) IsImportDeclarationContext() {} + +func NewImportDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportDeclarationContext { + var p = new(ImportDeclarationContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = GroovyParserRULE_importDeclaration + + return p +} + +func (s *ImportDeclarationContext) GetParser() antlr.Parser { return s.parser } + +func (s *ImportDeclarationContext) GetAlias() IIdentifierContext { return s.alias } + +func (s *ImportDeclarationContext) SetAlias(v IIdentifierContext) { s.alias = v } + +func (s *ImportDeclarationContext) AnnotationsOpt() IAnnotationsOptContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IAnnotationsOptContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IAnnotationsOptContext) +} + +func (s *ImportDeclarationContext) IMPORT() antlr.TerminalNode { + return s.GetToken(GroovyParserIMPORT, 0) +} + +func (s *ImportDeclarationContext) QualifiedName() IQualifiedNameContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IQualifiedNameContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ImportDeclarationContext) STATIC() antlr.TerminalNode { + return s.GetToken(GroovyParserSTATIC, 0) +} + +func (s *ImportDeclarationContext) DOT() antlr.TerminalNode { + return s.GetToken(GroovyParserDOT, 0) +} + +func (s *ImportDeclarationContext) MUL() antlr.TerminalNode { + return s.GetToken(GroovyParserMUL, 0) +} + +func (s *ImportDeclarationContext) AS() antlr.TerminalNode { + return s.GetToken(GroovyParserAS, 0) +} + +func (s *ImportDeclarationContext) Identifier() IIdentifierContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IIdentifierContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ImportDeclarationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ImportDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ImportDeclarationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.EnterImportDeclaration(s) + } +} + +func (s *ImportDeclarationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.ExitImportDeclaration(s) + } +} + +func (p *GroovyParser) ImportDeclaration() (localctx IImportDeclarationContext) { + localctx = NewImportDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 8, GroovyParserRULE_importDeclaration) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(335) + p.AnnotationsOpt() + } + { + p.SetState(336) + p.Match(GroovyParserIMPORT) + } + p.SetState(338) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 6, p.GetParserRuleContext()) == 1 { + { + p.SetState(337) + p.Match(GroovyParserSTATIC) + } + + } + { + p.SetState(340) + p.QualifiedName() + } + p.SetState(345) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case GroovyParserDOT: + { + p.SetState(341) + p.Match(GroovyParserDOT) + } + { + p.SetState(342) + p.Match(GroovyParserMUL) + } + + case GroovyParserAS: + { + p.SetState(343) + p.Match(GroovyParserAS) + } + { + p.SetState(344) + + var _x = p.Identifier() + + localctx.(*ImportDeclarationContext).alias = _x + } + + case GroovyParserEOF, GroovyParserSEMI, GroovyParserNL: + + default: + } + + return localctx +} + +// ITypeDeclarationContext is an interface to support dynamic dispatch. +type ITypeDeclarationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsTypeDeclarationContext differentiates from other interfaces. + IsTypeDeclarationContext() +} + +type TypeDeclarationContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTypeDeclarationContext() *TypeDeclarationContext { + var p = new(TypeDeclarationContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = GroovyParserRULE_typeDeclaration + return p +} + +func (*TypeDeclarationContext) IsTypeDeclarationContext() {} + +func NewTypeDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeDeclarationContext { + var p = new(TypeDeclarationContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = GroovyParserRULE_typeDeclaration + + return p +} + +func (s *TypeDeclarationContext) GetParser() antlr.Parser { return s.parser } + +func (s *TypeDeclarationContext) ClassOrInterfaceModifiersOpt() IClassOrInterfaceModifiersOptContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IClassOrInterfaceModifiersOptContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IClassOrInterfaceModifiersOptContext) +} + +func (s *TypeDeclarationContext) ClassDeclaration() IClassDeclarationContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IClassDeclarationContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IClassDeclarationContext) +} + +func (s *TypeDeclarationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TypeDeclarationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.EnterTypeDeclaration(s) + } +} + +func (s *TypeDeclarationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.ExitTypeDeclaration(s) + } +} + +func (p *GroovyParser) TypeDeclaration() (localctx ITypeDeclarationContext) { + localctx = NewTypeDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 10, GroovyParserRULE_typeDeclaration) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(347) + p.ClassOrInterfaceModifiersOpt() + } + { + p.SetState(348) + p.ClassDeclaration() + } + + return localctx +} + +// IModifierContext is an interface to support dynamic dispatch. +type IModifierContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetM returns the m token. + GetM() antlr.Token + + // SetM sets the m token. + SetM(antlr.Token) + + // IsModifierContext differentiates from other interfaces. + IsModifierContext() +} + +type ModifierContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser + m antlr.Token +} + +func NewEmptyModifierContext() *ModifierContext { + var p = new(ModifierContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = GroovyParserRULE_modifier + return p +} + +func (*ModifierContext) IsModifierContext() {} + +func NewModifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ModifierContext { + var p = new(ModifierContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = GroovyParserRULE_modifier + + return p +} + +func (s *ModifierContext) GetParser() antlr.Parser { return s.parser } + +func (s *ModifierContext) GetM() antlr.Token { return s.m } + +func (s *ModifierContext) SetM(v antlr.Token) { s.m = v } + +func (s *ModifierContext) ClassOrInterfaceModifier() IClassOrInterfaceModifierContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IClassOrInterfaceModifierContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IClassOrInterfaceModifierContext) +} + +func (s *ModifierContext) NATIVE() antlr.TerminalNode { + return s.GetToken(GroovyParserNATIVE, 0) +} + +func (s *ModifierContext) SYNCHRONIZED() antlr.TerminalNode { + return s.GetToken(GroovyParserSYNCHRONIZED, 0) +} + +func (s *ModifierContext) TRANSIENT() antlr.TerminalNode { + return s.GetToken(GroovyParserTRANSIENT, 0) +} + +func (s *ModifierContext) VOLATILE() antlr.TerminalNode { + return s.GetToken(GroovyParserVOLATILE, 0) +} + +func (s *ModifierContext) DEF() antlr.TerminalNode { + return s.GetToken(GroovyParserDEF, 0) +} + +func (s *ModifierContext) VAR() antlr.TerminalNode { + return s.GetToken(GroovyParserVAR, 0) +} + +func (s *ModifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ModifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ModifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.EnterModifier(s) + } +} + +func (s *ModifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(GroovyParserListener); ok { + listenerT.ExitModifier(s) + } +} + +func (p *GroovyParser) Modifier() (localctx IModifierContext) { + localctx = NewModifierContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 12, GroovyParserRULE_modifier) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.SetState(352) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case GroovyParserABSTRACT, GroovyParserDEFAULT, GroovyParserFINAL, GroovyParserPRIVATE, GroovyParserPROTECTED, GroovyParserPUBLIC, GroovyParserSTATIC, GroovyParserSTRICTFP, GroovyParserAT: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(350) + p.ClassOrInterfaceModifier() + } + + case GroovyParserDEF, GroovyParserVAR, GroovyParserNATIVE, GroovyParserSYNCHRONIZED, GroovyParserTRANSIENT, GroovyParserVOLATILE: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(351) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*ModifierContext).m = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == GroovyParserDEF || _la == GroovyParserVAR || (((_la-36)&-(0x1f+1)) == 0 && ((1<>' +'<<' +'>>>' +'<' +'>' +'<=' +'>=' +'==' +'!=' +'===' +'!==' +'&' +'^' +'|' +'&&' +'||' +'*=' +'/=' +'%=' +'+=' +'-=' +'<<=' +'>>=' +'>>>=' +'&=' +'^=' +'|=' +'**=' +'=>' +'null' +null +null +null +null +null +null +null +null +null +null +'break' +'do' +'instanceof' +'typeof' +'case' +'else' +'new' +'var' +'catch' +'finally' +'return' +'void' +'continue' +'for' +'switch' +'while' +'debugger' +'function' +'this' +'with' +'default' +'if' +'throw' +'delete' +'in' +'try' +'as' +'from' +'class' +'enum' +'extends' +'super' +'const' +'export' +'import' +'async' +'await' +'implements' +'let' +'private' +'public' +'interface' +'package' +'protected' +'static' +'yield' +null +null +null +null +null +null +null +null + +token symbolic names: +null +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +PowerAssign +ARROW +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +BigHexIntegerLiteral +BigOctalIntegerLiteral +BigBinaryIntegerLiteral +BigDecimalIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +Class +Enum +Extends +Super +Const +Export +Import +Async +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter + +rule names: +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +PowerAssign +ARROW +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +BigHexIntegerLiteral +BigOctalIntegerLiteral +BigBinaryIntegerLiteral +BigDecimalIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +Class +Enum +Extends +Super +Const +Export +Import +Async +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter +DoubleStringCharacter +SingleStringCharacter +EscapeSequence +CharacterEscapeSequence +HexEscapeSequence +UnicodeEscapeSequence +ExtendedUnicodeEscapeSequence +SingleEscapeCharacter +NonEscapeCharacter +EscapeCharacter +LineContinuation +HexDigit +DecimalIntegerLiteral +ExponentPart +IdentifierPart +IdentifierStart +UnicodeLetter +UnicodeCombiningMark +UnicodeDigit +UnicodeConnectorPunctuation +RegularExpressionFirstChar +RegularExpressionChar +RegularExpressionClassChar +RegularExpressionBackslashSequence + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN +null +null +ERROR + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 125, 1156, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 303, 10, 2, 12, 2, 14, 2, 306, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 312, 10, 3, 12, 3, 14, 3, 315, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 326, 10, 4, 12, 4, 14, 4, 329, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 7, 5, 336, 10, 5, 12, 5, 14, 5, 339, 11, 5, 3, 5, 3, 5, 3, 5, 7, 5, 344, 10, 5, 12, 5, 14, 5, 347, 11, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 5, 61, 511, 10, 61, 3, 62, 3, 62, 3, 62, 3, 62, 7, 62, 517, 10, 62, 12, 62, 14, 62, 520, 11, 62, 3, 62, 5, 62, 523, 10, 62, 3, 62, 3, 62, 3, 62, 7, 62, 528, 10, 62, 12, 62, 14, 62, 531, 11, 62, 3, 62, 5, 62, 534, 10, 62, 3, 62, 3, 62, 5, 62, 538, 10, 62, 5, 62, 540, 10, 62, 3, 63, 3, 63, 3, 63, 3, 63, 7, 63, 546, 10, 63, 12, 63, 14, 63, 549, 11, 63, 3, 64, 3, 64, 6, 64, 553, 10, 64, 13, 64, 14, 64, 554, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 7, 65, 563, 10, 65, 12, 65, 14, 65, 566, 11, 65, 3, 66, 3, 66, 3, 66, 3, 66, 7, 66, 572, 10, 66, 12, 66, 14, 66, 575, 11, 66, 3, 67, 3, 67, 3, 67, 3, 67, 7, 67, 581, 10, 67, 12, 67, 14, 67, 584, 11, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 7, 68, 592, 10, 68, 12, 68, 14, 68, 595, 11, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 7, 69, 603, 10, 69, 12, 69, 14, 69, 606, 11, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 116, 3, 116, 3, 116, 3, 116, 3, 116, 3, 116, 3, 116, 3, 116, 3, 117, 3, 117, 7, 117, 925, 10, 117, 12, 117, 14, 117, 928, 11, 117, 3, 118, 3, 118, 7, 118, 932, 10, 118, 12, 118, 14, 118, 935, 11, 118, 3, 118, 3, 118, 3, 118, 7, 118, 940, 10, 118, 12, 118, 14, 118, 943, 11, 118, 3, 118, 5, 118, 946, 10, 118, 3, 118, 3, 118, 3, 119, 3, 119, 3, 119, 3, 119, 7, 119, 954, 10, 119, 12, 119, 14, 119, 957, 11, 119, 3, 119, 3, 119, 3, 120, 6, 120, 962, 10, 120, 13, 120, 14, 120, 963, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, 3, 121, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 7, 122, 978, 10, 122, 12, 122, 14, 122, 981, 11, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 7, 123, 1000, 10, 123, 12, 123, 14, 123, 1003, 11, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, 3, 125, 3, 125, 3, 125, 3, 125, 5, 125, 1019, 10, 125, 3, 126, 3, 126, 3, 126, 3, 126, 5, 126, 1025, 10, 126, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 5, 127, 1032, 10, 127, 3, 128, 3, 128, 5, 128, 1036, 10, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 6, 130, 1052, 10, 130, 13, 130, 14, 130, 1053, 3, 130, 3, 130, 5, 130, 1058, 10, 130, 3, 131, 3, 131, 3, 131, 6, 131, 1063, 10, 131, 13, 131, 14, 131, 1064, 3, 131, 3, 131, 3, 132, 3, 132, 3, 133, 3, 133, 3, 134, 3, 134, 5, 134, 1075, 10, 134, 3, 135, 3, 135, 3, 135, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 7, 137, 1085, 10, 137, 12, 137, 14, 137, 1088, 11, 137, 5, 137, 1090, 10, 137, 3, 138, 3, 138, 5, 138, 1094, 10, 138, 3, 138, 6, 138, 1097, 10, 138, 13, 138, 14, 138, 1098, 3, 139, 3, 139, 3, 139, 3, 139, 3, 139, 5, 139, 1106, 10, 139, 3, 140, 3, 140, 3, 140, 3, 140, 5, 140, 1112, 10, 140, 3, 141, 5, 141, 1115, 10, 141, 3, 142, 5, 142, 1118, 10, 142, 3, 143, 5, 143, 1121, 10, 143, 3, 144, 5, 144, 1124, 10, 144, 3, 145, 3, 145, 3, 145, 3, 145, 7, 145, 1130, 10, 145, 12, 145, 14, 145, 1133, 11, 145, 3, 145, 5, 145, 1136, 10, 145, 3, 146, 3, 146, 3, 146, 3, 146, 7, 146, 1142, 10, 146, 12, 146, 14, 146, 1145, 11, 146, 3, 146, 5, 146, 1148, 10, 146, 3, 147, 3, 147, 5, 147, 1152, 10, 147, 3, 148, 3, 148, 3, 148, 5, 313, 979, 1001, 2, 149, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 141, 72, 143, 73, 145, 74, 147, 75, 149, 76, 151, 77, 153, 78, 155, 79, 157, 80, 159, 81, 161, 82, 163, 83, 165, 84, 167, 85, 169, 86, 171, 87, 173, 88, 175, 89, 177, 90, 179, 91, 181, 92, 183, 93, 185, 94, 187, 95, 189, 96, 191, 97, 193, 98, 195, 99, 197, 100, 199, 101, 201, 102, 203, 103, 205, 104, 207, 105, 209, 106, 211, 107, 213, 108, 215, 109, 217, 110, 219, 111, 221, 112, 223, 113, 225, 114, 227, 115, 229, 116, 231, 117, 233, 118, 235, 119, 237, 120, 239, 121, 241, 122, 243, 123, 245, 124, 247, 125, 249, 2, 251, 2, 253, 2, 255, 2, 257, 2, 259, 2, 261, 2, 263, 2, 265, 2, 267, 2, 269, 2, 271, 2, 273, 2, 275, 2, 277, 2, 279, 2, 281, 2, 283, 2, 285, 2, 287, 2, 289, 2, 291, 2, 293, 2, 295, 2, 3, 2, 32, 5, 2, 12, 12, 15, 15, 8234, 8235, 3, 2, 50, 59, 4, 2, 50, 59, 97, 97, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 57, 4, 2, 81, 81, 113, 113, 4, 2, 50, 57, 97, 97, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 50, 51, 97, 97, 3, 2, 98, 98, 6, 2, 11, 11, 13, 14, 34, 34, 162, 162, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 11, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 14, 2, 12, 12, 15, 15, 36, 36, 41, 41, 50, 59, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 120, 122, 122, 5, 2, 50, 59, 119, 119, 122, 122, 6, 2, 50, 59, 67, 72, 97, 97, 99, 104, 3, 2, 51, 59, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 38, 38, 97, 97, 257, 2, 67, 92, 99, 124, 172, 172, 183, 183, 188, 188, 194, 216, 218, 248, 250, 545, 548, 565, 594, 687, 690, 698, 701, 707, 722, 723, 738, 742, 752, 752, 892, 892, 904, 904, 906, 908, 910, 910, 912, 931, 933, 976, 978, 985, 988, 1013, 1026, 1155, 1166, 1222, 1225, 1226, 1229, 1230, 1234, 1271, 1274, 1275, 1331, 1368, 1371, 1371, 1379, 1417, 1490, 1516, 1522, 1524, 1571, 1596, 1602, 1612, 1651, 1749, 1751, 1751, 1767, 1768, 1788, 1790, 1810, 1810, 1812, 1838, 1922, 1959, 2311, 2363, 2367, 2367, 2386, 2386, 2394, 2403, 2439, 2446, 2449, 2450, 2453, 2474, 2476, 2482, 2484, 2484, 2488, 2491, 2526, 2527, 2529, 2531, 2546, 2547, 2567, 2572, 2577, 2578, 2581, 2602, 2604, 2610, 2612, 2613, 2615, 2616, 2618, 2619, 2651, 2654, 2656, 2656, 2676, 2678, 2695, 2701, 2703, 2703, 2705, 2707, 2709, 2730, 2732, 2738, 2740, 2741, 2743, 2747, 2751, 2751, 2770, 2770, 2786, 2786, 2823, 2830, 2833, 2834, 2837, 2858, 2860, 2866, 2868, 2869, 2872, 2875, 2879, 2879, 2910, 2911, 2913, 2915, 2951, 2956, 2960, 2962, 2964, 2967, 2971, 2972, 2974, 2974, 2976, 2977, 2981, 2982, 2986, 2988, 2992, 2999, 3001, 3003, 3079, 3086, 3088, 3090, 3092, 3114, 3116, 3125, 3127, 3131, 3170, 3171, 3207, 3214, 3216, 3218, 3220, 3242, 3244, 3253, 3255, 3259, 3296, 3296, 3298, 3299, 3335, 3342, 3344, 3346, 3348, 3370, 3372, 3387, 3426, 3427, 3463, 3480, 3484, 3507, 3509, 3517, 3519, 3519, 3522, 3528, 3587, 3634, 3636, 3637, 3650, 3656, 3715, 3716, 3718, 3718, 3721, 3722, 3724, 3724, 3727, 3727, 3734, 3737, 3739, 3745, 3747, 3749, 3751, 3751, 3753, 3753, 3756, 3757, 3759, 3762, 3764, 3765, 3775, 3782, 3784, 3784, 3806, 3807, 3842, 3842, 3906, 3948, 3978, 3981, 4098, 4131, 4133, 4137, 4139, 4140, 4178, 4183, 4258, 4295, 4306, 4344, 4354, 4443, 4449, 4516, 4522, 4603, 4610, 4616, 4618, 4680, 4682, 4682, 4684, 4687, 4690, 4696, 4698, 4698, 4700, 4703, 4706, 4744, 4746, 4746, 4748, 4751, 4754, 4784, 4786, 4786, 4788, 4791, 4794, 4800, 4802, 4802, 4804, 4807, 4810, 4816, 4818, 4824, 4826, 4848, 4850, 4880, 4882, 4882, 4884, 4887, 4890, 4896, 4898, 4936, 4938, 4956, 5026, 5110, 5123, 5752, 5763, 5788, 5794, 5868, 6018, 6069, 6178, 6265, 6274, 6314, 7682, 7837, 7842, 7931, 7938, 7959, 7962, 7967, 7970, 8007, 8010, 8015, 8018, 8025, 8027, 8027, 8029, 8029, 8031, 8031, 8033, 8063, 8066, 8118, 8120, 8126, 8128, 8128, 8132, 8134, 8136, 8142, 8146, 8149, 8152, 8157, 8162, 8174, 8180, 8182, 8184, 8190, 8321, 8321, 8452, 8452, 8457, 8457, 8460, 8469, 8471, 8471, 8475, 8479, 8486, 8486, 8488, 8488, 8490, 8490, 8492, 8495, 8497, 8499, 8501, 8507, 8546, 8581, 12295, 12297, 12323, 12331, 12339, 12343, 12346, 12348, 12355, 12438, 12447, 12448, 12451, 12540, 12542, 12544, 12551, 12590, 12595, 12688, 12706, 12729, 13314, 19905, 19970, 42126, 44034, 44034, 55205, 55205, 63746, 64047, 64258, 64264, 64277, 64281, 64287, 64287, 64289, 64298, 64300, 64312, 64314, 64318, 64320, 64320, 64322, 64323, 64325, 64326, 64328, 64435, 64469, 64831, 64850, 64913, 64916, 64969, 65010, 65021, 65138, 65140, 65142, 65142, 65144, 65278, 65315, 65340, 65347, 65372, 65384, 65472, 65476, 65481, 65484, 65489, 65492, 65497, 65500, 65502, 102, 2, 770, 848, 866, 868, 1157, 1160, 1427, 1443, 1445, 1467, 1469, 1471, 1473, 1473, 1475, 1476, 1478, 1478, 1613, 1623, 1650, 1650, 1752, 1758, 1761, 1766, 1769, 1770, 1772, 1775, 1811, 1811, 1842, 1868, 1960, 1970, 2307, 2309, 2366, 2366, 2368, 2383, 2387, 2390, 2404, 2405, 2435, 2437, 2494, 2502, 2505, 2506, 2509, 2511, 2521, 2521, 2532, 2533, 2564, 2564, 2622, 2622, 2624, 2628, 2633, 2634, 2637, 2639, 2674, 2675, 2691, 2693, 2750, 2750, 2752, 2759, 2761, 2763, 2765, 2767, 2819, 2821, 2878, 2878, 2880, 2885, 2889, 2890, 2893, 2895, 2904, 2905, 2948, 2949, 3008, 3012, 3016, 3018, 3020, 3023, 3033, 3033, 3075, 3077, 3136, 3142, 3144, 3146, 3148, 3151, 3159, 3160, 3204, 3205, 3264, 3270, 3272, 3274, 3276, 3279, 3287, 3288, 3332, 3333, 3392, 3397, 3400, 3402, 3404, 3407, 3417, 3417, 3460, 3461, 3532, 3532, 3537, 3542, 3544, 3544, 3546, 3553, 3572, 3573, 3635, 3635, 3638, 3644, 3657, 3664, 3763, 3763, 3766, 3771, 3773, 3774, 3786, 3791, 3866, 3867, 3895, 3895, 3897, 3897, 3899, 3899, 3904, 3905, 3955, 3974, 3976, 3977, 3986, 3993, 3995, 4030, 4040, 4040, 4142, 4148, 4152, 4155, 4184, 4187, 6070, 6101, 6315, 6315, 8402, 8414, 8419, 8419, 12332, 12337, 12443, 12444, 64288, 64288, 65058, 65061, 22, 2, 50, 59, 1634, 1643, 1778, 1787, 2408, 2417, 2536, 2545, 2664, 2673, 2792, 2801, 2920, 2929, 3049, 3057, 3176, 3185, 3304, 3313, 3432, 3441, 3666, 3675, 3794, 3803, 3874, 3883, 4162, 4171, 4971, 4979, 6114, 6123, 6162, 6171, 65298, 65307, 9, 2, 97, 97, 8257, 8258, 12541, 12541, 65077, 65078, 65103, 65105, 65345, 65345, 65383, 65383, 8, 2, 12, 12, 15, 15, 44, 44, 49, 49, 93, 94, 8234, 8235, 7, 2, 12, 12, 15, 15, 49, 49, 93, 94, 8234, 8235, 6, 2, 12, 12, 15, 15, 94, 95, 8234, 8235, 2, 1190, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 2, 197, 3, 2, 2, 2, 2, 199, 3, 2, 2, 2, 2, 201, 3, 2, 2, 2, 2, 203, 3, 2, 2, 2, 2, 205, 3, 2, 2, 2, 2, 207, 3, 2, 2, 2, 2, 209, 3, 2, 2, 2, 2, 211, 3, 2, 2, 2, 2, 213, 3, 2, 2, 2, 2, 215, 3, 2, 2, 2, 2, 217, 3, 2, 2, 2, 2, 219, 3, 2, 2, 2, 2, 221, 3, 2, 2, 2, 2, 223, 3, 2, 2, 2, 2, 225, 3, 2, 2, 2, 2, 227, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 231, 3, 2, 2, 2, 2, 233, 3, 2, 2, 2, 2, 235, 3, 2, 2, 2, 2, 237, 3, 2, 2, 2, 2, 239, 3, 2, 2, 2, 2, 241, 3, 2, 2, 2, 2, 243, 3, 2, 2, 2, 2, 245, 3, 2, 2, 2, 2, 247, 3, 2, 2, 2, 3, 297, 3, 2, 2, 2, 5, 307, 3, 2, 2, 2, 7, 321, 3, 2, 2, 2, 9, 332, 3, 2, 2, 2, 11, 348, 3, 2, 2, 2, 13, 350, 3, 2, 2, 2, 15, 352, 3, 2, 2, 2, 17, 354, 3, 2, 2, 2, 19, 356, 3, 2, 2, 2, 21, 359, 3, 2, 2, 2, 23, 362, 3, 2, 2, 2, 25, 364, 3, 2, 2, 2, 27, 366, 3, 2, 2, 2, 29, 368, 3, 2, 2, 2, 31, 370, 3, 2, 2, 2, 33, 372, 3, 2, 2, 2, 35, 376, 3, 2, 2, 2, 37, 378, 3, 2, 2, 2, 39, 381, 3, 2, 2, 2, 41, 384, 3, 2, 2, 2, 43, 386, 3, 2, 2, 2, 45, 388, 3, 2, 2, 2, 47, 390, 3, 2, 2, 2, 49, 392, 3, 2, 2, 2, 51, 394, 3, 2, 2, 2, 53, 396, 3, 2, 2, 2, 55, 398, 3, 2, 2, 2, 57, 401, 3, 2, 2, 2, 59, 404, 3, 2, 2, 2, 61, 406, 3, 2, 2, 2, 63, 409, 3, 2, 2, 2, 65, 412, 3, 2, 2, 2, 67, 416, 3, 2, 2, 2, 69, 418, 3, 2, 2, 2, 71, 420, 3, 2, 2, 2, 73, 423, 3, 2, 2, 2, 75, 426, 3, 2, 2, 2, 77, 429, 3, 2, 2, 2, 79, 432, 3, 2, 2, 2, 81, 436, 3, 2, 2, 2, 83, 440, 3, 2, 2, 2, 85, 442, 3, 2, 2, 2, 87, 444, 3, 2, 2, 2, 89, 446, 3, 2, 2, 2, 91, 449, 3, 2, 2, 2, 93, 452, 3, 2, 2, 2, 95, 455, 3, 2, 2, 2, 97, 458, 3, 2, 2, 2, 99, 461, 3, 2, 2, 2, 101, 464, 3, 2, 2, 2, 103, 467, 3, 2, 2, 2, 105, 471, 3, 2, 2, 2, 107, 475, 3, 2, 2, 2, 109, 480, 3, 2, 2, 2, 111, 483, 3, 2, 2, 2, 113, 486, 3, 2, 2, 2, 115, 489, 3, 2, 2, 2, 117, 493, 3, 2, 2, 2, 119, 496, 3, 2, 2, 2, 121, 510, 3, 2, 2, 2, 123, 539, 3, 2, 2, 2, 125, 541, 3, 2, 2, 2, 127, 550, 3, 2, 2, 2, 129, 558, 3, 2, 2, 2, 131, 567, 3, 2, 2, 2, 133, 576, 3, 2, 2, 2, 135, 587, 3, 2, 2, 2, 137, 598, 3, 2, 2, 2, 139, 609, 3, 2, 2, 2, 141, 612, 3, 2, 2, 2, 143, 618, 3, 2, 2, 2, 145, 621, 3, 2, 2, 2, 147, 632, 3, 2, 2, 2, 149, 639, 3, 2, 2, 2, 151, 644, 3, 2, 2, 2, 153, 649, 3, 2, 2, 2, 155, 653, 3, 2, 2, 2, 157, 657, 3, 2, 2, 2, 159, 663, 3, 2, 2, 2, 161, 671, 3, 2, 2, 2, 163, 678, 3, 2, 2, 2, 165, 683, 3, 2, 2, 2, 167, 692, 3, 2, 2, 2, 169, 696, 3, 2, 2, 2, 171, 703, 3, 2, 2, 2, 173, 709, 3, 2, 2, 2, 175, 718, 3, 2, 2, 2, 177, 727, 3, 2, 2, 2, 179, 732, 3, 2, 2, 2, 181, 737, 3, 2, 2, 2, 183, 745, 3, 2, 2, 2, 185, 748, 3, 2, 2, 2, 187, 754, 3, 2, 2, 2, 189, 761, 3, 2, 2, 2, 191, 764, 3, 2, 2, 2, 193, 768, 3, 2, 2, 2, 195, 771, 3, 2, 2, 2, 197, 776, 3, 2, 2, 2, 199, 782, 3, 2, 2, 2, 201, 787, 3, 2, 2, 2, 203, 795, 3, 2, 2, 2, 205, 801, 3, 2, 2, 2, 207, 807, 3, 2, 2, 2, 209, 814, 3, 2, 2, 2, 211, 821, 3, 2, 2, 2, 213, 827, 3, 2, 2, 2, 215, 833, 3, 2, 2, 2, 217, 846, 3, 2, 2, 2, 219, 852, 3, 2, 2, 2, 221, 862, 3, 2, 2, 2, 223, 871, 3, 2, 2, 2, 225, 883, 3, 2, 2, 2, 227, 893, 3, 2, 2, 2, 229, 905, 3, 2, 2, 2, 231, 914, 3, 2, 2, 2, 233, 922, 3, 2, 2, 2, 235, 945, 3, 2, 2, 2, 237, 949, 3, 2, 2, 2, 239, 961, 3, 2, 2, 2, 241, 967, 3, 2, 2, 2, 243, 971, 3, 2, 2, 2, 245, 988, 3, 2, 2, 2, 247, 1010, 3, 2, 2, 2, 249, 1018, 3, 2, 2, 2, 251, 1024, 3, 2, 2, 2, 253, 1031, 3, 2, 2, 2, 255, 1035, 3, 2, 2, 2, 257, 1037, 3, 2, 2, 2, 259, 1057, 3, 2, 2, 2, 261, 1059, 3, 2, 2, 2, 263, 1068, 3, 2, 2, 2, 265, 1070, 3, 2, 2, 2, 267, 1074, 3, 2, 2, 2, 269, 1076, 3, 2, 2, 2, 271, 1079, 3, 2, 2, 2, 273, 1089, 3, 2, 2, 2, 275, 1091, 3, 2, 2, 2, 277, 1105, 3, 2, 2, 2, 279, 1111, 3, 2, 2, 2, 281, 1114, 3, 2, 2, 2, 283, 1117, 3, 2, 2, 2, 285, 1120, 3, 2, 2, 2, 287, 1123, 3, 2, 2, 2, 289, 1135, 3, 2, 2, 2, 291, 1147, 3, 2, 2, 2, 293, 1151, 3, 2, 2, 2, 295, 1153, 3, 2, 2, 2, 297, 298, 6, 2, 2, 2, 298, 299, 7, 37, 2, 2, 299, 300, 7, 35, 2, 2, 300, 304, 3, 2, 2, 2, 301, 303, 10, 2, 2, 2, 302, 301, 3, 2, 2, 2, 303, 306, 3, 2, 2, 2, 304, 302, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, 305, 4, 3, 2, 2, 2, 306, 304, 3, 2, 2, 2, 307, 308, 7, 49, 2, 2, 308, 309, 7, 44, 2, 2, 309, 313, 3, 2, 2, 2, 310, 312, 11, 2, 2, 2, 311, 310, 3, 2, 2, 2, 312, 315, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, 313, 311, 3, 2, 2, 2, 314, 316, 3, 2, 2, 2, 315, 313, 3, 2, 2, 2, 316, 317, 7, 44, 2, 2, 317, 318, 7, 49, 2, 2, 318, 319, 3, 2, 2, 2, 319, 320, 8, 3, 2, 2, 320, 6, 3, 2, 2, 2, 321, 322, 7, 49, 2, 2, 322, 323, 7, 49, 2, 2, 323, 327, 3, 2, 2, 2, 324, 326, 10, 2, 2, 2, 325, 324, 3, 2, 2, 2, 326, 329, 3, 2, 2, 2, 327, 325, 3, 2, 2, 2, 327, 328, 3, 2, 2, 2, 328, 330, 3, 2, 2, 2, 329, 327, 3, 2, 2, 2, 330, 331, 8, 4, 2, 2, 331, 8, 3, 2, 2, 2, 332, 333, 7, 49, 2, 2, 333, 337, 5, 289, 145, 2, 334, 336, 5, 291, 146, 2, 335, 334, 3, 2, 2, 2, 336, 339, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 337, 338, 3, 2, 2, 2, 338, 340, 3, 2, 2, 2, 339, 337, 3, 2, 2, 2, 340, 341, 6, 5, 3, 2, 341, 345, 7, 49, 2, 2, 342, 344, 5, 277, 139, 2, 343, 342, 3, 2, 2, 2, 344, 347, 3, 2, 2, 2, 345, 343, 3, 2, 2, 2, 345, 346, 3, 2, 2, 2, 346, 10, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 348, 349, 7, 93, 2, 2, 349, 12, 3, 2, 2, 2, 350, 351, 7, 95, 2, 2, 351, 14, 3, 2, 2, 2, 352, 353, 7, 42, 2, 2, 353, 16, 3, 2, 2, 2, 354, 355, 7, 43, 2, 2, 355, 18, 3, 2, 2, 2, 356, 357, 7, 125, 2, 2, 357, 358, 8, 10, 3, 2, 358, 20, 3, 2, 2, 2, 359, 360, 7, 127, 2, 2, 360, 361, 8, 11, 4, 2, 361, 22, 3, 2, 2, 2, 362, 363, 7, 61, 2, 2, 363, 24, 3, 2, 2, 2, 364, 365, 7, 46, 2, 2, 365, 26, 3, 2, 2, 2, 366, 367, 7, 63, 2, 2, 367, 28, 3, 2, 2, 2, 368, 369, 7, 65, 2, 2, 369, 30, 3, 2, 2, 2, 370, 371, 7, 60, 2, 2, 371, 32, 3, 2, 2, 2, 372, 373, 7, 48, 2, 2, 373, 374, 7, 48, 2, 2, 374, 375, 7, 48, 2, 2, 375, 34, 3, 2, 2, 2, 376, 377, 7, 48, 2, 2, 377, 36, 3, 2, 2, 2, 378, 379, 7, 45, 2, 2, 379, 380, 7, 45, 2, 2, 380, 38, 3, 2, 2, 2, 381, 382, 7, 47, 2, 2, 382, 383, 7, 47, 2, 2, 383, 40, 3, 2, 2, 2, 384, 385, 7, 45, 2, 2, 385, 42, 3, 2, 2, 2, 386, 387, 7, 47, 2, 2, 387, 44, 3, 2, 2, 2, 388, 389, 7, 128, 2, 2, 389, 46, 3, 2, 2, 2, 390, 391, 7, 35, 2, 2, 391, 48, 3, 2, 2, 2, 392, 393, 7, 44, 2, 2, 393, 50, 3, 2, 2, 2, 394, 395, 7, 49, 2, 2, 395, 52, 3, 2, 2, 2, 396, 397, 7, 39, 2, 2, 397, 54, 3, 2, 2, 2, 398, 399, 7, 44, 2, 2, 399, 400, 7, 44, 2, 2, 400, 56, 3, 2, 2, 2, 401, 402, 7, 65, 2, 2, 402, 403, 7, 65, 2, 2, 403, 58, 3, 2, 2, 2, 404, 405, 7, 37, 2, 2, 405, 60, 3, 2, 2, 2, 406, 407, 7, 64, 2, 2, 407, 408, 7, 64, 2, 2, 408, 62, 3, 2, 2, 2, 409, 410, 7, 62, 2, 2, 410, 411, 7, 62, 2, 2, 411, 64, 3, 2, 2, 2, 412, 413, 7, 64, 2, 2, 413, 414, 7, 64, 2, 2, 414, 415, 7, 64, 2, 2, 415, 66, 3, 2, 2, 2, 416, 417, 7, 62, 2, 2, 417, 68, 3, 2, 2, 2, 418, 419, 7, 64, 2, 2, 419, 70, 3, 2, 2, 2, 420, 421, 7, 62, 2, 2, 421, 422, 7, 63, 2, 2, 422, 72, 3, 2, 2, 2, 423, 424, 7, 64, 2, 2, 424, 425, 7, 63, 2, 2, 425, 74, 3, 2, 2, 2, 426, 427, 7, 63, 2, 2, 427, 428, 7, 63, 2, 2, 428, 76, 3, 2, 2, 2, 429, 430, 7, 35, 2, 2, 430, 431, 7, 63, 2, 2, 431, 78, 3, 2, 2, 2, 432, 433, 7, 63, 2, 2, 433, 434, 7, 63, 2, 2, 434, 435, 7, 63, 2, 2, 435, 80, 3, 2, 2, 2, 436, 437, 7, 35, 2, 2, 437, 438, 7, 63, 2, 2, 438, 439, 7, 63, 2, 2, 439, 82, 3, 2, 2, 2, 440, 441, 7, 40, 2, 2, 441, 84, 3, 2, 2, 2, 442, 443, 7, 96, 2, 2, 443, 86, 3, 2, 2, 2, 444, 445, 7, 126, 2, 2, 445, 88, 3, 2, 2, 2, 446, 447, 7, 40, 2, 2, 447, 448, 7, 40, 2, 2, 448, 90, 3, 2, 2, 2, 449, 450, 7, 126, 2, 2, 450, 451, 7, 126, 2, 2, 451, 92, 3, 2, 2, 2, 452, 453, 7, 44, 2, 2, 453, 454, 7, 63, 2, 2, 454, 94, 3, 2, 2, 2, 455, 456, 7, 49, 2, 2, 456, 457, 7, 63, 2, 2, 457, 96, 3, 2, 2, 2, 458, 459, 7, 39, 2, 2, 459, 460, 7, 63, 2, 2, 460, 98, 3, 2, 2, 2, 461, 462, 7, 45, 2, 2, 462, 463, 7, 63, 2, 2, 463, 100, 3, 2, 2, 2, 464, 465, 7, 47, 2, 2, 465, 466, 7, 63, 2, 2, 466, 102, 3, 2, 2, 2, 467, 468, 7, 62, 2, 2, 468, 469, 7, 62, 2, 2, 469, 470, 7, 63, 2, 2, 470, 104, 3, 2, 2, 2, 471, 472, 7, 64, 2, 2, 472, 473, 7, 64, 2, 2, 473, 474, 7, 63, 2, 2, 474, 106, 3, 2, 2, 2, 475, 476, 7, 64, 2, 2, 476, 477, 7, 64, 2, 2, 477, 478, 7, 64, 2, 2, 478, 479, 7, 63, 2, 2, 479, 108, 3, 2, 2, 2, 480, 481, 7, 40, 2, 2, 481, 482, 7, 63, 2, 2, 482, 110, 3, 2, 2, 2, 483, 484, 7, 96, 2, 2, 484, 485, 7, 63, 2, 2, 485, 112, 3, 2, 2, 2, 486, 487, 7, 126, 2, 2, 487, 488, 7, 63, 2, 2, 488, 114, 3, 2, 2, 2, 489, 490, 7, 44, 2, 2, 490, 491, 7, 44, 2, 2, 491, 492, 7, 63, 2, 2, 492, 116, 3, 2, 2, 2, 493, 494, 7, 63, 2, 2, 494, 495, 7, 64, 2, 2, 495, 118, 3, 2, 2, 2, 496, 497, 7, 112, 2, 2, 497, 498, 7, 119, 2, 2, 498, 499, 7, 110, 2, 2, 499, 500, 7, 110, 2, 2, 500, 120, 3, 2, 2, 2, 501, 502, 7, 118, 2, 2, 502, 503, 7, 116, 2, 2, 503, 504, 7, 119, 2, 2, 504, 511, 7, 103, 2, 2, 505, 506, 7, 104, 2, 2, 506, 507, 7, 99, 2, 2, 507, 508, 7, 110, 2, 2, 508, 509, 7, 117, 2, 2, 509, 511, 7, 103, 2, 2, 510, 501, 3, 2, 2, 2, 510, 505, 3, 2, 2, 2, 511, 122, 3, 2, 2, 2, 512, 513, 5, 273, 137, 2, 513, 514, 7, 48, 2, 2, 514, 518, 9, 3, 2, 2, 515, 517, 9, 4, 2, 2, 516, 515, 3, 2, 2, 2, 517, 520, 3, 2, 2, 2, 518, 516, 3, 2, 2, 2, 518, 519, 3, 2, 2, 2, 519, 522, 3, 2, 2, 2, 520, 518, 3, 2, 2, 2, 521, 523, 5, 275, 138, 2, 522, 521, 3, 2, 2, 2, 522, 523, 3, 2, 2, 2, 523, 540, 3, 2, 2, 2, 524, 525, 7, 48, 2, 2, 525, 529, 9, 3, 2, 2, 526, 528, 9, 4, 2, 2, 527, 526, 3, 2, 2, 2, 528, 531, 3, 2, 2, 2, 529, 527, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 533, 3, 2, 2, 2, 531, 529, 3, 2, 2, 2, 532, 534, 5, 275, 138, 2, 533, 532, 3, 2, 2, 2, 533, 534, 3, 2, 2, 2, 534, 540, 3, 2, 2, 2, 535, 537, 5, 273, 137, 2, 536, 538, 5, 275, 138, 2, 537, 536, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 540, 3, 2, 2, 2, 539, 512, 3, 2, 2, 2, 539, 524, 3, 2, 2, 2, 539, 535, 3, 2, 2, 2, 540, 124, 3, 2, 2, 2, 541, 542, 7, 50, 2, 2, 542, 543, 9, 5, 2, 2, 543, 547, 9, 6, 2, 2, 544, 546, 5, 271, 136, 2, 545, 544, 3, 2, 2, 2, 546, 549, 3, 2, 2, 2, 547, 545, 3, 2, 2, 2, 547, 548, 3, 2, 2, 2, 548, 126, 3, 2, 2, 2, 549, 547, 3, 2, 2, 2, 550, 552, 7, 50, 2, 2, 551, 553, 9, 7, 2, 2, 552, 551, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 552, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 556, 3, 2, 2, 2, 556, 557, 6, 64, 4, 2, 557, 128, 3, 2, 2, 2, 558, 559, 7, 50, 2, 2, 559, 560, 9, 8, 2, 2, 560, 564, 9, 7, 2, 2, 561, 563, 9, 9, 2, 2, 562, 561, 3, 2, 2, 2, 563, 566, 3, 2, 2, 2, 564, 562, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 130, 3, 2, 2, 2, 566, 564, 3, 2, 2, 2, 567, 568, 7, 50, 2, 2, 568, 569, 9, 10, 2, 2, 569, 573, 9, 11, 2, 2, 570, 572, 9, 12, 2, 2, 571, 570, 3, 2, 2, 2, 572, 575, 3, 2, 2, 2, 573, 571, 3, 2, 2, 2, 573, 574, 3, 2, 2, 2, 574, 132, 3, 2, 2, 2, 575, 573, 3, 2, 2, 2, 576, 577, 7, 50, 2, 2, 577, 578, 9, 5, 2, 2, 578, 582, 9, 6, 2, 2, 579, 581, 5, 271, 136, 2, 580, 579, 3, 2, 2, 2, 581, 584, 3, 2, 2, 2, 582, 580, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, 585, 3, 2, 2, 2, 584, 582, 3, 2, 2, 2, 585, 586, 7, 112, 2, 2, 586, 134, 3, 2, 2, 2, 587, 588, 7, 50, 2, 2, 588, 589, 9, 8, 2, 2, 589, 593, 9, 7, 2, 2, 590, 592, 9, 9, 2, 2, 591, 590, 3, 2, 2, 2, 592, 595, 3, 2, 2, 2, 593, 591, 3, 2, 2, 2, 593, 594, 3, 2, 2, 2, 594, 596, 3, 2, 2, 2, 595, 593, 3, 2, 2, 2, 596, 597, 7, 112, 2, 2, 597, 136, 3, 2, 2, 2, 598, 599, 7, 50, 2, 2, 599, 600, 9, 10, 2, 2, 600, 604, 9, 11, 2, 2, 601, 603, 9, 12, 2, 2, 602, 601, 3, 2, 2, 2, 603, 606, 3, 2, 2, 2, 604, 602, 3, 2, 2, 2, 604, 605, 3, 2, 2, 2, 605, 607, 3, 2, 2, 2, 606, 604, 3, 2, 2, 2, 607, 608, 7, 112, 2, 2, 608, 138, 3, 2, 2, 2, 609, 610, 5, 273, 137, 2, 610, 611, 7, 112, 2, 2, 611, 140, 3, 2, 2, 2, 612, 613, 7, 100, 2, 2, 613, 614, 7, 116, 2, 2, 614, 615, 7, 103, 2, 2, 615, 616, 7, 99, 2, 2, 616, 617, 7, 109, 2, 2, 617, 142, 3, 2, 2, 2, 618, 619, 7, 102, 2, 2, 619, 620, 7, 113, 2, 2, 620, 144, 3, 2, 2, 2, 621, 622, 7, 107, 2, 2, 622, 623, 7, 112, 2, 2, 623, 624, 7, 117, 2, 2, 624, 625, 7, 118, 2, 2, 625, 626, 7, 99, 2, 2, 626, 627, 7, 112, 2, 2, 627, 628, 7, 101, 2, 2, 628, 629, 7, 103, 2, 2, 629, 630, 7, 113, 2, 2, 630, 631, 7, 104, 2, 2, 631, 146, 3, 2, 2, 2, 632, 633, 7, 118, 2, 2, 633, 634, 7, 123, 2, 2, 634, 635, 7, 114, 2, 2, 635, 636, 7, 103, 2, 2, 636, 637, 7, 113, 2, 2, 637, 638, 7, 104, 2, 2, 638, 148, 3, 2, 2, 2, 639, 640, 7, 101, 2, 2, 640, 641, 7, 99, 2, 2, 641, 642, 7, 117, 2, 2, 642, 643, 7, 103, 2, 2, 643, 150, 3, 2, 2, 2, 644, 645, 7, 103, 2, 2, 645, 646, 7, 110, 2, 2, 646, 647, 7, 117, 2, 2, 647, 648, 7, 103, 2, 2, 648, 152, 3, 2, 2, 2, 649, 650, 7, 112, 2, 2, 650, 651, 7, 103, 2, 2, 651, 652, 7, 121, 2, 2, 652, 154, 3, 2, 2, 2, 653, 654, 7, 120, 2, 2, 654, 655, 7, 99, 2, 2, 655, 656, 7, 116, 2, 2, 656, 156, 3, 2, 2, 2, 657, 658, 7, 101, 2, 2, 658, 659, 7, 99, 2, 2, 659, 660, 7, 118, 2, 2, 660, 661, 7, 101, 2, 2, 661, 662, 7, 106, 2, 2, 662, 158, 3, 2, 2, 2, 663, 664, 7, 104, 2, 2, 664, 665, 7, 107, 2, 2, 665, 666, 7, 112, 2, 2, 666, 667, 7, 99, 2, 2, 667, 668, 7, 110, 2, 2, 668, 669, 7, 110, 2, 2, 669, 670, 7, 123, 2, 2, 670, 160, 3, 2, 2, 2, 671, 672, 7, 116, 2, 2, 672, 673, 7, 103, 2, 2, 673, 674, 7, 118, 2, 2, 674, 675, 7, 119, 2, 2, 675, 676, 7, 116, 2, 2, 676, 677, 7, 112, 2, 2, 677, 162, 3, 2, 2, 2, 678, 679, 7, 120, 2, 2, 679, 680, 7, 113, 2, 2, 680, 681, 7, 107, 2, 2, 681, 682, 7, 102, 2, 2, 682, 164, 3, 2, 2, 2, 683, 684, 7, 101, 2, 2, 684, 685, 7, 113, 2, 2, 685, 686, 7, 112, 2, 2, 686, 687, 7, 118, 2, 2, 687, 688, 7, 107, 2, 2, 688, 689, 7, 112, 2, 2, 689, 690, 7, 119, 2, 2, 690, 691, 7, 103, 2, 2, 691, 166, 3, 2, 2, 2, 692, 693, 7, 104, 2, 2, 693, 694, 7, 113, 2, 2, 694, 695, 7, 116, 2, 2, 695, 168, 3, 2, 2, 2, 696, 697, 7, 117, 2, 2, 697, 698, 7, 121, 2, 2, 698, 699, 7, 107, 2, 2, 699, 700, 7, 118, 2, 2, 700, 701, 7, 101, 2, 2, 701, 702, 7, 106, 2, 2, 702, 170, 3, 2, 2, 2, 703, 704, 7, 121, 2, 2, 704, 705, 7, 106, 2, 2, 705, 706, 7, 107, 2, 2, 706, 707, 7, 110, 2, 2, 707, 708, 7, 103, 2, 2, 708, 172, 3, 2, 2, 2, 709, 710, 7, 102, 2, 2, 710, 711, 7, 103, 2, 2, 711, 712, 7, 100, 2, 2, 712, 713, 7, 119, 2, 2, 713, 714, 7, 105, 2, 2, 714, 715, 7, 105, 2, 2, 715, 716, 7, 103, 2, 2, 716, 717, 7, 116, 2, 2, 717, 174, 3, 2, 2, 2, 718, 719, 7, 104, 2, 2, 719, 720, 7, 119, 2, 2, 720, 721, 7, 112, 2, 2, 721, 722, 7, 101, 2, 2, 722, 723, 7, 118, 2, 2, 723, 724, 7, 107, 2, 2, 724, 725, 7, 113, 2, 2, 725, 726, 7, 112, 2, 2, 726, 176, 3, 2, 2, 2, 727, 728, 7, 118, 2, 2, 728, 729, 7, 106, 2, 2, 729, 730, 7, 107, 2, 2, 730, 731, 7, 117, 2, 2, 731, 178, 3, 2, 2, 2, 732, 733, 7, 121, 2, 2, 733, 734, 7, 107, 2, 2, 734, 735, 7, 118, 2, 2, 735, 736, 7, 106, 2, 2, 736, 180, 3, 2, 2, 2, 737, 738, 7, 102, 2, 2, 738, 739, 7, 103, 2, 2, 739, 740, 7, 104, 2, 2, 740, 741, 7, 99, 2, 2, 741, 742, 7, 119, 2, 2, 742, 743, 7, 110, 2, 2, 743, 744, 7, 118, 2, 2, 744, 182, 3, 2, 2, 2, 745, 746, 7, 107, 2, 2, 746, 747, 7, 104, 2, 2, 747, 184, 3, 2, 2, 2, 748, 749, 7, 118, 2, 2, 749, 750, 7, 106, 2, 2, 750, 751, 7, 116, 2, 2, 751, 752, 7, 113, 2, 2, 752, 753, 7, 121, 2, 2, 753, 186, 3, 2, 2, 2, 754, 755, 7, 102, 2, 2, 755, 756, 7, 103, 2, 2, 756, 757, 7, 110, 2, 2, 757, 758, 7, 103, 2, 2, 758, 759, 7, 118, 2, 2, 759, 760, 7, 103, 2, 2, 760, 188, 3, 2, 2, 2, 761, 762, 7, 107, 2, 2, 762, 763, 7, 112, 2, 2, 763, 190, 3, 2, 2, 2, 764, 765, 7, 118, 2, 2, 765, 766, 7, 116, 2, 2, 766, 767, 7, 123, 2, 2, 767, 192, 3, 2, 2, 2, 768, 769, 7, 99, 2, 2, 769, 770, 7, 117, 2, 2, 770, 194, 3, 2, 2, 2, 771, 772, 7, 104, 2, 2, 772, 773, 7, 116, 2, 2, 773, 774, 7, 113, 2, 2, 774, 775, 7, 111, 2, 2, 775, 196, 3, 2, 2, 2, 776, 777, 7, 101, 2, 2, 777, 778, 7, 110, 2, 2, 778, 779, 7, 99, 2, 2, 779, 780, 7, 117, 2, 2, 780, 781, 7, 117, 2, 2, 781, 198, 3, 2, 2, 2, 782, 783, 7, 103, 2, 2, 783, 784, 7, 112, 2, 2, 784, 785, 7, 119, 2, 2, 785, 786, 7, 111, 2, 2, 786, 200, 3, 2, 2, 2, 787, 788, 7, 103, 2, 2, 788, 789, 7, 122, 2, 2, 789, 790, 7, 118, 2, 2, 790, 791, 7, 103, 2, 2, 791, 792, 7, 112, 2, 2, 792, 793, 7, 102, 2, 2, 793, 794, 7, 117, 2, 2, 794, 202, 3, 2, 2, 2, 795, 796, 7, 117, 2, 2, 796, 797, 7, 119, 2, 2, 797, 798, 7, 114, 2, 2, 798, 799, 7, 103, 2, 2, 799, 800, 7, 116, 2, 2, 800, 204, 3, 2, 2, 2, 801, 802, 7, 101, 2, 2, 802, 803, 7, 113, 2, 2, 803, 804, 7, 112, 2, 2, 804, 805, 7, 117, 2, 2, 805, 806, 7, 118, 2, 2, 806, 206, 3, 2, 2, 2, 807, 808, 7, 103, 2, 2, 808, 809, 7, 122, 2, 2, 809, 810, 7, 114, 2, 2, 810, 811, 7, 113, 2, 2, 811, 812, 7, 116, 2, 2, 812, 813, 7, 118, 2, 2, 813, 208, 3, 2, 2, 2, 814, 815, 7, 107, 2, 2, 815, 816, 7, 111, 2, 2, 816, 817, 7, 114, 2, 2, 817, 818, 7, 113, 2, 2, 818, 819, 7, 116, 2, 2, 819, 820, 7, 118, 2, 2, 820, 210, 3, 2, 2, 2, 821, 822, 7, 99, 2, 2, 822, 823, 7, 117, 2, 2, 823, 824, 7, 123, 2, 2, 824, 825, 7, 112, 2, 2, 825, 826, 7, 101, 2, 2, 826, 212, 3, 2, 2, 2, 827, 828, 7, 99, 2, 2, 828, 829, 7, 121, 2, 2, 829, 830, 7, 99, 2, 2, 830, 831, 7, 107, 2, 2, 831, 832, 7, 118, 2, 2, 832, 214, 3, 2, 2, 2, 833, 834, 7, 107, 2, 2, 834, 835, 7, 111, 2, 2, 835, 836, 7, 114, 2, 2, 836, 837, 7, 110, 2, 2, 837, 838, 7, 103, 2, 2, 838, 839, 7, 111, 2, 2, 839, 840, 7, 103, 2, 2, 840, 841, 7, 112, 2, 2, 841, 842, 7, 118, 2, 2, 842, 843, 7, 117, 2, 2, 843, 844, 3, 2, 2, 2, 844, 845, 6, 108, 5, 2, 845, 216, 3, 2, 2, 2, 846, 847, 7, 110, 2, 2, 847, 848, 7, 103, 2, 2, 848, 849, 7, 118, 2, 2, 849, 850, 3, 2, 2, 2, 850, 851, 6, 109, 6, 2, 851, 218, 3, 2, 2, 2, 852, 853, 7, 114, 2, 2, 853, 854, 7, 116, 2, 2, 854, 855, 7, 107, 2, 2, 855, 856, 7, 120, 2, 2, 856, 857, 7, 99, 2, 2, 857, 858, 7, 118, 2, 2, 858, 859, 7, 103, 2, 2, 859, 860, 3, 2, 2, 2, 860, 861, 6, 110, 7, 2, 861, 220, 3, 2, 2, 2, 862, 863, 7, 114, 2, 2, 863, 864, 7, 119, 2, 2, 864, 865, 7, 100, 2, 2, 865, 866, 7, 110, 2, 2, 866, 867, 7, 107, 2, 2, 867, 868, 7, 101, 2, 2, 868, 869, 3, 2, 2, 2, 869, 870, 6, 111, 8, 2, 870, 222, 3, 2, 2, 2, 871, 872, 7, 107, 2, 2, 872, 873, 7, 112, 2, 2, 873, 874, 7, 118, 2, 2, 874, 875, 7, 103, 2, 2, 875, 876, 7, 116, 2, 2, 876, 877, 7, 104, 2, 2, 877, 878, 7, 99, 2, 2, 878, 879, 7, 101, 2, 2, 879, 880, 7, 103, 2, 2, 880, 881, 3, 2, 2, 2, 881, 882, 6, 112, 9, 2, 882, 224, 3, 2, 2, 2, 883, 884, 7, 114, 2, 2, 884, 885, 7, 99, 2, 2, 885, 886, 7, 101, 2, 2, 886, 887, 7, 109, 2, 2, 887, 888, 7, 99, 2, 2, 888, 889, 7, 105, 2, 2, 889, 890, 7, 103, 2, 2, 890, 891, 3, 2, 2, 2, 891, 892, 6, 113, 10, 2, 892, 226, 3, 2, 2, 2, 893, 894, 7, 114, 2, 2, 894, 895, 7, 116, 2, 2, 895, 896, 7, 113, 2, 2, 896, 897, 7, 118, 2, 2, 897, 898, 7, 103, 2, 2, 898, 899, 7, 101, 2, 2, 899, 900, 7, 118, 2, 2, 900, 901, 7, 103, 2, 2, 901, 902, 7, 102, 2, 2, 902, 903, 3, 2, 2, 2, 903, 904, 6, 114, 11, 2, 904, 228, 3, 2, 2, 2, 905, 906, 7, 117, 2, 2, 906, 907, 7, 118, 2, 2, 907, 908, 7, 99, 2, 2, 908, 909, 7, 118, 2, 2, 909, 910, 7, 107, 2, 2, 910, 911, 7, 101, 2, 2, 911, 912, 3, 2, 2, 2, 912, 913, 6, 115, 12, 2, 913, 230, 3, 2, 2, 2, 914, 915, 7, 123, 2, 2, 915, 916, 7, 107, 2, 2, 916, 917, 7, 103, 2, 2, 917, 918, 7, 110, 2, 2, 918, 919, 7, 102, 2, 2, 919, 920, 3, 2, 2, 2, 920, 921, 6, 116, 13, 2, 921, 232, 3, 2, 2, 2, 922, 926, 5, 279, 140, 2, 923, 925, 5, 277, 139, 2, 924, 923, 3, 2, 2, 2, 925, 928, 3, 2, 2, 2, 926, 924, 3, 2, 2, 2, 926, 927, 3, 2, 2, 2, 927, 234, 3, 2, 2, 2, 928, 926, 3, 2, 2, 2, 929, 933, 7, 36, 2, 2, 930, 932, 5, 249, 125, 2, 931, 930, 3, 2, 2, 2, 932, 935, 3, 2, 2, 2, 933, 931, 3, 2, 2, 2, 933, 934, 3, 2, 2, 2, 934, 936, 3, 2, 2, 2, 935, 933, 3, 2, 2, 2, 936, 946, 7, 36, 2, 2, 937, 941, 7, 41, 2, 2, 938, 940, 5, 251, 126, 2, 939, 938, 3, 2, 2, 2, 940, 943, 3, 2, 2, 2, 941, 939, 3, 2, 2, 2, 941, 942, 3, 2, 2, 2, 942, 944, 3, 2, 2, 2, 943, 941, 3, 2, 2, 2, 944, 946, 7, 41, 2, 2, 945, 929, 3, 2, 2, 2, 945, 937, 3, 2, 2, 2, 946, 947, 3, 2, 2, 2, 947, 948, 8, 118, 5, 2, 948, 236, 3, 2, 2, 2, 949, 955, 7, 98, 2, 2, 950, 951, 7, 94, 2, 2, 951, 954, 7, 98, 2, 2, 952, 954, 10, 13, 2, 2, 953, 950, 3, 2, 2, 2, 953, 952, 3, 2, 2, 2, 954, 957, 3, 2, 2, 2, 955, 953, 3, 2, 2, 2, 955, 956, 3, 2, 2, 2, 956, 958, 3, 2, 2, 2, 957, 955, 3, 2, 2, 2, 958, 959, 7, 98, 2, 2, 959, 238, 3, 2, 2, 2, 960, 962, 9, 14, 2, 2, 961, 960, 3, 2, 2, 2, 962, 963, 3, 2, 2, 2, 963, 961, 3, 2, 2, 2, 963, 964, 3, 2, 2, 2, 964, 965, 3, 2, 2, 2, 965, 966, 8, 120, 2, 2, 966, 240, 3, 2, 2, 2, 967, 968, 9, 2, 2, 2, 968, 969, 3, 2, 2, 2, 969, 970, 8, 121, 2, 2, 970, 242, 3, 2, 2, 2, 971, 972, 7, 62, 2, 2, 972, 973, 7, 35, 2, 2, 973, 974, 7, 47, 2, 2, 974, 975, 7, 47, 2, 2, 975, 979, 3, 2, 2, 2, 976, 978, 11, 2, 2, 2, 977, 976, 3, 2, 2, 2, 978, 981, 3, 2, 2, 2, 979, 980, 3, 2, 2, 2, 979, 977, 3, 2, 2, 2, 980, 982, 3, 2, 2, 2, 981, 979, 3, 2, 2, 2, 982, 983, 7, 47, 2, 2, 983, 984, 7, 47, 2, 2, 984, 985, 7, 64, 2, 2, 985, 986, 3, 2, 2, 2, 986, 987, 8, 122, 2, 2, 987, 244, 3, 2, 2, 2, 988, 989, 7, 62, 2, 2, 989, 990, 7, 35, 2, 2, 990, 991, 7, 93, 2, 2, 991, 992, 7, 69, 2, 2, 992, 993, 7, 70, 2, 2, 993, 994, 7, 67, 2, 2, 994, 995, 7, 86, 2, 2, 995, 996, 7, 67, 2, 2, 996, 997, 7, 93, 2, 2, 997, 1001, 3, 2, 2, 2, 998, 1000, 11, 2, 2, 2, 999, 998, 3, 2, 2, 2, 1000, 1003, 3, 2, 2, 2, 1001, 1002, 3, 2, 2, 2, 1001, 999, 3, 2, 2, 2, 1002, 1004, 3, 2, 2, 2, 1003, 1001, 3, 2, 2, 2, 1004, 1005, 7, 95, 2, 2, 1005, 1006, 7, 95, 2, 2, 1006, 1007, 7, 64, 2, 2, 1007, 1008, 3, 2, 2, 2, 1008, 1009, 8, 123, 2, 2, 1009, 246, 3, 2, 2, 2, 1010, 1011, 11, 2, 2, 2, 1011, 1012, 3, 2, 2, 2, 1012, 1013, 8, 124, 6, 2, 1013, 248, 3, 2, 2, 2, 1014, 1019, 10, 15, 2, 2, 1015, 1016, 7, 94, 2, 2, 1016, 1019, 5, 253, 127, 2, 1017, 1019, 5, 269, 135, 2, 1018, 1014, 3, 2, 2, 2, 1018, 1015, 3, 2, 2, 2, 1018, 1017, 3, 2, 2, 2, 1019, 250, 3, 2, 2, 2, 1020, 1025, 10, 16, 2, 2, 1021, 1022, 7, 94, 2, 2, 1022, 1025, 5, 253, 127, 2, 1023, 1025, 5, 269, 135, 2, 1024, 1020, 3, 2, 2, 2, 1024, 1021, 3, 2, 2, 2, 1024, 1023, 3, 2, 2, 2, 1025, 252, 3, 2, 2, 2, 1026, 1032, 5, 255, 128, 2, 1027, 1032, 7, 50, 2, 2, 1028, 1032, 5, 257, 129, 2, 1029, 1032, 5, 259, 130, 2, 1030, 1032, 5, 261, 131, 2, 1031, 1026, 3, 2, 2, 2, 1031, 1027, 3, 2, 2, 2, 1031, 1028, 3, 2, 2, 2, 1031, 1029, 3, 2, 2, 2, 1031, 1030, 3, 2, 2, 2, 1032, 254, 3, 2, 2, 2, 1033, 1036, 5, 263, 132, 2, 1034, 1036, 5, 265, 133, 2, 1035, 1033, 3, 2, 2, 2, 1035, 1034, 3, 2, 2, 2, 1036, 256, 3, 2, 2, 2, 1037, 1038, 7, 122, 2, 2, 1038, 1039, 5, 271, 136, 2, 1039, 1040, 5, 271, 136, 2, 1040, 258, 3, 2, 2, 2, 1041, 1042, 7, 119, 2, 2, 1042, 1043, 5, 271, 136, 2, 1043, 1044, 5, 271, 136, 2, 1044, 1045, 5, 271, 136, 2, 1045, 1046, 5, 271, 136, 2, 1046, 1058, 3, 2, 2, 2, 1047, 1048, 7, 119, 2, 2, 1048, 1049, 7, 125, 2, 2, 1049, 1051, 5, 271, 136, 2, 1050, 1052, 5, 271, 136, 2, 1051, 1050, 3, 2, 2, 2, 1052, 1053, 3, 2, 2, 2, 1053, 1051, 3, 2, 2, 2, 1053, 1054, 3, 2, 2, 2, 1054, 1055, 3, 2, 2, 2, 1055, 1056, 7, 127, 2, 2, 1056, 1058, 3, 2, 2, 2, 1057, 1041, 3, 2, 2, 2, 1057, 1047, 3, 2, 2, 2, 1058, 260, 3, 2, 2, 2, 1059, 1060, 7, 119, 2, 2, 1060, 1062, 7, 125, 2, 2, 1061, 1063, 5, 271, 136, 2, 1062, 1061, 3, 2, 2, 2, 1063, 1064, 3, 2, 2, 2, 1064, 1062, 3, 2, 2, 2, 1064, 1065, 3, 2, 2, 2, 1065, 1066, 3, 2, 2, 2, 1066, 1067, 7, 127, 2, 2, 1067, 262, 3, 2, 2, 2, 1068, 1069, 9, 17, 2, 2, 1069, 264, 3, 2, 2, 2, 1070, 1071, 10, 18, 2, 2, 1071, 266, 3, 2, 2, 2, 1072, 1075, 5, 263, 132, 2, 1073, 1075, 9, 19, 2, 2, 1074, 1072, 3, 2, 2, 2, 1074, 1073, 3, 2, 2, 2, 1075, 268, 3, 2, 2, 2, 1076, 1077, 7, 94, 2, 2, 1077, 1078, 9, 2, 2, 2, 1078, 270, 3, 2, 2, 2, 1079, 1080, 9, 20, 2, 2, 1080, 272, 3, 2, 2, 2, 1081, 1090, 7, 50, 2, 2, 1082, 1086, 9, 21, 2, 2, 1083, 1085, 9, 4, 2, 2, 1084, 1083, 3, 2, 2, 2, 1085, 1088, 3, 2, 2, 2, 1086, 1084, 3, 2, 2, 2, 1086, 1087, 3, 2, 2, 2, 1087, 1090, 3, 2, 2, 2, 1088, 1086, 3, 2, 2, 2, 1089, 1081, 3, 2, 2, 2, 1089, 1082, 3, 2, 2, 2, 1090, 274, 3, 2, 2, 2, 1091, 1093, 9, 22, 2, 2, 1092, 1094, 9, 23, 2, 2, 1093, 1092, 3, 2, 2, 2, 1093, 1094, 3, 2, 2, 2, 1094, 1096, 3, 2, 2, 2, 1095, 1097, 9, 4, 2, 2, 1096, 1095, 3, 2, 2, 2, 1097, 1098, 3, 2, 2, 2, 1098, 1096, 3, 2, 2, 2, 1098, 1099, 3, 2, 2, 2, 1099, 276, 3, 2, 2, 2, 1100, 1106, 5, 279, 140, 2, 1101, 1106, 5, 283, 142, 2, 1102, 1106, 5, 285, 143, 2, 1103, 1106, 5, 287, 144, 2, 1104, 1106, 4, 8206, 8207, 2, 1105, 1100, 3, 2, 2, 2, 1105, 1101, 3, 2, 2, 2, 1105, 1102, 3, 2, 2, 2, 1105, 1103, 3, 2, 2, 2, 1105, 1104, 3, 2, 2, 2, 1106, 278, 3, 2, 2, 2, 1107, 1112, 5, 281, 141, 2, 1108, 1112, 9, 24, 2, 2, 1109, 1110, 7, 94, 2, 2, 1110, 1112, 5, 259, 130, 2, 1111, 1107, 3, 2, 2, 2, 1111, 1108, 3, 2, 2, 2, 1111, 1109, 3, 2, 2, 2, 1112, 280, 3, 2, 2, 2, 1113, 1115, 9, 25, 2, 2, 1114, 1113, 3, 2, 2, 2, 1115, 282, 3, 2, 2, 2, 1116, 1118, 9, 26, 2, 2, 1117, 1116, 3, 2, 2, 2, 1118, 284, 3, 2, 2, 2, 1119, 1121, 9, 27, 2, 2, 1120, 1119, 3, 2, 2, 2, 1121, 286, 3, 2, 2, 2, 1122, 1124, 9, 28, 2, 2, 1123, 1122, 3, 2, 2, 2, 1124, 288, 3, 2, 2, 2, 1125, 1136, 10, 29, 2, 2, 1126, 1136, 5, 295, 148, 2, 1127, 1131, 7, 93, 2, 2, 1128, 1130, 5, 293, 147, 2, 1129, 1128, 3, 2, 2, 2, 1130, 1133, 3, 2, 2, 2, 1131, 1129, 3, 2, 2, 2, 1131, 1132, 3, 2, 2, 2, 1132, 1134, 3, 2, 2, 2, 1133, 1131, 3, 2, 2, 2, 1134, 1136, 7, 95, 2, 2, 1135, 1125, 3, 2, 2, 2, 1135, 1126, 3, 2, 2, 2, 1135, 1127, 3, 2, 2, 2, 1136, 290, 3, 2, 2, 2, 1137, 1148, 10, 30, 2, 2, 1138, 1148, 5, 295, 148, 2, 1139, 1143, 7, 93, 2, 2, 1140, 1142, 5, 293, 147, 2, 1141, 1140, 3, 2, 2, 2, 1142, 1145, 3, 2, 2, 2, 1143, 1141, 3, 2, 2, 2, 1143, 1144, 3, 2, 2, 2, 1144, 1146, 3, 2, 2, 2, 1145, 1143, 3, 2, 2, 2, 1146, 1148, 7, 95, 2, 2, 1147, 1137, 3, 2, 2, 2, 1147, 1138, 3, 2, 2, 2, 1147, 1139, 3, 2, 2, 2, 1148, 292, 3, 2, 2, 2, 1149, 1152, 10, 31, 2, 2, 1150, 1152, 5, 295, 148, 2, 1151, 1149, 3, 2, 2, 2, 1151, 1150, 3, 2, 2, 2, 1152, 294, 3, 2, 2, 2, 1153, 1154, 7, 94, 2, 2, 1154, 1155, 10, 2, 2, 2, 1155, 296, 3, 2, 2, 2, 54, 2, 304, 313, 327, 337, 345, 510, 518, 522, 529, 533, 537, 539, 547, 554, 564, 573, 582, 593, 604, 926, 933, 941, 945, 953, 955, 963, 979, 1001, 1018, 1024, 1031, 1035, 1053, 1057, 1064, 1074, 1086, 1089, 1093, 1098, 1105, 1111, 1114, 1117, 1120, 1123, 1131, 1135, 1143, 1147, 1151, 7, 2, 3, 2, 3, 10, 2, 3, 11, 3, 3, 118, 4, 2, 4, 2] \ No newline at end of file diff --git a/languages/js/JavaScriptLexer.tokens b/languages/js/JavaScriptLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..d0a4ef4c70c2165ec2c3d876abeafc9ca1b24cbf --- /dev/null +++ b/languages/js/JavaScriptLexer.tokens @@ -0,0 +1,224 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Divide=25 +Modulus=26 +Power=27 +NullCoalesce=28 +Hashtag=29 +RightShiftArithmetic=30 +LeftShiftArithmetic=31 +RightShiftLogical=32 +LessThan=33 +MoreThan=34 +LessThanEquals=35 +GreaterThanEquals=36 +Equals_=37 +NotEquals=38 +IdentityEquals=39 +IdentityNotEquals=40 +BitAnd=41 +BitXOr=42 +BitOr=43 +And=44 +Or=45 +MultiplyAssign=46 +DivideAssign=47 +ModulusAssign=48 +PlusAssign=49 +MinusAssign=50 +LeftShiftArithmeticAssign=51 +RightShiftArithmeticAssign=52 +RightShiftLogicalAssign=53 +BitAndAssign=54 +BitXorAssign=55 +BitOrAssign=56 +PowerAssign=57 +ARROW=58 +NullLiteral=59 +BooleanLiteral=60 +DecimalLiteral=61 +HexIntegerLiteral=62 +OctalIntegerLiteral=63 +OctalIntegerLiteral2=64 +BinaryIntegerLiteral=65 +BigHexIntegerLiteral=66 +BigOctalIntegerLiteral=67 +BigBinaryIntegerLiteral=68 +BigDecimalIntegerLiteral=69 +Break=70 +Do=71 +Instanceof=72 +Typeof=73 +Case=74 +Else=75 +New=76 +Var=77 +Catch=78 +Finally=79 +Return=80 +Void=81 +Continue=82 +For=83 +Switch=84 +While=85 +Debugger=86 +Function=87 +This=88 +With=89 +Default=90 +If=91 +Throw=92 +Delete=93 +In=94 +Try=95 +As=96 +From=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Async=105 +Await=106 +Implements=107 +Let=108 +Private=109 +Public=110 +Interface=111 +Package=112 +Protected=113 +Static=114 +Yield=115 +Identifier=116 +StringLiteral=117 +TemplateStringLiteral=118 +WhiteSpaces=119 +LineTerminator=120 +HtmlComment=121 +CDataComment=122 +UnexpectedCharacter=123 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'/'=25 +'%'=26 +'**'=27 +'??'=28 +'#'=29 +'>>'=30 +'<<'=31 +'>>>'=32 +'<'=33 +'>'=34 +'<='=35 +'>='=36 +'=='=37 +'!='=38 +'==='=39 +'!=='=40 +'&'=41 +'^'=42 +'|'=43 +'&&'=44 +'||'=45 +'*='=46 +'/='=47 +'%='=48 +'+='=49 +'-='=50 +'<<='=51 +'>>='=52 +'>>>='=53 +'&='=54 +'^='=55 +'|='=56 +'**='=57 +'=>'=58 +'null'=59 +'break'=70 +'do'=71 +'instanceof'=72 +'typeof'=73 +'case'=74 +'else'=75 +'new'=76 +'var'=77 +'catch'=78 +'finally'=79 +'return'=80 +'void'=81 +'continue'=82 +'for'=83 +'switch'=84 +'while'=85 +'debugger'=86 +'function'=87 +'this'=88 +'with'=89 +'default'=90 +'if'=91 +'throw'=92 +'delete'=93 +'in'=94 +'try'=95 +'as'=96 +'from'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'async'=105 +'await'=106 +'implements'=107 +'let'=108 +'private'=109 +'public'=110 +'interface'=111 +'package'=112 +'protected'=113 +'static'=114 +'yield'=115 diff --git a/languages/js/JavaScriptParser.interp b/languages/js/JavaScriptParser.interp new file mode 100644 index 0000000000000000000000000000000000000000..af56fb65509c5401cd6baf1215fcb25e12aab6ed --- /dev/null +++ b/languages/js/JavaScriptParser.interp @@ -0,0 +1,330 @@ +token literal names: +null +null +null +null +null +'[' +']' +'(' +')' +'{' +'}' +';' +',' +'=' +'?' +':' +'...' +'.' +'++' +'--' +'+' +'-' +'~' +'!' +'*' +'/' +'%' +'**' +'??' +'#' +'>>' +'<<' +'>>>' +'<' +'>' +'<=' +'>=' +'==' +'!=' +'===' +'!==' +'&' +'^' +'|' +'&&' +'||' +'*=' +'/=' +'%=' +'+=' +'-=' +'<<=' +'>>=' +'>>>=' +'&=' +'^=' +'|=' +'**=' +'=>' +'null' +null +null +null +null +null +null +null +null +null +null +'break' +'do' +'instanceof' +'typeof' +'case' +'else' +'new' +'var' +'catch' +'finally' +'return' +'void' +'continue' +'for' +'switch' +'while' +'debugger' +'function' +'this' +'with' +'default' +'if' +'throw' +'delete' +'in' +'try' +'as' +'from' +'class' +'enum' +'extends' +'super' +'const' +'export' +'import' +'async' +'await' +'implements' +'let' +'private' +'public' +'interface' +'package' +'protected' +'static' +'yield' +null +null +null +null +null +null +null +null + +token symbolic names: +null +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +PowerAssign +ARROW +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +BigHexIntegerLiteral +BigOctalIntegerLiteral +BigBinaryIntegerLiteral +BigDecimalIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +Class +Enum +Extends +Super +Const +Export +Import +Async +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter + +rule names: +program +sourceElement +statement +block +statementList +importStatement +importFromBlock +moduleItems +importDefault +importNamespace +importFrom +aliasName +exportStatement +exportFromBlock +declaration +variableStatement +variableDeclarationList +variableDeclaration +emptyStatement_ +expressionStatement +ifStatement +iterationStatement +varModifier +continueStatement +breakStatement +returnStatement +yieldStatement +withStatement +switchStatement +caseBlock +caseClauses +caseClause +defaultClause +labelledStatement +throwStatement +tryStatement +catchProduction +finallyProduction +debuggerStatement +functionDeclaration +classDeclaration +classTail +classElement +methodDefinition +formalParameterList +formalParameterArg +lastFormalParameterArg +functionBody +sourceElements +arrayLiteral +elementList +arrayElement +objectLiteral +propertyAssignment +propertyName +arguments +argument +expressionSequence +singleExpression +assignable +anoymousFunction +arrowFunctionParameters +arrowFunctionBody +assignmentOperator +literal +numericLiteral +bigintLiteral +identifierName +reservedWord +keyword +getter +setter +eos + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 125, 960, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 3, 2, 5, 2, 150, 10, 2, 3, 2, 5, 2, 153, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 179, 10, 4, 3, 5, 3, 5, 5, 5, 183, 10, 5, 3, 5, 3, 5, 3, 6, 6, 6, 188, 10, 6, 13, 6, 14, 6, 189, 3, 7, 3, 7, 3, 7, 3, 8, 5, 8, 196, 10, 8, 3, 8, 3, 8, 5, 8, 200, 10, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 207, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 7, 9, 213, 10, 9, 12, 9, 14, 9, 216, 11, 9, 3, 9, 3, 9, 5, 9, 220, 10, 9, 5, 9, 222, 10, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 5, 11, 232, 10, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 5, 13, 240, 10, 13, 3, 14, 3, 14, 3, 14, 5, 14, 245, 10, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 254, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 262, 10, 15, 3, 15, 3, 15, 5, 15, 266, 10, 15, 3, 16, 3, 16, 3, 16, 5, 16, 271, 10, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 7, 18, 280, 10, 18, 12, 18, 14, 18, 283, 11, 18, 3, 19, 3, 19, 3, 19, 5, 19, 288, 10, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 303, 10, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 323, 10, 23, 3, 23, 3, 23, 5, 23, 327, 10, 23, 3, 23, 3, 23, 5, 23, 331, 10, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 339, 10, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 348, 10, 23, 3, 23, 3, 23, 3, 23, 5, 23, 353, 10, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 361, 10, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 5, 25, 368, 10, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 5, 26, 375, 10, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 5, 27, 382, 10, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 5, 28, 389, 10, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 5, 31, 407, 10, 31, 3, 31, 3, 31, 5, 31, 411, 10, 31, 5, 31, 413, 10, 31, 3, 31, 3, 31, 3, 32, 6, 32, 418, 10, 32, 13, 32, 14, 32, 419, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 426, 10, 33, 3, 34, 3, 34, 3, 34, 5, 34, 431, 10, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 5, 37, 446, 10, 37, 3, 37, 5, 37, 449, 10, 37, 3, 38, 3, 38, 3, 38, 5, 38, 454, 10, 38, 3, 38, 5, 38, 457, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 5, 41, 468, 10, 41, 3, 41, 3, 41, 5, 41, 472, 10, 41, 3, 41, 3, 41, 3, 41, 5, 41, 477, 10, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 5, 43, 490, 10, 43, 3, 43, 3, 43, 7, 43, 494, 10, 43, 12, 43, 14, 43, 497, 11, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 7, 44, 505, 10, 44, 12, 44, 14, 44, 508, 11, 44, 3, 44, 3, 44, 3, 44, 5, 44, 513, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 5, 44, 519, 10, 44, 3, 45, 5, 45, 522, 10, 45, 3, 45, 5, 45, 525, 10, 45, 3, 45, 3, 45, 3, 45, 5, 45, 530, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 538, 10, 45, 3, 45, 5, 45, 541, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 551, 10, 45, 3, 45, 5, 45, 554, 10, 45, 3, 45, 3, 45, 3, 45, 5, 45, 559, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 566, 10, 45, 3, 46, 3, 46, 3, 46, 7, 46, 571, 10, 46, 12, 46, 14, 46, 574, 11, 46, 3, 46, 3, 46, 5, 46, 578, 10, 46, 3, 46, 5, 46, 581, 10, 46, 3, 47, 3, 47, 3, 47, 5, 47, 586, 10, 47, 3, 48, 3, 48, 3, 48, 3, 49, 5, 49, 592, 10, 49, 3, 50, 6, 50, 595, 10, 50, 13, 50, 14, 50, 596, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 7, 52, 604, 10, 52, 12, 52, 14, 52, 607, 11, 52, 3, 52, 5, 52, 610, 10, 52, 3, 52, 6, 52, 613, 10, 52, 13, 52, 14, 52, 614, 3, 52, 7, 52, 618, 10, 52, 12, 52, 14, 52, 621, 11, 52, 3, 52, 7, 52, 624, 10, 52, 12, 52, 14, 52, 627, 11, 52, 3, 53, 5, 53, 630, 10, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 7, 54, 638, 10, 54, 12, 54, 14, 54, 641, 11, 54, 5, 54, 643, 10, 54, 3, 54, 5, 54, 646, 10, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 661, 10, 55, 3, 55, 5, 55, 664, 10, 55, 3, 55, 3, 55, 3, 55, 5, 55, 669, 10, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 692, 10, 55, 3, 55, 5, 55, 695, 10, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 5, 56, 704, 10, 56, 3, 57, 3, 57, 3, 57, 3, 57, 7, 57, 710, 10, 57, 12, 57, 14, 57, 713, 11, 57, 3, 57, 5, 57, 716, 10, 57, 5, 57, 718, 10, 57, 3, 57, 3, 57, 3, 58, 5, 58, 723, 10, 58, 3, 58, 3, 58, 5, 58, 727, 10, 58, 3, 59, 3, 59, 3, 59, 7, 59, 732, 10, 59, 12, 59, 14, 59, 735, 11, 59, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 741, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 747, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 788, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 852, 10, 60, 3, 60, 3, 60, 5, 60, 856, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 7, 60, 869, 10, 60, 12, 60, 14, 60, 872, 11, 60, 3, 61, 3, 61, 3, 61, 5, 61, 877, 10, 61, 3, 62, 3, 62, 5, 62, 881, 10, 62, 3, 62, 3, 62, 5, 62, 885, 10, 62, 3, 62, 3, 62, 5, 62, 889, 10, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 5, 62, 897, 10, 62, 3, 62, 3, 62, 3, 62, 3, 62, 5, 62, 903, 10, 62, 3, 63, 3, 63, 3, 63, 5, 63, 908, 10, 63, 3, 63, 5, 63, 911, 10, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 5, 64, 918, 10, 64, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 929, 10, 66, 3, 67, 3, 67, 3, 68, 3, 68, 3, 69, 3, 69, 5, 69, 937, 10, 69, 3, 70, 3, 70, 3, 70, 5, 70, 942, 10, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 5, 74, 958, 10, 74, 3, 74, 2, 3, 118, 75, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 2, 12, 5, 2, 79, 79, 104, 104, 110, 110, 3, 2, 26, 28, 3, 2, 22, 23, 3, 2, 32, 34, 3, 2, 35, 38, 3, 2, 39, 42, 3, 2, 48, 59, 3, 2, 63, 67, 3, 2, 68, 71, 3, 2, 72, 117, 2, 1077, 2, 149, 3, 2, 2, 2, 4, 156, 3, 2, 2, 2, 6, 178, 3, 2, 2, 2, 8, 180, 3, 2, 2, 2, 10, 187, 3, 2, 2, 2, 12, 191, 3, 2, 2, 2, 14, 206, 3, 2, 2, 2, 16, 208, 3, 2, 2, 2, 18, 225, 3, 2, 2, 2, 20, 228, 3, 2, 2, 2, 22, 233, 3, 2, 2, 2, 24, 236, 3, 2, 2, 2, 26, 253, 3, 2, 2, 2, 28, 265, 3, 2, 2, 2, 30, 270, 3, 2, 2, 2, 32, 272, 3, 2, 2, 2, 34, 276, 3, 2, 2, 2, 36, 284, 3, 2, 2, 2, 38, 289, 3, 2, 2, 2, 40, 291, 3, 2, 2, 2, 42, 295, 3, 2, 2, 2, 44, 360, 3, 2, 2, 2, 46, 362, 3, 2, 2, 2, 48, 364, 3, 2, 2, 2, 50, 371, 3, 2, 2, 2, 52, 378, 3, 2, 2, 2, 54, 385, 3, 2, 2, 2, 56, 392, 3, 2, 2, 2, 58, 398, 3, 2, 2, 2, 60, 404, 3, 2, 2, 2, 62, 417, 3, 2, 2, 2, 64, 421, 3, 2, 2, 2, 66, 427, 3, 2, 2, 2, 68, 432, 3, 2, 2, 2, 70, 436, 3, 2, 2, 2, 72, 441, 3, 2, 2, 2, 74, 450, 3, 2, 2, 2, 76, 460, 3, 2, 2, 2, 78, 463, 3, 2, 2, 2, 80, 467, 3, 2, 2, 2, 82, 483, 3, 2, 2, 2, 84, 489, 3, 2, 2, 2, 86, 518, 3, 2, 2, 2, 88, 565, 3, 2, 2, 2, 90, 580, 3, 2, 2, 2, 92, 582, 3, 2, 2, 2, 94, 587, 3, 2, 2, 2, 96, 591, 3, 2, 2, 2, 98, 594, 3, 2, 2, 2, 100, 598, 3, 2, 2, 2, 102, 605, 3, 2, 2, 2, 104, 629, 3, 2, 2, 2, 106, 633, 3, 2, 2, 2, 108, 694, 3, 2, 2, 2, 110, 703, 3, 2, 2, 2, 112, 705, 3, 2, 2, 2, 114, 722, 3, 2, 2, 2, 116, 728, 3, 2, 2, 2, 118, 787, 3, 2, 2, 2, 120, 876, 3, 2, 2, 2, 122, 902, 3, 2, 2, 2, 124, 910, 3, 2, 2, 2, 126, 917, 3, 2, 2, 2, 128, 919, 3, 2, 2, 2, 130, 928, 3, 2, 2, 2, 132, 930, 3, 2, 2, 2, 134, 932, 3, 2, 2, 2, 136, 936, 3, 2, 2, 2, 138, 941, 3, 2, 2, 2, 140, 943, 3, 2, 2, 2, 142, 945, 3, 2, 2, 2, 144, 949, 3, 2, 2, 2, 146, 957, 3, 2, 2, 2, 148, 150, 7, 3, 2, 2, 149, 148, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 150, 152, 3, 2, 2, 2, 151, 153, 5, 98, 50, 2, 152, 151, 3, 2, 2, 2, 152, 153, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 154, 155, 7, 2, 2, 3, 155, 3, 3, 2, 2, 2, 156, 157, 5, 6, 4, 2, 157, 5, 3, 2, 2, 2, 158, 179, 5, 8, 5, 2, 159, 179, 5, 32, 17, 2, 160, 179, 5, 12, 7, 2, 161, 179, 5, 26, 14, 2, 162, 179, 5, 38, 20, 2, 163, 179, 5, 82, 42, 2, 164, 179, 5, 40, 21, 2, 165, 179, 5, 42, 22, 2, 166, 179, 5, 44, 23, 2, 167, 179, 5, 48, 25, 2, 168, 179, 5, 50, 26, 2, 169, 179, 5, 52, 27, 2, 170, 179, 5, 54, 28, 2, 171, 179, 5, 56, 29, 2, 172, 179, 5, 68, 35, 2, 173, 179, 5, 58, 30, 2, 174, 179, 5, 70, 36, 2, 175, 179, 5, 72, 37, 2, 176, 179, 5, 78, 40, 2, 177, 179, 5, 80, 41, 2, 178, 158, 3, 2, 2, 2, 178, 159, 3, 2, 2, 2, 178, 160, 3, 2, 2, 2, 178, 161, 3, 2, 2, 2, 178, 162, 3, 2, 2, 2, 178, 163, 3, 2, 2, 2, 178, 164, 3, 2, 2, 2, 178, 165, 3, 2, 2, 2, 178, 166, 3, 2, 2, 2, 178, 167, 3, 2, 2, 2, 178, 168, 3, 2, 2, 2, 178, 169, 3, 2, 2, 2, 178, 170, 3, 2, 2, 2, 178, 171, 3, 2, 2, 2, 178, 172, 3, 2, 2, 2, 178, 173, 3, 2, 2, 2, 178, 174, 3, 2, 2, 2, 178, 175, 3, 2, 2, 2, 178, 176, 3, 2, 2, 2, 178, 177, 3, 2, 2, 2, 179, 7, 3, 2, 2, 2, 180, 182, 7, 11, 2, 2, 181, 183, 5, 10, 6, 2, 182, 181, 3, 2, 2, 2, 182, 183, 3, 2, 2, 2, 183, 184, 3, 2, 2, 2, 184, 185, 7, 12, 2, 2, 185, 9, 3, 2, 2, 2, 186, 188, 5, 6, 4, 2, 187, 186, 3, 2, 2, 2, 188, 189, 3, 2, 2, 2, 189, 187, 3, 2, 2, 2, 189, 190, 3, 2, 2, 2, 190, 11, 3, 2, 2, 2, 191, 192, 7, 106, 2, 2, 192, 193, 5, 14, 8, 2, 193, 13, 3, 2, 2, 2, 194, 196, 5, 18, 10, 2, 195, 194, 3, 2, 2, 2, 195, 196, 3, 2, 2, 2, 196, 199, 3, 2, 2, 2, 197, 200, 5, 20, 11, 2, 198, 200, 5, 16, 9, 2, 199, 197, 3, 2, 2, 2, 199, 198, 3, 2, 2, 2, 200, 201, 3, 2, 2, 2, 201, 202, 5, 22, 12, 2, 202, 203, 5, 146, 74, 2, 203, 207, 3, 2, 2, 2, 204, 205, 7, 119, 2, 2, 205, 207, 5, 146, 74, 2, 206, 195, 3, 2, 2, 2, 206, 204, 3, 2, 2, 2, 207, 15, 3, 2, 2, 2, 208, 214, 7, 11, 2, 2, 209, 210, 5, 24, 13, 2, 210, 211, 7, 14, 2, 2, 211, 213, 3, 2, 2, 2, 212, 209, 3, 2, 2, 2, 213, 216, 3, 2, 2, 2, 214, 212, 3, 2, 2, 2, 214, 215, 3, 2, 2, 2, 215, 221, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 217, 219, 5, 24, 13, 2, 218, 220, 7, 14, 2, 2, 219, 218, 3, 2, 2, 2, 219, 220, 3, 2, 2, 2, 220, 222, 3, 2, 2, 2, 221, 217, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 223, 3, 2, 2, 2, 223, 224, 7, 12, 2, 2, 224, 17, 3, 2, 2, 2, 225, 226, 5, 24, 13, 2, 226, 227, 7, 14, 2, 2, 227, 19, 3, 2, 2, 2, 228, 231, 7, 26, 2, 2, 229, 230, 7, 98, 2, 2, 230, 232, 5, 136, 69, 2, 231, 229, 3, 2, 2, 2, 231, 232, 3, 2, 2, 2, 232, 21, 3, 2, 2, 2, 233, 234, 7, 99, 2, 2, 234, 235, 7, 119, 2, 2, 235, 23, 3, 2, 2, 2, 236, 239, 5, 136, 69, 2, 237, 238, 7, 98, 2, 2, 238, 240, 5, 136, 69, 2, 239, 237, 3, 2, 2, 2, 239, 240, 3, 2, 2, 2, 240, 25, 3, 2, 2, 2, 241, 244, 7, 105, 2, 2, 242, 245, 5, 28, 15, 2, 243, 245, 5, 30, 16, 2, 244, 242, 3, 2, 2, 2, 244, 243, 3, 2, 2, 2, 245, 246, 3, 2, 2, 2, 246, 247, 5, 146, 74, 2, 247, 254, 3, 2, 2, 2, 248, 249, 7, 105, 2, 2, 249, 250, 7, 92, 2, 2, 250, 251, 5, 118, 60, 2, 251, 252, 5, 146, 74, 2, 252, 254, 3, 2, 2, 2, 253, 241, 3, 2, 2, 2, 253, 248, 3, 2, 2, 2, 254, 27, 3, 2, 2, 2, 255, 256, 5, 20, 11, 2, 256, 257, 5, 22, 12, 2, 257, 258, 5, 146, 74, 2, 258, 266, 3, 2, 2, 2, 259, 261, 5, 16, 9, 2, 260, 262, 5, 22, 12, 2, 261, 260, 3, 2, 2, 2, 261, 262, 3, 2, 2, 2, 262, 263, 3, 2, 2, 2, 263, 264, 5, 146, 74, 2, 264, 266, 3, 2, 2, 2, 265, 255, 3, 2, 2, 2, 265, 259, 3, 2, 2, 2, 266, 29, 3, 2, 2, 2, 267, 271, 5, 32, 17, 2, 268, 271, 5, 82, 42, 2, 269, 271, 5, 80, 41, 2, 270, 267, 3, 2, 2, 2, 270, 268, 3, 2, 2, 2, 270, 269, 3, 2, 2, 2, 271, 31, 3, 2, 2, 2, 272, 273, 5, 46, 24, 2, 273, 274, 5, 34, 18, 2, 274, 275, 5, 146, 74, 2, 275, 33, 3, 2, 2, 2, 276, 281, 5, 36, 19, 2, 277, 278, 7, 14, 2, 2, 278, 280, 5, 36, 19, 2, 279, 277, 3, 2, 2, 2, 280, 283, 3, 2, 2, 2, 281, 279, 3, 2, 2, 2, 281, 282, 3, 2, 2, 2, 282, 35, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 284, 287, 5, 120, 61, 2, 285, 286, 7, 15, 2, 2, 286, 288, 5, 118, 60, 2, 287, 285, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 37, 3, 2, 2, 2, 289, 290, 7, 13, 2, 2, 290, 39, 3, 2, 2, 2, 291, 292, 6, 21, 2, 2, 292, 293, 5, 116, 59, 2, 293, 294, 5, 146, 74, 2, 294, 41, 3, 2, 2, 2, 295, 296, 7, 93, 2, 2, 296, 297, 7, 9, 2, 2, 297, 298, 5, 116, 59, 2, 298, 299, 7, 10, 2, 2, 299, 302, 5, 6, 4, 2, 300, 301, 7, 77, 2, 2, 301, 303, 5, 6, 4, 2, 302, 300, 3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 303, 43, 3, 2, 2, 2, 304, 305, 7, 73, 2, 2, 305, 306, 5, 6, 4, 2, 306, 307, 7, 87, 2, 2, 307, 308, 7, 9, 2, 2, 308, 309, 5, 116, 59, 2, 309, 310, 7, 10, 2, 2, 310, 311, 5, 146, 74, 2, 311, 361, 3, 2, 2, 2, 312, 313, 7, 87, 2, 2, 313, 314, 7, 9, 2, 2, 314, 315, 5, 116, 59, 2, 315, 316, 7, 10, 2, 2, 316, 317, 5, 6, 4, 2, 317, 361, 3, 2, 2, 2, 318, 319, 7, 85, 2, 2, 319, 322, 7, 9, 2, 2, 320, 323, 5, 116, 59, 2, 321, 323, 5, 32, 17, 2, 322, 320, 3, 2, 2, 2, 322, 321, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 324, 3, 2, 2, 2, 324, 326, 7, 13, 2, 2, 325, 327, 5, 116, 59, 2, 326, 325, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 328, 3, 2, 2, 2, 328, 330, 7, 13, 2, 2, 329, 331, 5, 116, 59, 2, 330, 329, 3, 2, 2, 2, 330, 331, 3, 2, 2, 2, 331, 332, 3, 2, 2, 2, 332, 333, 7, 10, 2, 2, 333, 361, 5, 6, 4, 2, 334, 335, 7, 85, 2, 2, 335, 338, 7, 9, 2, 2, 336, 339, 5, 118, 60, 2, 337, 339, 5, 32, 17, 2, 338, 336, 3, 2, 2, 2, 338, 337, 3, 2, 2, 2, 339, 340, 3, 2, 2, 2, 340, 341, 7, 96, 2, 2, 341, 342, 5, 116, 59, 2, 342, 343, 7, 10, 2, 2, 343, 344, 5, 6, 4, 2, 344, 361, 3, 2, 2, 2, 345, 347, 7, 85, 2, 2, 346, 348, 7, 108, 2, 2, 347, 346, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 349, 3, 2, 2, 2, 349, 352, 7, 9, 2, 2, 350, 353, 5, 118, 60, 2, 351, 353, 5, 32, 17, 2, 352, 350, 3, 2, 2, 2, 352, 351, 3, 2, 2, 2, 353, 354, 3, 2, 2, 2, 354, 355, 7, 118, 2, 2, 355, 356, 6, 23, 3, 2, 356, 357, 5, 116, 59, 2, 357, 358, 7, 10, 2, 2, 358, 359, 5, 6, 4, 2, 359, 361, 3, 2, 2, 2, 360, 304, 3, 2, 2, 2, 360, 312, 3, 2, 2, 2, 360, 318, 3, 2, 2, 2, 360, 334, 3, 2, 2, 2, 360, 345, 3, 2, 2, 2, 361, 45, 3, 2, 2, 2, 362, 363, 9, 2, 2, 2, 363, 47, 3, 2, 2, 2, 364, 367, 7, 84, 2, 2, 365, 366, 6, 25, 4, 2, 366, 368, 7, 118, 2, 2, 367, 365, 3, 2, 2, 2, 367, 368, 3, 2, 2, 2, 368, 369, 3, 2, 2, 2, 369, 370, 5, 146, 74, 2, 370, 49, 3, 2, 2, 2, 371, 374, 7, 72, 2, 2, 372, 373, 6, 26, 5, 2, 373, 375, 7, 118, 2, 2, 374, 372, 3, 2, 2, 2, 374, 375, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 377, 5, 146, 74, 2, 377, 51, 3, 2, 2, 2, 378, 381, 7, 82, 2, 2, 379, 380, 6, 27, 6, 2, 380, 382, 5, 116, 59, 2, 381, 379, 3, 2, 2, 2, 381, 382, 3, 2, 2, 2, 382, 383, 3, 2, 2, 2, 383, 384, 5, 146, 74, 2, 384, 53, 3, 2, 2, 2, 385, 388, 7, 117, 2, 2, 386, 387, 6, 28, 7, 2, 387, 389, 5, 116, 59, 2, 388, 386, 3, 2, 2, 2, 388, 389, 3, 2, 2, 2, 389, 390, 3, 2, 2, 2, 390, 391, 5, 146, 74, 2, 391, 55, 3, 2, 2, 2, 392, 393, 7, 91, 2, 2, 393, 394, 7, 9, 2, 2, 394, 395, 5, 116, 59, 2, 395, 396, 7, 10, 2, 2, 396, 397, 5, 6, 4, 2, 397, 57, 3, 2, 2, 2, 398, 399, 7, 86, 2, 2, 399, 400, 7, 9, 2, 2, 400, 401, 5, 116, 59, 2, 401, 402, 7, 10, 2, 2, 402, 403, 5, 60, 31, 2, 403, 59, 3, 2, 2, 2, 404, 406, 7, 11, 2, 2, 405, 407, 5, 62, 32, 2, 406, 405, 3, 2, 2, 2, 406, 407, 3, 2, 2, 2, 407, 412, 3, 2, 2, 2, 408, 410, 5, 66, 34, 2, 409, 411, 5, 62, 32, 2, 410, 409, 3, 2, 2, 2, 410, 411, 3, 2, 2, 2, 411, 413, 3, 2, 2, 2, 412, 408, 3, 2, 2, 2, 412, 413, 3, 2, 2, 2, 413, 414, 3, 2, 2, 2, 414, 415, 7, 12, 2, 2, 415, 61, 3, 2, 2, 2, 416, 418, 5, 64, 33, 2, 417, 416, 3, 2, 2, 2, 418, 419, 3, 2, 2, 2, 419, 417, 3, 2, 2, 2, 419, 420, 3, 2, 2, 2, 420, 63, 3, 2, 2, 2, 421, 422, 7, 76, 2, 2, 422, 423, 5, 116, 59, 2, 423, 425, 7, 17, 2, 2, 424, 426, 5, 10, 6, 2, 425, 424, 3, 2, 2, 2, 425, 426, 3, 2, 2, 2, 426, 65, 3, 2, 2, 2, 427, 428, 7, 92, 2, 2, 428, 430, 7, 17, 2, 2, 429, 431, 5, 10, 6, 2, 430, 429, 3, 2, 2, 2, 430, 431, 3, 2, 2, 2, 431, 67, 3, 2, 2, 2, 432, 433, 7, 118, 2, 2, 433, 434, 7, 17, 2, 2, 434, 435, 5, 6, 4, 2, 435, 69, 3, 2, 2, 2, 436, 437, 7, 94, 2, 2, 437, 438, 6, 36, 8, 2, 438, 439, 5, 116, 59, 2, 439, 440, 5, 146, 74, 2, 440, 71, 3, 2, 2, 2, 441, 442, 7, 97, 2, 2, 442, 448, 5, 8, 5, 2, 443, 445, 5, 74, 38, 2, 444, 446, 5, 76, 39, 2, 445, 444, 3, 2, 2, 2, 445, 446, 3, 2, 2, 2, 446, 449, 3, 2, 2, 2, 447, 449, 5, 76, 39, 2, 448, 443, 3, 2, 2, 2, 448, 447, 3, 2, 2, 2, 449, 73, 3, 2, 2, 2, 450, 456, 7, 80, 2, 2, 451, 453, 7, 9, 2, 2, 452, 454, 5, 120, 61, 2, 453, 452, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 455, 3, 2, 2, 2, 455, 457, 7, 10, 2, 2, 456, 451, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 459, 5, 8, 5, 2, 459, 75, 3, 2, 2, 2, 460, 461, 7, 81, 2, 2, 461, 462, 5, 8, 5, 2, 462, 77, 3, 2, 2, 2, 463, 464, 7, 88, 2, 2, 464, 465, 5, 146, 74, 2, 465, 79, 3, 2, 2, 2, 466, 468, 7, 107, 2, 2, 467, 466, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 471, 7, 89, 2, 2, 470, 472, 7, 26, 2, 2, 471, 470, 3, 2, 2, 2, 471, 472, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 474, 7, 118, 2, 2, 474, 476, 7, 9, 2, 2, 475, 477, 5, 90, 46, 2, 476, 475, 3, 2, 2, 2, 476, 477, 3, 2, 2, 2, 477, 478, 3, 2, 2, 2, 478, 479, 7, 10, 2, 2, 479, 480, 7, 11, 2, 2, 480, 481, 5, 96, 49, 2, 481, 482, 7, 12, 2, 2, 482, 81, 3, 2, 2, 2, 483, 484, 7, 100, 2, 2, 484, 485, 7, 118, 2, 2, 485, 486, 5, 84, 43, 2, 486, 83, 3, 2, 2, 2, 487, 488, 7, 102, 2, 2, 488, 490, 5, 118, 60, 2, 489, 487, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 495, 7, 11, 2, 2, 492, 494, 5, 86, 44, 2, 493, 492, 3, 2, 2, 2, 494, 497, 3, 2, 2, 2, 495, 493, 3, 2, 2, 2, 495, 496, 3, 2, 2, 2, 496, 498, 3, 2, 2, 2, 497, 495, 3, 2, 2, 2, 498, 499, 7, 12, 2, 2, 499, 85, 3, 2, 2, 2, 500, 505, 7, 116, 2, 2, 501, 502, 6, 44, 9, 2, 502, 505, 7, 118, 2, 2, 503, 505, 7, 107, 2, 2, 504, 500, 3, 2, 2, 2, 504, 501, 3, 2, 2, 2, 504, 503, 3, 2, 2, 2, 505, 508, 3, 2, 2, 2, 506, 504, 3, 2, 2, 2, 506, 507, 3, 2, 2, 2, 507, 509, 3, 2, 2, 2, 508, 506, 3, 2, 2, 2, 509, 519, 5, 88, 45, 2, 510, 519, 5, 38, 20, 2, 511, 513, 7, 31, 2, 2, 512, 511, 3, 2, 2, 2, 512, 513, 3, 2, 2, 2, 513, 514, 3, 2, 2, 2, 514, 515, 5, 110, 56, 2, 515, 516, 7, 15, 2, 2, 516, 517, 5, 118, 60, 2, 517, 519, 3, 2, 2, 2, 518, 506, 3, 2, 2, 2, 518, 510, 3, 2, 2, 2, 518, 512, 3, 2, 2, 2, 519, 87, 3, 2, 2, 2, 520, 522, 7, 26, 2, 2, 521, 520, 3, 2, 2, 2, 521, 522, 3, 2, 2, 2, 522, 524, 3, 2, 2, 2, 523, 525, 7, 31, 2, 2, 524, 523, 3, 2, 2, 2, 524, 525, 3, 2, 2, 2, 525, 526, 3, 2, 2, 2, 526, 527, 5, 110, 56, 2, 527, 529, 7, 9, 2, 2, 528, 530, 5, 90, 46, 2, 529, 528, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 531, 3, 2, 2, 2, 531, 532, 7, 10, 2, 2, 532, 533, 7, 11, 2, 2, 533, 534, 5, 96, 49, 2, 534, 535, 7, 12, 2, 2, 535, 566, 3, 2, 2, 2, 536, 538, 7, 26, 2, 2, 537, 536, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 540, 3, 2, 2, 2, 539, 541, 7, 31, 2, 2, 540, 539, 3, 2, 2, 2, 540, 541, 3, 2, 2, 2, 541, 542, 3, 2, 2, 2, 542, 543, 5, 142, 72, 2, 543, 544, 7, 9, 2, 2, 544, 545, 7, 10, 2, 2, 545, 546, 7, 11, 2, 2, 546, 547, 5, 96, 49, 2, 547, 548, 7, 12, 2, 2, 548, 566, 3, 2, 2, 2, 549, 551, 7, 26, 2, 2, 550, 549, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 553, 3, 2, 2, 2, 552, 554, 7, 31, 2, 2, 553, 552, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 556, 5, 144, 73, 2, 556, 558, 7, 9, 2, 2, 557, 559, 5, 90, 46, 2, 558, 557, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 560, 3, 2, 2, 2, 560, 561, 7, 10, 2, 2, 561, 562, 7, 11, 2, 2, 562, 563, 5, 96, 49, 2, 563, 564, 7, 12, 2, 2, 564, 566, 3, 2, 2, 2, 565, 521, 3, 2, 2, 2, 565, 537, 3, 2, 2, 2, 565, 550, 3, 2, 2, 2, 566, 89, 3, 2, 2, 2, 567, 572, 5, 92, 47, 2, 568, 569, 7, 14, 2, 2, 569, 571, 5, 92, 47, 2, 570, 568, 3, 2, 2, 2, 571, 574, 3, 2, 2, 2, 572, 570, 3, 2, 2, 2, 572, 573, 3, 2, 2, 2, 573, 577, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 575, 576, 7, 14, 2, 2, 576, 578, 5, 94, 48, 2, 577, 575, 3, 2, 2, 2, 577, 578, 3, 2, 2, 2, 578, 581, 3, 2, 2, 2, 579, 581, 5, 94, 48, 2, 580, 567, 3, 2, 2, 2, 580, 579, 3, 2, 2, 2, 581, 91, 3, 2, 2, 2, 582, 585, 5, 120, 61, 2, 583, 584, 7, 15, 2, 2, 584, 586, 5, 118, 60, 2, 585, 583, 3, 2, 2, 2, 585, 586, 3, 2, 2, 2, 586, 93, 3, 2, 2, 2, 587, 588, 7, 18, 2, 2, 588, 589, 5, 118, 60, 2, 589, 95, 3, 2, 2, 2, 590, 592, 5, 98, 50, 2, 591, 590, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 97, 3, 2, 2, 2, 593, 595, 5, 4, 3, 2, 594, 593, 3, 2, 2, 2, 595, 596, 3, 2, 2, 2, 596, 594, 3, 2, 2, 2, 596, 597, 3, 2, 2, 2, 597, 99, 3, 2, 2, 2, 598, 599, 7, 7, 2, 2, 599, 600, 5, 102, 52, 2, 600, 601, 7, 8, 2, 2, 601, 101, 3, 2, 2, 2, 602, 604, 7, 14, 2, 2, 603, 602, 3, 2, 2, 2, 604, 607, 3, 2, 2, 2, 605, 603, 3, 2, 2, 2, 605, 606, 3, 2, 2, 2, 606, 609, 3, 2, 2, 2, 607, 605, 3, 2, 2, 2, 608, 610, 5, 104, 53, 2, 609, 608, 3, 2, 2, 2, 609, 610, 3, 2, 2, 2, 610, 619, 3, 2, 2, 2, 611, 613, 7, 14, 2, 2, 612, 611, 3, 2, 2, 2, 613, 614, 3, 2, 2, 2, 614, 612, 3, 2, 2, 2, 614, 615, 3, 2, 2, 2, 615, 616, 3, 2, 2, 2, 616, 618, 5, 104, 53, 2, 617, 612, 3, 2, 2, 2, 618, 621, 3, 2, 2, 2, 619, 617, 3, 2, 2, 2, 619, 620, 3, 2, 2, 2, 620, 625, 3, 2, 2, 2, 621, 619, 3, 2, 2, 2, 622, 624, 7, 14, 2, 2, 623, 622, 3, 2, 2, 2, 624, 627, 3, 2, 2, 2, 625, 623, 3, 2, 2, 2, 625, 626, 3, 2, 2, 2, 626, 103, 3, 2, 2, 2, 627, 625, 3, 2, 2, 2, 628, 630, 7, 18, 2, 2, 629, 628, 3, 2, 2, 2, 629, 630, 3, 2, 2, 2, 630, 631, 3, 2, 2, 2, 631, 632, 5, 118, 60, 2, 632, 105, 3, 2, 2, 2, 633, 642, 7, 11, 2, 2, 634, 639, 5, 108, 55, 2, 635, 636, 7, 14, 2, 2, 636, 638, 5, 108, 55, 2, 637, 635, 3, 2, 2, 2, 638, 641, 3, 2, 2, 2, 639, 637, 3, 2, 2, 2, 639, 640, 3, 2, 2, 2, 640, 643, 3, 2, 2, 2, 641, 639, 3, 2, 2, 2, 642, 634, 3, 2, 2, 2, 642, 643, 3, 2, 2, 2, 643, 645, 3, 2, 2, 2, 644, 646, 7, 14, 2, 2, 645, 644, 3, 2, 2, 2, 645, 646, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 648, 7, 12, 2, 2, 648, 107, 3, 2, 2, 2, 649, 650, 5, 110, 56, 2, 650, 651, 7, 17, 2, 2, 651, 652, 5, 118, 60, 2, 652, 695, 3, 2, 2, 2, 653, 654, 7, 7, 2, 2, 654, 655, 5, 118, 60, 2, 655, 656, 7, 8, 2, 2, 656, 657, 7, 17, 2, 2, 657, 658, 5, 118, 60, 2, 658, 695, 3, 2, 2, 2, 659, 661, 7, 107, 2, 2, 660, 659, 3, 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 663, 3, 2, 2, 2, 662, 664, 7, 26, 2, 2, 663, 662, 3, 2, 2, 2, 663, 664, 3, 2, 2, 2, 664, 665, 3, 2, 2, 2, 665, 666, 5, 110, 56, 2, 666, 668, 7, 9, 2, 2, 667, 669, 5, 90, 46, 2, 668, 667, 3, 2, 2, 2, 668, 669, 3, 2, 2, 2, 669, 670, 3, 2, 2, 2, 670, 671, 7, 10, 2, 2, 671, 672, 7, 11, 2, 2, 672, 673, 5, 96, 49, 2, 673, 674, 7, 12, 2, 2, 674, 695, 3, 2, 2, 2, 675, 676, 5, 142, 72, 2, 676, 677, 7, 9, 2, 2, 677, 678, 7, 10, 2, 2, 678, 679, 7, 11, 2, 2, 679, 680, 5, 96, 49, 2, 680, 681, 7, 12, 2, 2, 681, 695, 3, 2, 2, 2, 682, 683, 5, 144, 73, 2, 683, 684, 7, 9, 2, 2, 684, 685, 5, 92, 47, 2, 685, 686, 7, 10, 2, 2, 686, 687, 7, 11, 2, 2, 687, 688, 5, 96, 49, 2, 688, 689, 7, 12, 2, 2, 689, 695, 3, 2, 2, 2, 690, 692, 7, 18, 2, 2, 691, 690, 3, 2, 2, 2, 691, 692, 3, 2, 2, 2, 692, 693, 3, 2, 2, 2, 693, 695, 5, 118, 60, 2, 694, 649, 3, 2, 2, 2, 694, 653, 3, 2, 2, 2, 694, 660, 3, 2, 2, 2, 694, 675, 3, 2, 2, 2, 694, 682, 3, 2, 2, 2, 694, 691, 3, 2, 2, 2, 695, 109, 3, 2, 2, 2, 696, 704, 5, 136, 69, 2, 697, 704, 7, 119, 2, 2, 698, 704, 5, 132, 67, 2, 699, 700, 7, 7, 2, 2, 700, 701, 5, 118, 60, 2, 701, 702, 7, 8, 2, 2, 702, 704, 3, 2, 2, 2, 703, 696, 3, 2, 2, 2, 703, 697, 3, 2, 2, 2, 703, 698, 3, 2, 2, 2, 703, 699, 3, 2, 2, 2, 704, 111, 3, 2, 2, 2, 705, 717, 7, 9, 2, 2, 706, 711, 5, 114, 58, 2, 707, 708, 7, 14, 2, 2, 708, 710, 5, 114, 58, 2, 709, 707, 3, 2, 2, 2, 710, 713, 3, 2, 2, 2, 711, 709, 3, 2, 2, 2, 711, 712, 3, 2, 2, 2, 712, 715, 3, 2, 2, 2, 713, 711, 3, 2, 2, 2, 714, 716, 7, 14, 2, 2, 715, 714, 3, 2, 2, 2, 715, 716, 3, 2, 2, 2, 716, 718, 3, 2, 2, 2, 717, 706, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 719, 3, 2, 2, 2, 719, 720, 7, 10, 2, 2, 720, 113, 3, 2, 2, 2, 721, 723, 7, 18, 2, 2, 722, 721, 3, 2, 2, 2, 722, 723, 3, 2, 2, 2, 723, 726, 3, 2, 2, 2, 724, 727, 5, 118, 60, 2, 725, 727, 7, 118, 2, 2, 726, 724, 3, 2, 2, 2, 726, 725, 3, 2, 2, 2, 727, 115, 3, 2, 2, 2, 728, 733, 5, 118, 60, 2, 729, 730, 7, 14, 2, 2, 730, 732, 5, 118, 60, 2, 731, 729, 3, 2, 2, 2, 732, 735, 3, 2, 2, 2, 733, 731, 3, 2, 2, 2, 733, 734, 3, 2, 2, 2, 734, 117, 3, 2, 2, 2, 735, 733, 3, 2, 2, 2, 736, 737, 8, 60, 1, 2, 737, 788, 5, 122, 62, 2, 738, 740, 7, 100, 2, 2, 739, 741, 7, 118, 2, 2, 740, 739, 3, 2, 2, 2, 740, 741, 3, 2, 2, 2, 741, 742, 3, 2, 2, 2, 742, 788, 5, 84, 43, 2, 743, 744, 7, 78, 2, 2, 744, 746, 5, 118, 60, 2, 745, 747, 5, 112, 57, 2, 746, 745, 3, 2, 2, 2, 746, 747, 3, 2, 2, 2, 747, 788, 3, 2, 2, 2, 748, 749, 7, 78, 2, 2, 749, 750, 7, 19, 2, 2, 750, 788, 7, 118, 2, 2, 751, 752, 7, 95, 2, 2, 752, 788, 5, 118, 60, 39, 753, 754, 7, 83, 2, 2, 754, 788, 5, 118, 60, 38, 755, 756, 7, 75, 2, 2, 756, 788, 5, 118, 60, 37, 757, 758, 7, 20, 2, 2, 758, 788, 5, 118, 60, 36, 759, 760, 7, 21, 2, 2, 760, 788, 5, 118, 60, 35, 761, 762, 7, 22, 2, 2, 762, 788, 5, 118, 60, 34, 763, 764, 7, 23, 2, 2, 764, 788, 5, 118, 60, 33, 765, 766, 7, 24, 2, 2, 766, 788, 5, 118, 60, 32, 767, 768, 7, 25, 2, 2, 768, 788, 5, 118, 60, 31, 769, 770, 7, 108, 2, 2, 770, 788, 5, 118, 60, 30, 771, 772, 7, 106, 2, 2, 772, 773, 7, 9, 2, 2, 773, 774, 5, 118, 60, 2, 774, 775, 7, 10, 2, 2, 775, 788, 3, 2, 2, 2, 776, 788, 5, 54, 28, 2, 777, 788, 7, 90, 2, 2, 778, 788, 7, 118, 2, 2, 779, 788, 7, 103, 2, 2, 780, 788, 5, 130, 66, 2, 781, 788, 5, 100, 51, 2, 782, 788, 5, 106, 54, 2, 783, 784, 7, 9, 2, 2, 784, 785, 5, 116, 59, 2, 785, 786, 7, 10, 2, 2, 786, 788, 3, 2, 2, 2, 787, 736, 3, 2, 2, 2, 787, 738, 3, 2, 2, 2, 787, 743, 3, 2, 2, 2, 787, 748, 3, 2, 2, 2, 787, 751, 3, 2, 2, 2, 787, 753, 3, 2, 2, 2, 787, 755, 3, 2, 2, 2, 787, 757, 3, 2, 2, 2, 787, 759, 3, 2, 2, 2, 787, 761, 3, 2, 2, 2, 787, 763, 3, 2, 2, 2, 787, 765, 3, 2, 2, 2, 787, 767, 3, 2, 2, 2, 787, 769, 3, 2, 2, 2, 787, 771, 3, 2, 2, 2, 787, 776, 3, 2, 2, 2, 787, 777, 3, 2, 2, 2, 787, 778, 3, 2, 2, 2, 787, 779, 3, 2, 2, 2, 787, 780, 3, 2, 2, 2, 787, 781, 3, 2, 2, 2, 787, 782, 3, 2, 2, 2, 787, 783, 3, 2, 2, 2, 788, 870, 3, 2, 2, 2, 789, 790, 12, 29, 2, 2, 790, 791, 7, 29, 2, 2, 791, 869, 5, 118, 60, 29, 792, 793, 12, 28, 2, 2, 793, 794, 9, 3, 2, 2, 794, 869, 5, 118, 60, 29, 795, 796, 12, 27, 2, 2, 796, 797, 9, 4, 2, 2, 797, 869, 5, 118, 60, 28, 798, 799, 12, 26, 2, 2, 799, 800, 7, 30, 2, 2, 800, 869, 5, 118, 60, 27, 801, 802, 12, 25, 2, 2, 802, 803, 9, 5, 2, 2, 803, 869, 5, 118, 60, 26, 804, 805, 12, 24, 2, 2, 805, 806, 9, 6, 2, 2, 806, 869, 5, 118, 60, 25, 807, 808, 12, 23, 2, 2, 808, 809, 7, 74, 2, 2, 809, 869, 5, 118, 60, 24, 810, 811, 12, 22, 2, 2, 811, 812, 7, 96, 2, 2, 812, 869, 5, 118, 60, 23, 813, 814, 12, 21, 2, 2, 814, 815, 9, 7, 2, 2, 815, 869, 5, 118, 60, 22, 816, 817, 12, 20, 2, 2, 817, 818, 7, 43, 2, 2, 818, 869, 5, 118, 60, 21, 819, 820, 12, 19, 2, 2, 820, 821, 7, 44, 2, 2, 821, 869, 5, 118, 60, 20, 822, 823, 12, 18, 2, 2, 823, 824, 7, 45, 2, 2, 824, 869, 5, 118, 60, 19, 825, 826, 12, 17, 2, 2, 826, 827, 7, 46, 2, 2, 827, 869, 5, 118, 60, 18, 828, 829, 12, 16, 2, 2, 829, 830, 7, 47, 2, 2, 830, 869, 5, 118, 60, 17, 831, 832, 12, 15, 2, 2, 832, 833, 7, 16, 2, 2, 833, 834, 5, 118, 60, 2, 834, 835, 7, 17, 2, 2, 835, 836, 5, 118, 60, 16, 836, 869, 3, 2, 2, 2, 837, 838, 12, 14, 2, 2, 838, 839, 7, 15, 2, 2, 839, 869, 5, 118, 60, 14, 840, 841, 12, 13, 2, 2, 841, 842, 5, 128, 65, 2, 842, 843, 5, 118, 60, 13, 843, 869, 3, 2, 2, 2, 844, 845, 12, 46, 2, 2, 845, 846, 7, 7, 2, 2, 846, 847, 5, 116, 59, 2, 847, 848, 7, 8, 2, 2, 848, 869, 3, 2, 2, 2, 849, 851, 12, 45, 2, 2, 850, 852, 7, 16, 2, 2, 851, 850, 3, 2, 2, 2, 851, 852, 3, 2, 2, 2, 852, 853, 3, 2, 2, 2, 853, 855, 7, 19, 2, 2, 854, 856, 7, 31, 2, 2, 855, 854, 3, 2, 2, 2, 855, 856, 3, 2, 2, 2, 856, 857, 3, 2, 2, 2, 857, 869, 5, 136, 69, 2, 858, 859, 12, 44, 2, 2, 859, 869, 5, 112, 57, 2, 860, 861, 12, 41, 2, 2, 861, 862, 6, 60, 31, 2, 862, 869, 7, 20, 2, 2, 863, 864, 12, 40, 2, 2, 864, 865, 6, 60, 33, 2, 865, 869, 7, 21, 2, 2, 866, 867, 12, 11, 2, 2, 867, 869, 7, 120, 2, 2, 868, 789, 3, 2, 2, 2, 868, 792, 3, 2, 2, 2, 868, 795, 3, 2, 2, 2, 868, 798, 3, 2, 2, 2, 868, 801, 3, 2, 2, 2, 868, 804, 3, 2, 2, 2, 868, 807, 3, 2, 2, 2, 868, 810, 3, 2, 2, 2, 868, 813, 3, 2, 2, 2, 868, 816, 3, 2, 2, 2, 868, 819, 3, 2, 2, 2, 868, 822, 3, 2, 2, 2, 868, 825, 3, 2, 2, 2, 868, 828, 3, 2, 2, 2, 868, 831, 3, 2, 2, 2, 868, 837, 3, 2, 2, 2, 868, 840, 3, 2, 2, 2, 868, 844, 3, 2, 2, 2, 868, 849, 3, 2, 2, 2, 868, 858, 3, 2, 2, 2, 868, 860, 3, 2, 2, 2, 868, 863, 3, 2, 2, 2, 868, 866, 3, 2, 2, 2, 869, 872, 3, 2, 2, 2, 870, 868, 3, 2, 2, 2, 870, 871, 3, 2, 2, 2, 871, 119, 3, 2, 2, 2, 872, 870, 3, 2, 2, 2, 873, 877, 7, 118, 2, 2, 874, 877, 5, 100, 51, 2, 875, 877, 5, 106, 54, 2, 876, 873, 3, 2, 2, 2, 876, 874, 3, 2, 2, 2, 876, 875, 3, 2, 2, 2, 877, 121, 3, 2, 2, 2, 878, 903, 5, 80, 41, 2, 879, 881, 7, 107, 2, 2, 880, 879, 3, 2, 2, 2, 880, 881, 3, 2, 2, 2, 881, 882, 3, 2, 2, 2, 882, 884, 7, 89, 2, 2, 883, 885, 7, 26, 2, 2, 884, 883, 3, 2, 2, 2, 884, 885, 3, 2, 2, 2, 885, 886, 3, 2, 2, 2, 886, 888, 7, 9, 2, 2, 887, 889, 5, 90, 46, 2, 888, 887, 3, 2, 2, 2, 888, 889, 3, 2, 2, 2, 889, 890, 3, 2, 2, 2, 890, 891, 7, 10, 2, 2, 891, 892, 7, 11, 2, 2, 892, 893, 5, 96, 49, 2, 893, 894, 7, 12, 2, 2, 894, 903, 3, 2, 2, 2, 895, 897, 7, 107, 2, 2, 896, 895, 3, 2, 2, 2, 896, 897, 3, 2, 2, 2, 897, 898, 3, 2, 2, 2, 898, 899, 5, 124, 63, 2, 899, 900, 7, 60, 2, 2, 900, 901, 5, 126, 64, 2, 901, 903, 3, 2, 2, 2, 902, 878, 3, 2, 2, 2, 902, 880, 3, 2, 2, 2, 902, 896, 3, 2, 2, 2, 903, 123, 3, 2, 2, 2, 904, 911, 7, 118, 2, 2, 905, 907, 7, 9, 2, 2, 906, 908, 5, 90, 46, 2, 907, 906, 3, 2, 2, 2, 907, 908, 3, 2, 2, 2, 908, 909, 3, 2, 2, 2, 909, 911, 7, 10, 2, 2, 910, 904, 3, 2, 2, 2, 910, 905, 3, 2, 2, 2, 911, 125, 3, 2, 2, 2, 912, 918, 5, 118, 60, 2, 913, 914, 7, 11, 2, 2, 914, 915, 5, 96, 49, 2, 915, 916, 7, 12, 2, 2, 916, 918, 3, 2, 2, 2, 917, 912, 3, 2, 2, 2, 917, 913, 3, 2, 2, 2, 918, 127, 3, 2, 2, 2, 919, 920, 9, 8, 2, 2, 920, 129, 3, 2, 2, 2, 921, 929, 7, 61, 2, 2, 922, 929, 7, 62, 2, 2, 923, 929, 7, 119, 2, 2, 924, 929, 7, 120, 2, 2, 925, 929, 7, 6, 2, 2, 926, 929, 5, 132, 67, 2, 927, 929, 5, 134, 68, 2, 928, 921, 3, 2, 2, 2, 928, 922, 3, 2, 2, 2, 928, 923, 3, 2, 2, 2, 928, 924, 3, 2, 2, 2, 928, 925, 3, 2, 2, 2, 928, 926, 3, 2, 2, 2, 928, 927, 3, 2, 2, 2, 929, 131, 3, 2, 2, 2, 930, 931, 9, 9, 2, 2, 931, 133, 3, 2, 2, 2, 932, 933, 9, 10, 2, 2, 933, 135, 3, 2, 2, 2, 934, 937, 7, 118, 2, 2, 935, 937, 5, 138, 70, 2, 936, 934, 3, 2, 2, 2, 936, 935, 3, 2, 2, 2, 937, 137, 3, 2, 2, 2, 938, 942, 5, 140, 71, 2, 939, 942, 7, 61, 2, 2, 940, 942, 7, 62, 2, 2, 941, 938, 3, 2, 2, 2, 941, 939, 3, 2, 2, 2, 941, 940, 3, 2, 2, 2, 942, 139, 3, 2, 2, 2, 943, 944, 9, 11, 2, 2, 944, 141, 3, 2, 2, 2, 945, 946, 7, 118, 2, 2, 946, 947, 6, 72, 35, 2, 947, 948, 5, 110, 56, 2, 948, 143, 3, 2, 2, 2, 949, 950, 7, 118, 2, 2, 950, 951, 6, 73, 36, 2, 951, 952, 5, 110, 56, 2, 952, 145, 3, 2, 2, 2, 953, 958, 7, 13, 2, 2, 954, 958, 7, 2, 2, 3, 955, 958, 6, 74, 37, 2, 956, 958, 6, 74, 38, 2, 957, 953, 3, 2, 2, 2, 957, 954, 3, 2, 2, 2, 957, 955, 3, 2, 2, 2, 957, 956, 3, 2, 2, 2, 958, 147, 3, 2, 2, 2, 109, 149, 152, 178, 182, 189, 195, 199, 206, 214, 219, 221, 231, 239, 244, 253, 261, 265, 270, 281, 287, 302, 322, 326, 330, 338, 347, 352, 360, 367, 374, 381, 388, 406, 410, 412, 419, 425, 430, 445, 448, 453, 456, 467, 471, 476, 489, 495, 504, 506, 512, 518, 521, 524, 529, 537, 540, 550, 553, 558, 565, 572, 577, 580, 585, 591, 596, 605, 609, 614, 619, 625, 629, 639, 642, 645, 660, 663, 668, 691, 694, 703, 711, 715, 717, 722, 726, 733, 740, 746, 787, 851, 855, 868, 870, 876, 880, 884, 888, 896, 902, 907, 910, 917, 928, 936, 941, 957] \ No newline at end of file diff --git a/languages/js/JavaScriptParser.tokens b/languages/js/JavaScriptParser.tokens new file mode 100644 index 0000000000000000000000000000000000000000..d0a4ef4c70c2165ec2c3d876abeafc9ca1b24cbf --- /dev/null +++ b/languages/js/JavaScriptParser.tokens @@ -0,0 +1,224 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Divide=25 +Modulus=26 +Power=27 +NullCoalesce=28 +Hashtag=29 +RightShiftArithmetic=30 +LeftShiftArithmetic=31 +RightShiftLogical=32 +LessThan=33 +MoreThan=34 +LessThanEquals=35 +GreaterThanEquals=36 +Equals_=37 +NotEquals=38 +IdentityEquals=39 +IdentityNotEquals=40 +BitAnd=41 +BitXOr=42 +BitOr=43 +And=44 +Or=45 +MultiplyAssign=46 +DivideAssign=47 +ModulusAssign=48 +PlusAssign=49 +MinusAssign=50 +LeftShiftArithmeticAssign=51 +RightShiftArithmeticAssign=52 +RightShiftLogicalAssign=53 +BitAndAssign=54 +BitXorAssign=55 +BitOrAssign=56 +PowerAssign=57 +ARROW=58 +NullLiteral=59 +BooleanLiteral=60 +DecimalLiteral=61 +HexIntegerLiteral=62 +OctalIntegerLiteral=63 +OctalIntegerLiteral2=64 +BinaryIntegerLiteral=65 +BigHexIntegerLiteral=66 +BigOctalIntegerLiteral=67 +BigBinaryIntegerLiteral=68 +BigDecimalIntegerLiteral=69 +Break=70 +Do=71 +Instanceof=72 +Typeof=73 +Case=74 +Else=75 +New=76 +Var=77 +Catch=78 +Finally=79 +Return=80 +Void=81 +Continue=82 +For=83 +Switch=84 +While=85 +Debugger=86 +Function=87 +This=88 +With=89 +Default=90 +If=91 +Throw=92 +Delete=93 +In=94 +Try=95 +As=96 +From=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Async=105 +Await=106 +Implements=107 +Let=108 +Private=109 +Public=110 +Interface=111 +Package=112 +Protected=113 +Static=114 +Yield=115 +Identifier=116 +StringLiteral=117 +TemplateStringLiteral=118 +WhiteSpaces=119 +LineTerminator=120 +HtmlComment=121 +CDataComment=122 +UnexpectedCharacter=123 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'/'=25 +'%'=26 +'**'=27 +'??'=28 +'#'=29 +'>>'=30 +'<<'=31 +'>>>'=32 +'<'=33 +'>'=34 +'<='=35 +'>='=36 +'=='=37 +'!='=38 +'==='=39 +'!=='=40 +'&'=41 +'^'=42 +'|'=43 +'&&'=44 +'||'=45 +'*='=46 +'/='=47 +'%='=48 +'+='=49 +'-='=50 +'<<='=51 +'>>='=52 +'>>>='=53 +'&='=54 +'^='=55 +'|='=56 +'**='=57 +'=>'=58 +'null'=59 +'break'=70 +'do'=71 +'instanceof'=72 +'typeof'=73 +'case'=74 +'else'=75 +'new'=76 +'var'=77 +'catch'=78 +'finally'=79 +'return'=80 +'void'=81 +'continue'=82 +'for'=83 +'switch'=84 +'while'=85 +'debugger'=86 +'function'=87 +'this'=88 +'with'=89 +'default'=90 +'if'=91 +'throw'=92 +'delete'=93 +'in'=94 +'try'=95 +'as'=96 +'from'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'async'=105 +'await'=106 +'implements'=107 +'let'=108 +'private'=109 +'public'=110 +'interface'=111 +'package'=112 +'protected'=113 +'static'=114 +'yield'=115 diff --git a/languages/js/javascript_base_lexer.go b/languages/js/javascript_base_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..703de745ce92c511706b37902bc086d0f51d7106 --- /dev/null +++ b/languages/js/javascript_base_lexer.go @@ -0,0 +1,103 @@ +package parser + +import "github.com/antlr/antlr4/runtime/Go/antlr" + +// JavaScriptBaseLexer state +type JavaScriptBaseLexer struct { + *antlr.BaseLexer + + scopeStrictModes []bool + stackLength int + stackIx int + + lastToken antlr.Token + useStrictDefault bool + useStrictCurrent bool +} + +func (l *JavaScriptBaseLexer) IsStartOfFile() bool { + return l.lastToken == nil +} + +func (l *JavaScriptBaseLexer) pushStrictModeScope(v bool) { + if l.stackIx == l.stackLength { + l.scopeStrictModes = append(l.scopeStrictModes, v) + l.stackLength++ + } else { + l.scopeStrictModes[l.stackIx] = v + } + l.stackIx++ +} + +func (l *JavaScriptBaseLexer) popStrictModeScope() bool { + l.stackIx-- + v := l.scopeStrictModes[l.stackIx] + l.scopeStrictModes[l.stackIx] = false + return v +} + +// IsStrictMode is self explanatory. +func (l *JavaScriptBaseLexer) IsStrictMode() bool { + return l.useStrictCurrent +} + +// NextToken from the character stream. +func (l *JavaScriptBaseLexer) NextToken() antlr.Token { + next := l.BaseLexer.NextToken() // Get next token + if next.GetChannel() == antlr.TokenDefaultChannel { + // Keep track of the last token on default channel + l.lastToken = next + } + return next +} + +// ProcessOpenBrace is called when a { is encountered during +// lexing, we push a new scope everytime. +func (l *JavaScriptBaseLexer) ProcessOpenBrace() { + l.useStrictCurrent = l.useStrictDefault + if l.stackIx > 0 && l.scopeStrictModes[l.stackIx-1] { + l.useStrictCurrent = true + } + l.pushStrictModeScope(l.useStrictCurrent) +} + +// ProcessCloseBrace is called when a } is encountered during +// lexing, we pop a scope unless we're inside global scope. +func (l *JavaScriptBaseLexer) ProcessCloseBrace() { + l.useStrictCurrent = l.useStrictDefault + if l.stackIx > 0 { + l.useStrictCurrent = l.popStrictModeScope() + } +} + +// ProcessStringLiteral is called when lexing a string literal. +func (l *JavaScriptBaseLexer) ProcessStringLiteral() { + if l.lastToken == nil || l.lastToken.GetTokenType() == JavaScriptLexerOpenBrace { + if l.GetText() == `"use strict"` || l.GetText() == "'use strict'" { + if l.stackIx > 0 { + l.popStrictModeScope() + } + l.useStrictCurrent = true + l.pushStrictModeScope(l.useStrictCurrent) + } + } +} + +// IsRegexPossible returns true if the lexer can match a +// regex literal. +func (l *JavaScriptBaseLexer) IsRegexPossible() bool { + if l.lastToken == nil { + return true + } + switch l.lastToken.GetTokenType() { + case JavaScriptLexerIdentifier, JavaScriptLexerNullLiteral, + JavaScriptLexerBooleanLiteral, JavaScriptLexerThis, + JavaScriptLexerCloseBracket, JavaScriptLexerCloseParen, + JavaScriptLexerOctalIntegerLiteral, JavaScriptLexerDecimalLiteral, + JavaScriptLexerHexIntegerLiteral, JavaScriptLexerStringLiteral, + JavaScriptLexerPlusPlus, JavaScriptLexerMinusMinus: + return false + default: + return true + } +} diff --git a/languages/js/javascript_base_parser.go b/languages/js/javascript_base_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..55f4c15b74da777bda73f5c555a2d2a99ad4db13 --- /dev/null +++ b/languages/js/javascript_base_parser.go @@ -0,0 +1,92 @@ +package parser + +import ( + "strings" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// JavaScriptBaseParser implementation. +type JavaScriptBaseParser struct { + *antlr.BaseParser +} + +// Short for p.prev(str string) +func (p *JavaScriptBaseParser) p(str string) bool { + return p.prev(str) +} + +// Whether the previous token value equals to str. +func (p *JavaScriptBaseParser) prev(str string) bool { + return p.GetTokenStream().LT(-1).GetText() == str +} + +// Short for p.next(str string) +func (p *JavaScriptBaseParser) n(str string) bool { + return p.next(str) +} + +// Whether the next token value equals to str. +func (p *JavaScriptBaseParser) next(str string) bool { + return p.GetTokenStream().LT(1).GetText() == str +} + +func (p *JavaScriptBaseParser) notLineTerminator() bool { + return !p.here(JavaScriptParserLineTerminator) +} + +func (p *JavaScriptBaseParser) notOpenBraceAndNotFunction() bool { + nextTokenType := p.GetTokenStream().LT(1).GetTokenType() + return nextTokenType != JavaScriptParserOpenBrace && nextTokenType != JavaScriptParserFunction +} + +func (p *JavaScriptBaseParser) closeBrace() bool { + return p.GetTokenStream().LT(1).GetTokenType() == JavaScriptParserCloseBrace +} + +// Returns true if on the current index of the parser's +// token stream a token of the given type exists on the +// Hidden channel. +func (p *JavaScriptBaseParser) here(_type int) bool { + // Get the token ahead of the current index. + possibleIndexEosToken := p.GetCurrentToken().GetTokenIndex() - 1 + ahead := p.GetTokenStream().Get(possibleIndexEosToken) + + // Check if the token resides on the HIDDEN channel and if it's of the + // provided type. + return ahead.GetChannel() == antlr.LexerHidden && ahead.GetTokenType() == _type +} + +// Returns true if on the current index of the parser's +// token stream a token exists on the Hidden channel which +// either is a line terminator, or is a multi line comment that +// contains a line terminator. +func (p *JavaScriptBaseParser) lineTerminatorAhead() bool { + // Get the token ahead of the current index. + possibleIndexEosToken := p.GetCurrentToken().GetTokenIndex() - 1 + ahead := p.GetTokenStream().Get(possibleIndexEosToken) + + if ahead.GetChannel() != antlr.LexerHidden { + // We're only interested in tokens on the HIDDEN channel. + return true + } + + if ahead.GetTokenType() == JavaScriptParserLineTerminator { + // There is definitely a line terminator ahead. + return true + } + + if ahead.GetTokenType() == JavaScriptParserWhiteSpaces { + // Get the token ahead of the current whitespaces. + possibleIndexEosToken = p.GetCurrentToken().GetTokenIndex() - 2 + ahead = p.GetTokenStream().Get(possibleIndexEosToken) + } + + // Get the token's text and type. + text := ahead.GetText() + _type := ahead.GetTokenType() + + // Check if the token is, or contains a line terminator. + return (_type == JavaScriptParserMultiLineComment && (strings.Contains(text, "\r") || strings.Contains(text, "\n"))) || + (_type == JavaScriptParserLineTerminator) +} diff --git a/languages/js/javascript_lexer.go b/languages/js/javascript_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..be35a278169376f053907605426d71015a51ddea --- /dev/null +++ b/languages/js/javascript_lexer.go @@ -0,0 +1,1069 @@ +// Code generated from JavaScriptLexer.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser + +import ( + "fmt" + "unicode" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import error +var _ = fmt.Printf +var _ = unicode.IsLetter + +var serializedLexerAtn = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 125, 1156, + 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, + 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, + 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, + 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, + 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, + 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, + 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, + 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, + 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, + 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, + 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, + 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, + 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, + 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, + 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, + 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, + 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, + 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, + 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, + 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, + 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, + 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, + 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, + 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, + 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, + 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, + 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, + 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, + 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, + 4, 147, 9, 147, 4, 148, 9, 148, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 303, + 10, 2, 12, 2, 14, 2, 306, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 312, 10, + 3, 12, 3, 14, 3, 315, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, + 3, 4, 3, 4, 7, 4, 326, 10, 4, 12, 4, 14, 4, 329, 11, 4, 3, 4, 3, 4, 3, + 5, 3, 5, 3, 5, 7, 5, 336, 10, 5, 12, 5, 14, 5, 339, 11, 5, 3, 5, 3, 5, + 3, 5, 7, 5, 344, 10, 5, 12, 5, 14, 5, 347, 11, 5, 3, 6, 3, 6, 3, 7, 3, + 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, + 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, + 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, + 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, + 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, + 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, + 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, + 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, + 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, + 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, + 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, + 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, + 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, + 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, + 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, + 61, 5, 61, 511, 10, 61, 3, 62, 3, 62, 3, 62, 3, 62, 7, 62, 517, 10, 62, + 12, 62, 14, 62, 520, 11, 62, 3, 62, 5, 62, 523, 10, 62, 3, 62, 3, 62, 3, + 62, 7, 62, 528, 10, 62, 12, 62, 14, 62, 531, 11, 62, 3, 62, 5, 62, 534, + 10, 62, 3, 62, 3, 62, 5, 62, 538, 10, 62, 5, 62, 540, 10, 62, 3, 63, 3, + 63, 3, 63, 3, 63, 7, 63, 546, 10, 63, 12, 63, 14, 63, 549, 11, 63, 3, 64, + 3, 64, 6, 64, 553, 10, 64, 13, 64, 14, 64, 554, 3, 64, 3, 64, 3, 65, 3, + 65, 3, 65, 3, 65, 7, 65, 563, 10, 65, 12, 65, 14, 65, 566, 11, 65, 3, 66, + 3, 66, 3, 66, 3, 66, 7, 66, 572, 10, 66, 12, 66, 14, 66, 575, 11, 66, 3, + 67, 3, 67, 3, 67, 3, 67, 7, 67, 581, 10, 67, 12, 67, 14, 67, 584, 11, 67, + 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 7, 68, 592, 10, 68, 12, 68, 14, + 68, 595, 11, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 7, 69, 603, + 10, 69, 12, 69, 14, 69, 606, 11, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, + 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 73, 3, + 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, + 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, + 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, + 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, + 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, + 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, + 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, + 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, 3, + 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, + 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, + 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 91, + 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, + 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, + 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 3, + 97, 3, 97, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, + 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, + 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, + 102, 3, 102, 3, 102, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, + 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 105, 3, 105, 3, + 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, + 106, 3, 106, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, + 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, + 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, + 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, + 110, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, + 111, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, + 112, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, + 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 114, 3, 114, 3, 114, 3, 114, 3, + 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 115, 3, + 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 116, 3, + 116, 3, 116, 3, 116, 3, 116, 3, 116, 3, 116, 3, 116, 3, 117, 3, 117, 7, + 117, 925, 10, 117, 12, 117, 14, 117, 928, 11, 117, 3, 118, 3, 118, 7, 118, + 932, 10, 118, 12, 118, 14, 118, 935, 11, 118, 3, 118, 3, 118, 3, 118, 7, + 118, 940, 10, 118, 12, 118, 14, 118, 943, 11, 118, 3, 118, 5, 118, 946, + 10, 118, 3, 118, 3, 118, 3, 119, 3, 119, 3, 119, 3, 119, 7, 119, 954, 10, + 119, 12, 119, 14, 119, 957, 11, 119, 3, 119, 3, 119, 3, 120, 6, 120, 962, + 10, 120, 13, 120, 14, 120, 963, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, + 3, 121, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 7, 122, 978, 10, + 122, 12, 122, 14, 122, 981, 11, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, + 122, 3, 122, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, + 123, 3, 123, 3, 123, 3, 123, 7, 123, 1000, 10, 123, 12, 123, 14, 123, 1003, + 11, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 124, 3, 124, + 3, 124, 3, 124, 3, 125, 3, 125, 3, 125, 3, 125, 5, 125, 1019, 10, 125, + 3, 126, 3, 126, 3, 126, 3, 126, 5, 126, 1025, 10, 126, 3, 127, 3, 127, + 3, 127, 3, 127, 3, 127, 5, 127, 1032, 10, 127, 3, 128, 3, 128, 5, 128, + 1036, 10, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, + 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 6, 130, 1052, 10, + 130, 13, 130, 14, 130, 1053, 3, 130, 3, 130, 5, 130, 1058, 10, 130, 3, + 131, 3, 131, 3, 131, 6, 131, 1063, 10, 131, 13, 131, 14, 131, 1064, 3, + 131, 3, 131, 3, 132, 3, 132, 3, 133, 3, 133, 3, 134, 3, 134, 5, 134, 1075, + 10, 134, 3, 135, 3, 135, 3, 135, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, + 7, 137, 1085, 10, 137, 12, 137, 14, 137, 1088, 11, 137, 5, 137, 1090, 10, + 137, 3, 138, 3, 138, 5, 138, 1094, 10, 138, 3, 138, 6, 138, 1097, 10, 138, + 13, 138, 14, 138, 1098, 3, 139, 3, 139, 3, 139, 3, 139, 3, 139, 5, 139, + 1106, 10, 139, 3, 140, 3, 140, 3, 140, 3, 140, 5, 140, 1112, 10, 140, 3, + 141, 5, 141, 1115, 10, 141, 3, 142, 5, 142, 1118, 10, 142, 3, 143, 5, 143, + 1121, 10, 143, 3, 144, 5, 144, 1124, 10, 144, 3, 145, 3, 145, 3, 145, 3, + 145, 7, 145, 1130, 10, 145, 12, 145, 14, 145, 1133, 11, 145, 3, 145, 5, + 145, 1136, 10, 145, 3, 146, 3, 146, 3, 146, 3, 146, 7, 146, 1142, 10, 146, + 12, 146, 14, 146, 1145, 11, 146, 3, 146, 5, 146, 1148, 10, 146, 3, 147, + 3, 147, 5, 147, 1152, 10, 147, 3, 148, 3, 148, 3, 148, 5, 313, 979, 1001, + 2, 149, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, + 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, + 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, + 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, + 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, + 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, + 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, + 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 141, 72, + 143, 73, 145, 74, 147, 75, 149, 76, 151, 77, 153, 78, 155, 79, 157, 80, + 159, 81, 161, 82, 163, 83, 165, 84, 167, 85, 169, 86, 171, 87, 173, 88, + 175, 89, 177, 90, 179, 91, 181, 92, 183, 93, 185, 94, 187, 95, 189, 96, + 191, 97, 193, 98, 195, 99, 197, 100, 199, 101, 201, 102, 203, 103, 205, + 104, 207, 105, 209, 106, 211, 107, 213, 108, 215, 109, 217, 110, 219, 111, + 221, 112, 223, 113, 225, 114, 227, 115, 229, 116, 231, 117, 233, 118, 235, + 119, 237, 120, 239, 121, 241, 122, 243, 123, 245, 124, 247, 125, 249, 2, + 251, 2, 253, 2, 255, 2, 257, 2, 259, 2, 261, 2, 263, 2, 265, 2, 267, 2, + 269, 2, 271, 2, 273, 2, 275, 2, 277, 2, 279, 2, 281, 2, 283, 2, 285, 2, + 287, 2, 289, 2, 291, 2, 293, 2, 295, 2, 3, 2, 32, 5, 2, 12, 12, 15, 15, + 8234, 8235, 3, 2, 50, 59, 4, 2, 50, 59, 97, 97, 4, 2, 90, 90, 122, 122, + 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 57, 4, 2, 81, 81, 113, 113, 4, + 2, 50, 57, 97, 97, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 50, 51, + 97, 97, 3, 2, 98, 98, 6, 2, 11, 11, 13, 14, 34, 34, 162, 162, 6, 2, 12, + 12, 15, 15, 36, 36, 94, 94, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 11, 2, + 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, + 120, 120, 14, 2, 12, 12, 15, 15, 36, 36, 41, 41, 50, 59, 94, 94, 100, 100, + 104, 104, 112, 112, 116, 116, 118, 120, 122, 122, 5, 2, 50, 59, 119, 119, + 122, 122, 6, 2, 50, 59, 67, 72, 97, 97, 99, 104, 3, 2, 51, 59, 4, 2, 71, + 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 38, 38, 97, 97, 257, 2, 67, 92, + 99, 124, 172, 172, 183, 183, 188, 188, 194, 216, 218, 248, 250, 545, 548, + 565, 594, 687, 690, 698, 701, 707, 722, 723, 738, 742, 752, 752, 892, 892, + 904, 904, 906, 908, 910, 910, 912, 931, 933, 976, 978, 985, 988, 1013, + 1026, 1155, 1166, 1222, 1225, 1226, 1229, 1230, 1234, 1271, 1274, 1275, + 1331, 1368, 1371, 1371, 1379, 1417, 1490, 1516, 1522, 1524, 1571, 1596, + 1602, 1612, 1651, 1749, 1751, 1751, 1767, 1768, 1788, 1790, 1810, 1810, + 1812, 1838, 1922, 1959, 2311, 2363, 2367, 2367, 2386, 2386, 2394, 2403, + 2439, 2446, 2449, 2450, 2453, 2474, 2476, 2482, 2484, 2484, 2488, 2491, + 2526, 2527, 2529, 2531, 2546, 2547, 2567, 2572, 2577, 2578, 2581, 2602, + 2604, 2610, 2612, 2613, 2615, 2616, 2618, 2619, 2651, 2654, 2656, 2656, + 2676, 2678, 2695, 2701, 2703, 2703, 2705, 2707, 2709, 2730, 2732, 2738, + 2740, 2741, 2743, 2747, 2751, 2751, 2770, 2770, 2786, 2786, 2823, 2830, + 2833, 2834, 2837, 2858, 2860, 2866, 2868, 2869, 2872, 2875, 2879, 2879, + 2910, 2911, 2913, 2915, 2951, 2956, 2960, 2962, 2964, 2967, 2971, 2972, + 2974, 2974, 2976, 2977, 2981, 2982, 2986, 2988, 2992, 2999, 3001, 3003, + 3079, 3086, 3088, 3090, 3092, 3114, 3116, 3125, 3127, 3131, 3170, 3171, + 3207, 3214, 3216, 3218, 3220, 3242, 3244, 3253, 3255, 3259, 3296, 3296, + 3298, 3299, 3335, 3342, 3344, 3346, 3348, 3370, 3372, 3387, 3426, 3427, + 3463, 3480, 3484, 3507, 3509, 3517, 3519, 3519, 3522, 3528, 3587, 3634, + 3636, 3637, 3650, 3656, 3715, 3716, 3718, 3718, 3721, 3722, 3724, 3724, + 3727, 3727, 3734, 3737, 3739, 3745, 3747, 3749, 3751, 3751, 3753, 3753, + 3756, 3757, 3759, 3762, 3764, 3765, 3775, 3782, 3784, 3784, 3806, 3807, + 3842, 3842, 3906, 3948, 3978, 3981, 4098, 4131, 4133, 4137, 4139, 4140, + 4178, 4183, 4258, 4295, 4306, 4344, 4354, 4443, 4449, 4516, 4522, 4603, + 4610, 4616, 4618, 4680, 4682, 4682, 4684, 4687, 4690, 4696, 4698, 4698, + 4700, 4703, 4706, 4744, 4746, 4746, 4748, 4751, 4754, 4784, 4786, 4786, + 4788, 4791, 4794, 4800, 4802, 4802, 4804, 4807, 4810, 4816, 4818, 4824, + 4826, 4848, 4850, 4880, 4882, 4882, 4884, 4887, 4890, 4896, 4898, 4936, + 4938, 4956, 5026, 5110, 5123, 5752, 5763, 5788, 5794, 5868, 6018, 6069, + 6178, 6265, 6274, 6314, 7682, 7837, 7842, 7931, 7938, 7959, 7962, 7967, + 7970, 8007, 8010, 8015, 8018, 8025, 8027, 8027, 8029, 8029, 8031, 8031, + 8033, 8063, 8066, 8118, 8120, 8126, 8128, 8128, 8132, 8134, 8136, 8142, + 8146, 8149, 8152, 8157, 8162, 8174, 8180, 8182, 8184, 8190, 8321, 8321, + 8452, 8452, 8457, 8457, 8460, 8469, 8471, 8471, 8475, 8479, 8486, 8486, + 8488, 8488, 8490, 8490, 8492, 8495, 8497, 8499, 8501, 8507, 8546, 8581, + 12295, 12297, 12323, 12331, 12339, 12343, 12346, 12348, 12355, 12438, 12447, + 12448, 12451, 12540, 12542, 12544, 12551, 12590, 12595, 12688, 12706, 12729, + 13314, 19905, 19970, 42126, 44034, 44034, 55205, 55205, 63746, 64047, 64258, + 64264, 64277, 64281, 64287, 64287, 64289, 64298, 64300, 64312, 64314, 64318, + 64320, 64320, 64322, 64323, 64325, 64326, 64328, 64435, 64469, 64831, 64850, + 64913, 64916, 64969, 65010, 65021, 65138, 65140, 65142, 65142, 65144, 65278, + 65315, 65340, 65347, 65372, 65384, 65472, 65476, 65481, 65484, 65489, 65492, + 65497, 65500, 65502, 102, 2, 770, 848, 866, 868, 1157, 1160, 1427, 1443, + 1445, 1467, 1469, 1471, 1473, 1473, 1475, 1476, 1478, 1478, 1613, 1623, + 1650, 1650, 1752, 1758, 1761, 1766, 1769, 1770, 1772, 1775, 1811, 1811, + 1842, 1868, 1960, 1970, 2307, 2309, 2366, 2366, 2368, 2383, 2387, 2390, + 2404, 2405, 2435, 2437, 2494, 2502, 2505, 2506, 2509, 2511, 2521, 2521, + 2532, 2533, 2564, 2564, 2622, 2622, 2624, 2628, 2633, 2634, 2637, 2639, + 2674, 2675, 2691, 2693, 2750, 2750, 2752, 2759, 2761, 2763, 2765, 2767, + 2819, 2821, 2878, 2878, 2880, 2885, 2889, 2890, 2893, 2895, 2904, 2905, + 2948, 2949, 3008, 3012, 3016, 3018, 3020, 3023, 3033, 3033, 3075, 3077, + 3136, 3142, 3144, 3146, 3148, 3151, 3159, 3160, 3204, 3205, 3264, 3270, + 3272, 3274, 3276, 3279, 3287, 3288, 3332, 3333, 3392, 3397, 3400, 3402, + 3404, 3407, 3417, 3417, 3460, 3461, 3532, 3532, 3537, 3542, 3544, 3544, + 3546, 3553, 3572, 3573, 3635, 3635, 3638, 3644, 3657, 3664, 3763, 3763, + 3766, 3771, 3773, 3774, 3786, 3791, 3866, 3867, 3895, 3895, 3897, 3897, + 3899, 3899, 3904, 3905, 3955, 3974, 3976, 3977, 3986, 3993, 3995, 4030, + 4040, 4040, 4142, 4148, 4152, 4155, 4184, 4187, 6070, 6101, 6315, 6315, + 8402, 8414, 8419, 8419, 12332, 12337, 12443, 12444, 64288, 64288, 65058, + 65061, 22, 2, 50, 59, 1634, 1643, 1778, 1787, 2408, 2417, 2536, 2545, 2664, + 2673, 2792, 2801, 2920, 2929, 3049, 3057, 3176, 3185, 3304, 3313, 3432, + 3441, 3666, 3675, 3794, 3803, 3874, 3883, 4162, 4171, 4971, 4979, 6114, + 6123, 6162, 6171, 65298, 65307, 9, 2, 97, 97, 8257, 8258, 12541, 12541, + 65077, 65078, 65103, 65105, 65345, 65345, 65383, 65383, 8, 2, 12, 12, 15, + 15, 44, 44, 49, 49, 93, 94, 8234, 8235, 7, 2, 12, 12, 15, 15, 49, 49, 93, + 94, 8234, 8235, 6, 2, 12, 12, 15, 15, 94, 95, 8234, 8235, 2, 1190, 2, 3, + 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, + 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, + 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, + 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, + 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, + 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, + 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, + 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, + 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, + 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, + 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, + 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, + 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, + 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, + 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, + 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, + 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, + 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, + 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, + 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, + 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, + 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, + 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, + 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, + 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, + 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 2, + 197, 3, 2, 2, 2, 2, 199, 3, 2, 2, 2, 2, 201, 3, 2, 2, 2, 2, 203, 3, 2, + 2, 2, 2, 205, 3, 2, 2, 2, 2, 207, 3, 2, 2, 2, 2, 209, 3, 2, 2, 2, 2, 211, + 3, 2, 2, 2, 2, 213, 3, 2, 2, 2, 2, 215, 3, 2, 2, 2, 2, 217, 3, 2, 2, 2, + 2, 219, 3, 2, 2, 2, 2, 221, 3, 2, 2, 2, 2, 223, 3, 2, 2, 2, 2, 225, 3, + 2, 2, 2, 2, 227, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 231, 3, 2, 2, 2, 2, + 233, 3, 2, 2, 2, 2, 235, 3, 2, 2, 2, 2, 237, 3, 2, 2, 2, 2, 239, 3, 2, + 2, 2, 2, 241, 3, 2, 2, 2, 2, 243, 3, 2, 2, 2, 2, 245, 3, 2, 2, 2, 2, 247, + 3, 2, 2, 2, 3, 297, 3, 2, 2, 2, 5, 307, 3, 2, 2, 2, 7, 321, 3, 2, 2, 2, + 9, 332, 3, 2, 2, 2, 11, 348, 3, 2, 2, 2, 13, 350, 3, 2, 2, 2, 15, 352, + 3, 2, 2, 2, 17, 354, 3, 2, 2, 2, 19, 356, 3, 2, 2, 2, 21, 359, 3, 2, 2, + 2, 23, 362, 3, 2, 2, 2, 25, 364, 3, 2, 2, 2, 27, 366, 3, 2, 2, 2, 29, 368, + 3, 2, 2, 2, 31, 370, 3, 2, 2, 2, 33, 372, 3, 2, 2, 2, 35, 376, 3, 2, 2, + 2, 37, 378, 3, 2, 2, 2, 39, 381, 3, 2, 2, 2, 41, 384, 3, 2, 2, 2, 43, 386, + 3, 2, 2, 2, 45, 388, 3, 2, 2, 2, 47, 390, 3, 2, 2, 2, 49, 392, 3, 2, 2, + 2, 51, 394, 3, 2, 2, 2, 53, 396, 3, 2, 2, 2, 55, 398, 3, 2, 2, 2, 57, 401, + 3, 2, 2, 2, 59, 404, 3, 2, 2, 2, 61, 406, 3, 2, 2, 2, 63, 409, 3, 2, 2, + 2, 65, 412, 3, 2, 2, 2, 67, 416, 3, 2, 2, 2, 69, 418, 3, 2, 2, 2, 71, 420, + 3, 2, 2, 2, 73, 423, 3, 2, 2, 2, 75, 426, 3, 2, 2, 2, 77, 429, 3, 2, 2, + 2, 79, 432, 3, 2, 2, 2, 81, 436, 3, 2, 2, 2, 83, 440, 3, 2, 2, 2, 85, 442, + 3, 2, 2, 2, 87, 444, 3, 2, 2, 2, 89, 446, 3, 2, 2, 2, 91, 449, 3, 2, 2, + 2, 93, 452, 3, 2, 2, 2, 95, 455, 3, 2, 2, 2, 97, 458, 3, 2, 2, 2, 99, 461, + 3, 2, 2, 2, 101, 464, 3, 2, 2, 2, 103, 467, 3, 2, 2, 2, 105, 471, 3, 2, + 2, 2, 107, 475, 3, 2, 2, 2, 109, 480, 3, 2, 2, 2, 111, 483, 3, 2, 2, 2, + 113, 486, 3, 2, 2, 2, 115, 489, 3, 2, 2, 2, 117, 493, 3, 2, 2, 2, 119, + 496, 3, 2, 2, 2, 121, 510, 3, 2, 2, 2, 123, 539, 3, 2, 2, 2, 125, 541, + 3, 2, 2, 2, 127, 550, 3, 2, 2, 2, 129, 558, 3, 2, 2, 2, 131, 567, 3, 2, + 2, 2, 133, 576, 3, 2, 2, 2, 135, 587, 3, 2, 2, 2, 137, 598, 3, 2, 2, 2, + 139, 609, 3, 2, 2, 2, 141, 612, 3, 2, 2, 2, 143, 618, 3, 2, 2, 2, 145, + 621, 3, 2, 2, 2, 147, 632, 3, 2, 2, 2, 149, 639, 3, 2, 2, 2, 151, 644, + 3, 2, 2, 2, 153, 649, 3, 2, 2, 2, 155, 653, 3, 2, 2, 2, 157, 657, 3, 2, + 2, 2, 159, 663, 3, 2, 2, 2, 161, 671, 3, 2, 2, 2, 163, 678, 3, 2, 2, 2, + 165, 683, 3, 2, 2, 2, 167, 692, 3, 2, 2, 2, 169, 696, 3, 2, 2, 2, 171, + 703, 3, 2, 2, 2, 173, 709, 3, 2, 2, 2, 175, 718, 3, 2, 2, 2, 177, 727, + 3, 2, 2, 2, 179, 732, 3, 2, 2, 2, 181, 737, 3, 2, 2, 2, 183, 745, 3, 2, + 2, 2, 185, 748, 3, 2, 2, 2, 187, 754, 3, 2, 2, 2, 189, 761, 3, 2, 2, 2, + 191, 764, 3, 2, 2, 2, 193, 768, 3, 2, 2, 2, 195, 771, 3, 2, 2, 2, 197, + 776, 3, 2, 2, 2, 199, 782, 3, 2, 2, 2, 201, 787, 3, 2, 2, 2, 203, 795, + 3, 2, 2, 2, 205, 801, 3, 2, 2, 2, 207, 807, 3, 2, 2, 2, 209, 814, 3, 2, + 2, 2, 211, 821, 3, 2, 2, 2, 213, 827, 3, 2, 2, 2, 215, 833, 3, 2, 2, 2, + 217, 846, 3, 2, 2, 2, 219, 852, 3, 2, 2, 2, 221, 862, 3, 2, 2, 2, 223, + 871, 3, 2, 2, 2, 225, 883, 3, 2, 2, 2, 227, 893, 3, 2, 2, 2, 229, 905, + 3, 2, 2, 2, 231, 914, 3, 2, 2, 2, 233, 922, 3, 2, 2, 2, 235, 945, 3, 2, + 2, 2, 237, 949, 3, 2, 2, 2, 239, 961, 3, 2, 2, 2, 241, 967, 3, 2, 2, 2, + 243, 971, 3, 2, 2, 2, 245, 988, 3, 2, 2, 2, 247, 1010, 3, 2, 2, 2, 249, + 1018, 3, 2, 2, 2, 251, 1024, 3, 2, 2, 2, 253, 1031, 3, 2, 2, 2, 255, 1035, + 3, 2, 2, 2, 257, 1037, 3, 2, 2, 2, 259, 1057, 3, 2, 2, 2, 261, 1059, 3, + 2, 2, 2, 263, 1068, 3, 2, 2, 2, 265, 1070, 3, 2, 2, 2, 267, 1074, 3, 2, + 2, 2, 269, 1076, 3, 2, 2, 2, 271, 1079, 3, 2, 2, 2, 273, 1089, 3, 2, 2, + 2, 275, 1091, 3, 2, 2, 2, 277, 1105, 3, 2, 2, 2, 279, 1111, 3, 2, 2, 2, + 281, 1114, 3, 2, 2, 2, 283, 1117, 3, 2, 2, 2, 285, 1120, 3, 2, 2, 2, 287, + 1123, 3, 2, 2, 2, 289, 1135, 3, 2, 2, 2, 291, 1147, 3, 2, 2, 2, 293, 1151, + 3, 2, 2, 2, 295, 1153, 3, 2, 2, 2, 297, 298, 6, 2, 2, 2, 298, 299, 7, 37, + 2, 2, 299, 300, 7, 35, 2, 2, 300, 304, 3, 2, 2, 2, 301, 303, 10, 2, 2, + 2, 302, 301, 3, 2, 2, 2, 303, 306, 3, 2, 2, 2, 304, 302, 3, 2, 2, 2, 304, + 305, 3, 2, 2, 2, 305, 4, 3, 2, 2, 2, 306, 304, 3, 2, 2, 2, 307, 308, 7, + 49, 2, 2, 308, 309, 7, 44, 2, 2, 309, 313, 3, 2, 2, 2, 310, 312, 11, 2, + 2, 2, 311, 310, 3, 2, 2, 2, 312, 315, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, + 313, 311, 3, 2, 2, 2, 314, 316, 3, 2, 2, 2, 315, 313, 3, 2, 2, 2, 316, + 317, 7, 44, 2, 2, 317, 318, 7, 49, 2, 2, 318, 319, 3, 2, 2, 2, 319, 320, + 8, 3, 2, 2, 320, 6, 3, 2, 2, 2, 321, 322, 7, 49, 2, 2, 322, 323, 7, 49, + 2, 2, 323, 327, 3, 2, 2, 2, 324, 326, 10, 2, 2, 2, 325, 324, 3, 2, 2, 2, + 326, 329, 3, 2, 2, 2, 327, 325, 3, 2, 2, 2, 327, 328, 3, 2, 2, 2, 328, + 330, 3, 2, 2, 2, 329, 327, 3, 2, 2, 2, 330, 331, 8, 4, 2, 2, 331, 8, 3, + 2, 2, 2, 332, 333, 7, 49, 2, 2, 333, 337, 5, 289, 145, 2, 334, 336, 5, + 291, 146, 2, 335, 334, 3, 2, 2, 2, 336, 339, 3, 2, 2, 2, 337, 335, 3, 2, + 2, 2, 337, 338, 3, 2, 2, 2, 338, 340, 3, 2, 2, 2, 339, 337, 3, 2, 2, 2, + 340, 341, 6, 5, 3, 2, 341, 345, 7, 49, 2, 2, 342, 344, 5, 277, 139, 2, + 343, 342, 3, 2, 2, 2, 344, 347, 3, 2, 2, 2, 345, 343, 3, 2, 2, 2, 345, + 346, 3, 2, 2, 2, 346, 10, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 348, 349, 7, + 93, 2, 2, 349, 12, 3, 2, 2, 2, 350, 351, 7, 95, 2, 2, 351, 14, 3, 2, 2, + 2, 352, 353, 7, 42, 2, 2, 353, 16, 3, 2, 2, 2, 354, 355, 7, 43, 2, 2, 355, + 18, 3, 2, 2, 2, 356, 357, 7, 125, 2, 2, 357, 358, 8, 10, 3, 2, 358, 20, + 3, 2, 2, 2, 359, 360, 7, 127, 2, 2, 360, 361, 8, 11, 4, 2, 361, 22, 3, + 2, 2, 2, 362, 363, 7, 61, 2, 2, 363, 24, 3, 2, 2, 2, 364, 365, 7, 46, 2, + 2, 365, 26, 3, 2, 2, 2, 366, 367, 7, 63, 2, 2, 367, 28, 3, 2, 2, 2, 368, + 369, 7, 65, 2, 2, 369, 30, 3, 2, 2, 2, 370, 371, 7, 60, 2, 2, 371, 32, + 3, 2, 2, 2, 372, 373, 7, 48, 2, 2, 373, 374, 7, 48, 2, 2, 374, 375, 7, + 48, 2, 2, 375, 34, 3, 2, 2, 2, 376, 377, 7, 48, 2, 2, 377, 36, 3, 2, 2, + 2, 378, 379, 7, 45, 2, 2, 379, 380, 7, 45, 2, 2, 380, 38, 3, 2, 2, 2, 381, + 382, 7, 47, 2, 2, 382, 383, 7, 47, 2, 2, 383, 40, 3, 2, 2, 2, 384, 385, + 7, 45, 2, 2, 385, 42, 3, 2, 2, 2, 386, 387, 7, 47, 2, 2, 387, 44, 3, 2, + 2, 2, 388, 389, 7, 128, 2, 2, 389, 46, 3, 2, 2, 2, 390, 391, 7, 35, 2, + 2, 391, 48, 3, 2, 2, 2, 392, 393, 7, 44, 2, 2, 393, 50, 3, 2, 2, 2, 394, + 395, 7, 49, 2, 2, 395, 52, 3, 2, 2, 2, 396, 397, 7, 39, 2, 2, 397, 54, + 3, 2, 2, 2, 398, 399, 7, 44, 2, 2, 399, 400, 7, 44, 2, 2, 400, 56, 3, 2, + 2, 2, 401, 402, 7, 65, 2, 2, 402, 403, 7, 65, 2, 2, 403, 58, 3, 2, 2, 2, + 404, 405, 7, 37, 2, 2, 405, 60, 3, 2, 2, 2, 406, 407, 7, 64, 2, 2, 407, + 408, 7, 64, 2, 2, 408, 62, 3, 2, 2, 2, 409, 410, 7, 62, 2, 2, 410, 411, + 7, 62, 2, 2, 411, 64, 3, 2, 2, 2, 412, 413, 7, 64, 2, 2, 413, 414, 7, 64, + 2, 2, 414, 415, 7, 64, 2, 2, 415, 66, 3, 2, 2, 2, 416, 417, 7, 62, 2, 2, + 417, 68, 3, 2, 2, 2, 418, 419, 7, 64, 2, 2, 419, 70, 3, 2, 2, 2, 420, 421, + 7, 62, 2, 2, 421, 422, 7, 63, 2, 2, 422, 72, 3, 2, 2, 2, 423, 424, 7, 64, + 2, 2, 424, 425, 7, 63, 2, 2, 425, 74, 3, 2, 2, 2, 426, 427, 7, 63, 2, 2, + 427, 428, 7, 63, 2, 2, 428, 76, 3, 2, 2, 2, 429, 430, 7, 35, 2, 2, 430, + 431, 7, 63, 2, 2, 431, 78, 3, 2, 2, 2, 432, 433, 7, 63, 2, 2, 433, 434, + 7, 63, 2, 2, 434, 435, 7, 63, 2, 2, 435, 80, 3, 2, 2, 2, 436, 437, 7, 35, + 2, 2, 437, 438, 7, 63, 2, 2, 438, 439, 7, 63, 2, 2, 439, 82, 3, 2, 2, 2, + 440, 441, 7, 40, 2, 2, 441, 84, 3, 2, 2, 2, 442, 443, 7, 96, 2, 2, 443, + 86, 3, 2, 2, 2, 444, 445, 7, 126, 2, 2, 445, 88, 3, 2, 2, 2, 446, 447, + 7, 40, 2, 2, 447, 448, 7, 40, 2, 2, 448, 90, 3, 2, 2, 2, 449, 450, 7, 126, + 2, 2, 450, 451, 7, 126, 2, 2, 451, 92, 3, 2, 2, 2, 452, 453, 7, 44, 2, + 2, 453, 454, 7, 63, 2, 2, 454, 94, 3, 2, 2, 2, 455, 456, 7, 49, 2, 2, 456, + 457, 7, 63, 2, 2, 457, 96, 3, 2, 2, 2, 458, 459, 7, 39, 2, 2, 459, 460, + 7, 63, 2, 2, 460, 98, 3, 2, 2, 2, 461, 462, 7, 45, 2, 2, 462, 463, 7, 63, + 2, 2, 463, 100, 3, 2, 2, 2, 464, 465, 7, 47, 2, 2, 465, 466, 7, 63, 2, + 2, 466, 102, 3, 2, 2, 2, 467, 468, 7, 62, 2, 2, 468, 469, 7, 62, 2, 2, + 469, 470, 7, 63, 2, 2, 470, 104, 3, 2, 2, 2, 471, 472, 7, 64, 2, 2, 472, + 473, 7, 64, 2, 2, 473, 474, 7, 63, 2, 2, 474, 106, 3, 2, 2, 2, 475, 476, + 7, 64, 2, 2, 476, 477, 7, 64, 2, 2, 477, 478, 7, 64, 2, 2, 478, 479, 7, + 63, 2, 2, 479, 108, 3, 2, 2, 2, 480, 481, 7, 40, 2, 2, 481, 482, 7, 63, + 2, 2, 482, 110, 3, 2, 2, 2, 483, 484, 7, 96, 2, 2, 484, 485, 7, 63, 2, + 2, 485, 112, 3, 2, 2, 2, 486, 487, 7, 126, 2, 2, 487, 488, 7, 63, 2, 2, + 488, 114, 3, 2, 2, 2, 489, 490, 7, 44, 2, 2, 490, 491, 7, 44, 2, 2, 491, + 492, 7, 63, 2, 2, 492, 116, 3, 2, 2, 2, 493, 494, 7, 63, 2, 2, 494, 495, + 7, 64, 2, 2, 495, 118, 3, 2, 2, 2, 496, 497, 7, 112, 2, 2, 497, 498, 7, + 119, 2, 2, 498, 499, 7, 110, 2, 2, 499, 500, 7, 110, 2, 2, 500, 120, 3, + 2, 2, 2, 501, 502, 7, 118, 2, 2, 502, 503, 7, 116, 2, 2, 503, 504, 7, 119, + 2, 2, 504, 511, 7, 103, 2, 2, 505, 506, 7, 104, 2, 2, 506, 507, 7, 99, + 2, 2, 507, 508, 7, 110, 2, 2, 508, 509, 7, 117, 2, 2, 509, 511, 7, 103, + 2, 2, 510, 501, 3, 2, 2, 2, 510, 505, 3, 2, 2, 2, 511, 122, 3, 2, 2, 2, + 512, 513, 5, 273, 137, 2, 513, 514, 7, 48, 2, 2, 514, 518, 9, 3, 2, 2, + 515, 517, 9, 4, 2, 2, 516, 515, 3, 2, 2, 2, 517, 520, 3, 2, 2, 2, 518, + 516, 3, 2, 2, 2, 518, 519, 3, 2, 2, 2, 519, 522, 3, 2, 2, 2, 520, 518, + 3, 2, 2, 2, 521, 523, 5, 275, 138, 2, 522, 521, 3, 2, 2, 2, 522, 523, 3, + 2, 2, 2, 523, 540, 3, 2, 2, 2, 524, 525, 7, 48, 2, 2, 525, 529, 9, 3, 2, + 2, 526, 528, 9, 4, 2, 2, 527, 526, 3, 2, 2, 2, 528, 531, 3, 2, 2, 2, 529, + 527, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 533, 3, 2, 2, 2, 531, 529, + 3, 2, 2, 2, 532, 534, 5, 275, 138, 2, 533, 532, 3, 2, 2, 2, 533, 534, 3, + 2, 2, 2, 534, 540, 3, 2, 2, 2, 535, 537, 5, 273, 137, 2, 536, 538, 5, 275, + 138, 2, 537, 536, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 540, 3, 2, 2, + 2, 539, 512, 3, 2, 2, 2, 539, 524, 3, 2, 2, 2, 539, 535, 3, 2, 2, 2, 540, + 124, 3, 2, 2, 2, 541, 542, 7, 50, 2, 2, 542, 543, 9, 5, 2, 2, 543, 547, + 9, 6, 2, 2, 544, 546, 5, 271, 136, 2, 545, 544, 3, 2, 2, 2, 546, 549, 3, + 2, 2, 2, 547, 545, 3, 2, 2, 2, 547, 548, 3, 2, 2, 2, 548, 126, 3, 2, 2, + 2, 549, 547, 3, 2, 2, 2, 550, 552, 7, 50, 2, 2, 551, 553, 9, 7, 2, 2, 552, + 551, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 552, 3, 2, 2, 2, 554, 555, + 3, 2, 2, 2, 555, 556, 3, 2, 2, 2, 556, 557, 6, 64, 4, 2, 557, 128, 3, 2, + 2, 2, 558, 559, 7, 50, 2, 2, 559, 560, 9, 8, 2, 2, 560, 564, 9, 7, 2, 2, + 561, 563, 9, 9, 2, 2, 562, 561, 3, 2, 2, 2, 563, 566, 3, 2, 2, 2, 564, + 562, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 130, 3, 2, 2, 2, 566, 564, + 3, 2, 2, 2, 567, 568, 7, 50, 2, 2, 568, 569, 9, 10, 2, 2, 569, 573, 9, + 11, 2, 2, 570, 572, 9, 12, 2, 2, 571, 570, 3, 2, 2, 2, 572, 575, 3, 2, + 2, 2, 573, 571, 3, 2, 2, 2, 573, 574, 3, 2, 2, 2, 574, 132, 3, 2, 2, 2, + 575, 573, 3, 2, 2, 2, 576, 577, 7, 50, 2, 2, 577, 578, 9, 5, 2, 2, 578, + 582, 9, 6, 2, 2, 579, 581, 5, 271, 136, 2, 580, 579, 3, 2, 2, 2, 581, 584, + 3, 2, 2, 2, 582, 580, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, 585, 3, 2, + 2, 2, 584, 582, 3, 2, 2, 2, 585, 586, 7, 112, 2, 2, 586, 134, 3, 2, 2, + 2, 587, 588, 7, 50, 2, 2, 588, 589, 9, 8, 2, 2, 589, 593, 9, 7, 2, 2, 590, + 592, 9, 9, 2, 2, 591, 590, 3, 2, 2, 2, 592, 595, 3, 2, 2, 2, 593, 591, + 3, 2, 2, 2, 593, 594, 3, 2, 2, 2, 594, 596, 3, 2, 2, 2, 595, 593, 3, 2, + 2, 2, 596, 597, 7, 112, 2, 2, 597, 136, 3, 2, 2, 2, 598, 599, 7, 50, 2, + 2, 599, 600, 9, 10, 2, 2, 600, 604, 9, 11, 2, 2, 601, 603, 9, 12, 2, 2, + 602, 601, 3, 2, 2, 2, 603, 606, 3, 2, 2, 2, 604, 602, 3, 2, 2, 2, 604, + 605, 3, 2, 2, 2, 605, 607, 3, 2, 2, 2, 606, 604, 3, 2, 2, 2, 607, 608, + 7, 112, 2, 2, 608, 138, 3, 2, 2, 2, 609, 610, 5, 273, 137, 2, 610, 611, + 7, 112, 2, 2, 611, 140, 3, 2, 2, 2, 612, 613, 7, 100, 2, 2, 613, 614, 7, + 116, 2, 2, 614, 615, 7, 103, 2, 2, 615, 616, 7, 99, 2, 2, 616, 617, 7, + 109, 2, 2, 617, 142, 3, 2, 2, 2, 618, 619, 7, 102, 2, 2, 619, 620, 7, 113, + 2, 2, 620, 144, 3, 2, 2, 2, 621, 622, 7, 107, 2, 2, 622, 623, 7, 112, 2, + 2, 623, 624, 7, 117, 2, 2, 624, 625, 7, 118, 2, 2, 625, 626, 7, 99, 2, + 2, 626, 627, 7, 112, 2, 2, 627, 628, 7, 101, 2, 2, 628, 629, 7, 103, 2, + 2, 629, 630, 7, 113, 2, 2, 630, 631, 7, 104, 2, 2, 631, 146, 3, 2, 2, 2, + 632, 633, 7, 118, 2, 2, 633, 634, 7, 123, 2, 2, 634, 635, 7, 114, 2, 2, + 635, 636, 7, 103, 2, 2, 636, 637, 7, 113, 2, 2, 637, 638, 7, 104, 2, 2, + 638, 148, 3, 2, 2, 2, 639, 640, 7, 101, 2, 2, 640, 641, 7, 99, 2, 2, 641, + 642, 7, 117, 2, 2, 642, 643, 7, 103, 2, 2, 643, 150, 3, 2, 2, 2, 644, 645, + 7, 103, 2, 2, 645, 646, 7, 110, 2, 2, 646, 647, 7, 117, 2, 2, 647, 648, + 7, 103, 2, 2, 648, 152, 3, 2, 2, 2, 649, 650, 7, 112, 2, 2, 650, 651, 7, + 103, 2, 2, 651, 652, 7, 121, 2, 2, 652, 154, 3, 2, 2, 2, 653, 654, 7, 120, + 2, 2, 654, 655, 7, 99, 2, 2, 655, 656, 7, 116, 2, 2, 656, 156, 3, 2, 2, + 2, 657, 658, 7, 101, 2, 2, 658, 659, 7, 99, 2, 2, 659, 660, 7, 118, 2, + 2, 660, 661, 7, 101, 2, 2, 661, 662, 7, 106, 2, 2, 662, 158, 3, 2, 2, 2, + 663, 664, 7, 104, 2, 2, 664, 665, 7, 107, 2, 2, 665, 666, 7, 112, 2, 2, + 666, 667, 7, 99, 2, 2, 667, 668, 7, 110, 2, 2, 668, 669, 7, 110, 2, 2, + 669, 670, 7, 123, 2, 2, 670, 160, 3, 2, 2, 2, 671, 672, 7, 116, 2, 2, 672, + 673, 7, 103, 2, 2, 673, 674, 7, 118, 2, 2, 674, 675, 7, 119, 2, 2, 675, + 676, 7, 116, 2, 2, 676, 677, 7, 112, 2, 2, 677, 162, 3, 2, 2, 2, 678, 679, + 7, 120, 2, 2, 679, 680, 7, 113, 2, 2, 680, 681, 7, 107, 2, 2, 681, 682, + 7, 102, 2, 2, 682, 164, 3, 2, 2, 2, 683, 684, 7, 101, 2, 2, 684, 685, 7, + 113, 2, 2, 685, 686, 7, 112, 2, 2, 686, 687, 7, 118, 2, 2, 687, 688, 7, + 107, 2, 2, 688, 689, 7, 112, 2, 2, 689, 690, 7, 119, 2, 2, 690, 691, 7, + 103, 2, 2, 691, 166, 3, 2, 2, 2, 692, 693, 7, 104, 2, 2, 693, 694, 7, 113, + 2, 2, 694, 695, 7, 116, 2, 2, 695, 168, 3, 2, 2, 2, 696, 697, 7, 117, 2, + 2, 697, 698, 7, 121, 2, 2, 698, 699, 7, 107, 2, 2, 699, 700, 7, 118, 2, + 2, 700, 701, 7, 101, 2, 2, 701, 702, 7, 106, 2, 2, 702, 170, 3, 2, 2, 2, + 703, 704, 7, 121, 2, 2, 704, 705, 7, 106, 2, 2, 705, 706, 7, 107, 2, 2, + 706, 707, 7, 110, 2, 2, 707, 708, 7, 103, 2, 2, 708, 172, 3, 2, 2, 2, 709, + 710, 7, 102, 2, 2, 710, 711, 7, 103, 2, 2, 711, 712, 7, 100, 2, 2, 712, + 713, 7, 119, 2, 2, 713, 714, 7, 105, 2, 2, 714, 715, 7, 105, 2, 2, 715, + 716, 7, 103, 2, 2, 716, 717, 7, 116, 2, 2, 717, 174, 3, 2, 2, 2, 718, 719, + 7, 104, 2, 2, 719, 720, 7, 119, 2, 2, 720, 721, 7, 112, 2, 2, 721, 722, + 7, 101, 2, 2, 722, 723, 7, 118, 2, 2, 723, 724, 7, 107, 2, 2, 724, 725, + 7, 113, 2, 2, 725, 726, 7, 112, 2, 2, 726, 176, 3, 2, 2, 2, 727, 728, 7, + 118, 2, 2, 728, 729, 7, 106, 2, 2, 729, 730, 7, 107, 2, 2, 730, 731, 7, + 117, 2, 2, 731, 178, 3, 2, 2, 2, 732, 733, 7, 121, 2, 2, 733, 734, 7, 107, + 2, 2, 734, 735, 7, 118, 2, 2, 735, 736, 7, 106, 2, 2, 736, 180, 3, 2, 2, + 2, 737, 738, 7, 102, 2, 2, 738, 739, 7, 103, 2, 2, 739, 740, 7, 104, 2, + 2, 740, 741, 7, 99, 2, 2, 741, 742, 7, 119, 2, 2, 742, 743, 7, 110, 2, + 2, 743, 744, 7, 118, 2, 2, 744, 182, 3, 2, 2, 2, 745, 746, 7, 107, 2, 2, + 746, 747, 7, 104, 2, 2, 747, 184, 3, 2, 2, 2, 748, 749, 7, 118, 2, 2, 749, + 750, 7, 106, 2, 2, 750, 751, 7, 116, 2, 2, 751, 752, 7, 113, 2, 2, 752, + 753, 7, 121, 2, 2, 753, 186, 3, 2, 2, 2, 754, 755, 7, 102, 2, 2, 755, 756, + 7, 103, 2, 2, 756, 757, 7, 110, 2, 2, 757, 758, 7, 103, 2, 2, 758, 759, + 7, 118, 2, 2, 759, 760, 7, 103, 2, 2, 760, 188, 3, 2, 2, 2, 761, 762, 7, + 107, 2, 2, 762, 763, 7, 112, 2, 2, 763, 190, 3, 2, 2, 2, 764, 765, 7, 118, + 2, 2, 765, 766, 7, 116, 2, 2, 766, 767, 7, 123, 2, 2, 767, 192, 3, 2, 2, + 2, 768, 769, 7, 99, 2, 2, 769, 770, 7, 117, 2, 2, 770, 194, 3, 2, 2, 2, + 771, 772, 7, 104, 2, 2, 772, 773, 7, 116, 2, 2, 773, 774, 7, 113, 2, 2, + 774, 775, 7, 111, 2, 2, 775, 196, 3, 2, 2, 2, 776, 777, 7, 101, 2, 2, 777, + 778, 7, 110, 2, 2, 778, 779, 7, 99, 2, 2, 779, 780, 7, 117, 2, 2, 780, + 781, 7, 117, 2, 2, 781, 198, 3, 2, 2, 2, 782, 783, 7, 103, 2, 2, 783, 784, + 7, 112, 2, 2, 784, 785, 7, 119, 2, 2, 785, 786, 7, 111, 2, 2, 786, 200, + 3, 2, 2, 2, 787, 788, 7, 103, 2, 2, 788, 789, 7, 122, 2, 2, 789, 790, 7, + 118, 2, 2, 790, 791, 7, 103, 2, 2, 791, 792, 7, 112, 2, 2, 792, 793, 7, + 102, 2, 2, 793, 794, 7, 117, 2, 2, 794, 202, 3, 2, 2, 2, 795, 796, 7, 117, + 2, 2, 796, 797, 7, 119, 2, 2, 797, 798, 7, 114, 2, 2, 798, 799, 7, 103, + 2, 2, 799, 800, 7, 116, 2, 2, 800, 204, 3, 2, 2, 2, 801, 802, 7, 101, 2, + 2, 802, 803, 7, 113, 2, 2, 803, 804, 7, 112, 2, 2, 804, 805, 7, 117, 2, + 2, 805, 806, 7, 118, 2, 2, 806, 206, 3, 2, 2, 2, 807, 808, 7, 103, 2, 2, + 808, 809, 7, 122, 2, 2, 809, 810, 7, 114, 2, 2, 810, 811, 7, 113, 2, 2, + 811, 812, 7, 116, 2, 2, 812, 813, 7, 118, 2, 2, 813, 208, 3, 2, 2, 2, 814, + 815, 7, 107, 2, 2, 815, 816, 7, 111, 2, 2, 816, 817, 7, 114, 2, 2, 817, + 818, 7, 113, 2, 2, 818, 819, 7, 116, 2, 2, 819, 820, 7, 118, 2, 2, 820, + 210, 3, 2, 2, 2, 821, 822, 7, 99, 2, 2, 822, 823, 7, 117, 2, 2, 823, 824, + 7, 123, 2, 2, 824, 825, 7, 112, 2, 2, 825, 826, 7, 101, 2, 2, 826, 212, + 3, 2, 2, 2, 827, 828, 7, 99, 2, 2, 828, 829, 7, 121, 2, 2, 829, 830, 7, + 99, 2, 2, 830, 831, 7, 107, 2, 2, 831, 832, 7, 118, 2, 2, 832, 214, 3, + 2, 2, 2, 833, 834, 7, 107, 2, 2, 834, 835, 7, 111, 2, 2, 835, 836, 7, 114, + 2, 2, 836, 837, 7, 110, 2, 2, 837, 838, 7, 103, 2, 2, 838, 839, 7, 111, + 2, 2, 839, 840, 7, 103, 2, 2, 840, 841, 7, 112, 2, 2, 841, 842, 7, 118, + 2, 2, 842, 843, 7, 117, 2, 2, 843, 844, 3, 2, 2, 2, 844, 845, 6, 108, 5, + 2, 845, 216, 3, 2, 2, 2, 846, 847, 7, 110, 2, 2, 847, 848, 7, 103, 2, 2, + 848, 849, 7, 118, 2, 2, 849, 850, 3, 2, 2, 2, 850, 851, 6, 109, 6, 2, 851, + 218, 3, 2, 2, 2, 852, 853, 7, 114, 2, 2, 853, 854, 7, 116, 2, 2, 854, 855, + 7, 107, 2, 2, 855, 856, 7, 120, 2, 2, 856, 857, 7, 99, 2, 2, 857, 858, + 7, 118, 2, 2, 858, 859, 7, 103, 2, 2, 859, 860, 3, 2, 2, 2, 860, 861, 6, + 110, 7, 2, 861, 220, 3, 2, 2, 2, 862, 863, 7, 114, 2, 2, 863, 864, 7, 119, + 2, 2, 864, 865, 7, 100, 2, 2, 865, 866, 7, 110, 2, 2, 866, 867, 7, 107, + 2, 2, 867, 868, 7, 101, 2, 2, 868, 869, 3, 2, 2, 2, 869, 870, 6, 111, 8, + 2, 870, 222, 3, 2, 2, 2, 871, 872, 7, 107, 2, 2, 872, 873, 7, 112, 2, 2, + 873, 874, 7, 118, 2, 2, 874, 875, 7, 103, 2, 2, 875, 876, 7, 116, 2, 2, + 876, 877, 7, 104, 2, 2, 877, 878, 7, 99, 2, 2, 878, 879, 7, 101, 2, 2, + 879, 880, 7, 103, 2, 2, 880, 881, 3, 2, 2, 2, 881, 882, 6, 112, 9, 2, 882, + 224, 3, 2, 2, 2, 883, 884, 7, 114, 2, 2, 884, 885, 7, 99, 2, 2, 885, 886, + 7, 101, 2, 2, 886, 887, 7, 109, 2, 2, 887, 888, 7, 99, 2, 2, 888, 889, + 7, 105, 2, 2, 889, 890, 7, 103, 2, 2, 890, 891, 3, 2, 2, 2, 891, 892, 6, + 113, 10, 2, 892, 226, 3, 2, 2, 2, 893, 894, 7, 114, 2, 2, 894, 895, 7, + 116, 2, 2, 895, 896, 7, 113, 2, 2, 896, 897, 7, 118, 2, 2, 897, 898, 7, + 103, 2, 2, 898, 899, 7, 101, 2, 2, 899, 900, 7, 118, 2, 2, 900, 901, 7, + 103, 2, 2, 901, 902, 7, 102, 2, 2, 902, 903, 3, 2, 2, 2, 903, 904, 6, 114, + 11, 2, 904, 228, 3, 2, 2, 2, 905, 906, 7, 117, 2, 2, 906, 907, 7, 118, + 2, 2, 907, 908, 7, 99, 2, 2, 908, 909, 7, 118, 2, 2, 909, 910, 7, 107, + 2, 2, 910, 911, 7, 101, 2, 2, 911, 912, 3, 2, 2, 2, 912, 913, 6, 115, 12, + 2, 913, 230, 3, 2, 2, 2, 914, 915, 7, 123, 2, 2, 915, 916, 7, 107, 2, 2, + 916, 917, 7, 103, 2, 2, 917, 918, 7, 110, 2, 2, 918, 919, 7, 102, 2, 2, + 919, 920, 3, 2, 2, 2, 920, 921, 6, 116, 13, 2, 921, 232, 3, 2, 2, 2, 922, + 926, 5, 279, 140, 2, 923, 925, 5, 277, 139, 2, 924, 923, 3, 2, 2, 2, 925, + 928, 3, 2, 2, 2, 926, 924, 3, 2, 2, 2, 926, 927, 3, 2, 2, 2, 927, 234, + 3, 2, 2, 2, 928, 926, 3, 2, 2, 2, 929, 933, 7, 36, 2, 2, 930, 932, 5, 249, + 125, 2, 931, 930, 3, 2, 2, 2, 932, 935, 3, 2, 2, 2, 933, 931, 3, 2, 2, + 2, 933, 934, 3, 2, 2, 2, 934, 936, 3, 2, 2, 2, 935, 933, 3, 2, 2, 2, 936, + 946, 7, 36, 2, 2, 937, 941, 7, 41, 2, 2, 938, 940, 5, 251, 126, 2, 939, + 938, 3, 2, 2, 2, 940, 943, 3, 2, 2, 2, 941, 939, 3, 2, 2, 2, 941, 942, + 3, 2, 2, 2, 942, 944, 3, 2, 2, 2, 943, 941, 3, 2, 2, 2, 944, 946, 7, 41, + 2, 2, 945, 929, 3, 2, 2, 2, 945, 937, 3, 2, 2, 2, 946, 947, 3, 2, 2, 2, + 947, 948, 8, 118, 5, 2, 948, 236, 3, 2, 2, 2, 949, 955, 7, 98, 2, 2, 950, + 951, 7, 94, 2, 2, 951, 954, 7, 98, 2, 2, 952, 954, 10, 13, 2, 2, 953, 950, + 3, 2, 2, 2, 953, 952, 3, 2, 2, 2, 954, 957, 3, 2, 2, 2, 955, 953, 3, 2, + 2, 2, 955, 956, 3, 2, 2, 2, 956, 958, 3, 2, 2, 2, 957, 955, 3, 2, 2, 2, + 958, 959, 7, 98, 2, 2, 959, 238, 3, 2, 2, 2, 960, 962, 9, 14, 2, 2, 961, + 960, 3, 2, 2, 2, 962, 963, 3, 2, 2, 2, 963, 961, 3, 2, 2, 2, 963, 964, + 3, 2, 2, 2, 964, 965, 3, 2, 2, 2, 965, 966, 8, 120, 2, 2, 966, 240, 3, + 2, 2, 2, 967, 968, 9, 2, 2, 2, 968, 969, 3, 2, 2, 2, 969, 970, 8, 121, + 2, 2, 970, 242, 3, 2, 2, 2, 971, 972, 7, 62, 2, 2, 972, 973, 7, 35, 2, + 2, 973, 974, 7, 47, 2, 2, 974, 975, 7, 47, 2, 2, 975, 979, 3, 2, 2, 2, + 976, 978, 11, 2, 2, 2, 977, 976, 3, 2, 2, 2, 978, 981, 3, 2, 2, 2, 979, + 980, 3, 2, 2, 2, 979, 977, 3, 2, 2, 2, 980, 982, 3, 2, 2, 2, 981, 979, + 3, 2, 2, 2, 982, 983, 7, 47, 2, 2, 983, 984, 7, 47, 2, 2, 984, 985, 7, + 64, 2, 2, 985, 986, 3, 2, 2, 2, 986, 987, 8, 122, 2, 2, 987, 244, 3, 2, + 2, 2, 988, 989, 7, 62, 2, 2, 989, 990, 7, 35, 2, 2, 990, 991, 7, 93, 2, + 2, 991, 992, 7, 69, 2, 2, 992, 993, 7, 70, 2, 2, 993, 994, 7, 67, 2, 2, + 994, 995, 7, 86, 2, 2, 995, 996, 7, 67, 2, 2, 996, 997, 7, 93, 2, 2, 997, + 1001, 3, 2, 2, 2, 998, 1000, 11, 2, 2, 2, 999, 998, 3, 2, 2, 2, 1000, 1003, + 3, 2, 2, 2, 1001, 1002, 3, 2, 2, 2, 1001, 999, 3, 2, 2, 2, 1002, 1004, + 3, 2, 2, 2, 1003, 1001, 3, 2, 2, 2, 1004, 1005, 7, 95, 2, 2, 1005, 1006, + 7, 95, 2, 2, 1006, 1007, 7, 64, 2, 2, 1007, 1008, 3, 2, 2, 2, 1008, 1009, + 8, 123, 2, 2, 1009, 246, 3, 2, 2, 2, 1010, 1011, 11, 2, 2, 2, 1011, 1012, + 3, 2, 2, 2, 1012, 1013, 8, 124, 6, 2, 1013, 248, 3, 2, 2, 2, 1014, 1019, + 10, 15, 2, 2, 1015, 1016, 7, 94, 2, 2, 1016, 1019, 5, 253, 127, 2, 1017, + 1019, 5, 269, 135, 2, 1018, 1014, 3, 2, 2, 2, 1018, 1015, 3, 2, 2, 2, 1018, + 1017, 3, 2, 2, 2, 1019, 250, 3, 2, 2, 2, 1020, 1025, 10, 16, 2, 2, 1021, + 1022, 7, 94, 2, 2, 1022, 1025, 5, 253, 127, 2, 1023, 1025, 5, 269, 135, + 2, 1024, 1020, 3, 2, 2, 2, 1024, 1021, 3, 2, 2, 2, 1024, 1023, 3, 2, 2, + 2, 1025, 252, 3, 2, 2, 2, 1026, 1032, 5, 255, 128, 2, 1027, 1032, 7, 50, + 2, 2, 1028, 1032, 5, 257, 129, 2, 1029, 1032, 5, 259, 130, 2, 1030, 1032, + 5, 261, 131, 2, 1031, 1026, 3, 2, 2, 2, 1031, 1027, 3, 2, 2, 2, 1031, 1028, + 3, 2, 2, 2, 1031, 1029, 3, 2, 2, 2, 1031, 1030, 3, 2, 2, 2, 1032, 254, + 3, 2, 2, 2, 1033, 1036, 5, 263, 132, 2, 1034, 1036, 5, 265, 133, 2, 1035, + 1033, 3, 2, 2, 2, 1035, 1034, 3, 2, 2, 2, 1036, 256, 3, 2, 2, 2, 1037, + 1038, 7, 122, 2, 2, 1038, 1039, 5, 271, 136, 2, 1039, 1040, 5, 271, 136, + 2, 1040, 258, 3, 2, 2, 2, 1041, 1042, 7, 119, 2, 2, 1042, 1043, 5, 271, + 136, 2, 1043, 1044, 5, 271, 136, 2, 1044, 1045, 5, 271, 136, 2, 1045, 1046, + 5, 271, 136, 2, 1046, 1058, 3, 2, 2, 2, 1047, 1048, 7, 119, 2, 2, 1048, + 1049, 7, 125, 2, 2, 1049, 1051, 5, 271, 136, 2, 1050, 1052, 5, 271, 136, + 2, 1051, 1050, 3, 2, 2, 2, 1052, 1053, 3, 2, 2, 2, 1053, 1051, 3, 2, 2, + 2, 1053, 1054, 3, 2, 2, 2, 1054, 1055, 3, 2, 2, 2, 1055, 1056, 7, 127, + 2, 2, 1056, 1058, 3, 2, 2, 2, 1057, 1041, 3, 2, 2, 2, 1057, 1047, 3, 2, + 2, 2, 1058, 260, 3, 2, 2, 2, 1059, 1060, 7, 119, 2, 2, 1060, 1062, 7, 125, + 2, 2, 1061, 1063, 5, 271, 136, 2, 1062, 1061, 3, 2, 2, 2, 1063, 1064, 3, + 2, 2, 2, 1064, 1062, 3, 2, 2, 2, 1064, 1065, 3, 2, 2, 2, 1065, 1066, 3, + 2, 2, 2, 1066, 1067, 7, 127, 2, 2, 1067, 262, 3, 2, 2, 2, 1068, 1069, 9, + 17, 2, 2, 1069, 264, 3, 2, 2, 2, 1070, 1071, 10, 18, 2, 2, 1071, 266, 3, + 2, 2, 2, 1072, 1075, 5, 263, 132, 2, 1073, 1075, 9, 19, 2, 2, 1074, 1072, + 3, 2, 2, 2, 1074, 1073, 3, 2, 2, 2, 1075, 268, 3, 2, 2, 2, 1076, 1077, + 7, 94, 2, 2, 1077, 1078, 9, 2, 2, 2, 1078, 270, 3, 2, 2, 2, 1079, 1080, + 9, 20, 2, 2, 1080, 272, 3, 2, 2, 2, 1081, 1090, 7, 50, 2, 2, 1082, 1086, + 9, 21, 2, 2, 1083, 1085, 9, 4, 2, 2, 1084, 1083, 3, 2, 2, 2, 1085, 1088, + 3, 2, 2, 2, 1086, 1084, 3, 2, 2, 2, 1086, 1087, 3, 2, 2, 2, 1087, 1090, + 3, 2, 2, 2, 1088, 1086, 3, 2, 2, 2, 1089, 1081, 3, 2, 2, 2, 1089, 1082, + 3, 2, 2, 2, 1090, 274, 3, 2, 2, 2, 1091, 1093, 9, 22, 2, 2, 1092, 1094, + 9, 23, 2, 2, 1093, 1092, 3, 2, 2, 2, 1093, 1094, 3, 2, 2, 2, 1094, 1096, + 3, 2, 2, 2, 1095, 1097, 9, 4, 2, 2, 1096, 1095, 3, 2, 2, 2, 1097, 1098, + 3, 2, 2, 2, 1098, 1096, 3, 2, 2, 2, 1098, 1099, 3, 2, 2, 2, 1099, 276, + 3, 2, 2, 2, 1100, 1106, 5, 279, 140, 2, 1101, 1106, 5, 283, 142, 2, 1102, + 1106, 5, 285, 143, 2, 1103, 1106, 5, 287, 144, 2, 1104, 1106, 4, 8206, + 8207, 2, 1105, 1100, 3, 2, 2, 2, 1105, 1101, 3, 2, 2, 2, 1105, 1102, 3, + 2, 2, 2, 1105, 1103, 3, 2, 2, 2, 1105, 1104, 3, 2, 2, 2, 1106, 278, 3, + 2, 2, 2, 1107, 1112, 5, 281, 141, 2, 1108, 1112, 9, 24, 2, 2, 1109, 1110, + 7, 94, 2, 2, 1110, 1112, 5, 259, 130, 2, 1111, 1107, 3, 2, 2, 2, 1111, + 1108, 3, 2, 2, 2, 1111, 1109, 3, 2, 2, 2, 1112, 280, 3, 2, 2, 2, 1113, + 1115, 9, 25, 2, 2, 1114, 1113, 3, 2, 2, 2, 1115, 282, 3, 2, 2, 2, 1116, + 1118, 9, 26, 2, 2, 1117, 1116, 3, 2, 2, 2, 1118, 284, 3, 2, 2, 2, 1119, + 1121, 9, 27, 2, 2, 1120, 1119, 3, 2, 2, 2, 1121, 286, 3, 2, 2, 2, 1122, + 1124, 9, 28, 2, 2, 1123, 1122, 3, 2, 2, 2, 1124, 288, 3, 2, 2, 2, 1125, + 1136, 10, 29, 2, 2, 1126, 1136, 5, 295, 148, 2, 1127, 1131, 7, 93, 2, 2, + 1128, 1130, 5, 293, 147, 2, 1129, 1128, 3, 2, 2, 2, 1130, 1133, 3, 2, 2, + 2, 1131, 1129, 3, 2, 2, 2, 1131, 1132, 3, 2, 2, 2, 1132, 1134, 3, 2, 2, + 2, 1133, 1131, 3, 2, 2, 2, 1134, 1136, 7, 95, 2, 2, 1135, 1125, 3, 2, 2, + 2, 1135, 1126, 3, 2, 2, 2, 1135, 1127, 3, 2, 2, 2, 1136, 290, 3, 2, 2, + 2, 1137, 1148, 10, 30, 2, 2, 1138, 1148, 5, 295, 148, 2, 1139, 1143, 7, + 93, 2, 2, 1140, 1142, 5, 293, 147, 2, 1141, 1140, 3, 2, 2, 2, 1142, 1145, + 3, 2, 2, 2, 1143, 1141, 3, 2, 2, 2, 1143, 1144, 3, 2, 2, 2, 1144, 1146, + 3, 2, 2, 2, 1145, 1143, 3, 2, 2, 2, 1146, 1148, 7, 95, 2, 2, 1147, 1137, + 3, 2, 2, 2, 1147, 1138, 3, 2, 2, 2, 1147, 1139, 3, 2, 2, 2, 1148, 292, + 3, 2, 2, 2, 1149, 1152, 10, 31, 2, 2, 1150, 1152, 5, 295, 148, 2, 1151, + 1149, 3, 2, 2, 2, 1151, 1150, 3, 2, 2, 2, 1152, 294, 3, 2, 2, 2, 1153, + 1154, 7, 94, 2, 2, 1154, 1155, 10, 2, 2, 2, 1155, 296, 3, 2, 2, 2, 54, + 2, 304, 313, 327, 337, 345, 510, 518, 522, 529, 533, 537, 539, 547, 554, + 564, 573, 582, 593, 604, 926, 933, 941, 945, 953, 955, 963, 979, 1001, + 1018, 1024, 1031, 1035, 1053, 1057, 1064, 1074, 1086, 1089, 1093, 1098, + 1105, 1111, 1114, 1117, 1120, 1123, 1131, 1135, 1143, 1147, 1151, 7, 2, + 3, 2, 3, 10, 2, 3, 11, 3, 3, 118, 4, 2, 4, 2, +} + +var lexerDeserializer = antlr.NewATNDeserializer(nil) +var lexerAtn = lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn) + +var lexerChannelNames = []string{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", "ERROR", +} + +var lexerModeNames = []string{ + "DEFAULT_MODE", +} + +var lexerLiteralNames = []string{ + "", "", "", "", "", "'['", "']'", "'('", "')'", "'{'", "'}'", "';'", "','", + "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", "'-'", "'~'", + "'!'", "'*'", "'/'", "'%'", "'**'", "'??'", "'#'", "'>>'", "'<<'", "'>>>'", + "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'==='", "'!=='", "'&'", + "'^'", "'|'", "'&&'", "'||'", "'*='", "'/='", "'%='", "'+='", "'-='", "'<<='", + "'>>='", "'>>>='", "'&='", "'^='", "'|='", "'**='", "'=>'", "'null'", "", + "", "", "", "", "", "", "", "", "", "'break'", "'do'", "'instanceof'", + "'typeof'", "'case'", "'else'", "'new'", "'var'", "'catch'", "'finally'", + "'return'", "'void'", "'continue'", "'for'", "'switch'", "'while'", "'debugger'", + "'function'", "'this'", "'with'", "'default'", "'if'", "'throw'", "'delete'", + "'in'", "'try'", "'as'", "'from'", "'class'", "'enum'", "'extends'", "'super'", + "'const'", "'export'", "'import'", "'async'", "'await'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", +} + +var lexerSymbolicNames = []string{ + "", "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Divide", "Modulus", "Power", "NullCoalesce", "Hashtag", + "RightShiftArithmetic", "LeftShiftArithmetic", "RightShiftLogical", "LessThan", + "MoreThan", "LessThanEquals", "GreaterThanEquals", "Equals_", "NotEquals", + "IdentityEquals", "IdentityNotEquals", "BitAnd", "BitXOr", "BitOr", "And", + "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", "PlusAssign", + "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "PowerAssign", "ARROW", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "BigHexIntegerLiteral", "BigOctalIntegerLiteral", "BigBinaryIntegerLiteral", + "BigDecimalIntegerLiteral", "Break", "Do", "Instanceof", "Typeof", "Case", + "Else", "New", "Var", "Catch", "Finally", "Return", "Void", "Continue", + "For", "Switch", "While", "Debugger", "Function", "This", "With", "Default", + "If", "Throw", "Delete", "In", "Try", "As", "From", "NodeName", "Enum", "Extends", + "Super", "Const", "Export", "Import", "Async", "Await", "Implements", "Let", + "Private", "Public", "Interface", "Package", "Protected", "Static", "Yield", + "Identifier", "StringLiteral", "TemplateStringLiteral", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter", +} + +var lexerRuleNames = []string{ + "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Divide", "Modulus", "Power", "NullCoalesce", "Hashtag", + "RightShiftArithmetic", "LeftShiftArithmetic", "RightShiftLogical", "LessThan", + "MoreThan", "LessThanEquals", "GreaterThanEquals", "Equals_", "NotEquals", + "IdentityEquals", "IdentityNotEquals", "BitAnd", "BitXOr", "BitOr", "And", + "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", "PlusAssign", + "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "PowerAssign", "ARROW", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "BigHexIntegerLiteral", "BigOctalIntegerLiteral", "BigBinaryIntegerLiteral", + "BigDecimalIntegerLiteral", "Break", "Do", "Instanceof", "Typeof", "Case", + "Else", "New", "Var", "Catch", "Finally", "Return", "Void", "Continue", + "For", "Switch", "While", "Debugger", "Function", "This", "With", "Default", + "If", "Throw", "Delete", "In", "Try", "As", "From", "NodeName", "Enum", "Extends", + "Super", "Const", "Export", "Import", "Async", "Await", "Implements", "Let", + "Private", "Public", "Interface", "Package", "Protected", "Static", "Yield", + "Identifier", "StringLiteral", "TemplateStringLiteral", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter", + "DoubleStringCharacter", "SingleStringCharacter", "EscapeSequence", "CharacterEscapeSequence", + "HexEscapeSequence", "UnicodeEscapeSequence", "ExtendedUnicodeEscapeSequence", + "SingleEscapeCharacter", "NonEscapeCharacter", "EscapeCharacter", "LineContinuation", + "HexDigit", "DecimalIntegerLiteral", "ExponentPart", "IdentifierPart", + "IdentifierStart", "UnicodeLetter", "UnicodeCombiningMark", "UnicodeDigit", + "UnicodeConnectorPunctuation", "RegularExpressionFirstChar", "RegularExpressionChar", + "RegularExpressionClassChar", "RegularExpressionBackslashSequence", +} + +type JavaScriptLexer struct { + *JavaScriptBaseLexer + channelNames []string + modeNames []string + // TODO: EOF string +} + +var lexerDecisionToDFA = make([]*antlr.DFA, len(lexerAtn.DecisionToState)) + +func init() { + for index, ds := range lexerAtn.DecisionToState { + lexerDecisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +func NewJavaScriptLexer(input antlr.CharStream) *JavaScriptLexer { + + l := new(JavaScriptLexer) + + l.BaseLexer = antlr.NewBaseLexer(input) + l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache()) + + l.channelNames = lexerChannelNames + l.modeNames = lexerModeNames + l.RuleNames = lexerRuleNames + l.LiteralNames = lexerLiteralNames + l.SymbolicNames = lexerSymbolicNames + l.GrammarFileName = "JavaScriptLexer.g4" + // TODO: l.EOF = antlr.TokenEOF + + return l +} + +// JavaScriptLexer tokens. +const ( + JavaScriptLexerHashBangLine = 1 + JavaScriptLexerMultiLineComment = 2 + JavaScriptLexerSingleLineComment = 3 + JavaScriptLexerRegularExpressionLiteral = 4 + JavaScriptLexerOpenBracket = 5 + JavaScriptLexerCloseBracket = 6 + JavaScriptLexerOpenParen = 7 + JavaScriptLexerCloseParen = 8 + JavaScriptLexerOpenBrace = 9 + JavaScriptLexerCloseBrace = 10 + JavaScriptLexerSemiColon = 11 + JavaScriptLexerComma = 12 + JavaScriptLexerAssign = 13 + JavaScriptLexerQuestionMark = 14 + JavaScriptLexerColon = 15 + JavaScriptLexerEllipsis = 16 + JavaScriptLexerDot = 17 + JavaScriptLexerPlusPlus = 18 + JavaScriptLexerMinusMinus = 19 + JavaScriptLexerPlus = 20 + JavaScriptLexerMinus = 21 + JavaScriptLexerBitNot = 22 + JavaScriptLexerNot = 23 + JavaScriptLexerMultiply = 24 + JavaScriptLexerDivide = 25 + JavaScriptLexerModulus = 26 + JavaScriptLexerPower = 27 + JavaScriptLexerNullCoalesce = 28 + JavaScriptLexerHashtag = 29 + JavaScriptLexerRightShiftArithmetic = 30 + JavaScriptLexerLeftShiftArithmetic = 31 + JavaScriptLexerRightShiftLogical = 32 + JavaScriptLexerLessThan = 33 + JavaScriptLexerMoreThan = 34 + JavaScriptLexerLessThanEquals = 35 + JavaScriptLexerGreaterThanEquals = 36 + JavaScriptLexerEquals_ = 37 + JavaScriptLexerNotEquals = 38 + JavaScriptLexerIdentityEquals = 39 + JavaScriptLexerIdentityNotEquals = 40 + JavaScriptLexerBitAnd = 41 + JavaScriptLexerBitXOr = 42 + JavaScriptLexerBitOr = 43 + JavaScriptLexerAnd = 44 + JavaScriptLexerOr = 45 + JavaScriptLexerMultiplyAssign = 46 + JavaScriptLexerDivideAssign = 47 + JavaScriptLexerModulusAssign = 48 + JavaScriptLexerPlusAssign = 49 + JavaScriptLexerMinusAssign = 50 + JavaScriptLexerLeftShiftArithmeticAssign = 51 + JavaScriptLexerRightShiftArithmeticAssign = 52 + JavaScriptLexerRightShiftLogicalAssign = 53 + JavaScriptLexerBitAndAssign = 54 + JavaScriptLexerBitXorAssign = 55 + JavaScriptLexerBitOrAssign = 56 + JavaScriptLexerPowerAssign = 57 + JavaScriptLexerARROW = 58 + JavaScriptLexerNullLiteral = 59 + JavaScriptLexerBooleanLiteral = 60 + JavaScriptLexerDecimalLiteral = 61 + JavaScriptLexerHexIntegerLiteral = 62 + JavaScriptLexerOctalIntegerLiteral = 63 + JavaScriptLexerOctalIntegerLiteral2 = 64 + JavaScriptLexerBinaryIntegerLiteral = 65 + JavaScriptLexerBigHexIntegerLiteral = 66 + JavaScriptLexerBigOctalIntegerLiteral = 67 + JavaScriptLexerBigBinaryIntegerLiteral = 68 + JavaScriptLexerBigDecimalIntegerLiteral = 69 + JavaScriptLexerBreak = 70 + JavaScriptLexerDo = 71 + JavaScriptLexerInstanceof = 72 + JavaScriptLexerTypeof = 73 + JavaScriptLexerCase = 74 + JavaScriptLexerElse = 75 + JavaScriptLexerNew = 76 + JavaScriptLexerVar = 77 + JavaScriptLexerCatch = 78 + JavaScriptLexerFinally = 79 + JavaScriptLexerReturn = 80 + JavaScriptLexerVoid = 81 + JavaScriptLexerContinue = 82 + JavaScriptLexerFor = 83 + JavaScriptLexerSwitch = 84 + JavaScriptLexerWhile = 85 + JavaScriptLexerDebugger = 86 + JavaScriptLexerFunction = 87 + JavaScriptLexerThis = 88 + JavaScriptLexerWith = 89 + JavaScriptLexerDefault = 90 + JavaScriptLexerIf = 91 + JavaScriptLexerThrow = 92 + JavaScriptLexerDelete = 93 + JavaScriptLexerIn = 94 + JavaScriptLexerTry = 95 + JavaScriptLexerAs = 96 + JavaScriptLexerFrom = 97 + JavaScriptLexerClass = 98 + JavaScriptLexerEnum = 99 + JavaScriptLexerExtends = 100 + JavaScriptLexerSuper = 101 + JavaScriptLexerConst = 102 + JavaScriptLexerExport = 103 + JavaScriptLexerImport = 104 + JavaScriptLexerAsync = 105 + JavaScriptLexerAwait = 106 + JavaScriptLexerImplements = 107 + JavaScriptLexerLet = 108 + JavaScriptLexerPrivate = 109 + JavaScriptLexerPublic = 110 + JavaScriptLexerInterface = 111 + JavaScriptLexerPackage = 112 + JavaScriptLexerProtected = 113 + JavaScriptLexerStatic = 114 + JavaScriptLexerYield = 115 + JavaScriptLexerIdentifier = 116 + JavaScriptLexerStringLiteral = 117 + JavaScriptLexerTemplateStringLiteral = 118 + JavaScriptLexerWhiteSpaces = 119 + JavaScriptLexerLineTerminator = 120 + JavaScriptLexerHtmlComment = 121 + JavaScriptLexerCDataComment = 122 + JavaScriptLexerUnexpectedCharacter = 123 +) + +// JavaScriptLexerERROR is the JavaScriptLexer channel. +const JavaScriptLexerERROR = 2 + +func (l *JavaScriptLexer) Action(localctx antlr.RuleContext, ruleIndex, actionIndex int) { + switch ruleIndex { + case 8: + l.OpenBrace_Action(localctx, actionIndex) + + case 9: + l.CloseBrace_Action(localctx, actionIndex) + + case 116: + l.StringLiteral_Action(localctx, actionIndex) + + default: + panic("No registered action for: " + fmt.Sprint(ruleIndex)) + } +} + +func (l *JavaScriptLexer) OpenBrace_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 0: + l.ProcessOpenBrace() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *JavaScriptLexer) CloseBrace_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 1: + l.ProcessCloseBrace() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *JavaScriptLexer) StringLiteral_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 2: + l.ProcessStringLiteral() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} + +func (l *JavaScriptLexer) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { + switch ruleIndex { + case 0: + return l.HashBangLine_Sempred(localctx, predIndex) + + case 3: + return l.RegularExpressionLiteral_Sempred(localctx, predIndex) + + case 62: + return l.OctalIntegerLiteral_Sempred(localctx, predIndex) + + case 106: + return l.Implements_Sempred(localctx, predIndex) + + case 107: + return l.Let_Sempred(localctx, predIndex) + + case 108: + return l.Private_Sempred(localctx, predIndex) + + case 109: + return l.Public_Sempred(localctx, predIndex) + + case 110: + return l.Interface_Sempred(localctx, predIndex) + + case 111: + return l.Package_Sempred(localctx, predIndex) + + case 112: + return l.Protected_Sempred(localctx, predIndex) + + case 113: + return l.Static_Sempred(localctx, predIndex) + + case 114: + return l.Yield_Sempred(localctx, predIndex) + + default: + panic("No registered predicate for: " + fmt.Sprint(ruleIndex)) + } +} + +func (p *JavaScriptLexer) HashBangLine_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 0: + return p.IsStartOfFile() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) RegularExpressionLiteral_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 1: + return p.IsRegexPossible() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) OctalIntegerLiteral_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 2: + return !p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Implements_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 3: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Let_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 4: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Private_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 5: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Public_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 6: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Interface_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 7: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Package_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 8: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Protected_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 9: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Static_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 10: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *JavaScriptLexer) Yield_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 11: + return p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} diff --git a/languages/js/javascript_parser.go b/languages/js/javascript_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..8a43992d452744d0315eaf8045219d9b3ab2e0ee --- /dev/null +++ b/languages/js/javascript_parser.go @@ -0,0 +1,15992 @@ +// Code generated from JavaScriptParser.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser // JavaScriptParser + +import ( + "fmt" + "reflect" + "strconv" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import errors +var _ = fmt.Printf +var _ = reflect.Copy +var _ = strconv.Itoa + +var parserATN = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 125, 960, + 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, + 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, + 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, + 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, + 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, + 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, + 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, + 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, + 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, + 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, + 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, + 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, + 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, + 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 3, 2, 5, 2, 150, 10, + 2, 3, 2, 5, 2, 153, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, + 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, + 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 179, 10, 4, 3, 5, 3, 5, 5, 5, 183, 10, + 5, 3, 5, 3, 5, 3, 6, 6, 6, 188, 10, 6, 13, 6, 14, 6, 189, 3, 7, 3, 7, 3, + 7, 3, 8, 5, 8, 196, 10, 8, 3, 8, 3, 8, 5, 8, 200, 10, 8, 3, 8, 3, 8, 3, + 8, 3, 8, 3, 8, 5, 8, 207, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 7, 9, 213, 10, + 9, 12, 9, 14, 9, 216, 11, 9, 3, 9, 3, 9, 5, 9, 220, 10, 9, 5, 9, 222, 10, + 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 5, 11, 232, 10, + 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 5, 13, 240, 10, 13, 3, 14, + 3, 14, 3, 14, 5, 14, 245, 10, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, + 14, 3, 14, 5, 14, 254, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, + 5, 15, 262, 10, 15, 3, 15, 3, 15, 5, 15, 266, 10, 15, 3, 16, 3, 16, 3, + 16, 5, 16, 271, 10, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, + 7, 18, 280, 10, 18, 12, 18, 14, 18, 283, 11, 18, 3, 19, 3, 19, 3, 19, 5, + 19, 288, 10, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, + 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 303, 10, 22, 3, 23, 3, 23, 3, + 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, + 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 323, 10, 23, 3, 23, 3, 23, 5, + 23, 327, 10, 23, 3, 23, 3, 23, 5, 23, 331, 10, 23, 3, 23, 3, 23, 3, 23, + 3, 23, 3, 23, 3, 23, 5, 23, 339, 10, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, + 23, 3, 23, 3, 23, 5, 23, 348, 10, 23, 3, 23, 3, 23, 3, 23, 5, 23, 353, + 10, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 361, 10, 23, 3, + 24, 3, 24, 3, 25, 3, 25, 3, 25, 5, 25, 368, 10, 25, 3, 25, 3, 25, 3, 26, + 3, 26, 3, 26, 5, 26, 375, 10, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 5, + 27, 382, 10, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 5, 28, 389, 10, 28, + 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, + 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 5, 31, 407, 10, 31, 3, 31, 3, 31, + 5, 31, 411, 10, 31, 5, 31, 413, 10, 31, 3, 31, 3, 31, 3, 32, 6, 32, 418, + 10, 32, 13, 32, 14, 32, 419, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 426, 10, + 33, 3, 34, 3, 34, 3, 34, 5, 34, 431, 10, 34, 3, 35, 3, 35, 3, 35, 3, 35, + 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 5, 37, 446, + 10, 37, 3, 37, 5, 37, 449, 10, 37, 3, 38, 3, 38, 3, 38, 5, 38, 454, 10, + 38, 3, 38, 5, 38, 457, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, + 3, 40, 3, 40, 3, 41, 5, 41, 468, 10, 41, 3, 41, 3, 41, 5, 41, 472, 10, + 41, 3, 41, 3, 41, 3, 41, 5, 41, 477, 10, 41, 3, 41, 3, 41, 3, 41, 3, 41, + 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 5, 43, 490, 10, 43, 3, + 43, 3, 43, 7, 43, 494, 10, 43, 12, 43, 14, 43, 497, 11, 43, 3, 43, 3, 43, + 3, 44, 3, 44, 3, 44, 3, 44, 7, 44, 505, 10, 44, 12, 44, 14, 44, 508, 11, + 44, 3, 44, 3, 44, 3, 44, 5, 44, 513, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, + 5, 44, 519, 10, 44, 3, 45, 5, 45, 522, 10, 45, 3, 45, 5, 45, 525, 10, 45, + 3, 45, 3, 45, 3, 45, 5, 45, 530, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, + 45, 3, 45, 5, 45, 538, 10, 45, 3, 45, 5, 45, 541, 10, 45, 3, 45, 3, 45, + 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 551, 10, 45, 3, 45, 5, + 45, 554, 10, 45, 3, 45, 3, 45, 3, 45, 5, 45, 559, 10, 45, 3, 45, 3, 45, + 3, 45, 3, 45, 3, 45, 5, 45, 566, 10, 45, 3, 46, 3, 46, 3, 46, 7, 46, 571, + 10, 46, 12, 46, 14, 46, 574, 11, 46, 3, 46, 3, 46, 5, 46, 578, 10, 46, + 3, 46, 5, 46, 581, 10, 46, 3, 47, 3, 47, 3, 47, 5, 47, 586, 10, 47, 3, + 48, 3, 48, 3, 48, 3, 49, 5, 49, 592, 10, 49, 3, 50, 6, 50, 595, 10, 50, + 13, 50, 14, 50, 596, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 7, 52, 604, 10, + 52, 12, 52, 14, 52, 607, 11, 52, 3, 52, 5, 52, 610, 10, 52, 3, 52, 6, 52, + 613, 10, 52, 13, 52, 14, 52, 614, 3, 52, 7, 52, 618, 10, 52, 12, 52, 14, + 52, 621, 11, 52, 3, 52, 7, 52, 624, 10, 52, 12, 52, 14, 52, 627, 11, 52, + 3, 53, 5, 53, 630, 10, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 7, + 54, 638, 10, 54, 12, 54, 14, 54, 641, 11, 54, 5, 54, 643, 10, 54, 3, 54, + 5, 54, 646, 10, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, + 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 661, 10, 55, 3, 55, 5, 55, + 664, 10, 55, 3, 55, 3, 55, 3, 55, 5, 55, 669, 10, 55, 3, 55, 3, 55, 3, + 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, + 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 692, 10, + 55, 3, 55, 5, 55, 695, 10, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, + 3, 56, 5, 56, 704, 10, 56, 3, 57, 3, 57, 3, 57, 3, 57, 7, 57, 710, 10, + 57, 12, 57, 14, 57, 713, 11, 57, 3, 57, 5, 57, 716, 10, 57, 5, 57, 718, + 10, 57, 3, 57, 3, 57, 3, 58, 5, 58, 723, 10, 58, 3, 58, 3, 58, 5, 58, 727, + 10, 58, 3, 59, 3, 59, 3, 59, 7, 59, 732, 10, 59, 12, 59, 14, 59, 735, 11, + 59, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 741, 10, 60, 3, 60, 3, 60, 3, 60, + 3, 60, 5, 60, 747, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, + 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, + 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, + 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, + 3, 60, 5, 60, 788, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, + 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, + 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, + 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, + 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, + 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, + 3, 60, 3, 60, 3, 60, 5, 60, 852, 10, 60, 3, 60, 3, 60, 5, 60, 856, 10, + 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, + 3, 60, 7, 60, 869, 10, 60, 12, 60, 14, 60, 872, 11, 60, 3, 61, 3, 61, 3, + 61, 5, 61, 877, 10, 61, 3, 62, 3, 62, 5, 62, 881, 10, 62, 3, 62, 3, 62, + 5, 62, 885, 10, 62, 3, 62, 3, 62, 5, 62, 889, 10, 62, 3, 62, 3, 62, 3, + 62, 3, 62, 3, 62, 3, 62, 5, 62, 897, 10, 62, 3, 62, 3, 62, 3, 62, 3, 62, + 5, 62, 903, 10, 62, 3, 63, 3, 63, 3, 63, 5, 63, 908, 10, 63, 3, 63, 5, + 63, 911, 10, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 5, 64, 918, 10, 64, + 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 929, + 10, 66, 3, 67, 3, 67, 3, 68, 3, 68, 3, 69, 3, 69, 5, 69, 937, 10, 69, 3, + 70, 3, 70, 3, 70, 5, 70, 942, 10, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, + 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 5, 74, 958, + 10, 74, 3, 74, 2, 3, 118, 75, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, + 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, + 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, + 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, + 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 2, 12, 5, 2, 79, 79, + 104, 104, 110, 110, 3, 2, 26, 28, 3, 2, 22, 23, 3, 2, 32, 34, 3, 2, 35, + 38, 3, 2, 39, 42, 3, 2, 48, 59, 3, 2, 63, 67, 3, 2, 68, 71, 3, 2, 72, 117, + 2, 1077, 2, 149, 3, 2, 2, 2, 4, 156, 3, 2, 2, 2, 6, 178, 3, 2, 2, 2, 8, + 180, 3, 2, 2, 2, 10, 187, 3, 2, 2, 2, 12, 191, 3, 2, 2, 2, 14, 206, 3, + 2, 2, 2, 16, 208, 3, 2, 2, 2, 18, 225, 3, 2, 2, 2, 20, 228, 3, 2, 2, 2, + 22, 233, 3, 2, 2, 2, 24, 236, 3, 2, 2, 2, 26, 253, 3, 2, 2, 2, 28, 265, + 3, 2, 2, 2, 30, 270, 3, 2, 2, 2, 32, 272, 3, 2, 2, 2, 34, 276, 3, 2, 2, + 2, 36, 284, 3, 2, 2, 2, 38, 289, 3, 2, 2, 2, 40, 291, 3, 2, 2, 2, 42, 295, + 3, 2, 2, 2, 44, 360, 3, 2, 2, 2, 46, 362, 3, 2, 2, 2, 48, 364, 3, 2, 2, + 2, 50, 371, 3, 2, 2, 2, 52, 378, 3, 2, 2, 2, 54, 385, 3, 2, 2, 2, 56, 392, + 3, 2, 2, 2, 58, 398, 3, 2, 2, 2, 60, 404, 3, 2, 2, 2, 62, 417, 3, 2, 2, + 2, 64, 421, 3, 2, 2, 2, 66, 427, 3, 2, 2, 2, 68, 432, 3, 2, 2, 2, 70, 436, + 3, 2, 2, 2, 72, 441, 3, 2, 2, 2, 74, 450, 3, 2, 2, 2, 76, 460, 3, 2, 2, + 2, 78, 463, 3, 2, 2, 2, 80, 467, 3, 2, 2, 2, 82, 483, 3, 2, 2, 2, 84, 489, + 3, 2, 2, 2, 86, 518, 3, 2, 2, 2, 88, 565, 3, 2, 2, 2, 90, 580, 3, 2, 2, + 2, 92, 582, 3, 2, 2, 2, 94, 587, 3, 2, 2, 2, 96, 591, 3, 2, 2, 2, 98, 594, + 3, 2, 2, 2, 100, 598, 3, 2, 2, 2, 102, 605, 3, 2, 2, 2, 104, 629, 3, 2, + 2, 2, 106, 633, 3, 2, 2, 2, 108, 694, 3, 2, 2, 2, 110, 703, 3, 2, 2, 2, + 112, 705, 3, 2, 2, 2, 114, 722, 3, 2, 2, 2, 116, 728, 3, 2, 2, 2, 118, + 787, 3, 2, 2, 2, 120, 876, 3, 2, 2, 2, 122, 902, 3, 2, 2, 2, 124, 910, + 3, 2, 2, 2, 126, 917, 3, 2, 2, 2, 128, 919, 3, 2, 2, 2, 130, 928, 3, 2, + 2, 2, 132, 930, 3, 2, 2, 2, 134, 932, 3, 2, 2, 2, 136, 936, 3, 2, 2, 2, + 138, 941, 3, 2, 2, 2, 140, 943, 3, 2, 2, 2, 142, 945, 3, 2, 2, 2, 144, + 949, 3, 2, 2, 2, 146, 957, 3, 2, 2, 2, 148, 150, 7, 3, 2, 2, 149, 148, + 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 150, 152, 3, 2, 2, 2, 151, 153, 5, 98, + 50, 2, 152, 151, 3, 2, 2, 2, 152, 153, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, + 154, 155, 7, 2, 2, 3, 155, 3, 3, 2, 2, 2, 156, 157, 5, 6, 4, 2, 157, 5, + 3, 2, 2, 2, 158, 179, 5, 8, 5, 2, 159, 179, 5, 32, 17, 2, 160, 179, 5, + 12, 7, 2, 161, 179, 5, 26, 14, 2, 162, 179, 5, 38, 20, 2, 163, 179, 5, + 82, 42, 2, 164, 179, 5, 40, 21, 2, 165, 179, 5, 42, 22, 2, 166, 179, 5, + 44, 23, 2, 167, 179, 5, 48, 25, 2, 168, 179, 5, 50, 26, 2, 169, 179, 5, + 52, 27, 2, 170, 179, 5, 54, 28, 2, 171, 179, 5, 56, 29, 2, 172, 179, 5, + 68, 35, 2, 173, 179, 5, 58, 30, 2, 174, 179, 5, 70, 36, 2, 175, 179, 5, + 72, 37, 2, 176, 179, 5, 78, 40, 2, 177, 179, 5, 80, 41, 2, 178, 158, 3, + 2, 2, 2, 178, 159, 3, 2, 2, 2, 178, 160, 3, 2, 2, 2, 178, 161, 3, 2, 2, + 2, 178, 162, 3, 2, 2, 2, 178, 163, 3, 2, 2, 2, 178, 164, 3, 2, 2, 2, 178, + 165, 3, 2, 2, 2, 178, 166, 3, 2, 2, 2, 178, 167, 3, 2, 2, 2, 178, 168, + 3, 2, 2, 2, 178, 169, 3, 2, 2, 2, 178, 170, 3, 2, 2, 2, 178, 171, 3, 2, + 2, 2, 178, 172, 3, 2, 2, 2, 178, 173, 3, 2, 2, 2, 178, 174, 3, 2, 2, 2, + 178, 175, 3, 2, 2, 2, 178, 176, 3, 2, 2, 2, 178, 177, 3, 2, 2, 2, 179, + 7, 3, 2, 2, 2, 180, 182, 7, 11, 2, 2, 181, 183, 5, 10, 6, 2, 182, 181, + 3, 2, 2, 2, 182, 183, 3, 2, 2, 2, 183, 184, 3, 2, 2, 2, 184, 185, 7, 12, + 2, 2, 185, 9, 3, 2, 2, 2, 186, 188, 5, 6, 4, 2, 187, 186, 3, 2, 2, 2, 188, + 189, 3, 2, 2, 2, 189, 187, 3, 2, 2, 2, 189, 190, 3, 2, 2, 2, 190, 11, 3, + 2, 2, 2, 191, 192, 7, 106, 2, 2, 192, 193, 5, 14, 8, 2, 193, 13, 3, 2, + 2, 2, 194, 196, 5, 18, 10, 2, 195, 194, 3, 2, 2, 2, 195, 196, 3, 2, 2, + 2, 196, 199, 3, 2, 2, 2, 197, 200, 5, 20, 11, 2, 198, 200, 5, 16, 9, 2, + 199, 197, 3, 2, 2, 2, 199, 198, 3, 2, 2, 2, 200, 201, 3, 2, 2, 2, 201, + 202, 5, 22, 12, 2, 202, 203, 5, 146, 74, 2, 203, 207, 3, 2, 2, 2, 204, + 205, 7, 119, 2, 2, 205, 207, 5, 146, 74, 2, 206, 195, 3, 2, 2, 2, 206, + 204, 3, 2, 2, 2, 207, 15, 3, 2, 2, 2, 208, 214, 7, 11, 2, 2, 209, 210, + 5, 24, 13, 2, 210, 211, 7, 14, 2, 2, 211, 213, 3, 2, 2, 2, 212, 209, 3, + 2, 2, 2, 213, 216, 3, 2, 2, 2, 214, 212, 3, 2, 2, 2, 214, 215, 3, 2, 2, + 2, 215, 221, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 217, 219, 5, 24, 13, 2, + 218, 220, 7, 14, 2, 2, 219, 218, 3, 2, 2, 2, 219, 220, 3, 2, 2, 2, 220, + 222, 3, 2, 2, 2, 221, 217, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 223, + 3, 2, 2, 2, 223, 224, 7, 12, 2, 2, 224, 17, 3, 2, 2, 2, 225, 226, 5, 24, + 13, 2, 226, 227, 7, 14, 2, 2, 227, 19, 3, 2, 2, 2, 228, 231, 7, 26, 2, + 2, 229, 230, 7, 98, 2, 2, 230, 232, 5, 136, 69, 2, 231, 229, 3, 2, 2, 2, + 231, 232, 3, 2, 2, 2, 232, 21, 3, 2, 2, 2, 233, 234, 7, 99, 2, 2, 234, + 235, 7, 119, 2, 2, 235, 23, 3, 2, 2, 2, 236, 239, 5, 136, 69, 2, 237, 238, + 7, 98, 2, 2, 238, 240, 5, 136, 69, 2, 239, 237, 3, 2, 2, 2, 239, 240, 3, + 2, 2, 2, 240, 25, 3, 2, 2, 2, 241, 244, 7, 105, 2, 2, 242, 245, 5, 28, + 15, 2, 243, 245, 5, 30, 16, 2, 244, 242, 3, 2, 2, 2, 244, 243, 3, 2, 2, + 2, 245, 246, 3, 2, 2, 2, 246, 247, 5, 146, 74, 2, 247, 254, 3, 2, 2, 2, + 248, 249, 7, 105, 2, 2, 249, 250, 7, 92, 2, 2, 250, 251, 5, 118, 60, 2, + 251, 252, 5, 146, 74, 2, 252, 254, 3, 2, 2, 2, 253, 241, 3, 2, 2, 2, 253, + 248, 3, 2, 2, 2, 254, 27, 3, 2, 2, 2, 255, 256, 5, 20, 11, 2, 256, 257, + 5, 22, 12, 2, 257, 258, 5, 146, 74, 2, 258, 266, 3, 2, 2, 2, 259, 261, + 5, 16, 9, 2, 260, 262, 5, 22, 12, 2, 261, 260, 3, 2, 2, 2, 261, 262, 3, + 2, 2, 2, 262, 263, 3, 2, 2, 2, 263, 264, 5, 146, 74, 2, 264, 266, 3, 2, + 2, 2, 265, 255, 3, 2, 2, 2, 265, 259, 3, 2, 2, 2, 266, 29, 3, 2, 2, 2, + 267, 271, 5, 32, 17, 2, 268, 271, 5, 82, 42, 2, 269, 271, 5, 80, 41, 2, + 270, 267, 3, 2, 2, 2, 270, 268, 3, 2, 2, 2, 270, 269, 3, 2, 2, 2, 271, + 31, 3, 2, 2, 2, 272, 273, 5, 46, 24, 2, 273, 274, 5, 34, 18, 2, 274, 275, + 5, 146, 74, 2, 275, 33, 3, 2, 2, 2, 276, 281, 5, 36, 19, 2, 277, 278, 7, + 14, 2, 2, 278, 280, 5, 36, 19, 2, 279, 277, 3, 2, 2, 2, 280, 283, 3, 2, + 2, 2, 281, 279, 3, 2, 2, 2, 281, 282, 3, 2, 2, 2, 282, 35, 3, 2, 2, 2, + 283, 281, 3, 2, 2, 2, 284, 287, 5, 120, 61, 2, 285, 286, 7, 15, 2, 2, 286, + 288, 5, 118, 60, 2, 287, 285, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 37, + 3, 2, 2, 2, 289, 290, 7, 13, 2, 2, 290, 39, 3, 2, 2, 2, 291, 292, 6, 21, + 2, 2, 292, 293, 5, 116, 59, 2, 293, 294, 5, 146, 74, 2, 294, 41, 3, 2, + 2, 2, 295, 296, 7, 93, 2, 2, 296, 297, 7, 9, 2, 2, 297, 298, 5, 116, 59, + 2, 298, 299, 7, 10, 2, 2, 299, 302, 5, 6, 4, 2, 300, 301, 7, 77, 2, 2, + 301, 303, 5, 6, 4, 2, 302, 300, 3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 303, + 43, 3, 2, 2, 2, 304, 305, 7, 73, 2, 2, 305, 306, 5, 6, 4, 2, 306, 307, + 7, 87, 2, 2, 307, 308, 7, 9, 2, 2, 308, 309, 5, 116, 59, 2, 309, 310, 7, + 10, 2, 2, 310, 311, 5, 146, 74, 2, 311, 361, 3, 2, 2, 2, 312, 313, 7, 87, + 2, 2, 313, 314, 7, 9, 2, 2, 314, 315, 5, 116, 59, 2, 315, 316, 7, 10, 2, + 2, 316, 317, 5, 6, 4, 2, 317, 361, 3, 2, 2, 2, 318, 319, 7, 85, 2, 2, 319, + 322, 7, 9, 2, 2, 320, 323, 5, 116, 59, 2, 321, 323, 5, 32, 17, 2, 322, + 320, 3, 2, 2, 2, 322, 321, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 324, + 3, 2, 2, 2, 324, 326, 7, 13, 2, 2, 325, 327, 5, 116, 59, 2, 326, 325, 3, + 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 328, 3, 2, 2, 2, 328, 330, 7, 13, 2, + 2, 329, 331, 5, 116, 59, 2, 330, 329, 3, 2, 2, 2, 330, 331, 3, 2, 2, 2, + 331, 332, 3, 2, 2, 2, 332, 333, 7, 10, 2, 2, 333, 361, 5, 6, 4, 2, 334, + 335, 7, 85, 2, 2, 335, 338, 7, 9, 2, 2, 336, 339, 5, 118, 60, 2, 337, 339, + 5, 32, 17, 2, 338, 336, 3, 2, 2, 2, 338, 337, 3, 2, 2, 2, 339, 340, 3, + 2, 2, 2, 340, 341, 7, 96, 2, 2, 341, 342, 5, 116, 59, 2, 342, 343, 7, 10, + 2, 2, 343, 344, 5, 6, 4, 2, 344, 361, 3, 2, 2, 2, 345, 347, 7, 85, 2, 2, + 346, 348, 7, 108, 2, 2, 347, 346, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, + 349, 3, 2, 2, 2, 349, 352, 7, 9, 2, 2, 350, 353, 5, 118, 60, 2, 351, 353, + 5, 32, 17, 2, 352, 350, 3, 2, 2, 2, 352, 351, 3, 2, 2, 2, 353, 354, 3, + 2, 2, 2, 354, 355, 7, 118, 2, 2, 355, 356, 6, 23, 3, 2, 356, 357, 5, 116, + 59, 2, 357, 358, 7, 10, 2, 2, 358, 359, 5, 6, 4, 2, 359, 361, 3, 2, 2, + 2, 360, 304, 3, 2, 2, 2, 360, 312, 3, 2, 2, 2, 360, 318, 3, 2, 2, 2, 360, + 334, 3, 2, 2, 2, 360, 345, 3, 2, 2, 2, 361, 45, 3, 2, 2, 2, 362, 363, 9, + 2, 2, 2, 363, 47, 3, 2, 2, 2, 364, 367, 7, 84, 2, 2, 365, 366, 6, 25, 4, + 2, 366, 368, 7, 118, 2, 2, 367, 365, 3, 2, 2, 2, 367, 368, 3, 2, 2, 2, + 368, 369, 3, 2, 2, 2, 369, 370, 5, 146, 74, 2, 370, 49, 3, 2, 2, 2, 371, + 374, 7, 72, 2, 2, 372, 373, 6, 26, 5, 2, 373, 375, 7, 118, 2, 2, 374, 372, + 3, 2, 2, 2, 374, 375, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 377, 5, 146, + 74, 2, 377, 51, 3, 2, 2, 2, 378, 381, 7, 82, 2, 2, 379, 380, 6, 27, 6, + 2, 380, 382, 5, 116, 59, 2, 381, 379, 3, 2, 2, 2, 381, 382, 3, 2, 2, 2, + 382, 383, 3, 2, 2, 2, 383, 384, 5, 146, 74, 2, 384, 53, 3, 2, 2, 2, 385, + 388, 7, 117, 2, 2, 386, 387, 6, 28, 7, 2, 387, 389, 5, 116, 59, 2, 388, + 386, 3, 2, 2, 2, 388, 389, 3, 2, 2, 2, 389, 390, 3, 2, 2, 2, 390, 391, + 5, 146, 74, 2, 391, 55, 3, 2, 2, 2, 392, 393, 7, 91, 2, 2, 393, 394, 7, + 9, 2, 2, 394, 395, 5, 116, 59, 2, 395, 396, 7, 10, 2, 2, 396, 397, 5, 6, + 4, 2, 397, 57, 3, 2, 2, 2, 398, 399, 7, 86, 2, 2, 399, 400, 7, 9, 2, 2, + 400, 401, 5, 116, 59, 2, 401, 402, 7, 10, 2, 2, 402, 403, 5, 60, 31, 2, + 403, 59, 3, 2, 2, 2, 404, 406, 7, 11, 2, 2, 405, 407, 5, 62, 32, 2, 406, + 405, 3, 2, 2, 2, 406, 407, 3, 2, 2, 2, 407, 412, 3, 2, 2, 2, 408, 410, + 5, 66, 34, 2, 409, 411, 5, 62, 32, 2, 410, 409, 3, 2, 2, 2, 410, 411, 3, + 2, 2, 2, 411, 413, 3, 2, 2, 2, 412, 408, 3, 2, 2, 2, 412, 413, 3, 2, 2, + 2, 413, 414, 3, 2, 2, 2, 414, 415, 7, 12, 2, 2, 415, 61, 3, 2, 2, 2, 416, + 418, 5, 64, 33, 2, 417, 416, 3, 2, 2, 2, 418, 419, 3, 2, 2, 2, 419, 417, + 3, 2, 2, 2, 419, 420, 3, 2, 2, 2, 420, 63, 3, 2, 2, 2, 421, 422, 7, 76, + 2, 2, 422, 423, 5, 116, 59, 2, 423, 425, 7, 17, 2, 2, 424, 426, 5, 10, + 6, 2, 425, 424, 3, 2, 2, 2, 425, 426, 3, 2, 2, 2, 426, 65, 3, 2, 2, 2, + 427, 428, 7, 92, 2, 2, 428, 430, 7, 17, 2, 2, 429, 431, 5, 10, 6, 2, 430, + 429, 3, 2, 2, 2, 430, 431, 3, 2, 2, 2, 431, 67, 3, 2, 2, 2, 432, 433, 7, + 118, 2, 2, 433, 434, 7, 17, 2, 2, 434, 435, 5, 6, 4, 2, 435, 69, 3, 2, + 2, 2, 436, 437, 7, 94, 2, 2, 437, 438, 6, 36, 8, 2, 438, 439, 5, 116, 59, + 2, 439, 440, 5, 146, 74, 2, 440, 71, 3, 2, 2, 2, 441, 442, 7, 97, 2, 2, + 442, 448, 5, 8, 5, 2, 443, 445, 5, 74, 38, 2, 444, 446, 5, 76, 39, 2, 445, + 444, 3, 2, 2, 2, 445, 446, 3, 2, 2, 2, 446, 449, 3, 2, 2, 2, 447, 449, + 5, 76, 39, 2, 448, 443, 3, 2, 2, 2, 448, 447, 3, 2, 2, 2, 449, 73, 3, 2, + 2, 2, 450, 456, 7, 80, 2, 2, 451, 453, 7, 9, 2, 2, 452, 454, 5, 120, 61, + 2, 453, 452, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 455, 3, 2, 2, 2, 455, + 457, 7, 10, 2, 2, 456, 451, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 458, + 3, 2, 2, 2, 458, 459, 5, 8, 5, 2, 459, 75, 3, 2, 2, 2, 460, 461, 7, 81, + 2, 2, 461, 462, 5, 8, 5, 2, 462, 77, 3, 2, 2, 2, 463, 464, 7, 88, 2, 2, + 464, 465, 5, 146, 74, 2, 465, 79, 3, 2, 2, 2, 466, 468, 7, 107, 2, 2, 467, + 466, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 471, + 7, 89, 2, 2, 470, 472, 7, 26, 2, 2, 471, 470, 3, 2, 2, 2, 471, 472, 3, + 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 474, 7, 118, 2, 2, 474, 476, 7, 9, + 2, 2, 475, 477, 5, 90, 46, 2, 476, 475, 3, 2, 2, 2, 476, 477, 3, 2, 2, + 2, 477, 478, 3, 2, 2, 2, 478, 479, 7, 10, 2, 2, 479, 480, 7, 11, 2, 2, + 480, 481, 5, 96, 49, 2, 481, 482, 7, 12, 2, 2, 482, 81, 3, 2, 2, 2, 483, + 484, 7, 100, 2, 2, 484, 485, 7, 118, 2, 2, 485, 486, 5, 84, 43, 2, 486, + 83, 3, 2, 2, 2, 487, 488, 7, 102, 2, 2, 488, 490, 5, 118, 60, 2, 489, 487, + 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 495, 7, 11, + 2, 2, 492, 494, 5, 86, 44, 2, 493, 492, 3, 2, 2, 2, 494, 497, 3, 2, 2, + 2, 495, 493, 3, 2, 2, 2, 495, 496, 3, 2, 2, 2, 496, 498, 3, 2, 2, 2, 497, + 495, 3, 2, 2, 2, 498, 499, 7, 12, 2, 2, 499, 85, 3, 2, 2, 2, 500, 505, + 7, 116, 2, 2, 501, 502, 6, 44, 9, 2, 502, 505, 7, 118, 2, 2, 503, 505, + 7, 107, 2, 2, 504, 500, 3, 2, 2, 2, 504, 501, 3, 2, 2, 2, 504, 503, 3, + 2, 2, 2, 505, 508, 3, 2, 2, 2, 506, 504, 3, 2, 2, 2, 506, 507, 3, 2, 2, + 2, 507, 509, 3, 2, 2, 2, 508, 506, 3, 2, 2, 2, 509, 519, 5, 88, 45, 2, + 510, 519, 5, 38, 20, 2, 511, 513, 7, 31, 2, 2, 512, 511, 3, 2, 2, 2, 512, + 513, 3, 2, 2, 2, 513, 514, 3, 2, 2, 2, 514, 515, 5, 110, 56, 2, 515, 516, + 7, 15, 2, 2, 516, 517, 5, 118, 60, 2, 517, 519, 3, 2, 2, 2, 518, 506, 3, + 2, 2, 2, 518, 510, 3, 2, 2, 2, 518, 512, 3, 2, 2, 2, 519, 87, 3, 2, 2, + 2, 520, 522, 7, 26, 2, 2, 521, 520, 3, 2, 2, 2, 521, 522, 3, 2, 2, 2, 522, + 524, 3, 2, 2, 2, 523, 525, 7, 31, 2, 2, 524, 523, 3, 2, 2, 2, 524, 525, + 3, 2, 2, 2, 525, 526, 3, 2, 2, 2, 526, 527, 5, 110, 56, 2, 527, 529, 7, + 9, 2, 2, 528, 530, 5, 90, 46, 2, 529, 528, 3, 2, 2, 2, 529, 530, 3, 2, + 2, 2, 530, 531, 3, 2, 2, 2, 531, 532, 7, 10, 2, 2, 532, 533, 7, 11, 2, + 2, 533, 534, 5, 96, 49, 2, 534, 535, 7, 12, 2, 2, 535, 566, 3, 2, 2, 2, + 536, 538, 7, 26, 2, 2, 537, 536, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, + 540, 3, 2, 2, 2, 539, 541, 7, 31, 2, 2, 540, 539, 3, 2, 2, 2, 540, 541, + 3, 2, 2, 2, 541, 542, 3, 2, 2, 2, 542, 543, 5, 142, 72, 2, 543, 544, 7, + 9, 2, 2, 544, 545, 7, 10, 2, 2, 545, 546, 7, 11, 2, 2, 546, 547, 5, 96, + 49, 2, 547, 548, 7, 12, 2, 2, 548, 566, 3, 2, 2, 2, 549, 551, 7, 26, 2, + 2, 550, 549, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 553, 3, 2, 2, 2, 552, + 554, 7, 31, 2, 2, 553, 552, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 555, + 3, 2, 2, 2, 555, 556, 5, 144, 73, 2, 556, 558, 7, 9, 2, 2, 557, 559, 5, + 90, 46, 2, 558, 557, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 560, 3, 2, + 2, 2, 560, 561, 7, 10, 2, 2, 561, 562, 7, 11, 2, 2, 562, 563, 5, 96, 49, + 2, 563, 564, 7, 12, 2, 2, 564, 566, 3, 2, 2, 2, 565, 521, 3, 2, 2, 2, 565, + 537, 3, 2, 2, 2, 565, 550, 3, 2, 2, 2, 566, 89, 3, 2, 2, 2, 567, 572, 5, + 92, 47, 2, 568, 569, 7, 14, 2, 2, 569, 571, 5, 92, 47, 2, 570, 568, 3, + 2, 2, 2, 571, 574, 3, 2, 2, 2, 572, 570, 3, 2, 2, 2, 572, 573, 3, 2, 2, + 2, 573, 577, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 575, 576, 7, 14, 2, 2, 576, + 578, 5, 94, 48, 2, 577, 575, 3, 2, 2, 2, 577, 578, 3, 2, 2, 2, 578, 581, + 3, 2, 2, 2, 579, 581, 5, 94, 48, 2, 580, 567, 3, 2, 2, 2, 580, 579, 3, + 2, 2, 2, 581, 91, 3, 2, 2, 2, 582, 585, 5, 120, 61, 2, 583, 584, 7, 15, + 2, 2, 584, 586, 5, 118, 60, 2, 585, 583, 3, 2, 2, 2, 585, 586, 3, 2, 2, + 2, 586, 93, 3, 2, 2, 2, 587, 588, 7, 18, 2, 2, 588, 589, 5, 118, 60, 2, + 589, 95, 3, 2, 2, 2, 590, 592, 5, 98, 50, 2, 591, 590, 3, 2, 2, 2, 591, + 592, 3, 2, 2, 2, 592, 97, 3, 2, 2, 2, 593, 595, 5, 4, 3, 2, 594, 593, 3, + 2, 2, 2, 595, 596, 3, 2, 2, 2, 596, 594, 3, 2, 2, 2, 596, 597, 3, 2, 2, + 2, 597, 99, 3, 2, 2, 2, 598, 599, 7, 7, 2, 2, 599, 600, 5, 102, 52, 2, + 600, 601, 7, 8, 2, 2, 601, 101, 3, 2, 2, 2, 602, 604, 7, 14, 2, 2, 603, + 602, 3, 2, 2, 2, 604, 607, 3, 2, 2, 2, 605, 603, 3, 2, 2, 2, 605, 606, + 3, 2, 2, 2, 606, 609, 3, 2, 2, 2, 607, 605, 3, 2, 2, 2, 608, 610, 5, 104, + 53, 2, 609, 608, 3, 2, 2, 2, 609, 610, 3, 2, 2, 2, 610, 619, 3, 2, 2, 2, + 611, 613, 7, 14, 2, 2, 612, 611, 3, 2, 2, 2, 613, 614, 3, 2, 2, 2, 614, + 612, 3, 2, 2, 2, 614, 615, 3, 2, 2, 2, 615, 616, 3, 2, 2, 2, 616, 618, + 5, 104, 53, 2, 617, 612, 3, 2, 2, 2, 618, 621, 3, 2, 2, 2, 619, 617, 3, + 2, 2, 2, 619, 620, 3, 2, 2, 2, 620, 625, 3, 2, 2, 2, 621, 619, 3, 2, 2, + 2, 622, 624, 7, 14, 2, 2, 623, 622, 3, 2, 2, 2, 624, 627, 3, 2, 2, 2, 625, + 623, 3, 2, 2, 2, 625, 626, 3, 2, 2, 2, 626, 103, 3, 2, 2, 2, 627, 625, + 3, 2, 2, 2, 628, 630, 7, 18, 2, 2, 629, 628, 3, 2, 2, 2, 629, 630, 3, 2, + 2, 2, 630, 631, 3, 2, 2, 2, 631, 632, 5, 118, 60, 2, 632, 105, 3, 2, 2, + 2, 633, 642, 7, 11, 2, 2, 634, 639, 5, 108, 55, 2, 635, 636, 7, 14, 2, + 2, 636, 638, 5, 108, 55, 2, 637, 635, 3, 2, 2, 2, 638, 641, 3, 2, 2, 2, + 639, 637, 3, 2, 2, 2, 639, 640, 3, 2, 2, 2, 640, 643, 3, 2, 2, 2, 641, + 639, 3, 2, 2, 2, 642, 634, 3, 2, 2, 2, 642, 643, 3, 2, 2, 2, 643, 645, + 3, 2, 2, 2, 644, 646, 7, 14, 2, 2, 645, 644, 3, 2, 2, 2, 645, 646, 3, 2, + 2, 2, 646, 647, 3, 2, 2, 2, 647, 648, 7, 12, 2, 2, 648, 107, 3, 2, 2, 2, + 649, 650, 5, 110, 56, 2, 650, 651, 7, 17, 2, 2, 651, 652, 5, 118, 60, 2, + 652, 695, 3, 2, 2, 2, 653, 654, 7, 7, 2, 2, 654, 655, 5, 118, 60, 2, 655, + 656, 7, 8, 2, 2, 656, 657, 7, 17, 2, 2, 657, 658, 5, 118, 60, 2, 658, 695, + 3, 2, 2, 2, 659, 661, 7, 107, 2, 2, 660, 659, 3, 2, 2, 2, 660, 661, 3, + 2, 2, 2, 661, 663, 3, 2, 2, 2, 662, 664, 7, 26, 2, 2, 663, 662, 3, 2, 2, + 2, 663, 664, 3, 2, 2, 2, 664, 665, 3, 2, 2, 2, 665, 666, 5, 110, 56, 2, + 666, 668, 7, 9, 2, 2, 667, 669, 5, 90, 46, 2, 668, 667, 3, 2, 2, 2, 668, + 669, 3, 2, 2, 2, 669, 670, 3, 2, 2, 2, 670, 671, 7, 10, 2, 2, 671, 672, + 7, 11, 2, 2, 672, 673, 5, 96, 49, 2, 673, 674, 7, 12, 2, 2, 674, 695, 3, + 2, 2, 2, 675, 676, 5, 142, 72, 2, 676, 677, 7, 9, 2, 2, 677, 678, 7, 10, + 2, 2, 678, 679, 7, 11, 2, 2, 679, 680, 5, 96, 49, 2, 680, 681, 7, 12, 2, + 2, 681, 695, 3, 2, 2, 2, 682, 683, 5, 144, 73, 2, 683, 684, 7, 9, 2, 2, + 684, 685, 5, 92, 47, 2, 685, 686, 7, 10, 2, 2, 686, 687, 7, 11, 2, 2, 687, + 688, 5, 96, 49, 2, 688, 689, 7, 12, 2, 2, 689, 695, 3, 2, 2, 2, 690, 692, + 7, 18, 2, 2, 691, 690, 3, 2, 2, 2, 691, 692, 3, 2, 2, 2, 692, 693, 3, 2, + 2, 2, 693, 695, 5, 118, 60, 2, 694, 649, 3, 2, 2, 2, 694, 653, 3, 2, 2, + 2, 694, 660, 3, 2, 2, 2, 694, 675, 3, 2, 2, 2, 694, 682, 3, 2, 2, 2, 694, + 691, 3, 2, 2, 2, 695, 109, 3, 2, 2, 2, 696, 704, 5, 136, 69, 2, 697, 704, + 7, 119, 2, 2, 698, 704, 5, 132, 67, 2, 699, 700, 7, 7, 2, 2, 700, 701, + 5, 118, 60, 2, 701, 702, 7, 8, 2, 2, 702, 704, 3, 2, 2, 2, 703, 696, 3, + 2, 2, 2, 703, 697, 3, 2, 2, 2, 703, 698, 3, 2, 2, 2, 703, 699, 3, 2, 2, + 2, 704, 111, 3, 2, 2, 2, 705, 717, 7, 9, 2, 2, 706, 711, 5, 114, 58, 2, + 707, 708, 7, 14, 2, 2, 708, 710, 5, 114, 58, 2, 709, 707, 3, 2, 2, 2, 710, + 713, 3, 2, 2, 2, 711, 709, 3, 2, 2, 2, 711, 712, 3, 2, 2, 2, 712, 715, + 3, 2, 2, 2, 713, 711, 3, 2, 2, 2, 714, 716, 7, 14, 2, 2, 715, 714, 3, 2, + 2, 2, 715, 716, 3, 2, 2, 2, 716, 718, 3, 2, 2, 2, 717, 706, 3, 2, 2, 2, + 717, 718, 3, 2, 2, 2, 718, 719, 3, 2, 2, 2, 719, 720, 7, 10, 2, 2, 720, + 113, 3, 2, 2, 2, 721, 723, 7, 18, 2, 2, 722, 721, 3, 2, 2, 2, 722, 723, + 3, 2, 2, 2, 723, 726, 3, 2, 2, 2, 724, 727, 5, 118, 60, 2, 725, 727, 7, + 118, 2, 2, 726, 724, 3, 2, 2, 2, 726, 725, 3, 2, 2, 2, 727, 115, 3, 2, + 2, 2, 728, 733, 5, 118, 60, 2, 729, 730, 7, 14, 2, 2, 730, 732, 5, 118, + 60, 2, 731, 729, 3, 2, 2, 2, 732, 735, 3, 2, 2, 2, 733, 731, 3, 2, 2, 2, + 733, 734, 3, 2, 2, 2, 734, 117, 3, 2, 2, 2, 735, 733, 3, 2, 2, 2, 736, + 737, 8, 60, 1, 2, 737, 788, 5, 122, 62, 2, 738, 740, 7, 100, 2, 2, 739, + 741, 7, 118, 2, 2, 740, 739, 3, 2, 2, 2, 740, 741, 3, 2, 2, 2, 741, 742, + 3, 2, 2, 2, 742, 788, 5, 84, 43, 2, 743, 744, 7, 78, 2, 2, 744, 746, 5, + 118, 60, 2, 745, 747, 5, 112, 57, 2, 746, 745, 3, 2, 2, 2, 746, 747, 3, + 2, 2, 2, 747, 788, 3, 2, 2, 2, 748, 749, 7, 78, 2, 2, 749, 750, 7, 19, + 2, 2, 750, 788, 7, 118, 2, 2, 751, 752, 7, 95, 2, 2, 752, 788, 5, 118, + 60, 39, 753, 754, 7, 83, 2, 2, 754, 788, 5, 118, 60, 38, 755, 756, 7, 75, + 2, 2, 756, 788, 5, 118, 60, 37, 757, 758, 7, 20, 2, 2, 758, 788, 5, 118, + 60, 36, 759, 760, 7, 21, 2, 2, 760, 788, 5, 118, 60, 35, 761, 762, 7, 22, + 2, 2, 762, 788, 5, 118, 60, 34, 763, 764, 7, 23, 2, 2, 764, 788, 5, 118, + 60, 33, 765, 766, 7, 24, 2, 2, 766, 788, 5, 118, 60, 32, 767, 768, 7, 25, + 2, 2, 768, 788, 5, 118, 60, 31, 769, 770, 7, 108, 2, 2, 770, 788, 5, 118, + 60, 30, 771, 772, 7, 106, 2, 2, 772, 773, 7, 9, 2, 2, 773, 774, 5, 118, + 60, 2, 774, 775, 7, 10, 2, 2, 775, 788, 3, 2, 2, 2, 776, 788, 5, 54, 28, + 2, 777, 788, 7, 90, 2, 2, 778, 788, 7, 118, 2, 2, 779, 788, 7, 103, 2, + 2, 780, 788, 5, 130, 66, 2, 781, 788, 5, 100, 51, 2, 782, 788, 5, 106, + 54, 2, 783, 784, 7, 9, 2, 2, 784, 785, 5, 116, 59, 2, 785, 786, 7, 10, + 2, 2, 786, 788, 3, 2, 2, 2, 787, 736, 3, 2, 2, 2, 787, 738, 3, 2, 2, 2, + 787, 743, 3, 2, 2, 2, 787, 748, 3, 2, 2, 2, 787, 751, 3, 2, 2, 2, 787, + 753, 3, 2, 2, 2, 787, 755, 3, 2, 2, 2, 787, 757, 3, 2, 2, 2, 787, 759, + 3, 2, 2, 2, 787, 761, 3, 2, 2, 2, 787, 763, 3, 2, 2, 2, 787, 765, 3, 2, + 2, 2, 787, 767, 3, 2, 2, 2, 787, 769, 3, 2, 2, 2, 787, 771, 3, 2, 2, 2, + 787, 776, 3, 2, 2, 2, 787, 777, 3, 2, 2, 2, 787, 778, 3, 2, 2, 2, 787, + 779, 3, 2, 2, 2, 787, 780, 3, 2, 2, 2, 787, 781, 3, 2, 2, 2, 787, 782, + 3, 2, 2, 2, 787, 783, 3, 2, 2, 2, 788, 870, 3, 2, 2, 2, 789, 790, 12, 29, + 2, 2, 790, 791, 7, 29, 2, 2, 791, 869, 5, 118, 60, 29, 792, 793, 12, 28, + 2, 2, 793, 794, 9, 3, 2, 2, 794, 869, 5, 118, 60, 29, 795, 796, 12, 27, + 2, 2, 796, 797, 9, 4, 2, 2, 797, 869, 5, 118, 60, 28, 798, 799, 12, 26, + 2, 2, 799, 800, 7, 30, 2, 2, 800, 869, 5, 118, 60, 27, 801, 802, 12, 25, + 2, 2, 802, 803, 9, 5, 2, 2, 803, 869, 5, 118, 60, 26, 804, 805, 12, 24, + 2, 2, 805, 806, 9, 6, 2, 2, 806, 869, 5, 118, 60, 25, 807, 808, 12, 23, + 2, 2, 808, 809, 7, 74, 2, 2, 809, 869, 5, 118, 60, 24, 810, 811, 12, 22, + 2, 2, 811, 812, 7, 96, 2, 2, 812, 869, 5, 118, 60, 23, 813, 814, 12, 21, + 2, 2, 814, 815, 9, 7, 2, 2, 815, 869, 5, 118, 60, 22, 816, 817, 12, 20, + 2, 2, 817, 818, 7, 43, 2, 2, 818, 869, 5, 118, 60, 21, 819, 820, 12, 19, + 2, 2, 820, 821, 7, 44, 2, 2, 821, 869, 5, 118, 60, 20, 822, 823, 12, 18, + 2, 2, 823, 824, 7, 45, 2, 2, 824, 869, 5, 118, 60, 19, 825, 826, 12, 17, + 2, 2, 826, 827, 7, 46, 2, 2, 827, 869, 5, 118, 60, 18, 828, 829, 12, 16, + 2, 2, 829, 830, 7, 47, 2, 2, 830, 869, 5, 118, 60, 17, 831, 832, 12, 15, + 2, 2, 832, 833, 7, 16, 2, 2, 833, 834, 5, 118, 60, 2, 834, 835, 7, 17, + 2, 2, 835, 836, 5, 118, 60, 16, 836, 869, 3, 2, 2, 2, 837, 838, 12, 14, + 2, 2, 838, 839, 7, 15, 2, 2, 839, 869, 5, 118, 60, 14, 840, 841, 12, 13, + 2, 2, 841, 842, 5, 128, 65, 2, 842, 843, 5, 118, 60, 13, 843, 869, 3, 2, + 2, 2, 844, 845, 12, 46, 2, 2, 845, 846, 7, 7, 2, 2, 846, 847, 5, 116, 59, + 2, 847, 848, 7, 8, 2, 2, 848, 869, 3, 2, 2, 2, 849, 851, 12, 45, 2, 2, + 850, 852, 7, 16, 2, 2, 851, 850, 3, 2, 2, 2, 851, 852, 3, 2, 2, 2, 852, + 853, 3, 2, 2, 2, 853, 855, 7, 19, 2, 2, 854, 856, 7, 31, 2, 2, 855, 854, + 3, 2, 2, 2, 855, 856, 3, 2, 2, 2, 856, 857, 3, 2, 2, 2, 857, 869, 5, 136, + 69, 2, 858, 859, 12, 44, 2, 2, 859, 869, 5, 112, 57, 2, 860, 861, 12, 41, + 2, 2, 861, 862, 6, 60, 31, 2, 862, 869, 7, 20, 2, 2, 863, 864, 12, 40, + 2, 2, 864, 865, 6, 60, 33, 2, 865, 869, 7, 21, 2, 2, 866, 867, 12, 11, + 2, 2, 867, 869, 7, 120, 2, 2, 868, 789, 3, 2, 2, 2, 868, 792, 3, 2, 2, + 2, 868, 795, 3, 2, 2, 2, 868, 798, 3, 2, 2, 2, 868, 801, 3, 2, 2, 2, 868, + 804, 3, 2, 2, 2, 868, 807, 3, 2, 2, 2, 868, 810, 3, 2, 2, 2, 868, 813, + 3, 2, 2, 2, 868, 816, 3, 2, 2, 2, 868, 819, 3, 2, 2, 2, 868, 822, 3, 2, + 2, 2, 868, 825, 3, 2, 2, 2, 868, 828, 3, 2, 2, 2, 868, 831, 3, 2, 2, 2, + 868, 837, 3, 2, 2, 2, 868, 840, 3, 2, 2, 2, 868, 844, 3, 2, 2, 2, 868, + 849, 3, 2, 2, 2, 868, 858, 3, 2, 2, 2, 868, 860, 3, 2, 2, 2, 868, 863, + 3, 2, 2, 2, 868, 866, 3, 2, 2, 2, 869, 872, 3, 2, 2, 2, 870, 868, 3, 2, + 2, 2, 870, 871, 3, 2, 2, 2, 871, 119, 3, 2, 2, 2, 872, 870, 3, 2, 2, 2, + 873, 877, 7, 118, 2, 2, 874, 877, 5, 100, 51, 2, 875, 877, 5, 106, 54, + 2, 876, 873, 3, 2, 2, 2, 876, 874, 3, 2, 2, 2, 876, 875, 3, 2, 2, 2, 877, + 121, 3, 2, 2, 2, 878, 903, 5, 80, 41, 2, 879, 881, 7, 107, 2, 2, 880, 879, + 3, 2, 2, 2, 880, 881, 3, 2, 2, 2, 881, 882, 3, 2, 2, 2, 882, 884, 7, 89, + 2, 2, 883, 885, 7, 26, 2, 2, 884, 883, 3, 2, 2, 2, 884, 885, 3, 2, 2, 2, + 885, 886, 3, 2, 2, 2, 886, 888, 7, 9, 2, 2, 887, 889, 5, 90, 46, 2, 888, + 887, 3, 2, 2, 2, 888, 889, 3, 2, 2, 2, 889, 890, 3, 2, 2, 2, 890, 891, + 7, 10, 2, 2, 891, 892, 7, 11, 2, 2, 892, 893, 5, 96, 49, 2, 893, 894, 7, + 12, 2, 2, 894, 903, 3, 2, 2, 2, 895, 897, 7, 107, 2, 2, 896, 895, 3, 2, + 2, 2, 896, 897, 3, 2, 2, 2, 897, 898, 3, 2, 2, 2, 898, 899, 5, 124, 63, + 2, 899, 900, 7, 60, 2, 2, 900, 901, 5, 126, 64, 2, 901, 903, 3, 2, 2, 2, + 902, 878, 3, 2, 2, 2, 902, 880, 3, 2, 2, 2, 902, 896, 3, 2, 2, 2, 903, + 123, 3, 2, 2, 2, 904, 911, 7, 118, 2, 2, 905, 907, 7, 9, 2, 2, 906, 908, + 5, 90, 46, 2, 907, 906, 3, 2, 2, 2, 907, 908, 3, 2, 2, 2, 908, 909, 3, + 2, 2, 2, 909, 911, 7, 10, 2, 2, 910, 904, 3, 2, 2, 2, 910, 905, 3, 2, 2, + 2, 911, 125, 3, 2, 2, 2, 912, 918, 5, 118, 60, 2, 913, 914, 7, 11, 2, 2, + 914, 915, 5, 96, 49, 2, 915, 916, 7, 12, 2, 2, 916, 918, 3, 2, 2, 2, 917, + 912, 3, 2, 2, 2, 917, 913, 3, 2, 2, 2, 918, 127, 3, 2, 2, 2, 919, 920, + 9, 8, 2, 2, 920, 129, 3, 2, 2, 2, 921, 929, 7, 61, 2, 2, 922, 929, 7, 62, + 2, 2, 923, 929, 7, 119, 2, 2, 924, 929, 7, 120, 2, 2, 925, 929, 7, 6, 2, + 2, 926, 929, 5, 132, 67, 2, 927, 929, 5, 134, 68, 2, 928, 921, 3, 2, 2, + 2, 928, 922, 3, 2, 2, 2, 928, 923, 3, 2, 2, 2, 928, 924, 3, 2, 2, 2, 928, + 925, 3, 2, 2, 2, 928, 926, 3, 2, 2, 2, 928, 927, 3, 2, 2, 2, 929, 131, + 3, 2, 2, 2, 930, 931, 9, 9, 2, 2, 931, 133, 3, 2, 2, 2, 932, 933, 9, 10, + 2, 2, 933, 135, 3, 2, 2, 2, 934, 937, 7, 118, 2, 2, 935, 937, 5, 138, 70, + 2, 936, 934, 3, 2, 2, 2, 936, 935, 3, 2, 2, 2, 937, 137, 3, 2, 2, 2, 938, + 942, 5, 140, 71, 2, 939, 942, 7, 61, 2, 2, 940, 942, 7, 62, 2, 2, 941, + 938, 3, 2, 2, 2, 941, 939, 3, 2, 2, 2, 941, 940, 3, 2, 2, 2, 942, 139, + 3, 2, 2, 2, 943, 944, 9, 11, 2, 2, 944, 141, 3, 2, 2, 2, 945, 946, 7, 118, + 2, 2, 946, 947, 6, 72, 35, 2, 947, 948, 5, 110, 56, 2, 948, 143, 3, 2, + 2, 2, 949, 950, 7, 118, 2, 2, 950, 951, 6, 73, 36, 2, 951, 952, 5, 110, + 56, 2, 952, 145, 3, 2, 2, 2, 953, 958, 7, 13, 2, 2, 954, 958, 7, 2, 2, + 3, 955, 958, 6, 74, 37, 2, 956, 958, 6, 74, 38, 2, 957, 953, 3, 2, 2, 2, + 957, 954, 3, 2, 2, 2, 957, 955, 3, 2, 2, 2, 957, 956, 3, 2, 2, 2, 958, + 147, 3, 2, 2, 2, 109, 149, 152, 178, 182, 189, 195, 199, 206, 214, 219, + 221, 231, 239, 244, 253, 261, 265, 270, 281, 287, 302, 322, 326, 330, 338, + 347, 352, 360, 367, 374, 381, 388, 406, 410, 412, 419, 425, 430, 445, 448, + 453, 456, 467, 471, 476, 489, 495, 504, 506, 512, 518, 521, 524, 529, 537, + 540, 550, 553, 558, 565, 572, 577, 580, 585, 591, 596, 605, 609, 614, 619, + 625, 629, 639, 642, 645, 660, 663, 668, 691, 694, 703, 711, 715, 717, 722, + 726, 733, 740, 746, 787, 851, 855, 868, 870, 876, 880, 884, 888, 896, 902, + 907, 910, 917, 928, 936, 941, 957, +} +var deserializer = antlr.NewATNDeserializer(nil) +var deserializedATN = deserializer.DeserializeFromUInt16(parserATN) + +var literalNames = []string{ + "", "", "", "", "", "'['", "']'", "'('", "')'", "'{'", "'}'", "';'", "','", + "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", "'-'", "'~'", + "'!'", "'*'", "'/'", "'%'", "'**'", "'??'", "'#'", "'>>'", "'<<'", "'>>>'", + "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'==='", "'!=='", "'&'", + "'^'", "'|'", "'&&'", "'||'", "'*='", "'/='", "'%='", "'+='", "'-='", "'<<='", + "'>>='", "'>>>='", "'&='", "'^='", "'|='", "'**='", "'=>'", "'null'", "", + "", "", "", "", "", "", "", "", "", "'break'", "'do'", "'instanceof'", + "'typeof'", "'case'", "'else'", "'new'", "'var'", "'catch'", "'finally'", + "'return'", "'void'", "'continue'", "'for'", "'switch'", "'while'", "'debugger'", + "'function'", "'this'", "'with'", "'default'", "'if'", "'throw'", "'delete'", + "'in'", "'try'", "'as'", "'from'", "'class'", "'enum'", "'extends'", "'super'", + "'const'", "'export'", "'import'", "'async'", "'await'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", +} +var symbolicNames = []string{ + "", "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Divide", "Modulus", "Power", "NullCoalesce", "Hashtag", + "RightShiftArithmetic", "LeftShiftArithmetic", "RightShiftLogical", "LessThan", + "MoreThan", "LessThanEquals", "GreaterThanEquals", "Equals_", "NotEquals", + "IdentityEquals", "IdentityNotEquals", "BitAnd", "BitXOr", "BitOr", "And", + "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", "PlusAssign", + "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "PowerAssign", "ARROW", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "BigHexIntegerLiteral", "BigOctalIntegerLiteral", "BigBinaryIntegerLiteral", + "BigDecimalIntegerLiteral", "Break", "Do", "Instanceof", "Typeof", "Case", + "Else", "New", "Var", "Catch", "Finally", "Return", "Void", "Continue", + "For", "Switch", "While", "Debugger", "Function", "This", "With", "Default", + "If", "Throw", "Delete", "In", "Try", "As", "From", "NodeName", "Enum", "Extends", + "Super", "Const", "Export", "Import", "Async", "Await", "Implements", "Let", + "Private", "Public", "Interface", "Package", "Protected", "Static", "Yield", + "Identifier", "StringLiteral", "TemplateStringLiteral", "WhiteSpaces", + "LineTerminator", "HtmlComment", "CDataComment", "UnexpectedCharacter", +} + +var ruleNames = []string{ + "program", "sourceElement", "statement", "block", "statementList", "importStatement", + "importFromBlock", "moduleItems", "importDefault", "importNamespace", "importFrom", + "aliasName", "exportStatement", "exportFromBlock", "declaration", "variableStatement", + "variableDeclarationList", "variableDeclaration", "emptyStatement_", "expressionStatement", + "ifStatement", "iterationStatement", "varModifier", "continueStatement", + "breakStatement", "returnStatement", "yieldStatement", "withStatement", + "switchStatement", "caseBlock", "caseClauses", "caseClause", "defaultClause", + "labelledStatement", "throwStatement", "tryStatement", "catchProduction", + "finallyProduction", "debuggerStatement", "functionDeclaration", "classDeclaration", + "classTail", "classElement", "methodDefinition", "formalParameterList", + "formalParameterArg", "lastFormalParameterArg", "functionBody", "sourceElements", + "arrayLiteral", "elementList", "arrayElement", "objectLiteral", "propertyAssignment", + "propertyName", "arguments", "argument", "expressionSequence", "singleExpression", + "assignable", "anoymousFunction", "arrowFunctionParameters", "arrowFunctionBody", + "assignmentOperator", "literal", "numericLiteral", "bigintLiteral", "identifierName", + "reservedWord", "keyword", "getter", "setter", "eos", +} +var decisionToDFA = make([]*antlr.DFA, len(deserializedATN.DecisionToState)) + +func init() { + for index, ds := range deserializedATN.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +type JavaScriptParser struct { + JavaScriptBaseParser +} + +func NewJavaScriptParser(input antlr.TokenStream) *JavaScriptParser { + this := new(JavaScriptParser) + + this.BaseParser = antlr.NewBaseParser(input) + + this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache()) + this.RuleNames = ruleNames + this.LiteralNames = literalNames + this.SymbolicNames = symbolicNames + this.GrammarFileName = "JavaScriptParser.g4" + + return this +} + +// JavaScriptParser tokens. +const ( + JavaScriptParserEOF = antlr.TokenEOF + JavaScriptParserHashBangLine = 1 + JavaScriptParserMultiLineComment = 2 + JavaScriptParserSingleLineComment = 3 + JavaScriptParserRegularExpressionLiteral = 4 + JavaScriptParserOpenBracket = 5 + JavaScriptParserCloseBracket = 6 + JavaScriptParserOpenParen = 7 + JavaScriptParserCloseParen = 8 + JavaScriptParserOpenBrace = 9 + JavaScriptParserCloseBrace = 10 + JavaScriptParserSemiColon = 11 + JavaScriptParserComma = 12 + JavaScriptParserAssign = 13 + JavaScriptParserQuestionMark = 14 + JavaScriptParserColon = 15 + JavaScriptParserEllipsis = 16 + JavaScriptParserDot = 17 + JavaScriptParserPlusPlus = 18 + JavaScriptParserMinusMinus = 19 + JavaScriptParserPlus = 20 + JavaScriptParserMinus = 21 + JavaScriptParserBitNot = 22 + JavaScriptParserNot = 23 + JavaScriptParserMultiply = 24 + JavaScriptParserDivide = 25 + JavaScriptParserModulus = 26 + JavaScriptParserPower = 27 + JavaScriptParserNullCoalesce = 28 + JavaScriptParserHashtag = 29 + JavaScriptParserRightShiftArithmetic = 30 + JavaScriptParserLeftShiftArithmetic = 31 + JavaScriptParserRightShiftLogical = 32 + JavaScriptParserLessThan = 33 + JavaScriptParserMoreThan = 34 + JavaScriptParserLessThanEquals = 35 + JavaScriptParserGreaterThanEquals = 36 + JavaScriptParserEquals_ = 37 + JavaScriptParserNotEquals = 38 + JavaScriptParserIdentityEquals = 39 + JavaScriptParserIdentityNotEquals = 40 + JavaScriptParserBitAnd = 41 + JavaScriptParserBitXOr = 42 + JavaScriptParserBitOr = 43 + JavaScriptParserAnd = 44 + JavaScriptParserOr = 45 + JavaScriptParserMultiplyAssign = 46 + JavaScriptParserDivideAssign = 47 + JavaScriptParserModulusAssign = 48 + JavaScriptParserPlusAssign = 49 + JavaScriptParserMinusAssign = 50 + JavaScriptParserLeftShiftArithmeticAssign = 51 + JavaScriptParserRightShiftArithmeticAssign = 52 + JavaScriptParserRightShiftLogicalAssign = 53 + JavaScriptParserBitAndAssign = 54 + JavaScriptParserBitXorAssign = 55 + JavaScriptParserBitOrAssign = 56 + JavaScriptParserPowerAssign = 57 + JavaScriptParserARROW = 58 + JavaScriptParserNullLiteral = 59 + JavaScriptParserBooleanLiteral = 60 + JavaScriptParserDecimalLiteral = 61 + JavaScriptParserHexIntegerLiteral = 62 + JavaScriptParserOctalIntegerLiteral = 63 + JavaScriptParserOctalIntegerLiteral2 = 64 + JavaScriptParserBinaryIntegerLiteral = 65 + JavaScriptParserBigHexIntegerLiteral = 66 + JavaScriptParserBigOctalIntegerLiteral = 67 + JavaScriptParserBigBinaryIntegerLiteral = 68 + JavaScriptParserBigDecimalIntegerLiteral = 69 + JavaScriptParserBreak = 70 + JavaScriptParserDo = 71 + JavaScriptParserInstanceof = 72 + JavaScriptParserTypeof = 73 + JavaScriptParserCase = 74 + JavaScriptParserElse = 75 + JavaScriptParserNew = 76 + JavaScriptParserVar = 77 + JavaScriptParserCatch = 78 + JavaScriptParserFinally = 79 + JavaScriptParserReturn = 80 + JavaScriptParserVoid = 81 + JavaScriptParserContinue = 82 + JavaScriptParserFor = 83 + JavaScriptParserSwitch = 84 + JavaScriptParserWhile = 85 + JavaScriptParserDebugger = 86 + JavaScriptParserFunction = 87 + JavaScriptParserThis = 88 + JavaScriptParserWith = 89 + JavaScriptParserDefault = 90 + JavaScriptParserIf = 91 + JavaScriptParserThrow = 92 + JavaScriptParserDelete = 93 + JavaScriptParserIn = 94 + JavaScriptParserTry = 95 + JavaScriptParserAs = 96 + JavaScriptParserFrom = 97 + JavaScriptParserClass = 98 + JavaScriptParserEnum = 99 + JavaScriptParserExtends = 100 + JavaScriptParserSuper = 101 + JavaScriptParserConst = 102 + JavaScriptParserExport = 103 + JavaScriptParserImport = 104 + JavaScriptParserAsync = 105 + JavaScriptParserAwait = 106 + JavaScriptParserImplements = 107 + JavaScriptParserLet = 108 + JavaScriptParserPrivate = 109 + JavaScriptParserPublic = 110 + JavaScriptParserInterface = 111 + JavaScriptParserPackage = 112 + JavaScriptParserProtected = 113 + JavaScriptParserStatic = 114 + JavaScriptParserYield = 115 + JavaScriptParserIdentifier = 116 + JavaScriptParserStringLiteral = 117 + JavaScriptParserTemplateStringLiteral = 118 + JavaScriptParserWhiteSpaces = 119 + JavaScriptParserLineTerminator = 120 + JavaScriptParserHtmlComment = 121 + JavaScriptParserCDataComment = 122 + JavaScriptParserUnexpectedCharacter = 123 +) + +// JavaScriptParser rules. +const ( + JavaScriptParserRULE_program = 0 + JavaScriptParserRULE_sourceElement = 1 + JavaScriptParserRULE_statement = 2 + JavaScriptParserRULE_block = 3 + JavaScriptParserRULE_statementList = 4 + JavaScriptParserRULE_importStatement = 5 + JavaScriptParserRULE_importFromBlock = 6 + JavaScriptParserRULE_moduleItems = 7 + JavaScriptParserRULE_importDefault = 8 + JavaScriptParserRULE_importNamespace = 9 + JavaScriptParserRULE_importFrom = 10 + JavaScriptParserRULE_aliasName = 11 + JavaScriptParserRULE_exportStatement = 12 + JavaScriptParserRULE_exportFromBlock = 13 + JavaScriptParserRULE_declaration = 14 + JavaScriptParserRULE_variableStatement = 15 + JavaScriptParserRULE_variableDeclarationList = 16 + JavaScriptParserRULE_variableDeclaration = 17 + JavaScriptParserRULE_emptyStatement_ = 18 + JavaScriptParserRULE_expressionStatement = 19 + JavaScriptParserRULE_ifStatement = 20 + JavaScriptParserRULE_iterationStatement = 21 + JavaScriptParserRULE_varModifier = 22 + JavaScriptParserRULE_continueStatement = 23 + JavaScriptParserRULE_breakStatement = 24 + JavaScriptParserRULE_returnStatement = 25 + JavaScriptParserRULE_yieldStatement = 26 + JavaScriptParserRULE_withStatement = 27 + JavaScriptParserRULE_switchStatement = 28 + JavaScriptParserRULE_caseBlock = 29 + JavaScriptParserRULE_caseClauses = 30 + JavaScriptParserRULE_caseClause = 31 + JavaScriptParserRULE_defaultClause = 32 + JavaScriptParserRULE_labelledStatement = 33 + JavaScriptParserRULE_throwStatement = 34 + JavaScriptParserRULE_tryStatement = 35 + JavaScriptParserRULE_catchProduction = 36 + JavaScriptParserRULE_finallyProduction = 37 + JavaScriptParserRULE_debuggerStatement = 38 + JavaScriptParserRULE_functionDeclaration = 39 + JavaScriptParserRULE_classDeclaration = 40 + JavaScriptParserRULE_classTail = 41 + JavaScriptParserRULE_classElement = 42 + JavaScriptParserRULE_methodDefinition = 43 + JavaScriptParserRULE_formalParameterList = 44 + JavaScriptParserRULE_formalParameterArg = 45 + JavaScriptParserRULE_lastFormalParameterArg = 46 + JavaScriptParserRULE_functionBody = 47 + JavaScriptParserRULE_sourceElements = 48 + JavaScriptParserRULE_arrayLiteral = 49 + JavaScriptParserRULE_elementList = 50 + JavaScriptParserRULE_arrayElement = 51 + JavaScriptParserRULE_objectLiteral = 52 + JavaScriptParserRULE_propertyAssignment = 53 + JavaScriptParserRULE_propertyName = 54 + JavaScriptParserRULE_arguments = 55 + JavaScriptParserRULE_argument = 56 + JavaScriptParserRULE_expressionSequence = 57 + JavaScriptParserRULE_singleExpression = 58 + JavaScriptParserRULE_assignable = 59 + JavaScriptParserRULE_anoymousFunction = 60 + JavaScriptParserRULE_arrowFunctionParameters = 61 + JavaScriptParserRULE_arrowFunctionBody = 62 + JavaScriptParserRULE_assignmentOperator = 63 + JavaScriptParserRULE_literal = 64 + JavaScriptParserRULE_numericLiteral = 65 + JavaScriptParserRULE_bigintLiteral = 66 + JavaScriptParserRULE_identifierName = 67 + JavaScriptParserRULE_reservedWord = 68 + JavaScriptParserRULE_keyword = 69 + JavaScriptParserRULE_getter = 70 + JavaScriptParserRULE_setter = 71 + JavaScriptParserRULE_eos = 72 +) + +// IProgramContext is an interface to support dynamic dispatch. +type IProgramContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsProgramContext differentiates from other interfaces. + IsProgramContext() +} + +type ProgramContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyProgramContext() *ProgramContext { + var p = new(ProgramContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = JavaScriptParserRULE_program + return p +} + +func (*ProgramContext) IsProgramContext() {} + +func NewProgramContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgramContext { + var p = new(ProgramContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = JavaScriptParserRULE_program + + return p +} + +func (s *ProgramContext) GetParser() antlr.Parser { return s.parser } + +func (s *ProgramContext) EOF() antlr.TerminalNode { + return s.GetToken(JavaScriptParserEOF, 0) +} + +func (s *ProgramContext) HashBangLine() antlr.TerminalNode { + return s.GetToken(JavaScriptParserHashBangLine, 0) +} + +func (s *ProgramContext) SourceElements() ISourceElementsContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISourceElementsContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISourceElementsContext) +} + +func (s *ProgramContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ProgramContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ProgramContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.EnterProgram(s) + } +} + +func (s *ProgramContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.ExitProgram(s) + } +} + +func (p *JavaScriptParser) Program() (localctx IProgramContext) { + localctx = NewProgramContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 0, JavaScriptParserRULE_program) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + p.SetState(147) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) == 1 { + { + p.SetState(146) + p.Match(JavaScriptParserHashBangLine) + } + + } + p.SetState(150) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) == 1 { + { + p.SetState(149) + p.SourceElements() + } + + } + { + p.SetState(152) + p.Match(JavaScriptParserEOF) + } + + return localctx +} + +// ISourceElementContext is an interface to support dynamic dispatch. +type ISourceElementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsSourceElementContext differentiates from other interfaces. + IsSourceElementContext() +} + +type SourceElementContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySourceElementContext() *SourceElementContext { + var p = new(SourceElementContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = JavaScriptParserRULE_sourceElement + return p +} + +func (*SourceElementContext) IsSourceElementContext() {} + +func NewSourceElementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SourceElementContext { + var p = new(SourceElementContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = JavaScriptParserRULE_sourceElement + + return p +} + +func (s *SourceElementContext) GetParser() antlr.Parser { return s.parser } + +func (s *SourceElementContext) Statement() IStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IStatementContext) +} + +func (s *SourceElementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SourceElementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SourceElementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.EnterSourceElement(s) + } +} + +func (s *SourceElementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.ExitSourceElement(s) + } +} + +func (p *JavaScriptParser) SourceElement() (localctx ISourceElementContext) { + localctx = NewSourceElementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 2, JavaScriptParserRULE_sourceElement) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(154) + p.Statement() + } + + return localctx +} + +// IStatementContext is an interface to support dynamic dispatch. +type IStatementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsStatementContext differentiates from other interfaces. + IsStatementContext() +} + +type StatementContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStatementContext() *StatementContext { + var p = new(StatementContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = JavaScriptParserRULE_statement + return p +} + +func (*StatementContext) IsStatementContext() {} + +func NewStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StatementContext { + var p = new(StatementContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = JavaScriptParserRULE_statement + + return p +} + +func (s *StatementContext) GetParser() antlr.Parser { return s.parser } + +func (s *StatementContext) Block() IBlockContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IBlockContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IBlockContext) +} + +func (s *StatementContext) VariableStatement() IVariableStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IVariableStatementContext) +} + +func (s *StatementContext) ImportStatement() IImportStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IImportStatementContext) +} + +func (s *StatementContext) ExportStatement() IExportStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IExportStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IExportStatementContext) +} + +func (s *StatementContext) EmptyStatement_() IEmptyStatement_Context { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IEmptyStatement_Context)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IEmptyStatement_Context) +} + +func (s *StatementContext) ClassDeclaration() IClassDeclarationContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IClassDeclarationContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IClassDeclarationContext) +} + +func (s *StatementContext) ExpressionStatement() IExpressionStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IExpressionStatementContext) +} + +func (s *StatementContext) IfStatement() IIfStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IIfStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IIfStatementContext) +} + +func (s *StatementContext) IterationStatement() IIterationStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IIterationStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IIterationStatementContext) +} + +func (s *StatementContext) ContinueStatement() IContinueStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IContinueStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IContinueStatementContext) +} + +func (s *StatementContext) BreakStatement() IBreakStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IBreakStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IBreakStatementContext) +} + +func (s *StatementContext) ReturnStatement() IReturnStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IReturnStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IReturnStatementContext) +} + +func (s *StatementContext) YieldStatement() IYieldStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IYieldStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IYieldStatementContext) +} + +func (s *StatementContext) WithStatement() IWithStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IWithStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IWithStatementContext) +} + +func (s *StatementContext) LabelledStatement() ILabelledStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ILabelledStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ILabelledStatementContext) +} + +func (s *StatementContext) SwitchStatement() ISwitchStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISwitchStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISwitchStatementContext) +} + +func (s *StatementContext) ThrowStatement() IThrowStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IThrowStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IThrowStatementContext) +} + +func (s *StatementContext) TryStatement() ITryStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITryStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITryStatementContext) +} + +func (s *StatementContext) DebuggerStatement() IDebuggerStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IDebuggerStatementContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IDebuggerStatementContext) +} + +func (s *StatementContext) FunctionDeclaration() IFunctionDeclarationContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionDeclarationContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IFunctionDeclarationContext) +} + +func (s *StatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.EnterStatement(s) + } +} + +func (s *StatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.ExitStatement(s) + } +} + +func (p *JavaScriptParser) Statement() (localctx IStatementContext) { + localctx = NewStatementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 4, JavaScriptParserRULE_statement) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.SetState(176) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 2, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(156) + p.Block() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(157) + p.VariableStatement() + } + + case 3: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(158) + p.ImportStatement() + } + + case 4: + p.EnterOuterAlt(localctx, 4) + { + p.SetState(159) + p.ExportStatement() + } + + case 5: + p.EnterOuterAlt(localctx, 5) + { + p.SetState(160) + p.EmptyStatement_() + } + + case 6: + p.EnterOuterAlt(localctx, 6) + { + p.SetState(161) + p.ClassDeclaration() + } + + case 7: + p.EnterOuterAlt(localctx, 7) + { + p.SetState(162) + p.ExpressionStatement() + } + + case 8: + p.EnterOuterAlt(localctx, 8) + { + p.SetState(163) + p.IfStatement() + } + + case 9: + p.EnterOuterAlt(localctx, 9) + { + p.SetState(164) + p.IterationStatement() + } + + case 10: + p.EnterOuterAlt(localctx, 10) + { + p.SetState(165) + p.ContinueStatement() + } + + case 11: + p.EnterOuterAlt(localctx, 11) + { + p.SetState(166) + p.BreakStatement() + } + + case 12: + p.EnterOuterAlt(localctx, 12) + { + p.SetState(167) + p.ReturnStatement() + } + + case 13: + p.EnterOuterAlt(localctx, 13) + { + p.SetState(168) + p.YieldStatement() + } + + case 14: + p.EnterOuterAlt(localctx, 14) + { + p.SetState(169) + p.WithStatement() + } + + case 15: + p.EnterOuterAlt(localctx, 15) + { + p.SetState(170) + p.LabelledStatement() + } + + case 16: + p.EnterOuterAlt(localctx, 16) + { + p.SetState(171) + p.SwitchStatement() + } + + case 17: + p.EnterOuterAlt(localctx, 17) + { + p.SetState(172) + p.ThrowStatement() + } + + case 18: + p.EnterOuterAlt(localctx, 18) + { + p.SetState(173) + p.TryStatement() + } + + case 19: + p.EnterOuterAlt(localctx, 19) + { + p.SetState(174) + p.DebuggerStatement() + } + + case 20: + p.EnterOuterAlt(localctx, 20) + { + p.SetState(175) + p.FunctionDeclaration() + } + + } + + return localctx +} + +// IBlockContext is an interface to support dynamic dispatch. +type IBlockContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsBlockContext differentiates from other interfaces. + IsBlockContext() +} + +type BlockContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyBlockContext() *BlockContext { + var p = new(BlockContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = JavaScriptParserRULE_block + return p +} + +func (*BlockContext) IsBlockContext() {} + +func NewBlockContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BlockContext { + var p = new(BlockContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = JavaScriptParserRULE_block + + return p +} + +func (s *BlockContext) GetParser() antlr.Parser { return s.parser } + +func (s *BlockContext) OpenBrace() antlr.TerminalNode { + return s.GetToken(JavaScriptParserOpenBrace, 0) +} + +func (s *BlockContext) CloseBrace() antlr.TerminalNode { + return s.GetToken(JavaScriptParserCloseBrace, 0) +} + +func (s *BlockContext) StatementList() IStatementListContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IStatementListContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IStatementListContext) +} + +func (s *BlockContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BlockContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *BlockContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.EnterBlock(s) + } +} + +func (s *BlockContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.ExitBlock(s) + } +} + +func (p *JavaScriptParser) Block() (localctx IBlockContext) { + localctx = NewBlockContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 6, JavaScriptParserRULE_block) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(178) + p.Match(JavaScriptParserOpenBrace) + } + p.SetState(180) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) == 1 { + { + p.SetState(179) + p.StatementList() + } + + } + { + p.SetState(182) + p.Match(JavaScriptParserCloseBrace) + } + + return localctx +} + +// IStatementListContext is an interface to support dynamic dispatch. +type IStatementListContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsStatementListContext differentiates from other interfaces. + IsStatementListContext() +} + +type StatementListContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStatementListContext() *StatementListContext { + var p = new(StatementListContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = JavaScriptParserRULE_statementList + return p +} + +func (*StatementListContext) IsStatementListContext() {} + +func NewStatementListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StatementListContext { + var p = new(StatementListContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = JavaScriptParserRULE_statementList + + return p +} + +func (s *StatementListContext) GetParser() antlr.Parser { return s.parser } + +func (s *StatementListContext) AllStatement() []IStatementContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IStatementContext)(nil)).Elem()) + var tst = make([]IStatementContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IStatementContext) + } + } + + return tst +} + +func (s *StatementListContext) Statement(i int) IStatementContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IStatementContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IStatementContext) +} + +func (s *StatementListContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StatementListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StatementListContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.EnterStatementList(s) + } +} + +func (s *StatementListContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.ExitStatementList(s) + } +} + +func (p *JavaScriptParser) StatementList() (localctx IStatementListContext) { + localctx = NewStatementListContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 8, JavaScriptParserRULE_statementList) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(185) + p.GetErrorHandler().Sync(p) + _alt = 1 + for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + switch _alt { + case 1: + { + p.SetState(184) + p.Statement() + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + p.SetState(187) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) + } + + return localctx +} + +// IImportStatementContext is an interface to support dynamic dispatch. +type IImportStatementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsImportStatementContext differentiates from other interfaces. + IsImportStatementContext() +} + +type ImportStatementContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyImportStatementContext() *ImportStatementContext { + var p = new(ImportStatementContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = JavaScriptParserRULE_importStatement + return p +} + +func (*ImportStatementContext) IsImportStatementContext() {} + +func NewImportStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportStatementContext { + var p = new(ImportStatementContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = JavaScriptParserRULE_importStatement + + return p +} + +func (s *ImportStatementContext) GetParser() antlr.Parser { return s.parser } + +func (s *ImportStatementContext) Import() antlr.TerminalNode { + return s.GetToken(JavaScriptParserImport, 0) +} + +func (s *ImportStatementContext) ImportFromBlock() IImportFromBlockContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportFromBlockContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IImportFromBlockContext) +} + +func (s *ImportStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ImportStatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ImportStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.EnterImportStatement(s) + } +} + +func (s *ImportStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.ExitImportStatement(s) + } +} + +func (p *JavaScriptParser) ImportStatement() (localctx IImportStatementContext) { + localctx = NewImportStatementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 10, JavaScriptParserRULE_importStatement) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(189) + p.Match(JavaScriptParserImport) + } + { + p.SetState(190) + p.ImportFromBlock() + } + + return localctx +} + +// IImportFromBlockContext is an interface to support dynamic dispatch. +type IImportFromBlockContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsImportFromBlockContext differentiates from other interfaces. + IsImportFromBlockContext() +} + +type ImportFromBlockContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyImportFromBlockContext() *ImportFromBlockContext { + var p = new(ImportFromBlockContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = JavaScriptParserRULE_importFromBlock + return p +} + +func (*ImportFromBlockContext) IsImportFromBlockContext() {} + +func NewImportFromBlockContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportFromBlockContext { + var p = new(ImportFromBlockContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = JavaScriptParserRULE_importFromBlock + + return p +} + +func (s *ImportFromBlockContext) GetParser() antlr.Parser { return s.parser } + +func (s *ImportFromBlockContext) ImportFrom() IImportFromContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportFromContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IImportFromContext) +} + +func (s *ImportFromBlockContext) Eos() IEosContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IEosContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IEosContext) +} + +func (s *ImportFromBlockContext) ImportNamespace() IImportNamespaceContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportNamespaceContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IImportNamespaceContext) +} + +func (s *ImportFromBlockContext) ModuleItems() IModuleItemsContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IModuleItemsContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IModuleItemsContext) +} + +func (s *ImportFromBlockContext) ImportDefault() IImportDefaultContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportDefaultContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IImportDefaultContext) +} + +func (s *ImportFromBlockContext) StringLiteral() antlr.TerminalNode { + return s.GetToken(JavaScriptParserStringLiteral, 0) +} + +func (s *ImportFromBlockContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ImportFromBlockContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ImportFromBlockContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.EnterImportFromBlock(s) + } +} + +func (s *ImportFromBlockContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(JavaScriptParserListener); ok { + listenerT.ExitImportFromBlock(s) + } +} + +func (p *JavaScriptParser) ImportFromBlock() (localctx IImportFromBlockContext) { + localctx = NewImportFromBlockContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 12, JavaScriptParserRULE_importFromBlock) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.SetState(204) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case JavaScriptParserOpenBrace, JavaScriptParserMultiply, JavaScriptParserNullLiteral, JavaScriptParserBooleanLiteral, JavaScriptParserBreak, JavaScriptParserDo, JavaScriptParserInstanceof, JavaScriptParserTypeof, JavaScriptParserCase, JavaScriptParserElse, JavaScriptParserNew, JavaScriptParserVar, JavaScriptParserCatch, JavaScriptParserFinally, JavaScriptParserReturn, JavaScriptParserVoid, JavaScriptParserContinue, JavaScriptParserFor, JavaScriptParserSwitch, JavaScriptParserWhile, JavaScriptParserDebugger, JavaScriptParserFunction, JavaScriptParserThis, JavaScriptParserWith, JavaScriptParserDefault, JavaScriptParserIf, JavaScriptParserThrow, JavaScriptParserDelete, JavaScriptParserIn, JavaScriptParserTry, JavaScriptParserAs, JavaScriptParserFrom, JavaScriptParserClass, JavaScriptParserEnum, JavaScriptParserExtends, JavaScriptParserSuper, JavaScriptParserConst, JavaScriptParserExport, JavaScriptParserImport, JavaScriptParserAsync, JavaScriptParserAwait, JavaScriptParserImplements, JavaScriptParserLet, JavaScriptParserPrivate, JavaScriptParserPublic, JavaScriptParserInterface, JavaScriptParserPackage, JavaScriptParserProtected, JavaScriptParserStatic, JavaScriptParserYield, JavaScriptParserIdentifier: + p.EnterOuterAlt(localctx, 1) + p.SetState(193) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if (((_la-59)&-(0x1f+1)) == 0 && ((1<>' +'+' +'-' +'/' +'%' +'//' +'~' +'<' +'>' +'==' +'>=' +'<=' +'<>' +'!=' +'@' +'->' +'+=' +'-=' +'*=' +'@=' +'/=' +'%=' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'**=' +'//=' +null +null +null +null +null +null +null +'(' +')' +'{' +'}' +'[' +']' +null +null +null +null +null + +token symbolic names: +null +INDENT +DEDENT +LINE_BREAK +DEF +RETURN +RAISE +FROM +IMPORT +NONLOCAL +AS +GLOBAL +ASSERT +IF +ELIF +ELSE +WHILE +FOR +IN +TRY +NONE +FINALLY +WITH +EXCEPT +LAMBDA +OR +AND +NOT +IS +CLASS +YIELD +DEL +PASS +CONTINUE +BREAK +ASYNC +AWAIT +PRINT +EXEC +TRUE +FALSE +DOT +ELLIPSIS +REVERSE_QUOTE +STAR +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +STRING +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +IMAG_NUMBER +FLOAT_NUMBER +OPEN_PAREN +CLOSE_PAREN +OPEN_BRACE +CLOSE_BRACE +OPEN_BRACKET +CLOSE_BRACKET +NAME +LINE_JOIN +NEWLINE +WS +COMMENT + +rule names: +DEF +RETURN +RAISE +FROM +IMPORT +NONLOCAL +AS +GLOBAL +ASSERT +IF +ELIF +ELSE +WHILE +FOR +IN +TRY +NONE +FINALLY +WITH +EXCEPT +LAMBDA +OR +AND +NOT +IS +CLASS +YIELD +DEL +PASS +CONTINUE +BREAK +ASYNC +AWAIT +PRINT +EXEC +TRUE +FALSE +DOT +ELLIPSIS +REVERSE_QUOTE +STAR +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +STRING +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +IMAG_NUMBER +FLOAT_NUMBER +OPEN_PAREN +CLOSE_PAREN +OPEN_BRACE +CLOSE_BRACE +OPEN_BRACKET +CLOSE_BRACKET +NAME +LINE_JOIN +NEWLINE +WS +COMMENT +SHORT_STRING +LONG_STRING +LONG_STRING_ITEM +RN +EXPONENT_OR_POINT_FLOAT +POINT_FLOAT +SHORT_BYTES +LONG_BYTES +LONG_BYTES_ITEM +SHORT_BYTES_CHAR_NO_SINGLE_QUOTE +SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE +LONG_BYTES_CHAR +BYTES_ESCAPE_SEQ +ID_CONTINUE +ID_START + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 102, 856, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 5, 81, 545, 10, 81, 3, 81, 3, 81, 5, 81, 549, 10, 81, 5, 81, 551, 10, 81, 3, 81, 3, 81, 5, 81, 555, 10, 81, 3, 81, 3, 81, 5, 81, 559, 10, 81, 3, 81, 3, 81, 5, 81, 563, 10, 81, 3, 81, 3, 81, 5, 81, 567, 10, 81, 5, 81, 569, 10, 81, 3, 82, 3, 82, 7, 82, 573, 10, 82, 12, 82, 14, 82, 576, 11, 82, 3, 82, 6, 82, 579, 10, 82, 13, 82, 14, 82, 580, 5, 82, 583, 10, 82, 3, 83, 3, 83, 3, 83, 6, 83, 588, 10, 83, 13, 83, 14, 83, 589, 3, 84, 3, 84, 3, 84, 6, 84, 595, 10, 84, 13, 84, 14, 84, 596, 3, 85, 3, 85, 3, 85, 6, 85, 602, 10, 85, 13, 85, 14, 85, 603, 3, 86, 3, 86, 6, 86, 608, 10, 86, 13, 86, 14, 86, 609, 5, 86, 612, 10, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 7, 94, 638, 10, 94, 12, 94, 14, 94, 641, 11, 94, 3, 95, 3, 95, 7, 95, 645, 10, 95, 12, 95, 14, 95, 648, 11, 95, 3, 95, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 6, 97, 660, 10, 97, 13, 97, 14, 97, 661, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 7, 98, 670, 10, 98, 12, 98, 14, 98, 673, 11, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, 5, 99, 681, 10, 99, 3, 99, 7, 99, 684, 10, 99, 12, 99, 14, 99, 687, 11, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 5, 99, 694, 10, 99, 3, 99, 7, 99, 697, 10, 99, 12, 99, 14, 99, 700, 11, 99, 3, 99, 5, 99, 703, 10, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 7, 100, 710, 10, 100, 12, 100, 14, 100, 713, 11, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 7, 100, 723, 10, 100, 12, 100, 14, 100, 726, 11, 100, 3, 100, 3, 100, 3, 100, 5, 100, 731, 10, 100, 3, 101, 3, 101, 3, 101, 3, 101, 5, 101, 737, 10, 101, 5, 101, 739, 10, 101, 3, 102, 5, 102, 742, 10, 102, 3, 102, 3, 102, 3, 103, 6, 103, 747, 10, 103, 13, 103, 14, 103, 748, 3, 103, 5, 103, 752, 10, 103, 3, 103, 3, 103, 5, 103, 756, 10, 103, 3, 103, 6, 103, 759, 10, 103, 13, 103, 14, 103, 760, 3, 103, 5, 103, 764, 10, 103, 3, 104, 7, 104, 767, 10, 104, 12, 104, 14, 104, 770, 11, 104, 3, 104, 3, 104, 6, 104, 774, 10, 104, 13, 104, 14, 104, 775, 3, 104, 6, 104, 779, 10, 104, 13, 104, 14, 104, 780, 3, 104, 5, 104, 784, 10, 104, 3, 105, 3, 105, 3, 105, 7, 105, 789, 10, 105, 12, 105, 14, 105, 792, 11, 105, 3, 105, 3, 105, 3, 105, 3, 105, 7, 105, 798, 10, 105, 12, 105, 14, 105, 801, 11, 105, 3, 105, 5, 105, 804, 10, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 7, 106, 811, 10, 106, 12, 106, 14, 106, 814, 11, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 7, 106, 824, 10, 106, 12, 106, 14, 106, 827, 11, 106, 3, 106, 3, 106, 3, 106, 5, 106, 832, 10, 106, 3, 107, 3, 107, 5, 107, 836, 10, 107, 3, 108, 5, 108, 839, 10, 108, 3, 109, 5, 109, 842, 10, 109, 3, 110, 5, 110, 845, 10, 110, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 5, 112, 852, 10, 112, 3, 113, 5, 113, 855, 10, 113, 6, 711, 724, 812, 825, 2, 114, 3, 6, 5, 7, 7, 8, 9, 9, 11, 10, 13, 11, 15, 12, 17, 13, 19, 14, 21, 15, 23, 16, 25, 17, 27, 18, 29, 19, 31, 20, 33, 21, 35, 22, 37, 23, 39, 24, 41, 25, 43, 26, 45, 27, 47, 28, 49, 29, 51, 30, 53, 31, 55, 32, 57, 33, 59, 34, 61, 35, 63, 36, 65, 37, 67, 38, 69, 39, 71, 40, 73, 41, 75, 42, 77, 43, 79, 44, 81, 45, 83, 46, 85, 47, 87, 48, 89, 49, 91, 50, 93, 51, 95, 52, 97, 53, 99, 54, 101, 55, 103, 56, 105, 57, 107, 58, 109, 59, 111, 60, 113, 61, 115, 62, 117, 63, 119, 64, 121, 65, 123, 66, 125, 67, 127, 68, 129, 69, 131, 70, 133, 71, 135, 72, 137, 73, 139, 74, 141, 75, 143, 76, 145, 77, 147, 78, 149, 79, 151, 80, 153, 81, 155, 82, 157, 83, 159, 84, 161, 85, 163, 86, 165, 87, 167, 88, 169, 89, 171, 90, 173, 91, 175, 92, 177, 93, 179, 94, 181, 95, 183, 96, 185, 97, 187, 98, 189, 99, 191, 100, 193, 101, 195, 102, 197, 2, 199, 2, 201, 2, 203, 2, 205, 2, 207, 2, 209, 2, 211, 2, 213, 2, 215, 2, 217, 2, 219, 2, 221, 2, 223, 2, 225, 2, 3, 2, 27, 4, 2, 87, 87, 119, 119, 4, 2, 72, 72, 104, 104, 4, 2, 84, 84, 116, 116, 4, 2, 68, 68, 100, 100, 3, 2, 51, 59, 3, 2, 50, 59, 4, 2, 81, 81, 113, 113, 3, 2, 50, 57, 4, 2, 90, 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 51, 4, 2, 76, 76, 108, 108, 4, 2, 11, 11, 34, 34, 4, 2, 12, 12, 14, 15, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 3, 2, 94, 94, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 7, 2, 2, 11, 13, 14, 16, 40, 42, 93, 95, 129, 7, 2, 2, 11, 13, 14, 16, 35, 37, 93, 95, 129, 4, 2, 2, 93, 95, 129, 3, 2, 2, 129, 150, 2, 50, 59, 770, 881, 1157, 1160, 1427, 1467, 1469, 1471, 1473, 1473, 1475, 1476, 1478, 1479, 1481, 1481, 1554, 1559, 1613, 1632, 1634, 1643, 1650, 1650, 1752, 1758, 1761, 1766, 1769, 1770, 1772, 1775, 1778, 1787, 1811, 1811, 1842, 1868, 1960, 1970, 2307, 2309, 2366, 2366, 2368, 2383, 2387, 2390, 2404, 2405, 2408, 2417, 2435, 2437, 2494, 2494, 2496, 2502, 2505, 2506, 2509, 2511, 2521, 2521, 2532, 2533, 2536, 2545, 2563, 2565, 2622, 2622, 2624, 2628, 2633, 2634, 2637, 2639, 2664, 2675, 2691, 2693, 2750, 2750, 2752, 2759, 2761, 2763, 2765, 2767, 2788, 2789, 2792, 2801, 2819, 2821, 2878, 2878, 2880, 2885, 2889, 2890, 2893, 2895, 2904, 2905, 2920, 2929, 2948, 2948, 3008, 3012, 3016, 3018, 3020, 3023, 3033, 3033, 3048, 3057, 3075, 3077, 3136, 3142, 3144, 3146, 3148, 3151, 3159, 3160, 3176, 3185, 3204, 3205, 3262, 3262, 3264, 3270, 3272, 3274, 3276, 3279, 3287, 3288, 3304, 3313, 3332, 3333, 3392, 3397, 3400, 3402, 3404, 3407, 3417, 3417, 3432, 3441, 3460, 3461, 3532, 3532, 3537, 3542, 3544, 3544, 3546, 3553, 3572, 3573, 3635, 3635, 3638, 3644, 3657, 3664, 3666, 3675, 3763, 3763, 3766, 3771, 3773, 3774, 3786, 3791, 3794, 3803, 3866, 3867, 3874, 3883, 3895, 3895, 3897, 3897, 3899, 3899, 3904, 3905, 3955, 3974, 3976, 3977, 3986, 3993, 3995, 4030, 4040, 4040, 4142, 4148, 4152, 4155, 4162, 4171, 4184, 4187, 4961, 4961, 4971, 4979, 5908, 5910, 5940, 5942, 5972, 5973, 6004, 6005, 6072, 6101, 6111, 6111, 6114, 6123, 6157, 6159, 6162, 6171, 6315, 6315, 6434, 6445, 6450, 6461, 6472, 6481, 6578, 6594, 6602, 6603, 6610, 6619, 6681, 6685, 7618, 7621, 8257, 8258, 8278, 8278, 8402, 8414, 8419, 8419, 8423, 8429, 12332, 12337, 12443, 12444, 43012, 43012, 43016, 43016, 43021, 43021, 43045, 43049, 64288, 64288, 65026, 65041, 65058, 65061, 65077, 65078, 65103, 65105, 65298, 65307, 65345, 65345, 297, 2, 67, 92, 97, 97, 99, 124, 172, 172, 183, 183, 188, 188, 194, 216, 218, 248, 250, 579, 594, 707, 712, 723, 738, 742, 752, 752, 892, 892, 904, 904, 906, 908, 910, 910, 912, 931, 933, 976, 978, 1015, 1017, 1155, 1164, 1232, 1234, 1275, 1282, 1297, 1331, 1368, 1371, 1371, 1379, 1417, 1490, 1516, 1522, 1524, 1571, 1596, 1602, 1612, 1648, 1649, 1651, 1749, 1751, 1751, 1767, 1768, 1776, 1777, 1788, 1790, 1793, 1793, 1810, 1810, 1812, 1841, 1871, 1903, 1922, 1959, 1971, 1971, 2310, 2363, 2367, 2367, 2386, 2386, 2394, 2403, 2431, 2431, 2439, 2446, 2449, 2450, 2453, 2474, 2476, 2482, 2484, 2484, 2488, 2491, 2495, 2495, 2512, 2512, 2526, 2527, 2529, 2531, 2546, 2547, 2567, 2572, 2577, 2578, 2581, 2602, 2604, 2610, 2612, 2613, 2615, 2616, 2618, 2619, 2651, 2654, 2656, 2656, 2676, 2678, 2695, 2703, 2705, 2707, 2709, 2730, 2732, 2738, 2740, 2741, 2743, 2747, 2751, 2751, 2770, 2770, 2786, 2787, 2823, 2830, 2833, 2834, 2837, 2858, 2860, 2866, 2868, 2869, 2871, 2875, 2879, 2879, 2910, 2911, 2913, 2915, 2931, 2931, 2949, 2949, 2951, 2956, 2960, 2962, 2964, 2967, 2971, 2972, 2974, 2974, 2976, 2977, 2981, 2982, 2986, 2988, 2992, 3003, 3079, 3086, 3088, 3090, 3092, 3114, 3116, 3125, 3127, 3131, 3170, 3171, 3207, 3214, 3216, 3218, 3220, 3242, 3244, 3253, 3255, 3259, 3263, 3263, 3296, 3296, 3298, 3299, 3335, 3342, 3344, 3346, 3348, 3370, 3372, 3387, 3426, 3427, 3463, 3480, 3484, 3507, 3509, 3517, 3519, 3519, 3522, 3528, 3587, 3634, 3636, 3637, 3650, 3656, 3715, 3716, 3718, 3718, 3721, 3722, 3724, 3724, 3727, 3727, 3734, 3737, 3739, 3745, 3747, 3749, 3751, 3751, 3753, 3753, 3756, 3757, 3759, 3762, 3764, 3765, 3775, 3775, 3778, 3782, 3784, 3784, 3806, 3807, 3842, 3842, 3906, 3913, 3915, 3948, 3978, 3981, 4098, 4131, 4133, 4137, 4139, 4140, 4178, 4183, 4258, 4295, 4306, 4348, 4350, 4350, 4354, 4443, 4449, 4516, 4522, 4603, 4610, 4682, 4684, 4687, 4690, 4696, 4698, 4698, 4700, 4703, 4706, 4746, 4748, 4751, 4754, 4786, 4788, 4791, 4794, 4800, 4802, 4802, 4804, 4807, 4810, 4824, 4826, 4882, 4884, 4887, 4890, 4956, 4994, 5009, 5026, 5110, 5123, 5742, 5745, 5752, 5763, 5788, 5794, 5868, 5872, 5874, 5890, 5902, 5904, 5907, 5922, 5939, 5954, 5971, 5986, 5998, 6000, 6002, 6018, 6069, 6105, 6105, 6110, 6110, 6178, 6265, 6274, 6314, 6402, 6430, 6482, 6511, 6514, 6518, 6530, 6571, 6595, 6601, 6658, 6680, 7426, 7617, 7682, 7837, 7842, 7931, 7938, 7959, 7962, 7967, 7970, 8007, 8010, 8015, 8018, 8025, 8027, 8027, 8029, 8029, 8031, 8031, 8033, 8063, 8066, 8118, 8120, 8126, 8128, 8128, 8132, 8134, 8136, 8142, 8146, 8149, 8152, 8157, 8162, 8174, 8180, 8182, 8184, 8190, 8307, 8307, 8321, 8321, 8338, 8342, 8452, 8452, 8457, 8457, 8460, 8469, 8471, 8471, 8474, 8479, 8486, 8486, 8488, 8488, 8490, 8490, 8492, 8499, 8501, 8507, 8510, 8513, 8519, 8523, 8546, 8581, 11266, 11312, 11314, 11360, 11394, 11494, 11522, 11559, 11570, 11623, 11633, 11633, 11650, 11672, 11682, 11688, 11690, 11696, 11698, 11704, 11706, 11712, 11714, 11720, 11722, 11728, 11730, 11736, 11738, 11744, 12295, 12297, 12323, 12331, 12339, 12343, 12346, 12350, 12355, 12440, 12445, 12449, 12451, 12540, 12542, 12545, 12551, 12590, 12595, 12688, 12706, 12729, 12786, 12801, 13314, 19895, 19970, 40893, 40962, 42126, 43010, 43011, 43013, 43015, 43017, 43020, 43022, 43044, 44034, 55205, 63746, 64047, 64050, 64108, 64114, 64219, 64258, 64264, 64277, 64281, 64287, 64287, 64289, 64298, 64300, 64312, 64314, 64318, 64320, 64320, 64322, 64323, 64325, 64326, 64328, 64435, 64469, 64831, 64850, 64913, 64916, 64969, 65010, 65021, 65138, 65142, 65144, 65278, 65315, 65340, 65347, 65372, 65384, 65472, 65476, 65481, 65484, 65489, 65492, 65497, 65500, 65502, 2, 894, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 3, 227, 3, 2, 2, 2, 5, 231, 3, 2, 2, 2, 7, 238, 3, 2, 2, 2, 9, 244, 3, 2, 2, 2, 11, 249, 3, 2, 2, 2, 13, 256, 3, 2, 2, 2, 15, 265, 3, 2, 2, 2, 17, 268, 3, 2, 2, 2, 19, 275, 3, 2, 2, 2, 21, 282, 3, 2, 2, 2, 23, 285, 3, 2, 2, 2, 25, 290, 3, 2, 2, 2, 27, 295, 3, 2, 2, 2, 29, 301, 3, 2, 2, 2, 31, 305, 3, 2, 2, 2, 33, 308, 3, 2, 2, 2, 35, 312, 3, 2, 2, 2, 37, 317, 3, 2, 2, 2, 39, 325, 3, 2, 2, 2, 41, 330, 3, 2, 2, 2, 43, 337, 3, 2, 2, 2, 45, 344, 3, 2, 2, 2, 47, 347, 3, 2, 2, 2, 49, 351, 3, 2, 2, 2, 51, 355, 3, 2, 2, 2, 53, 358, 3, 2, 2, 2, 55, 364, 3, 2, 2, 2, 57, 370, 3, 2, 2, 2, 59, 374, 3, 2, 2, 2, 61, 379, 3, 2, 2, 2, 63, 388, 3, 2, 2, 2, 65, 394, 3, 2, 2, 2, 67, 400, 3, 2, 2, 2, 69, 406, 3, 2, 2, 2, 71, 412, 3, 2, 2, 2, 73, 417, 3, 2, 2, 2, 75, 422, 3, 2, 2, 2, 77, 428, 3, 2, 2, 2, 79, 430, 3, 2, 2, 2, 81, 434, 3, 2, 2, 2, 83, 436, 3, 2, 2, 2, 85, 438, 3, 2, 2, 2, 87, 440, 3, 2, 2, 2, 89, 442, 3, 2, 2, 2, 91, 444, 3, 2, 2, 2, 93, 447, 3, 2, 2, 2, 95, 449, 3, 2, 2, 2, 97, 451, 3, 2, 2, 2, 99, 453, 3, 2, 2, 2, 101, 455, 3, 2, 2, 2, 103, 458, 3, 2, 2, 2, 105, 461, 3, 2, 2, 2, 107, 463, 3, 2, 2, 2, 109, 465, 3, 2, 2, 2, 111, 467, 3, 2, 2, 2, 113, 469, 3, 2, 2, 2, 115, 472, 3, 2, 2, 2, 117, 474, 3, 2, 2, 2, 119, 476, 3, 2, 2, 2, 121, 478, 3, 2, 2, 2, 123, 481, 3, 2, 2, 2, 125, 484, 3, 2, 2, 2, 127, 487, 3, 2, 2, 2, 129, 490, 3, 2, 2, 2, 131, 493, 3, 2, 2, 2, 133, 495, 3, 2, 2, 2, 135, 498, 3, 2, 2, 2, 137, 501, 3, 2, 2, 2, 139, 504, 3, 2, 2, 2, 141, 507, 3, 2, 2, 2, 143, 510, 3, 2, 2, 2, 145, 513, 3, 2, 2, 2, 147, 516, 3, 2, 2, 2, 149, 519, 3, 2, 2, 2, 151, 522, 3, 2, 2, 2, 153, 525, 3, 2, 2, 2, 155, 529, 3, 2, 2, 2, 157, 533, 3, 2, 2, 2, 159, 537, 3, 2, 2, 2, 161, 568, 3, 2, 2, 2, 163, 582, 3, 2, 2, 2, 165, 584, 3, 2, 2, 2, 167, 591, 3, 2, 2, 2, 169, 598, 3, 2, 2, 2, 171, 611, 3, 2, 2, 2, 173, 615, 3, 2, 2, 2, 175, 617, 3, 2, 2, 2, 177, 620, 3, 2, 2, 2, 179, 623, 3, 2, 2, 2, 181, 626, 3, 2, 2, 2, 183, 629, 3, 2, 2, 2, 185, 632, 3, 2, 2, 2, 187, 635, 3, 2, 2, 2, 189, 642, 3, 2, 2, 2, 191, 653, 3, 2, 2, 2, 193, 659, 3, 2, 2, 2, 195, 667, 3, 2, 2, 2, 197, 702, 3, 2, 2, 2, 199, 730, 3, 2, 2, 2, 201, 738, 3, 2, 2, 2, 203, 741, 3, 2, 2, 2, 205, 763, 3, 2, 2, 2, 207, 783, 3, 2, 2, 2, 209, 803, 3, 2, 2, 2, 211, 831, 3, 2, 2, 2, 213, 835, 3, 2, 2, 2, 215, 838, 3, 2, 2, 2, 217, 841, 3, 2, 2, 2, 219, 844, 3, 2, 2, 2, 221, 846, 3, 2, 2, 2, 223, 851, 3, 2, 2, 2, 225, 854, 3, 2, 2, 2, 227, 228, 7, 102, 2, 2, 228, 229, 7, 103, 2, 2, 229, 230, 7, 104, 2, 2, 230, 4, 3, 2, 2, 2, 231, 232, 7, 116, 2, 2, 232, 233, 7, 103, 2, 2, 233, 234, 7, 118, 2, 2, 234, 235, 7, 119, 2, 2, 235, 236, 7, 116, 2, 2, 236, 237, 7, 112, 2, 2, 237, 6, 3, 2, 2, 2, 238, 239, 7, 116, 2, 2, 239, 240, 7, 99, 2, 2, 240, 241, 7, 107, 2, 2, 241, 242, 7, 117, 2, 2, 242, 243, 7, 103, 2, 2, 243, 8, 3, 2, 2, 2, 244, 245, 7, 104, 2, 2, 245, 246, 7, 116, 2, 2, 246, 247, 7, 113, 2, 2, 247, 248, 7, 111, 2, 2, 248, 10, 3, 2, 2, 2, 249, 250, 7, 107, 2, 2, 250, 251, 7, 111, 2, 2, 251, 252, 7, 114, 2, 2, 252, 253, 7, 113, 2, 2, 253, 254, 7, 116, 2, 2, 254, 255, 7, 118, 2, 2, 255, 12, 3, 2, 2, 2, 256, 257, 7, 112, 2, 2, 257, 258, 7, 113, 2, 2, 258, 259, 7, 112, 2, 2, 259, 260, 7, 110, 2, 2, 260, 261, 7, 113, 2, 2, 261, 262, 7, 101, 2, 2, 262, 263, 7, 99, 2, 2, 263, 264, 7, 110, 2, 2, 264, 14, 3, 2, 2, 2, 265, 266, 7, 99, 2, 2, 266, 267, 7, 117, 2, 2, 267, 16, 3, 2, 2, 2, 268, 269, 7, 105, 2, 2, 269, 270, 7, 110, 2, 2, 270, 271, 7, 113, 2, 2, 271, 272, 7, 100, 2, 2, 272, 273, 7, 99, 2, 2, 273, 274, 7, 110, 2, 2, 274, 18, 3, 2, 2, 2, 275, 276, 7, 99, 2, 2, 276, 277, 7, 117, 2, 2, 277, 278, 7, 117, 2, 2, 278, 279, 7, 103, 2, 2, 279, 280, 7, 116, 2, 2, 280, 281, 7, 118, 2, 2, 281, 20, 3, 2, 2, 2, 282, 283, 7, 107, 2, 2, 283, 284, 7, 104, 2, 2, 284, 22, 3, 2, 2, 2, 285, 286, 7, 103, 2, 2, 286, 287, 7, 110, 2, 2, 287, 288, 7, 107, 2, 2, 288, 289, 7, 104, 2, 2, 289, 24, 3, 2, 2, 2, 290, 291, 7, 103, 2, 2, 291, 292, 7, 110, 2, 2, 292, 293, 7, 117, 2, 2, 293, 294, 7, 103, 2, 2, 294, 26, 3, 2, 2, 2, 295, 296, 7, 121, 2, 2, 296, 297, 7, 106, 2, 2, 297, 298, 7, 107, 2, 2, 298, 299, 7, 110, 2, 2, 299, 300, 7, 103, 2, 2, 300, 28, 3, 2, 2, 2, 301, 302, 7, 104, 2, 2, 302, 303, 7, 113, 2, 2, 303, 304, 7, 116, 2, 2, 304, 30, 3, 2, 2, 2, 305, 306, 7, 107, 2, 2, 306, 307, 7, 112, 2, 2, 307, 32, 3, 2, 2, 2, 308, 309, 7, 118, 2, 2, 309, 310, 7, 116, 2, 2, 310, 311, 7, 123, 2, 2, 311, 34, 3, 2, 2, 2, 312, 313, 7, 80, 2, 2, 313, 314, 7, 113, 2, 2, 314, 315, 7, 112, 2, 2, 315, 316, 7, 103, 2, 2, 316, 36, 3, 2, 2, 2, 317, 318, 7, 104, 2, 2, 318, 319, 7, 107, 2, 2, 319, 320, 7, 112, 2, 2, 320, 321, 7, 99, 2, 2, 321, 322, 7, 110, 2, 2, 322, 323, 7, 110, 2, 2, 323, 324, 7, 123, 2, 2, 324, 38, 3, 2, 2, 2, 325, 326, 7, 121, 2, 2, 326, 327, 7, 107, 2, 2, 327, 328, 7, 118, 2, 2, 328, 329, 7, 106, 2, 2, 329, 40, 3, 2, 2, 2, 330, 331, 7, 103, 2, 2, 331, 332, 7, 122, 2, 2, 332, 333, 7, 101, 2, 2, 333, 334, 7, 103, 2, 2, 334, 335, 7, 114, 2, 2, 335, 336, 7, 118, 2, 2, 336, 42, 3, 2, 2, 2, 337, 338, 7, 110, 2, 2, 338, 339, 7, 99, 2, 2, 339, 340, 7, 111, 2, 2, 340, 341, 7, 100, 2, 2, 341, 342, 7, 102, 2, 2, 342, 343, 7, 99, 2, 2, 343, 44, 3, 2, 2, 2, 344, 345, 7, 113, 2, 2, 345, 346, 7, 116, 2, 2, 346, 46, 3, 2, 2, 2, 347, 348, 7, 99, 2, 2, 348, 349, 7, 112, 2, 2, 349, 350, 7, 102, 2, 2, 350, 48, 3, 2, 2, 2, 351, 352, 7, 112, 2, 2, 352, 353, 7, 113, 2, 2, 353, 354, 7, 118, 2, 2, 354, 50, 3, 2, 2, 2, 355, 356, 7, 107, 2, 2, 356, 357, 7, 117, 2, 2, 357, 52, 3, 2, 2, 2, 358, 359, 7, 101, 2, 2, 359, 360, 7, 110, 2, 2, 360, 361, 7, 99, 2, 2, 361, 362, 7, 117, 2, 2, 362, 363, 7, 117, 2, 2, 363, 54, 3, 2, 2, 2, 364, 365, 7, 123, 2, 2, 365, 366, 7, 107, 2, 2, 366, 367, 7, 103, 2, 2, 367, 368, 7, 110, 2, 2, 368, 369, 7, 102, 2, 2, 369, 56, 3, 2, 2, 2, 370, 371, 7, 102, 2, 2, 371, 372, 7, 103, 2, 2, 372, 373, 7, 110, 2, 2, 373, 58, 3, 2, 2, 2, 374, 375, 7, 114, 2, 2, 375, 376, 7, 99, 2, 2, 376, 377, 7, 117, 2, 2, 377, 378, 7, 117, 2, 2, 378, 60, 3, 2, 2, 2, 379, 380, 7, 101, 2, 2, 380, 381, 7, 113, 2, 2, 381, 382, 7, 112, 2, 2, 382, 383, 7, 118, 2, 2, 383, 384, 7, 107, 2, 2, 384, 385, 7, 112, 2, 2, 385, 386, 7, 119, 2, 2, 386, 387, 7, 103, 2, 2, 387, 62, 3, 2, 2, 2, 388, 389, 7, 100, 2, 2, 389, 390, 7, 116, 2, 2, 390, 391, 7, 103, 2, 2, 391, 392, 7, 99, 2, 2, 392, 393, 7, 109, 2, 2, 393, 64, 3, 2, 2, 2, 394, 395, 7, 99, 2, 2, 395, 396, 7, 117, 2, 2, 396, 397, 7, 123, 2, 2, 397, 398, 7, 112, 2, 2, 398, 399, 7, 101, 2, 2, 399, 66, 3, 2, 2, 2, 400, 401, 7, 99, 2, 2, 401, 402, 7, 121, 2, 2, 402, 403, 7, 99, 2, 2, 403, 404, 7, 107, 2, 2, 404, 405, 7, 118, 2, 2, 405, 68, 3, 2, 2, 2, 406, 407, 7, 114, 2, 2, 407, 408, 7, 116, 2, 2, 408, 409, 7, 107, 2, 2, 409, 410, 7, 112, 2, 2, 410, 411, 7, 118, 2, 2, 411, 70, 3, 2, 2, 2, 412, 413, 7, 103, 2, 2, 413, 414, 7, 122, 2, 2, 414, 415, 7, 103, 2, 2, 415, 416, 7, 101, 2, 2, 416, 72, 3, 2, 2, 2, 417, 418, 7, 86, 2, 2, 418, 419, 7, 116, 2, 2, 419, 420, 7, 119, 2, 2, 420, 421, 7, 103, 2, 2, 421, 74, 3, 2, 2, 2, 422, 423, 7, 72, 2, 2, 423, 424, 7, 99, 2, 2, 424, 425, 7, 110, 2, 2, 425, 426, 7, 117, 2, 2, 426, 427, 7, 103, 2, 2, 427, 76, 3, 2, 2, 2, 428, 429, 7, 48, 2, 2, 429, 78, 3, 2, 2, 2, 430, 431, 7, 48, 2, 2, 431, 432, 7, 48, 2, 2, 432, 433, 7, 48, 2, 2, 433, 80, 3, 2, 2, 2, 434, 435, 7, 98, 2, 2, 435, 82, 3, 2, 2, 2, 436, 437, 7, 44, 2, 2, 437, 84, 3, 2, 2, 2, 438, 439, 7, 46, 2, 2, 439, 86, 3, 2, 2, 2, 440, 441, 7, 60, 2, 2, 441, 88, 3, 2, 2, 2, 442, 443, 7, 61, 2, 2, 443, 90, 3, 2, 2, 2, 444, 445, 7, 44, 2, 2, 445, 446, 7, 44, 2, 2, 446, 92, 3, 2, 2, 2, 447, 448, 7, 63, 2, 2, 448, 94, 3, 2, 2, 2, 449, 450, 7, 126, 2, 2, 450, 96, 3, 2, 2, 2, 451, 452, 7, 96, 2, 2, 452, 98, 3, 2, 2, 2, 453, 454, 7, 40, 2, 2, 454, 100, 3, 2, 2, 2, 455, 456, 7, 62, 2, 2, 456, 457, 7, 62, 2, 2, 457, 102, 3, 2, 2, 2, 458, 459, 7, 64, 2, 2, 459, 460, 7, 64, 2, 2, 460, 104, 3, 2, 2, 2, 461, 462, 7, 45, 2, 2, 462, 106, 3, 2, 2, 2, 463, 464, 7, 47, 2, 2, 464, 108, 3, 2, 2, 2, 465, 466, 7, 49, 2, 2, 466, 110, 3, 2, 2, 2, 467, 468, 7, 39, 2, 2, 468, 112, 3, 2, 2, 2, 469, 470, 7, 49, 2, 2, 470, 471, 7, 49, 2, 2, 471, 114, 3, 2, 2, 2, 472, 473, 7, 128, 2, 2, 473, 116, 3, 2, 2, 2, 474, 475, 7, 62, 2, 2, 475, 118, 3, 2, 2, 2, 476, 477, 7, 64, 2, 2, 477, 120, 3, 2, 2, 2, 478, 479, 7, 63, 2, 2, 479, 480, 7, 63, 2, 2, 480, 122, 3, 2, 2, 2, 481, 482, 7, 64, 2, 2, 482, 483, 7, 63, 2, 2, 483, 124, 3, 2, 2, 2, 484, 485, 7, 62, 2, 2, 485, 486, 7, 63, 2, 2, 486, 126, 3, 2, 2, 2, 487, 488, 7, 62, 2, 2, 488, 489, 7, 64, 2, 2, 489, 128, 3, 2, 2, 2, 490, 491, 7, 35, 2, 2, 491, 492, 7, 63, 2, 2, 492, 130, 3, 2, 2, 2, 493, 494, 7, 66, 2, 2, 494, 132, 3, 2, 2, 2, 495, 496, 7, 47, 2, 2, 496, 497, 7, 64, 2, 2, 497, 134, 3, 2, 2, 2, 498, 499, 7, 45, 2, 2, 499, 500, 7, 63, 2, 2, 500, 136, 3, 2, 2, 2, 501, 502, 7, 47, 2, 2, 502, 503, 7, 63, 2, 2, 503, 138, 3, 2, 2, 2, 504, 505, 7, 44, 2, 2, 505, 506, 7, 63, 2, 2, 506, 140, 3, 2, 2, 2, 507, 508, 7, 66, 2, 2, 508, 509, 7, 63, 2, 2, 509, 142, 3, 2, 2, 2, 510, 511, 7, 49, 2, 2, 511, 512, 7, 63, 2, 2, 512, 144, 3, 2, 2, 2, 513, 514, 7, 39, 2, 2, 514, 515, 7, 63, 2, 2, 515, 146, 3, 2, 2, 2, 516, 517, 7, 40, 2, 2, 517, 518, 7, 63, 2, 2, 518, 148, 3, 2, 2, 2, 519, 520, 7, 126, 2, 2, 520, 521, 7, 63, 2, 2, 521, 150, 3, 2, 2, 2, 522, 523, 7, 96, 2, 2, 523, 524, 7, 63, 2, 2, 524, 152, 3, 2, 2, 2, 525, 526, 7, 62, 2, 2, 526, 527, 7, 62, 2, 2, 527, 528, 7, 63, 2, 2, 528, 154, 3, 2, 2, 2, 529, 530, 7, 64, 2, 2, 530, 531, 7, 64, 2, 2, 531, 532, 7, 63, 2, 2, 532, 156, 3, 2, 2, 2, 533, 534, 7, 44, 2, 2, 534, 535, 7, 44, 2, 2, 535, 536, 7, 63, 2, 2, 536, 158, 3, 2, 2, 2, 537, 538, 7, 49, 2, 2, 538, 539, 7, 49, 2, 2, 539, 540, 7, 63, 2, 2, 540, 160, 3, 2, 2, 2, 541, 551, 9, 2, 2, 2, 542, 544, 9, 3, 2, 2, 543, 545, 9, 4, 2, 2, 544, 543, 3, 2, 2, 2, 544, 545, 3, 2, 2, 2, 545, 551, 3, 2, 2, 2, 546, 548, 9, 4, 2, 2, 547, 549, 9, 3, 2, 2, 548, 547, 3, 2, 2, 2, 548, 549, 3, 2, 2, 2, 549, 551, 3, 2, 2, 2, 550, 541, 3, 2, 2, 2, 550, 542, 3, 2, 2, 2, 550, 546, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 554, 3, 2, 2, 2, 552, 555, 5, 197, 99, 2, 553, 555, 5, 199, 100, 2, 554, 552, 3, 2, 2, 2, 554, 553, 3, 2, 2, 2, 555, 569, 3, 2, 2, 2, 556, 558, 9, 5, 2, 2, 557, 559, 9, 4, 2, 2, 558, 557, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 563, 3, 2, 2, 2, 560, 561, 9, 4, 2, 2, 561, 563, 9, 5, 2, 2, 562, 556, 3, 2, 2, 2, 562, 560, 3, 2, 2, 2, 563, 566, 3, 2, 2, 2, 564, 567, 5, 209, 105, 2, 565, 567, 5, 211, 106, 2, 566, 564, 3, 2, 2, 2, 566, 565, 3, 2, 2, 2, 567, 569, 3, 2, 2, 2, 568, 550, 3, 2, 2, 2, 568, 562, 3, 2, 2, 2, 569, 162, 3, 2, 2, 2, 570, 574, 9, 6, 2, 2, 571, 573, 9, 7, 2, 2, 572, 571, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 583, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 577, 579, 7, 50, 2, 2, 578, 577, 3, 2, 2, 2, 579, 580, 3, 2, 2, 2, 580, 578, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 583, 3, 2, 2, 2, 582, 570, 3, 2, 2, 2, 582, 578, 3, 2, 2, 2, 583, 164, 3, 2, 2, 2, 584, 585, 7, 50, 2, 2, 585, 587, 9, 8, 2, 2, 586, 588, 9, 9, 2, 2, 587, 586, 3, 2, 2, 2, 588, 589, 3, 2, 2, 2, 589, 587, 3, 2, 2, 2, 589, 590, 3, 2, 2, 2, 590, 166, 3, 2, 2, 2, 591, 592, 7, 50, 2, 2, 592, 594, 9, 10, 2, 2, 593, 595, 9, 11, 2, 2, 594, 593, 3, 2, 2, 2, 595, 596, 3, 2, 2, 2, 596, 594, 3, 2, 2, 2, 596, 597, 3, 2, 2, 2, 597, 168, 3, 2, 2, 2, 598, 599, 7, 50, 2, 2, 599, 601, 9, 5, 2, 2, 600, 602, 9, 12, 2, 2, 601, 600, 3, 2, 2, 2, 602, 603, 3, 2, 2, 2, 603, 601, 3, 2, 2, 2, 603, 604, 3, 2, 2, 2, 604, 170, 3, 2, 2, 2, 605, 612, 5, 205, 103, 2, 606, 608, 9, 7, 2, 2, 607, 606, 3, 2, 2, 2, 608, 609, 3, 2, 2, 2, 609, 607, 3, 2, 2, 2, 609, 610, 3, 2, 2, 2, 610, 612, 3, 2, 2, 2, 611, 605, 3, 2, 2, 2, 611, 607, 3, 2, 2, 2, 612, 613, 3, 2, 2, 2, 613, 614, 9, 13, 2, 2, 614, 172, 3, 2, 2, 2, 615, 616, 5, 205, 103, 2, 616, 174, 3, 2, 2, 2, 617, 618, 7, 42, 2, 2, 618, 619, 8, 88, 2, 2, 619, 176, 3, 2, 2, 2, 620, 621, 7, 43, 2, 2, 621, 622, 8, 89, 3, 2, 622, 178, 3, 2, 2, 2, 623, 624, 7, 125, 2, 2, 624, 625, 8, 90, 4, 2, 625, 180, 3, 2, 2, 2, 626, 627, 7, 127, 2, 2, 627, 628, 8, 91, 5, 2, 628, 182, 3, 2, 2, 2, 629, 630, 7, 93, 2, 2, 630, 631, 8, 92, 6, 2, 631, 184, 3, 2, 2, 2, 632, 633, 7, 95, 2, 2, 633, 634, 8, 93, 7, 2, 634, 186, 3, 2, 2, 2, 635, 639, 5, 225, 113, 2, 636, 638, 5, 223, 112, 2, 637, 636, 3, 2, 2, 2, 638, 641, 3, 2, 2, 2, 639, 637, 3, 2, 2, 2, 639, 640, 3, 2, 2, 2, 640, 188, 3, 2, 2, 2, 641, 639, 3, 2, 2, 2, 642, 646, 7, 94, 2, 2, 643, 645, 9, 14, 2, 2, 644, 643, 3, 2, 2, 2, 645, 648, 3, 2, 2, 2, 646, 644, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 649, 3, 2, 2, 2, 648, 646, 3, 2, 2, 2, 649, 650, 5, 203, 102, 2, 650, 651, 3, 2, 2, 2, 651, 652, 8, 95, 8, 2, 652, 190, 3, 2, 2, 2, 653, 654, 5, 203, 102, 2, 654, 655, 8, 96, 9, 2, 655, 656, 3, 2, 2, 2, 656, 657, 8, 96, 8, 2, 657, 192, 3, 2, 2, 2, 658, 660, 9, 14, 2, 2, 659, 658, 3, 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 659, 3, 2, 2, 2, 661, 662, 3, 2, 2, 2, 662, 663, 3, 2, 2, 2, 663, 664, 8, 97, 10, 2, 664, 665, 3, 2, 2, 2, 665, 666, 8, 97, 8, 2, 666, 194, 3, 2, 2, 2, 667, 671, 7, 37, 2, 2, 668, 670, 10, 15, 2, 2, 669, 668, 3, 2, 2, 2, 670, 673, 3, 2, 2, 2, 671, 669, 3, 2, 2, 2, 671, 672, 3, 2, 2, 2, 672, 674, 3, 2, 2, 2, 673, 671, 3, 2, 2, 2, 674, 675, 8, 98, 8, 2, 675, 196, 3, 2, 2, 2, 676, 685, 7, 41, 2, 2, 677, 680, 7, 94, 2, 2, 678, 681, 5, 203, 102, 2, 679, 681, 11, 2, 2, 2, 680, 678, 3, 2, 2, 2, 680, 679, 3, 2, 2, 2, 681, 684, 3, 2, 2, 2, 682, 684, 10, 16, 2, 2, 683, 677, 3, 2, 2, 2, 683, 682, 3, 2, 2, 2, 684, 687, 3, 2, 2, 2, 685, 683, 3, 2, 2, 2, 685, 686, 3, 2, 2, 2, 686, 688, 3, 2, 2, 2, 687, 685, 3, 2, 2, 2, 688, 703, 7, 41, 2, 2, 689, 698, 7, 36, 2, 2, 690, 693, 7, 94, 2, 2, 691, 694, 5, 203, 102, 2, 692, 694, 11, 2, 2, 2, 693, 691, 3, 2, 2, 2, 693, 692, 3, 2, 2, 2, 694, 697, 3, 2, 2, 2, 695, 697, 10, 17, 2, 2, 696, 690, 3, 2, 2, 2, 696, 695, 3, 2, 2, 2, 697, 700, 3, 2, 2, 2, 698, 696, 3, 2, 2, 2, 698, 699, 3, 2, 2, 2, 699, 701, 3, 2, 2, 2, 700, 698, 3, 2, 2, 2, 701, 703, 7, 36, 2, 2, 702, 676, 3, 2, 2, 2, 702, 689, 3, 2, 2, 2, 703, 198, 3, 2, 2, 2, 704, 705, 7, 41, 2, 2, 705, 706, 7, 41, 2, 2, 706, 707, 7, 41, 2, 2, 707, 711, 3, 2, 2, 2, 708, 710, 5, 201, 101, 2, 709, 708, 3, 2, 2, 2, 710, 713, 3, 2, 2, 2, 711, 712, 3, 2, 2, 2, 711, 709, 3, 2, 2, 2, 712, 714, 3, 2, 2, 2, 713, 711, 3, 2, 2, 2, 714, 715, 7, 41, 2, 2, 715, 716, 7, 41, 2, 2, 716, 731, 7, 41, 2, 2, 717, 718, 7, 36, 2, 2, 718, 719, 7, 36, 2, 2, 719, 720, 7, 36, 2, 2, 720, 724, 3, 2, 2, 2, 721, 723, 5, 201, 101, 2, 722, 721, 3, 2, 2, 2, 723, 726, 3, 2, 2, 2, 724, 725, 3, 2, 2, 2, 724, 722, 3, 2, 2, 2, 725, 727, 3, 2, 2, 2, 726, 724, 3, 2, 2, 2, 727, 728, 7, 36, 2, 2, 728, 729, 7, 36, 2, 2, 729, 731, 7, 36, 2, 2, 730, 704, 3, 2, 2, 2, 730, 717, 3, 2, 2, 2, 731, 200, 3, 2, 2, 2, 732, 739, 10, 18, 2, 2, 733, 736, 7, 94, 2, 2, 734, 737, 5, 203, 102, 2, 735, 737, 11, 2, 2, 2, 736, 734, 3, 2, 2, 2, 736, 735, 3, 2, 2, 2, 737, 739, 3, 2, 2, 2, 738, 732, 3, 2, 2, 2, 738, 733, 3, 2, 2, 2, 739, 202, 3, 2, 2, 2, 740, 742, 7, 15, 2, 2, 741, 740, 3, 2, 2, 2, 741, 742, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 744, 7, 12, 2, 2, 744, 204, 3, 2, 2, 2, 745, 747, 9, 7, 2, 2, 746, 745, 3, 2, 2, 2, 747, 748, 3, 2, 2, 2, 748, 746, 3, 2, 2, 2, 748, 749, 3, 2, 2, 2, 749, 752, 3, 2, 2, 2, 750, 752, 5, 207, 104, 2, 751, 746, 3, 2, 2, 2, 751, 750, 3, 2, 2, 2, 752, 753, 3, 2, 2, 2, 753, 755, 9, 19, 2, 2, 754, 756, 9, 20, 2, 2, 755, 754, 3, 2, 2, 2, 755, 756, 3, 2, 2, 2, 756, 758, 3, 2, 2, 2, 757, 759, 9, 7, 2, 2, 758, 757, 3, 2, 2, 2, 759, 760, 3, 2, 2, 2, 760, 758, 3, 2, 2, 2, 760, 761, 3, 2, 2, 2, 761, 764, 3, 2, 2, 2, 762, 764, 5, 207, 104, 2, 763, 751, 3, 2, 2, 2, 763, 762, 3, 2, 2, 2, 764, 206, 3, 2, 2, 2, 765, 767, 9, 7, 2, 2, 766, 765, 3, 2, 2, 2, 767, 770, 3, 2, 2, 2, 768, 766, 3, 2, 2, 2, 768, 769, 3, 2, 2, 2, 769, 771, 3, 2, 2, 2, 770, 768, 3, 2, 2, 2, 771, 773, 7, 48, 2, 2, 772, 774, 9, 7, 2, 2, 773, 772, 3, 2, 2, 2, 774, 775, 3, 2, 2, 2, 775, 773, 3, 2, 2, 2, 775, 776, 3, 2, 2, 2, 776, 784, 3, 2, 2, 2, 777, 779, 9, 7, 2, 2, 778, 777, 3, 2, 2, 2, 779, 780, 3, 2, 2, 2, 780, 778, 3, 2, 2, 2, 780, 781, 3, 2, 2, 2, 781, 782, 3, 2, 2, 2, 782, 784, 7, 48, 2, 2, 783, 768, 3, 2, 2, 2, 783, 778, 3, 2, 2, 2, 784, 208, 3, 2, 2, 2, 785, 790, 7, 41, 2, 2, 786, 789, 5, 215, 108, 2, 787, 789, 5, 221, 111, 2, 788, 786, 3, 2, 2, 2, 788, 787, 3, 2, 2, 2, 789, 792, 3, 2, 2, 2, 790, 788, 3, 2, 2, 2, 790, 791, 3, 2, 2, 2, 791, 793, 3, 2, 2, 2, 792, 790, 3, 2, 2, 2, 793, 804, 7, 41, 2, 2, 794, 799, 7, 36, 2, 2, 795, 798, 5, 217, 109, 2, 796, 798, 5, 221, 111, 2, 797, 795, 3, 2, 2, 2, 797, 796, 3, 2, 2, 2, 798, 801, 3, 2, 2, 2, 799, 797, 3, 2, 2, 2, 799, 800, 3, 2, 2, 2, 800, 802, 3, 2, 2, 2, 801, 799, 3, 2, 2, 2, 802, 804, 7, 36, 2, 2, 803, 785, 3, 2, 2, 2, 803, 794, 3, 2, 2, 2, 804, 210, 3, 2, 2, 2, 805, 806, 7, 41, 2, 2, 806, 807, 7, 41, 2, 2, 807, 808, 7, 41, 2, 2, 808, 812, 3, 2, 2, 2, 809, 811, 5, 213, 107, 2, 810, 809, 3, 2, 2, 2, 811, 814, 3, 2, 2, 2, 812, 813, 3, 2, 2, 2, 812, 810, 3, 2, 2, 2, 813, 815, 3, 2, 2, 2, 814, 812, 3, 2, 2, 2, 815, 816, 7, 41, 2, 2, 816, 817, 7, 41, 2, 2, 817, 832, 7, 41, 2, 2, 818, 819, 7, 36, 2, 2, 819, 820, 7, 36, 2, 2, 820, 821, 7, 36, 2, 2, 821, 825, 3, 2, 2, 2, 822, 824, 5, 213, 107, 2, 823, 822, 3, 2, 2, 2, 824, 827, 3, 2, 2, 2, 825, 826, 3, 2, 2, 2, 825, 823, 3, 2, 2, 2, 826, 828, 3, 2, 2, 2, 827, 825, 3, 2, 2, 2, 828, 829, 7, 36, 2, 2, 829, 830, 7, 36, 2, 2, 830, 832, 7, 36, 2, 2, 831, 805, 3, 2, 2, 2, 831, 818, 3, 2, 2, 2, 832, 212, 3, 2, 2, 2, 833, 836, 5, 219, 110, 2, 834, 836, 5, 221, 111, 2, 835, 833, 3, 2, 2, 2, 835, 834, 3, 2, 2, 2, 836, 214, 3, 2, 2, 2, 837, 839, 9, 21, 2, 2, 838, 837, 3, 2, 2, 2, 839, 216, 3, 2, 2, 2, 840, 842, 9, 22, 2, 2, 841, 840, 3, 2, 2, 2, 842, 218, 3, 2, 2, 2, 843, 845, 9, 23, 2, 2, 844, 843, 3, 2, 2, 2, 845, 220, 3, 2, 2, 2, 846, 847, 7, 94, 2, 2, 847, 848, 9, 24, 2, 2, 848, 222, 3, 2, 2, 2, 849, 852, 5, 225, 113, 2, 850, 852, 9, 25, 2, 2, 851, 849, 3, 2, 2, 2, 851, 850, 3, 2, 2, 2, 852, 224, 3, 2, 2, 2, 853, 855, 9, 26, 2, 2, 854, 853, 3, 2, 2, 2, 855, 226, 3, 2, 2, 2, 59, 2, 544, 548, 550, 554, 558, 562, 566, 568, 574, 580, 582, 589, 596, 603, 609, 611, 639, 646, 661, 671, 680, 683, 685, 693, 696, 698, 702, 711, 724, 730, 736, 738, 741, 748, 751, 755, 760, 763, 768, 775, 780, 783, 788, 790, 797, 799, 803, 812, 825, 831, 835, 838, 841, 844, 851, 854, 11, 3, 88, 2, 3, 89, 3, 3, 90, 4, 3, 91, 5, 3, 92, 6, 3, 93, 7, 2, 3, 2, 3, 96, 8, 3, 97, 9] \ No newline at end of file diff --git a/languages/python/PythonLexer.tokens b/languages/python/PythonLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..1282117c8ef2e08acdfa44e74aad5fe6a8549244 --- /dev/null +++ b/languages/python/PythonLexer.tokens @@ -0,0 +1,185 @@ +INDENT=1 +DEDENT=2 +LINE_BREAK=3 +DEF=4 +RETURN=5 +RAISE=6 +FROM=7 +IMPORT=8 +NONLOCAL=9 +AS=10 +GLOBAL=11 +ASSERT=12 +IF=13 +ELIF=14 +ELSE=15 +WHILE=16 +FOR=17 +IN=18 +TRY=19 +NONE=20 +FINALLY=21 +WITH=22 +EXCEPT=23 +LAMBDA=24 +OR=25 +AND=26 +NOT=27 +IS=28 +CLASS=29 +YIELD=30 +DEL=31 +PASS=32 +CONTINUE=33 +BREAK=34 +ASYNC=35 +AWAIT=36 +PRINT=37 +EXEC=38 +TRUE=39 +FALSE=40 +DOT=41 +ELLIPSIS=42 +REVERSE_QUOTE=43 +STAR=44 +COMMA=45 +COLON=46 +SEMI_COLON=47 +POWER=48 +ASSIGN=49 +OR_OP=50 +XOR=51 +AND_OP=52 +LEFT_SHIFT=53 +RIGHT_SHIFT=54 +ADD=55 +MINUS=56 +DIV=57 +MOD=58 +IDIV=59 +NOT_OP=60 +LESS_THAN=61 +GREATER_THAN=62 +EQUALS=63 +GT_EQ=64 +LT_EQ=65 +NOT_EQ_1=66 +NOT_EQ_2=67 +AT=68 +ARROW=69 +ADD_ASSIGN=70 +SUB_ASSIGN=71 +MULT_ASSIGN=72 +AT_ASSIGN=73 +DIV_ASSIGN=74 +MOD_ASSIGN=75 +AND_ASSIGN=76 +OR_ASSIGN=77 +XOR_ASSIGN=78 +LEFT_SHIFT_ASSIGN=79 +RIGHT_SHIFT_ASSIGN=80 +POWER_ASSIGN=81 +IDIV_ASSIGN=82 +STRING=83 +DECIMAL_INTEGER=84 +OCT_INTEGER=85 +HEX_INTEGER=86 +BIN_INTEGER=87 +IMAG_NUMBER=88 +FLOAT_NUMBER=89 +OPEN_PAREN=90 +CLOSE_PAREN=91 +OPEN_BRACE=92 +CLOSE_BRACE=93 +OPEN_BRACKET=94 +CLOSE_BRACKET=95 +NAME=96 +LINE_JOIN=97 +NEWLINE=98 +WS=99 +COMMENT=100 +'def'=4 +'return'=5 +'raise'=6 +'from'=7 +'import'=8 +'nonlocal'=9 +'as'=10 +'global'=11 +'assert'=12 +'if'=13 +'elif'=14 +'else'=15 +'while'=16 +'for'=17 +'in'=18 +'try'=19 +'None'=20 +'finally'=21 +'with'=22 +'except'=23 +'lambda'=24 +'or'=25 +'and'=26 +'not'=27 +'is'=28 +'class'=29 +'yield'=30 +'del'=31 +'pass'=32 +'continue'=33 +'break'=34 +'async'=35 +'await'=36 +'print'=37 +'exec'=38 +'True'=39 +'False'=40 +'.'=41 +'...'=42 +'`'=43 +'*'=44 +','=45 +':'=46 +';'=47 +'**'=48 +'='=49 +'|'=50 +'^'=51 +'&'=52 +'<<'=53 +'>>'=54 +'+'=55 +'-'=56 +'/'=57 +'%'=58 +'//'=59 +'~'=60 +'<'=61 +'>'=62 +'=='=63 +'>='=64 +'<='=65 +'<>'=66 +'!='=67 +'@'=68 +'->'=69 +'+='=70 +'-='=71 +'*='=72 +'@='=73 +'/='=74 +'%='=75 +'&='=76 +'|='=77 +'^='=78 +'<<='=79 +'>>='=80 +'**='=81 +'//='=82 +'('=90 +')'=91 +'{'=92 +'}'=93 +'['=94 +']'=95 diff --git a/languages/python/PythonParser.interp b/languages/python/PythonParser.interp new file mode 100644 index 0000000000000000000000000000000000000000..470e64a7238a747e083c84285a5630d758f06ea4 --- /dev/null +++ b/languages/python/PythonParser.interp @@ -0,0 +1,272 @@ +token literal names: +null +null +null +null +'def' +'return' +'raise' +'from' +'import' +'nonlocal' +'as' +'global' +'assert' +'if' +'elif' +'else' +'while' +'for' +'in' +'try' +'None' +'finally' +'with' +'except' +'lambda' +'or' +'and' +'not' +'is' +'class' +'yield' +'del' +'pass' +'continue' +'break' +'async' +'await' +'print' +'exec' +'True' +'False' +'.' +'...' +'`' +'*' +',' +':' +';' +'**' +'=' +'|' +'^' +'&' +'<<' +'>>' +'+' +'-' +'/' +'%' +'//' +'~' +'<' +'>' +'==' +'>=' +'<=' +'<>' +'!=' +'@' +'->' +'+=' +'-=' +'*=' +'@=' +'/=' +'%=' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'**=' +'//=' +null +null +null +null +null +null +null +'(' +')' +'{' +'}' +'[' +']' +null +null +null +null +null + +token symbolic names: +null +INDENT +DEDENT +LINE_BREAK +DEF +RETURN +RAISE +FROM +IMPORT +NONLOCAL +AS +GLOBAL +ASSERT +IF +ELIF +ELSE +WHILE +FOR +IN +TRY +NONE +FINALLY +WITH +EXCEPT +LAMBDA +OR +AND +NOT +IS +CLASS +YIELD +DEL +PASS +CONTINUE +BREAK +ASYNC +AWAIT +PRINT +EXEC +TRUE +FALSE +DOT +ELLIPSIS +REVERSE_QUOTE +STAR +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +STRING +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +IMAG_NUMBER +FLOAT_NUMBER +OPEN_PAREN +CLOSE_PAREN +OPEN_BRACE +CLOSE_BRACE +OPEN_BRACKET +CLOSE_BRACKET +NAME +LINE_JOIN +NEWLINE +WS +COMMENT + +rule names: +root +single_input +file_input +eval_input +stmt +compound_stmt +suite +decorator +elif_clause +else_clause +finally_clause +with_item +except_clause +classdef +funcdef +typedargslist +args +kwargs +def_parameters +def_parameter +named_parameter +simple_stmt +small_stmt +from_stmt_source +from_stmt_as_names +testlist_star_expr +star_expr +assign_part +exprlist +import_as_names +import_as_name +dotted_as_names +dotted_as_name +test +varargslist +vardef_parameters +vardef_parameter +varargs +varkwargs +logical_test +comparison +expr +atom +dictorsetmaker +testlist_comp +testlist +dotted_name +name +number +integer +yield_expr +yield_arg +trailer +arguments +arglist +argument +subscriptlist +subscript +sliceop +comp_for +comp_iter + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 102, 979, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 3, 2, 3, 2, 3, 2, 5, 2, 128, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 137, 10, 3, 3, 4, 3, 4, 6, 4, 141, 10, 4, 13, 4, 14, 4, 142, 3, 5, 3, 5, 7, 5, 147, 10, 5, 12, 5, 14, 5, 150, 11, 5, 3, 6, 3, 6, 5, 6, 154, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 161, 10, 7, 12, 7, 14, 7, 164, 11, 7, 3, 7, 5, 7, 167, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 174, 10, 7, 3, 7, 5, 7, 177, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 186, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 6, 7, 192, 10, 7, 13, 7, 14, 7, 193, 3, 7, 5, 7, 197, 10, 7, 3, 7, 5, 7, 200, 10, 7, 3, 7, 5, 7, 203, 10, 7, 3, 7, 5, 7, 206, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 212, 10, 7, 12, 7, 14, 7, 215, 11, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 221, 10, 7, 12, 7, 14, 7, 224, 11, 7, 3, 7, 3, 7, 5, 7, 228, 10, 7, 5, 7, 230, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 6, 8, 236, 10, 8, 13, 8, 14, 8, 237, 3, 8, 3, 8, 5, 8, 242, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 248, 10, 9, 3, 9, 5, 9, 251, 10, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 5, 13, 271, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 285, 10, 14, 5, 14, 287, 10, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 296, 10, 15, 3, 15, 5, 15, 299, 10, 15, 3, 15, 3, 15, 3, 15, 3, 16, 5, 16, 305, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 311, 10, 16, 3, 16, 3, 16, 3, 16, 5, 16, 316, 10, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 5, 17, 324, 10, 17, 3, 17, 3, 17, 3, 17, 5, 17, 329, 10, 17, 3, 17, 3, 17, 5, 17, 333, 10, 17, 3, 17, 5, 17, 336, 10, 17, 3, 17, 5, 17, 339, 10, 17, 3, 17, 3, 17, 5, 17, 343, 10, 17, 5, 17, 345, 10, 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 7, 20, 356, 10, 20, 12, 20, 14, 20, 359, 11, 20, 3, 21, 3, 21, 3, 21, 5, 21, 364, 10, 21, 3, 21, 5, 21, 367, 10, 21, 3, 22, 3, 22, 3, 22, 5, 22, 372, 10, 22, 3, 23, 3, 23, 3, 23, 7, 23, 377, 10, 23, 12, 23, 14, 23, 380, 11, 23, 3, 23, 5, 23, 383, 10, 23, 3, 23, 3, 23, 3, 24, 3, 24, 5, 24, 389, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 396, 10, 24, 12, 24, 14, 24, 399, 11, 24, 3, 24, 5, 24, 402, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 6, 24, 408, 10, 24, 13, 24, 14, 24, 409, 3, 24, 5, 24, 413, 10, 24, 5, 24, 415, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 426, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 434, 10, 24, 5, 24, 436, 10, 24, 5, 24, 438, 10, 24, 3, 24, 3, 24, 5, 24, 442, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 456, 10, 24, 12, 24, 14, 24, 459, 11, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 468, 10, 24, 5, 24, 470, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 478, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 485, 10, 24, 12, 24, 14, 24, 488, 11, 24, 3, 24, 3, 24, 5, 24, 492, 10, 24, 3, 25, 7, 25, 495, 10, 25, 12, 25, 14, 25, 498, 11, 25, 3, 25, 3, 25, 6, 25, 502, 10, 25, 13, 25, 14, 25, 503, 5, 25, 506, 10, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 514, 10, 26, 3, 27, 3, 27, 5, 27, 518, 10, 27, 3, 27, 3, 27, 6, 27, 522, 10, 27, 13, 27, 14, 27, 523, 3, 27, 3, 27, 5, 27, 528, 10, 27, 3, 27, 5, 27, 531, 10, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 7, 29, 540, 10, 29, 12, 29, 14, 29, 543, 11, 29, 3, 29, 3, 29, 5, 29, 547, 10, 29, 3, 29, 5, 29, 550, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 557, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 564, 10, 29, 5, 29, 566, 10, 29, 3, 30, 3, 30, 3, 30, 7, 30, 571, 10, 30, 12, 30, 14, 30, 574, 11, 30, 3, 30, 5, 30, 577, 10, 30, 3, 31, 3, 31, 3, 31, 7, 31, 582, 10, 31, 12, 31, 14, 31, 585, 11, 31, 3, 31, 5, 31, 588, 10, 31, 3, 32, 3, 32, 3, 32, 5, 32, 593, 10, 32, 3, 33, 3, 33, 3, 33, 7, 33, 598, 10, 33, 12, 33, 14, 33, 601, 11, 33, 3, 34, 3, 34, 3, 34, 5, 34, 606, 10, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 614, 10, 35, 3, 35, 3, 35, 5, 35, 618, 10, 35, 3, 35, 3, 35, 5, 35, 622, 10, 35, 3, 36, 3, 36, 3, 36, 5, 36, 627, 10, 36, 3, 36, 3, 36, 3, 36, 5, 36, 632, 10, 36, 3, 36, 3, 36, 5, 36, 636, 10, 36, 3, 36, 5, 36, 639, 10, 36, 3, 36, 5, 36, 642, 10, 36, 3, 36, 3, 36, 5, 36, 646, 10, 36, 5, 36, 648, 10, 36, 3, 37, 3, 37, 3, 37, 7, 37, 653, 10, 37, 12, 37, 14, 37, 656, 11, 37, 3, 38, 3, 38, 3, 38, 5, 38, 661, 10, 38, 3, 38, 5, 38, 664, 10, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 5, 41, 676, 10, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 7, 41, 684, 10, 41, 12, 41, 14, 41, 687, 11, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 5, 42, 701, 10, 42, 3, 42, 3, 42, 3, 42, 5, 42, 706, 10, 42, 5, 42, 708, 10, 42, 3, 42, 7, 42, 711, 10, 42, 12, 42, 14, 42, 714, 11, 42, 3, 43, 3, 43, 5, 43, 718, 10, 43, 3, 43, 3, 43, 7, 43, 722, 10, 43, 12, 43, 14, 43, 725, 11, 43, 3, 43, 3, 43, 5, 43, 729, 10, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 752, 10, 43, 12, 43, 14, 43, 755, 11, 43, 3, 44, 3, 44, 3, 44, 5, 44, 760, 10, 44, 3, 44, 3, 44, 3, 44, 5, 44, 765, 10, 44, 3, 44, 3, 44, 3, 44, 5, 44, 770, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 5, 44, 776, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 5, 44, 785, 10, 44, 3, 44, 3, 44, 3, 44, 6, 44, 790, 10, 44, 13, 44, 14, 44, 791, 5, 44, 794, 10, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 802, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 811, 10, 45, 7, 45, 813, 10, 45, 12, 45, 14, 45, 816, 11, 45, 3, 45, 5, 45, 819, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 827, 10, 45, 3, 46, 3, 46, 5, 46, 831, 10, 46, 3, 46, 3, 46, 3, 46, 3, 46, 5, 46, 837, 10, 46, 7, 46, 839, 10, 46, 12, 46, 14, 46, 842, 11, 46, 3, 46, 5, 46, 845, 10, 46, 5, 46, 847, 10, 46, 3, 47, 3, 47, 3, 47, 7, 47, 852, 10, 47, 12, 47, 14, 47, 855, 11, 47, 3, 47, 5, 47, 858, 10, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 7, 48, 866, 10, 48, 12, 48, 14, 48, 869, 11, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 5, 50, 876, 10, 50, 3, 51, 3, 51, 3, 52, 3, 52, 5, 52, 882, 10, 52, 3, 53, 3, 53, 3, 53, 5, 53, 887, 10, 53, 3, 54, 3, 54, 3, 54, 5, 54, 892, 10, 54, 3, 54, 5, 54, 895, 10, 54, 3, 55, 3, 55, 5, 55, 899, 10, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 906, 10, 55, 3, 56, 3, 56, 3, 56, 7, 56, 911, 10, 56, 12, 56, 14, 56, 914, 11, 56, 3, 56, 5, 56, 917, 10, 56, 3, 57, 3, 57, 3, 57, 3, 57, 5, 57, 923, 10, 57, 3, 57, 3, 57, 5, 57, 927, 10, 57, 3, 58, 3, 58, 3, 58, 7, 58, 932, 10, 58, 12, 58, 14, 58, 935, 11, 58, 3, 58, 5, 58, 938, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 944, 10, 59, 3, 59, 5, 59, 947, 10, 59, 5, 59, 949, 10, 59, 3, 59, 3, 59, 5, 59, 953, 10, 59, 3, 59, 5, 59, 956, 10, 59, 5, 59, 958, 10, 59, 3, 60, 3, 60, 5, 60, 962, 10, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 5, 61, 969, 10, 61, 3, 62, 3, 62, 3, 62, 3, 62, 5, 62, 975, 10, 62, 5, 62, 977, 10, 62, 3, 62, 2, 6, 80, 82, 84, 94, 63, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 2, 12, 3, 3, 5, 5, 3, 2, 43, 44, 3, 2, 72, 84, 4, 2, 57, 58, 62, 62, 5, 2, 46, 46, 59, 61, 70, 70, 3, 2, 57, 58, 3, 2, 55, 56, 4, 2, 41, 42, 98, 98, 3, 2, 86, 89, 4, 2, 46, 46, 50, 50, 2, 1118, 2, 127, 3, 2, 2, 2, 4, 136, 3, 2, 2, 2, 6, 140, 3, 2, 2, 2, 8, 144, 3, 2, 2, 2, 10, 153, 3, 2, 2, 2, 12, 229, 3, 2, 2, 2, 14, 241, 3, 2, 2, 2, 16, 243, 3, 2, 2, 2, 18, 254, 3, 2, 2, 2, 20, 259, 3, 2, 2, 2, 22, 263, 3, 2, 2, 2, 24, 267, 3, 2, 2, 2, 26, 272, 3, 2, 2, 2, 28, 291, 3, 2, 2, 2, 30, 304, 3, 2, 2, 2, 32, 344, 3, 2, 2, 2, 34, 346, 3, 2, 2, 2, 36, 349, 3, 2, 2, 2, 38, 352, 3, 2, 2, 2, 40, 366, 3, 2, 2, 2, 42, 368, 3, 2, 2, 2, 44, 373, 3, 2, 2, 2, 46, 491, 3, 2, 2, 2, 48, 505, 3, 2, 2, 2, 50, 513, 3, 2, 2, 2, 52, 530, 3, 2, 2, 2, 54, 532, 3, 2, 2, 2, 56, 565, 3, 2, 2, 2, 58, 567, 3, 2, 2, 2, 60, 578, 3, 2, 2, 2, 62, 589, 3, 2, 2, 2, 64, 594, 3, 2, 2, 2, 66, 602, 3, 2, 2, 2, 68, 621, 3, 2, 2, 2, 70, 647, 3, 2, 2, 2, 72, 649, 3, 2, 2, 2, 74, 663, 3, 2, 2, 2, 76, 665, 3, 2, 2, 2, 78, 668, 3, 2, 2, 2, 80, 675, 3, 2, 2, 2, 82, 688, 3, 2, 2, 2, 84, 728, 3, 2, 2, 2, 86, 793, 3, 2, 2, 2, 88, 826, 3, 2, 2, 2, 90, 830, 3, 2, 2, 2, 92, 848, 3, 2, 2, 2, 94, 859, 3, 2, 2, 2, 96, 870, 3, 2, 2, 2, 98, 875, 3, 2, 2, 2, 100, 877, 3, 2, 2, 2, 102, 879, 3, 2, 2, 2, 104, 886, 3, 2, 2, 2, 106, 894, 3, 2, 2, 2, 108, 905, 3, 2, 2, 2, 110, 907, 3, 2, 2, 2, 112, 926, 3, 2, 2, 2, 114, 928, 3, 2, 2, 2, 116, 957, 3, 2, 2, 2, 118, 959, 3, 2, 2, 2, 120, 963, 3, 2, 2, 2, 122, 976, 3, 2, 2, 2, 124, 128, 5, 4, 3, 2, 125, 128, 5, 6, 4, 2, 126, 128, 5, 8, 5, 2, 127, 124, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 126, 3, 2, 2, 2, 127, 128, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 130, 7, 2, 2, 3, 130, 3, 3, 2, 2, 2, 131, 137, 7, 5, 2, 2, 132, 137, 5, 44, 23, 2, 133, 134, 5, 12, 7, 2, 134, 135, 7, 5, 2, 2, 135, 137, 3, 2, 2, 2, 136, 131, 3, 2, 2, 2, 136, 132, 3, 2, 2, 2, 136, 133, 3, 2, 2, 2, 137, 5, 3, 2, 2, 2, 138, 141, 7, 5, 2, 2, 139, 141, 5, 10, 6, 2, 140, 138, 3, 2, 2, 2, 140, 139, 3, 2, 2, 2, 141, 142, 3, 2, 2, 2, 142, 140, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 7, 3, 2, 2, 2, 144, 148, 5, 92, 47, 2, 145, 147, 7, 5, 2, 2, 146, 145, 3, 2, 2, 2, 147, 150, 3, 2, 2, 2, 148, 146, 3, 2, 2, 2, 148, 149, 3, 2, 2, 2, 149, 9, 3, 2, 2, 2, 150, 148, 3, 2, 2, 2, 151, 154, 5, 44, 23, 2, 152, 154, 5, 12, 7, 2, 153, 151, 3, 2, 2, 2, 153, 152, 3, 2, 2, 2, 154, 11, 3, 2, 2, 2, 155, 156, 7, 15, 2, 2, 156, 157, 5, 68, 35, 2, 157, 158, 7, 48, 2, 2, 158, 162, 5, 14, 8, 2, 159, 161, 5, 18, 10, 2, 160, 159, 3, 2, 2, 2, 161, 164, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 166, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 165, 167, 5, 20, 11, 2, 166, 165, 3, 2, 2, 2, 166, 167, 3, 2, 2, 2, 167, 230, 3, 2, 2, 2, 168, 169, 7, 18, 2, 2, 169, 170, 5, 68, 35, 2, 170, 171, 7, 48, 2, 2, 171, 173, 5, 14, 8, 2, 172, 174, 5, 20, 11, 2, 173, 172, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 230, 3, 2, 2, 2, 175, 177, 7, 37, 2, 2, 176, 175, 3, 2, 2, 2, 176, 177, 3, 2, 2, 2, 177, 178, 3, 2, 2, 2, 178, 179, 7, 19, 2, 2, 179, 180, 5, 58, 30, 2, 180, 181, 7, 20, 2, 2, 181, 182, 5, 92, 47, 2, 182, 183, 7, 48, 2, 2, 183, 185, 5, 14, 8, 2, 184, 186, 5, 20, 11, 2, 185, 184, 3, 2, 2, 2, 185, 186, 3, 2, 2, 2, 186, 230, 3, 2, 2, 2, 187, 188, 7, 21, 2, 2, 188, 189, 7, 48, 2, 2, 189, 202, 5, 14, 8, 2, 190, 192, 5, 26, 14, 2, 191, 190, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 191, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 196, 3, 2, 2, 2, 195, 197, 5, 20, 11, 2, 196, 195, 3, 2, 2, 2, 196, 197, 3, 2, 2, 2, 197, 199, 3, 2, 2, 2, 198, 200, 5, 22, 12, 2, 199, 198, 3, 2, 2, 2, 199, 200, 3, 2, 2, 2, 200, 203, 3, 2, 2, 2, 201, 203, 5, 22, 12, 2, 202, 191, 3, 2, 2, 2, 202, 201, 3, 2, 2, 2, 203, 230, 3, 2, 2, 2, 204, 206, 7, 37, 2, 2, 205, 204, 3, 2, 2, 2, 205, 206, 3, 2, 2, 2, 206, 207, 3, 2, 2, 2, 207, 208, 7, 24, 2, 2, 208, 213, 5, 24, 13, 2, 209, 210, 7, 47, 2, 2, 210, 212, 5, 24, 13, 2, 211, 209, 3, 2, 2, 2, 212, 215, 3, 2, 2, 2, 213, 211, 3, 2, 2, 2, 213, 214, 3, 2, 2, 2, 214, 216, 3, 2, 2, 2, 215, 213, 3, 2, 2, 2, 216, 217, 7, 48, 2, 2, 217, 218, 5, 14, 8, 2, 218, 230, 3, 2, 2, 2, 219, 221, 5, 16, 9, 2, 220, 219, 3, 2, 2, 2, 221, 224, 3, 2, 2, 2, 222, 220, 3, 2, 2, 2, 222, 223, 3, 2, 2, 2, 223, 227, 3, 2, 2, 2, 224, 222, 3, 2, 2, 2, 225, 228, 5, 28, 15, 2, 226, 228, 5, 30, 16, 2, 227, 225, 3, 2, 2, 2, 227, 226, 3, 2, 2, 2, 228, 230, 3, 2, 2, 2, 229, 155, 3, 2, 2, 2, 229, 168, 3, 2, 2, 2, 229, 176, 3, 2, 2, 2, 229, 187, 3, 2, 2, 2, 229, 205, 3, 2, 2, 2, 229, 222, 3, 2, 2, 2, 230, 13, 3, 2, 2, 2, 231, 242, 5, 44, 23, 2, 232, 233, 7, 5, 2, 2, 233, 235, 7, 3, 2, 2, 234, 236, 5, 10, 6, 2, 235, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 235, 3, 2, 2, 2, 237, 238, 3, 2, 2, 2, 238, 239, 3, 2, 2, 2, 239, 240, 7, 4, 2, 2, 240, 242, 3, 2, 2, 2, 241, 231, 3, 2, 2, 2, 241, 232, 3, 2, 2, 2, 242, 15, 3, 2, 2, 2, 243, 244, 7, 70, 2, 2, 244, 250, 5, 94, 48, 2, 245, 247, 7, 92, 2, 2, 246, 248, 5, 110, 56, 2, 247, 246, 3, 2, 2, 2, 247, 248, 3, 2, 2, 2, 248, 249, 3, 2, 2, 2, 249, 251, 7, 93, 2, 2, 250, 245, 3, 2, 2, 2, 250, 251, 3, 2, 2, 2, 251, 252, 3, 2, 2, 2, 252, 253, 7, 5, 2, 2, 253, 17, 3, 2, 2, 2, 254, 255, 7, 16, 2, 2, 255, 256, 5, 68, 35, 2, 256, 257, 7, 48, 2, 2, 257, 258, 5, 14, 8, 2, 258, 19, 3, 2, 2, 2, 259, 260, 7, 17, 2, 2, 260, 261, 7, 48, 2, 2, 261, 262, 5, 14, 8, 2, 262, 21, 3, 2, 2, 2, 263, 264, 7, 23, 2, 2, 264, 265, 7, 48, 2, 2, 265, 266, 5, 14, 8, 2, 266, 23, 3, 2, 2, 2, 267, 270, 5, 68, 35, 2, 268, 269, 7, 12, 2, 2, 269, 271, 5, 84, 43, 2, 270, 268, 3, 2, 2, 2, 270, 271, 3, 2, 2, 2, 271, 25, 3, 2, 2, 2, 272, 286, 7, 25, 2, 2, 273, 284, 5, 68, 35, 2, 274, 275, 6, 14, 2, 2, 275, 276, 7, 47, 2, 2, 276, 277, 5, 96, 49, 2, 277, 278, 8, 14, 1, 2, 278, 285, 3, 2, 2, 2, 279, 280, 6, 14, 3, 2, 280, 281, 7, 12, 2, 2, 281, 282, 5, 96, 49, 2, 282, 283, 8, 14, 1, 2, 283, 285, 3, 2, 2, 2, 284, 274, 3, 2, 2, 2, 284, 279, 3, 2, 2, 2, 284, 285, 3, 2, 2, 2, 285, 287, 3, 2, 2, 2, 286, 273, 3, 2, 2, 2, 286, 287, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 289, 7, 48, 2, 2, 289, 290, 5, 14, 8, 2, 290, 27, 3, 2, 2, 2, 291, 292, 7, 31, 2, 2, 292, 298, 5, 96, 49, 2, 293, 295, 7, 92, 2, 2, 294, 296, 5, 110, 56, 2, 295, 294, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 299, 7, 93, 2, 2, 298, 293, 3, 2, 2, 2, 298, 299, 3, 2, 2, 2, 299, 300, 3, 2, 2, 2, 300, 301, 7, 48, 2, 2, 301, 302, 5, 14, 8, 2, 302, 29, 3, 2, 2, 2, 303, 305, 7, 37, 2, 2, 304, 303, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, 305, 306, 3, 2, 2, 2, 306, 307, 7, 6, 2, 2, 307, 308, 5, 96, 49, 2, 308, 310, 7, 92, 2, 2, 309, 311, 5, 32, 17, 2, 310, 309, 3, 2, 2, 2, 310, 311, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 315, 7, 93, 2, 2, 313, 314, 7, 71, 2, 2, 314, 316, 5, 68, 35, 2, 315, 313, 3, 2, 2, 2, 315, 316, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 318, 7, 48, 2, 2, 318, 319, 5, 14, 8, 2, 319, 31, 3, 2, 2, 2, 320, 321, 5, 38, 20, 2, 321, 322, 7, 47, 2, 2, 322, 324, 3, 2, 2, 2, 323, 320, 3, 2, 2, 2, 323, 324, 3, 2, 2, 2, 324, 335, 3, 2, 2, 2, 325, 328, 5, 34, 18, 2, 326, 327, 7, 47, 2, 2, 327, 329, 5, 38, 20, 2, 328, 326, 3, 2, 2, 2, 328, 329, 3, 2, 2, 2, 329, 332, 3, 2, 2, 2, 330, 331, 7, 47, 2, 2, 331, 333, 5, 36, 19, 2, 332, 330, 3, 2, 2, 2, 332, 333, 3, 2, 2, 2, 333, 336, 3, 2, 2, 2, 334, 336, 5, 36, 19, 2, 335, 325, 3, 2, 2, 2, 335, 334, 3, 2, 2, 2, 336, 338, 3, 2, 2, 2, 337, 339, 7, 47, 2, 2, 338, 337, 3, 2, 2, 2, 338, 339, 3, 2, 2, 2, 339, 345, 3, 2, 2, 2, 340, 342, 5, 38, 20, 2, 341, 343, 7, 47, 2, 2, 342, 341, 3, 2, 2, 2, 342, 343, 3, 2, 2, 2, 343, 345, 3, 2, 2, 2, 344, 323, 3, 2, 2, 2, 344, 340, 3, 2, 2, 2, 345, 33, 3, 2, 2, 2, 346, 347, 7, 46, 2, 2, 347, 348, 5, 42, 22, 2, 348, 35, 3, 2, 2, 2, 349, 350, 7, 50, 2, 2, 350, 351, 5, 42, 22, 2, 351, 37, 3, 2, 2, 2, 352, 357, 5, 40, 21, 2, 353, 354, 7, 47, 2, 2, 354, 356, 5, 40, 21, 2, 355, 353, 3, 2, 2, 2, 356, 359, 3, 2, 2, 2, 357, 355, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 39, 3, 2, 2, 2, 359, 357, 3, 2, 2, 2, 360, 363, 5, 42, 22, 2, 361, 362, 7, 51, 2, 2, 362, 364, 5, 68, 35, 2, 363, 361, 3, 2, 2, 2, 363, 364, 3, 2, 2, 2, 364, 367, 3, 2, 2, 2, 365, 367, 7, 46, 2, 2, 366, 360, 3, 2, 2, 2, 366, 365, 3, 2, 2, 2, 367, 41, 3, 2, 2, 2, 368, 371, 5, 96, 49, 2, 369, 370, 7, 48, 2, 2, 370, 372, 5, 68, 35, 2, 371, 369, 3, 2, 2, 2, 371, 372, 3, 2, 2, 2, 372, 43, 3, 2, 2, 2, 373, 378, 5, 46, 24, 2, 374, 375, 7, 49, 2, 2, 375, 377, 5, 46, 24, 2, 376, 374, 3, 2, 2, 2, 377, 380, 3, 2, 2, 2, 378, 376, 3, 2, 2, 2, 378, 379, 3, 2, 2, 2, 379, 382, 3, 2, 2, 2, 380, 378, 3, 2, 2, 2, 381, 383, 7, 49, 2, 2, 382, 381, 3, 2, 2, 2, 382, 383, 3, 2, 2, 2, 383, 384, 3, 2, 2, 2, 384, 385, 9, 2, 2, 2, 385, 45, 3, 2, 2, 2, 386, 388, 5, 52, 27, 2, 387, 389, 5, 56, 29, 2, 388, 387, 3, 2, 2, 2, 388, 389, 3, 2, 2, 2, 389, 492, 3, 2, 2, 2, 390, 391, 6, 24, 4, 2, 391, 414, 7, 39, 2, 2, 392, 397, 5, 68, 35, 2, 393, 394, 7, 47, 2, 2, 394, 396, 5, 68, 35, 2, 395, 393, 3, 2, 2, 2, 396, 399, 3, 2, 2, 2, 397, 395, 3, 2, 2, 2, 397, 398, 3, 2, 2, 2, 398, 401, 3, 2, 2, 2, 399, 397, 3, 2, 2, 2, 400, 402, 7, 47, 2, 2, 401, 400, 3, 2, 2, 2, 401, 402, 3, 2, 2, 2, 402, 415, 3, 2, 2, 2, 403, 404, 7, 56, 2, 2, 404, 407, 5, 68, 35, 2, 405, 406, 7, 47, 2, 2, 406, 408, 5, 68, 35, 2, 407, 405, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 407, 3, 2, 2, 2, 409, 410, 3, 2, 2, 2, 410, 412, 3, 2, 2, 2, 411, 413, 7, 47, 2, 2, 412, 411, 3, 2, 2, 2, 412, 413, 3, 2, 2, 2, 413, 415, 3, 2, 2, 2, 414, 392, 3, 2, 2, 2, 414, 403, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 417, 8, 24, 1, 2, 417, 492, 3, 2, 2, 2, 418, 419, 7, 33, 2, 2, 419, 492, 5, 58, 30, 2, 420, 492, 7, 34, 2, 2, 421, 492, 7, 36, 2, 2, 422, 492, 7, 35, 2, 2, 423, 425, 7, 7, 2, 2, 424, 426, 5, 92, 47, 2, 425, 424, 3, 2, 2, 2, 425, 426, 3, 2, 2, 2, 426, 492, 3, 2, 2, 2, 427, 437, 7, 8, 2, 2, 428, 435, 5, 68, 35, 2, 429, 430, 7, 47, 2, 2, 430, 433, 5, 68, 35, 2, 431, 432, 7, 47, 2, 2, 432, 434, 5, 68, 35, 2, 433, 431, 3, 2, 2, 2, 433, 434, 3, 2, 2, 2, 434, 436, 3, 2, 2, 2, 435, 429, 3, 2, 2, 2, 435, 436, 3, 2, 2, 2, 436, 438, 3, 2, 2, 2, 437, 428, 3, 2, 2, 2, 437, 438, 3, 2, 2, 2, 438, 441, 3, 2, 2, 2, 439, 440, 7, 9, 2, 2, 440, 442, 5, 68, 35, 2, 441, 439, 3, 2, 2, 2, 441, 442, 3, 2, 2, 2, 442, 492, 3, 2, 2, 2, 443, 492, 5, 102, 52, 2, 444, 445, 7, 10, 2, 2, 445, 492, 5, 64, 33, 2, 446, 447, 7, 9, 2, 2, 447, 448, 5, 48, 25, 2, 448, 449, 7, 10, 2, 2, 449, 450, 5, 50, 26, 2, 450, 492, 3, 2, 2, 2, 451, 452, 7, 13, 2, 2, 452, 457, 5, 96, 49, 2, 453, 454, 7, 47, 2, 2, 454, 456, 5, 96, 49, 2, 455, 453, 3, 2, 2, 2, 456, 459, 3, 2, 2, 2, 457, 455, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 492, 3, 2, 2, 2, 459, 457, 3, 2, 2, 2, 460, 461, 6, 24, 5, 2, 461, 462, 7, 40, 2, 2, 462, 469, 5, 84, 43, 2, 463, 464, 7, 20, 2, 2, 464, 467, 5, 68, 35, 2, 465, 466, 7, 47, 2, 2, 466, 468, 5, 68, 35, 2, 467, 465, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 470, 3, 2, 2, 2, 469, 463, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 3, 2, 2, 2, 471, 472, 8, 24, 1, 2, 472, 492, 3, 2, 2, 2, 473, 474, 7, 14, 2, 2, 474, 477, 5, 68, 35, 2, 475, 476, 7, 47, 2, 2, 476, 478, 5, 68, 35, 2, 477, 475, 3, 2, 2, 2, 477, 478, 3, 2, 2, 2, 478, 492, 3, 2, 2, 2, 479, 480, 6, 24, 6, 2, 480, 481, 7, 11, 2, 2, 481, 486, 5, 96, 49, 2, 482, 483, 7, 47, 2, 2, 483, 485, 5, 96, 49, 2, 484, 482, 3, 2, 2, 2, 485, 488, 3, 2, 2, 2, 486, 484, 3, 2, 2, 2, 486, 487, 3, 2, 2, 2, 487, 489, 3, 2, 2, 2, 488, 486, 3, 2, 2, 2, 489, 490, 8, 24, 1, 2, 490, 492, 3, 2, 2, 2, 491, 386, 3, 2, 2, 2, 491, 390, 3, 2, 2, 2, 491, 418, 3, 2, 2, 2, 491, 420, 3, 2, 2, 2, 491, 421, 3, 2, 2, 2, 491, 422, 3, 2, 2, 2, 491, 423, 3, 2, 2, 2, 491, 427, 3, 2, 2, 2, 491, 443, 3, 2, 2, 2, 491, 444, 3, 2, 2, 2, 491, 446, 3, 2, 2, 2, 491, 451, 3, 2, 2, 2, 491, 460, 3, 2, 2, 2, 491, 473, 3, 2, 2, 2, 491, 479, 3, 2, 2, 2, 492, 47, 3, 2, 2, 2, 493, 495, 9, 3, 2, 2, 494, 493, 3, 2, 2, 2, 495, 498, 3, 2, 2, 2, 496, 494, 3, 2, 2, 2, 496, 497, 3, 2, 2, 2, 497, 499, 3, 2, 2, 2, 498, 496, 3, 2, 2, 2, 499, 506, 5, 94, 48, 2, 500, 502, 9, 3, 2, 2, 501, 500, 3, 2, 2, 2, 502, 503, 3, 2, 2, 2, 503, 501, 3, 2, 2, 2, 503, 504, 3, 2, 2, 2, 504, 506, 3, 2, 2, 2, 505, 496, 3, 2, 2, 2, 505, 501, 3, 2, 2, 2, 506, 49, 3, 2, 2, 2, 507, 514, 7, 46, 2, 2, 508, 509, 7, 92, 2, 2, 509, 510, 5, 60, 31, 2, 510, 511, 7, 93, 2, 2, 511, 514, 3, 2, 2, 2, 512, 514, 5, 60, 31, 2, 513, 507, 3, 2, 2, 2, 513, 508, 3, 2, 2, 2, 513, 512, 3, 2, 2, 2, 514, 51, 3, 2, 2, 2, 515, 518, 5, 68, 35, 2, 516, 518, 5, 54, 28, 2, 517, 515, 3, 2, 2, 2, 517, 516, 3, 2, 2, 2, 518, 519, 3, 2, 2, 2, 519, 520, 7, 47, 2, 2, 520, 522, 3, 2, 2, 2, 521, 517, 3, 2, 2, 2, 522, 523, 3, 2, 2, 2, 523, 521, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 527, 3, 2, 2, 2, 525, 528, 5, 68, 35, 2, 526, 528, 5, 54, 28, 2, 527, 525, 3, 2, 2, 2, 527, 526, 3, 2, 2, 2, 527, 528, 3, 2, 2, 2, 528, 531, 3, 2, 2, 2, 529, 531, 5, 92, 47, 2, 530, 521, 3, 2, 2, 2, 530, 529, 3, 2, 2, 2, 531, 53, 3, 2, 2, 2, 532, 533, 7, 46, 2, 2, 533, 534, 5, 84, 43, 2, 534, 55, 3, 2, 2, 2, 535, 549, 7, 51, 2, 2, 536, 541, 5, 52, 27, 2, 537, 538, 7, 51, 2, 2, 538, 540, 5, 52, 27, 2, 539, 537, 3, 2, 2, 2, 540, 543, 3, 2, 2, 2, 541, 539, 3, 2, 2, 2, 541, 542, 3, 2, 2, 2, 542, 546, 3, 2, 2, 2, 543, 541, 3, 2, 2, 2, 544, 545, 7, 51, 2, 2, 545, 547, 5, 102, 52, 2, 546, 544, 3, 2, 2, 2, 546, 547, 3, 2, 2, 2, 547, 550, 3, 2, 2, 2, 548, 550, 5, 102, 52, 2, 549, 536, 3, 2, 2, 2, 549, 548, 3, 2, 2, 2, 550, 566, 3, 2, 2, 2, 551, 552, 6, 29, 7, 2, 552, 553, 7, 48, 2, 2, 553, 556, 5, 68, 35, 2, 554, 555, 7, 51, 2, 2, 555, 557, 5, 92, 47, 2, 556, 554, 3, 2, 2, 2, 556, 557, 3, 2, 2, 2, 557, 558, 3, 2, 2, 2, 558, 559, 8, 29, 1, 2, 559, 566, 3, 2, 2, 2, 560, 563, 9, 4, 2, 2, 561, 564, 5, 102, 52, 2, 562, 564, 5, 92, 47, 2, 563, 561, 3, 2, 2, 2, 563, 562, 3, 2, 2, 2, 564, 566, 3, 2, 2, 2, 565, 535, 3, 2, 2, 2, 565, 551, 3, 2, 2, 2, 565, 560, 3, 2, 2, 2, 566, 57, 3, 2, 2, 2, 567, 572, 5, 84, 43, 2, 568, 569, 7, 47, 2, 2, 569, 571, 5, 84, 43, 2, 570, 568, 3, 2, 2, 2, 571, 574, 3, 2, 2, 2, 572, 570, 3, 2, 2, 2, 572, 573, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 575, 577, 7, 47, 2, 2, 576, 575, 3, 2, 2, 2, 576, 577, 3, 2, 2, 2, 577, 59, 3, 2, 2, 2, 578, 583, 5, 62, 32, 2, 579, 580, 7, 47, 2, 2, 580, 582, 5, 62, 32, 2, 581, 579, 3, 2, 2, 2, 582, 585, 3, 2, 2, 2, 583, 581, 3, 2, 2, 2, 583, 584, 3, 2, 2, 2, 584, 587, 3, 2, 2, 2, 585, 583, 3, 2, 2, 2, 586, 588, 7, 47, 2, 2, 587, 586, 3, 2, 2, 2, 587, 588, 3, 2, 2, 2, 588, 61, 3, 2, 2, 2, 589, 592, 5, 96, 49, 2, 590, 591, 7, 12, 2, 2, 591, 593, 5, 96, 49, 2, 592, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 63, 3, 2, 2, 2, 594, 599, 5, 66, 34, 2, 595, 596, 7, 47, 2, 2, 596, 598, 5, 66, 34, 2, 597, 595, 3, 2, 2, 2, 598, 601, 3, 2, 2, 2, 599, 597, 3, 2, 2, 2, 599, 600, 3, 2, 2, 2, 600, 65, 3, 2, 2, 2, 601, 599, 3, 2, 2, 2, 602, 605, 5, 94, 48, 2, 603, 604, 7, 12, 2, 2, 604, 606, 5, 96, 49, 2, 605, 603, 3, 2, 2, 2, 605, 606, 3, 2, 2, 2, 606, 67, 3, 2, 2, 2, 607, 613, 5, 80, 41, 2, 608, 609, 7, 15, 2, 2, 609, 610, 5, 80, 41, 2, 610, 611, 7, 17, 2, 2, 611, 612, 5, 68, 35, 2, 612, 614, 3, 2, 2, 2, 613, 608, 3, 2, 2, 2, 613, 614, 3, 2, 2, 2, 614, 622, 3, 2, 2, 2, 615, 617, 7, 26, 2, 2, 616, 618, 5, 70, 36, 2, 617, 616, 3, 2, 2, 2, 617, 618, 3, 2, 2, 2, 618, 619, 3, 2, 2, 2, 619, 620, 7, 48, 2, 2, 620, 622, 5, 68, 35, 2, 621, 607, 3, 2, 2, 2, 621, 615, 3, 2, 2, 2, 622, 69, 3, 2, 2, 2, 623, 624, 5, 72, 37, 2, 624, 625, 7, 47, 2, 2, 625, 627, 3, 2, 2, 2, 626, 623, 3, 2, 2, 2, 626, 627, 3, 2, 2, 2, 627, 638, 3, 2, 2, 2, 628, 631, 5, 76, 39, 2, 629, 630, 7, 47, 2, 2, 630, 632, 5, 72, 37, 2, 631, 629, 3, 2, 2, 2, 631, 632, 3, 2, 2, 2, 632, 635, 3, 2, 2, 2, 633, 634, 7, 47, 2, 2, 634, 636, 5, 78, 40, 2, 635, 633, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 639, 3, 2, 2, 2, 637, 639, 5, 78, 40, 2, 638, 628, 3, 2, 2, 2, 638, 637, 3, 2, 2, 2, 639, 641, 3, 2, 2, 2, 640, 642, 7, 47, 2, 2, 641, 640, 3, 2, 2, 2, 641, 642, 3, 2, 2, 2, 642, 648, 3, 2, 2, 2, 643, 645, 5, 72, 37, 2, 644, 646, 7, 47, 2, 2, 645, 644, 3, 2, 2, 2, 645, 646, 3, 2, 2, 2, 646, 648, 3, 2, 2, 2, 647, 626, 3, 2, 2, 2, 647, 643, 3, 2, 2, 2, 648, 71, 3, 2, 2, 2, 649, 654, 5, 74, 38, 2, 650, 651, 7, 47, 2, 2, 651, 653, 5, 74, 38, 2, 652, 650, 3, 2, 2, 2, 653, 656, 3, 2, 2, 2, 654, 652, 3, 2, 2, 2, 654, 655, 3, 2, 2, 2, 655, 73, 3, 2, 2, 2, 656, 654, 3, 2, 2, 2, 657, 660, 5, 96, 49, 2, 658, 659, 7, 51, 2, 2, 659, 661, 5, 68, 35, 2, 660, 658, 3, 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 664, 3, 2, 2, 2, 662, 664, 7, 46, 2, 2, 663, 657, 3, 2, 2, 2, 663, 662, 3, 2, 2, 2, 664, 75, 3, 2, 2, 2, 665, 666, 7, 46, 2, 2, 666, 667, 5, 96, 49, 2, 667, 77, 3, 2, 2, 2, 668, 669, 7, 50, 2, 2, 669, 670, 5, 96, 49, 2, 670, 79, 3, 2, 2, 2, 671, 672, 8, 41, 1, 2, 672, 676, 5, 82, 42, 2, 673, 674, 7, 29, 2, 2, 674, 676, 5, 80, 41, 5, 675, 671, 3, 2, 2, 2, 675, 673, 3, 2, 2, 2, 676, 685, 3, 2, 2, 2, 677, 678, 12, 4, 2, 2, 678, 679, 7, 28, 2, 2, 679, 684, 5, 80, 41, 5, 680, 681, 12, 3, 2, 2, 681, 682, 7, 27, 2, 2, 682, 684, 5, 80, 41, 4, 683, 677, 3, 2, 2, 2, 683, 680, 3, 2, 2, 2, 684, 687, 3, 2, 2, 2, 685, 683, 3, 2, 2, 2, 685, 686, 3, 2, 2, 2, 686, 81, 3, 2, 2, 2, 687, 685, 3, 2, 2, 2, 688, 689, 8, 42, 1, 2, 689, 690, 5, 84, 43, 2, 690, 712, 3, 2, 2, 2, 691, 707, 12, 4, 2, 2, 692, 708, 7, 63, 2, 2, 693, 708, 7, 64, 2, 2, 694, 708, 7, 65, 2, 2, 695, 708, 7, 66, 2, 2, 696, 708, 7, 67, 2, 2, 697, 708, 7, 68, 2, 2, 698, 708, 7, 69, 2, 2, 699, 701, 7, 29, 2, 2, 700, 699, 3, 2, 2, 2, 700, 701, 3, 2, 2, 2, 701, 702, 3, 2, 2, 2, 702, 708, 7, 20, 2, 2, 703, 705, 7, 30, 2, 2, 704, 706, 7, 29, 2, 2, 705, 704, 3, 2, 2, 2, 705, 706, 3, 2, 2, 2, 706, 708, 3, 2, 2, 2, 707, 692, 3, 2, 2, 2, 707, 693, 3, 2, 2, 2, 707, 694, 3, 2, 2, 2, 707, 695, 3, 2, 2, 2, 707, 696, 3, 2, 2, 2, 707, 697, 3, 2, 2, 2, 707, 698, 3, 2, 2, 2, 707, 700, 3, 2, 2, 2, 707, 703, 3, 2, 2, 2, 708, 709, 3, 2, 2, 2, 709, 711, 5, 82, 42, 5, 710, 691, 3, 2, 2, 2, 711, 714, 3, 2, 2, 2, 712, 710, 3, 2, 2, 2, 712, 713, 3, 2, 2, 2, 713, 83, 3, 2, 2, 2, 714, 712, 3, 2, 2, 2, 715, 717, 8, 43, 1, 2, 716, 718, 7, 38, 2, 2, 717, 716, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 719, 3, 2, 2, 2, 719, 723, 5, 86, 44, 2, 720, 722, 5, 106, 54, 2, 721, 720, 3, 2, 2, 2, 722, 725, 3, 2, 2, 2, 723, 721, 3, 2, 2, 2, 723, 724, 3, 2, 2, 2, 724, 729, 3, 2, 2, 2, 725, 723, 3, 2, 2, 2, 726, 727, 9, 5, 2, 2, 727, 729, 5, 84, 43, 9, 728, 715, 3, 2, 2, 2, 728, 726, 3, 2, 2, 2, 729, 753, 3, 2, 2, 2, 730, 731, 12, 10, 2, 2, 731, 732, 7, 50, 2, 2, 732, 752, 5, 84, 43, 10, 733, 734, 12, 8, 2, 2, 734, 735, 9, 6, 2, 2, 735, 752, 5, 84, 43, 9, 736, 737, 12, 7, 2, 2, 737, 738, 9, 7, 2, 2, 738, 752, 5, 84, 43, 8, 739, 740, 12, 6, 2, 2, 740, 741, 9, 8, 2, 2, 741, 752, 5, 84, 43, 7, 742, 743, 12, 5, 2, 2, 743, 744, 7, 54, 2, 2, 744, 752, 5, 84, 43, 6, 745, 746, 12, 4, 2, 2, 746, 747, 7, 53, 2, 2, 747, 752, 5, 84, 43, 5, 748, 749, 12, 3, 2, 2, 749, 750, 7, 52, 2, 2, 750, 752, 5, 84, 43, 4, 751, 730, 3, 2, 2, 2, 751, 733, 3, 2, 2, 2, 751, 736, 3, 2, 2, 2, 751, 739, 3, 2, 2, 2, 751, 742, 3, 2, 2, 2, 751, 745, 3, 2, 2, 2, 751, 748, 3, 2, 2, 2, 752, 755, 3, 2, 2, 2, 753, 751, 3, 2, 2, 2, 753, 754, 3, 2, 2, 2, 754, 85, 3, 2, 2, 2, 755, 753, 3, 2, 2, 2, 756, 759, 7, 92, 2, 2, 757, 760, 5, 102, 52, 2, 758, 760, 5, 90, 46, 2, 759, 757, 3, 2, 2, 2, 759, 758, 3, 2, 2, 2, 759, 760, 3, 2, 2, 2, 760, 761, 3, 2, 2, 2, 761, 794, 7, 93, 2, 2, 762, 764, 7, 96, 2, 2, 763, 765, 5, 90, 46, 2, 764, 763, 3, 2, 2, 2, 764, 765, 3, 2, 2, 2, 765, 766, 3, 2, 2, 2, 766, 794, 7, 97, 2, 2, 767, 769, 7, 94, 2, 2, 768, 770, 5, 88, 45, 2, 769, 768, 3, 2, 2, 2, 769, 770, 3, 2, 2, 2, 770, 771, 3, 2, 2, 2, 771, 794, 7, 95, 2, 2, 772, 773, 7, 45, 2, 2, 773, 775, 5, 92, 47, 2, 774, 776, 7, 47, 2, 2, 775, 774, 3, 2, 2, 2, 775, 776, 3, 2, 2, 2, 776, 777, 3, 2, 2, 2, 777, 778, 7, 45, 2, 2, 778, 794, 3, 2, 2, 2, 779, 794, 7, 44, 2, 2, 780, 794, 5, 96, 49, 2, 781, 794, 7, 39, 2, 2, 782, 794, 7, 40, 2, 2, 783, 785, 7, 58, 2, 2, 784, 783, 3, 2, 2, 2, 784, 785, 3, 2, 2, 2, 785, 786, 3, 2, 2, 2, 786, 794, 5, 98, 50, 2, 787, 794, 7, 22, 2, 2, 788, 790, 7, 85, 2, 2, 789, 788, 3, 2, 2, 2, 790, 791, 3, 2, 2, 2, 791, 789, 3, 2, 2, 2, 791, 792, 3, 2, 2, 2, 792, 794, 3, 2, 2, 2, 793, 756, 3, 2, 2, 2, 793, 762, 3, 2, 2, 2, 793, 767, 3, 2, 2, 2, 793, 772, 3, 2, 2, 2, 793, 779, 3, 2, 2, 2, 793, 780, 3, 2, 2, 2, 793, 781, 3, 2, 2, 2, 793, 782, 3, 2, 2, 2, 793, 784, 3, 2, 2, 2, 793, 787, 3, 2, 2, 2, 793, 789, 3, 2, 2, 2, 794, 87, 3, 2, 2, 2, 795, 796, 5, 68, 35, 2, 796, 797, 7, 48, 2, 2, 797, 798, 5, 68, 35, 2, 798, 802, 3, 2, 2, 2, 799, 800, 7, 50, 2, 2, 800, 802, 5, 84, 43, 2, 801, 795, 3, 2, 2, 2, 801, 799, 3, 2, 2, 2, 802, 814, 3, 2, 2, 2, 803, 810, 7, 47, 2, 2, 804, 805, 5, 68, 35, 2, 805, 806, 7, 48, 2, 2, 806, 807, 5, 68, 35, 2, 807, 811, 3, 2, 2, 2, 808, 809, 7, 50, 2, 2, 809, 811, 5, 84, 43, 2, 810, 804, 3, 2, 2, 2, 810, 808, 3, 2, 2, 2, 811, 813, 3, 2, 2, 2, 812, 803, 3, 2, 2, 2, 813, 816, 3, 2, 2, 2, 814, 812, 3, 2, 2, 2, 814, 815, 3, 2, 2, 2, 815, 818, 3, 2, 2, 2, 816, 814, 3, 2, 2, 2, 817, 819, 7, 47, 2, 2, 818, 817, 3, 2, 2, 2, 818, 819, 3, 2, 2, 2, 819, 827, 3, 2, 2, 2, 820, 821, 5, 68, 35, 2, 821, 822, 7, 48, 2, 2, 822, 823, 5, 68, 35, 2, 823, 824, 5, 120, 61, 2, 824, 827, 3, 2, 2, 2, 825, 827, 5, 90, 46, 2, 826, 801, 3, 2, 2, 2, 826, 820, 3, 2, 2, 2, 826, 825, 3, 2, 2, 2, 827, 89, 3, 2, 2, 2, 828, 831, 5, 68, 35, 2, 829, 831, 5, 54, 28, 2, 830, 828, 3, 2, 2, 2, 830, 829, 3, 2, 2, 2, 831, 846, 3, 2, 2, 2, 832, 847, 5, 120, 61, 2, 833, 836, 7, 47, 2, 2, 834, 837, 5, 68, 35, 2, 835, 837, 5, 54, 28, 2, 836, 834, 3, 2, 2, 2, 836, 835, 3, 2, 2, 2, 837, 839, 3, 2, 2, 2, 838, 833, 3, 2, 2, 2, 839, 842, 3, 2, 2, 2, 840, 838, 3, 2, 2, 2, 840, 841, 3, 2, 2, 2, 841, 844, 3, 2, 2, 2, 842, 840, 3, 2, 2, 2, 843, 845, 7, 47, 2, 2, 844, 843, 3, 2, 2, 2, 844, 845, 3, 2, 2, 2, 845, 847, 3, 2, 2, 2, 846, 832, 3, 2, 2, 2, 846, 840, 3, 2, 2, 2, 847, 91, 3, 2, 2, 2, 848, 853, 5, 68, 35, 2, 849, 850, 7, 47, 2, 2, 850, 852, 5, 68, 35, 2, 851, 849, 3, 2, 2, 2, 852, 855, 3, 2, 2, 2, 853, 851, 3, 2, 2, 2, 853, 854, 3, 2, 2, 2, 854, 857, 3, 2, 2, 2, 855, 853, 3, 2, 2, 2, 856, 858, 7, 47, 2, 2, 857, 856, 3, 2, 2, 2, 857, 858, 3, 2, 2, 2, 858, 93, 3, 2, 2, 2, 859, 860, 8, 48, 1, 2, 860, 861, 5, 96, 49, 2, 861, 867, 3, 2, 2, 2, 862, 863, 12, 4, 2, 2, 863, 864, 7, 43, 2, 2, 864, 866, 5, 96, 49, 2, 865, 862, 3, 2, 2, 2, 866, 869, 3, 2, 2, 2, 867, 865, 3, 2, 2, 2, 867, 868, 3, 2, 2, 2, 868, 95, 3, 2, 2, 2, 869, 867, 3, 2, 2, 2, 870, 871, 9, 9, 2, 2, 871, 97, 3, 2, 2, 2, 872, 876, 5, 100, 51, 2, 873, 876, 7, 90, 2, 2, 874, 876, 7, 91, 2, 2, 875, 872, 3, 2, 2, 2, 875, 873, 3, 2, 2, 2, 875, 874, 3, 2, 2, 2, 876, 99, 3, 2, 2, 2, 877, 878, 9, 10, 2, 2, 878, 101, 3, 2, 2, 2, 879, 881, 7, 32, 2, 2, 880, 882, 5, 104, 53, 2, 881, 880, 3, 2, 2, 2, 881, 882, 3, 2, 2, 2, 882, 103, 3, 2, 2, 2, 883, 884, 7, 9, 2, 2, 884, 887, 5, 68, 35, 2, 885, 887, 5, 92, 47, 2, 886, 883, 3, 2, 2, 2, 886, 885, 3, 2, 2, 2, 887, 105, 3, 2, 2, 2, 888, 889, 7, 43, 2, 2, 889, 891, 5, 96, 49, 2, 890, 892, 5, 108, 55, 2, 891, 890, 3, 2, 2, 2, 891, 892, 3, 2, 2, 2, 892, 895, 3, 2, 2, 2, 893, 895, 5, 108, 55, 2, 894, 888, 3, 2, 2, 2, 894, 893, 3, 2, 2, 2, 895, 107, 3, 2, 2, 2, 896, 898, 7, 92, 2, 2, 897, 899, 5, 110, 56, 2, 898, 897, 3, 2, 2, 2, 898, 899, 3, 2, 2, 2, 899, 900, 3, 2, 2, 2, 900, 906, 7, 93, 2, 2, 901, 902, 7, 96, 2, 2, 902, 903, 5, 114, 58, 2, 903, 904, 7, 97, 2, 2, 904, 906, 3, 2, 2, 2, 905, 896, 3, 2, 2, 2, 905, 901, 3, 2, 2, 2, 906, 109, 3, 2, 2, 2, 907, 912, 5, 112, 57, 2, 908, 909, 7, 47, 2, 2, 909, 911, 5, 112, 57, 2, 910, 908, 3, 2, 2, 2, 911, 914, 3, 2, 2, 2, 912, 910, 3, 2, 2, 2, 912, 913, 3, 2, 2, 2, 913, 916, 3, 2, 2, 2, 914, 912, 3, 2, 2, 2, 915, 917, 7, 47, 2, 2, 916, 915, 3, 2, 2, 2, 916, 917, 3, 2, 2, 2, 917, 111, 3, 2, 2, 2, 918, 922, 5, 68, 35, 2, 919, 923, 5, 120, 61, 2, 920, 921, 7, 51, 2, 2, 921, 923, 5, 68, 35, 2, 922, 919, 3, 2, 2, 2, 922, 920, 3, 2, 2, 2, 922, 923, 3, 2, 2, 2, 923, 927, 3, 2, 2, 2, 924, 925, 9, 11, 2, 2, 925, 927, 5, 68, 35, 2, 926, 918, 3, 2, 2, 2, 926, 924, 3, 2, 2, 2, 927, 113, 3, 2, 2, 2, 928, 933, 5, 116, 59, 2, 929, 930, 7, 47, 2, 2, 930, 932, 5, 116, 59, 2, 931, 929, 3, 2, 2, 2, 932, 935, 3, 2, 2, 2, 933, 931, 3, 2, 2, 2, 933, 934, 3, 2, 2, 2, 934, 937, 3, 2, 2, 2, 935, 933, 3, 2, 2, 2, 936, 938, 7, 47, 2, 2, 937, 936, 3, 2, 2, 2, 937, 938, 3, 2, 2, 2, 938, 115, 3, 2, 2, 2, 939, 958, 7, 44, 2, 2, 940, 948, 5, 68, 35, 2, 941, 943, 7, 48, 2, 2, 942, 944, 5, 68, 35, 2, 943, 942, 3, 2, 2, 2, 943, 944, 3, 2, 2, 2, 944, 946, 3, 2, 2, 2, 945, 947, 5, 118, 60, 2, 946, 945, 3, 2, 2, 2, 946, 947, 3, 2, 2, 2, 947, 949, 3, 2, 2, 2, 948, 941, 3, 2, 2, 2, 948, 949, 3, 2, 2, 2, 949, 958, 3, 2, 2, 2, 950, 952, 7, 48, 2, 2, 951, 953, 5, 68, 35, 2, 952, 951, 3, 2, 2, 2, 952, 953, 3, 2, 2, 2, 953, 955, 3, 2, 2, 2, 954, 956, 5, 118, 60, 2, 955, 954, 3, 2, 2, 2, 955, 956, 3, 2, 2, 2, 956, 958, 3, 2, 2, 2, 957, 939, 3, 2, 2, 2, 957, 940, 3, 2, 2, 2, 957, 950, 3, 2, 2, 2, 958, 117, 3, 2, 2, 2, 959, 961, 7, 48, 2, 2, 960, 962, 5, 68, 35, 2, 961, 960, 3, 2, 2, 2, 961, 962, 3, 2, 2, 2, 962, 119, 3, 2, 2, 2, 963, 964, 7, 19, 2, 2, 964, 965, 5, 58, 30, 2, 965, 966, 7, 20, 2, 2, 966, 968, 5, 80, 41, 2, 967, 969, 5, 122, 62, 2, 968, 967, 3, 2, 2, 2, 968, 969, 3, 2, 2, 2, 969, 121, 3, 2, 2, 2, 970, 977, 5, 120, 61, 2, 971, 972, 7, 15, 2, 2, 972, 974, 5, 68, 35, 2, 973, 975, 5, 122, 62, 2, 974, 973, 3, 2, 2, 2, 974, 975, 3, 2, 2, 2, 975, 977, 3, 2, 2, 2, 976, 970, 3, 2, 2, 2, 976, 971, 3, 2, 2, 2, 977, 123, 3, 2, 2, 2, 153, 127, 136, 140, 142, 148, 153, 162, 166, 173, 176, 185, 193, 196, 199, 202, 205, 213, 222, 227, 229, 237, 241, 247, 250, 270, 284, 286, 295, 298, 304, 310, 315, 323, 328, 332, 335, 338, 342, 344, 357, 363, 366, 371, 378, 382, 388, 397, 401, 409, 412, 414, 425, 433, 435, 437, 441, 457, 467, 469, 477, 486, 491, 496, 503, 505, 513, 517, 523, 527, 530, 541, 546, 549, 556, 563, 565, 572, 576, 583, 587, 592, 599, 605, 613, 617, 621, 626, 631, 635, 638, 641, 645, 647, 654, 660, 663, 675, 683, 685, 700, 705, 707, 712, 717, 723, 728, 751, 753, 759, 764, 769, 775, 784, 791, 793, 801, 810, 814, 818, 826, 830, 836, 840, 844, 846, 853, 857, 867, 875, 881, 886, 891, 894, 898, 905, 912, 916, 922, 926, 933, 937, 943, 946, 948, 952, 955, 957, 961, 968, 974, 976] \ No newline at end of file diff --git a/languages/python/PythonParser.tokens b/languages/python/PythonParser.tokens new file mode 100644 index 0000000000000000000000000000000000000000..1282117c8ef2e08acdfa44e74aad5fe6a8549244 --- /dev/null +++ b/languages/python/PythonParser.tokens @@ -0,0 +1,185 @@ +INDENT=1 +DEDENT=2 +LINE_BREAK=3 +DEF=4 +RETURN=5 +RAISE=6 +FROM=7 +IMPORT=8 +NONLOCAL=9 +AS=10 +GLOBAL=11 +ASSERT=12 +IF=13 +ELIF=14 +ELSE=15 +WHILE=16 +FOR=17 +IN=18 +TRY=19 +NONE=20 +FINALLY=21 +WITH=22 +EXCEPT=23 +LAMBDA=24 +OR=25 +AND=26 +NOT=27 +IS=28 +CLASS=29 +YIELD=30 +DEL=31 +PASS=32 +CONTINUE=33 +BREAK=34 +ASYNC=35 +AWAIT=36 +PRINT=37 +EXEC=38 +TRUE=39 +FALSE=40 +DOT=41 +ELLIPSIS=42 +REVERSE_QUOTE=43 +STAR=44 +COMMA=45 +COLON=46 +SEMI_COLON=47 +POWER=48 +ASSIGN=49 +OR_OP=50 +XOR=51 +AND_OP=52 +LEFT_SHIFT=53 +RIGHT_SHIFT=54 +ADD=55 +MINUS=56 +DIV=57 +MOD=58 +IDIV=59 +NOT_OP=60 +LESS_THAN=61 +GREATER_THAN=62 +EQUALS=63 +GT_EQ=64 +LT_EQ=65 +NOT_EQ_1=66 +NOT_EQ_2=67 +AT=68 +ARROW=69 +ADD_ASSIGN=70 +SUB_ASSIGN=71 +MULT_ASSIGN=72 +AT_ASSIGN=73 +DIV_ASSIGN=74 +MOD_ASSIGN=75 +AND_ASSIGN=76 +OR_ASSIGN=77 +XOR_ASSIGN=78 +LEFT_SHIFT_ASSIGN=79 +RIGHT_SHIFT_ASSIGN=80 +POWER_ASSIGN=81 +IDIV_ASSIGN=82 +STRING=83 +DECIMAL_INTEGER=84 +OCT_INTEGER=85 +HEX_INTEGER=86 +BIN_INTEGER=87 +IMAG_NUMBER=88 +FLOAT_NUMBER=89 +OPEN_PAREN=90 +CLOSE_PAREN=91 +OPEN_BRACE=92 +CLOSE_BRACE=93 +OPEN_BRACKET=94 +CLOSE_BRACKET=95 +NAME=96 +LINE_JOIN=97 +NEWLINE=98 +WS=99 +COMMENT=100 +'def'=4 +'return'=5 +'raise'=6 +'from'=7 +'import'=8 +'nonlocal'=9 +'as'=10 +'global'=11 +'assert'=12 +'if'=13 +'elif'=14 +'else'=15 +'while'=16 +'for'=17 +'in'=18 +'try'=19 +'None'=20 +'finally'=21 +'with'=22 +'except'=23 +'lambda'=24 +'or'=25 +'and'=26 +'not'=27 +'is'=28 +'class'=29 +'yield'=30 +'del'=31 +'pass'=32 +'continue'=33 +'break'=34 +'async'=35 +'await'=36 +'print'=37 +'exec'=38 +'True'=39 +'False'=40 +'.'=41 +'...'=42 +'`'=43 +'*'=44 +','=45 +':'=46 +';'=47 +'**'=48 +'='=49 +'|'=50 +'^'=51 +'&'=52 +'<<'=53 +'>>'=54 +'+'=55 +'-'=56 +'/'=57 +'%'=58 +'//'=59 +'~'=60 +'<'=61 +'>'=62 +'=='=63 +'>='=64 +'<='=65 +'<>'=66 +'!='=67 +'@'=68 +'->'=69 +'+='=70 +'-='=71 +'*='=72 +'@='=73 +'/='=74 +'%='=75 +'&='=76 +'|='=77 +'^='=78 +'<<='=79 +'>>='=80 +'**='=81 +'//='=82 +'('=90 +')'=91 +'{'=92 +'}'=93 +'['=94 +']'=95 diff --git a/languages/python/python_base_lexer.go b/languages/python/python_base_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..eeb37f83e5a6daf418338621b1c4c07a443518ac --- /dev/null +++ b/languages/python/python_base_lexer.go @@ -0,0 +1,182 @@ +package parser + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/pkg/infrastructure/container" +) + +var TabSize = 8 +var indents *container.Stack +var buffer []antlr.Token + +func init() { + indents = container.NewStack() + buffer = make([]antlr.Token, 32) +} + +type PythonBaseLexer struct { + *antlr.BaseLexer + + firstTokenIndex int + lastTokenIndex int + opened int + lastToken antlr.Token +} + +func (l *PythonBaseLexer) EmitDefaultToken(tokenType int) { + l.EmitTokenByType(tokenType, antlr.LexerDefaultTokenChannel, "") +} + +func (l *PythonBaseLexer) EmitTokenByType(tokenType int, channel int, text string) { + cpos := l.GetCharPositionInLine() + lpos := l.GetLine() + charIndex := l.GetCharIndex() + commonToken := antlr.NewCommonTokenFactory(true).Create( + l.GetTokenSourceCharStreamPair(), + tokenType, + text, + channel, + charIndex-len(text), + charIndex, + lpos, + cpos) + + l.EmitToken(commonToken) +} + +func (l *PythonBaseLexer) Emit() antlr.Token { + token := l.BaseLexer.Emit() + l.EmitToken(token) + return token +} + +// override not success +func (l *PythonBaseLexer) EmitToken(token antlr.Token) { + l.BaseLexer.EmitToken(token) + + if buffer[l.firstTokenIndex] != nil { + l.lastTokenIndex = l.IncTokenInd(l.lastTokenIndex) + + if l.firstTokenIndex == l.lastTokenIndex { + var newArray = make([]antlr.Token, len(buffer)*2) + destIndex := len(newArray) - (len(buffer) - l.firstTokenIndex) + copy(newArray, buffer) + copy(newArray, buffer[:len(buffer)-l.firstTokenIndex]) + + l.firstTokenIndex = destIndex + buffer = newArray + } + } + + buffer[l.lastTokenIndex] = token + l.lastToken = token +} + +func (l *PythonBaseLexer) IncIndentLevel() { + l.opened++ +} + +func (l *PythonBaseLexer) DecIndentLevel() { + if l.opened > 0 { + l.opened-- + } +} + +func (l *PythonBaseLexer) NextToken() antlr.Token { + if l.GetInputStream().LA(1) == antlr.TokenEOF && indents.Len() > 0 { + if buffer[l.lastTokenIndex] == nil || buffer[l.lastTokenIndex].GetTokenType() != PythonLexerLINE_BREAK { + l.EmitDefaultToken(PythonLexerLINE_BREAK) + } + + for indents.Len() != 0 { + l.EmitDefaultToken(PythonLexerDEDENT) + indents.Pop() + } + } + + l.BaseLexer.Virt = l + next := l.BaseLexer.NextToken() + + if buffer[l.firstTokenIndex] == nil { + return next + } + + var result = buffer[l.firstTokenIndex] + buffer[l.firstTokenIndex] = nil + + if l.firstTokenIndex != l.lastTokenIndex { + l.firstTokenIndex = l.IncTokenInd(l.firstTokenIndex) + } + + return result +} + +func (l *PythonBaseLexer) HandleNewLine() { + l.EmitTokenByType(PythonLexerNEWLINE, antlr.LexerHidden, l.GetText()) + + next := string(rune(l.GetInputStream().LA(1))) + + // Process whitespaces in HandleSpaces + if next != " " && next != "\t" && l.IsNotNewLineOrComment(next) { + l.ProcessNewLine(0) + } +} + +func (l *PythonBaseLexer) HandleSpaces() { + next := string(rune(l.GetInputStream().LA(1))) + + // class lost space here + if (l.lastToken == nil || l.lastToken.GetTokenType() == PythonLexerNEWLINE) && l.IsNotNewLineOrComment(next) { + // Calculates the indentation of the provided spaces, taking the + // following rules into account: + // + // "Tabs are replaced (from left to right) by one to eight spaces + // such that the total number of characters up to and including + // the replacement is a multiple of eight [...]" + // + // -- https://docs.python.org/3.1/reference/lexical_analysis.html#indentation + + indent := 0 + text := l.GetText() + + for i := 0; i < len(text);i++ { + if text[i] == '\t' { + indent = indent + TabSize - indent%TabSize + } else { + indent = indent + 1 + } + } + + l.ProcessNewLine(indent) + } + + l.EmitTokenByType(PythonLexerWS, antlr.LexerHidden, l.GetText()) +} + +func (l *PythonBaseLexer) IsNotNewLineOrComment(next string) bool { + return l.opened == 0 && next != "\r" && next != "\n" && next != "\f" && next != "#" +} + +func (l *PythonBaseLexer) IncTokenInd(index int) int { + return (index + 1) % len(buffer) +} + +func (l *PythonBaseLexer) ProcessNewLine(indent int) { + l.EmitDefaultToken(PythonLexerLINE_BREAK) + + var previous = 0 + if indents.Len() != 0 { + previous = indents.Peak().(int) + } + + if indent > previous { + indents.Push(indent) + l.EmitDefaultToken(PythonLexerINDENT) + } else { + for indents.Len() != 0 && indents.Peak().(int) > indent { + l.EmitDefaultToken(PythonLexerDEDENT) + indents.Pop() + } + } + +} diff --git a/languages/python/python_base_parser.go b/languages/python/python_base_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..b702172dfa2bb85e21d6183f0bdf402fdd136600 --- /dev/null +++ b/languages/python/python_base_parser.go @@ -0,0 +1,26 @@ +package parser + +import "github.com/antlr/antlr4/runtime/Go/antlr" + +var ( + Autodetect = 0 + Python2 = 2 + Python3 = 3 +) + +type PythonBaseParser struct { + *antlr.BaseParser + Version int +} + +func (p *PythonBaseParser) CheckVersion(ver int) bool { + return p.Version == Autodetect || p.Version == ver +} + +func (p *PythonBaseParser) SetVersion(ver int) { + if ver == 2 { + p.Version = Python2 + } else if ver == 3 { + p.Version = Python3 + } +} diff --git a/languages/python/python_lexer.go b/languages/python/python_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..dbf6db8ed42c8831e047ffe0e4e3fafda10b9abc --- /dev/null +++ b/languages/python/python_lexer.go @@ -0,0 +1,789 @@ +// Code generated from PythonLexer.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser + +import ( + "fmt" + "unicode" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import error +var _ = fmt.Printf +var _ = unicode.IsLetter + +var serializedLexerAtn = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 102, 856, + 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, + 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, + 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, + 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, + 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, + 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, + 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, + 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, + 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, + 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, + 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, + 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, + 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, + 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, + 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, + 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, + 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, + 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, + 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, + 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, + 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, + 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, + 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, + 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, + 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, + 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, + 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, + 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, + 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, + 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, + 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, + 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, + 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, + 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, + 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, + 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, + 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, + 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, + 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, + 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, + 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, + 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, + 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, + 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 60, 3, 60, + 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 64, 3, + 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 68, + 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, + 71, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 75, + 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, + 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, + 3, 81, 3, 81, 3, 81, 5, 81, 545, 10, 81, 3, 81, 3, 81, 5, 81, 549, 10, + 81, 5, 81, 551, 10, 81, 3, 81, 3, 81, 5, 81, 555, 10, 81, 3, 81, 3, 81, + 5, 81, 559, 10, 81, 3, 81, 3, 81, 5, 81, 563, 10, 81, 3, 81, 3, 81, 5, + 81, 567, 10, 81, 5, 81, 569, 10, 81, 3, 82, 3, 82, 7, 82, 573, 10, 82, + 12, 82, 14, 82, 576, 11, 82, 3, 82, 6, 82, 579, 10, 82, 13, 82, 14, 82, + 580, 5, 82, 583, 10, 82, 3, 83, 3, 83, 3, 83, 6, 83, 588, 10, 83, 13, 83, + 14, 83, 589, 3, 84, 3, 84, 3, 84, 6, 84, 595, 10, 84, 13, 84, 14, 84, 596, + 3, 85, 3, 85, 3, 85, 6, 85, 602, 10, 85, 13, 85, 14, 85, 603, 3, 86, 3, + 86, 6, 86, 608, 10, 86, 13, 86, 14, 86, 609, 5, 86, 612, 10, 86, 3, 86, + 3, 86, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 90, 3, + 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, + 3, 94, 3, 94, 7, 94, 638, 10, 94, 12, 94, 14, 94, 641, 11, 94, 3, 95, 3, + 95, 7, 95, 645, 10, 95, 12, 95, 14, 95, 648, 11, 95, 3, 95, 3, 95, 3, 95, + 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 6, 97, 660, 10, 97, 13, + 97, 14, 97, 661, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 7, 98, 670, + 10, 98, 12, 98, 14, 98, 673, 11, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, + 3, 99, 5, 99, 681, 10, 99, 3, 99, 7, 99, 684, 10, 99, 12, 99, 14, 99, 687, + 11, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 5, 99, 694, 10, 99, 3, 99, 7, + 99, 697, 10, 99, 12, 99, 14, 99, 700, 11, 99, 3, 99, 5, 99, 703, 10, 99, + 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 7, 100, 710, 10, 100, 12, 100, + 14, 100, 713, 11, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, + 3, 100, 3, 100, 7, 100, 723, 10, 100, 12, 100, 14, 100, 726, 11, 100, 3, + 100, 3, 100, 3, 100, 5, 100, 731, 10, 100, 3, 101, 3, 101, 3, 101, 3, 101, + 5, 101, 737, 10, 101, 5, 101, 739, 10, 101, 3, 102, 5, 102, 742, 10, 102, + 3, 102, 3, 102, 3, 103, 6, 103, 747, 10, 103, 13, 103, 14, 103, 748, 3, + 103, 5, 103, 752, 10, 103, 3, 103, 3, 103, 5, 103, 756, 10, 103, 3, 103, + 6, 103, 759, 10, 103, 13, 103, 14, 103, 760, 3, 103, 5, 103, 764, 10, 103, + 3, 104, 7, 104, 767, 10, 104, 12, 104, 14, 104, 770, 11, 104, 3, 104, 3, + 104, 6, 104, 774, 10, 104, 13, 104, 14, 104, 775, 3, 104, 6, 104, 779, + 10, 104, 13, 104, 14, 104, 780, 3, 104, 5, 104, 784, 10, 104, 3, 105, 3, + 105, 3, 105, 7, 105, 789, 10, 105, 12, 105, 14, 105, 792, 11, 105, 3, 105, + 3, 105, 3, 105, 3, 105, 7, 105, 798, 10, 105, 12, 105, 14, 105, 801, 11, + 105, 3, 105, 5, 105, 804, 10, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, + 7, 106, 811, 10, 106, 12, 106, 14, 106, 814, 11, 106, 3, 106, 3, 106, 3, + 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 7, 106, 824, 10, 106, 12, + 106, 14, 106, 827, 11, 106, 3, 106, 3, 106, 3, 106, 5, 106, 832, 10, 106, + 3, 107, 3, 107, 5, 107, 836, 10, 107, 3, 108, 5, 108, 839, 10, 108, 3, + 109, 5, 109, 842, 10, 109, 3, 110, 5, 110, 845, 10, 110, 3, 111, 3, 111, + 3, 111, 3, 112, 3, 112, 5, 112, 852, 10, 112, 3, 113, 5, 113, 855, 10, + 113, 6, 711, 724, 812, 825, 2, 114, 3, 6, 5, 7, 7, 8, 9, 9, 11, 10, 13, + 11, 15, 12, 17, 13, 19, 14, 21, 15, 23, 16, 25, 17, 27, 18, 29, 19, 31, + 20, 33, 21, 35, 22, 37, 23, 39, 24, 41, 25, 43, 26, 45, 27, 47, 28, 49, + 29, 51, 30, 53, 31, 55, 32, 57, 33, 59, 34, 61, 35, 63, 36, 65, 37, 67, + 38, 69, 39, 71, 40, 73, 41, 75, 42, 77, 43, 79, 44, 81, 45, 83, 46, 85, + 47, 87, 48, 89, 49, 91, 50, 93, 51, 95, 52, 97, 53, 99, 54, 101, 55, 103, + 56, 105, 57, 107, 58, 109, 59, 111, 60, 113, 61, 115, 62, 117, 63, 119, + 64, 121, 65, 123, 66, 125, 67, 127, 68, 129, 69, 131, 70, 133, 71, 135, + 72, 137, 73, 139, 74, 141, 75, 143, 76, 145, 77, 147, 78, 149, 79, 151, + 80, 153, 81, 155, 82, 157, 83, 159, 84, 161, 85, 163, 86, 165, 87, 167, + 88, 169, 89, 171, 90, 173, 91, 175, 92, 177, 93, 179, 94, 181, 95, 183, + 96, 185, 97, 187, 98, 189, 99, 191, 100, 193, 101, 195, 102, 197, 2, 199, + 2, 201, 2, 203, 2, 205, 2, 207, 2, 209, 2, 211, 2, 213, 2, 215, 2, 217, + 2, 219, 2, 221, 2, 223, 2, 225, 2, 3, 2, 27, 4, 2, 87, 87, 119, 119, 4, + 2, 72, 72, 104, 104, 4, 2, 84, 84, 116, 116, 4, 2, 68, 68, 100, 100, 3, + 2, 51, 59, 3, 2, 50, 59, 4, 2, 81, 81, 113, 113, 3, 2, 50, 57, 4, 2, 90, + 90, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 51, 4, 2, 76, 76, + 108, 108, 4, 2, 11, 11, 34, 34, 4, 2, 12, 12, 14, 15, 6, 2, 12, 12, 15, + 15, 41, 41, 94, 94, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 3, 2, 94, 94, + 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 7, 2, 2, 11, 13, 14, 16, + 40, 42, 93, 95, 129, 7, 2, 2, 11, 13, 14, 16, 35, 37, 93, 95, 129, 4, 2, + 2, 93, 95, 129, 3, 2, 2, 129, 150, 2, 50, 59, 770, 881, 1157, 1160, 1427, + 1467, 1469, 1471, 1473, 1473, 1475, 1476, 1478, 1479, 1481, 1481, 1554, + 1559, 1613, 1632, 1634, 1643, 1650, 1650, 1752, 1758, 1761, 1766, 1769, + 1770, 1772, 1775, 1778, 1787, 1811, 1811, 1842, 1868, 1960, 1970, 2307, + 2309, 2366, 2366, 2368, 2383, 2387, 2390, 2404, 2405, 2408, 2417, 2435, + 2437, 2494, 2494, 2496, 2502, 2505, 2506, 2509, 2511, 2521, 2521, 2532, + 2533, 2536, 2545, 2563, 2565, 2622, 2622, 2624, 2628, 2633, 2634, 2637, + 2639, 2664, 2675, 2691, 2693, 2750, 2750, 2752, 2759, 2761, 2763, 2765, + 2767, 2788, 2789, 2792, 2801, 2819, 2821, 2878, 2878, 2880, 2885, 2889, + 2890, 2893, 2895, 2904, 2905, 2920, 2929, 2948, 2948, 3008, 3012, 3016, + 3018, 3020, 3023, 3033, 3033, 3048, 3057, 3075, 3077, 3136, 3142, 3144, + 3146, 3148, 3151, 3159, 3160, 3176, 3185, 3204, 3205, 3262, 3262, 3264, + 3270, 3272, 3274, 3276, 3279, 3287, 3288, 3304, 3313, 3332, 3333, 3392, + 3397, 3400, 3402, 3404, 3407, 3417, 3417, 3432, 3441, 3460, 3461, 3532, + 3532, 3537, 3542, 3544, 3544, 3546, 3553, 3572, 3573, 3635, 3635, 3638, + 3644, 3657, 3664, 3666, 3675, 3763, 3763, 3766, 3771, 3773, 3774, 3786, + 3791, 3794, 3803, 3866, 3867, 3874, 3883, 3895, 3895, 3897, 3897, 3899, + 3899, 3904, 3905, 3955, 3974, 3976, 3977, 3986, 3993, 3995, 4030, 4040, + 4040, 4142, 4148, 4152, 4155, 4162, 4171, 4184, 4187, 4961, 4961, 4971, + 4979, 5908, 5910, 5940, 5942, 5972, 5973, 6004, 6005, 6072, 6101, 6111, + 6111, 6114, 6123, 6157, 6159, 6162, 6171, 6315, 6315, 6434, 6445, 6450, + 6461, 6472, 6481, 6578, 6594, 6602, 6603, 6610, 6619, 6681, 6685, 7618, + 7621, 8257, 8258, 8278, 8278, 8402, 8414, 8419, 8419, 8423, 8429, 12332, + 12337, 12443, 12444, 43012, 43012, 43016, 43016, 43021, 43021, 43045, 43049, + 64288, 64288, 65026, 65041, 65058, 65061, 65077, 65078, 65103, 65105, 65298, + 65307, 65345, 65345, 297, 2, 67, 92, 97, 97, 99, 124, 172, 172, 183, 183, + 188, 188, 194, 216, 218, 248, 250, 579, 594, 707, 712, 723, 738, 742, 752, + 752, 892, 892, 904, 904, 906, 908, 910, 910, 912, 931, 933, 976, 978, 1015, + 1017, 1155, 1164, 1232, 1234, 1275, 1282, 1297, 1331, 1368, 1371, 1371, + 1379, 1417, 1490, 1516, 1522, 1524, 1571, 1596, 1602, 1612, 1648, 1649, + 1651, 1749, 1751, 1751, 1767, 1768, 1776, 1777, 1788, 1790, 1793, 1793, + 1810, 1810, 1812, 1841, 1871, 1903, 1922, 1959, 1971, 1971, 2310, 2363, + 2367, 2367, 2386, 2386, 2394, 2403, 2431, 2431, 2439, 2446, 2449, 2450, + 2453, 2474, 2476, 2482, 2484, 2484, 2488, 2491, 2495, 2495, 2512, 2512, + 2526, 2527, 2529, 2531, 2546, 2547, 2567, 2572, 2577, 2578, 2581, 2602, + 2604, 2610, 2612, 2613, 2615, 2616, 2618, 2619, 2651, 2654, 2656, 2656, + 2676, 2678, 2695, 2703, 2705, 2707, 2709, 2730, 2732, 2738, 2740, 2741, + 2743, 2747, 2751, 2751, 2770, 2770, 2786, 2787, 2823, 2830, 2833, 2834, + 2837, 2858, 2860, 2866, 2868, 2869, 2871, 2875, 2879, 2879, 2910, 2911, + 2913, 2915, 2931, 2931, 2949, 2949, 2951, 2956, 2960, 2962, 2964, 2967, + 2971, 2972, 2974, 2974, 2976, 2977, 2981, 2982, 2986, 2988, 2992, 3003, + 3079, 3086, 3088, 3090, 3092, 3114, 3116, 3125, 3127, 3131, 3170, 3171, + 3207, 3214, 3216, 3218, 3220, 3242, 3244, 3253, 3255, 3259, 3263, 3263, + 3296, 3296, 3298, 3299, 3335, 3342, 3344, 3346, 3348, 3370, 3372, 3387, + 3426, 3427, 3463, 3480, 3484, 3507, 3509, 3517, 3519, 3519, 3522, 3528, + 3587, 3634, 3636, 3637, 3650, 3656, 3715, 3716, 3718, 3718, 3721, 3722, + 3724, 3724, 3727, 3727, 3734, 3737, 3739, 3745, 3747, 3749, 3751, 3751, + 3753, 3753, 3756, 3757, 3759, 3762, 3764, 3765, 3775, 3775, 3778, 3782, + 3784, 3784, 3806, 3807, 3842, 3842, 3906, 3913, 3915, 3948, 3978, 3981, + 4098, 4131, 4133, 4137, 4139, 4140, 4178, 4183, 4258, 4295, 4306, 4348, + 4350, 4350, 4354, 4443, 4449, 4516, 4522, 4603, 4610, 4682, 4684, 4687, + 4690, 4696, 4698, 4698, 4700, 4703, 4706, 4746, 4748, 4751, 4754, 4786, + 4788, 4791, 4794, 4800, 4802, 4802, 4804, 4807, 4810, 4824, 4826, 4882, + 4884, 4887, 4890, 4956, 4994, 5009, 5026, 5110, 5123, 5742, 5745, 5752, + 5763, 5788, 5794, 5868, 5872, 5874, 5890, 5902, 5904, 5907, 5922, 5939, + 5954, 5971, 5986, 5998, 6000, 6002, 6018, 6069, 6105, 6105, 6110, 6110, + 6178, 6265, 6274, 6314, 6402, 6430, 6482, 6511, 6514, 6518, 6530, 6571, + 6595, 6601, 6658, 6680, 7426, 7617, 7682, 7837, 7842, 7931, 7938, 7959, + 7962, 7967, 7970, 8007, 8010, 8015, 8018, 8025, 8027, 8027, 8029, 8029, + 8031, 8031, 8033, 8063, 8066, 8118, 8120, 8126, 8128, 8128, 8132, 8134, + 8136, 8142, 8146, 8149, 8152, 8157, 8162, 8174, 8180, 8182, 8184, 8190, + 8307, 8307, 8321, 8321, 8338, 8342, 8452, 8452, 8457, 8457, 8460, 8469, + 8471, 8471, 8474, 8479, 8486, 8486, 8488, 8488, 8490, 8490, 8492, 8499, + 8501, 8507, 8510, 8513, 8519, 8523, 8546, 8581, 11266, 11312, 11314, 11360, + 11394, 11494, 11522, 11559, 11570, 11623, 11633, 11633, 11650, 11672, 11682, + 11688, 11690, 11696, 11698, 11704, 11706, 11712, 11714, 11720, 11722, 11728, + 11730, 11736, 11738, 11744, 12295, 12297, 12323, 12331, 12339, 12343, 12346, + 12350, 12355, 12440, 12445, 12449, 12451, 12540, 12542, 12545, 12551, 12590, + 12595, 12688, 12706, 12729, 12786, 12801, 13314, 19895, 19970, 40893, 40962, + 42126, 43010, 43011, 43013, 43015, 43017, 43020, 43022, 43044, 44034, 55205, + 63746, 64047, 64050, 64108, 64114, 64219, 64258, 64264, 64277, 64281, 64287, + 64287, 64289, 64298, 64300, 64312, 64314, 64318, 64320, 64320, 64322, 64323, + 64325, 64326, 64328, 64435, 64469, 64831, 64850, 64913, 64916, 64969, 65010, + 65021, 65138, 65142, 65144, 65278, 65315, 65340, 65347, 65372, 65384, 65472, + 65476, 65481, 65484, 65489, 65492, 65497, 65500, 65502, 2, 894, 2, 3, 3, + 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, + 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, + 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, + 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, + 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, + 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, + 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, + 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, + 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, + 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, + 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, + 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, + 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, + 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, + 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, + 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, + 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, + 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, + 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, + 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, + 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, + 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, + 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, + 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, + 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, + 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 3, + 227, 3, 2, 2, 2, 5, 231, 3, 2, 2, 2, 7, 238, 3, 2, 2, 2, 9, 244, 3, 2, + 2, 2, 11, 249, 3, 2, 2, 2, 13, 256, 3, 2, 2, 2, 15, 265, 3, 2, 2, 2, 17, + 268, 3, 2, 2, 2, 19, 275, 3, 2, 2, 2, 21, 282, 3, 2, 2, 2, 23, 285, 3, + 2, 2, 2, 25, 290, 3, 2, 2, 2, 27, 295, 3, 2, 2, 2, 29, 301, 3, 2, 2, 2, + 31, 305, 3, 2, 2, 2, 33, 308, 3, 2, 2, 2, 35, 312, 3, 2, 2, 2, 37, 317, + 3, 2, 2, 2, 39, 325, 3, 2, 2, 2, 41, 330, 3, 2, 2, 2, 43, 337, 3, 2, 2, + 2, 45, 344, 3, 2, 2, 2, 47, 347, 3, 2, 2, 2, 49, 351, 3, 2, 2, 2, 51, 355, + 3, 2, 2, 2, 53, 358, 3, 2, 2, 2, 55, 364, 3, 2, 2, 2, 57, 370, 3, 2, 2, + 2, 59, 374, 3, 2, 2, 2, 61, 379, 3, 2, 2, 2, 63, 388, 3, 2, 2, 2, 65, 394, + 3, 2, 2, 2, 67, 400, 3, 2, 2, 2, 69, 406, 3, 2, 2, 2, 71, 412, 3, 2, 2, + 2, 73, 417, 3, 2, 2, 2, 75, 422, 3, 2, 2, 2, 77, 428, 3, 2, 2, 2, 79, 430, + 3, 2, 2, 2, 81, 434, 3, 2, 2, 2, 83, 436, 3, 2, 2, 2, 85, 438, 3, 2, 2, + 2, 87, 440, 3, 2, 2, 2, 89, 442, 3, 2, 2, 2, 91, 444, 3, 2, 2, 2, 93, 447, + 3, 2, 2, 2, 95, 449, 3, 2, 2, 2, 97, 451, 3, 2, 2, 2, 99, 453, 3, 2, 2, + 2, 101, 455, 3, 2, 2, 2, 103, 458, 3, 2, 2, 2, 105, 461, 3, 2, 2, 2, 107, + 463, 3, 2, 2, 2, 109, 465, 3, 2, 2, 2, 111, 467, 3, 2, 2, 2, 113, 469, + 3, 2, 2, 2, 115, 472, 3, 2, 2, 2, 117, 474, 3, 2, 2, 2, 119, 476, 3, 2, + 2, 2, 121, 478, 3, 2, 2, 2, 123, 481, 3, 2, 2, 2, 125, 484, 3, 2, 2, 2, + 127, 487, 3, 2, 2, 2, 129, 490, 3, 2, 2, 2, 131, 493, 3, 2, 2, 2, 133, + 495, 3, 2, 2, 2, 135, 498, 3, 2, 2, 2, 137, 501, 3, 2, 2, 2, 139, 504, + 3, 2, 2, 2, 141, 507, 3, 2, 2, 2, 143, 510, 3, 2, 2, 2, 145, 513, 3, 2, + 2, 2, 147, 516, 3, 2, 2, 2, 149, 519, 3, 2, 2, 2, 151, 522, 3, 2, 2, 2, + 153, 525, 3, 2, 2, 2, 155, 529, 3, 2, 2, 2, 157, 533, 3, 2, 2, 2, 159, + 537, 3, 2, 2, 2, 161, 568, 3, 2, 2, 2, 163, 582, 3, 2, 2, 2, 165, 584, + 3, 2, 2, 2, 167, 591, 3, 2, 2, 2, 169, 598, 3, 2, 2, 2, 171, 611, 3, 2, + 2, 2, 173, 615, 3, 2, 2, 2, 175, 617, 3, 2, 2, 2, 177, 620, 3, 2, 2, 2, + 179, 623, 3, 2, 2, 2, 181, 626, 3, 2, 2, 2, 183, 629, 3, 2, 2, 2, 185, + 632, 3, 2, 2, 2, 187, 635, 3, 2, 2, 2, 189, 642, 3, 2, 2, 2, 191, 653, + 3, 2, 2, 2, 193, 659, 3, 2, 2, 2, 195, 667, 3, 2, 2, 2, 197, 702, 3, 2, + 2, 2, 199, 730, 3, 2, 2, 2, 201, 738, 3, 2, 2, 2, 203, 741, 3, 2, 2, 2, + 205, 763, 3, 2, 2, 2, 207, 783, 3, 2, 2, 2, 209, 803, 3, 2, 2, 2, 211, + 831, 3, 2, 2, 2, 213, 835, 3, 2, 2, 2, 215, 838, 3, 2, 2, 2, 217, 841, + 3, 2, 2, 2, 219, 844, 3, 2, 2, 2, 221, 846, 3, 2, 2, 2, 223, 851, 3, 2, + 2, 2, 225, 854, 3, 2, 2, 2, 227, 228, 7, 102, 2, 2, 228, 229, 7, 103, 2, + 2, 229, 230, 7, 104, 2, 2, 230, 4, 3, 2, 2, 2, 231, 232, 7, 116, 2, 2, + 232, 233, 7, 103, 2, 2, 233, 234, 7, 118, 2, 2, 234, 235, 7, 119, 2, 2, + 235, 236, 7, 116, 2, 2, 236, 237, 7, 112, 2, 2, 237, 6, 3, 2, 2, 2, 238, + 239, 7, 116, 2, 2, 239, 240, 7, 99, 2, 2, 240, 241, 7, 107, 2, 2, 241, + 242, 7, 117, 2, 2, 242, 243, 7, 103, 2, 2, 243, 8, 3, 2, 2, 2, 244, 245, + 7, 104, 2, 2, 245, 246, 7, 116, 2, 2, 246, 247, 7, 113, 2, 2, 247, 248, + 7, 111, 2, 2, 248, 10, 3, 2, 2, 2, 249, 250, 7, 107, 2, 2, 250, 251, 7, + 111, 2, 2, 251, 252, 7, 114, 2, 2, 252, 253, 7, 113, 2, 2, 253, 254, 7, + 116, 2, 2, 254, 255, 7, 118, 2, 2, 255, 12, 3, 2, 2, 2, 256, 257, 7, 112, + 2, 2, 257, 258, 7, 113, 2, 2, 258, 259, 7, 112, 2, 2, 259, 260, 7, 110, + 2, 2, 260, 261, 7, 113, 2, 2, 261, 262, 7, 101, 2, 2, 262, 263, 7, 99, + 2, 2, 263, 264, 7, 110, 2, 2, 264, 14, 3, 2, 2, 2, 265, 266, 7, 99, 2, + 2, 266, 267, 7, 117, 2, 2, 267, 16, 3, 2, 2, 2, 268, 269, 7, 105, 2, 2, + 269, 270, 7, 110, 2, 2, 270, 271, 7, 113, 2, 2, 271, 272, 7, 100, 2, 2, + 272, 273, 7, 99, 2, 2, 273, 274, 7, 110, 2, 2, 274, 18, 3, 2, 2, 2, 275, + 276, 7, 99, 2, 2, 276, 277, 7, 117, 2, 2, 277, 278, 7, 117, 2, 2, 278, + 279, 7, 103, 2, 2, 279, 280, 7, 116, 2, 2, 280, 281, 7, 118, 2, 2, 281, + 20, 3, 2, 2, 2, 282, 283, 7, 107, 2, 2, 283, 284, 7, 104, 2, 2, 284, 22, + 3, 2, 2, 2, 285, 286, 7, 103, 2, 2, 286, 287, 7, 110, 2, 2, 287, 288, 7, + 107, 2, 2, 288, 289, 7, 104, 2, 2, 289, 24, 3, 2, 2, 2, 290, 291, 7, 103, + 2, 2, 291, 292, 7, 110, 2, 2, 292, 293, 7, 117, 2, 2, 293, 294, 7, 103, + 2, 2, 294, 26, 3, 2, 2, 2, 295, 296, 7, 121, 2, 2, 296, 297, 7, 106, 2, + 2, 297, 298, 7, 107, 2, 2, 298, 299, 7, 110, 2, 2, 299, 300, 7, 103, 2, + 2, 300, 28, 3, 2, 2, 2, 301, 302, 7, 104, 2, 2, 302, 303, 7, 113, 2, 2, + 303, 304, 7, 116, 2, 2, 304, 30, 3, 2, 2, 2, 305, 306, 7, 107, 2, 2, 306, + 307, 7, 112, 2, 2, 307, 32, 3, 2, 2, 2, 308, 309, 7, 118, 2, 2, 309, 310, + 7, 116, 2, 2, 310, 311, 7, 123, 2, 2, 311, 34, 3, 2, 2, 2, 312, 313, 7, + 80, 2, 2, 313, 314, 7, 113, 2, 2, 314, 315, 7, 112, 2, 2, 315, 316, 7, + 103, 2, 2, 316, 36, 3, 2, 2, 2, 317, 318, 7, 104, 2, 2, 318, 319, 7, 107, + 2, 2, 319, 320, 7, 112, 2, 2, 320, 321, 7, 99, 2, 2, 321, 322, 7, 110, + 2, 2, 322, 323, 7, 110, 2, 2, 323, 324, 7, 123, 2, 2, 324, 38, 3, 2, 2, + 2, 325, 326, 7, 121, 2, 2, 326, 327, 7, 107, 2, 2, 327, 328, 7, 118, 2, + 2, 328, 329, 7, 106, 2, 2, 329, 40, 3, 2, 2, 2, 330, 331, 7, 103, 2, 2, + 331, 332, 7, 122, 2, 2, 332, 333, 7, 101, 2, 2, 333, 334, 7, 103, 2, 2, + 334, 335, 7, 114, 2, 2, 335, 336, 7, 118, 2, 2, 336, 42, 3, 2, 2, 2, 337, + 338, 7, 110, 2, 2, 338, 339, 7, 99, 2, 2, 339, 340, 7, 111, 2, 2, 340, + 341, 7, 100, 2, 2, 341, 342, 7, 102, 2, 2, 342, 343, 7, 99, 2, 2, 343, + 44, 3, 2, 2, 2, 344, 345, 7, 113, 2, 2, 345, 346, 7, 116, 2, 2, 346, 46, + 3, 2, 2, 2, 347, 348, 7, 99, 2, 2, 348, 349, 7, 112, 2, 2, 349, 350, 7, + 102, 2, 2, 350, 48, 3, 2, 2, 2, 351, 352, 7, 112, 2, 2, 352, 353, 7, 113, + 2, 2, 353, 354, 7, 118, 2, 2, 354, 50, 3, 2, 2, 2, 355, 356, 7, 107, 2, + 2, 356, 357, 7, 117, 2, 2, 357, 52, 3, 2, 2, 2, 358, 359, 7, 101, 2, 2, + 359, 360, 7, 110, 2, 2, 360, 361, 7, 99, 2, 2, 361, 362, 7, 117, 2, 2, + 362, 363, 7, 117, 2, 2, 363, 54, 3, 2, 2, 2, 364, 365, 7, 123, 2, 2, 365, + 366, 7, 107, 2, 2, 366, 367, 7, 103, 2, 2, 367, 368, 7, 110, 2, 2, 368, + 369, 7, 102, 2, 2, 369, 56, 3, 2, 2, 2, 370, 371, 7, 102, 2, 2, 371, 372, + 7, 103, 2, 2, 372, 373, 7, 110, 2, 2, 373, 58, 3, 2, 2, 2, 374, 375, 7, + 114, 2, 2, 375, 376, 7, 99, 2, 2, 376, 377, 7, 117, 2, 2, 377, 378, 7, + 117, 2, 2, 378, 60, 3, 2, 2, 2, 379, 380, 7, 101, 2, 2, 380, 381, 7, 113, + 2, 2, 381, 382, 7, 112, 2, 2, 382, 383, 7, 118, 2, 2, 383, 384, 7, 107, + 2, 2, 384, 385, 7, 112, 2, 2, 385, 386, 7, 119, 2, 2, 386, 387, 7, 103, + 2, 2, 387, 62, 3, 2, 2, 2, 388, 389, 7, 100, 2, 2, 389, 390, 7, 116, 2, + 2, 390, 391, 7, 103, 2, 2, 391, 392, 7, 99, 2, 2, 392, 393, 7, 109, 2, + 2, 393, 64, 3, 2, 2, 2, 394, 395, 7, 99, 2, 2, 395, 396, 7, 117, 2, 2, + 396, 397, 7, 123, 2, 2, 397, 398, 7, 112, 2, 2, 398, 399, 7, 101, 2, 2, + 399, 66, 3, 2, 2, 2, 400, 401, 7, 99, 2, 2, 401, 402, 7, 121, 2, 2, 402, + 403, 7, 99, 2, 2, 403, 404, 7, 107, 2, 2, 404, 405, 7, 118, 2, 2, 405, + 68, 3, 2, 2, 2, 406, 407, 7, 114, 2, 2, 407, 408, 7, 116, 2, 2, 408, 409, + 7, 107, 2, 2, 409, 410, 7, 112, 2, 2, 410, 411, 7, 118, 2, 2, 411, 70, + 3, 2, 2, 2, 412, 413, 7, 103, 2, 2, 413, 414, 7, 122, 2, 2, 414, 415, 7, + 103, 2, 2, 415, 416, 7, 101, 2, 2, 416, 72, 3, 2, 2, 2, 417, 418, 7, 86, + 2, 2, 418, 419, 7, 116, 2, 2, 419, 420, 7, 119, 2, 2, 420, 421, 7, 103, + 2, 2, 421, 74, 3, 2, 2, 2, 422, 423, 7, 72, 2, 2, 423, 424, 7, 99, 2, 2, + 424, 425, 7, 110, 2, 2, 425, 426, 7, 117, 2, 2, 426, 427, 7, 103, 2, 2, + 427, 76, 3, 2, 2, 2, 428, 429, 7, 48, 2, 2, 429, 78, 3, 2, 2, 2, 430, 431, + 7, 48, 2, 2, 431, 432, 7, 48, 2, 2, 432, 433, 7, 48, 2, 2, 433, 80, 3, + 2, 2, 2, 434, 435, 7, 98, 2, 2, 435, 82, 3, 2, 2, 2, 436, 437, 7, 44, 2, + 2, 437, 84, 3, 2, 2, 2, 438, 439, 7, 46, 2, 2, 439, 86, 3, 2, 2, 2, 440, + 441, 7, 60, 2, 2, 441, 88, 3, 2, 2, 2, 442, 443, 7, 61, 2, 2, 443, 90, + 3, 2, 2, 2, 444, 445, 7, 44, 2, 2, 445, 446, 7, 44, 2, 2, 446, 92, 3, 2, + 2, 2, 447, 448, 7, 63, 2, 2, 448, 94, 3, 2, 2, 2, 449, 450, 7, 126, 2, + 2, 450, 96, 3, 2, 2, 2, 451, 452, 7, 96, 2, 2, 452, 98, 3, 2, 2, 2, 453, + 454, 7, 40, 2, 2, 454, 100, 3, 2, 2, 2, 455, 456, 7, 62, 2, 2, 456, 457, + 7, 62, 2, 2, 457, 102, 3, 2, 2, 2, 458, 459, 7, 64, 2, 2, 459, 460, 7, + 64, 2, 2, 460, 104, 3, 2, 2, 2, 461, 462, 7, 45, 2, 2, 462, 106, 3, 2, + 2, 2, 463, 464, 7, 47, 2, 2, 464, 108, 3, 2, 2, 2, 465, 466, 7, 49, 2, + 2, 466, 110, 3, 2, 2, 2, 467, 468, 7, 39, 2, 2, 468, 112, 3, 2, 2, 2, 469, + 470, 7, 49, 2, 2, 470, 471, 7, 49, 2, 2, 471, 114, 3, 2, 2, 2, 472, 473, + 7, 128, 2, 2, 473, 116, 3, 2, 2, 2, 474, 475, 7, 62, 2, 2, 475, 118, 3, + 2, 2, 2, 476, 477, 7, 64, 2, 2, 477, 120, 3, 2, 2, 2, 478, 479, 7, 63, + 2, 2, 479, 480, 7, 63, 2, 2, 480, 122, 3, 2, 2, 2, 481, 482, 7, 64, 2, + 2, 482, 483, 7, 63, 2, 2, 483, 124, 3, 2, 2, 2, 484, 485, 7, 62, 2, 2, + 485, 486, 7, 63, 2, 2, 486, 126, 3, 2, 2, 2, 487, 488, 7, 62, 2, 2, 488, + 489, 7, 64, 2, 2, 489, 128, 3, 2, 2, 2, 490, 491, 7, 35, 2, 2, 491, 492, + 7, 63, 2, 2, 492, 130, 3, 2, 2, 2, 493, 494, 7, 66, 2, 2, 494, 132, 3, + 2, 2, 2, 495, 496, 7, 47, 2, 2, 496, 497, 7, 64, 2, 2, 497, 134, 3, 2, + 2, 2, 498, 499, 7, 45, 2, 2, 499, 500, 7, 63, 2, 2, 500, 136, 3, 2, 2, + 2, 501, 502, 7, 47, 2, 2, 502, 503, 7, 63, 2, 2, 503, 138, 3, 2, 2, 2, + 504, 505, 7, 44, 2, 2, 505, 506, 7, 63, 2, 2, 506, 140, 3, 2, 2, 2, 507, + 508, 7, 66, 2, 2, 508, 509, 7, 63, 2, 2, 509, 142, 3, 2, 2, 2, 510, 511, + 7, 49, 2, 2, 511, 512, 7, 63, 2, 2, 512, 144, 3, 2, 2, 2, 513, 514, 7, + 39, 2, 2, 514, 515, 7, 63, 2, 2, 515, 146, 3, 2, 2, 2, 516, 517, 7, 40, + 2, 2, 517, 518, 7, 63, 2, 2, 518, 148, 3, 2, 2, 2, 519, 520, 7, 126, 2, + 2, 520, 521, 7, 63, 2, 2, 521, 150, 3, 2, 2, 2, 522, 523, 7, 96, 2, 2, + 523, 524, 7, 63, 2, 2, 524, 152, 3, 2, 2, 2, 525, 526, 7, 62, 2, 2, 526, + 527, 7, 62, 2, 2, 527, 528, 7, 63, 2, 2, 528, 154, 3, 2, 2, 2, 529, 530, + 7, 64, 2, 2, 530, 531, 7, 64, 2, 2, 531, 532, 7, 63, 2, 2, 532, 156, 3, + 2, 2, 2, 533, 534, 7, 44, 2, 2, 534, 535, 7, 44, 2, 2, 535, 536, 7, 63, + 2, 2, 536, 158, 3, 2, 2, 2, 537, 538, 7, 49, 2, 2, 538, 539, 7, 49, 2, + 2, 539, 540, 7, 63, 2, 2, 540, 160, 3, 2, 2, 2, 541, 551, 9, 2, 2, 2, 542, + 544, 9, 3, 2, 2, 543, 545, 9, 4, 2, 2, 544, 543, 3, 2, 2, 2, 544, 545, + 3, 2, 2, 2, 545, 551, 3, 2, 2, 2, 546, 548, 9, 4, 2, 2, 547, 549, 9, 3, + 2, 2, 548, 547, 3, 2, 2, 2, 548, 549, 3, 2, 2, 2, 549, 551, 3, 2, 2, 2, + 550, 541, 3, 2, 2, 2, 550, 542, 3, 2, 2, 2, 550, 546, 3, 2, 2, 2, 550, + 551, 3, 2, 2, 2, 551, 554, 3, 2, 2, 2, 552, 555, 5, 197, 99, 2, 553, 555, + 5, 199, 100, 2, 554, 552, 3, 2, 2, 2, 554, 553, 3, 2, 2, 2, 555, 569, 3, + 2, 2, 2, 556, 558, 9, 5, 2, 2, 557, 559, 9, 4, 2, 2, 558, 557, 3, 2, 2, + 2, 558, 559, 3, 2, 2, 2, 559, 563, 3, 2, 2, 2, 560, 561, 9, 4, 2, 2, 561, + 563, 9, 5, 2, 2, 562, 556, 3, 2, 2, 2, 562, 560, 3, 2, 2, 2, 563, 566, + 3, 2, 2, 2, 564, 567, 5, 209, 105, 2, 565, 567, 5, 211, 106, 2, 566, 564, + 3, 2, 2, 2, 566, 565, 3, 2, 2, 2, 567, 569, 3, 2, 2, 2, 568, 550, 3, 2, + 2, 2, 568, 562, 3, 2, 2, 2, 569, 162, 3, 2, 2, 2, 570, 574, 9, 6, 2, 2, + 571, 573, 9, 7, 2, 2, 572, 571, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, + 572, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 583, 3, 2, 2, 2, 576, 574, + 3, 2, 2, 2, 577, 579, 7, 50, 2, 2, 578, 577, 3, 2, 2, 2, 579, 580, 3, 2, + 2, 2, 580, 578, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 583, 3, 2, 2, 2, + 582, 570, 3, 2, 2, 2, 582, 578, 3, 2, 2, 2, 583, 164, 3, 2, 2, 2, 584, + 585, 7, 50, 2, 2, 585, 587, 9, 8, 2, 2, 586, 588, 9, 9, 2, 2, 587, 586, + 3, 2, 2, 2, 588, 589, 3, 2, 2, 2, 589, 587, 3, 2, 2, 2, 589, 590, 3, 2, + 2, 2, 590, 166, 3, 2, 2, 2, 591, 592, 7, 50, 2, 2, 592, 594, 9, 10, 2, + 2, 593, 595, 9, 11, 2, 2, 594, 593, 3, 2, 2, 2, 595, 596, 3, 2, 2, 2, 596, + 594, 3, 2, 2, 2, 596, 597, 3, 2, 2, 2, 597, 168, 3, 2, 2, 2, 598, 599, + 7, 50, 2, 2, 599, 601, 9, 5, 2, 2, 600, 602, 9, 12, 2, 2, 601, 600, 3, + 2, 2, 2, 602, 603, 3, 2, 2, 2, 603, 601, 3, 2, 2, 2, 603, 604, 3, 2, 2, + 2, 604, 170, 3, 2, 2, 2, 605, 612, 5, 205, 103, 2, 606, 608, 9, 7, 2, 2, + 607, 606, 3, 2, 2, 2, 608, 609, 3, 2, 2, 2, 609, 607, 3, 2, 2, 2, 609, + 610, 3, 2, 2, 2, 610, 612, 3, 2, 2, 2, 611, 605, 3, 2, 2, 2, 611, 607, + 3, 2, 2, 2, 612, 613, 3, 2, 2, 2, 613, 614, 9, 13, 2, 2, 614, 172, 3, 2, + 2, 2, 615, 616, 5, 205, 103, 2, 616, 174, 3, 2, 2, 2, 617, 618, 7, 42, + 2, 2, 618, 619, 8, 88, 2, 2, 619, 176, 3, 2, 2, 2, 620, 621, 7, 43, 2, + 2, 621, 622, 8, 89, 3, 2, 622, 178, 3, 2, 2, 2, 623, 624, 7, 125, 2, 2, + 624, 625, 8, 90, 4, 2, 625, 180, 3, 2, 2, 2, 626, 627, 7, 127, 2, 2, 627, + 628, 8, 91, 5, 2, 628, 182, 3, 2, 2, 2, 629, 630, 7, 93, 2, 2, 630, 631, + 8, 92, 6, 2, 631, 184, 3, 2, 2, 2, 632, 633, 7, 95, 2, 2, 633, 634, 8, + 93, 7, 2, 634, 186, 3, 2, 2, 2, 635, 639, 5, 225, 113, 2, 636, 638, 5, + 223, 112, 2, 637, 636, 3, 2, 2, 2, 638, 641, 3, 2, 2, 2, 639, 637, 3, 2, + 2, 2, 639, 640, 3, 2, 2, 2, 640, 188, 3, 2, 2, 2, 641, 639, 3, 2, 2, 2, + 642, 646, 7, 94, 2, 2, 643, 645, 9, 14, 2, 2, 644, 643, 3, 2, 2, 2, 645, + 648, 3, 2, 2, 2, 646, 644, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 649, + 3, 2, 2, 2, 648, 646, 3, 2, 2, 2, 649, 650, 5, 203, 102, 2, 650, 651, 3, + 2, 2, 2, 651, 652, 8, 95, 8, 2, 652, 190, 3, 2, 2, 2, 653, 654, 5, 203, + 102, 2, 654, 655, 8, 96, 9, 2, 655, 656, 3, 2, 2, 2, 656, 657, 8, 96, 8, + 2, 657, 192, 3, 2, 2, 2, 658, 660, 9, 14, 2, 2, 659, 658, 3, 2, 2, 2, 660, + 661, 3, 2, 2, 2, 661, 659, 3, 2, 2, 2, 661, 662, 3, 2, 2, 2, 662, 663, + 3, 2, 2, 2, 663, 664, 8, 97, 10, 2, 664, 665, 3, 2, 2, 2, 665, 666, 8, + 97, 8, 2, 666, 194, 3, 2, 2, 2, 667, 671, 7, 37, 2, 2, 668, 670, 10, 15, + 2, 2, 669, 668, 3, 2, 2, 2, 670, 673, 3, 2, 2, 2, 671, 669, 3, 2, 2, 2, + 671, 672, 3, 2, 2, 2, 672, 674, 3, 2, 2, 2, 673, 671, 3, 2, 2, 2, 674, + 675, 8, 98, 8, 2, 675, 196, 3, 2, 2, 2, 676, 685, 7, 41, 2, 2, 677, 680, + 7, 94, 2, 2, 678, 681, 5, 203, 102, 2, 679, 681, 11, 2, 2, 2, 680, 678, + 3, 2, 2, 2, 680, 679, 3, 2, 2, 2, 681, 684, 3, 2, 2, 2, 682, 684, 10, 16, + 2, 2, 683, 677, 3, 2, 2, 2, 683, 682, 3, 2, 2, 2, 684, 687, 3, 2, 2, 2, + 685, 683, 3, 2, 2, 2, 685, 686, 3, 2, 2, 2, 686, 688, 3, 2, 2, 2, 687, + 685, 3, 2, 2, 2, 688, 703, 7, 41, 2, 2, 689, 698, 7, 36, 2, 2, 690, 693, + 7, 94, 2, 2, 691, 694, 5, 203, 102, 2, 692, 694, 11, 2, 2, 2, 693, 691, + 3, 2, 2, 2, 693, 692, 3, 2, 2, 2, 694, 697, 3, 2, 2, 2, 695, 697, 10, 17, + 2, 2, 696, 690, 3, 2, 2, 2, 696, 695, 3, 2, 2, 2, 697, 700, 3, 2, 2, 2, + 698, 696, 3, 2, 2, 2, 698, 699, 3, 2, 2, 2, 699, 701, 3, 2, 2, 2, 700, + 698, 3, 2, 2, 2, 701, 703, 7, 36, 2, 2, 702, 676, 3, 2, 2, 2, 702, 689, + 3, 2, 2, 2, 703, 198, 3, 2, 2, 2, 704, 705, 7, 41, 2, 2, 705, 706, 7, 41, + 2, 2, 706, 707, 7, 41, 2, 2, 707, 711, 3, 2, 2, 2, 708, 710, 5, 201, 101, + 2, 709, 708, 3, 2, 2, 2, 710, 713, 3, 2, 2, 2, 711, 712, 3, 2, 2, 2, 711, + 709, 3, 2, 2, 2, 712, 714, 3, 2, 2, 2, 713, 711, 3, 2, 2, 2, 714, 715, + 7, 41, 2, 2, 715, 716, 7, 41, 2, 2, 716, 731, 7, 41, 2, 2, 717, 718, 7, + 36, 2, 2, 718, 719, 7, 36, 2, 2, 719, 720, 7, 36, 2, 2, 720, 724, 3, 2, + 2, 2, 721, 723, 5, 201, 101, 2, 722, 721, 3, 2, 2, 2, 723, 726, 3, 2, 2, + 2, 724, 725, 3, 2, 2, 2, 724, 722, 3, 2, 2, 2, 725, 727, 3, 2, 2, 2, 726, + 724, 3, 2, 2, 2, 727, 728, 7, 36, 2, 2, 728, 729, 7, 36, 2, 2, 729, 731, + 7, 36, 2, 2, 730, 704, 3, 2, 2, 2, 730, 717, 3, 2, 2, 2, 731, 200, 3, 2, + 2, 2, 732, 739, 10, 18, 2, 2, 733, 736, 7, 94, 2, 2, 734, 737, 5, 203, + 102, 2, 735, 737, 11, 2, 2, 2, 736, 734, 3, 2, 2, 2, 736, 735, 3, 2, 2, + 2, 737, 739, 3, 2, 2, 2, 738, 732, 3, 2, 2, 2, 738, 733, 3, 2, 2, 2, 739, + 202, 3, 2, 2, 2, 740, 742, 7, 15, 2, 2, 741, 740, 3, 2, 2, 2, 741, 742, + 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 744, 7, 12, 2, 2, 744, 204, 3, 2, + 2, 2, 745, 747, 9, 7, 2, 2, 746, 745, 3, 2, 2, 2, 747, 748, 3, 2, 2, 2, + 748, 746, 3, 2, 2, 2, 748, 749, 3, 2, 2, 2, 749, 752, 3, 2, 2, 2, 750, + 752, 5, 207, 104, 2, 751, 746, 3, 2, 2, 2, 751, 750, 3, 2, 2, 2, 752, 753, + 3, 2, 2, 2, 753, 755, 9, 19, 2, 2, 754, 756, 9, 20, 2, 2, 755, 754, 3, + 2, 2, 2, 755, 756, 3, 2, 2, 2, 756, 758, 3, 2, 2, 2, 757, 759, 9, 7, 2, + 2, 758, 757, 3, 2, 2, 2, 759, 760, 3, 2, 2, 2, 760, 758, 3, 2, 2, 2, 760, + 761, 3, 2, 2, 2, 761, 764, 3, 2, 2, 2, 762, 764, 5, 207, 104, 2, 763, 751, + 3, 2, 2, 2, 763, 762, 3, 2, 2, 2, 764, 206, 3, 2, 2, 2, 765, 767, 9, 7, + 2, 2, 766, 765, 3, 2, 2, 2, 767, 770, 3, 2, 2, 2, 768, 766, 3, 2, 2, 2, + 768, 769, 3, 2, 2, 2, 769, 771, 3, 2, 2, 2, 770, 768, 3, 2, 2, 2, 771, + 773, 7, 48, 2, 2, 772, 774, 9, 7, 2, 2, 773, 772, 3, 2, 2, 2, 774, 775, + 3, 2, 2, 2, 775, 773, 3, 2, 2, 2, 775, 776, 3, 2, 2, 2, 776, 784, 3, 2, + 2, 2, 777, 779, 9, 7, 2, 2, 778, 777, 3, 2, 2, 2, 779, 780, 3, 2, 2, 2, + 780, 778, 3, 2, 2, 2, 780, 781, 3, 2, 2, 2, 781, 782, 3, 2, 2, 2, 782, + 784, 7, 48, 2, 2, 783, 768, 3, 2, 2, 2, 783, 778, 3, 2, 2, 2, 784, 208, + 3, 2, 2, 2, 785, 790, 7, 41, 2, 2, 786, 789, 5, 215, 108, 2, 787, 789, + 5, 221, 111, 2, 788, 786, 3, 2, 2, 2, 788, 787, 3, 2, 2, 2, 789, 792, 3, + 2, 2, 2, 790, 788, 3, 2, 2, 2, 790, 791, 3, 2, 2, 2, 791, 793, 3, 2, 2, + 2, 792, 790, 3, 2, 2, 2, 793, 804, 7, 41, 2, 2, 794, 799, 7, 36, 2, 2, + 795, 798, 5, 217, 109, 2, 796, 798, 5, 221, 111, 2, 797, 795, 3, 2, 2, + 2, 797, 796, 3, 2, 2, 2, 798, 801, 3, 2, 2, 2, 799, 797, 3, 2, 2, 2, 799, + 800, 3, 2, 2, 2, 800, 802, 3, 2, 2, 2, 801, 799, 3, 2, 2, 2, 802, 804, + 7, 36, 2, 2, 803, 785, 3, 2, 2, 2, 803, 794, 3, 2, 2, 2, 804, 210, 3, 2, + 2, 2, 805, 806, 7, 41, 2, 2, 806, 807, 7, 41, 2, 2, 807, 808, 7, 41, 2, + 2, 808, 812, 3, 2, 2, 2, 809, 811, 5, 213, 107, 2, 810, 809, 3, 2, 2, 2, + 811, 814, 3, 2, 2, 2, 812, 813, 3, 2, 2, 2, 812, 810, 3, 2, 2, 2, 813, + 815, 3, 2, 2, 2, 814, 812, 3, 2, 2, 2, 815, 816, 7, 41, 2, 2, 816, 817, + 7, 41, 2, 2, 817, 832, 7, 41, 2, 2, 818, 819, 7, 36, 2, 2, 819, 820, 7, + 36, 2, 2, 820, 821, 7, 36, 2, 2, 821, 825, 3, 2, 2, 2, 822, 824, 5, 213, + 107, 2, 823, 822, 3, 2, 2, 2, 824, 827, 3, 2, 2, 2, 825, 826, 3, 2, 2, + 2, 825, 823, 3, 2, 2, 2, 826, 828, 3, 2, 2, 2, 827, 825, 3, 2, 2, 2, 828, + 829, 7, 36, 2, 2, 829, 830, 7, 36, 2, 2, 830, 832, 7, 36, 2, 2, 831, 805, + 3, 2, 2, 2, 831, 818, 3, 2, 2, 2, 832, 212, 3, 2, 2, 2, 833, 836, 5, 219, + 110, 2, 834, 836, 5, 221, 111, 2, 835, 833, 3, 2, 2, 2, 835, 834, 3, 2, + 2, 2, 836, 214, 3, 2, 2, 2, 837, 839, 9, 21, 2, 2, 838, 837, 3, 2, 2, 2, + 839, 216, 3, 2, 2, 2, 840, 842, 9, 22, 2, 2, 841, 840, 3, 2, 2, 2, 842, + 218, 3, 2, 2, 2, 843, 845, 9, 23, 2, 2, 844, 843, 3, 2, 2, 2, 845, 220, + 3, 2, 2, 2, 846, 847, 7, 94, 2, 2, 847, 848, 9, 24, 2, 2, 848, 222, 3, + 2, 2, 2, 849, 852, 5, 225, 113, 2, 850, 852, 9, 25, 2, 2, 851, 849, 3, + 2, 2, 2, 851, 850, 3, 2, 2, 2, 852, 224, 3, 2, 2, 2, 853, 855, 9, 26, 2, + 2, 854, 853, 3, 2, 2, 2, 855, 226, 3, 2, 2, 2, 59, 2, 544, 548, 550, 554, + 558, 562, 566, 568, 574, 580, 582, 589, 596, 603, 609, 611, 639, 646, 661, + 671, 680, 683, 685, 693, 696, 698, 702, 711, 724, 730, 736, 738, 741, 748, + 751, 755, 760, 763, 768, 775, 780, 783, 788, 790, 797, 799, 803, 812, 825, + 831, 835, 838, 841, 844, 851, 854, 11, 3, 88, 2, 3, 89, 3, 3, 90, 4, 3, + 91, 5, 3, 92, 6, 3, 93, 7, 2, 3, 2, 3, 96, 8, 3, 97, 9, +} + +var lexerDeserializer = antlr.NewATNDeserializer(nil) +var lexerAtn = lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn) + +var lexerChannelNames = []string{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", +} + +var lexerModeNames = []string{ + "DEFAULT_MODE", +} + +var lexerLiteralNames = []string{ + "", "", "", "", "'def'", "'return'", "'raise'", "'from'", "'import'", "'nonlocal'", + "'as'", "'global'", "'assert'", "'if'", "'elif'", "'else'", "'while'", + "'for'", "'in'", "'try'", "'None'", "'finally'", "'with'", "'except'", + "'lambda'", "'or'", "'and'", "'not'", "'is'", "'class'", "'yield'", "'del'", + "'pass'", "'continue'", "'break'", "'async'", "'await'", "'print'", "'exec'", + "'True'", "'False'", "'.'", "'...'", "'`'", "'*'", "','", "':'", "';'", + "'**'", "'='", "'|'", "'^'", "'&'", "'<<'", "'>>'", "'+'", "'-'", "'/'", + "'%'", "'//'", "'~'", "'<'", "'>'", "'=='", "'>='", "'<='", "'<>'", "'!='", + "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", "'/='", "'%='", "'&='", + "'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='", "", "", "", "", "", + "", "", "'('", "')'", "'{'", "'}'", "'['", "']'", +} + +var lexerSymbolicNames = []string{ + "", "INDENT", "DEDENT", "LINE_BREAK", "DEF", "RETURN", "RAISE", "FROM", + "IMPORT", "NONLOCAL", "AS", "GLOBAL", "ASSERT", "IF", "ELIF", "ELSE", "WHILE", + "FOR", "IN", "TRY", "NONE", "FINALLY", "WITH", "EXCEPT", "LAMBDA", "OR", + "AND", "NOT", "IS", "CLASS", "YIELD", "DEL", "PASS", "CONTINUE", "BREAK", + "ASYNC", "AWAIT", "PRINT", "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", + "REVERSE_QUOTE", "STAR", "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", + "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "LESS_THAN", "GREATER_THAN", "EQUALS", + "GT_EQ", "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", + "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "AND_ASSIGN", + "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", + "IDIV_ASSIGN", "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", + "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", "OPEN_PAREN", "CLOSE_PAREN", + "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", "NAME", "LINE_JOIN", + "NEWLINE", "WS", "COMMENT", +} + +var lexerRuleNames = []string{ + "DEF", "RETURN", "RAISE", "FROM", "IMPORT", "NONLOCAL", "AS", "GLOBAL", + "ASSERT", "IF", "ELIF", "ELSE", "WHILE", "FOR", "IN", "TRY", "NONE", "FINALLY", + "WITH", "EXCEPT", "LAMBDA", "OR", "AND", "NOT", "IS", "CLASS", "YIELD", + "DEL", "PASS", "CONTINUE", "BREAK", "ASYNC", "AWAIT", "PRINT", "EXEC", + "TRUE", "FALSE", "DOT", "ELLIPSIS", "REVERSE_QUOTE", "STAR", "COMMA", "COLON", + "SEMI_COLON", "POWER", "ASSIGN", "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", + "RIGHT_SHIFT", "ADD", "MINUS", "DIV", "MOD", "IDIV", "NOT_OP", "LESS_THAN", + "GREATER_THAN", "EQUALS", "GT_EQ", "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", "AT", + "ARROW", "ADD_ASSIGN", "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", + "MOD_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", + "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", "IDIV_ASSIGN", "STRING", "DECIMAL_INTEGER", + "OCT_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", + "OPEN_PAREN", "CLOSE_PAREN", "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", + "CLOSE_BRACKET", "NAME", "LINE_JOIN", "NEWLINE", "WS", "COMMENT", "SHORT_STRING", + "LONG_STRING", "LONG_STRING_ITEM", "RN", "EXPONENT_OR_POINT_FLOAT", "POINT_FLOAT", + "SHORT_BYTES", "LONG_BYTES", "LONG_BYTES_ITEM", "SHORT_BYTES_CHAR_NO_SINGLE_QUOTE", + "SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE", "LONG_BYTES_CHAR", "BYTES_ESCAPE_SEQ", + "ID_CONTINUE", "ID_START", +} + +type PythonLexer struct { + PythonBaseLexer + channelNames []string + modeNames []string + // TODO: EOF string +} + +var lexerDecisionToDFA = make([]*antlr.DFA, len(lexerAtn.DecisionToState)) + +func init() { + for index, ds := range lexerAtn.DecisionToState { + lexerDecisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +func NewPythonLexer(input antlr.CharStream) *PythonLexer { + + l := new(PythonLexer) + + l.BaseLexer = antlr.NewBaseLexer(input) + l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache()) + + l.channelNames = lexerChannelNames + l.modeNames = lexerModeNames + l.RuleNames = lexerRuleNames + l.LiteralNames = lexerLiteralNames + l.SymbolicNames = lexerSymbolicNames + l.GrammarFileName = "PythonLexer.g4" + // TODO: l.EOF = antlr.TokenEOF + + return l +} + +// PythonLexer tokens. +const ( + PythonLexerINDENT = 1 + PythonLexerDEDENT = 2 + PythonLexerLINE_BREAK = 3 + PythonLexerDEF = 4 + PythonLexerRETURN = 5 + PythonLexerRAISE = 6 + PythonLexerFROM = 7 + PythonLexerIMPORT = 8 + PythonLexerNONLOCAL = 9 + PythonLexerAS = 10 + PythonLexerGLOBAL = 11 + PythonLexerASSERT = 12 + PythonLexerIF = 13 + PythonLexerELIF = 14 + PythonLexerELSE = 15 + PythonLexerWHILE = 16 + PythonLexerFOR = 17 + PythonLexerIN = 18 + PythonLexerTRY = 19 + PythonLexerNONE = 20 + PythonLexerFINALLY = 21 + PythonLexerWITH = 22 + PythonLexerEXCEPT = 23 + PythonLexerLAMBDA = 24 + PythonLexerOR = 25 + PythonLexerAND = 26 + PythonLexerNOT = 27 + PythonLexerIS = 28 + PythonLexerCLASS = 29 + PythonLexerYIELD = 30 + PythonLexerDEL = 31 + PythonLexerPASS = 32 + PythonLexerCONTINUE = 33 + PythonLexerBREAK = 34 + PythonLexerASYNC = 35 + PythonLexerAWAIT = 36 + PythonLexerPRINT = 37 + PythonLexerEXEC = 38 + PythonLexerTRUE = 39 + PythonLexerFALSE = 40 + PythonLexerDOT = 41 + PythonLexerELLIPSIS = 42 + PythonLexerREVERSE_QUOTE = 43 + PythonLexerSTAR = 44 + PythonLexerCOMMA = 45 + PythonLexerCOLON = 46 + PythonLexerSEMI_COLON = 47 + PythonLexerPOWER = 48 + PythonLexerASSIGN = 49 + PythonLexerOR_OP = 50 + PythonLexerXOR = 51 + PythonLexerAND_OP = 52 + PythonLexerLEFT_SHIFT = 53 + PythonLexerRIGHT_SHIFT = 54 + PythonLexerADD = 55 + PythonLexerMINUS = 56 + PythonLexerDIV = 57 + PythonLexerMOD = 58 + PythonLexerIDIV = 59 + PythonLexerNOT_OP = 60 + PythonLexerLESS_THAN = 61 + PythonLexerGREATER_THAN = 62 + PythonLexerEQUALS = 63 + PythonLexerGT_EQ = 64 + PythonLexerLT_EQ = 65 + PythonLexerNOT_EQ_1 = 66 + PythonLexerNOT_EQ_2 = 67 + PythonLexerAT = 68 + PythonLexerARROW = 69 + PythonLexerADD_ASSIGN = 70 + PythonLexerSUB_ASSIGN = 71 + PythonLexerMULT_ASSIGN = 72 + PythonLexerAT_ASSIGN = 73 + PythonLexerDIV_ASSIGN = 74 + PythonLexerMOD_ASSIGN = 75 + PythonLexerAND_ASSIGN = 76 + PythonLexerOR_ASSIGN = 77 + PythonLexerXOR_ASSIGN = 78 + PythonLexerLEFT_SHIFT_ASSIGN = 79 + PythonLexerRIGHT_SHIFT_ASSIGN = 80 + PythonLexerPOWER_ASSIGN = 81 + PythonLexerIDIV_ASSIGN = 82 + PythonLexerSTRING = 83 + PythonLexerDECIMAL_INTEGER = 84 + PythonLexerOCT_INTEGER = 85 + PythonLexerHEX_INTEGER = 86 + PythonLexerBIN_INTEGER = 87 + PythonLexerIMAG_NUMBER = 88 + PythonLexerFLOAT_NUMBER = 89 + PythonLexerOPEN_PAREN = 90 + PythonLexerCLOSE_PAREN = 91 + PythonLexerOPEN_BRACE = 92 + PythonLexerCLOSE_BRACE = 93 + PythonLexerOPEN_BRACKET = 94 + PythonLexerCLOSE_BRACKET = 95 + PythonLexerNAME = 96 + PythonLexerLINE_JOIN = 97 + PythonLexerNEWLINE = 98 + PythonLexerWS = 99 + PythonLexerCOMMENT = 100 +) + +func (l *PythonLexer) Action(localctx antlr.RuleContext, ruleIndex, actionIndex int) { + switch ruleIndex { + case 86: + l.OPEN_PAREN_Action(localctx, actionIndex) + + case 87: + l.CLOSE_PAREN_Action(localctx, actionIndex) + + case 88: + l.OPEN_BRACE_Action(localctx, actionIndex) + + case 89: + l.CLOSE_BRACE_Action(localctx, actionIndex) + + case 90: + l.OPEN_BRACKET_Action(localctx, actionIndex) + + case 91: + l.CLOSE_BRACKET_Action(localctx, actionIndex) + + case 94: + l.NEWLINE_Action(localctx, actionIndex) + + case 95: + l.WS_Action(localctx, actionIndex) + + default: + panic("No registered action for: " + fmt.Sprint(ruleIndex)) + } +} + +func (l *PythonLexer) OPEN_PAREN_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 0: + l.IncIndentLevel() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *PythonLexer) CLOSE_PAREN_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 1: + l.DecIndentLevel() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *PythonLexer) OPEN_BRACE_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 2: + l.IncIndentLevel() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *PythonLexer) CLOSE_BRACE_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 3: + l.DecIndentLevel() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *PythonLexer) OPEN_BRACKET_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 4: + l.IncIndentLevel() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *PythonLexer) CLOSE_BRACKET_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 5: + l.DecIndentLevel() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *PythonLexer) NEWLINE_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 6: + l.HandleNewLine() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *PythonLexer) WS_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 7: + l.HandleSpaces() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} diff --git a/languages/python/python_parser.go b/languages/python/python_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..b9abca80db5826004dbca9dc3be1c42eb23f1588 --- /dev/null +++ b/languages/python/python_parser.go @@ -0,0 +1,12952 @@ +// Code generated from PythonParser.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser // PythonParser + +import ( + "fmt" + "reflect" + "strconv" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import errors +var _ = fmt.Printf +var _ = reflect.Copy +var _ = strconv.Itoa + +var parserATN = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 102, 979, + 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, + 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, + 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, + 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, + 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, + 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, + 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, + 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, + 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, + 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, + 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, + 60, 4, 61, 9, 61, 4, 62, 9, 62, 3, 2, 3, 2, 3, 2, 5, 2, 128, 10, 2, 3, + 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 137, 10, 3, 3, 4, 3, 4, 6, + 4, 141, 10, 4, 13, 4, 14, 4, 142, 3, 5, 3, 5, 7, 5, 147, 10, 5, 12, 5, + 14, 5, 150, 11, 5, 3, 6, 3, 6, 5, 6, 154, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, + 3, 7, 7, 7, 161, 10, 7, 12, 7, 14, 7, 164, 11, 7, 3, 7, 5, 7, 167, 10, + 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 174, 10, 7, 3, 7, 5, 7, 177, 10, + 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 186, 10, 7, 3, 7, 3, + 7, 3, 7, 3, 7, 6, 7, 192, 10, 7, 13, 7, 14, 7, 193, 3, 7, 5, 7, 197, 10, + 7, 3, 7, 5, 7, 200, 10, 7, 3, 7, 5, 7, 203, 10, 7, 3, 7, 5, 7, 206, 10, + 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 212, 10, 7, 12, 7, 14, 7, 215, 11, 7, + 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 221, 10, 7, 12, 7, 14, 7, 224, 11, 7, 3, + 7, 3, 7, 5, 7, 228, 10, 7, 5, 7, 230, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 6, + 8, 236, 10, 8, 13, 8, 14, 8, 237, 3, 8, 3, 8, 5, 8, 242, 10, 8, 3, 9, 3, + 9, 3, 9, 3, 9, 5, 9, 248, 10, 9, 3, 9, 5, 9, 251, 10, 9, 3, 9, 3, 9, 3, + 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, + 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 5, 13, 271, 10, 13, 3, 14, 3, 14, 3, + 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, + 285, 10, 14, 5, 14, 287, 10, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, + 15, 3, 15, 5, 15, 296, 10, 15, 3, 15, 5, 15, 299, 10, 15, 3, 15, 3, 15, + 3, 15, 3, 16, 5, 16, 305, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 311, + 10, 16, 3, 16, 3, 16, 3, 16, 5, 16, 316, 10, 16, 3, 16, 3, 16, 3, 16, 3, + 17, 3, 17, 3, 17, 5, 17, 324, 10, 17, 3, 17, 3, 17, 3, 17, 5, 17, 329, + 10, 17, 3, 17, 3, 17, 5, 17, 333, 10, 17, 3, 17, 5, 17, 336, 10, 17, 3, + 17, 5, 17, 339, 10, 17, 3, 17, 3, 17, 5, 17, 343, 10, 17, 5, 17, 345, 10, + 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 7, 20, + 356, 10, 20, 12, 20, 14, 20, 359, 11, 20, 3, 21, 3, 21, 3, 21, 5, 21, 364, + 10, 21, 3, 21, 5, 21, 367, 10, 21, 3, 22, 3, 22, 3, 22, 5, 22, 372, 10, + 22, 3, 23, 3, 23, 3, 23, 7, 23, 377, 10, 23, 12, 23, 14, 23, 380, 11, 23, + 3, 23, 5, 23, 383, 10, 23, 3, 23, 3, 23, 3, 24, 3, 24, 5, 24, 389, 10, + 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 396, 10, 24, 12, 24, 14, + 24, 399, 11, 24, 3, 24, 5, 24, 402, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, + 6, 24, 408, 10, 24, 13, 24, 14, 24, 409, 3, 24, 5, 24, 413, 10, 24, 5, + 24, 415, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, + 3, 24, 5, 24, 426, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, + 24, 434, 10, 24, 5, 24, 436, 10, 24, 5, 24, 438, 10, 24, 3, 24, 3, 24, + 5, 24, 442, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, + 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 456, 10, 24, 12, 24, 14, 24, 459, + 11, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 468, 10, + 24, 5, 24, 470, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, + 478, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 485, 10, 24, 12, + 24, 14, 24, 488, 11, 24, 3, 24, 3, 24, 5, 24, 492, 10, 24, 3, 25, 7, 25, + 495, 10, 25, 12, 25, 14, 25, 498, 11, 25, 3, 25, 3, 25, 6, 25, 502, 10, + 25, 13, 25, 14, 25, 503, 5, 25, 506, 10, 25, 3, 26, 3, 26, 3, 26, 3, 26, + 3, 26, 3, 26, 5, 26, 514, 10, 26, 3, 27, 3, 27, 5, 27, 518, 10, 27, 3, + 27, 3, 27, 6, 27, 522, 10, 27, 13, 27, 14, 27, 523, 3, 27, 3, 27, 5, 27, + 528, 10, 27, 3, 27, 5, 27, 531, 10, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, + 29, 3, 29, 3, 29, 7, 29, 540, 10, 29, 12, 29, 14, 29, 543, 11, 29, 3, 29, + 3, 29, 5, 29, 547, 10, 29, 3, 29, 5, 29, 550, 10, 29, 3, 29, 3, 29, 3, + 29, 3, 29, 3, 29, 5, 29, 557, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, + 5, 29, 564, 10, 29, 5, 29, 566, 10, 29, 3, 30, 3, 30, 3, 30, 7, 30, 571, + 10, 30, 12, 30, 14, 30, 574, 11, 30, 3, 30, 5, 30, 577, 10, 30, 3, 31, + 3, 31, 3, 31, 7, 31, 582, 10, 31, 12, 31, 14, 31, 585, 11, 31, 3, 31, 5, + 31, 588, 10, 31, 3, 32, 3, 32, 3, 32, 5, 32, 593, 10, 32, 3, 33, 3, 33, + 3, 33, 7, 33, 598, 10, 33, 12, 33, 14, 33, 601, 11, 33, 3, 34, 3, 34, 3, + 34, 5, 34, 606, 10, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, + 614, 10, 35, 3, 35, 3, 35, 5, 35, 618, 10, 35, 3, 35, 3, 35, 5, 35, 622, + 10, 35, 3, 36, 3, 36, 3, 36, 5, 36, 627, 10, 36, 3, 36, 3, 36, 3, 36, 5, + 36, 632, 10, 36, 3, 36, 3, 36, 5, 36, 636, 10, 36, 3, 36, 5, 36, 639, 10, + 36, 3, 36, 5, 36, 642, 10, 36, 3, 36, 3, 36, 5, 36, 646, 10, 36, 5, 36, + 648, 10, 36, 3, 37, 3, 37, 3, 37, 7, 37, 653, 10, 37, 12, 37, 14, 37, 656, + 11, 37, 3, 38, 3, 38, 3, 38, 5, 38, 661, 10, 38, 3, 38, 5, 38, 664, 10, + 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, + 5, 41, 676, 10, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 7, 41, 684, + 10, 41, 12, 41, 14, 41, 687, 11, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, + 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 5, 42, 701, 10, 42, 3, + 42, 3, 42, 3, 42, 5, 42, 706, 10, 42, 5, 42, 708, 10, 42, 3, 42, 7, 42, + 711, 10, 42, 12, 42, 14, 42, 714, 11, 42, 3, 43, 3, 43, 5, 43, 718, 10, + 43, 3, 43, 3, 43, 7, 43, 722, 10, 43, 12, 43, 14, 43, 725, 11, 43, 3, 43, + 3, 43, 5, 43, 729, 10, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, + 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, + 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 752, 10, 43, 12, 43, 14, 43, 755, 11, + 43, 3, 44, 3, 44, 3, 44, 5, 44, 760, 10, 44, 3, 44, 3, 44, 3, 44, 5, 44, + 765, 10, 44, 3, 44, 3, 44, 3, 44, 5, 44, 770, 10, 44, 3, 44, 3, 44, 3, + 44, 3, 44, 5, 44, 776, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, + 3, 44, 5, 44, 785, 10, 44, 3, 44, 3, 44, 3, 44, 6, 44, 790, 10, 44, 13, + 44, 14, 44, 791, 5, 44, 794, 10, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, + 3, 45, 5, 45, 802, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, + 45, 5, 45, 811, 10, 45, 7, 45, 813, 10, 45, 12, 45, 14, 45, 816, 11, 45, + 3, 45, 5, 45, 819, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, + 45, 827, 10, 45, 3, 46, 3, 46, 5, 46, 831, 10, 46, 3, 46, 3, 46, 3, 46, + 3, 46, 5, 46, 837, 10, 46, 7, 46, 839, 10, 46, 12, 46, 14, 46, 842, 11, + 46, 3, 46, 5, 46, 845, 10, 46, 5, 46, 847, 10, 46, 3, 47, 3, 47, 3, 47, + 7, 47, 852, 10, 47, 12, 47, 14, 47, 855, 11, 47, 3, 47, 5, 47, 858, 10, + 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 7, 48, 866, 10, 48, 12, 48, + 14, 48, 869, 11, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 5, 50, 876, 10, + 50, 3, 51, 3, 51, 3, 52, 3, 52, 5, 52, 882, 10, 52, 3, 53, 3, 53, 3, 53, + 5, 53, 887, 10, 53, 3, 54, 3, 54, 3, 54, 5, 54, 892, 10, 54, 3, 54, 5, + 54, 895, 10, 54, 3, 55, 3, 55, 5, 55, 899, 10, 55, 3, 55, 3, 55, 3, 55, + 3, 55, 3, 55, 5, 55, 906, 10, 55, 3, 56, 3, 56, 3, 56, 7, 56, 911, 10, + 56, 12, 56, 14, 56, 914, 11, 56, 3, 56, 5, 56, 917, 10, 56, 3, 57, 3, 57, + 3, 57, 3, 57, 5, 57, 923, 10, 57, 3, 57, 3, 57, 5, 57, 927, 10, 57, 3, + 58, 3, 58, 3, 58, 7, 58, 932, 10, 58, 12, 58, 14, 58, 935, 11, 58, 3, 58, + 5, 58, 938, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 944, 10, 59, 3, + 59, 5, 59, 947, 10, 59, 5, 59, 949, 10, 59, 3, 59, 3, 59, 5, 59, 953, 10, + 59, 3, 59, 5, 59, 956, 10, 59, 5, 59, 958, 10, 59, 3, 60, 3, 60, 5, 60, + 962, 10, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 5, 61, 969, 10, 61, 3, + 62, 3, 62, 3, 62, 3, 62, 5, 62, 975, 10, 62, 5, 62, 977, 10, 62, 3, 62, + 2, 6, 80, 82, 84, 94, 63, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, + 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, + 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 2, 12, 3, 3, + 5, 5, 3, 2, 43, 44, 3, 2, 72, 84, 4, 2, 57, 58, 62, 62, 5, 2, 46, 46, 59, + 61, 70, 70, 3, 2, 57, 58, 3, 2, 55, 56, 4, 2, 41, 42, 98, 98, 3, 2, 86, + 89, 4, 2, 46, 46, 50, 50, 2, 1118, 2, 127, 3, 2, 2, 2, 4, 136, 3, 2, 2, + 2, 6, 140, 3, 2, 2, 2, 8, 144, 3, 2, 2, 2, 10, 153, 3, 2, 2, 2, 12, 229, + 3, 2, 2, 2, 14, 241, 3, 2, 2, 2, 16, 243, 3, 2, 2, 2, 18, 254, 3, 2, 2, + 2, 20, 259, 3, 2, 2, 2, 22, 263, 3, 2, 2, 2, 24, 267, 3, 2, 2, 2, 26, 272, + 3, 2, 2, 2, 28, 291, 3, 2, 2, 2, 30, 304, 3, 2, 2, 2, 32, 344, 3, 2, 2, + 2, 34, 346, 3, 2, 2, 2, 36, 349, 3, 2, 2, 2, 38, 352, 3, 2, 2, 2, 40, 366, + 3, 2, 2, 2, 42, 368, 3, 2, 2, 2, 44, 373, 3, 2, 2, 2, 46, 491, 3, 2, 2, + 2, 48, 505, 3, 2, 2, 2, 50, 513, 3, 2, 2, 2, 52, 530, 3, 2, 2, 2, 54, 532, + 3, 2, 2, 2, 56, 565, 3, 2, 2, 2, 58, 567, 3, 2, 2, 2, 60, 578, 3, 2, 2, + 2, 62, 589, 3, 2, 2, 2, 64, 594, 3, 2, 2, 2, 66, 602, 3, 2, 2, 2, 68, 621, + 3, 2, 2, 2, 70, 647, 3, 2, 2, 2, 72, 649, 3, 2, 2, 2, 74, 663, 3, 2, 2, + 2, 76, 665, 3, 2, 2, 2, 78, 668, 3, 2, 2, 2, 80, 675, 3, 2, 2, 2, 82, 688, + 3, 2, 2, 2, 84, 728, 3, 2, 2, 2, 86, 793, 3, 2, 2, 2, 88, 826, 3, 2, 2, + 2, 90, 830, 3, 2, 2, 2, 92, 848, 3, 2, 2, 2, 94, 859, 3, 2, 2, 2, 96, 870, + 3, 2, 2, 2, 98, 875, 3, 2, 2, 2, 100, 877, 3, 2, 2, 2, 102, 879, 3, 2, + 2, 2, 104, 886, 3, 2, 2, 2, 106, 894, 3, 2, 2, 2, 108, 905, 3, 2, 2, 2, + 110, 907, 3, 2, 2, 2, 112, 926, 3, 2, 2, 2, 114, 928, 3, 2, 2, 2, 116, + 957, 3, 2, 2, 2, 118, 959, 3, 2, 2, 2, 120, 963, 3, 2, 2, 2, 122, 976, + 3, 2, 2, 2, 124, 128, 5, 4, 3, 2, 125, 128, 5, 6, 4, 2, 126, 128, 5, 8, + 5, 2, 127, 124, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 126, 3, 2, 2, 2, + 127, 128, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 130, 7, 2, 2, 3, 130, + 3, 3, 2, 2, 2, 131, 137, 7, 5, 2, 2, 132, 137, 5, 44, 23, 2, 133, 134, + 5, 12, 7, 2, 134, 135, 7, 5, 2, 2, 135, 137, 3, 2, 2, 2, 136, 131, 3, 2, + 2, 2, 136, 132, 3, 2, 2, 2, 136, 133, 3, 2, 2, 2, 137, 5, 3, 2, 2, 2, 138, + 141, 7, 5, 2, 2, 139, 141, 5, 10, 6, 2, 140, 138, 3, 2, 2, 2, 140, 139, + 3, 2, 2, 2, 141, 142, 3, 2, 2, 2, 142, 140, 3, 2, 2, 2, 142, 143, 3, 2, + 2, 2, 143, 7, 3, 2, 2, 2, 144, 148, 5, 92, 47, 2, 145, 147, 7, 5, 2, 2, + 146, 145, 3, 2, 2, 2, 147, 150, 3, 2, 2, 2, 148, 146, 3, 2, 2, 2, 148, + 149, 3, 2, 2, 2, 149, 9, 3, 2, 2, 2, 150, 148, 3, 2, 2, 2, 151, 154, 5, + 44, 23, 2, 152, 154, 5, 12, 7, 2, 153, 151, 3, 2, 2, 2, 153, 152, 3, 2, + 2, 2, 154, 11, 3, 2, 2, 2, 155, 156, 7, 15, 2, 2, 156, 157, 5, 68, 35, + 2, 157, 158, 7, 48, 2, 2, 158, 162, 5, 14, 8, 2, 159, 161, 5, 18, 10, 2, + 160, 159, 3, 2, 2, 2, 161, 164, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2, 162, + 163, 3, 2, 2, 2, 163, 166, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 165, 167, + 5, 20, 11, 2, 166, 165, 3, 2, 2, 2, 166, 167, 3, 2, 2, 2, 167, 230, 3, + 2, 2, 2, 168, 169, 7, 18, 2, 2, 169, 170, 5, 68, 35, 2, 170, 171, 7, 48, + 2, 2, 171, 173, 5, 14, 8, 2, 172, 174, 5, 20, 11, 2, 173, 172, 3, 2, 2, + 2, 173, 174, 3, 2, 2, 2, 174, 230, 3, 2, 2, 2, 175, 177, 7, 37, 2, 2, 176, + 175, 3, 2, 2, 2, 176, 177, 3, 2, 2, 2, 177, 178, 3, 2, 2, 2, 178, 179, + 7, 19, 2, 2, 179, 180, 5, 58, 30, 2, 180, 181, 7, 20, 2, 2, 181, 182, 5, + 92, 47, 2, 182, 183, 7, 48, 2, 2, 183, 185, 5, 14, 8, 2, 184, 186, 5, 20, + 11, 2, 185, 184, 3, 2, 2, 2, 185, 186, 3, 2, 2, 2, 186, 230, 3, 2, 2, 2, + 187, 188, 7, 21, 2, 2, 188, 189, 7, 48, 2, 2, 189, 202, 5, 14, 8, 2, 190, + 192, 5, 26, 14, 2, 191, 190, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 191, + 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 196, 3, 2, 2, 2, 195, 197, 5, 20, + 11, 2, 196, 195, 3, 2, 2, 2, 196, 197, 3, 2, 2, 2, 197, 199, 3, 2, 2, 2, + 198, 200, 5, 22, 12, 2, 199, 198, 3, 2, 2, 2, 199, 200, 3, 2, 2, 2, 200, + 203, 3, 2, 2, 2, 201, 203, 5, 22, 12, 2, 202, 191, 3, 2, 2, 2, 202, 201, + 3, 2, 2, 2, 203, 230, 3, 2, 2, 2, 204, 206, 7, 37, 2, 2, 205, 204, 3, 2, + 2, 2, 205, 206, 3, 2, 2, 2, 206, 207, 3, 2, 2, 2, 207, 208, 7, 24, 2, 2, + 208, 213, 5, 24, 13, 2, 209, 210, 7, 47, 2, 2, 210, 212, 5, 24, 13, 2, + 211, 209, 3, 2, 2, 2, 212, 215, 3, 2, 2, 2, 213, 211, 3, 2, 2, 2, 213, + 214, 3, 2, 2, 2, 214, 216, 3, 2, 2, 2, 215, 213, 3, 2, 2, 2, 216, 217, + 7, 48, 2, 2, 217, 218, 5, 14, 8, 2, 218, 230, 3, 2, 2, 2, 219, 221, 5, + 16, 9, 2, 220, 219, 3, 2, 2, 2, 221, 224, 3, 2, 2, 2, 222, 220, 3, 2, 2, + 2, 222, 223, 3, 2, 2, 2, 223, 227, 3, 2, 2, 2, 224, 222, 3, 2, 2, 2, 225, + 228, 5, 28, 15, 2, 226, 228, 5, 30, 16, 2, 227, 225, 3, 2, 2, 2, 227, 226, + 3, 2, 2, 2, 228, 230, 3, 2, 2, 2, 229, 155, 3, 2, 2, 2, 229, 168, 3, 2, + 2, 2, 229, 176, 3, 2, 2, 2, 229, 187, 3, 2, 2, 2, 229, 205, 3, 2, 2, 2, + 229, 222, 3, 2, 2, 2, 230, 13, 3, 2, 2, 2, 231, 242, 5, 44, 23, 2, 232, + 233, 7, 5, 2, 2, 233, 235, 7, 3, 2, 2, 234, 236, 5, 10, 6, 2, 235, 234, + 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 235, 3, 2, 2, 2, 237, 238, 3, 2, + 2, 2, 238, 239, 3, 2, 2, 2, 239, 240, 7, 4, 2, 2, 240, 242, 3, 2, 2, 2, + 241, 231, 3, 2, 2, 2, 241, 232, 3, 2, 2, 2, 242, 15, 3, 2, 2, 2, 243, 244, + 7, 70, 2, 2, 244, 250, 5, 94, 48, 2, 245, 247, 7, 92, 2, 2, 246, 248, 5, + 110, 56, 2, 247, 246, 3, 2, 2, 2, 247, 248, 3, 2, 2, 2, 248, 249, 3, 2, + 2, 2, 249, 251, 7, 93, 2, 2, 250, 245, 3, 2, 2, 2, 250, 251, 3, 2, 2, 2, + 251, 252, 3, 2, 2, 2, 252, 253, 7, 5, 2, 2, 253, 17, 3, 2, 2, 2, 254, 255, + 7, 16, 2, 2, 255, 256, 5, 68, 35, 2, 256, 257, 7, 48, 2, 2, 257, 258, 5, + 14, 8, 2, 258, 19, 3, 2, 2, 2, 259, 260, 7, 17, 2, 2, 260, 261, 7, 48, + 2, 2, 261, 262, 5, 14, 8, 2, 262, 21, 3, 2, 2, 2, 263, 264, 7, 23, 2, 2, + 264, 265, 7, 48, 2, 2, 265, 266, 5, 14, 8, 2, 266, 23, 3, 2, 2, 2, 267, + 270, 5, 68, 35, 2, 268, 269, 7, 12, 2, 2, 269, 271, 5, 84, 43, 2, 270, + 268, 3, 2, 2, 2, 270, 271, 3, 2, 2, 2, 271, 25, 3, 2, 2, 2, 272, 286, 7, + 25, 2, 2, 273, 284, 5, 68, 35, 2, 274, 275, 6, 14, 2, 2, 275, 276, 7, 47, + 2, 2, 276, 277, 5, 96, 49, 2, 277, 278, 8, 14, 1, 2, 278, 285, 3, 2, 2, + 2, 279, 280, 6, 14, 3, 2, 280, 281, 7, 12, 2, 2, 281, 282, 5, 96, 49, 2, + 282, 283, 8, 14, 1, 2, 283, 285, 3, 2, 2, 2, 284, 274, 3, 2, 2, 2, 284, + 279, 3, 2, 2, 2, 284, 285, 3, 2, 2, 2, 285, 287, 3, 2, 2, 2, 286, 273, + 3, 2, 2, 2, 286, 287, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 289, 7, 48, + 2, 2, 289, 290, 5, 14, 8, 2, 290, 27, 3, 2, 2, 2, 291, 292, 7, 31, 2, 2, + 292, 298, 5, 96, 49, 2, 293, 295, 7, 92, 2, 2, 294, 296, 5, 110, 56, 2, + 295, 294, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, + 299, 7, 93, 2, 2, 298, 293, 3, 2, 2, 2, 298, 299, 3, 2, 2, 2, 299, 300, + 3, 2, 2, 2, 300, 301, 7, 48, 2, 2, 301, 302, 5, 14, 8, 2, 302, 29, 3, 2, + 2, 2, 303, 305, 7, 37, 2, 2, 304, 303, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, + 305, 306, 3, 2, 2, 2, 306, 307, 7, 6, 2, 2, 307, 308, 5, 96, 49, 2, 308, + 310, 7, 92, 2, 2, 309, 311, 5, 32, 17, 2, 310, 309, 3, 2, 2, 2, 310, 311, + 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 315, 7, 93, 2, 2, 313, 314, 7, 71, + 2, 2, 314, 316, 5, 68, 35, 2, 315, 313, 3, 2, 2, 2, 315, 316, 3, 2, 2, + 2, 316, 317, 3, 2, 2, 2, 317, 318, 7, 48, 2, 2, 318, 319, 5, 14, 8, 2, + 319, 31, 3, 2, 2, 2, 320, 321, 5, 38, 20, 2, 321, 322, 7, 47, 2, 2, 322, + 324, 3, 2, 2, 2, 323, 320, 3, 2, 2, 2, 323, 324, 3, 2, 2, 2, 324, 335, + 3, 2, 2, 2, 325, 328, 5, 34, 18, 2, 326, 327, 7, 47, 2, 2, 327, 329, 5, + 38, 20, 2, 328, 326, 3, 2, 2, 2, 328, 329, 3, 2, 2, 2, 329, 332, 3, 2, + 2, 2, 330, 331, 7, 47, 2, 2, 331, 333, 5, 36, 19, 2, 332, 330, 3, 2, 2, + 2, 332, 333, 3, 2, 2, 2, 333, 336, 3, 2, 2, 2, 334, 336, 5, 36, 19, 2, + 335, 325, 3, 2, 2, 2, 335, 334, 3, 2, 2, 2, 336, 338, 3, 2, 2, 2, 337, + 339, 7, 47, 2, 2, 338, 337, 3, 2, 2, 2, 338, 339, 3, 2, 2, 2, 339, 345, + 3, 2, 2, 2, 340, 342, 5, 38, 20, 2, 341, 343, 7, 47, 2, 2, 342, 341, 3, + 2, 2, 2, 342, 343, 3, 2, 2, 2, 343, 345, 3, 2, 2, 2, 344, 323, 3, 2, 2, + 2, 344, 340, 3, 2, 2, 2, 345, 33, 3, 2, 2, 2, 346, 347, 7, 46, 2, 2, 347, + 348, 5, 42, 22, 2, 348, 35, 3, 2, 2, 2, 349, 350, 7, 50, 2, 2, 350, 351, + 5, 42, 22, 2, 351, 37, 3, 2, 2, 2, 352, 357, 5, 40, 21, 2, 353, 354, 7, + 47, 2, 2, 354, 356, 5, 40, 21, 2, 355, 353, 3, 2, 2, 2, 356, 359, 3, 2, + 2, 2, 357, 355, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 39, 3, 2, 2, 2, + 359, 357, 3, 2, 2, 2, 360, 363, 5, 42, 22, 2, 361, 362, 7, 51, 2, 2, 362, + 364, 5, 68, 35, 2, 363, 361, 3, 2, 2, 2, 363, 364, 3, 2, 2, 2, 364, 367, + 3, 2, 2, 2, 365, 367, 7, 46, 2, 2, 366, 360, 3, 2, 2, 2, 366, 365, 3, 2, + 2, 2, 367, 41, 3, 2, 2, 2, 368, 371, 5, 96, 49, 2, 369, 370, 7, 48, 2, + 2, 370, 372, 5, 68, 35, 2, 371, 369, 3, 2, 2, 2, 371, 372, 3, 2, 2, 2, + 372, 43, 3, 2, 2, 2, 373, 378, 5, 46, 24, 2, 374, 375, 7, 49, 2, 2, 375, + 377, 5, 46, 24, 2, 376, 374, 3, 2, 2, 2, 377, 380, 3, 2, 2, 2, 378, 376, + 3, 2, 2, 2, 378, 379, 3, 2, 2, 2, 379, 382, 3, 2, 2, 2, 380, 378, 3, 2, + 2, 2, 381, 383, 7, 49, 2, 2, 382, 381, 3, 2, 2, 2, 382, 383, 3, 2, 2, 2, + 383, 384, 3, 2, 2, 2, 384, 385, 9, 2, 2, 2, 385, 45, 3, 2, 2, 2, 386, 388, + 5, 52, 27, 2, 387, 389, 5, 56, 29, 2, 388, 387, 3, 2, 2, 2, 388, 389, 3, + 2, 2, 2, 389, 492, 3, 2, 2, 2, 390, 391, 6, 24, 4, 2, 391, 414, 7, 39, + 2, 2, 392, 397, 5, 68, 35, 2, 393, 394, 7, 47, 2, 2, 394, 396, 5, 68, 35, + 2, 395, 393, 3, 2, 2, 2, 396, 399, 3, 2, 2, 2, 397, 395, 3, 2, 2, 2, 397, + 398, 3, 2, 2, 2, 398, 401, 3, 2, 2, 2, 399, 397, 3, 2, 2, 2, 400, 402, + 7, 47, 2, 2, 401, 400, 3, 2, 2, 2, 401, 402, 3, 2, 2, 2, 402, 415, 3, 2, + 2, 2, 403, 404, 7, 56, 2, 2, 404, 407, 5, 68, 35, 2, 405, 406, 7, 47, 2, + 2, 406, 408, 5, 68, 35, 2, 407, 405, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, + 409, 407, 3, 2, 2, 2, 409, 410, 3, 2, 2, 2, 410, 412, 3, 2, 2, 2, 411, + 413, 7, 47, 2, 2, 412, 411, 3, 2, 2, 2, 412, 413, 3, 2, 2, 2, 413, 415, + 3, 2, 2, 2, 414, 392, 3, 2, 2, 2, 414, 403, 3, 2, 2, 2, 415, 416, 3, 2, + 2, 2, 416, 417, 8, 24, 1, 2, 417, 492, 3, 2, 2, 2, 418, 419, 7, 33, 2, + 2, 419, 492, 5, 58, 30, 2, 420, 492, 7, 34, 2, 2, 421, 492, 7, 36, 2, 2, + 422, 492, 7, 35, 2, 2, 423, 425, 7, 7, 2, 2, 424, 426, 5, 92, 47, 2, 425, + 424, 3, 2, 2, 2, 425, 426, 3, 2, 2, 2, 426, 492, 3, 2, 2, 2, 427, 437, + 7, 8, 2, 2, 428, 435, 5, 68, 35, 2, 429, 430, 7, 47, 2, 2, 430, 433, 5, + 68, 35, 2, 431, 432, 7, 47, 2, 2, 432, 434, 5, 68, 35, 2, 433, 431, 3, + 2, 2, 2, 433, 434, 3, 2, 2, 2, 434, 436, 3, 2, 2, 2, 435, 429, 3, 2, 2, + 2, 435, 436, 3, 2, 2, 2, 436, 438, 3, 2, 2, 2, 437, 428, 3, 2, 2, 2, 437, + 438, 3, 2, 2, 2, 438, 441, 3, 2, 2, 2, 439, 440, 7, 9, 2, 2, 440, 442, + 5, 68, 35, 2, 441, 439, 3, 2, 2, 2, 441, 442, 3, 2, 2, 2, 442, 492, 3, + 2, 2, 2, 443, 492, 5, 102, 52, 2, 444, 445, 7, 10, 2, 2, 445, 492, 5, 64, + 33, 2, 446, 447, 7, 9, 2, 2, 447, 448, 5, 48, 25, 2, 448, 449, 7, 10, 2, + 2, 449, 450, 5, 50, 26, 2, 450, 492, 3, 2, 2, 2, 451, 452, 7, 13, 2, 2, + 452, 457, 5, 96, 49, 2, 453, 454, 7, 47, 2, 2, 454, 456, 5, 96, 49, 2, + 455, 453, 3, 2, 2, 2, 456, 459, 3, 2, 2, 2, 457, 455, 3, 2, 2, 2, 457, + 458, 3, 2, 2, 2, 458, 492, 3, 2, 2, 2, 459, 457, 3, 2, 2, 2, 460, 461, + 6, 24, 5, 2, 461, 462, 7, 40, 2, 2, 462, 469, 5, 84, 43, 2, 463, 464, 7, + 20, 2, 2, 464, 467, 5, 68, 35, 2, 465, 466, 7, 47, 2, 2, 466, 468, 5, 68, + 35, 2, 467, 465, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 470, 3, 2, 2, 2, + 469, 463, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 3, 2, 2, 2, 471, + 472, 8, 24, 1, 2, 472, 492, 3, 2, 2, 2, 473, 474, 7, 14, 2, 2, 474, 477, + 5, 68, 35, 2, 475, 476, 7, 47, 2, 2, 476, 478, 5, 68, 35, 2, 477, 475, + 3, 2, 2, 2, 477, 478, 3, 2, 2, 2, 478, 492, 3, 2, 2, 2, 479, 480, 6, 24, + 6, 2, 480, 481, 7, 11, 2, 2, 481, 486, 5, 96, 49, 2, 482, 483, 7, 47, 2, + 2, 483, 485, 5, 96, 49, 2, 484, 482, 3, 2, 2, 2, 485, 488, 3, 2, 2, 2, + 486, 484, 3, 2, 2, 2, 486, 487, 3, 2, 2, 2, 487, 489, 3, 2, 2, 2, 488, + 486, 3, 2, 2, 2, 489, 490, 8, 24, 1, 2, 490, 492, 3, 2, 2, 2, 491, 386, + 3, 2, 2, 2, 491, 390, 3, 2, 2, 2, 491, 418, 3, 2, 2, 2, 491, 420, 3, 2, + 2, 2, 491, 421, 3, 2, 2, 2, 491, 422, 3, 2, 2, 2, 491, 423, 3, 2, 2, 2, + 491, 427, 3, 2, 2, 2, 491, 443, 3, 2, 2, 2, 491, 444, 3, 2, 2, 2, 491, + 446, 3, 2, 2, 2, 491, 451, 3, 2, 2, 2, 491, 460, 3, 2, 2, 2, 491, 473, + 3, 2, 2, 2, 491, 479, 3, 2, 2, 2, 492, 47, 3, 2, 2, 2, 493, 495, 9, 3, + 2, 2, 494, 493, 3, 2, 2, 2, 495, 498, 3, 2, 2, 2, 496, 494, 3, 2, 2, 2, + 496, 497, 3, 2, 2, 2, 497, 499, 3, 2, 2, 2, 498, 496, 3, 2, 2, 2, 499, + 506, 5, 94, 48, 2, 500, 502, 9, 3, 2, 2, 501, 500, 3, 2, 2, 2, 502, 503, + 3, 2, 2, 2, 503, 501, 3, 2, 2, 2, 503, 504, 3, 2, 2, 2, 504, 506, 3, 2, + 2, 2, 505, 496, 3, 2, 2, 2, 505, 501, 3, 2, 2, 2, 506, 49, 3, 2, 2, 2, + 507, 514, 7, 46, 2, 2, 508, 509, 7, 92, 2, 2, 509, 510, 5, 60, 31, 2, 510, + 511, 7, 93, 2, 2, 511, 514, 3, 2, 2, 2, 512, 514, 5, 60, 31, 2, 513, 507, + 3, 2, 2, 2, 513, 508, 3, 2, 2, 2, 513, 512, 3, 2, 2, 2, 514, 51, 3, 2, + 2, 2, 515, 518, 5, 68, 35, 2, 516, 518, 5, 54, 28, 2, 517, 515, 3, 2, 2, + 2, 517, 516, 3, 2, 2, 2, 518, 519, 3, 2, 2, 2, 519, 520, 7, 47, 2, 2, 520, + 522, 3, 2, 2, 2, 521, 517, 3, 2, 2, 2, 522, 523, 3, 2, 2, 2, 523, 521, + 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 527, 3, 2, 2, 2, 525, 528, 5, 68, + 35, 2, 526, 528, 5, 54, 28, 2, 527, 525, 3, 2, 2, 2, 527, 526, 3, 2, 2, + 2, 527, 528, 3, 2, 2, 2, 528, 531, 3, 2, 2, 2, 529, 531, 5, 92, 47, 2, + 530, 521, 3, 2, 2, 2, 530, 529, 3, 2, 2, 2, 531, 53, 3, 2, 2, 2, 532, 533, + 7, 46, 2, 2, 533, 534, 5, 84, 43, 2, 534, 55, 3, 2, 2, 2, 535, 549, 7, + 51, 2, 2, 536, 541, 5, 52, 27, 2, 537, 538, 7, 51, 2, 2, 538, 540, 5, 52, + 27, 2, 539, 537, 3, 2, 2, 2, 540, 543, 3, 2, 2, 2, 541, 539, 3, 2, 2, 2, + 541, 542, 3, 2, 2, 2, 542, 546, 3, 2, 2, 2, 543, 541, 3, 2, 2, 2, 544, + 545, 7, 51, 2, 2, 545, 547, 5, 102, 52, 2, 546, 544, 3, 2, 2, 2, 546, 547, + 3, 2, 2, 2, 547, 550, 3, 2, 2, 2, 548, 550, 5, 102, 52, 2, 549, 536, 3, + 2, 2, 2, 549, 548, 3, 2, 2, 2, 550, 566, 3, 2, 2, 2, 551, 552, 6, 29, 7, + 2, 552, 553, 7, 48, 2, 2, 553, 556, 5, 68, 35, 2, 554, 555, 7, 51, 2, 2, + 555, 557, 5, 92, 47, 2, 556, 554, 3, 2, 2, 2, 556, 557, 3, 2, 2, 2, 557, + 558, 3, 2, 2, 2, 558, 559, 8, 29, 1, 2, 559, 566, 3, 2, 2, 2, 560, 563, + 9, 4, 2, 2, 561, 564, 5, 102, 52, 2, 562, 564, 5, 92, 47, 2, 563, 561, + 3, 2, 2, 2, 563, 562, 3, 2, 2, 2, 564, 566, 3, 2, 2, 2, 565, 535, 3, 2, + 2, 2, 565, 551, 3, 2, 2, 2, 565, 560, 3, 2, 2, 2, 566, 57, 3, 2, 2, 2, + 567, 572, 5, 84, 43, 2, 568, 569, 7, 47, 2, 2, 569, 571, 5, 84, 43, 2, + 570, 568, 3, 2, 2, 2, 571, 574, 3, 2, 2, 2, 572, 570, 3, 2, 2, 2, 572, + 573, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 575, 577, + 7, 47, 2, 2, 576, 575, 3, 2, 2, 2, 576, 577, 3, 2, 2, 2, 577, 59, 3, 2, + 2, 2, 578, 583, 5, 62, 32, 2, 579, 580, 7, 47, 2, 2, 580, 582, 5, 62, 32, + 2, 581, 579, 3, 2, 2, 2, 582, 585, 3, 2, 2, 2, 583, 581, 3, 2, 2, 2, 583, + 584, 3, 2, 2, 2, 584, 587, 3, 2, 2, 2, 585, 583, 3, 2, 2, 2, 586, 588, + 7, 47, 2, 2, 587, 586, 3, 2, 2, 2, 587, 588, 3, 2, 2, 2, 588, 61, 3, 2, + 2, 2, 589, 592, 5, 96, 49, 2, 590, 591, 7, 12, 2, 2, 591, 593, 5, 96, 49, + 2, 592, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 63, 3, 2, 2, 2, 594, + 599, 5, 66, 34, 2, 595, 596, 7, 47, 2, 2, 596, 598, 5, 66, 34, 2, 597, + 595, 3, 2, 2, 2, 598, 601, 3, 2, 2, 2, 599, 597, 3, 2, 2, 2, 599, 600, + 3, 2, 2, 2, 600, 65, 3, 2, 2, 2, 601, 599, 3, 2, 2, 2, 602, 605, 5, 94, + 48, 2, 603, 604, 7, 12, 2, 2, 604, 606, 5, 96, 49, 2, 605, 603, 3, 2, 2, + 2, 605, 606, 3, 2, 2, 2, 606, 67, 3, 2, 2, 2, 607, 613, 5, 80, 41, 2, 608, + 609, 7, 15, 2, 2, 609, 610, 5, 80, 41, 2, 610, 611, 7, 17, 2, 2, 611, 612, + 5, 68, 35, 2, 612, 614, 3, 2, 2, 2, 613, 608, 3, 2, 2, 2, 613, 614, 3, + 2, 2, 2, 614, 622, 3, 2, 2, 2, 615, 617, 7, 26, 2, 2, 616, 618, 5, 70, + 36, 2, 617, 616, 3, 2, 2, 2, 617, 618, 3, 2, 2, 2, 618, 619, 3, 2, 2, 2, + 619, 620, 7, 48, 2, 2, 620, 622, 5, 68, 35, 2, 621, 607, 3, 2, 2, 2, 621, + 615, 3, 2, 2, 2, 622, 69, 3, 2, 2, 2, 623, 624, 5, 72, 37, 2, 624, 625, + 7, 47, 2, 2, 625, 627, 3, 2, 2, 2, 626, 623, 3, 2, 2, 2, 626, 627, 3, 2, + 2, 2, 627, 638, 3, 2, 2, 2, 628, 631, 5, 76, 39, 2, 629, 630, 7, 47, 2, + 2, 630, 632, 5, 72, 37, 2, 631, 629, 3, 2, 2, 2, 631, 632, 3, 2, 2, 2, + 632, 635, 3, 2, 2, 2, 633, 634, 7, 47, 2, 2, 634, 636, 5, 78, 40, 2, 635, + 633, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 639, 3, 2, 2, 2, 637, 639, + 5, 78, 40, 2, 638, 628, 3, 2, 2, 2, 638, 637, 3, 2, 2, 2, 639, 641, 3, + 2, 2, 2, 640, 642, 7, 47, 2, 2, 641, 640, 3, 2, 2, 2, 641, 642, 3, 2, 2, + 2, 642, 648, 3, 2, 2, 2, 643, 645, 5, 72, 37, 2, 644, 646, 7, 47, 2, 2, + 645, 644, 3, 2, 2, 2, 645, 646, 3, 2, 2, 2, 646, 648, 3, 2, 2, 2, 647, + 626, 3, 2, 2, 2, 647, 643, 3, 2, 2, 2, 648, 71, 3, 2, 2, 2, 649, 654, 5, + 74, 38, 2, 650, 651, 7, 47, 2, 2, 651, 653, 5, 74, 38, 2, 652, 650, 3, + 2, 2, 2, 653, 656, 3, 2, 2, 2, 654, 652, 3, 2, 2, 2, 654, 655, 3, 2, 2, + 2, 655, 73, 3, 2, 2, 2, 656, 654, 3, 2, 2, 2, 657, 660, 5, 96, 49, 2, 658, + 659, 7, 51, 2, 2, 659, 661, 5, 68, 35, 2, 660, 658, 3, 2, 2, 2, 660, 661, + 3, 2, 2, 2, 661, 664, 3, 2, 2, 2, 662, 664, 7, 46, 2, 2, 663, 657, 3, 2, + 2, 2, 663, 662, 3, 2, 2, 2, 664, 75, 3, 2, 2, 2, 665, 666, 7, 46, 2, 2, + 666, 667, 5, 96, 49, 2, 667, 77, 3, 2, 2, 2, 668, 669, 7, 50, 2, 2, 669, + 670, 5, 96, 49, 2, 670, 79, 3, 2, 2, 2, 671, 672, 8, 41, 1, 2, 672, 676, + 5, 82, 42, 2, 673, 674, 7, 29, 2, 2, 674, 676, 5, 80, 41, 5, 675, 671, + 3, 2, 2, 2, 675, 673, 3, 2, 2, 2, 676, 685, 3, 2, 2, 2, 677, 678, 12, 4, + 2, 2, 678, 679, 7, 28, 2, 2, 679, 684, 5, 80, 41, 5, 680, 681, 12, 3, 2, + 2, 681, 682, 7, 27, 2, 2, 682, 684, 5, 80, 41, 4, 683, 677, 3, 2, 2, 2, + 683, 680, 3, 2, 2, 2, 684, 687, 3, 2, 2, 2, 685, 683, 3, 2, 2, 2, 685, + 686, 3, 2, 2, 2, 686, 81, 3, 2, 2, 2, 687, 685, 3, 2, 2, 2, 688, 689, 8, + 42, 1, 2, 689, 690, 5, 84, 43, 2, 690, 712, 3, 2, 2, 2, 691, 707, 12, 4, + 2, 2, 692, 708, 7, 63, 2, 2, 693, 708, 7, 64, 2, 2, 694, 708, 7, 65, 2, + 2, 695, 708, 7, 66, 2, 2, 696, 708, 7, 67, 2, 2, 697, 708, 7, 68, 2, 2, + 698, 708, 7, 69, 2, 2, 699, 701, 7, 29, 2, 2, 700, 699, 3, 2, 2, 2, 700, + 701, 3, 2, 2, 2, 701, 702, 3, 2, 2, 2, 702, 708, 7, 20, 2, 2, 703, 705, + 7, 30, 2, 2, 704, 706, 7, 29, 2, 2, 705, 704, 3, 2, 2, 2, 705, 706, 3, + 2, 2, 2, 706, 708, 3, 2, 2, 2, 707, 692, 3, 2, 2, 2, 707, 693, 3, 2, 2, + 2, 707, 694, 3, 2, 2, 2, 707, 695, 3, 2, 2, 2, 707, 696, 3, 2, 2, 2, 707, + 697, 3, 2, 2, 2, 707, 698, 3, 2, 2, 2, 707, 700, 3, 2, 2, 2, 707, 703, + 3, 2, 2, 2, 708, 709, 3, 2, 2, 2, 709, 711, 5, 82, 42, 5, 710, 691, 3, + 2, 2, 2, 711, 714, 3, 2, 2, 2, 712, 710, 3, 2, 2, 2, 712, 713, 3, 2, 2, + 2, 713, 83, 3, 2, 2, 2, 714, 712, 3, 2, 2, 2, 715, 717, 8, 43, 1, 2, 716, + 718, 7, 38, 2, 2, 717, 716, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 719, + 3, 2, 2, 2, 719, 723, 5, 86, 44, 2, 720, 722, 5, 106, 54, 2, 721, 720, + 3, 2, 2, 2, 722, 725, 3, 2, 2, 2, 723, 721, 3, 2, 2, 2, 723, 724, 3, 2, + 2, 2, 724, 729, 3, 2, 2, 2, 725, 723, 3, 2, 2, 2, 726, 727, 9, 5, 2, 2, + 727, 729, 5, 84, 43, 9, 728, 715, 3, 2, 2, 2, 728, 726, 3, 2, 2, 2, 729, + 753, 3, 2, 2, 2, 730, 731, 12, 10, 2, 2, 731, 732, 7, 50, 2, 2, 732, 752, + 5, 84, 43, 10, 733, 734, 12, 8, 2, 2, 734, 735, 9, 6, 2, 2, 735, 752, 5, + 84, 43, 9, 736, 737, 12, 7, 2, 2, 737, 738, 9, 7, 2, 2, 738, 752, 5, 84, + 43, 8, 739, 740, 12, 6, 2, 2, 740, 741, 9, 8, 2, 2, 741, 752, 5, 84, 43, + 7, 742, 743, 12, 5, 2, 2, 743, 744, 7, 54, 2, 2, 744, 752, 5, 84, 43, 6, + 745, 746, 12, 4, 2, 2, 746, 747, 7, 53, 2, 2, 747, 752, 5, 84, 43, 5, 748, + 749, 12, 3, 2, 2, 749, 750, 7, 52, 2, 2, 750, 752, 5, 84, 43, 4, 751, 730, + 3, 2, 2, 2, 751, 733, 3, 2, 2, 2, 751, 736, 3, 2, 2, 2, 751, 739, 3, 2, + 2, 2, 751, 742, 3, 2, 2, 2, 751, 745, 3, 2, 2, 2, 751, 748, 3, 2, 2, 2, + 752, 755, 3, 2, 2, 2, 753, 751, 3, 2, 2, 2, 753, 754, 3, 2, 2, 2, 754, + 85, 3, 2, 2, 2, 755, 753, 3, 2, 2, 2, 756, 759, 7, 92, 2, 2, 757, 760, + 5, 102, 52, 2, 758, 760, 5, 90, 46, 2, 759, 757, 3, 2, 2, 2, 759, 758, + 3, 2, 2, 2, 759, 760, 3, 2, 2, 2, 760, 761, 3, 2, 2, 2, 761, 794, 7, 93, + 2, 2, 762, 764, 7, 96, 2, 2, 763, 765, 5, 90, 46, 2, 764, 763, 3, 2, 2, + 2, 764, 765, 3, 2, 2, 2, 765, 766, 3, 2, 2, 2, 766, 794, 7, 97, 2, 2, 767, + 769, 7, 94, 2, 2, 768, 770, 5, 88, 45, 2, 769, 768, 3, 2, 2, 2, 769, 770, + 3, 2, 2, 2, 770, 771, 3, 2, 2, 2, 771, 794, 7, 95, 2, 2, 772, 773, 7, 45, + 2, 2, 773, 775, 5, 92, 47, 2, 774, 776, 7, 47, 2, 2, 775, 774, 3, 2, 2, + 2, 775, 776, 3, 2, 2, 2, 776, 777, 3, 2, 2, 2, 777, 778, 7, 45, 2, 2, 778, + 794, 3, 2, 2, 2, 779, 794, 7, 44, 2, 2, 780, 794, 5, 96, 49, 2, 781, 794, + 7, 39, 2, 2, 782, 794, 7, 40, 2, 2, 783, 785, 7, 58, 2, 2, 784, 783, 3, + 2, 2, 2, 784, 785, 3, 2, 2, 2, 785, 786, 3, 2, 2, 2, 786, 794, 5, 98, 50, + 2, 787, 794, 7, 22, 2, 2, 788, 790, 7, 85, 2, 2, 789, 788, 3, 2, 2, 2, + 790, 791, 3, 2, 2, 2, 791, 789, 3, 2, 2, 2, 791, 792, 3, 2, 2, 2, 792, + 794, 3, 2, 2, 2, 793, 756, 3, 2, 2, 2, 793, 762, 3, 2, 2, 2, 793, 767, + 3, 2, 2, 2, 793, 772, 3, 2, 2, 2, 793, 779, 3, 2, 2, 2, 793, 780, 3, 2, + 2, 2, 793, 781, 3, 2, 2, 2, 793, 782, 3, 2, 2, 2, 793, 784, 3, 2, 2, 2, + 793, 787, 3, 2, 2, 2, 793, 789, 3, 2, 2, 2, 794, 87, 3, 2, 2, 2, 795, 796, + 5, 68, 35, 2, 796, 797, 7, 48, 2, 2, 797, 798, 5, 68, 35, 2, 798, 802, + 3, 2, 2, 2, 799, 800, 7, 50, 2, 2, 800, 802, 5, 84, 43, 2, 801, 795, 3, + 2, 2, 2, 801, 799, 3, 2, 2, 2, 802, 814, 3, 2, 2, 2, 803, 810, 7, 47, 2, + 2, 804, 805, 5, 68, 35, 2, 805, 806, 7, 48, 2, 2, 806, 807, 5, 68, 35, + 2, 807, 811, 3, 2, 2, 2, 808, 809, 7, 50, 2, 2, 809, 811, 5, 84, 43, 2, + 810, 804, 3, 2, 2, 2, 810, 808, 3, 2, 2, 2, 811, 813, 3, 2, 2, 2, 812, + 803, 3, 2, 2, 2, 813, 816, 3, 2, 2, 2, 814, 812, 3, 2, 2, 2, 814, 815, + 3, 2, 2, 2, 815, 818, 3, 2, 2, 2, 816, 814, 3, 2, 2, 2, 817, 819, 7, 47, + 2, 2, 818, 817, 3, 2, 2, 2, 818, 819, 3, 2, 2, 2, 819, 827, 3, 2, 2, 2, + 820, 821, 5, 68, 35, 2, 821, 822, 7, 48, 2, 2, 822, 823, 5, 68, 35, 2, + 823, 824, 5, 120, 61, 2, 824, 827, 3, 2, 2, 2, 825, 827, 5, 90, 46, 2, + 826, 801, 3, 2, 2, 2, 826, 820, 3, 2, 2, 2, 826, 825, 3, 2, 2, 2, 827, + 89, 3, 2, 2, 2, 828, 831, 5, 68, 35, 2, 829, 831, 5, 54, 28, 2, 830, 828, + 3, 2, 2, 2, 830, 829, 3, 2, 2, 2, 831, 846, 3, 2, 2, 2, 832, 847, 5, 120, + 61, 2, 833, 836, 7, 47, 2, 2, 834, 837, 5, 68, 35, 2, 835, 837, 5, 54, + 28, 2, 836, 834, 3, 2, 2, 2, 836, 835, 3, 2, 2, 2, 837, 839, 3, 2, 2, 2, + 838, 833, 3, 2, 2, 2, 839, 842, 3, 2, 2, 2, 840, 838, 3, 2, 2, 2, 840, + 841, 3, 2, 2, 2, 841, 844, 3, 2, 2, 2, 842, 840, 3, 2, 2, 2, 843, 845, + 7, 47, 2, 2, 844, 843, 3, 2, 2, 2, 844, 845, 3, 2, 2, 2, 845, 847, 3, 2, + 2, 2, 846, 832, 3, 2, 2, 2, 846, 840, 3, 2, 2, 2, 847, 91, 3, 2, 2, 2, + 848, 853, 5, 68, 35, 2, 849, 850, 7, 47, 2, 2, 850, 852, 5, 68, 35, 2, + 851, 849, 3, 2, 2, 2, 852, 855, 3, 2, 2, 2, 853, 851, 3, 2, 2, 2, 853, + 854, 3, 2, 2, 2, 854, 857, 3, 2, 2, 2, 855, 853, 3, 2, 2, 2, 856, 858, + 7, 47, 2, 2, 857, 856, 3, 2, 2, 2, 857, 858, 3, 2, 2, 2, 858, 93, 3, 2, + 2, 2, 859, 860, 8, 48, 1, 2, 860, 861, 5, 96, 49, 2, 861, 867, 3, 2, 2, + 2, 862, 863, 12, 4, 2, 2, 863, 864, 7, 43, 2, 2, 864, 866, 5, 96, 49, 2, + 865, 862, 3, 2, 2, 2, 866, 869, 3, 2, 2, 2, 867, 865, 3, 2, 2, 2, 867, + 868, 3, 2, 2, 2, 868, 95, 3, 2, 2, 2, 869, 867, 3, 2, 2, 2, 870, 871, 9, + 9, 2, 2, 871, 97, 3, 2, 2, 2, 872, 876, 5, 100, 51, 2, 873, 876, 7, 90, + 2, 2, 874, 876, 7, 91, 2, 2, 875, 872, 3, 2, 2, 2, 875, 873, 3, 2, 2, 2, + 875, 874, 3, 2, 2, 2, 876, 99, 3, 2, 2, 2, 877, 878, 9, 10, 2, 2, 878, + 101, 3, 2, 2, 2, 879, 881, 7, 32, 2, 2, 880, 882, 5, 104, 53, 2, 881, 880, + 3, 2, 2, 2, 881, 882, 3, 2, 2, 2, 882, 103, 3, 2, 2, 2, 883, 884, 7, 9, + 2, 2, 884, 887, 5, 68, 35, 2, 885, 887, 5, 92, 47, 2, 886, 883, 3, 2, 2, + 2, 886, 885, 3, 2, 2, 2, 887, 105, 3, 2, 2, 2, 888, 889, 7, 43, 2, 2, 889, + 891, 5, 96, 49, 2, 890, 892, 5, 108, 55, 2, 891, 890, 3, 2, 2, 2, 891, + 892, 3, 2, 2, 2, 892, 895, 3, 2, 2, 2, 893, 895, 5, 108, 55, 2, 894, 888, + 3, 2, 2, 2, 894, 893, 3, 2, 2, 2, 895, 107, 3, 2, 2, 2, 896, 898, 7, 92, + 2, 2, 897, 899, 5, 110, 56, 2, 898, 897, 3, 2, 2, 2, 898, 899, 3, 2, 2, + 2, 899, 900, 3, 2, 2, 2, 900, 906, 7, 93, 2, 2, 901, 902, 7, 96, 2, 2, + 902, 903, 5, 114, 58, 2, 903, 904, 7, 97, 2, 2, 904, 906, 3, 2, 2, 2, 905, + 896, 3, 2, 2, 2, 905, 901, 3, 2, 2, 2, 906, 109, 3, 2, 2, 2, 907, 912, + 5, 112, 57, 2, 908, 909, 7, 47, 2, 2, 909, 911, 5, 112, 57, 2, 910, 908, + 3, 2, 2, 2, 911, 914, 3, 2, 2, 2, 912, 910, 3, 2, 2, 2, 912, 913, 3, 2, + 2, 2, 913, 916, 3, 2, 2, 2, 914, 912, 3, 2, 2, 2, 915, 917, 7, 47, 2, 2, + 916, 915, 3, 2, 2, 2, 916, 917, 3, 2, 2, 2, 917, 111, 3, 2, 2, 2, 918, + 922, 5, 68, 35, 2, 919, 923, 5, 120, 61, 2, 920, 921, 7, 51, 2, 2, 921, + 923, 5, 68, 35, 2, 922, 919, 3, 2, 2, 2, 922, 920, 3, 2, 2, 2, 922, 923, + 3, 2, 2, 2, 923, 927, 3, 2, 2, 2, 924, 925, 9, 11, 2, 2, 925, 927, 5, 68, + 35, 2, 926, 918, 3, 2, 2, 2, 926, 924, 3, 2, 2, 2, 927, 113, 3, 2, 2, 2, + 928, 933, 5, 116, 59, 2, 929, 930, 7, 47, 2, 2, 930, 932, 5, 116, 59, 2, + 931, 929, 3, 2, 2, 2, 932, 935, 3, 2, 2, 2, 933, 931, 3, 2, 2, 2, 933, + 934, 3, 2, 2, 2, 934, 937, 3, 2, 2, 2, 935, 933, 3, 2, 2, 2, 936, 938, + 7, 47, 2, 2, 937, 936, 3, 2, 2, 2, 937, 938, 3, 2, 2, 2, 938, 115, 3, 2, + 2, 2, 939, 958, 7, 44, 2, 2, 940, 948, 5, 68, 35, 2, 941, 943, 7, 48, 2, + 2, 942, 944, 5, 68, 35, 2, 943, 942, 3, 2, 2, 2, 943, 944, 3, 2, 2, 2, + 944, 946, 3, 2, 2, 2, 945, 947, 5, 118, 60, 2, 946, 945, 3, 2, 2, 2, 946, + 947, 3, 2, 2, 2, 947, 949, 3, 2, 2, 2, 948, 941, 3, 2, 2, 2, 948, 949, + 3, 2, 2, 2, 949, 958, 3, 2, 2, 2, 950, 952, 7, 48, 2, 2, 951, 953, 5, 68, + 35, 2, 952, 951, 3, 2, 2, 2, 952, 953, 3, 2, 2, 2, 953, 955, 3, 2, 2, 2, + 954, 956, 5, 118, 60, 2, 955, 954, 3, 2, 2, 2, 955, 956, 3, 2, 2, 2, 956, + 958, 3, 2, 2, 2, 957, 939, 3, 2, 2, 2, 957, 940, 3, 2, 2, 2, 957, 950, + 3, 2, 2, 2, 958, 117, 3, 2, 2, 2, 959, 961, 7, 48, 2, 2, 960, 962, 5, 68, + 35, 2, 961, 960, 3, 2, 2, 2, 961, 962, 3, 2, 2, 2, 962, 119, 3, 2, 2, 2, + 963, 964, 7, 19, 2, 2, 964, 965, 5, 58, 30, 2, 965, 966, 7, 20, 2, 2, 966, + 968, 5, 80, 41, 2, 967, 969, 5, 122, 62, 2, 968, 967, 3, 2, 2, 2, 968, + 969, 3, 2, 2, 2, 969, 121, 3, 2, 2, 2, 970, 977, 5, 120, 61, 2, 971, 972, + 7, 15, 2, 2, 972, 974, 5, 68, 35, 2, 973, 975, 5, 122, 62, 2, 974, 973, + 3, 2, 2, 2, 974, 975, 3, 2, 2, 2, 975, 977, 3, 2, 2, 2, 976, 970, 3, 2, + 2, 2, 976, 971, 3, 2, 2, 2, 977, 123, 3, 2, 2, 2, 153, 127, 136, 140, 142, + 148, 153, 162, 166, 173, 176, 185, 193, 196, 199, 202, 205, 213, 222, 227, + 229, 237, 241, 247, 250, 270, 284, 286, 295, 298, 304, 310, 315, 323, 328, + 332, 335, 338, 342, 344, 357, 363, 366, 371, 378, 382, 388, 397, 401, 409, + 412, 414, 425, 433, 435, 437, 441, 457, 467, 469, 477, 486, 491, 496, 503, + 505, 513, 517, 523, 527, 530, 541, 546, 549, 556, 563, 565, 572, 576, 583, + 587, 592, 599, 605, 613, 617, 621, 626, 631, 635, 638, 641, 645, 647, 654, + 660, 663, 675, 683, 685, 700, 705, 707, 712, 717, 723, 728, 751, 753, 759, + 764, 769, 775, 784, 791, 793, 801, 810, 814, 818, 826, 830, 836, 840, 844, + 846, 853, 857, 867, 875, 881, 886, 891, 894, 898, 905, 912, 916, 922, 926, + 933, 937, 943, 946, 948, 952, 955, 957, 961, 968, 974, 976, +} +var deserializer = antlr.NewATNDeserializer(nil) +var deserializedATN = deserializer.DeserializeFromUInt16(parserATN) + +var literalNames = []string{ + "", "", "", "", "'def'", "'return'", "'raise'", "'from'", "'import'", "'nonlocal'", + "'as'", "'global'", "'assert'", "'if'", "'elif'", "'else'", "'while'", + "'for'", "'in'", "'try'", "'None'", "'finally'", "'with'", "'except'", + "'lambda'", "'or'", "'and'", "'not'", "'is'", "'class'", "'yield'", "'del'", + "'pass'", "'continue'", "'break'", "'async'", "'await'", "'print'", "'exec'", + "'True'", "'False'", "'.'", "'...'", "'`'", "'*'", "','", "':'", "';'", + "'**'", "'='", "'|'", "'^'", "'&'", "'<<'", "'>>'", "'+'", "'-'", "'/'", + "'%'", "'//'", "'~'", "'<'", "'>'", "'=='", "'>='", "'<='", "'<>'", "'!='", + "'@'", "'->'", "'+='", "'-='", "'*='", "'@='", "'/='", "'%='", "'&='", + "'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='", "", "", "", "", "", + "", "", "'('", "')'", "'{'", "'}'", "'['", "']'", +} +var symbolicNames = []string{ + "", "INDENT", "DEDENT", "LINE_BREAK", "DEF", "RETURN", "RAISE", "FROM", + "IMPORT", "NONLOCAL", "AS", "GLOBAL", "ASSERT", "IF", "ELIF", "ELSE", "WHILE", + "FOR", "IN", "TRY", "NONE", "FINALLY", "WITH", "EXCEPT", "LAMBDA", "OR", + "AND", "NOT", "IS", "CLASS", "YIELD", "DEL", "PASS", "CONTINUE", "BREAK", + "ASYNC", "AWAIT", "PRINT", "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", + "REVERSE_QUOTE", "STAR", "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", + "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "LESS_THAN", "GREATER_THAN", "EQUALS", + "GT_EQ", "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", + "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "AND_ASSIGN", + "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", + "IDIV_ASSIGN", "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", + "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", "OPEN_PAREN", "CLOSE_PAREN", + "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", "NAME", "LINE_JOIN", + "NEWLINE", "WS", "COMMENT", +} + +var ruleNames = []string{ + "root", "single_input", "file_input", "eval_input", "stmt", "compound_stmt", + "suite", "decorator", "elif_clause", "else_clause", "finally_clause", "with_item", + "except_clause", "classdef", "funcdef", "typedargslist", "args", "kwargs", + "def_parameters", "def_parameter", "named_parameter", "simple_stmt", "small_stmt", + "from_stmt_source", "from_stmt_as_names", "testlist_star_expr", "star_expr", + "assign_part", "exprlist", "import_as_names", "import_as_name", "dotted_as_names", + "dotted_as_name", "test", "varargslist", "vardef_parameters", "vardef_parameter", + "varargs", "varkwargs", "logical_test", "comparison", "expr", "atom", "dictorsetmaker", + "testlist_comp", "testlist", "dotted_name", "name", "number", "integer", + "yield_expr", "yield_arg", "trailer", "arguments", "arglist", "argument", + "subscriptlist", "subscript", "sliceop", "comp_for", "comp_iter", +} +var decisionToDFA = make([]*antlr.DFA, len(deserializedATN.DecisionToState)) + +func init() { + for index, ds := range deserializedATN.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +type PythonParser struct { + PythonBaseParser +} + +func NewPythonParser(input antlr.TokenStream) *PythonParser { + this := new(PythonParser) + + this.BaseParser = antlr.NewBaseParser(input) + + this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache()) + this.RuleNames = ruleNames + this.LiteralNames = literalNames + this.SymbolicNames = symbolicNames + this.GrammarFileName = "PythonParser.g4" + + return this +} + +// PythonParser tokens. +const ( + PythonParserEOF = antlr.TokenEOF + PythonParserINDENT = 1 + PythonParserDEDENT = 2 + PythonParserLINE_BREAK = 3 + PythonParserDEF = 4 + PythonParserRETURN = 5 + PythonParserRAISE = 6 + PythonParserFROM = 7 + PythonParserIMPORT = 8 + PythonParserNONLOCAL = 9 + PythonParserAS = 10 + PythonParserGLOBAL = 11 + PythonParserASSERT = 12 + PythonParserIF = 13 + PythonParserELIF = 14 + PythonParserELSE = 15 + PythonParserWHILE = 16 + PythonParserFOR = 17 + PythonParserIN = 18 + PythonParserTRY = 19 + PythonParserNONE = 20 + PythonParserFINALLY = 21 + PythonParserWITH = 22 + PythonParserEXCEPT = 23 + PythonParserLAMBDA = 24 + PythonParserOR = 25 + PythonParserAND = 26 + PythonParserNOT = 27 + PythonParserIS = 28 + PythonParserCLASS = 29 + PythonParserYIELD = 30 + PythonParserDEL = 31 + PythonParserPASS = 32 + PythonParserCONTINUE = 33 + PythonParserBREAK = 34 + PythonParserASYNC = 35 + PythonParserAWAIT = 36 + PythonParserPRINT = 37 + PythonParserEXEC = 38 + PythonParserTRUE = 39 + PythonParserFALSE = 40 + PythonParserDOT = 41 + PythonParserELLIPSIS = 42 + PythonParserREVERSE_QUOTE = 43 + PythonParserSTAR = 44 + PythonParserCOMMA = 45 + PythonParserCOLON = 46 + PythonParserSEMI_COLON = 47 + PythonParserPOWER = 48 + PythonParserASSIGN = 49 + PythonParserOR_OP = 50 + PythonParserXOR = 51 + PythonParserAND_OP = 52 + PythonParserLEFT_SHIFT = 53 + PythonParserRIGHT_SHIFT = 54 + PythonParserADD = 55 + PythonParserMINUS = 56 + PythonParserDIV = 57 + PythonParserMOD = 58 + PythonParserIDIV = 59 + PythonParserNOT_OP = 60 + PythonParserLESS_THAN = 61 + PythonParserGREATER_THAN = 62 + PythonParserEQUALS = 63 + PythonParserGT_EQ = 64 + PythonParserLT_EQ = 65 + PythonParserNOT_EQ_1 = 66 + PythonParserNOT_EQ_2 = 67 + PythonParserAT = 68 + PythonParserARROW = 69 + PythonParserADD_ASSIGN = 70 + PythonParserSUB_ASSIGN = 71 + PythonParserMULT_ASSIGN = 72 + PythonParserAT_ASSIGN = 73 + PythonParserDIV_ASSIGN = 74 + PythonParserMOD_ASSIGN = 75 + PythonParserAND_ASSIGN = 76 + PythonParserOR_ASSIGN = 77 + PythonParserXOR_ASSIGN = 78 + PythonParserLEFT_SHIFT_ASSIGN = 79 + PythonParserRIGHT_SHIFT_ASSIGN = 80 + PythonParserPOWER_ASSIGN = 81 + PythonParserIDIV_ASSIGN = 82 + PythonParserSTRING = 83 + PythonParserDECIMAL_INTEGER = 84 + PythonParserOCT_INTEGER = 85 + PythonParserHEX_INTEGER = 86 + PythonParserBIN_INTEGER = 87 + PythonParserIMAG_NUMBER = 88 + PythonParserFLOAT_NUMBER = 89 + PythonParserOPEN_PAREN = 90 + PythonParserCLOSE_PAREN = 91 + PythonParserOPEN_BRACE = 92 + PythonParserCLOSE_BRACE = 93 + PythonParserOPEN_BRACKET = 94 + PythonParserCLOSE_BRACKET = 95 + PythonParserNAME = 96 + PythonParserLINE_JOIN = 97 + PythonParserNEWLINE = 98 + PythonParserWS = 99 + PythonParserCOMMENT = 100 +) + +// PythonParser rules. +const ( + PythonParserRULE_root = 0 + PythonParserRULE_single_input = 1 + PythonParserRULE_file_input = 2 + PythonParserRULE_eval_input = 3 + PythonParserRULE_stmt = 4 + PythonParserRULE_compound_stmt = 5 + PythonParserRULE_suite = 6 + PythonParserRULE_decorator = 7 + PythonParserRULE_elif_clause = 8 + PythonParserRULE_else_clause = 9 + PythonParserRULE_finally_clause = 10 + PythonParserRULE_with_item = 11 + PythonParserRULE_except_clause = 12 + PythonParserRULE_classdef = 13 + PythonParserRULE_funcdef = 14 + PythonParserRULE_typedargslist = 15 + PythonParserRULE_args = 16 + PythonParserRULE_kwargs = 17 + PythonParserRULE_def_parameters = 18 + PythonParserRULE_def_parameter = 19 + PythonParserRULE_named_parameter = 20 + PythonParserRULE_simple_stmt = 21 + PythonParserRULE_small_stmt = 22 + PythonParserRULE_from_stmt_source = 23 + PythonParserRULE_from_stmt_as_names = 24 + PythonParserRULE_testlist_star_expr = 25 + PythonParserRULE_star_expr = 26 + PythonParserRULE_assign_part = 27 + PythonParserRULE_exprlist = 28 + PythonParserRULE_import_as_names = 29 + PythonParserRULE_import_as_name = 30 + PythonParserRULE_dotted_as_names = 31 + PythonParserRULE_dotted_as_name = 32 + PythonParserRULE_test = 33 + PythonParserRULE_varargslist = 34 + PythonParserRULE_vardef_parameters = 35 + PythonParserRULE_vardef_parameter = 36 + PythonParserRULE_varargs = 37 + PythonParserRULE_varkwargs = 38 + PythonParserRULE_logical_test = 39 + PythonParserRULE_comparison = 40 + PythonParserRULE_expr = 41 + PythonParserRULE_atom = 42 + PythonParserRULE_dictorsetmaker = 43 + PythonParserRULE_testlist_comp = 44 + PythonParserRULE_testlist = 45 + PythonParserRULE_dotted_name = 46 + PythonParserRULE_name = 47 + PythonParserRULE_number = 48 + PythonParserRULE_integer = 49 + PythonParserRULE_yield_expr = 50 + PythonParserRULE_yield_arg = 51 + PythonParserRULE_trailer = 52 + PythonParserRULE_arguments = 53 + PythonParserRULE_arglist = 54 + PythonParserRULE_argument = 55 + PythonParserRULE_subscriptlist = 56 + PythonParserRULE_subscript = 57 + PythonParserRULE_sliceop = 58 + PythonParserRULE_comp_for = 59 + PythonParserRULE_comp_iter = 60 +) + +// IRootContext is an interface to support dynamic dispatch. +type IRootContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsRootContext differentiates from other interfaces. + IsRootContext() +} + +type RootContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRootContext() *RootContext { + var p = new(RootContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_root + return p +} + +func (*RootContext) IsRootContext() {} + +func NewRootContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RootContext { + var p = new(RootContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_root + + return p +} + +func (s *RootContext) GetParser() antlr.Parser { return s.parser } + +func (s *RootContext) EOF() antlr.TerminalNode { + return s.GetToken(PythonParserEOF, 0) +} + +func (s *RootContext) Single_input() ISingle_inputContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISingle_inputContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISingle_inputContext) +} + +func (s *RootContext) File_input() IFile_inputContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IFile_inputContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IFile_inputContext) +} + +func (s *RootContext) Eval_input() IEval_inputContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IEval_inputContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IEval_inputContext) +} + +func (s *RootContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RootContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *RootContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterRoot(s) + } +} + +func (s *RootContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitRoot(s) + } +} + +func (p *PythonParser) Root() (localctx IRootContext) { + localctx = NewRootContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 0, PythonParserRULE_root) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + p.SetState(125) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) == 1 { + { + p.SetState(122) + p.Single_input() + } + + } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) == 2 { + { + p.SetState(123) + p.File_input() + } + + } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) == 3 { + { + p.SetState(124) + p.Eval_input() + } + + } + { + p.SetState(127) + p.Match(PythonParserEOF) + } + + return localctx +} + +// ISingle_inputContext is an interface to support dynamic dispatch. +type ISingle_inputContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsSingle_inputContext differentiates from other interfaces. + IsSingle_inputContext() +} + +type Single_inputContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySingle_inputContext() *Single_inputContext { + var p = new(Single_inputContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_single_input + return p +} + +func (*Single_inputContext) IsSingle_inputContext() {} + +func NewSingle_inputContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Single_inputContext { + var p = new(Single_inputContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_single_input + + return p +} + +func (s *Single_inputContext) GetParser() antlr.Parser { return s.parser } + +func (s *Single_inputContext) LINE_BREAK() antlr.TerminalNode { + return s.GetToken(PythonParserLINE_BREAK, 0) +} + +func (s *Single_inputContext) Simple_stmt() ISimple_stmtContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISimple_stmtContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISimple_stmtContext) +} + +func (s *Single_inputContext) Compound_stmt() ICompound_stmtContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ICompound_stmtContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ICompound_stmtContext) +} + +func (s *Single_inputContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Single_inputContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Single_inputContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterSingle_input(s) + } +} + +func (s *Single_inputContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitSingle_input(s) + } +} + +func (p *PythonParser) Single_input() (localctx ISingle_inputContext) { + localctx = NewSingle_inputContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 2, PythonParserRULE_single_input) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.SetState(134) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(129) + p.Match(PythonParserLINE_BREAK) + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(130) + p.Simple_stmt() + } + + case 3: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(131) + p.Compound_stmt() + } + { + p.SetState(132) + p.Match(PythonParserLINE_BREAK) + } + + } + + return localctx +} + +// IFile_inputContext is an interface to support dynamic dispatch. +type IFile_inputContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsFile_inputContext differentiates from other interfaces. + IsFile_inputContext() +} + +type File_inputContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyFile_inputContext() *File_inputContext { + var p = new(File_inputContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_file_input + return p +} + +func (*File_inputContext) IsFile_inputContext() {} + +func NewFile_inputContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *File_inputContext { + var p = new(File_inputContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_file_input + + return p +} + +func (s *File_inputContext) GetParser() antlr.Parser { return s.parser } + +func (s *File_inputContext) AllLINE_BREAK() []antlr.TerminalNode { + return s.GetTokens(PythonParserLINE_BREAK) +} + +func (s *File_inputContext) LINE_BREAK(i int) antlr.TerminalNode { + return s.GetToken(PythonParserLINE_BREAK, i) +} + +func (s *File_inputContext) AllStmt() []IStmtContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IStmtContext)(nil)).Elem()) + var tst = make([]IStmtContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IStmtContext) + } + } + + return tst +} + +func (s *File_inputContext) Stmt(i int) IStmtContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IStmtContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IStmtContext) +} + +func (s *File_inputContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *File_inputContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *File_inputContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterFile_input(s) + } +} + +func (s *File_inputContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitFile_input(s) + } +} + +func (p *PythonParser) File_input() (localctx IFile_inputContext) { + localctx = NewFile_inputContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 4, PythonParserRULE_file_input) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(138) + p.GetErrorHandler().Sync(p) + _alt = 1 + for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + switch _alt { + case 1: + p.SetState(138) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 2, p.GetParserRuleContext()) { + case 1: + { + p.SetState(136) + p.Match(PythonParserLINE_BREAK) + } + + case 2: + { + p.SetState(137) + p.Stmt() + } + + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + p.SetState(140) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) + } + + return localctx +} + +// IEval_inputContext is an interface to support dynamic dispatch. +type IEval_inputContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsEval_inputContext differentiates from other interfaces. + IsEval_inputContext() +} + +type Eval_inputContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyEval_inputContext() *Eval_inputContext { + var p = new(Eval_inputContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_eval_input + return p +} + +func (*Eval_inputContext) IsEval_inputContext() {} + +func NewEval_inputContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Eval_inputContext { + var p = new(Eval_inputContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_eval_input + + return p +} + +func (s *Eval_inputContext) GetParser() antlr.Parser { return s.parser } + +func (s *Eval_inputContext) Testlist() ITestlistContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITestlistContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITestlistContext) +} + +func (s *Eval_inputContext) AllLINE_BREAK() []antlr.TerminalNode { + return s.GetTokens(PythonParserLINE_BREAK) +} + +func (s *Eval_inputContext) LINE_BREAK(i int) antlr.TerminalNode { + return s.GetToken(PythonParserLINE_BREAK, i) +} + +func (s *Eval_inputContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Eval_inputContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Eval_inputContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterEval_input(s) + } +} + +func (s *Eval_inputContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitEval_input(s) + } +} + +func (p *PythonParser) Eval_input() (localctx IEval_inputContext) { + localctx = NewEval_inputContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 6, PythonParserRULE_eval_input) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(142) + p.Testlist() + } + p.SetState(146) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + for _la == PythonParserLINE_BREAK { + { + p.SetState(143) + p.Match(PythonParserLINE_BREAK) + } + + p.SetState(148) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + } + + return localctx +} + +// IStmtContext is an interface to support dynamic dispatch. +type IStmtContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsStmtContext differentiates from other interfaces. + IsStmtContext() +} + +type StmtContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStmtContext() *StmtContext { + var p = new(StmtContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_stmt + return p +} + +func (*StmtContext) IsStmtContext() {} + +func NewStmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StmtContext { + var p = new(StmtContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_stmt + + return p +} + +func (s *StmtContext) GetParser() antlr.Parser { return s.parser } + +func (s *StmtContext) Simple_stmt() ISimple_stmtContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISimple_stmtContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISimple_stmtContext) +} + +func (s *StmtContext) Compound_stmt() ICompound_stmtContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ICompound_stmtContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ICompound_stmtContext) +} + +func (s *StmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StmtContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterStmt(s) + } +} + +func (s *StmtContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitStmt(s) + } +} + +func (p *PythonParser) Stmt() (localctx IStmtContext) { + localctx = NewStmtContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 8, PythonParserRULE_stmt) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.SetState(151) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(149) + p.Simple_stmt() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(150) + p.Compound_stmt() + } + + } + + return localctx +} + +// ICompound_stmtContext is an interface to support dynamic dispatch. +type ICompound_stmtContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsCompound_stmtContext differentiates from other interfaces. + IsCompound_stmtContext() +} + +type Compound_stmtContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyCompound_stmtContext() *Compound_stmtContext { + var p = new(Compound_stmtContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_compound_stmt + return p +} + +func (*Compound_stmtContext) IsCompound_stmtContext() {} + +func NewCompound_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_stmtContext { + var p = new(Compound_stmtContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_compound_stmt + + return p +} + +func (s *Compound_stmtContext) GetParser() antlr.Parser { return s.parser } + +func (s *Compound_stmtContext) CopyFrom(ctx *Compound_stmtContext) { + s.BaseParserRuleContext.CopyFrom(ctx.BaseParserRuleContext) +} + +func (s *Compound_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Compound_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type While_stmtContext struct { + *Compound_stmtContext +} + +func NewWhile_stmtContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *While_stmtContext { + var p = new(While_stmtContext) + + p.Compound_stmtContext = NewEmptyCompound_stmtContext() + p.parser = parser + p.CopyFrom(ctx.(*Compound_stmtContext)) + + return p +} + +func (s *While_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *While_stmtContext) WHILE() antlr.TerminalNode { + return s.GetToken(PythonParserWHILE, 0) +} + +func (s *While_stmtContext) Test() ITestContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITestContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITestContext) +} + +func (s *While_stmtContext) COLON() antlr.TerminalNode { + return s.GetToken(PythonParserCOLON, 0) +} + +func (s *While_stmtContext) Suite() ISuiteContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISuiteContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISuiteContext) +} + +func (s *While_stmtContext) Else_clause() IElse_clauseContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IElse_clauseContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IElse_clauseContext) +} + +func (s *While_stmtContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterWhile_stmt(s) + } +} + +func (s *While_stmtContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitWhile_stmt(s) + } +} + +type Try_stmtContext struct { + *Compound_stmtContext +} + +func NewTry_stmtContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Try_stmtContext { + var p = new(Try_stmtContext) + + p.Compound_stmtContext = NewEmptyCompound_stmtContext() + p.parser = parser + p.CopyFrom(ctx.(*Compound_stmtContext)) + + return p +} + +func (s *Try_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Try_stmtContext) TRY() antlr.TerminalNode { + return s.GetToken(PythonParserTRY, 0) +} + +func (s *Try_stmtContext) COLON() antlr.TerminalNode { + return s.GetToken(PythonParserCOLON, 0) +} + +func (s *Try_stmtContext) Suite() ISuiteContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISuiteContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISuiteContext) +} + +func (s *Try_stmtContext) Finally_clause() IFinally_clauseContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IFinally_clauseContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IFinally_clauseContext) +} + +func (s *Try_stmtContext) AllExcept_clause() []IExcept_clauseContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExcept_clauseContext)(nil)).Elem()) + var tst = make([]IExcept_clauseContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IExcept_clauseContext) + } + } + + return tst +} + +func (s *Try_stmtContext) Except_clause(i int) IExcept_clauseContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IExcept_clauseContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IExcept_clauseContext) +} + +func (s *Try_stmtContext) Else_clause() IElse_clauseContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IElse_clauseContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IElse_clauseContext) +} + +func (s *Try_stmtContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterTry_stmt(s) + } +} + +func (s *Try_stmtContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitTry_stmt(s) + } +} + +type If_stmtContext struct { + *Compound_stmtContext + cond ITestContext +} + +func NewIf_stmtContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *If_stmtContext { + var p = new(If_stmtContext) + + p.Compound_stmtContext = NewEmptyCompound_stmtContext() + p.parser = parser + p.CopyFrom(ctx.(*Compound_stmtContext)) + + return p +} + +func (s *If_stmtContext) GetCond() ITestContext { return s.cond } + +func (s *If_stmtContext) SetCond(v ITestContext) { s.cond = v } + +func (s *If_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *If_stmtContext) IF() antlr.TerminalNode { + return s.GetToken(PythonParserIF, 0) +} + +func (s *If_stmtContext) COLON() antlr.TerminalNode { + return s.GetToken(PythonParserCOLON, 0) +} + +func (s *If_stmtContext) Suite() ISuiteContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISuiteContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISuiteContext) +} + +func (s *If_stmtContext) Test() ITestContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITestContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITestContext) +} + +func (s *If_stmtContext) AllElif_clause() []IElif_clauseContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IElif_clauseContext)(nil)).Elem()) + var tst = make([]IElif_clauseContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IElif_clauseContext) + } + } + + return tst +} + +func (s *If_stmtContext) Elif_clause(i int) IElif_clauseContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IElif_clauseContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IElif_clauseContext) +} + +func (s *If_stmtContext) Else_clause() IElse_clauseContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IElse_clauseContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IElse_clauseContext) +} + +func (s *If_stmtContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterIf_stmt(s) + } +} + +func (s *If_stmtContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitIf_stmt(s) + } +} + +type With_stmtContext struct { + *Compound_stmtContext +} + +func NewWith_stmtContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *With_stmtContext { + var p = new(With_stmtContext) + + p.Compound_stmtContext = NewEmptyCompound_stmtContext() + p.parser = parser + p.CopyFrom(ctx.(*Compound_stmtContext)) + + return p +} + +func (s *With_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *With_stmtContext) WITH() antlr.TerminalNode { + return s.GetToken(PythonParserWITH, 0) +} + +func (s *With_stmtContext) AllWith_item() []IWith_itemContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IWith_itemContext)(nil)).Elem()) + var tst = make([]IWith_itemContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IWith_itemContext) + } + } + + return tst +} + +func (s *With_stmtContext) With_item(i int) IWith_itemContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IWith_itemContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IWith_itemContext) +} + +func (s *With_stmtContext) COLON() antlr.TerminalNode { + return s.GetToken(PythonParserCOLON, 0) +} + +func (s *With_stmtContext) Suite() ISuiteContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISuiteContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISuiteContext) +} + +func (s *With_stmtContext) ASYNC() antlr.TerminalNode { + return s.GetToken(PythonParserASYNC, 0) +} + +func (s *With_stmtContext) AllCOMMA() []antlr.TerminalNode { + return s.GetTokens(PythonParserCOMMA) +} + +func (s *With_stmtContext) COMMA(i int) antlr.TerminalNode { + return s.GetToken(PythonParserCOMMA, i) +} + +func (s *With_stmtContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterWith_stmt(s) + } +} + +func (s *With_stmtContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitWith_stmt(s) + } +} + +type Class_or_func_def_stmtContext struct { + *Compound_stmtContext +} + +func NewClass_or_func_def_stmtContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Class_or_func_def_stmtContext { + var p = new(Class_or_func_def_stmtContext) + + p.Compound_stmtContext = NewEmptyCompound_stmtContext() + p.parser = parser + p.CopyFrom(ctx.(*Compound_stmtContext)) + + return p +} + +func (s *Class_or_func_def_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Class_or_func_def_stmtContext) Classdef() IClassdefContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IClassdefContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IClassdefContext) +} + +func (s *Class_or_func_def_stmtContext) Funcdef() IFuncdefContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IFuncdefContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IFuncdefContext) +} + +func (s *Class_or_func_def_stmtContext) AllDecorator() []IDecoratorContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IDecoratorContext)(nil)).Elem()) + var tst = make([]IDecoratorContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IDecoratorContext) + } + } + + return tst +} + +func (s *Class_or_func_def_stmtContext) Decorator(i int) IDecoratorContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IDecoratorContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IDecoratorContext) +} + +func (s *Class_or_func_def_stmtContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterClass_or_func_def_stmt(s) + } +} + +func (s *Class_or_func_def_stmtContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitClass_or_func_def_stmt(s) + } +} + +type For_stmtContext struct { + *Compound_stmtContext +} + +func NewFor_stmtContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *For_stmtContext { + var p = new(For_stmtContext) + + p.Compound_stmtContext = NewEmptyCompound_stmtContext() + p.parser = parser + p.CopyFrom(ctx.(*Compound_stmtContext)) + + return p +} + +func (s *For_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *For_stmtContext) FOR() antlr.TerminalNode { + return s.GetToken(PythonParserFOR, 0) +} + +func (s *For_stmtContext) Exprlist() IExprlistContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprlistContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IExprlistContext) +} + +func (s *For_stmtContext) IN() antlr.TerminalNode { + return s.GetToken(PythonParserIN, 0) +} + +func (s *For_stmtContext) Testlist() ITestlistContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITestlistContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITestlistContext) +} + +func (s *For_stmtContext) COLON() antlr.TerminalNode { + return s.GetToken(PythonParserCOLON, 0) +} + +func (s *For_stmtContext) Suite() ISuiteContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISuiteContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISuiteContext) +} + +func (s *For_stmtContext) ASYNC() antlr.TerminalNode { + return s.GetToken(PythonParserASYNC, 0) +} + +func (s *For_stmtContext) Else_clause() IElse_clauseContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IElse_clauseContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IElse_clauseContext) +} + +func (s *For_stmtContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterFor_stmt(s) + } +} + +func (s *For_stmtContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitFor_stmt(s) + } +} + +func (p *PythonParser) Compound_stmt() (localctx ICompound_stmtContext) { + localctx = NewCompound_stmtContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 10, PythonParserRULE_compound_stmt) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + var _alt int + + p.SetState(227) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 19, p.GetParserRuleContext()) { + case 1: + localctx = NewIf_stmtContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(153) + p.Match(PythonParserIF) + } + { + p.SetState(154) + + var _x = p.Test() + + localctx.(*If_stmtContext).cond = _x + } + { + p.SetState(155) + p.Match(PythonParserCOLON) + } + { + p.SetState(156) + p.Suite() + } + p.SetState(160) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 6, p.GetParserRuleContext()) + + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(157) + p.Elif_clause() + } + + } + p.SetState(162) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 6, p.GetParserRuleContext()) + } + p.SetState(164) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 7, p.GetParserRuleContext()) == 1 { + { + p.SetState(163) + p.Else_clause() + } + + } + + case 2: + localctx = NewWhile_stmtContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(166) + p.Match(PythonParserWHILE) + } + { + p.SetState(167) + p.Test() + } + { + p.SetState(168) + p.Match(PythonParserCOLON) + } + { + p.SetState(169) + p.Suite() + } + p.SetState(171) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 { + { + p.SetState(170) + p.Else_clause() + } + + } + + case 3: + localctx = NewFor_stmtContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + p.SetState(174) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if _la == PythonParserASYNC { + { + p.SetState(173) + p.Match(PythonParserASYNC) + } + + } + { + p.SetState(176) + p.Match(PythonParserFOR) + } + { + p.SetState(177) + p.Exprlist() + } + { + p.SetState(178) + p.Match(PythonParserIN) + } + { + p.SetState(179) + p.Testlist() + } + { + p.SetState(180) + p.Match(PythonParserCOLON) + } + { + p.SetState(181) + p.Suite() + } + p.SetState(183) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 10, p.GetParserRuleContext()) == 1 { + { + p.SetState(182) + p.Else_clause() + } + + } + + case 4: + localctx = NewTry_stmtContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(185) + p.Match(PythonParserTRY) + } + { + p.SetState(186) + p.Match(PythonParserCOLON) + } + { + p.SetState(187) + p.Suite() + } + p.SetState(200) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case PythonParserEXCEPT: + p.SetState(189) + p.GetErrorHandler().Sync(p) + _alt = 1 + for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + switch _alt { + case 1: + { + p.SetState(188) + p.Except_clause() + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + p.SetState(191) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 11, p.GetParserRuleContext()) + } + p.SetState(194) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 { + { + p.SetState(193) + p.Else_clause() + } + + } + p.SetState(197) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 13, p.GetParserRuleContext()) == 1 { + { + p.SetState(196) + p.Finally_clause() + } + + } + + case PythonParserFINALLY: + { + p.SetState(199) + p.Finally_clause() + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + case 5: + localctx = NewWith_stmtContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + p.SetState(203) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if _la == PythonParserASYNC { + { + p.SetState(202) + p.Match(PythonParserASYNC) + } + + } + { + p.SetState(205) + p.Match(PythonParserWITH) + } + { + p.SetState(206) + p.With_item() + } + p.SetState(211) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + for _la == PythonParserCOMMA { + { + p.SetState(207) + p.Match(PythonParserCOMMA) + } + { + p.SetState(208) + p.With_item() + } + + p.SetState(213) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(214) + p.Match(PythonParserCOLON) + } + { + p.SetState(215) + p.Suite() + } + + case 6: + localctx = NewClass_or_func_def_stmtContext(p, localctx) + p.EnterOuterAlt(localctx, 6) + p.SetState(220) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + for _la == PythonParserAT { + { + p.SetState(217) + p.Decorator() + } + + p.SetState(222) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + } + p.SetState(225) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case PythonParserCLASS: + { + p.SetState(223) + p.Classdef() + } + + case PythonParserDEF, PythonParserASYNC: + { + p.SetState(224) + p.Funcdef() + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + } + + return localctx +} + +// ISuiteContext is an interface to support dynamic dispatch. +type ISuiteContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsSuiteContext differentiates from other interfaces. + IsSuiteContext() +} + +type SuiteContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySuiteContext() *SuiteContext { + var p = new(SuiteContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_suite + return p +} + +func (*SuiteContext) IsSuiteContext() {} + +func NewSuiteContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SuiteContext { + var p = new(SuiteContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_suite + + return p +} + +func (s *SuiteContext) GetParser() antlr.Parser { return s.parser } + +func (s *SuiteContext) Simple_stmt() ISimple_stmtContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISimple_stmtContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISimple_stmtContext) +} + +func (s *SuiteContext) LINE_BREAK() antlr.TerminalNode { + return s.GetToken(PythonParserLINE_BREAK, 0) +} + +func (s *SuiteContext) INDENT() antlr.TerminalNode { + return s.GetToken(PythonParserINDENT, 0) +} + +func (s *SuiteContext) DEDENT() antlr.TerminalNode { + return s.GetToken(PythonParserDEDENT, 0) +} + +func (s *SuiteContext) AllStmt() []IStmtContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IStmtContext)(nil)).Elem()) + var tst = make([]IStmtContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IStmtContext) + } + } + + return tst +} + +func (s *SuiteContext) Stmt(i int) IStmtContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IStmtContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IStmtContext) +} + +func (s *SuiteContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SuiteContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SuiteContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterSuite(s) + } +} + +func (s *SuiteContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitSuite(s) + } +} + +func (p *PythonParser) Suite() (localctx ISuiteContext) { + localctx = NewSuiteContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 12, PythonParserRULE_suite) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + var _alt int + + p.SetState(239) + p.GetErrorHandler().Sync(p) + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 21, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(229) + p.Simple_stmt() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(230) + p.Match(PythonParserLINE_BREAK) + } + { + p.SetState(231) + p.Match(PythonParserINDENT) + } + p.SetState(233) + p.GetErrorHandler().Sync(p) + _alt = 1 + for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + switch _alt { + case 1: + { + p.SetState(232) + p.Stmt() + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + p.SetState(235) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 20, p.GetParserRuleContext()) + } + { + p.SetState(237) + p.Match(PythonParserDEDENT) + } + + } + + return localctx +} + +// IDecoratorContext is an interface to support dynamic dispatch. +type IDecoratorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsDecoratorContext differentiates from other interfaces. + IsDecoratorContext() +} + +type DecoratorContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyDecoratorContext() *DecoratorContext { + var p = new(DecoratorContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = PythonParserRULE_decorator + return p +} + +func (*DecoratorContext) IsDecoratorContext() {} + +func NewDecoratorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DecoratorContext { + var p = new(DecoratorContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = PythonParserRULE_decorator + + return p +} + +func (s *DecoratorContext) GetParser() antlr.Parser { return s.parser } + +func (s *DecoratorContext) AT() antlr.TerminalNode { + return s.GetToken(PythonParserAT, 0) +} + +func (s *DecoratorContext) Dotted_name() IDotted_nameContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IDotted_nameContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IDotted_nameContext) +} + +func (s *DecoratorContext) LINE_BREAK() antlr.TerminalNode { + return s.GetToken(PythonParserLINE_BREAK, 0) +} + +func (s *DecoratorContext) OPEN_PAREN() antlr.TerminalNode { + return s.GetToken(PythonParserOPEN_PAREN, 0) +} + +func (s *DecoratorContext) CLOSE_PAREN() antlr.TerminalNode { + return s.GetToken(PythonParserCLOSE_PAREN, 0) +} + +func (s *DecoratorContext) Arglist() IArglistContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IArglistContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IArglistContext) +} + +func (s *DecoratorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DecoratorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *DecoratorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.EnterDecorator(s) + } +} + +func (s *DecoratorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(PythonParserListener); ok { + listenerT.ExitDecorator(s) + } +} + +func (p *PythonParser) Decorator() (localctx IDecoratorContext) { + localctx = NewDecoratorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 14, PythonParserRULE_decorator) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(241) + p.Match(PythonParserAT) + } + { + p.SetState(242) + p.dotted_name(0) + } + p.SetState(248) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if _la == PythonParserOPEN_PAREN { + { + p.SetState(243) + p.Match(PythonParserOPEN_PAREN) + } + p.SetState(245) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if (((_la)&-(0x1f+1)) == 0 && ((1<>' +'<<' +'>>>' +'<' +'>' +'<=' +'>=' +'==' +'!=' +'===' +'!==' +'&' +'^' +'|' +'&&' +'||' +'*=' +'/=' +'%=' +'+=' +'-=' +'<<=' +'>>=' +'>>>=' +'&=' +'^=' +'|=' +'=>' +'**=' +'null' +null +null +null +null +null +null +'break' +'do' +'instanceof' +'typeof' +'case' +'else' +'new' +'var' +'catch' +'finally' +'return' +'void' +'continue' +'for' +'switch' +'while' +'debugger' +'function' +'this' +'with' +'default' +'if' +'throw' +'delete' +'in' +'try' +'as' +'from' +'readonly' +'async' +'class' +'enum' +'extends' +'super' +'const' +'export' +'import' +'await' +'implements' +'let' +'private' +'public' +'interface' +'package' +'protected' +'static' +'yield' +'any' +'number' +'boolean' +'string' +'symbol' +'type' +'get ' +'set ' +'constructor' +'namespace' +'require' +'module' +'declare' +'abstract' +'is' +'@' +null +null +null +null +null +null +null +null + +token symbolic names: +null +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Lodash +Dollar +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +ARROW +PowerAssign +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +ReadOnly +Async +Class +Enum +Extends +Super +Const +Export +Import +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +ANY +NUMBER +BOOLEAN +STRING +SYMBOL +Type +Get +Set +Constructor +Namespace +Require +Module +Declare +Abstract +Is +At +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter + +rule names: +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Lodash +Dollar +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +ARROW +PowerAssign +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +ReadOnly +Async +Class +Enum +Extends +Super +Const +Export +Import +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +ANY +NUMBER +BOOLEAN +STRING +SYMBOL +Type +Get +Set +Constructor +Namespace +Require +Module +Declare +Abstract +Is +At +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter +DoubleStringCharacter +SingleStringCharacter +EscapeSequence +CharacterEscapeSequence +HexEscapeSequence +UnicodeEscapeSequence +ExtendedUnicodeEscapeSequence +SingleEscapeCharacter +NonEscapeCharacter +EscapeCharacter +LineContinuation +HexDigit +DecimalIntegerLiteral +ExponentPart +IdentifierPart +IdentifierStart +UnicodeLetter +UnicodeCombiningMark +UnicodeDigit +UnicodeConnectorPunctuation +RegularExpressionFirstChar +RegularExpressionChar +RegularExpressionClassChar +RegularExpressionBackslashSequence + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN +null +null +ERROR + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 140, 1231, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 4, 153, 9, 153, 4, 154, 9, 154, 4, 155, 9, 155, 4, 156, 9, 156, 4, 157, 9, 157, 4, 158, 9, 158, 4, 159, 9, 159, 4, 160, 9, 160, 4, 161, 9, 161, 4, 162, 9, 162, 4, 163, 9, 163, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 333, 10, 2, 12, 2, 14, 2, 336, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 342, 10, 3, 12, 3, 14, 3, 345, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 356, 10, 4, 12, 4, 14, 4, 359, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 7, 5, 366, 10, 5, 12, 5, 14, 5, 369, 11, 5, 3, 5, 3, 5, 3, 5, 7, 5, 374, 10, 5, 12, 5, 14, 5, 377, 11, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 545, 10, 63, 3, 64, 3, 64, 3, 64, 7, 64, 550, 10, 64, 12, 64, 14, 64, 553, 11, 64, 3, 64, 5, 64, 556, 10, 64, 3, 64, 3, 64, 6, 64, 560, 10, 64, 13, 64, 14, 64, 561, 3, 64, 5, 64, 565, 10, 64, 3, 64, 3, 64, 5, 64, 569, 10, 64, 5, 64, 571, 10, 64, 3, 65, 3, 65, 3, 65, 6, 65, 576, 10, 65, 13, 65, 14, 65, 577, 3, 66, 3, 66, 6, 66, 582, 10, 66, 13, 66, 14, 66, 583, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 6, 67, 591, 10, 67, 13, 67, 14, 67, 592, 3, 68, 3, 68, 3, 68, 6, 68, 598, 10, 68, 13, 68, 14, 68, 599, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 115, 3, 116, 3, 116, 3, 116, 3, 116, 3, 117, 3, 117, 3, 117, 3, 117, 3, 117, 3, 117, 3, 117, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 132, 3, 132, 7, 132, 1012, 10, 132, 12, 132, 14, 132, 1015, 11, 132, 3, 133, 3, 133, 7, 133, 1019, 10, 133, 12, 133, 14, 133, 1022, 11, 133, 3, 133, 3, 133, 3, 133, 7, 133, 1027, 10, 133, 12, 133, 14, 133, 1030, 11, 133, 3, 133, 5, 133, 1033, 10, 133, 3, 133, 3, 133, 3, 134, 3, 134, 3, 134, 3, 134, 7, 134, 1041, 10, 134, 12, 134, 14, 134, 1044, 11, 134, 3, 134, 3, 134, 3, 135, 6, 135, 1049, 10, 135, 13, 135, 14, 135, 1050, 3, 135, 3, 135, 3, 136, 3, 136, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 7, 137, 1065, 10, 137, 12, 137, 14, 137, 1068, 11, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 7, 138, 1087, 10, 138, 12, 138, 14, 138, 1090, 11, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, 3, 140, 5, 140, 1106, 10, 140, 3, 141, 3, 141, 3, 141, 3, 141, 5, 141, 1112, 10, 141, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, 5, 142, 1119, 10, 142, 3, 143, 3, 143, 5, 143, 1123, 10, 143, 3, 144, 3, 144, 3, 144, 3, 144, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 146, 3, 146, 3, 146, 6, 146, 1138, 10, 146, 13, 146, 14, 146, 1139, 3, 146, 3, 146, 3, 147, 3, 147, 3, 148, 3, 148, 3, 149, 3, 149, 5, 149, 1150, 10, 149, 3, 150, 3, 150, 3, 150, 3, 151, 3, 151, 3, 152, 3, 152, 3, 152, 7, 152, 1160, 10, 152, 12, 152, 14, 152, 1163, 11, 152, 5, 152, 1165, 10, 152, 3, 153, 3, 153, 5, 153, 1169, 10, 153, 3, 153, 6, 153, 1172, 10, 153, 13, 153, 14, 153, 1173, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 5, 154, 1181, 10, 154, 3, 155, 3, 155, 3, 155, 3, 155, 5, 155, 1187, 10, 155, 3, 156, 5, 156, 1190, 10, 156, 3, 157, 5, 157, 1193, 10, 157, 3, 158, 5, 158, 1196, 10, 158, 3, 159, 5, 159, 1199, 10, 159, 3, 160, 3, 160, 3, 160, 3, 160, 7, 160, 1205, 10, 160, 12, 160, 14, 160, 1208, 11, 160, 3, 160, 5, 160, 1211, 10, 160, 3, 161, 3, 161, 3, 161, 3, 161, 7, 161, 1217, 10, 161, 12, 161, 14, 161, 1220, 11, 161, 3, 161, 5, 161, 1223, 10, 161, 3, 162, 3, 162, 5, 162, 1227, 10, 162, 3, 163, 3, 163, 3, 163, 5, 343, 1066, 1088, 2, 164, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 141, 72, 143, 73, 145, 74, 147, 75, 149, 76, 151, 77, 153, 78, 155, 79, 157, 80, 159, 81, 161, 82, 163, 83, 165, 84, 167, 85, 169, 86, 171, 87, 173, 88, 175, 89, 177, 90, 179, 91, 181, 92, 183, 93, 185, 94, 187, 95, 189, 96, 191, 97, 193, 98, 195, 99, 197, 100, 199, 101, 201, 102, 203, 103, 205, 104, 207, 105, 209, 106, 211, 107, 213, 108, 215, 109, 217, 110, 219, 111, 221, 112, 223, 113, 225, 114, 227, 115, 229, 116, 231, 117, 233, 118, 235, 119, 237, 120, 239, 121, 241, 122, 243, 123, 245, 124, 247, 125, 249, 126, 251, 127, 253, 128, 255, 129, 257, 130, 259, 131, 261, 132, 263, 133, 265, 134, 267, 135, 269, 136, 271, 137, 273, 138, 275, 139, 277, 140, 279, 2, 281, 2, 283, 2, 285, 2, 287, 2, 289, 2, 291, 2, 293, 2, 295, 2, 297, 2, 299, 2, 301, 2, 303, 2, 305, 2, 307, 2, 309, 2, 311, 2, 313, 2, 315, 2, 317, 2, 319, 2, 321, 2, 323, 2, 325, 2, 3, 2, 28, 5, 2, 12, 12, 15, 15, 8234, 8235, 3, 2, 50, 59, 4, 2, 90, 90, 122, 122, 3, 2, 50, 57, 4, 2, 81, 81, 113, 113, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 3, 2, 98, 98, 6, 2, 11, 11, 13, 14, 34, 34, 162, 162, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 11, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 14, 2, 12, 12, 15, 15, 36, 36, 41, 41, 50, 59, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 120, 122, 122, 5, 2, 50, 59, 119, 119, 122, 122, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 51, 59, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 38, 38, 97, 97, 257, 2, 67, 92, 99, 124, 172, 172, 183, 183, 188, 188, 194, 216, 218, 248, 250, 545, 548, 565, 594, 687, 690, 698, 701, 707, 722, 723, 738, 742, 752, 752, 892, 892, 904, 904, 906, 908, 910, 910, 912, 931, 933, 976, 978, 985, 988, 1013, 1026, 1155, 1166, 1222, 1225, 1226, 1229, 1230, 1234, 1271, 1274, 1275, 1331, 1368, 1371, 1371, 1379, 1417, 1490, 1516, 1522, 1524, 1571, 1596, 1602, 1612, 1651, 1749, 1751, 1751, 1767, 1768, 1788, 1790, 1810, 1810, 1812, 1838, 1922, 1959, 2311, 2363, 2367, 2367, 2386, 2386, 2394, 2403, 2439, 2446, 2449, 2450, 2453, 2474, 2476, 2482, 2484, 2484, 2488, 2491, 2526, 2527, 2529, 2531, 2546, 2547, 2567, 2572, 2577, 2578, 2581, 2602, 2604, 2610, 2612, 2613, 2615, 2616, 2618, 2619, 2651, 2654, 2656, 2656, 2676, 2678, 2695, 2701, 2703, 2703, 2705, 2707, 2709, 2730, 2732, 2738, 2740, 2741, 2743, 2747, 2751, 2751, 2770, 2770, 2786, 2786, 2823, 2830, 2833, 2834, 2837, 2858, 2860, 2866, 2868, 2869, 2872, 2875, 2879, 2879, 2910, 2911, 2913, 2915, 2951, 2956, 2960, 2962, 2964, 2967, 2971, 2972, 2974, 2974, 2976, 2977, 2981, 2982, 2986, 2988, 2992, 2999, 3001, 3003, 3079, 3086, 3088, 3090, 3092, 3114, 3116, 3125, 3127, 3131, 3170, 3171, 3207, 3214, 3216, 3218, 3220, 3242, 3244, 3253, 3255, 3259, 3296, 3296, 3298, 3299, 3335, 3342, 3344, 3346, 3348, 3370, 3372, 3387, 3426, 3427, 3463, 3480, 3484, 3507, 3509, 3517, 3519, 3519, 3522, 3528, 3587, 3634, 3636, 3637, 3650, 3656, 3715, 3716, 3718, 3718, 3721, 3722, 3724, 3724, 3727, 3727, 3734, 3737, 3739, 3745, 3747, 3749, 3751, 3751, 3753, 3753, 3756, 3757, 3759, 3762, 3764, 3765, 3775, 3782, 3784, 3784, 3806, 3807, 3842, 3842, 3906, 3948, 3978, 3981, 4098, 4131, 4133, 4137, 4139, 4140, 4178, 4183, 4258, 4295, 4306, 4344, 4354, 4443, 4449, 4516, 4522, 4603, 4610, 4616, 4618, 4680, 4682, 4682, 4684, 4687, 4690, 4696, 4698, 4698, 4700, 4703, 4706, 4744, 4746, 4746, 4748, 4751, 4754, 4784, 4786, 4786, 4788, 4791, 4794, 4800, 4802, 4802, 4804, 4807, 4810, 4816, 4818, 4824, 4826, 4848, 4850, 4880, 4882, 4882, 4884, 4887, 4890, 4896, 4898, 4936, 4938, 4956, 5026, 5110, 5123, 5752, 5763, 5788, 5794, 5868, 6018, 6069, 6178, 6265, 6274, 6314, 7682, 7837, 7842, 7931, 7938, 7959, 7962, 7967, 7970, 8007, 8010, 8015, 8018, 8025, 8027, 8027, 8029, 8029, 8031, 8031, 8033, 8063, 8066, 8118, 8120, 8126, 8128, 8128, 8132, 8134, 8136, 8142, 8146, 8149, 8152, 8157, 8162, 8174, 8180, 8182, 8184, 8190, 8321, 8321, 8452, 8452, 8457, 8457, 8460, 8469, 8471, 8471, 8475, 8479, 8486, 8486, 8488, 8488, 8490, 8490, 8492, 8495, 8497, 8499, 8501, 8507, 8546, 8581, 12295, 12297, 12323, 12331, 12339, 12343, 12346, 12348, 12355, 12438, 12447, 12448, 12451, 12540, 12542, 12544, 12551, 12590, 12595, 12688, 12706, 12729, 13314, 19905, 19970, 42126, 44034, 44034, 55205, 55205, 63746, 64047, 64258, 64264, 64277, 64281, 64287, 64287, 64289, 64298, 64300, 64312, 64314, 64318, 64320, 64320, 64322, 64323, 64325, 64326, 64328, 64435, 64469, 64831, 64850, 64913, 64916, 64969, 65010, 65021, 65138, 65140, 65142, 65142, 65144, 65278, 65315, 65340, 65347, 65372, 65384, 65472, 65476, 65481, 65484, 65489, 65492, 65497, 65500, 65502, 102, 2, 770, 848, 866, 868, 1157, 1160, 1427, 1443, 1445, 1467, 1469, 1471, 1473, 1473, 1475, 1476, 1478, 1478, 1613, 1623, 1650, 1650, 1752, 1758, 1761, 1766, 1769, 1770, 1772, 1775, 1811, 1811, 1842, 1868, 1960, 1970, 2307, 2309, 2366, 2366, 2368, 2383, 2387, 2390, 2404, 2405, 2435, 2437, 2494, 2502, 2505, 2506, 2509, 2511, 2521, 2521, 2532, 2533, 2564, 2564, 2622, 2622, 2624, 2628, 2633, 2634, 2637, 2639, 2674, 2675, 2691, 2693, 2750, 2750, 2752, 2759, 2761, 2763, 2765, 2767, 2819, 2821, 2878, 2878, 2880, 2885, 2889, 2890, 2893, 2895, 2904, 2905, 2948, 2949, 3008, 3012, 3016, 3018, 3020, 3023, 3033, 3033, 3075, 3077, 3136, 3142, 3144, 3146, 3148, 3151, 3159, 3160, 3204, 3205, 3264, 3270, 3272, 3274, 3276, 3279, 3287, 3288, 3332, 3333, 3392, 3397, 3400, 3402, 3404, 3407, 3417, 3417, 3460, 3461, 3532, 3532, 3537, 3542, 3544, 3544, 3546, 3553, 3572, 3573, 3635, 3635, 3638, 3644, 3657, 3664, 3763, 3763, 3766, 3771, 3773, 3774, 3786, 3791, 3866, 3867, 3895, 3895, 3897, 3897, 3899, 3899, 3904, 3905, 3955, 3974, 3976, 3977, 3986, 3993, 3995, 4030, 4040, 4040, 4142, 4148, 4152, 4155, 4184, 4187, 6070, 6101, 6315, 6315, 8402, 8414, 8419, 8419, 12332, 12337, 12443, 12444, 64288, 64288, 65058, 65061, 22, 2, 50, 59, 1634, 1643, 1778, 1787, 2408, 2417, 2536, 2545, 2664, 2673, 2792, 2801, 2920, 2929, 3049, 3057, 3176, 3185, 3304, 3313, 3432, 3441, 3666, 3675, 3794, 3803, 3874, 3883, 4162, 4171, 4971, 4979, 6114, 6123, 6162, 6171, 65298, 65307, 9, 2, 97, 97, 8257, 8258, 12541, 12541, 65077, 65078, 65103, 65105, 65345, 65345, 65383, 65383, 8, 2, 12, 12, 15, 15, 44, 44, 49, 49, 93, 94, 8234, 8235, 7, 2, 12, 12, 15, 15, 49, 49, 93, 94, 8234, 8235, 6, 2, 12, 12, 15, 15, 94, 95, 8234, 8235, 2, 1260, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 2, 197, 3, 2, 2, 2, 2, 199, 3, 2, 2, 2, 2, 201, 3, 2, 2, 2, 2, 203, 3, 2, 2, 2, 2, 205, 3, 2, 2, 2, 2, 207, 3, 2, 2, 2, 2, 209, 3, 2, 2, 2, 2, 211, 3, 2, 2, 2, 2, 213, 3, 2, 2, 2, 2, 215, 3, 2, 2, 2, 2, 217, 3, 2, 2, 2, 2, 219, 3, 2, 2, 2, 2, 221, 3, 2, 2, 2, 2, 223, 3, 2, 2, 2, 2, 225, 3, 2, 2, 2, 2, 227, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 231, 3, 2, 2, 2, 2, 233, 3, 2, 2, 2, 2, 235, 3, 2, 2, 2, 2, 237, 3, 2, 2, 2, 2, 239, 3, 2, 2, 2, 2, 241, 3, 2, 2, 2, 2, 243, 3, 2, 2, 2, 2, 245, 3, 2, 2, 2, 2, 247, 3, 2, 2, 2, 2, 249, 3, 2, 2, 2, 2, 251, 3, 2, 2, 2, 2, 253, 3, 2, 2, 2, 2, 255, 3, 2, 2, 2, 2, 257, 3, 2, 2, 2, 2, 259, 3, 2, 2, 2, 2, 261, 3, 2, 2, 2, 2, 263, 3, 2, 2, 2, 2, 265, 3, 2, 2, 2, 2, 267, 3, 2, 2, 2, 2, 269, 3, 2, 2, 2, 2, 271, 3, 2, 2, 2, 2, 273, 3, 2, 2, 2, 2, 275, 3, 2, 2, 2, 2, 277, 3, 2, 2, 2, 3, 327, 3, 2, 2, 2, 5, 337, 3, 2, 2, 2, 7, 351, 3, 2, 2, 2, 9, 362, 3, 2, 2, 2, 11, 378, 3, 2, 2, 2, 13, 380, 3, 2, 2, 2, 15, 382, 3, 2, 2, 2, 17, 384, 3, 2, 2, 2, 19, 386, 3, 2, 2, 2, 21, 389, 3, 2, 2, 2, 23, 392, 3, 2, 2, 2, 25, 394, 3, 2, 2, 2, 27, 396, 3, 2, 2, 2, 29, 398, 3, 2, 2, 2, 31, 400, 3, 2, 2, 2, 33, 402, 3, 2, 2, 2, 35, 406, 3, 2, 2, 2, 37, 408, 3, 2, 2, 2, 39, 411, 3, 2, 2, 2, 41, 414, 3, 2, 2, 2, 43, 416, 3, 2, 2, 2, 45, 418, 3, 2, 2, 2, 47, 420, 3, 2, 2, 2, 49, 422, 3, 2, 2, 2, 51, 424, 3, 2, 2, 2, 53, 426, 3, 2, 2, 2, 55, 428, 3, 2, 2, 2, 57, 430, 3, 2, 2, 2, 59, 432, 3, 2, 2, 2, 61, 435, 3, 2, 2, 2, 63, 438, 3, 2, 2, 2, 65, 440, 3, 2, 2, 2, 67, 443, 3, 2, 2, 2, 69, 446, 3, 2, 2, 2, 71, 450, 3, 2, 2, 2, 73, 452, 3, 2, 2, 2, 75, 454, 3, 2, 2, 2, 77, 457, 3, 2, 2, 2, 79, 460, 3, 2, 2, 2, 81, 463, 3, 2, 2, 2, 83, 466, 3, 2, 2, 2, 85, 470, 3, 2, 2, 2, 87, 474, 3, 2, 2, 2, 89, 476, 3, 2, 2, 2, 91, 478, 3, 2, 2, 2, 93, 480, 3, 2, 2, 2, 95, 483, 3, 2, 2, 2, 97, 486, 3, 2, 2, 2, 99, 489, 3, 2, 2, 2, 101, 492, 3, 2, 2, 2, 103, 495, 3, 2, 2, 2, 105, 498, 3, 2, 2, 2, 107, 501, 3, 2, 2, 2, 109, 505, 3, 2, 2, 2, 111, 509, 3, 2, 2, 2, 113, 514, 3, 2, 2, 2, 115, 517, 3, 2, 2, 2, 117, 520, 3, 2, 2, 2, 119, 523, 3, 2, 2, 2, 121, 526, 3, 2, 2, 2, 123, 530, 3, 2, 2, 2, 125, 544, 3, 2, 2, 2, 127, 570, 3, 2, 2, 2, 129, 572, 3, 2, 2, 2, 131, 579, 3, 2, 2, 2, 133, 587, 3, 2, 2, 2, 135, 594, 3, 2, 2, 2, 137, 601, 3, 2, 2, 2, 139, 607, 3, 2, 2, 2, 141, 610, 3, 2, 2, 2, 143, 621, 3, 2, 2, 2, 145, 628, 3, 2, 2, 2, 147, 633, 3, 2, 2, 2, 149, 638, 3, 2, 2, 2, 151, 642, 3, 2, 2, 2, 153, 646, 3, 2, 2, 2, 155, 652, 3, 2, 2, 2, 157, 660, 3, 2, 2, 2, 159, 667, 3, 2, 2, 2, 161, 672, 3, 2, 2, 2, 163, 681, 3, 2, 2, 2, 165, 685, 3, 2, 2, 2, 167, 692, 3, 2, 2, 2, 169, 698, 3, 2, 2, 2, 171, 707, 3, 2, 2, 2, 173, 716, 3, 2, 2, 2, 175, 721, 3, 2, 2, 2, 177, 726, 3, 2, 2, 2, 179, 734, 3, 2, 2, 2, 181, 737, 3, 2, 2, 2, 183, 743, 3, 2, 2, 2, 185, 750, 3, 2, 2, 2, 187, 753, 3, 2, 2, 2, 189, 757, 3, 2, 2, 2, 191, 760, 3, 2, 2, 2, 193, 765, 3, 2, 2, 2, 195, 774, 3, 2, 2, 2, 197, 780, 3, 2, 2, 2, 199, 786, 3, 2, 2, 2, 201, 791, 3, 2, 2, 2, 203, 799, 3, 2, 2, 2, 205, 805, 3, 2, 2, 2, 207, 811, 3, 2, 2, 2, 209, 818, 3, 2, 2, 2, 211, 825, 3, 2, 2, 2, 213, 831, 3, 2, 2, 2, 215, 842, 3, 2, 2, 2, 217, 846, 3, 2, 2, 2, 219, 854, 3, 2, 2, 2, 221, 861, 3, 2, 2, 2, 223, 871, 3, 2, 2, 2, 225, 879, 3, 2, 2, 2, 227, 889, 3, 2, 2, 2, 229, 896, 3, 2, 2, 2, 231, 902, 3, 2, 2, 2, 233, 906, 3, 2, 2, 2, 235, 913, 3, 2, 2, 2, 237, 921, 3, 2, 2, 2, 239, 928, 3, 2, 2, 2, 241, 935, 3, 2, 2, 2, 243, 940, 3, 2, 2, 2, 245, 945, 3, 2, 2, 2, 247, 950, 3, 2, 2, 2, 249, 962, 3, 2, 2, 2, 251, 972, 3, 2, 2, 2, 253, 980, 3, 2, 2, 2, 255, 987, 3, 2, 2, 2, 257, 995, 3, 2, 2, 2, 259, 1004, 3, 2, 2, 2, 261, 1007, 3, 2, 2, 2, 263, 1009, 3, 2, 2, 2, 265, 1032, 3, 2, 2, 2, 267, 1036, 3, 2, 2, 2, 269, 1048, 3, 2, 2, 2, 271, 1054, 3, 2, 2, 2, 273, 1058, 3, 2, 2, 2, 275, 1075, 3, 2, 2, 2, 277, 1097, 3, 2, 2, 2, 279, 1105, 3, 2, 2, 2, 281, 1111, 3, 2, 2, 2, 283, 1118, 3, 2, 2, 2, 285, 1122, 3, 2, 2, 2, 287, 1124, 3, 2, 2, 2, 289, 1128, 3, 2, 2, 2, 291, 1134, 3, 2, 2, 2, 293, 1143, 3, 2, 2, 2, 295, 1145, 3, 2, 2, 2, 297, 1149, 3, 2, 2, 2, 299, 1151, 3, 2, 2, 2, 301, 1154, 3, 2, 2, 2, 303, 1164, 3, 2, 2, 2, 305, 1166, 3, 2, 2, 2, 307, 1180, 3, 2, 2, 2, 309, 1186, 3, 2, 2, 2, 311, 1189, 3, 2, 2, 2, 313, 1192, 3, 2, 2, 2, 315, 1195, 3, 2, 2, 2, 317, 1198, 3, 2, 2, 2, 319, 1210, 3, 2, 2, 2, 321, 1222, 3, 2, 2, 2, 323, 1226, 3, 2, 2, 2, 325, 1228, 3, 2, 2, 2, 327, 328, 6, 2, 2, 2, 328, 329, 7, 37, 2, 2, 329, 330, 7, 35, 2, 2, 330, 334, 3, 2, 2, 2, 331, 333, 10, 2, 2, 2, 332, 331, 3, 2, 2, 2, 333, 336, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 335, 3, 2, 2, 2, 335, 4, 3, 2, 2, 2, 336, 334, 3, 2, 2, 2, 337, 338, 7, 49, 2, 2, 338, 339, 7, 44, 2, 2, 339, 343, 3, 2, 2, 2, 340, 342, 11, 2, 2, 2, 341, 340, 3, 2, 2, 2, 342, 345, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 343, 341, 3, 2, 2, 2, 344, 346, 3, 2, 2, 2, 345, 343, 3, 2, 2, 2, 346, 347, 7, 44, 2, 2, 347, 348, 7, 49, 2, 2, 348, 349, 3, 2, 2, 2, 349, 350, 8, 3, 2, 2, 350, 6, 3, 2, 2, 2, 351, 352, 7, 49, 2, 2, 352, 353, 7, 49, 2, 2, 353, 357, 3, 2, 2, 2, 354, 356, 10, 2, 2, 2, 355, 354, 3, 2, 2, 2, 356, 359, 3, 2, 2, 2, 357, 355, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 360, 3, 2, 2, 2, 359, 357, 3, 2, 2, 2, 360, 361, 8, 4, 2, 2, 361, 8, 3, 2, 2, 2, 362, 363, 7, 49, 2, 2, 363, 367, 5, 319, 160, 2, 364, 366, 5, 321, 161, 2, 365, 364, 3, 2, 2, 2, 366, 369, 3, 2, 2, 2, 367, 365, 3, 2, 2, 2, 367, 368, 3, 2, 2, 2, 368, 370, 3, 2, 2, 2, 369, 367, 3, 2, 2, 2, 370, 371, 6, 5, 3, 2, 371, 375, 7, 49, 2, 2, 372, 374, 5, 307, 154, 2, 373, 372, 3, 2, 2, 2, 374, 377, 3, 2, 2, 2, 375, 373, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 10, 3, 2, 2, 2, 377, 375, 3, 2, 2, 2, 378, 379, 7, 93, 2, 2, 379, 12, 3, 2, 2, 2, 380, 381, 7, 95, 2, 2, 381, 14, 3, 2, 2, 2, 382, 383, 7, 42, 2, 2, 383, 16, 3, 2, 2, 2, 384, 385, 7, 43, 2, 2, 385, 18, 3, 2, 2, 2, 386, 387, 7, 125, 2, 2, 387, 388, 8, 10, 3, 2, 388, 20, 3, 2, 2, 2, 389, 390, 7, 127, 2, 2, 390, 391, 8, 11, 4, 2, 391, 22, 3, 2, 2, 2, 392, 393, 7, 61, 2, 2, 393, 24, 3, 2, 2, 2, 394, 395, 7, 46, 2, 2, 395, 26, 3, 2, 2, 2, 396, 397, 7, 63, 2, 2, 397, 28, 3, 2, 2, 2, 398, 399, 7, 65, 2, 2, 399, 30, 3, 2, 2, 2, 400, 401, 7, 60, 2, 2, 401, 32, 3, 2, 2, 2, 402, 403, 7, 48, 2, 2, 403, 404, 7, 48, 2, 2, 404, 405, 7, 48, 2, 2, 405, 34, 3, 2, 2, 2, 406, 407, 7, 48, 2, 2, 407, 36, 3, 2, 2, 2, 408, 409, 7, 45, 2, 2, 409, 410, 7, 45, 2, 2, 410, 38, 3, 2, 2, 2, 411, 412, 7, 47, 2, 2, 412, 413, 7, 47, 2, 2, 413, 40, 3, 2, 2, 2, 414, 415, 7, 45, 2, 2, 415, 42, 3, 2, 2, 2, 416, 417, 7, 47, 2, 2, 417, 44, 3, 2, 2, 2, 418, 419, 7, 128, 2, 2, 419, 46, 3, 2, 2, 2, 420, 421, 7, 35, 2, 2, 421, 48, 3, 2, 2, 2, 422, 423, 7, 44, 2, 2, 423, 50, 3, 2, 2, 2, 424, 425, 7, 97, 2, 2, 425, 52, 3, 2, 2, 2, 426, 427, 7, 38, 2, 2, 427, 54, 3, 2, 2, 2, 428, 429, 7, 49, 2, 2, 429, 56, 3, 2, 2, 2, 430, 431, 7, 39, 2, 2, 431, 58, 3, 2, 2, 2, 432, 433, 7, 44, 2, 2, 433, 434, 7, 44, 2, 2, 434, 60, 3, 2, 2, 2, 435, 436, 7, 65, 2, 2, 436, 437, 7, 65, 2, 2, 437, 62, 3, 2, 2, 2, 438, 439, 7, 37, 2, 2, 439, 64, 3, 2, 2, 2, 440, 441, 7, 64, 2, 2, 441, 442, 7, 64, 2, 2, 442, 66, 3, 2, 2, 2, 443, 444, 7, 62, 2, 2, 444, 445, 7, 62, 2, 2, 445, 68, 3, 2, 2, 2, 446, 447, 7, 64, 2, 2, 447, 448, 7, 64, 2, 2, 448, 449, 7, 64, 2, 2, 449, 70, 3, 2, 2, 2, 450, 451, 7, 62, 2, 2, 451, 72, 3, 2, 2, 2, 452, 453, 7, 64, 2, 2, 453, 74, 3, 2, 2, 2, 454, 455, 7, 62, 2, 2, 455, 456, 7, 63, 2, 2, 456, 76, 3, 2, 2, 2, 457, 458, 7, 64, 2, 2, 458, 459, 7, 63, 2, 2, 459, 78, 3, 2, 2, 2, 460, 461, 7, 63, 2, 2, 461, 462, 7, 63, 2, 2, 462, 80, 3, 2, 2, 2, 463, 464, 7, 35, 2, 2, 464, 465, 7, 63, 2, 2, 465, 82, 3, 2, 2, 2, 466, 467, 7, 63, 2, 2, 467, 468, 7, 63, 2, 2, 468, 469, 7, 63, 2, 2, 469, 84, 3, 2, 2, 2, 470, 471, 7, 35, 2, 2, 471, 472, 7, 63, 2, 2, 472, 473, 7, 63, 2, 2, 473, 86, 3, 2, 2, 2, 474, 475, 7, 40, 2, 2, 475, 88, 3, 2, 2, 2, 476, 477, 7, 96, 2, 2, 477, 90, 3, 2, 2, 2, 478, 479, 7, 126, 2, 2, 479, 92, 3, 2, 2, 2, 480, 481, 7, 40, 2, 2, 481, 482, 7, 40, 2, 2, 482, 94, 3, 2, 2, 2, 483, 484, 7, 126, 2, 2, 484, 485, 7, 126, 2, 2, 485, 96, 3, 2, 2, 2, 486, 487, 7, 44, 2, 2, 487, 488, 7, 63, 2, 2, 488, 98, 3, 2, 2, 2, 489, 490, 7, 49, 2, 2, 490, 491, 7, 63, 2, 2, 491, 100, 3, 2, 2, 2, 492, 493, 7, 39, 2, 2, 493, 494, 7, 63, 2, 2, 494, 102, 3, 2, 2, 2, 495, 496, 7, 45, 2, 2, 496, 497, 7, 63, 2, 2, 497, 104, 3, 2, 2, 2, 498, 499, 7, 47, 2, 2, 499, 500, 7, 63, 2, 2, 500, 106, 3, 2, 2, 2, 501, 502, 7, 62, 2, 2, 502, 503, 7, 62, 2, 2, 503, 504, 7, 63, 2, 2, 504, 108, 3, 2, 2, 2, 505, 506, 7, 64, 2, 2, 506, 507, 7, 64, 2, 2, 507, 508, 7, 63, 2, 2, 508, 110, 3, 2, 2, 2, 509, 510, 7, 64, 2, 2, 510, 511, 7, 64, 2, 2, 511, 512, 7, 64, 2, 2, 512, 513, 7, 63, 2, 2, 513, 112, 3, 2, 2, 2, 514, 515, 7, 40, 2, 2, 515, 516, 7, 63, 2, 2, 516, 114, 3, 2, 2, 2, 517, 518, 7, 96, 2, 2, 518, 519, 7, 63, 2, 2, 519, 116, 3, 2, 2, 2, 520, 521, 7, 126, 2, 2, 521, 522, 7, 63, 2, 2, 522, 118, 3, 2, 2, 2, 523, 524, 7, 63, 2, 2, 524, 525, 7, 64, 2, 2, 525, 120, 3, 2, 2, 2, 526, 527, 7, 44, 2, 2, 527, 528, 7, 44, 2, 2, 528, 529, 7, 63, 2, 2, 529, 122, 3, 2, 2, 2, 530, 531, 7, 112, 2, 2, 531, 532, 7, 119, 2, 2, 532, 533, 7, 110, 2, 2, 533, 534, 7, 110, 2, 2, 534, 124, 3, 2, 2, 2, 535, 536, 7, 118, 2, 2, 536, 537, 7, 116, 2, 2, 537, 538, 7, 119, 2, 2, 538, 545, 7, 103, 2, 2, 539, 540, 7, 104, 2, 2, 540, 541, 7, 99, 2, 2, 541, 542, 7, 110, 2, 2, 542, 543, 7, 117, 2, 2, 543, 545, 7, 103, 2, 2, 544, 535, 3, 2, 2, 2, 544, 539, 3, 2, 2, 2, 545, 126, 3, 2, 2, 2, 546, 547, 5, 303, 152, 2, 547, 551, 7, 48, 2, 2, 548, 550, 9, 3, 2, 2, 549, 548, 3, 2, 2, 2, 550, 553, 3, 2, 2, 2, 551, 549, 3, 2, 2, 2, 551, 552, 3, 2, 2, 2, 552, 555, 3, 2, 2, 2, 553, 551, 3, 2, 2, 2, 554, 556, 5, 305, 153, 2, 555, 554, 3, 2, 2, 2, 555, 556, 3, 2, 2, 2, 556, 571, 3, 2, 2, 2, 557, 559, 7, 48, 2, 2, 558, 560, 9, 3, 2, 2, 559, 558, 3, 2, 2, 2, 560, 561, 3, 2, 2, 2, 561, 559, 3, 2, 2, 2, 561, 562, 3, 2, 2, 2, 562, 564, 3, 2, 2, 2, 563, 565, 5, 305, 153, 2, 564, 563, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 571, 3, 2, 2, 2, 566, 568, 5, 303, 152, 2, 567, 569, 5, 305, 153, 2, 568, 567, 3, 2, 2, 2, 568, 569, 3, 2, 2, 2, 569, 571, 3, 2, 2, 2, 570, 546, 3, 2, 2, 2, 570, 557, 3, 2, 2, 2, 570, 566, 3, 2, 2, 2, 571, 128, 3, 2, 2, 2, 572, 573, 7, 50, 2, 2, 573, 575, 9, 4, 2, 2, 574, 576, 5, 301, 151, 2, 575, 574, 3, 2, 2, 2, 576, 577, 3, 2, 2, 2, 577, 575, 3, 2, 2, 2, 577, 578, 3, 2, 2, 2, 578, 130, 3, 2, 2, 2, 579, 581, 7, 50, 2, 2, 580, 582, 9, 5, 2, 2, 581, 580, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, 581, 3, 2, 2, 2, 583, 584, 3, 2, 2, 2, 584, 585, 3, 2, 2, 2, 585, 586, 6, 66, 4, 2, 586, 132, 3, 2, 2, 2, 587, 588, 7, 50, 2, 2, 588, 590, 9, 6, 2, 2, 589, 591, 9, 5, 2, 2, 590, 589, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 134, 3, 2, 2, 2, 594, 595, 7, 50, 2, 2, 595, 597, 9, 7, 2, 2, 596, 598, 9, 8, 2, 2, 597, 596, 3, 2, 2, 2, 598, 599, 3, 2, 2, 2, 599, 597, 3, 2, 2, 2, 599, 600, 3, 2, 2, 2, 600, 136, 3, 2, 2, 2, 601, 602, 7, 100, 2, 2, 602, 603, 7, 116, 2, 2, 603, 604, 7, 103, 2, 2, 604, 605, 7, 99, 2, 2, 605, 606, 7, 109, 2, 2, 606, 138, 3, 2, 2, 2, 607, 608, 7, 102, 2, 2, 608, 609, 7, 113, 2, 2, 609, 140, 3, 2, 2, 2, 610, 611, 7, 107, 2, 2, 611, 612, 7, 112, 2, 2, 612, 613, 7, 117, 2, 2, 613, 614, 7, 118, 2, 2, 614, 615, 7, 99, 2, 2, 615, 616, 7, 112, 2, 2, 616, 617, 7, 101, 2, 2, 617, 618, 7, 103, 2, 2, 618, 619, 7, 113, 2, 2, 619, 620, 7, 104, 2, 2, 620, 142, 3, 2, 2, 2, 621, 622, 7, 118, 2, 2, 622, 623, 7, 123, 2, 2, 623, 624, 7, 114, 2, 2, 624, 625, 7, 103, 2, 2, 625, 626, 7, 113, 2, 2, 626, 627, 7, 104, 2, 2, 627, 144, 3, 2, 2, 2, 628, 629, 7, 101, 2, 2, 629, 630, 7, 99, 2, 2, 630, 631, 7, 117, 2, 2, 631, 632, 7, 103, 2, 2, 632, 146, 3, 2, 2, 2, 633, 634, 7, 103, 2, 2, 634, 635, 7, 110, 2, 2, 635, 636, 7, 117, 2, 2, 636, 637, 7, 103, 2, 2, 637, 148, 3, 2, 2, 2, 638, 639, 7, 112, 2, 2, 639, 640, 7, 103, 2, 2, 640, 641, 7, 121, 2, 2, 641, 150, 3, 2, 2, 2, 642, 643, 7, 120, 2, 2, 643, 644, 7, 99, 2, 2, 644, 645, 7, 116, 2, 2, 645, 152, 3, 2, 2, 2, 646, 647, 7, 101, 2, 2, 647, 648, 7, 99, 2, 2, 648, 649, 7, 118, 2, 2, 649, 650, 7, 101, 2, 2, 650, 651, 7, 106, 2, 2, 651, 154, 3, 2, 2, 2, 652, 653, 7, 104, 2, 2, 653, 654, 7, 107, 2, 2, 654, 655, 7, 112, 2, 2, 655, 656, 7, 99, 2, 2, 656, 657, 7, 110, 2, 2, 657, 658, 7, 110, 2, 2, 658, 659, 7, 123, 2, 2, 659, 156, 3, 2, 2, 2, 660, 661, 7, 116, 2, 2, 661, 662, 7, 103, 2, 2, 662, 663, 7, 118, 2, 2, 663, 664, 7, 119, 2, 2, 664, 665, 7, 116, 2, 2, 665, 666, 7, 112, 2, 2, 666, 158, 3, 2, 2, 2, 667, 668, 7, 120, 2, 2, 668, 669, 7, 113, 2, 2, 669, 670, 7, 107, 2, 2, 670, 671, 7, 102, 2, 2, 671, 160, 3, 2, 2, 2, 672, 673, 7, 101, 2, 2, 673, 674, 7, 113, 2, 2, 674, 675, 7, 112, 2, 2, 675, 676, 7, 118, 2, 2, 676, 677, 7, 107, 2, 2, 677, 678, 7, 112, 2, 2, 678, 679, 7, 119, 2, 2, 679, 680, 7, 103, 2, 2, 680, 162, 3, 2, 2, 2, 681, 682, 7, 104, 2, 2, 682, 683, 7, 113, 2, 2, 683, 684, 7, 116, 2, 2, 684, 164, 3, 2, 2, 2, 685, 686, 7, 117, 2, 2, 686, 687, 7, 121, 2, 2, 687, 688, 7, 107, 2, 2, 688, 689, 7, 118, 2, 2, 689, 690, 7, 101, 2, 2, 690, 691, 7, 106, 2, 2, 691, 166, 3, 2, 2, 2, 692, 693, 7, 121, 2, 2, 693, 694, 7, 106, 2, 2, 694, 695, 7, 107, 2, 2, 695, 696, 7, 110, 2, 2, 696, 697, 7, 103, 2, 2, 697, 168, 3, 2, 2, 2, 698, 699, 7, 102, 2, 2, 699, 700, 7, 103, 2, 2, 700, 701, 7, 100, 2, 2, 701, 702, 7, 119, 2, 2, 702, 703, 7, 105, 2, 2, 703, 704, 7, 105, 2, 2, 704, 705, 7, 103, 2, 2, 705, 706, 7, 116, 2, 2, 706, 170, 3, 2, 2, 2, 707, 708, 7, 104, 2, 2, 708, 709, 7, 119, 2, 2, 709, 710, 7, 112, 2, 2, 710, 711, 7, 101, 2, 2, 711, 712, 7, 118, 2, 2, 712, 713, 7, 107, 2, 2, 713, 714, 7, 113, 2, 2, 714, 715, 7, 112, 2, 2, 715, 172, 3, 2, 2, 2, 716, 717, 7, 118, 2, 2, 717, 718, 7, 106, 2, 2, 718, 719, 7, 107, 2, 2, 719, 720, 7, 117, 2, 2, 720, 174, 3, 2, 2, 2, 721, 722, 7, 121, 2, 2, 722, 723, 7, 107, 2, 2, 723, 724, 7, 118, 2, 2, 724, 725, 7, 106, 2, 2, 725, 176, 3, 2, 2, 2, 726, 727, 7, 102, 2, 2, 727, 728, 7, 103, 2, 2, 728, 729, 7, 104, 2, 2, 729, 730, 7, 99, 2, 2, 730, 731, 7, 119, 2, 2, 731, 732, 7, 110, 2, 2, 732, 733, 7, 118, 2, 2, 733, 178, 3, 2, 2, 2, 734, 735, 7, 107, 2, 2, 735, 736, 7, 104, 2, 2, 736, 180, 3, 2, 2, 2, 737, 738, 7, 118, 2, 2, 738, 739, 7, 106, 2, 2, 739, 740, 7, 116, 2, 2, 740, 741, 7, 113, 2, 2, 741, 742, 7, 121, 2, 2, 742, 182, 3, 2, 2, 2, 743, 744, 7, 102, 2, 2, 744, 745, 7, 103, 2, 2, 745, 746, 7, 110, 2, 2, 746, 747, 7, 103, 2, 2, 747, 748, 7, 118, 2, 2, 748, 749, 7, 103, 2, 2, 749, 184, 3, 2, 2, 2, 750, 751, 7, 107, 2, 2, 751, 752, 7, 112, 2, 2, 752, 186, 3, 2, 2, 2, 753, 754, 7, 118, 2, 2, 754, 755, 7, 116, 2, 2, 755, 756, 7, 123, 2, 2, 756, 188, 3, 2, 2, 2, 757, 758, 7, 99, 2, 2, 758, 759, 7, 117, 2, 2, 759, 190, 3, 2, 2, 2, 760, 761, 7, 104, 2, 2, 761, 762, 7, 116, 2, 2, 762, 763, 7, 113, 2, 2, 763, 764, 7, 111, 2, 2, 764, 192, 3, 2, 2, 2, 765, 766, 7, 116, 2, 2, 766, 767, 7, 103, 2, 2, 767, 768, 7, 99, 2, 2, 768, 769, 7, 102, 2, 2, 769, 770, 7, 113, 2, 2, 770, 771, 7, 112, 2, 2, 771, 772, 7, 110, 2, 2, 772, 773, 7, 123, 2, 2, 773, 194, 3, 2, 2, 2, 774, 775, 7, 99, 2, 2, 775, 776, 7, 117, 2, 2, 776, 777, 7, 123, 2, 2, 777, 778, 7, 112, 2, 2, 778, 779, 7, 101, 2, 2, 779, 196, 3, 2, 2, 2, 780, 781, 7, 101, 2, 2, 781, 782, 7, 110, 2, 2, 782, 783, 7, 99, 2, 2, 783, 784, 7, 117, 2, 2, 784, 785, 7, 117, 2, 2, 785, 198, 3, 2, 2, 2, 786, 787, 7, 103, 2, 2, 787, 788, 7, 112, 2, 2, 788, 789, 7, 119, 2, 2, 789, 790, 7, 111, 2, 2, 790, 200, 3, 2, 2, 2, 791, 792, 7, 103, 2, 2, 792, 793, 7, 122, 2, 2, 793, 794, 7, 118, 2, 2, 794, 795, 7, 103, 2, 2, 795, 796, 7, 112, 2, 2, 796, 797, 7, 102, 2, 2, 797, 798, 7, 117, 2, 2, 798, 202, 3, 2, 2, 2, 799, 800, 7, 117, 2, 2, 800, 801, 7, 119, 2, 2, 801, 802, 7, 114, 2, 2, 802, 803, 7, 103, 2, 2, 803, 804, 7, 116, 2, 2, 804, 204, 3, 2, 2, 2, 805, 806, 7, 101, 2, 2, 806, 807, 7, 113, 2, 2, 807, 808, 7, 112, 2, 2, 808, 809, 7, 117, 2, 2, 809, 810, 7, 118, 2, 2, 810, 206, 3, 2, 2, 2, 811, 812, 7, 103, 2, 2, 812, 813, 7, 122, 2, 2, 813, 814, 7, 114, 2, 2, 814, 815, 7, 113, 2, 2, 815, 816, 7, 116, 2, 2, 816, 817, 7, 118, 2, 2, 817, 208, 3, 2, 2, 2, 818, 819, 7, 107, 2, 2, 819, 820, 7, 111, 2, 2, 820, 821, 7, 114, 2, 2, 821, 822, 7, 113, 2, 2, 822, 823, 7, 116, 2, 2, 823, 824, 7, 118, 2, 2, 824, 210, 3, 2, 2, 2, 825, 826, 7, 99, 2, 2, 826, 827, 7, 121, 2, 2, 827, 828, 7, 99, 2, 2, 828, 829, 7, 107, 2, 2, 829, 830, 7, 118, 2, 2, 830, 212, 3, 2, 2, 2, 831, 832, 7, 107, 2, 2, 832, 833, 7, 111, 2, 2, 833, 834, 7, 114, 2, 2, 834, 835, 7, 110, 2, 2, 835, 836, 7, 103, 2, 2, 836, 837, 7, 111, 2, 2, 837, 838, 7, 103, 2, 2, 838, 839, 7, 112, 2, 2, 839, 840, 7, 118, 2, 2, 840, 841, 7, 117, 2, 2, 841, 214, 3, 2, 2, 2, 842, 843, 7, 110, 2, 2, 843, 844, 7, 103, 2, 2, 844, 845, 7, 118, 2, 2, 845, 216, 3, 2, 2, 2, 846, 847, 7, 114, 2, 2, 847, 848, 7, 116, 2, 2, 848, 849, 7, 107, 2, 2, 849, 850, 7, 120, 2, 2, 850, 851, 7, 99, 2, 2, 851, 852, 7, 118, 2, 2, 852, 853, 7, 103, 2, 2, 853, 218, 3, 2, 2, 2, 854, 855, 7, 114, 2, 2, 855, 856, 7, 119, 2, 2, 856, 857, 7, 100, 2, 2, 857, 858, 7, 110, 2, 2, 858, 859, 7, 107, 2, 2, 859, 860, 7, 101, 2, 2, 860, 220, 3, 2, 2, 2, 861, 862, 7, 107, 2, 2, 862, 863, 7, 112, 2, 2, 863, 864, 7, 118, 2, 2, 864, 865, 7, 103, 2, 2, 865, 866, 7, 116, 2, 2, 866, 867, 7, 104, 2, 2, 867, 868, 7, 99, 2, 2, 868, 869, 7, 101, 2, 2, 869, 870, 7, 103, 2, 2, 870, 222, 3, 2, 2, 2, 871, 872, 7, 114, 2, 2, 872, 873, 7, 99, 2, 2, 873, 874, 7, 101, 2, 2, 874, 875, 7, 109, 2, 2, 875, 876, 7, 99, 2, 2, 876, 877, 7, 105, 2, 2, 877, 878, 7, 103, 2, 2, 878, 224, 3, 2, 2, 2, 879, 880, 7, 114, 2, 2, 880, 881, 7, 116, 2, 2, 881, 882, 7, 113, 2, 2, 882, 883, 7, 118, 2, 2, 883, 884, 7, 103, 2, 2, 884, 885, 7, 101, 2, 2, 885, 886, 7, 118, 2, 2, 886, 887, 7, 103, 2, 2, 887, 888, 7, 102, 2, 2, 888, 226, 3, 2, 2, 2, 889, 890, 7, 117, 2, 2, 890, 891, 7, 118, 2, 2, 891, 892, 7, 99, 2, 2, 892, 893, 7, 118, 2, 2, 893, 894, 7, 107, 2, 2, 894, 895, 7, 101, 2, 2, 895, 228, 3, 2, 2, 2, 896, 897, 7, 123, 2, 2, 897, 898, 7, 107, 2, 2, 898, 899, 7, 103, 2, 2, 899, 900, 7, 110, 2, 2, 900, 901, 7, 102, 2, 2, 901, 230, 3, 2, 2, 2, 902, 903, 7, 99, 2, 2, 903, 904, 7, 112, 2, 2, 904, 905, 7, 123, 2, 2, 905, 232, 3, 2, 2, 2, 906, 907, 7, 112, 2, 2, 907, 908, 7, 119, 2, 2, 908, 909, 7, 111, 2, 2, 909, 910, 7, 100, 2, 2, 910, 911, 7, 103, 2, 2, 911, 912, 7, 116, 2, 2, 912, 234, 3, 2, 2, 2, 913, 914, 7, 100, 2, 2, 914, 915, 7, 113, 2, 2, 915, 916, 7, 113, 2, 2, 916, 917, 7, 110, 2, 2, 917, 918, 7, 103, 2, 2, 918, 919, 7, 99, 2, 2, 919, 920, 7, 112, 2, 2, 920, 236, 3, 2, 2, 2, 921, 922, 7, 117, 2, 2, 922, 923, 7, 118, 2, 2, 923, 924, 7, 116, 2, 2, 924, 925, 7, 107, 2, 2, 925, 926, 7, 112, 2, 2, 926, 927, 7, 105, 2, 2, 927, 238, 3, 2, 2, 2, 928, 929, 7, 117, 2, 2, 929, 930, 7, 123, 2, 2, 930, 931, 7, 111, 2, 2, 931, 932, 7, 100, 2, 2, 932, 933, 7, 113, 2, 2, 933, 934, 7, 110, 2, 2, 934, 240, 3, 2, 2, 2, 935, 936, 7, 118, 2, 2, 936, 937, 7, 123, 2, 2, 937, 938, 7, 114, 2, 2, 938, 939, 7, 103, 2, 2, 939, 242, 3, 2, 2, 2, 940, 941, 7, 105, 2, 2, 941, 942, 7, 103, 2, 2, 942, 943, 7, 118, 2, 2, 943, 944, 7, 34, 2, 2, 944, 244, 3, 2, 2, 2, 945, 946, 7, 117, 2, 2, 946, 947, 7, 103, 2, 2, 947, 948, 7, 118, 2, 2, 948, 949, 7, 34, 2, 2, 949, 246, 3, 2, 2, 2, 950, 951, 7, 101, 2, 2, 951, 952, 7, 113, 2, 2, 952, 953, 7, 112, 2, 2, 953, 954, 7, 117, 2, 2, 954, 955, 7, 118, 2, 2, 955, 956, 7, 116, 2, 2, 956, 957, 7, 119, 2, 2, 957, 958, 7, 101, 2, 2, 958, 959, 7, 118, 2, 2, 959, 960, 7, 113, 2, 2, 960, 961, 7, 116, 2, 2, 961, 248, 3, 2, 2, 2, 962, 963, 7, 112, 2, 2, 963, 964, 7, 99, 2, 2, 964, 965, 7, 111, 2, 2, 965, 966, 7, 103, 2, 2, 966, 967, 7, 117, 2, 2, 967, 968, 7, 114, 2, 2, 968, 969, 7, 99, 2, 2, 969, 970, 7, 101, 2, 2, 970, 971, 7, 103, 2, 2, 971, 250, 3, 2, 2, 2, 972, 973, 7, 116, 2, 2, 973, 974, 7, 103, 2, 2, 974, 975, 7, 115, 2, 2, 975, 976, 7, 119, 2, 2, 976, 977, 7, 107, 2, 2, 977, 978, 7, 116, 2, 2, 978, 979, 7, 103, 2, 2, 979, 252, 3, 2, 2, 2, 980, 981, 7, 111, 2, 2, 981, 982, 7, 113, 2, 2, 982, 983, 7, 102, 2, 2, 983, 984, 7, 119, 2, 2, 984, 985, 7, 110, 2, 2, 985, 986, 7, 103, 2, 2, 986, 254, 3, 2, 2, 2, 987, 988, 7, 102, 2, 2, 988, 989, 7, 103, 2, 2, 989, 990, 7, 101, 2, 2, 990, 991, 7, 110, 2, 2, 991, 992, 7, 99, 2, 2, 992, 993, 7, 116, 2, 2, 993, 994, 7, 103, 2, 2, 994, 256, 3, 2, 2, 2, 995, 996, 7, 99, 2, 2, 996, 997, 7, 100, 2, 2, 997, 998, 7, 117, 2, 2, 998, 999, 7, 118, 2, 2, 999, 1000, 7, 116, 2, 2, 1000, 1001, 7, 99, 2, 2, 1001, 1002, 7, 101, 2, 2, 1002, 1003, 7, 118, 2, 2, 1003, 258, 3, 2, 2, 2, 1004, 1005, 7, 107, 2, 2, 1005, 1006, 7, 117, 2, 2, 1006, 260, 3, 2, 2, 2, 1007, 1008, 7, 66, 2, 2, 1008, 262, 3, 2, 2, 2, 1009, 1013, 5, 309, 155, 2, 1010, 1012, 5, 307, 154, 2, 1011, 1010, 3, 2, 2, 2, 1012, 1015, 3, 2, 2, 2, 1013, 1011, 3, 2, 2, 2, 1013, 1014, 3, 2, 2, 2, 1014, 264, 3, 2, 2, 2, 1015, 1013, 3, 2, 2, 2, 1016, 1020, 7, 36, 2, 2, 1017, 1019, 5, 279, 140, 2, 1018, 1017, 3, 2, 2, 2, 1019, 1022, 3, 2, 2, 2, 1020, 1018, 3, 2, 2, 2, 1020, 1021, 3, 2, 2, 2, 1021, 1023, 3, 2, 2, 2, 1022, 1020, 3, 2, 2, 2, 1023, 1033, 7, 36, 2, 2, 1024, 1028, 7, 41, 2, 2, 1025, 1027, 5, 281, 141, 2, 1026, 1025, 3, 2, 2, 2, 1027, 1030, 3, 2, 2, 2, 1028, 1026, 3, 2, 2, 2, 1028, 1029, 3, 2, 2, 2, 1029, 1031, 3, 2, 2, 2, 1030, 1028, 3, 2, 2, 2, 1031, 1033, 7, 41, 2, 2, 1032, 1016, 3, 2, 2, 2, 1032, 1024, 3, 2, 2, 2, 1033, 1034, 3, 2, 2, 2, 1034, 1035, 8, 133, 5, 2, 1035, 266, 3, 2, 2, 2, 1036, 1042, 7, 98, 2, 2, 1037, 1038, 7, 94, 2, 2, 1038, 1041, 7, 98, 2, 2, 1039, 1041, 10, 9, 2, 2, 1040, 1037, 3, 2, 2, 2, 1040, 1039, 3, 2, 2, 2, 1041, 1044, 3, 2, 2, 2, 1042, 1040, 3, 2, 2, 2, 1042, 1043, 3, 2, 2, 2, 1043, 1045, 3, 2, 2, 2, 1044, 1042, 3, 2, 2, 2, 1045, 1046, 7, 98, 2, 2, 1046, 268, 3, 2, 2, 2, 1047, 1049, 9, 10, 2, 2, 1048, 1047, 3, 2, 2, 2, 1049, 1050, 3, 2, 2, 2, 1050, 1048, 3, 2, 2, 2, 1050, 1051, 3, 2, 2, 2, 1051, 1052, 3, 2, 2, 2, 1052, 1053, 8, 135, 2, 2, 1053, 270, 3, 2, 2, 2, 1054, 1055, 9, 2, 2, 2, 1055, 1056, 3, 2, 2, 2, 1056, 1057, 8, 136, 2, 2, 1057, 272, 3, 2, 2, 2, 1058, 1059, 7, 62, 2, 2, 1059, 1060, 7, 35, 2, 2, 1060, 1061, 7, 47, 2, 2, 1061, 1062, 7, 47, 2, 2, 1062, 1066, 3, 2, 2, 2, 1063, 1065, 11, 2, 2, 2, 1064, 1063, 3, 2, 2, 2, 1065, 1068, 3, 2, 2, 2, 1066, 1067, 3, 2, 2, 2, 1066, 1064, 3, 2, 2, 2, 1067, 1069, 3, 2, 2, 2, 1068, 1066, 3, 2, 2, 2, 1069, 1070, 7, 47, 2, 2, 1070, 1071, 7, 47, 2, 2, 1071, 1072, 7, 64, 2, 2, 1072, 1073, 3, 2, 2, 2, 1073, 1074, 8, 137, 2, 2, 1074, 274, 3, 2, 2, 2, 1075, 1076, 7, 62, 2, 2, 1076, 1077, 7, 35, 2, 2, 1077, 1078, 7, 93, 2, 2, 1078, 1079, 7, 69, 2, 2, 1079, 1080, 7, 70, 2, 2, 1080, 1081, 7, 67, 2, 2, 1081, 1082, 7, 86, 2, 2, 1082, 1083, 7, 67, 2, 2, 1083, 1084, 7, 93, 2, 2, 1084, 1088, 3, 2, 2, 2, 1085, 1087, 11, 2, 2, 2, 1086, 1085, 3, 2, 2, 2, 1087, 1090, 3, 2, 2, 2, 1088, 1089, 3, 2, 2, 2, 1088, 1086, 3, 2, 2, 2, 1089, 1091, 3, 2, 2, 2, 1090, 1088, 3, 2, 2, 2, 1091, 1092, 7, 95, 2, 2, 1092, 1093, 7, 95, 2, 2, 1093, 1094, 7, 64, 2, 2, 1094, 1095, 3, 2, 2, 2, 1095, 1096, 8, 138, 2, 2, 1096, 276, 3, 2, 2, 2, 1097, 1098, 11, 2, 2, 2, 1098, 1099, 3, 2, 2, 2, 1099, 1100, 8, 139, 6, 2, 1100, 278, 3, 2, 2, 2, 1101, 1106, 10, 11, 2, 2, 1102, 1103, 7, 94, 2, 2, 1103, 1106, 5, 283, 142, 2, 1104, 1106, 5, 299, 150, 2, 1105, 1101, 3, 2, 2, 2, 1105, 1102, 3, 2, 2, 2, 1105, 1104, 3, 2, 2, 2, 1106, 280, 3, 2, 2, 2, 1107, 1112, 10, 12, 2, 2, 1108, 1109, 7, 94, 2, 2, 1109, 1112, 5, 283, 142, 2, 1110, 1112, 5, 299, 150, 2, 1111, 1107, 3, 2, 2, 2, 1111, 1108, 3, 2, 2, 2, 1111, 1110, 3, 2, 2, 2, 1112, 282, 3, 2, 2, 2, 1113, 1119, 5, 285, 143, 2, 1114, 1119, 7, 50, 2, 2, 1115, 1119, 5, 287, 144, 2, 1116, 1119, 5, 289, 145, 2, 1117, 1119, 5, 291, 146, 2, 1118, 1113, 3, 2, 2, 2, 1118, 1114, 3, 2, 2, 2, 1118, 1115, 3, 2, 2, 2, 1118, 1116, 3, 2, 2, 2, 1118, 1117, 3, 2, 2, 2, 1119, 284, 3, 2, 2, 2, 1120, 1123, 5, 293, 147, 2, 1121, 1123, 5, 295, 148, 2, 1122, 1120, 3, 2, 2, 2, 1122, 1121, 3, 2, 2, 2, 1123, 286, 3, 2, 2, 2, 1124, 1125, 7, 122, 2, 2, 1125, 1126, 5, 301, 151, 2, 1126, 1127, 5, 301, 151, 2, 1127, 288, 3, 2, 2, 2, 1128, 1129, 7, 119, 2, 2, 1129, 1130, 5, 301, 151, 2, 1130, 1131, 5, 301, 151, 2, 1131, 1132, 5, 301, 151, 2, 1132, 1133, 5, 301, 151, 2, 1133, 290, 3, 2, 2, 2, 1134, 1135, 7, 119, 2, 2, 1135, 1137, 7, 125, 2, 2, 1136, 1138, 5, 301, 151, 2, 1137, 1136, 3, 2, 2, 2, 1138, 1139, 3, 2, 2, 2, 1139, 1137, 3, 2, 2, 2, 1139, 1140, 3, 2, 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 7, 127, 2, 2, 1142, 292, 3, 2, 2, 2, 1143, 1144, 9, 13, 2, 2, 1144, 294, 3, 2, 2, 2, 1145, 1146, 10, 14, 2, 2, 1146, 296, 3, 2, 2, 2, 1147, 1150, 5, 293, 147, 2, 1148, 1150, 9, 15, 2, 2, 1149, 1147, 3, 2, 2, 2, 1149, 1148, 3, 2, 2, 2, 1150, 298, 3, 2, 2, 2, 1151, 1152, 7, 94, 2, 2, 1152, 1153, 9, 2, 2, 2, 1153, 300, 3, 2, 2, 2, 1154, 1155, 9, 16, 2, 2, 1155, 302, 3, 2, 2, 2, 1156, 1165, 7, 50, 2, 2, 1157, 1161, 9, 17, 2, 2, 1158, 1160, 9, 3, 2, 2, 1159, 1158, 3, 2, 2, 2, 1160, 1163, 3, 2, 2, 2, 1161, 1159, 3, 2, 2, 2, 1161, 1162, 3, 2, 2, 2, 1162, 1165, 3, 2, 2, 2, 1163, 1161, 3, 2, 2, 2, 1164, 1156, 3, 2, 2, 2, 1164, 1157, 3, 2, 2, 2, 1165, 304, 3, 2, 2, 2, 1166, 1168, 9, 18, 2, 2, 1167, 1169, 9, 19, 2, 2, 1168, 1167, 3, 2, 2, 2, 1168, 1169, 3, 2, 2, 2, 1169, 1171, 3, 2, 2, 2, 1170, 1172, 9, 3, 2, 2, 1171, 1170, 3, 2, 2, 2, 1172, 1173, 3, 2, 2, 2, 1173, 1171, 3, 2, 2, 2, 1173, 1174, 3, 2, 2, 2, 1174, 306, 3, 2, 2, 2, 1175, 1181, 5, 309, 155, 2, 1176, 1181, 5, 313, 157, 2, 1177, 1181, 5, 315, 158, 2, 1178, 1181, 5, 317, 159, 2, 1179, 1181, 4, 8206, 8207, 2, 1180, 1175, 3, 2, 2, 2, 1180, 1176, 3, 2, 2, 2, 1180, 1177, 3, 2, 2, 2, 1180, 1178, 3, 2, 2, 2, 1180, 1179, 3, 2, 2, 2, 1181, 308, 3, 2, 2, 2, 1182, 1187, 5, 311, 156, 2, 1183, 1187, 9, 20, 2, 2, 1184, 1185, 7, 94, 2, 2, 1185, 1187, 5, 289, 145, 2, 1186, 1182, 3, 2, 2, 2, 1186, 1183, 3, 2, 2, 2, 1186, 1184, 3, 2, 2, 2, 1187, 310, 3, 2, 2, 2, 1188, 1190, 9, 21, 2, 2, 1189, 1188, 3, 2, 2, 2, 1190, 312, 3, 2, 2, 2, 1191, 1193, 9, 22, 2, 2, 1192, 1191, 3, 2, 2, 2, 1193, 314, 3, 2, 2, 2, 1194, 1196, 9, 23, 2, 2, 1195, 1194, 3, 2, 2, 2, 1196, 316, 3, 2, 2, 2, 1197, 1199, 9, 24, 2, 2, 1198, 1197, 3, 2, 2, 2, 1199, 318, 3, 2, 2, 2, 1200, 1211, 10, 25, 2, 2, 1201, 1211, 5, 325, 163, 2, 1202, 1206, 7, 93, 2, 2, 1203, 1205, 5, 323, 162, 2, 1204, 1203, 3, 2, 2, 2, 1205, 1208, 3, 2, 2, 2, 1206, 1204, 3, 2, 2, 2, 1206, 1207, 3, 2, 2, 2, 1207, 1209, 3, 2, 2, 2, 1208, 1206, 3, 2, 2, 2, 1209, 1211, 7, 95, 2, 2, 1210, 1200, 3, 2, 2, 2, 1210, 1201, 3, 2, 2, 2, 1210, 1202, 3, 2, 2, 2, 1211, 320, 3, 2, 2, 2, 1212, 1223, 10, 26, 2, 2, 1213, 1223, 5, 325, 163, 2, 1214, 1218, 7, 93, 2, 2, 1215, 1217, 5, 323, 162, 2, 1216, 1215, 3, 2, 2, 2, 1217, 1220, 3, 2, 2, 2, 1218, 1216, 3, 2, 2, 2, 1218, 1219, 3, 2, 2, 2, 1219, 1221, 3, 2, 2, 2, 1220, 1218, 3, 2, 2, 2, 1221, 1223, 7, 95, 2, 2, 1222, 1212, 3, 2, 2, 2, 1222, 1213, 3, 2, 2, 2, 1222, 1214, 3, 2, 2, 2, 1223, 322, 3, 2, 2, 2, 1224, 1227, 10, 27, 2, 2, 1225, 1227, 5, 325, 163, 2, 1226, 1224, 3, 2, 2, 2, 1226, 1225, 3, 2, 2, 2, 1227, 324, 3, 2, 2, 2, 1228, 1229, 7, 94, 2, 2, 1229, 1230, 10, 2, 2, 2, 1230, 326, 3, 2, 2, 2, 49, 2, 334, 343, 357, 367, 375, 544, 551, 555, 561, 564, 568, 570, 577, 583, 592, 599, 1013, 1020, 1028, 1032, 1040, 1042, 1050, 1066, 1088, 1105, 1111, 1118, 1122, 1139, 1149, 1161, 1164, 1168, 1173, 1180, 1186, 1189, 1192, 1195, 1198, 1206, 1210, 1218, 1222, 1226, 7, 2, 3, 2, 3, 10, 2, 3, 11, 3, 3, 133, 4, 2, 4, 2] \ No newline at end of file diff --git a/languages/ts/TypeScriptLexer.tokens b/languages/ts/TypeScriptLexer.tokens new file mode 100644 index 0000000000000000000000000000000000000000..64e7e7ca3af11c442acdcce28ca3070682075e69 --- /dev/null +++ b/languages/ts/TypeScriptLexer.tokens @@ -0,0 +1,258 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Lodash=25 +Dollar=26 +Divide=27 +Modulus=28 +Power=29 +NullCoalesce=30 +Hashtag=31 +RightShiftArithmetic=32 +LeftShiftArithmetic=33 +RightShiftLogical=34 +LessThan=35 +MoreThan=36 +LessThanEquals=37 +GreaterThanEquals=38 +Equals_=39 +NotEquals=40 +IdentityEquals=41 +IdentityNotEquals=42 +BitAnd=43 +BitXOr=44 +BitOr=45 +And=46 +Or=47 +MultiplyAssign=48 +DivideAssign=49 +ModulusAssign=50 +PlusAssign=51 +MinusAssign=52 +LeftShiftArithmeticAssign=53 +RightShiftArithmeticAssign=54 +RightShiftLogicalAssign=55 +BitAndAssign=56 +BitXorAssign=57 +BitOrAssign=58 +ARROW=59 +PowerAssign=60 +NullLiteral=61 +BooleanLiteral=62 +DecimalLiteral=63 +HexIntegerLiteral=64 +OctalIntegerLiteral=65 +OctalIntegerLiteral2=66 +BinaryIntegerLiteral=67 +Break=68 +Do=69 +Instanceof=70 +Typeof=71 +Case=72 +Else=73 +New=74 +Var=75 +Catch=76 +Finally=77 +Return=78 +Void=79 +Continue=80 +For=81 +Switch=82 +While=83 +Debugger=84 +Function=85 +This=86 +With=87 +Default=88 +If=89 +Throw=90 +Delete=91 +In=92 +Try=93 +As=94 +From=95 +ReadOnly=96 +Async=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Await=105 +Implements=106 +Let=107 +Private=108 +Public=109 +Interface=110 +Package=111 +Protected=112 +Static=113 +Yield=114 +ANY=115 +NUMBER=116 +BOOLEAN=117 +STRING=118 +SYMBOL=119 +Type=120 +Get=121 +Set=122 +Constructor=123 +Namespace=124 +Require=125 +Module=126 +Declare=127 +Abstract=128 +Is=129 +At=130 +Identifier=131 +StringLiteral=132 +TemplateStringLiteral=133 +WhiteSpaces=134 +LineTerminator=135 +HtmlComment=136 +CDataComment=137 +UnexpectedCharacter=138 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'_'=25 +'$'=26 +'/'=27 +'%'=28 +'**'=29 +'??'=30 +'#'=31 +'>>'=32 +'<<'=33 +'>>>'=34 +'<'=35 +'>'=36 +'<='=37 +'>='=38 +'=='=39 +'!='=40 +'==='=41 +'!=='=42 +'&'=43 +'^'=44 +'|'=45 +'&&'=46 +'||'=47 +'*='=48 +'/='=49 +'%='=50 +'+='=51 +'-='=52 +'<<='=53 +'>>='=54 +'>>>='=55 +'&='=56 +'^='=57 +'|='=58 +'=>'=59 +'**='=60 +'null'=61 +'break'=68 +'do'=69 +'instanceof'=70 +'typeof'=71 +'case'=72 +'else'=73 +'new'=74 +'var'=75 +'catch'=76 +'finally'=77 +'return'=78 +'void'=79 +'continue'=80 +'for'=81 +'switch'=82 +'while'=83 +'debugger'=84 +'function'=85 +'this'=86 +'with'=87 +'default'=88 +'if'=89 +'throw'=90 +'delete'=91 +'in'=92 +'try'=93 +'as'=94 +'from'=95 +'readonly'=96 +'async'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'await'=105 +'implements'=106 +'let'=107 +'private'=108 +'public'=109 +'interface'=110 +'package'=111 +'protected'=112 +'static'=113 +'yield'=114 +'any'=115 +'number'=116 +'boolean'=117 +'string'=118 +'symbol'=119 +'type'=120 +'get '=121 +'set '=122 +'constructor'=123 +'namespace'=124 +'require'=125 +'module'=126 +'declare'=127 +'abstract'=128 +'is'=129 +'@'=130 diff --git a/languages/ts/TypeScriptParser.interp b/languages/ts/TypeScriptParser.interp new file mode 100644 index 0000000000000000000000000000000000000000..50d7477995b9a67f5778399792fdd8b77729c701 --- /dev/null +++ b/languages/ts/TypeScriptParser.interp @@ -0,0 +1,427 @@ +token literal names: +null +null +null +null +null +'[' +']' +'(' +')' +'{' +'}' +';' +',' +'=' +'?' +':' +'...' +'.' +'++' +'--' +'+' +'-' +'~' +'!' +'*' +'_' +'$' +'/' +'%' +'**' +'??' +'#' +'>>' +'<<' +'>>>' +'<' +'>' +'<=' +'>=' +'==' +'!=' +'===' +'!==' +'&' +'^' +'|' +'&&' +'||' +'*=' +'/=' +'%=' +'+=' +'-=' +'<<=' +'>>=' +'>>>=' +'&=' +'^=' +'|=' +'=>' +'**=' +'null' +null +null +null +null +null +null +'break' +'do' +'instanceof' +'typeof' +'case' +'else' +'new' +'var' +'catch' +'finally' +'return' +'void' +'continue' +'for' +'switch' +'while' +'debugger' +'function' +'this' +'with' +'default' +'if' +'throw' +'delete' +'in' +'try' +'as' +'from' +'readonly' +'async' +'class' +'enum' +'extends' +'super' +'const' +'export' +'import' +'await' +'implements' +'let' +'private' +'public' +'interface' +'package' +'protected' +'static' +'yield' +'any' +'number' +'boolean' +'string' +'symbol' +'type' +'get ' +'set ' +'constructor' +'namespace' +'require' +'module' +'declare' +'abstract' +'is' +'@' +null +null +null +null +null +null +null +null + +token symbolic names: +null +HashBangLine +MultiLineComment +SingleLineComment +RegularExpressionLiteral +OpenBracket +CloseBracket +OpenParen +CloseParen +OpenBrace +CloseBrace +SemiColon +Comma +Assign +QuestionMark +Colon +Ellipsis +Dot +PlusPlus +MinusMinus +Plus +Minus +BitNot +Not +Multiply +Lodash +Dollar +Divide +Modulus +Power +NullCoalesce +Hashtag +RightShiftArithmetic +LeftShiftArithmetic +RightShiftLogical +LessThan +MoreThan +LessThanEquals +GreaterThanEquals +Equals_ +NotEquals +IdentityEquals +IdentityNotEquals +BitAnd +BitXOr +BitOr +And +Or +MultiplyAssign +DivideAssign +ModulusAssign +PlusAssign +MinusAssign +LeftShiftArithmeticAssign +RightShiftArithmeticAssign +RightShiftLogicalAssign +BitAndAssign +BitXorAssign +BitOrAssign +ARROW +PowerAssign +NullLiteral +BooleanLiteral +DecimalLiteral +HexIntegerLiteral +OctalIntegerLiteral +OctalIntegerLiteral2 +BinaryIntegerLiteral +Break +Do +Instanceof +Typeof +Case +Else +New +Var +Catch +Finally +Return +Void +Continue +For +Switch +While +Debugger +Function +This +With +Default +If +Throw +Delete +In +Try +As +From +ReadOnly +Async +Class +Enum +Extends +Super +Const +Export +Import +Await +Implements +Let +Private +Public +Interface +Package +Protected +Static +Yield +ANY +NUMBER +BOOLEAN +STRING +SYMBOL +Type +Get +Set +Constructor +Namespace +Require +Module +Declare +Abstract +Is +At +Identifier +StringLiteral +TemplateStringLiteral +WhiteSpaces +LineTerminator +HtmlComment +CDataComment +UnexpectedCharacter + +rule names: +initializer +bindingPattern +typeParameters +typeParameterList +typeParameter +constraint +typeArguments +typeArgumentList +typeArgument +type_ +unionOrIntersectionOrPrimaryType +primaryType +predefinedType +typeReference +typeGeneric +typeIncludeGeneric +typeName +objectType +typeBody +typeMemberList +typeMember +arrayType +tupleType +tupleElementTypes +functionType +constructorType +typeQuery +typeQueryExpression +propertySignature +typeAnnotation +callSignature +parameterList +requiredParameterList +requiredParameter +accessibilityModifier +identifierOrPattern +optionalParameterList +optionalParameter +restParameter +constructSignature +indexSignature +methodSignature +typeAliasDeclaration +constructorDeclaration +interfaceDeclaration +interfaceExtendsClause +classOrInterfaceTypeList +enumDeclaration +enumBody +enumMemberList +enumMember +namespaceDeclaration +namespaceName +importAliasDeclaration +importAll +decoratorList +decorator +decoratorMemberExpression +decoratorCallExpression +program +sourceElement +statement +block +statementList +abstractDeclaration +importStatement +importFromBlock +multipleImportStatement +exportStatement +variableStatement +variableDeclarationList +variableDeclaration +emptyStatement_ +expressionStatement +ifStatement +iterationStatement +varModifier +continueStatement +breakStatement +returnStatement +yieldStatement +withStatement +switchStatement +caseBlock +caseClauses +caseClause +defaultClause +labelledStatement +throwStatement +tryStatement +catchProduction +assignable +finallyProduction +debuggerStatement +functionDeclaration +classDeclaration +classHeritage +classTail +classExtendsClause +implementsClause +classElement +propertyMemberDeclaration +propertyMemberBase +indexMemberDeclaration +generatorMethod +generatorFunctionDeclaration +generatorBlock +generatorDefinition +iteratorBlock +iteratorDefinition +formalParameterList +formalParameterArg +lastFormalParameterArg +functionBody +sourceElements +arrayLiteral +elementList +lastElement +objectLiteral +propertyAssignment +getAccessor +setAccessor +propertyName +arguments +lastArgument +expressionSequence +functionExpressionDeclaration +singleExpression +arrowFunctionDeclaration +arrowFunctionParameters +arrowFunctionBody +assignmentOperator +literal +numericLiteral +identifierName +reservedWord +keyword +getter +setter +eos + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 140, 1723, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 5, 3, 288, 10, 3, 3, 4, 3, 4, 5, 4, 292, 10, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 7, 5, 299, 10, 5, 12, 5, 14, 5, 302, 11, 5, 3, 6, 3, 6, 5, 6, 306, 10, 6, 3, 6, 5, 6, 309, 10, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 5, 8, 316, 10, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 7, 9, 323, 10, 9, 12, 9, 14, 9, 326, 11, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 335, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 7, 12, 346, 10, 12, 12, 12, 14, 12, 349, 11, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 369, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 375, 10, 13, 12, 13, 14, 13, 378, 11, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 5, 15, 385, 10, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 400, 10, 17, 3, 18, 3, 18, 5, 18, 404, 10, 18, 3, 19, 3, 19, 5, 19, 408, 10, 19, 3, 19, 3, 19, 3, 20, 3, 20, 5, 20, 414, 10, 20, 3, 21, 3, 21, 3, 21, 7, 21, 419, 10, 21, 12, 21, 14, 21, 422, 11, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 431, 10, 22, 5, 22, 433, 10, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 7, 25, 447, 10, 25, 12, 25, 14, 25, 450, 11, 25, 3, 26, 5, 26, 453, 10, 26, 3, 26, 3, 26, 5, 26, 457, 10, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 5, 27, 465, 10, 27, 3, 27, 3, 27, 5, 27, 469, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 6, 29, 482, 10, 29, 13, 29, 14, 29, 483, 3, 29, 3, 29, 5, 29, 488, 10, 29, 3, 30, 5, 30, 491, 10, 30, 3, 30, 3, 30, 5, 30, 495, 10, 30, 3, 30, 5, 30, 498, 10, 30, 3, 30, 3, 30, 5, 30, 502, 10, 30, 3, 31, 3, 31, 3, 31, 3, 32, 5, 32, 508, 10, 32, 3, 32, 3, 32, 5, 32, 512, 10, 32, 3, 32, 3, 32, 5, 32, 516, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 7, 33, 522, 10, 33, 12, 33, 14, 33, 525, 11, 33, 3, 33, 3, 33, 3, 33, 5, 33, 530, 10, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 537, 10, 33, 3, 33, 5, 33, 540, 10, 33, 5, 33, 542, 10, 33, 5, 33, 544, 10, 33, 3, 34, 3, 34, 3, 34, 7, 34, 549, 10, 34, 12, 34, 14, 34, 552, 11, 34, 3, 35, 5, 35, 555, 10, 35, 3, 35, 5, 35, 558, 10, 35, 3, 35, 3, 35, 5, 35, 562, 10, 35, 3, 36, 3, 36, 3, 37, 3, 37, 5, 37, 568, 10, 37, 3, 38, 3, 38, 3, 38, 7, 38, 573, 10, 38, 12, 38, 14, 38, 576, 11, 38, 3, 39, 5, 39, 579, 10, 39, 3, 39, 5, 39, 582, 10, 39, 3, 39, 3, 39, 3, 39, 5, 39, 587, 10, 39, 3, 39, 5, 39, 590, 10, 39, 3, 39, 5, 39, 593, 10, 39, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 599, 10, 40, 3, 41, 3, 41, 5, 41, 603, 10, 41, 3, 41, 3, 41, 5, 41, 607, 10, 41, 3, 41, 3, 41, 5, 41, 611, 10, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 5, 43, 622, 10, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 5, 44, 629, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 5, 45, 636, 10, 45, 3, 45, 3, 45, 3, 45, 5, 45, 641, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 649, 10, 45, 3, 46, 5, 46, 652, 10, 46, 3, 46, 3, 46, 3, 46, 5, 46, 657, 10, 46, 3, 46, 5, 46, 660, 10, 46, 3, 46, 3, 46, 5, 46, 664, 10, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 7, 48, 672, 10, 48, 12, 48, 14, 48, 675, 11, 48, 3, 49, 5, 49, 678, 10, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 684, 10, 49, 3, 49, 3, 49, 3, 50, 3, 50, 5, 50, 690, 10, 50, 3, 51, 3, 51, 3, 51, 7, 51, 695, 10, 51, 12, 51, 14, 51, 698, 11, 51, 3, 52, 3, 52, 3, 52, 5, 52, 703, 10, 52, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 709, 10, 53, 3, 53, 3, 53, 3, 54, 3, 54, 6, 54, 715, 10, 54, 13, 54, 14, 54, 716, 3, 54, 7, 54, 720, 10, 54, 12, 54, 14, 54, 723, 11, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 737, 10, 55, 3, 56, 3, 56, 3, 57, 6, 57, 742, 10, 57, 13, 57, 14, 57, 743, 3, 58, 3, 58, 3, 58, 5, 58, 749, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 757, 10, 59, 3, 59, 3, 59, 3, 59, 7, 59, 762, 10, 59, 12, 59, 14, 59, 765, 11, 59, 3, 60, 3, 60, 3, 60, 3, 61, 5, 61, 771, 10, 61, 3, 61, 3, 61, 3, 62, 5, 62, 776, 10, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 809, 10, 63, 3, 64, 3, 64, 5, 64, 813, 10, 64, 3, 64, 3, 64, 3, 65, 6, 65, 818, 10, 65, 13, 65, 14, 65, 819, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 826, 10, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 67, 5, 67, 834, 10, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 5, 68, 843, 10, 68, 3, 68, 3, 68, 5, 68, 847, 10, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 5, 69, 855, 10, 69, 3, 69, 3, 69, 3, 69, 3, 69, 7, 69, 861, 10, 69, 12, 69, 14, 69, 864, 11, 69, 3, 69, 3, 69, 3, 70, 3, 70, 5, 70, 870, 10, 70, 3, 70, 3, 70, 5, 70, 874, 10, 70, 3, 71, 3, 71, 5, 71, 878, 10, 71, 3, 71, 3, 71, 5, 71, 882, 10, 71, 3, 71, 5, 71, 885, 10, 71, 3, 71, 5, 71, 888, 10, 71, 3, 71, 5, 71, 891, 10, 71, 3, 71, 3, 71, 5, 71, 895, 10, 71, 5, 71, 897, 10, 71, 3, 72, 3, 72, 3, 72, 7, 72, 902, 10, 72, 12, 72, 14, 72, 905, 11, 72, 3, 73, 3, 73, 5, 73, 909, 10, 73, 3, 73, 5, 73, 912, 10, 73, 3, 73, 3, 73, 5, 73, 916, 10, 73, 3, 73, 5, 73, 919, 10, 73, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 5, 75, 926, 10, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 5, 76, 935, 10, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 954, 10, 77, 3, 77, 3, 77, 5, 77, 958, 10, 77, 3, 77, 3, 77, 5, 77, 962, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 972, 10, 77, 3, 77, 3, 77, 5, 77, 976, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 983, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 990, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 998, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 1006, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 1012, 10, 77, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 5, 79, 1019, 10, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 5, 80, 1026, 10, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 5, 81, 1033, 10, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 5, 82, 1040, 10, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 5, 85, 1058, 10, 85, 3, 85, 3, 85, 5, 85, 1062, 10, 85, 5, 85, 1064, 10, 85, 3, 85, 3, 85, 3, 86, 6, 86, 1069, 10, 86, 13, 86, 14, 86, 1070, 3, 87, 3, 87, 3, 87, 3, 87, 5, 87, 1077, 10, 87, 3, 88, 3, 88, 3, 88, 5, 88, 1082, 10, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 5, 91, 1097, 10, 91, 3, 91, 5, 91, 1100, 10, 91, 3, 92, 3, 92, 3, 92, 5, 92, 1105, 10, 92, 3, 92, 5, 92, 1108, 10, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 5, 93, 1115, 10, 93, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 5, 96, 1124, 10, 96, 3, 96, 3, 96, 5, 96, 1128, 10, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 5, 96, 1137, 10, 96, 3, 97, 5, 97, 1140, 10, 97, 3, 97, 3, 97, 3, 97, 5, 97, 1145, 10, 97, 3, 97, 3, 97, 3, 97, 3, 98, 5, 98, 1151, 10, 98, 3, 98, 5, 98, 1154, 10, 98, 3, 99, 3, 99, 7, 99, 1158, 10, 99, 12, 99, 14, 99, 1161, 11, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, 102, 5, 102, 1175, 10, 102, 3, 103, 3, 103, 5, 103, 1179, 10, 103, 3, 103, 5, 103, 1182, 10, 103, 3, 103, 3, 103, 5, 103, 1186, 10, 103, 3, 103, 5, 103, 1189, 10, 103, 3, 103, 3, 103, 3, 103, 3, 103, 5, 103, 1195, 10, 103, 3, 103, 5, 103, 1198, 10, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 5, 103, 1207, 10, 103, 3, 103, 3, 103, 5, 103, 1211, 10, 103, 3, 103, 5, 103, 1214, 10, 103, 3, 103, 3, 103, 5, 103, 1218, 10, 103, 3, 103, 5, 103, 1221, 10, 103, 3, 104, 5, 104, 1224, 10, 104, 3, 104, 5, 104, 1227, 10, 104, 3, 104, 5, 104, 1230, 10, 104, 3, 104, 5, 104, 1233, 10, 104, 3, 105, 3, 105, 3, 105, 3, 106, 5, 106, 1239, 10, 106, 3, 106, 3, 106, 3, 106, 5, 106, 1244, 10, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 5, 107, 1254, 10, 107, 3, 107, 3, 107, 5, 107, 1258, 10, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 108, 7, 108, 1269, 10, 108, 12, 108, 14, 108, 1272, 11, 108, 3, 108, 5, 108, 1275, 10, 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 110, 7, 110, 1286, 10, 110, 12, 110, 14, 110, 1289, 11, 110, 3, 110, 5, 110, 1292, 10, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 5, 111, 1301, 10, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 7, 112, 1311, 10, 112, 12, 112, 14, 112, 1314, 11, 112, 3, 112, 3, 112, 5, 112, 1318, 10, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 5, 112, 1325, 10, 112, 5, 112, 1327, 10, 112, 3, 113, 5, 113, 1330, 10, 113, 3, 113, 3, 113, 5, 113, 1334, 10, 113, 3, 113, 3, 113, 5, 113, 1338, 10, 113, 3, 114, 3, 114, 3, 114, 3, 115, 5, 115, 1344, 10, 115, 3, 116, 6, 116, 1347, 10, 116, 13, 116, 14, 116, 1348, 3, 117, 3, 117, 5, 117, 1353, 10, 117, 3, 117, 3, 117, 3, 118, 3, 118, 6, 118, 1359, 10, 118, 13, 118, 14, 118, 1360, 3, 118, 7, 118, 1364, 10, 118, 12, 118, 14, 118, 1367, 11, 118, 3, 118, 6, 118, 1370, 10, 118, 13, 118, 14, 118, 1371, 3, 118, 5, 118, 1375, 10, 118, 3, 118, 5, 118, 1378, 10, 118, 3, 119, 3, 119, 3, 119, 5, 119, 1383, 10, 119, 3, 120, 3, 120, 3, 120, 3, 120, 7, 120, 1389, 10, 120, 12, 120, 14, 120, 1392, 11, 120, 5, 120, 1394, 10, 120, 3, 120, 5, 120, 1397, 10, 120, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1412, 10, 121, 3, 121, 5, 121, 1415, 10, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1420, 10, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1432, 10, 121, 3, 122, 3, 122, 3, 122, 3, 122, 5, 122, 1438, 10, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 123, 3, 123, 3, 123, 3, 123, 5, 123, 1448, 10, 123, 3, 123, 5, 123, 1451, 10, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 5, 124, 1465, 10, 124, 3, 125, 3, 125, 3, 125, 3, 125, 7, 125, 1471, 10, 125, 12, 125, 14, 125, 1474, 11, 125, 3, 125, 3, 125, 5, 125, 1478, 10, 125, 3, 125, 5, 125, 1481, 10, 125, 3, 125, 3, 125, 3, 126, 3, 126, 3, 126, 3, 127, 3, 127, 3, 127, 7, 127, 1491, 10, 127, 12, 127, 14, 127, 1494, 11, 127, 3, 127, 5, 127, 1497, 10, 127, 3, 128, 5, 128, 1500, 10, 128, 3, 128, 3, 128, 5, 128, 1504, 10, 128, 3, 128, 3, 128, 5, 128, 1508, 10, 128, 3, 128, 3, 128, 5, 128, 1512, 10, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1523, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1529, 10, 129, 3, 129, 5, 129, 1532, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1561, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1573, 10, 129, 5, 129, 1575, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1639, 10, 129, 3, 129, 3, 129, 5, 129, 1643, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 7, 129, 1656, 10, 129, 12, 129, 14, 129, 1659, 11, 129, 3, 130, 5, 130, 1662, 10, 130, 3, 130, 3, 130, 5, 130, 1666, 10, 130, 3, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 131, 5, 131, 1674, 10, 131, 3, 131, 5, 131, 1677, 10, 131, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 5, 132, 1684, 10, 132, 3, 133, 3, 133, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1694, 10, 134, 3, 135, 3, 135, 3, 136, 3, 136, 5, 136, 1700, 10, 136, 3, 137, 3, 137, 3, 137, 5, 137, 1705, 10, 137, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, 3, 140, 3, 141, 3, 141, 3, 141, 3, 141, 5, 141, 1721, 10, 141, 3, 141, 2, 6, 22, 24, 116, 256, 142, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 2, 16, 4, 2, 81, 81, 117, 121, 3, 2, 13, 14, 4, 2, 110, 111, 114, 114, 4, 2, 118, 118, 120, 120, 5, 2, 77, 77, 104, 104, 109, 109, 4, 2, 15, 15, 17, 17, 4, 2, 26, 26, 29, 30, 3, 2, 22, 23, 3, 2, 34, 36, 3, 2, 37, 40, 3, 2, 41, 44, 4, 2, 50, 60, 62, 62, 3, 2, 65, 69, 3, 2, 70, 116, 2, 1918, 2, 282, 3, 2, 2, 2, 4, 287, 3, 2, 2, 2, 6, 289, 3, 2, 2, 2, 8, 295, 3, 2, 2, 2, 10, 308, 3, 2, 2, 2, 12, 310, 3, 2, 2, 2, 14, 313, 3, 2, 2, 2, 16, 319, 3, 2, 2, 2, 18, 327, 3, 2, 2, 2, 20, 334, 3, 2, 2, 2, 22, 336, 3, 2, 2, 2, 24, 368, 3, 2, 2, 2, 26, 379, 3, 2, 2, 2, 28, 381, 3, 2, 2, 2, 30, 386, 3, 2, 2, 2, 32, 390, 3, 2, 2, 2, 34, 403, 3, 2, 2, 2, 36, 405, 3, 2, 2, 2, 38, 411, 3, 2, 2, 2, 40, 415, 3, 2, 2, 2, 42, 432, 3, 2, 2, 2, 44, 434, 3, 2, 2, 2, 46, 439, 3, 2, 2, 2, 48, 443, 3, 2, 2, 2, 50, 452, 3, 2, 2, 2, 52, 462, 3, 2, 2, 2, 54, 474, 3, 2, 2, 2, 56, 487, 3, 2, 2, 2, 58, 490, 3, 2, 2, 2, 60, 503, 3, 2, 2, 2, 62, 507, 3, 2, 2, 2, 64, 543, 3, 2, 2, 2, 66, 545, 3, 2, 2, 2, 68, 554, 3, 2, 2, 2, 70, 563, 3, 2, 2, 2, 72, 567, 3, 2, 2, 2, 74, 569, 3, 2, 2, 2, 76, 578, 3, 2, 2, 2, 78, 598, 3, 2, 2, 2, 80, 600, 3, 2, 2, 2, 82, 612, 3, 2, 2, 2, 84, 619, 3, 2, 2, 2, 86, 625, 3, 2, 2, 2, 88, 635, 3, 2, 2, 2, 90, 651, 3, 2, 2, 2, 92, 665, 3, 2, 2, 2, 94, 668, 3, 2, 2, 2, 96, 677, 3, 2, 2, 2, 98, 687, 3, 2, 2, 2, 100, 691, 3, 2, 2, 2, 102, 699, 3, 2, 2, 2, 104, 704, 3, 2, 2, 2, 106, 712, 3, 2, 2, 2, 108, 736, 3, 2, 2, 2, 110, 738, 3, 2, 2, 2, 112, 741, 3, 2, 2, 2, 114, 745, 3, 2, 2, 2, 116, 756, 3, 2, 2, 2, 118, 766, 3, 2, 2, 2, 120, 770, 3, 2, 2, 2, 122, 775, 3, 2, 2, 2, 124, 808, 3, 2, 2, 2, 126, 810, 3, 2, 2, 2, 128, 817, 3, 2, 2, 2, 130, 821, 3, 2, 2, 2, 132, 829, 3, 2, 2, 2, 134, 842, 3, 2, 2, 2, 136, 854, 3, 2, 2, 2, 138, 867, 3, 2, 2, 2, 140, 896, 3, 2, 2, 2, 142, 898, 3, 2, 2, 2, 144, 906, 3, 2, 2, 2, 146, 920, 3, 2, 2, 2, 148, 922, 3, 2, 2, 2, 150, 927, 3, 2, 2, 2, 152, 1011, 3, 2, 2, 2, 154, 1013, 3, 2, 2, 2, 156, 1015, 3, 2, 2, 2, 158, 1022, 3, 2, 2, 2, 160, 1029, 3, 2, 2, 2, 162, 1036, 3, 2, 2, 2, 164, 1043, 3, 2, 2, 2, 166, 1049, 3, 2, 2, 2, 168, 1055, 3, 2, 2, 2, 170, 1068, 3, 2, 2, 2, 172, 1072, 3, 2, 2, 2, 174, 1078, 3, 2, 2, 2, 176, 1083, 3, 2, 2, 2, 178, 1087, 3, 2, 2, 2, 180, 1092, 3, 2, 2, 2, 182, 1101, 3, 2, 2, 2, 184, 1114, 3, 2, 2, 2, 186, 1116, 3, 2, 2, 2, 188, 1119, 3, 2, 2, 2, 190, 1123, 3, 2, 2, 2, 192, 1139, 3, 2, 2, 2, 194, 1150, 3, 2, 2, 2, 196, 1155, 3, 2, 2, 2, 198, 1164, 3, 2, 2, 2, 200, 1167, 3, 2, 2, 2, 202, 1174, 3, 2, 2, 2, 204, 1220, 3, 2, 2, 2, 206, 1223, 3, 2, 2, 2, 208, 1234, 3, 2, 2, 2, 210, 1238, 3, 2, 2, 2, 212, 1250, 3, 2, 2, 2, 214, 1264, 3, 2, 2, 2, 216, 1278, 3, 2, 2, 2, 218, 1281, 3, 2, 2, 2, 220, 1295, 3, 2, 2, 2, 222, 1326, 3, 2, 2, 2, 224, 1329, 3, 2, 2, 2, 226, 1339, 3, 2, 2, 2, 228, 1343, 3, 2, 2, 2, 230, 1346, 3, 2, 2, 2, 232, 1350, 3, 2, 2, 2, 234, 1377, 3, 2, 2, 2, 236, 1379, 3, 2, 2, 2, 238, 1384, 3, 2, 2, 2, 240, 1431, 3, 2, 2, 2, 242, 1433, 3, 2, 2, 2, 244, 1443, 3, 2, 2, 2, 246, 1464, 3, 2, 2, 2, 248, 1466, 3, 2, 2, 2, 250, 1484, 3, 2, 2, 2, 252, 1487, 3, 2, 2, 2, 254, 1499, 3, 2, 2, 2, 256, 1574, 3, 2, 2, 2, 258, 1661, 3, 2, 2, 2, 260, 1676, 3, 2, 2, 2, 262, 1683, 3, 2, 2, 2, 264, 1685, 3, 2, 2, 2, 266, 1693, 3, 2, 2, 2, 268, 1695, 3, 2, 2, 2, 270, 1699, 3, 2, 2, 2, 272, 1704, 3, 2, 2, 2, 274, 1706, 3, 2, 2, 2, 276, 1708, 3, 2, 2, 2, 278, 1712, 3, 2, 2, 2, 280, 1720, 3, 2, 2, 2, 282, 283, 7, 15, 2, 2, 283, 284, 5, 256, 129, 2, 284, 3, 3, 2, 2, 2, 285, 288, 5, 232, 117, 2, 286, 288, 5, 238, 120, 2, 287, 285, 3, 2, 2, 2, 287, 286, 3, 2, 2, 2, 288, 5, 3, 2, 2, 2, 289, 291, 7, 37, 2, 2, 290, 292, 5, 8, 5, 2, 291, 290, 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, 293, 3, 2, 2, 2, 293, 294, 7, 38, 2, 2, 294, 7, 3, 2, 2, 2, 295, 300, 5, 10, 6, 2, 296, 297, 7, 14, 2, 2, 297, 299, 5, 10, 6, 2, 298, 296, 3, 2, 2, 2, 299, 302, 3, 2, 2, 2, 300, 298, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 9, 3, 2, 2, 2, 302, 300, 3, 2, 2, 2, 303, 305, 7, 133, 2, 2, 304, 306, 5, 12, 7, 2, 305, 304, 3, 2, 2, 2, 305, 306, 3, 2, 2, 2, 306, 309, 3, 2, 2, 2, 307, 309, 5, 6, 4, 2, 308, 303, 3, 2, 2, 2, 308, 307, 3, 2, 2, 2, 309, 11, 3, 2, 2, 2, 310, 311, 7, 102, 2, 2, 311, 312, 5, 20, 11, 2, 312, 13, 3, 2, 2, 2, 313, 315, 7, 37, 2, 2, 314, 316, 5, 16, 9, 2, 315, 314, 3, 2, 2, 2, 315, 316, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 318, 7, 38, 2, 2, 318, 15, 3, 2, 2, 2, 319, 324, 5, 18, 10, 2, 320, 321, 7, 14, 2, 2, 321, 323, 5, 18, 10, 2, 322, 320, 3, 2, 2, 2, 323, 326, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2, 325, 17, 3, 2, 2, 2, 326, 324, 3, 2, 2, 2, 327, 328, 5, 20, 11, 2, 328, 19, 3, 2, 2, 2, 329, 335, 5, 22, 12, 2, 330, 335, 5, 50, 26, 2, 331, 335, 5, 52, 27, 2, 332, 335, 5, 30, 16, 2, 333, 335, 7, 134, 2, 2, 334, 329, 3, 2, 2, 2, 334, 330, 3, 2, 2, 2, 334, 331, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 333, 3, 2, 2, 2, 335, 21, 3, 2, 2, 2, 336, 337, 8, 12, 1, 2, 337, 338, 5, 24, 13, 2, 338, 347, 3, 2, 2, 2, 339, 340, 12, 5, 2, 2, 340, 341, 7, 47, 2, 2, 341, 346, 5, 22, 12, 6, 342, 343, 12, 4, 2, 2, 343, 344, 7, 45, 2, 2, 344, 346, 5, 22, 12, 5, 345, 339, 3, 2, 2, 2, 345, 342, 3, 2, 2, 2, 346, 349, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 23, 3, 2, 2, 2, 349, 347, 3, 2, 2, 2, 350, 351, 8, 13, 1, 2, 351, 352, 7, 9, 2, 2, 352, 353, 5, 20, 11, 2, 353, 354, 7, 10, 2, 2, 354, 369, 3, 2, 2, 2, 355, 369, 5, 26, 14, 2, 356, 369, 5, 28, 15, 2, 357, 369, 5, 36, 19, 2, 358, 359, 7, 7, 2, 2, 359, 360, 5, 48, 25, 2, 360, 361, 7, 8, 2, 2, 361, 369, 3, 2, 2, 2, 362, 369, 5, 54, 28, 2, 363, 369, 7, 88, 2, 2, 364, 365, 5, 28, 15, 2, 365, 366, 7, 131, 2, 2, 366, 367, 5, 24, 13, 3, 367, 369, 3, 2, 2, 2, 368, 350, 3, 2, 2, 2, 368, 355, 3, 2, 2, 2, 368, 356, 3, 2, 2, 2, 368, 357, 3, 2, 2, 2, 368, 358, 3, 2, 2, 2, 368, 362, 3, 2, 2, 2, 368, 363, 3, 2, 2, 2, 368, 364, 3, 2, 2, 2, 369, 376, 3, 2, 2, 2, 370, 371, 12, 7, 2, 2, 371, 372, 6, 13, 5, 2, 372, 373, 7, 7, 2, 2, 373, 375, 7, 8, 2, 2, 374, 370, 3, 2, 2, 2, 375, 378, 3, 2, 2, 2, 376, 374, 3, 2, 2, 2, 376, 377, 3, 2, 2, 2, 377, 25, 3, 2, 2, 2, 378, 376, 3, 2, 2, 2, 379, 380, 9, 2, 2, 2, 380, 27, 3, 2, 2, 2, 381, 384, 5, 34, 18, 2, 382, 385, 5, 32, 17, 2, 383, 385, 5, 30, 16, 2, 384, 382, 3, 2, 2, 2, 384, 383, 3, 2, 2, 2, 384, 385, 3, 2, 2, 2, 385, 29, 3, 2, 2, 2, 386, 387, 7, 37, 2, 2, 387, 388, 5, 16, 9, 2, 388, 389, 7, 38, 2, 2, 389, 31, 3, 2, 2, 2, 390, 391, 7, 37, 2, 2, 391, 392, 5, 16, 9, 2, 392, 393, 7, 37, 2, 2, 393, 399, 5, 16, 9, 2, 394, 395, 7, 38, 2, 2, 395, 396, 5, 4, 3, 2, 396, 397, 7, 38, 2, 2, 397, 400, 3, 2, 2, 2, 398, 400, 7, 34, 2, 2, 399, 394, 3, 2, 2, 2, 399, 398, 3, 2, 2, 2, 400, 33, 3, 2, 2, 2, 401, 404, 7, 133, 2, 2, 402, 404, 5, 106, 54, 2, 403, 401, 3, 2, 2, 2, 403, 402, 3, 2, 2, 2, 404, 35, 3, 2, 2, 2, 405, 407, 7, 11, 2, 2, 406, 408, 5, 38, 20, 2, 407, 406, 3, 2, 2, 2, 407, 408, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 410, 7, 12, 2, 2, 410, 37, 3, 2, 2, 2, 411, 413, 5, 40, 21, 2, 412, 414, 9, 3, 2, 2, 413, 412, 3, 2, 2, 2, 413, 414, 3, 2, 2, 2, 414, 39, 3, 2, 2, 2, 415, 420, 5, 42, 22, 2, 416, 417, 9, 3, 2, 2, 417, 419, 5, 42, 22, 2, 418, 416, 3, 2, 2, 2, 419, 422, 3, 2, 2, 2, 420, 418, 3, 2, 2, 2, 420, 421, 3, 2, 2, 2, 421, 41, 3, 2, 2, 2, 422, 420, 3, 2, 2, 2, 423, 433, 5, 58, 30, 2, 424, 433, 5, 62, 32, 2, 425, 433, 5, 80, 41, 2, 426, 433, 5, 82, 42, 2, 427, 430, 5, 84, 43, 2, 428, 429, 7, 61, 2, 2, 429, 431, 5, 20, 11, 2, 430, 428, 3, 2, 2, 2, 430, 431, 3, 2, 2, 2, 431, 433, 3, 2, 2, 2, 432, 423, 3, 2, 2, 2, 432, 424, 3, 2, 2, 2, 432, 425, 3, 2, 2, 2, 432, 426, 3, 2, 2, 2, 432, 427, 3, 2, 2, 2, 433, 43, 3, 2, 2, 2, 434, 435, 5, 24, 13, 2, 435, 436, 6, 23, 6, 2, 436, 437, 7, 7, 2, 2, 437, 438, 7, 8, 2, 2, 438, 45, 3, 2, 2, 2, 439, 440, 7, 7, 2, 2, 440, 441, 5, 48, 25, 2, 441, 442, 7, 8, 2, 2, 442, 47, 3, 2, 2, 2, 443, 448, 5, 20, 11, 2, 444, 445, 7, 14, 2, 2, 445, 447, 5, 20, 11, 2, 446, 444, 3, 2, 2, 2, 447, 450, 3, 2, 2, 2, 448, 446, 3, 2, 2, 2, 448, 449, 3, 2, 2, 2, 449, 49, 3, 2, 2, 2, 450, 448, 3, 2, 2, 2, 451, 453, 5, 6, 4, 2, 452, 451, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 456, 7, 9, 2, 2, 455, 457, 5, 64, 33, 2, 456, 455, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 459, 7, 10, 2, 2, 459, 460, 7, 61, 2, 2, 460, 461, 5, 20, 11, 2, 461, 51, 3, 2, 2, 2, 462, 464, 7, 76, 2, 2, 463, 465, 5, 6, 4, 2, 464, 463, 3, 2, 2, 2, 464, 465, 3, 2, 2, 2, 465, 466, 3, 2, 2, 2, 466, 468, 7, 9, 2, 2, 467, 469, 5, 64, 33, 2, 468, 467, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 7, 10, 2, 2, 471, 472, 7, 61, 2, 2, 472, 473, 5, 20, 11, 2, 473, 53, 3, 2, 2, 2, 474, 475, 7, 73, 2, 2, 475, 476, 5, 56, 29, 2, 476, 55, 3, 2, 2, 2, 477, 488, 7, 133, 2, 2, 478, 479, 5, 270, 136, 2, 479, 480, 7, 19, 2, 2, 480, 482, 3, 2, 2, 2, 481, 478, 3, 2, 2, 2, 482, 483, 3, 2, 2, 2, 483, 481, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 486, 5, 270, 136, 2, 486, 488, 3, 2, 2, 2, 487, 477, 3, 2, 2, 2, 487, 481, 3, 2, 2, 2, 488, 57, 3, 2, 2, 2, 489, 491, 7, 98, 2, 2, 490, 489, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 494, 5, 246, 124, 2, 493, 495, 7, 16, 2, 2, 494, 493, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 497, 3, 2, 2, 2, 496, 498, 5, 60, 31, 2, 497, 496, 3, 2, 2, 2, 497, 498, 3, 2, 2, 2, 498, 501, 3, 2, 2, 2, 499, 500, 7, 61, 2, 2, 500, 502, 5, 20, 11, 2, 501, 499, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 59, 3, 2, 2, 2, 503, 504, 7, 17, 2, 2, 504, 505, 5, 20, 11, 2, 505, 61, 3, 2, 2, 2, 506, 508, 5, 6, 4, 2, 507, 506, 3, 2, 2, 2, 507, 508, 3, 2, 2, 2, 508, 509, 3, 2, 2, 2, 509, 511, 7, 9, 2, 2, 510, 512, 5, 64, 33, 2, 511, 510, 3, 2, 2, 2, 511, 512, 3, 2, 2, 2, 512, 513, 3, 2, 2, 2, 513, 515, 7, 10, 2, 2, 514, 516, 5, 60, 31, 2, 515, 514, 3, 2, 2, 2, 515, 516, 3, 2, 2, 2, 516, 63, 3, 2, 2, 2, 517, 544, 5, 78, 40, 2, 518, 523, 5, 26, 14, 2, 519, 520, 7, 14, 2, 2, 520, 522, 5, 26, 14, 2, 521, 519, 3, 2, 2, 2, 522, 525, 3, 2, 2, 2, 523, 521, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 544, 3, 2, 2, 2, 525, 523, 3, 2, 2, 2, 526, 529, 5, 74, 38, 2, 527, 528, 7, 14, 2, 2, 528, 530, 5, 78, 40, 2, 529, 527, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 544, 3, 2, 2, 2, 531, 541, 5, 66, 34, 2, 532, 539, 7, 14, 2, 2, 533, 536, 5, 74, 38, 2, 534, 535, 7, 14, 2, 2, 535, 537, 5, 78, 40, 2, 536, 534, 3, 2, 2, 2, 536, 537, 3, 2, 2, 2, 537, 540, 3, 2, 2, 2, 538, 540, 5, 78, 40, 2, 539, 533, 3, 2, 2, 2, 539, 538, 3, 2, 2, 2, 540, 542, 3, 2, 2, 2, 541, 532, 3, 2, 2, 2, 541, 542, 3, 2, 2, 2, 542, 544, 3, 2, 2, 2, 543, 517, 3, 2, 2, 2, 543, 518, 3, 2, 2, 2, 543, 526, 3, 2, 2, 2, 543, 531, 3, 2, 2, 2, 544, 65, 3, 2, 2, 2, 545, 550, 5, 68, 35, 2, 546, 547, 7, 14, 2, 2, 547, 549, 5, 68, 35, 2, 548, 546, 3, 2, 2, 2, 549, 552, 3, 2, 2, 2, 550, 548, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 67, 3, 2, 2, 2, 552, 550, 3, 2, 2, 2, 553, 555, 5, 112, 57, 2, 554, 553, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 557, 3, 2, 2, 2, 556, 558, 5, 70, 36, 2, 557, 556, 3, 2, 2, 2, 557, 558, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 561, 5, 72, 37, 2, 560, 562, 5, 60, 31, 2, 561, 560, 3, 2, 2, 2, 561, 562, 3, 2, 2, 2, 562, 69, 3, 2, 2, 2, 563, 564, 9, 4, 2, 2, 564, 71, 3, 2, 2, 2, 565, 568, 5, 270, 136, 2, 566, 568, 5, 4, 3, 2, 567, 565, 3, 2, 2, 2, 567, 566, 3, 2, 2, 2, 568, 73, 3, 2, 2, 2, 569, 574, 5, 76, 39, 2, 570, 571, 7, 14, 2, 2, 571, 573, 5, 76, 39, 2, 572, 570, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 75, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 577, 579, 5, 112, 57, 2, 578, 577, 3, 2, 2, 2, 578, 579, 3, 2, 2, 2, 579, 581, 3, 2, 2, 2, 580, 582, 5, 70, 36, 2, 581, 580, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, 592, 5, 72, 37, 2, 584, 586, 7, 16, 2, 2, 585, 587, 5, 60, 31, 2, 586, 585, 3, 2, 2, 2, 586, 587, 3, 2, 2, 2, 587, 593, 3, 2, 2, 2, 588, 590, 5, 60, 31, 2, 589, 588, 3, 2, 2, 2, 589, 590, 3, 2, 2, 2, 590, 591, 3, 2, 2, 2, 591, 593, 5, 2, 2, 2, 592, 584, 3, 2, 2, 2, 592, 589, 3, 2, 2, 2, 593, 77, 3, 2, 2, 2, 594, 595, 7, 18, 2, 2, 595, 599, 5, 68, 35, 2, 596, 597, 7, 18, 2, 2, 597, 599, 5, 256, 129, 2, 598, 594, 3, 2, 2, 2, 598, 596, 3, 2, 2, 2, 599, 79, 3, 2, 2, 2, 600, 602, 7, 76, 2, 2, 601, 603, 5, 6, 4, 2, 602, 601, 3, 2, 2, 2, 602, 603, 3, 2, 2, 2, 603, 604, 3, 2, 2, 2, 604, 606, 7, 9, 2, 2, 605, 607, 5, 64, 33, 2, 606, 605, 3, 2, 2, 2, 606, 607, 3, 2, 2, 2, 607, 608, 3, 2, 2, 2, 608, 610, 7, 10, 2, 2, 609, 611, 5, 60, 31, 2, 610, 609, 3, 2, 2, 2, 610, 611, 3, 2, 2, 2, 611, 81, 3, 2, 2, 2, 612, 613, 7, 7, 2, 2, 613, 614, 7, 133, 2, 2, 614, 615, 7, 17, 2, 2, 615, 616, 9, 5, 2, 2, 616, 617, 7, 8, 2, 2, 617, 618, 5, 60, 31, 2, 618, 83, 3, 2, 2, 2, 619, 621, 5, 246, 124, 2, 620, 622, 7, 16, 2, 2, 621, 620, 3, 2, 2, 2, 621, 622, 3, 2, 2, 2, 622, 623, 3, 2, 2, 2, 623, 624, 5, 62, 32, 2, 624, 85, 3, 2, 2, 2, 625, 626, 7, 122, 2, 2, 626, 628, 7, 133, 2, 2, 627, 629, 5, 6, 4, 2, 628, 627, 3, 2, 2, 2, 628, 629, 3, 2, 2, 2, 629, 630, 3, 2, 2, 2, 630, 631, 7, 15, 2, 2, 631, 632, 5, 20, 11, 2, 632, 633, 7, 13, 2, 2, 633, 87, 3, 2, 2, 2, 634, 636, 5, 70, 36, 2, 635, 634, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 637, 3, 2, 2, 2, 637, 638, 7, 125, 2, 2, 638, 640, 7, 9, 2, 2, 639, 641, 5, 222, 112, 2, 640, 639, 3, 2, 2, 2, 640, 641, 3, 2, 2, 2, 641, 642, 3, 2, 2, 2, 642, 648, 7, 10, 2, 2, 643, 644, 7, 11, 2, 2, 644, 645, 5, 228, 115, 2, 645, 646, 7, 12, 2, 2, 646, 649, 3, 2, 2, 2, 647, 649, 7, 13, 2, 2, 648, 643, 3, 2, 2, 2, 648, 647, 3, 2, 2, 2, 648, 649, 3, 2, 2, 2, 649, 89, 3, 2, 2, 2, 650, 652, 7, 105, 2, 2, 651, 650, 3, 2, 2, 2, 651, 652, 3, 2, 2, 2, 652, 653, 3, 2, 2, 2, 653, 654, 7, 112, 2, 2, 654, 656, 7, 133, 2, 2, 655, 657, 5, 6, 4, 2, 656, 655, 3, 2, 2, 2, 656, 657, 3, 2, 2, 2, 657, 659, 3, 2, 2, 2, 658, 660, 5, 92, 47, 2, 659, 658, 3, 2, 2, 2, 659, 660, 3, 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 663, 5, 36, 19, 2, 662, 664, 7, 13, 2, 2, 663, 662, 3, 2, 2, 2, 663, 664, 3, 2, 2, 2, 664, 91, 3, 2, 2, 2, 665, 666, 7, 102, 2, 2, 666, 667, 5, 94, 48, 2, 667, 93, 3, 2, 2, 2, 668, 673, 5, 28, 15, 2, 669, 670, 7, 14, 2, 2, 670, 672, 5, 28, 15, 2, 671, 669, 3, 2, 2, 2, 672, 675, 3, 2, 2, 2, 673, 671, 3, 2, 2, 2, 673, 674, 3, 2, 2, 2, 674, 95, 3, 2, 2, 2, 675, 673, 3, 2, 2, 2, 676, 678, 7, 104, 2, 2, 677, 676, 3, 2, 2, 2, 677, 678, 3, 2, 2, 2, 678, 679, 3, 2, 2, 2, 679, 680, 7, 101, 2, 2, 680, 681, 7, 133, 2, 2, 681, 683, 7, 11, 2, 2, 682, 684, 5, 98, 50, 2, 683, 682, 3, 2, 2, 2, 683, 684, 3, 2, 2, 2, 684, 685, 3, 2, 2, 2, 685, 686, 7, 12, 2, 2, 686, 97, 3, 2, 2, 2, 687, 689, 5, 100, 51, 2, 688, 690, 7, 14, 2, 2, 689, 688, 3, 2, 2, 2, 689, 690, 3, 2, 2, 2, 690, 99, 3, 2, 2, 2, 691, 696, 5, 102, 52, 2, 692, 693, 7, 14, 2, 2, 693, 695, 5, 102, 52, 2, 694, 692, 3, 2, 2, 2, 695, 698, 3, 2, 2, 2, 696, 694, 3, 2, 2, 2, 696, 697, 3, 2, 2, 2, 697, 101, 3, 2, 2, 2, 698, 696, 3, 2, 2, 2, 699, 702, 5, 246, 124, 2, 700, 701, 7, 15, 2, 2, 701, 703, 5, 256, 129, 2, 702, 700, 3, 2, 2, 2, 702, 703, 3, 2, 2, 2, 703, 103, 3, 2, 2, 2, 704, 705, 7, 126, 2, 2, 705, 706, 5, 106, 54, 2, 706, 708, 7, 11, 2, 2, 707, 709, 5, 128, 65, 2, 708, 707, 3, 2, 2, 2, 708, 709, 3, 2, 2, 2, 709, 710, 3, 2, 2, 2, 710, 711, 7, 12, 2, 2, 711, 105, 3, 2, 2, 2, 712, 721, 7, 133, 2, 2, 713, 715, 7, 19, 2, 2, 714, 713, 3, 2, 2, 2, 715, 716, 3, 2, 2, 2, 716, 714, 3, 2, 2, 2, 716, 717, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 720, 7, 133, 2, 2, 719, 714, 3, 2, 2, 2, 720, 723, 3, 2, 2, 2, 721, 719, 3, 2, 2, 2, 721, 722, 3, 2, 2, 2, 722, 107, 3, 2, 2, 2, 723, 721, 3, 2, 2, 2, 724, 725, 7, 133, 2, 2, 725, 726, 7, 15, 2, 2, 726, 727, 5, 106, 54, 2, 727, 728, 7, 13, 2, 2, 728, 737, 3, 2, 2, 2, 729, 730, 7, 133, 2, 2, 730, 731, 7, 15, 2, 2, 731, 732, 7, 127, 2, 2, 732, 733, 7, 9, 2, 2, 733, 734, 7, 134, 2, 2, 734, 735, 7, 10, 2, 2, 735, 737, 7, 13, 2, 2, 736, 724, 3, 2, 2, 2, 736, 729, 3, 2, 2, 2, 737, 109, 3, 2, 2, 2, 738, 739, 7, 134, 2, 2, 739, 111, 3, 2, 2, 2, 740, 742, 5, 114, 58, 2, 741, 740, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 741, 3, 2, 2, 2, 743, 744, 3, 2, 2, 2, 744, 113, 3, 2, 2, 2, 745, 748, 7, 132, 2, 2, 746, 749, 5, 116, 59, 2, 747, 749, 5, 118, 60, 2, 748, 746, 3, 2, 2, 2, 748, 747, 3, 2, 2, 2, 749, 115, 3, 2, 2, 2, 750, 751, 8, 59, 1, 2, 751, 757, 7, 133, 2, 2, 752, 753, 7, 9, 2, 2, 753, 754, 5, 256, 129, 2, 754, 755, 7, 10, 2, 2, 755, 757, 3, 2, 2, 2, 756, 750, 3, 2, 2, 2, 756, 752, 3, 2, 2, 2, 757, 763, 3, 2, 2, 2, 758, 759, 12, 4, 2, 2, 759, 760, 7, 19, 2, 2, 760, 762, 5, 270, 136, 2, 761, 758, 3, 2, 2, 2, 762, 765, 3, 2, 2, 2, 763, 761, 3, 2, 2, 2, 763, 764, 3, 2, 2, 2, 764, 117, 3, 2, 2, 2, 765, 763, 3, 2, 2, 2, 766, 767, 5, 116, 59, 2, 767, 768, 5, 248, 125, 2, 768, 119, 3, 2, 2, 2, 769, 771, 5, 230, 116, 2, 770, 769, 3, 2, 2, 2, 770, 771, 3, 2, 2, 2, 771, 772, 3, 2, 2, 2, 772, 773, 7, 2, 2, 3, 773, 121, 3, 2, 2, 2, 774, 776, 7, 105, 2, 2, 775, 774, 3, 2, 2, 2, 775, 776, 3, 2, 2, 2, 776, 777, 3, 2, 2, 2, 777, 778, 5, 124, 63, 2, 778, 123, 3, 2, 2, 2, 779, 809, 5, 126, 64, 2, 780, 809, 5, 140, 71, 2, 781, 809, 5, 132, 67, 2, 782, 809, 5, 138, 70, 2, 783, 809, 5, 146, 74, 2, 784, 809, 5, 130, 66, 2, 785, 809, 5, 192, 97, 2, 786, 809, 5, 90, 46, 2, 787, 809, 5, 104, 53, 2, 788, 809, 5, 150, 76, 2, 789, 809, 5, 152, 77, 2, 790, 809, 5, 156, 79, 2, 791, 809, 5, 158, 80, 2, 792, 809, 5, 160, 81, 2, 793, 809, 5, 162, 82, 2, 794, 809, 5, 164, 83, 2, 795, 809, 5, 176, 89, 2, 796, 809, 5, 166, 84, 2, 797, 809, 5, 178, 90, 2, 798, 809, 5, 180, 91, 2, 799, 809, 5, 188, 95, 2, 800, 809, 5, 190, 96, 2, 801, 809, 5, 258, 130, 2, 802, 809, 5, 212, 107, 2, 803, 809, 5, 86, 44, 2, 804, 809, 5, 96, 49, 2, 805, 809, 5, 148, 75, 2, 806, 807, 7, 105, 2, 2, 807, 809, 5, 124, 63, 2, 808, 779, 3, 2, 2, 2, 808, 780, 3, 2, 2, 2, 808, 781, 3, 2, 2, 2, 808, 782, 3, 2, 2, 2, 808, 783, 3, 2, 2, 2, 808, 784, 3, 2, 2, 2, 808, 785, 3, 2, 2, 2, 808, 786, 3, 2, 2, 2, 808, 787, 3, 2, 2, 2, 808, 788, 3, 2, 2, 2, 808, 789, 3, 2, 2, 2, 808, 790, 3, 2, 2, 2, 808, 791, 3, 2, 2, 2, 808, 792, 3, 2, 2, 2, 808, 793, 3, 2, 2, 2, 808, 794, 3, 2, 2, 2, 808, 795, 3, 2, 2, 2, 808, 796, 3, 2, 2, 2, 808, 797, 3, 2, 2, 2, 808, 798, 3, 2, 2, 2, 808, 799, 3, 2, 2, 2, 808, 800, 3, 2, 2, 2, 808, 801, 3, 2, 2, 2, 808, 802, 3, 2, 2, 2, 808, 803, 3, 2, 2, 2, 808, 804, 3, 2, 2, 2, 808, 805, 3, 2, 2, 2, 808, 806, 3, 2, 2, 2, 809, 125, 3, 2, 2, 2, 810, 812, 7, 11, 2, 2, 811, 813, 5, 128, 65, 2, 812, 811, 3, 2, 2, 2, 812, 813, 3, 2, 2, 2, 813, 814, 3, 2, 2, 2, 814, 815, 7, 12, 2, 2, 815, 127, 3, 2, 2, 2, 816, 818, 5, 124, 63, 2, 817, 816, 3, 2, 2, 2, 818, 819, 3, 2, 2, 2, 819, 817, 3, 2, 2, 2, 819, 820, 3, 2, 2, 2, 820, 129, 3, 2, 2, 2, 821, 825, 7, 130, 2, 2, 822, 823, 7, 133, 2, 2, 823, 826, 5, 62, 32, 2, 824, 826, 5, 140, 71, 2, 825, 822, 3, 2, 2, 2, 825, 824, 3, 2, 2, 2, 826, 827, 3, 2, 2, 2, 827, 828, 5, 280, 141, 2, 828, 131, 3, 2, 2, 2, 829, 833, 7, 106, 2, 2, 830, 834, 5, 134, 68, 2, 831, 834, 5, 108, 55, 2, 832, 834, 5, 110, 56, 2, 833, 830, 3, 2, 2, 2, 833, 831, 3, 2, 2, 2, 833, 832, 3, 2, 2, 2, 834, 835, 3, 2, 2, 2, 835, 836, 5, 280, 141, 2, 836, 133, 3, 2, 2, 2, 837, 843, 7, 28, 2, 2, 838, 843, 7, 27, 2, 2, 839, 843, 7, 26, 2, 2, 840, 843, 5, 136, 69, 2, 841, 843, 5, 270, 136, 2, 842, 837, 3, 2, 2, 2, 842, 838, 3, 2, 2, 2, 842, 839, 3, 2, 2, 2, 842, 840, 3, 2, 2, 2, 842, 841, 3, 2, 2, 2, 843, 846, 3, 2, 2, 2, 844, 845, 7, 96, 2, 2, 845, 847, 5, 270, 136, 2, 846, 844, 3, 2, 2, 2, 846, 847, 3, 2, 2, 2, 847, 848, 3, 2, 2, 2, 848, 849, 7, 97, 2, 2, 849, 850, 7, 134, 2, 2, 850, 135, 3, 2, 2, 2, 851, 852, 5, 270, 136, 2, 852, 853, 7, 14, 2, 2, 853, 855, 3, 2, 2, 2, 854, 851, 3, 2, 2, 2, 854, 855, 3, 2, 2, 2, 855, 856, 3, 2, 2, 2, 856, 857, 7, 11, 2, 2, 857, 862, 5, 270, 136, 2, 858, 859, 7, 14, 2, 2, 859, 861, 5, 270, 136, 2, 860, 858, 3, 2, 2, 2, 861, 864, 3, 2, 2, 2, 862, 860, 3, 2, 2, 2, 862, 863, 3, 2, 2, 2, 863, 865, 3, 2, 2, 2, 864, 862, 3, 2, 2, 2, 865, 866, 7, 12, 2, 2, 866, 137, 3, 2, 2, 2, 867, 869, 7, 105, 2, 2, 868, 870, 7, 90, 2, 2, 869, 868, 3, 2, 2, 2, 869, 870, 3, 2, 2, 2, 870, 873, 3, 2, 2, 2, 871, 874, 5, 134, 68, 2, 872, 874, 5, 124, 63, 2, 873, 871, 3, 2, 2, 2, 873, 872, 3, 2, 2, 2, 874, 139, 3, 2, 2, 2, 875, 877, 5, 4, 3, 2, 876, 878, 5, 60, 31, 2, 877, 876, 3, 2, 2, 2, 877, 878, 3, 2, 2, 2, 878, 879, 3, 2, 2, 2, 879, 881, 5, 2, 2, 2, 880, 882, 7, 13, 2, 2, 881, 880, 3, 2, 2, 2, 881, 882, 3, 2, 2, 2, 882, 897, 3, 2, 2, 2, 883, 885, 5, 70, 36, 2, 884, 883, 3, 2, 2, 2, 884, 885, 3, 2, 2, 2, 885, 887, 3, 2, 2, 2, 886, 888, 5, 154, 78, 2, 887, 886, 3, 2, 2, 2, 887, 888, 3, 2, 2, 2, 888, 890, 3, 2, 2, 2, 889, 891, 7, 98, 2, 2, 890, 889, 3, 2, 2, 2, 890, 891, 3, 2, 2, 2, 891, 892, 3, 2, 2, 2, 892, 894, 5, 142, 72, 2, 893, 895, 7, 13, 2, 2, 894, 893, 3, 2, 2, 2, 894, 895, 3, 2, 2, 2, 895, 897, 3, 2, 2, 2, 896, 875, 3, 2, 2, 2, 896, 884, 3, 2, 2, 2, 897, 141, 3, 2, 2, 2, 898, 903, 5, 144, 73, 2, 899, 900, 7, 14, 2, 2, 900, 902, 5, 144, 73, 2, 901, 899, 3, 2, 2, 2, 902, 905, 3, 2, 2, 2, 903, 901, 3, 2, 2, 2, 903, 904, 3, 2, 2, 2, 904, 143, 3, 2, 2, 2, 905, 903, 3, 2, 2, 2, 906, 908, 5, 184, 93, 2, 907, 909, 5, 60, 31, 2, 908, 907, 3, 2, 2, 2, 908, 909, 3, 2, 2, 2, 909, 911, 3, 2, 2, 2, 910, 912, 5, 256, 129, 2, 911, 910, 3, 2, 2, 2, 911, 912, 3, 2, 2, 2, 912, 918, 3, 2, 2, 2, 913, 915, 7, 15, 2, 2, 914, 916, 5, 6, 4, 2, 915, 914, 3, 2, 2, 2, 915, 916, 3, 2, 2, 2, 916, 917, 3, 2, 2, 2, 917, 919, 5, 256, 129, 2, 918, 913, 3, 2, 2, 2, 918, 919, 3, 2, 2, 2, 919, 145, 3, 2, 2, 2, 920, 921, 7, 13, 2, 2, 921, 147, 3, 2, 2, 2, 922, 923, 6, 75, 8, 2, 923, 925, 5, 252, 127, 2, 924, 926, 7, 13, 2, 2, 925, 924, 3, 2, 2, 2, 925, 926, 3, 2, 2, 2, 926, 149, 3, 2, 2, 2, 927, 928, 7, 91, 2, 2, 928, 929, 7, 9, 2, 2, 929, 930, 5, 252, 127, 2, 930, 931, 7, 10, 2, 2, 931, 934, 5, 124, 63, 2, 932, 933, 7, 75, 2, 2, 933, 935, 5, 124, 63, 2, 934, 932, 3, 2, 2, 2, 934, 935, 3, 2, 2, 2, 935, 151, 3, 2, 2, 2, 936, 937, 7, 71, 2, 2, 937, 938, 5, 124, 63, 2, 938, 939, 7, 85, 2, 2, 939, 940, 7, 9, 2, 2, 940, 941, 5, 252, 127, 2, 941, 942, 7, 10, 2, 2, 942, 943, 5, 280, 141, 2, 943, 1012, 3, 2, 2, 2, 944, 945, 7, 85, 2, 2, 945, 946, 7, 9, 2, 2, 946, 947, 5, 252, 127, 2, 947, 948, 7, 10, 2, 2, 948, 949, 5, 124, 63, 2, 949, 1012, 3, 2, 2, 2, 950, 951, 7, 83, 2, 2, 951, 953, 7, 9, 2, 2, 952, 954, 5, 252, 127, 2, 953, 952, 3, 2, 2, 2, 953, 954, 3, 2, 2, 2, 954, 955, 3, 2, 2, 2, 955, 957, 7, 13, 2, 2, 956, 958, 5, 252, 127, 2, 957, 956, 3, 2, 2, 2, 957, 958, 3, 2, 2, 2, 958, 959, 3, 2, 2, 2, 959, 961, 7, 13, 2, 2, 960, 962, 5, 252, 127, 2, 961, 960, 3, 2, 2, 2, 961, 962, 3, 2, 2, 2, 962, 963, 3, 2, 2, 2, 963, 964, 7, 10, 2, 2, 964, 1012, 5, 124, 63, 2, 965, 966, 7, 83, 2, 2, 966, 967, 7, 9, 2, 2, 967, 968, 5, 154, 78, 2, 968, 969, 5, 142, 72, 2, 969, 971, 7, 13, 2, 2, 970, 972, 5, 252, 127, 2, 971, 970, 3, 2, 2, 2, 971, 972, 3, 2, 2, 2, 972, 973, 3, 2, 2, 2, 973, 975, 7, 13, 2, 2, 974, 976, 5, 252, 127, 2, 975, 974, 3, 2, 2, 2, 975, 976, 3, 2, 2, 2, 976, 977, 3, 2, 2, 2, 977, 978, 7, 10, 2, 2, 978, 979, 5, 124, 63, 2, 979, 1012, 3, 2, 2, 2, 980, 982, 7, 83, 2, 2, 981, 983, 7, 107, 2, 2, 982, 981, 3, 2, 2, 2, 982, 983, 3, 2, 2, 2, 983, 984, 3, 2, 2, 2, 984, 985, 7, 9, 2, 2, 985, 989, 5, 256, 129, 2, 986, 990, 7, 94, 2, 2, 987, 988, 7, 133, 2, 2, 988, 990, 6, 77, 9, 2, 989, 986, 3, 2, 2, 2, 989, 987, 3, 2, 2, 2, 990, 991, 3, 2, 2, 2, 991, 992, 5, 252, 127, 2, 992, 993, 7, 10, 2, 2, 993, 994, 5, 124, 63, 2, 994, 1012, 3, 2, 2, 2, 995, 997, 7, 83, 2, 2, 996, 998, 7, 107, 2, 2, 997, 996, 3, 2, 2, 2, 997, 998, 3, 2, 2, 2, 998, 999, 3, 2, 2, 2, 999, 1000, 7, 9, 2, 2, 1000, 1001, 5, 154, 78, 2, 1001, 1005, 5, 144, 73, 2, 1002, 1006, 7, 94, 2, 2, 1003, 1004, 7, 133, 2, 2, 1004, 1006, 6, 77, 10, 2, 1005, 1002, 3, 2, 2, 2, 1005, 1003, 3, 2, 2, 2, 1006, 1007, 3, 2, 2, 2, 1007, 1008, 5, 252, 127, 2, 1008, 1009, 7, 10, 2, 2, 1009, 1010, 5, 124, 63, 2, 1010, 1012, 3, 2, 2, 2, 1011, 936, 3, 2, 2, 2, 1011, 944, 3, 2, 2, 2, 1011, 950, 3, 2, 2, 2, 1011, 965, 3, 2, 2, 2, 1011, 980, 3, 2, 2, 2, 1011, 995, 3, 2, 2, 2, 1012, 153, 3, 2, 2, 2, 1013, 1014, 9, 6, 2, 2, 1014, 155, 3, 2, 2, 2, 1015, 1018, 7, 82, 2, 2, 1016, 1017, 6, 79, 11, 2, 1017, 1019, 7, 133, 2, 2, 1018, 1016, 3, 2, 2, 2, 1018, 1019, 3, 2, 2, 2, 1019, 1020, 3, 2, 2, 2, 1020, 1021, 5, 280, 141, 2, 1021, 157, 3, 2, 2, 2, 1022, 1025, 7, 70, 2, 2, 1023, 1024, 6, 80, 12, 2, 1024, 1026, 7, 133, 2, 2, 1025, 1023, 3, 2, 2, 2, 1025, 1026, 3, 2, 2, 2, 1026, 1027, 3, 2, 2, 2, 1027, 1028, 5, 280, 141, 2, 1028, 159, 3, 2, 2, 2, 1029, 1032, 7, 80, 2, 2, 1030, 1031, 6, 81, 13, 2, 1031, 1033, 5, 252, 127, 2, 1032, 1030, 3, 2, 2, 2, 1032, 1033, 3, 2, 2, 2, 1033, 1034, 3, 2, 2, 2, 1034, 1035, 5, 280, 141, 2, 1035, 161, 3, 2, 2, 2, 1036, 1039, 7, 116, 2, 2, 1037, 1038, 6, 82, 14, 2, 1038, 1040, 5, 252, 127, 2, 1039, 1037, 3, 2, 2, 2, 1039, 1040, 3, 2, 2, 2, 1040, 1041, 3, 2, 2, 2, 1041, 1042, 5, 280, 141, 2, 1042, 163, 3, 2, 2, 2, 1043, 1044, 7, 89, 2, 2, 1044, 1045, 7, 9, 2, 2, 1045, 1046, 5, 252, 127, 2, 1046, 1047, 7, 10, 2, 2, 1047, 1048, 5, 124, 63, 2, 1048, 165, 3, 2, 2, 2, 1049, 1050, 7, 84, 2, 2, 1050, 1051, 7, 9, 2, 2, 1051, 1052, 5, 252, 127, 2, 1052, 1053, 7, 10, 2, 2, 1053, 1054, 5, 168, 85, 2, 1054, 167, 3, 2, 2, 2, 1055, 1057, 7, 11, 2, 2, 1056, 1058, 5, 170, 86, 2, 1057, 1056, 3, 2, 2, 2, 1057, 1058, 3, 2, 2, 2, 1058, 1063, 3, 2, 2, 2, 1059, 1061, 5, 174, 88, 2, 1060, 1062, 5, 170, 86, 2, 1061, 1060, 3, 2, 2, 2, 1061, 1062, 3, 2, 2, 2, 1062, 1064, 3, 2, 2, 2, 1063, 1059, 3, 2, 2, 2, 1063, 1064, 3, 2, 2, 2, 1064, 1065, 3, 2, 2, 2, 1065, 1066, 7, 12, 2, 2, 1066, 169, 3, 2, 2, 2, 1067, 1069, 5, 172, 87, 2, 1068, 1067, 3, 2, 2, 2, 1069, 1070, 3, 2, 2, 2, 1070, 1068, 3, 2, 2, 2, 1070, 1071, 3, 2, 2, 2, 1071, 171, 3, 2, 2, 2, 1072, 1073, 7, 74, 2, 2, 1073, 1074, 5, 252, 127, 2, 1074, 1076, 7, 17, 2, 2, 1075, 1077, 5, 128, 65, 2, 1076, 1075, 3, 2, 2, 2, 1076, 1077, 3, 2, 2, 2, 1077, 173, 3, 2, 2, 2, 1078, 1079, 7, 90, 2, 2, 1079, 1081, 7, 17, 2, 2, 1080, 1082, 5, 128, 65, 2, 1081, 1080, 3, 2, 2, 2, 1081, 1082, 3, 2, 2, 2, 1082, 175, 3, 2, 2, 2, 1083, 1084, 7, 133, 2, 2, 1084, 1085, 7, 17, 2, 2, 1085, 1086, 5, 124, 63, 2, 1086, 177, 3, 2, 2, 2, 1087, 1088, 7, 92, 2, 2, 1088, 1089, 6, 90, 15, 2, 1089, 1090, 5, 252, 127, 2, 1090, 1091, 5, 280, 141, 2, 1091, 179, 3, 2, 2, 2, 1092, 1093, 7, 95, 2, 2, 1093, 1099, 5, 126, 64, 2, 1094, 1096, 5, 182, 92, 2, 1095, 1097, 5, 186, 94, 2, 1096, 1095, 3, 2, 2, 2, 1096, 1097, 3, 2, 2, 2, 1097, 1100, 3, 2, 2, 2, 1098, 1100, 5, 186, 94, 2, 1099, 1094, 3, 2, 2, 2, 1099, 1098, 3, 2, 2, 2, 1100, 181, 3, 2, 2, 2, 1101, 1107, 7, 78, 2, 2, 1102, 1104, 7, 9, 2, 2, 1103, 1105, 5, 184, 93, 2, 1104, 1103, 3, 2, 2, 2, 1104, 1105, 3, 2, 2, 2, 1105, 1106, 3, 2, 2, 2, 1106, 1108, 7, 10, 2, 2, 1107, 1102, 3, 2, 2, 2, 1107, 1108, 3, 2, 2, 2, 1108, 1109, 3, 2, 2, 2, 1109, 1110, 5, 126, 64, 2, 1110, 183, 3, 2, 2, 2, 1111, 1115, 7, 133, 2, 2, 1112, 1115, 5, 232, 117, 2, 1113, 1115, 5, 238, 120, 2, 1114, 1111, 3, 2, 2, 2, 1114, 1112, 3, 2, 2, 2, 1114, 1113, 3, 2, 2, 2, 1115, 185, 3, 2, 2, 2, 1116, 1117, 7, 79, 2, 2, 1117, 1118, 5, 126, 64, 2, 1118, 187, 3, 2, 2, 2, 1119, 1120, 7, 86, 2, 2, 1120, 1121, 5, 280, 141, 2, 1121, 189, 3, 2, 2, 2, 1122, 1124, 7, 99, 2, 2, 1123, 1122, 3, 2, 2, 2, 1123, 1124, 3, 2, 2, 2, 1124, 1125, 3, 2, 2, 2, 1125, 1127, 7, 87, 2, 2, 1126, 1128, 7, 26, 2, 2, 1127, 1126, 3, 2, 2, 2, 1127, 1128, 3, 2, 2, 2, 1128, 1129, 3, 2, 2, 2, 1129, 1130, 7, 133, 2, 2, 1130, 1136, 5, 62, 32, 2, 1131, 1132, 7, 11, 2, 2, 1132, 1133, 5, 228, 115, 2, 1133, 1134, 7, 12, 2, 2, 1134, 1137, 3, 2, 2, 2, 1135, 1137, 7, 13, 2, 2, 1136, 1131, 3, 2, 2, 2, 1136, 1135, 3, 2, 2, 2, 1137, 191, 3, 2, 2, 2, 1138, 1140, 7, 130, 2, 2, 1139, 1138, 3, 2, 2, 2, 1139, 1140, 3, 2, 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 7, 100, 2, 2, 1142, 1144, 7, 133, 2, 2, 1143, 1145, 5, 6, 4, 2, 1144, 1143, 3, 2, 2, 2, 1144, 1145, 3, 2, 2, 2, 1145, 1146, 3, 2, 2, 2, 1146, 1147, 5, 194, 98, 2, 1147, 1148, 5, 196, 99, 2, 1148, 193, 3, 2, 2, 2, 1149, 1151, 5, 198, 100, 2, 1150, 1149, 3, 2, 2, 2, 1150, 1151, 3, 2, 2, 2, 1151, 1153, 3, 2, 2, 2, 1152, 1154, 5, 200, 101, 2, 1153, 1152, 3, 2, 2, 2, 1153, 1154, 3, 2, 2, 2, 1154, 195, 3, 2, 2, 2, 1155, 1159, 7, 11, 2, 2, 1156, 1158, 5, 202, 102, 2, 1157, 1156, 3, 2, 2, 2, 1158, 1161, 3, 2, 2, 2, 1159, 1157, 3, 2, 2, 2, 1159, 1160, 3, 2, 2, 2, 1160, 1162, 3, 2, 2, 2, 1161, 1159, 3, 2, 2, 2, 1162, 1163, 7, 12, 2, 2, 1163, 197, 3, 2, 2, 2, 1164, 1165, 7, 102, 2, 2, 1165, 1166, 5, 28, 15, 2, 1166, 199, 3, 2, 2, 2, 1167, 1168, 7, 108, 2, 2, 1168, 1169, 5, 94, 48, 2, 1169, 201, 3, 2, 2, 2, 1170, 1175, 5, 88, 45, 2, 1171, 1175, 5, 204, 103, 2, 1172, 1175, 5, 208, 105, 2, 1173, 1175, 5, 124, 63, 2, 1174, 1170, 3, 2, 2, 2, 1174, 1171, 3, 2, 2, 2, 1174, 1172, 3, 2, 2, 2, 1174, 1173, 3, 2, 2, 2, 1175, 203, 3, 2, 2, 2, 1176, 1178, 5, 206, 104, 2, 1177, 1179, 7, 26, 2, 2, 1178, 1177, 3, 2, 2, 2, 1178, 1179, 3, 2, 2, 2, 1179, 1181, 3, 2, 2, 2, 1180, 1182, 7, 33, 2, 2, 1181, 1180, 3, 2, 2, 2, 1181, 1182, 3, 2, 2, 2, 1182, 1183, 3, 2, 2, 2, 1183, 1185, 5, 246, 124, 2, 1184, 1186, 5, 60, 31, 2, 1185, 1184, 3, 2, 2, 2, 1185, 1186, 3, 2, 2, 2, 1186, 1188, 3, 2, 2, 2, 1187, 1189, 5, 2, 2, 2, 1188, 1187, 3, 2, 2, 2, 1188, 1189, 3, 2, 2, 2, 1189, 1190, 3, 2, 2, 2, 1190, 1191, 7, 13, 2, 2, 1191, 1221, 3, 2, 2, 2, 1192, 1194, 5, 206, 104, 2, 1193, 1195, 7, 26, 2, 2, 1194, 1193, 3, 2, 2, 2, 1194, 1195, 3, 2, 2, 2, 1195, 1197, 3, 2, 2, 2, 1196, 1198, 7, 33, 2, 2, 1197, 1196, 3, 2, 2, 2, 1197, 1198, 3, 2, 2, 2, 1198, 1199, 3, 2, 2, 2, 1199, 1200, 5, 246, 124, 2, 1200, 1206, 5, 62, 32, 2, 1201, 1202, 7, 11, 2, 2, 1202, 1203, 5, 228, 115, 2, 1203, 1204, 7, 12, 2, 2, 1204, 1207, 3, 2, 2, 2, 1205, 1207, 7, 13, 2, 2, 1206, 1201, 3, 2, 2, 2, 1206, 1205, 3, 2, 2, 2, 1207, 1221, 3, 2, 2, 2, 1208, 1210, 5, 206, 104, 2, 1209, 1211, 7, 26, 2, 2, 1210, 1209, 3, 2, 2, 2, 1210, 1211, 3, 2, 2, 2, 1211, 1213, 3, 2, 2, 2, 1212, 1214, 7, 33, 2, 2, 1213, 1212, 3, 2, 2, 2, 1213, 1214, 3, 2, 2, 2, 1214, 1217, 3, 2, 2, 2, 1215, 1218, 5, 242, 122, 2, 1216, 1218, 5, 244, 123, 2, 1217, 1215, 3, 2, 2, 2, 1217, 1216, 3, 2, 2, 2, 1218, 1221, 3, 2, 2, 2, 1219, 1221, 5, 130, 66, 2, 1220, 1176, 3, 2, 2, 2, 1220, 1192, 3, 2, 2, 2, 1220, 1208, 3, 2, 2, 2, 1220, 1219, 3, 2, 2, 2, 1221, 205, 3, 2, 2, 2, 1222, 1224, 7, 99, 2, 2, 1223, 1222, 3, 2, 2, 2, 1223, 1224, 3, 2, 2, 2, 1224, 1226, 3, 2, 2, 2, 1225, 1227, 5, 70, 36, 2, 1226, 1225, 3, 2, 2, 2, 1226, 1227, 3, 2, 2, 2, 1227, 1229, 3, 2, 2, 2, 1228, 1230, 7, 115, 2, 2, 1229, 1228, 3, 2, 2, 2, 1229, 1230, 3, 2, 2, 2, 1230, 1232, 3, 2, 2, 2, 1231, 1233, 7, 98, 2, 2, 1232, 1231, 3, 2, 2, 2, 1232, 1233, 3, 2, 2, 2, 1233, 207, 3, 2, 2, 2, 1234, 1235, 5, 82, 42, 2, 1235, 1236, 7, 13, 2, 2, 1236, 209, 3, 2, 2, 2, 1237, 1239, 7, 26, 2, 2, 1238, 1237, 3, 2, 2, 2, 1238, 1239, 3, 2, 2, 2, 1239, 1240, 3, 2, 2, 2, 1240, 1241, 7, 133, 2, 2, 1241, 1243, 7, 9, 2, 2, 1242, 1244, 5, 222, 112, 2, 1243, 1242, 3, 2, 2, 2, 1243, 1244, 3, 2, 2, 2, 1244, 1245, 3, 2, 2, 2, 1245, 1246, 7, 10, 2, 2, 1246, 1247, 7, 11, 2, 2, 1247, 1248, 5, 228, 115, 2, 1248, 1249, 7, 12, 2, 2, 1249, 211, 3, 2, 2, 2, 1250, 1251, 7, 87, 2, 2, 1251, 1253, 7, 26, 2, 2, 1252, 1254, 7, 133, 2, 2, 1253, 1252, 3, 2, 2, 2, 1253, 1254, 3, 2, 2, 2, 1254, 1255, 3, 2, 2, 2, 1255, 1257, 7, 9, 2, 2, 1256, 1258, 5, 222, 112, 2, 1257, 1256, 3, 2, 2, 2, 1257, 1258, 3, 2, 2, 2, 1258, 1259, 3, 2, 2, 2, 1259, 1260, 7, 10, 2, 2, 1260, 1261, 7, 11, 2, 2, 1261, 1262, 5, 228, 115, 2, 1262, 1263, 7, 12, 2, 2, 1263, 213, 3, 2, 2, 2, 1264, 1265, 7, 11, 2, 2, 1265, 1270, 5, 216, 109, 2, 1266, 1267, 7, 14, 2, 2, 1267, 1269, 5, 216, 109, 2, 1268, 1266, 3, 2, 2, 2, 1269, 1272, 3, 2, 2, 2, 1270, 1268, 3, 2, 2, 2, 1270, 1271, 3, 2, 2, 2, 1271, 1274, 3, 2, 2, 2, 1272, 1270, 3, 2, 2, 2, 1273, 1275, 7, 14, 2, 2, 1274, 1273, 3, 2, 2, 2, 1274, 1275, 3, 2, 2, 2, 1275, 1276, 3, 2, 2, 2, 1276, 1277, 7, 12, 2, 2, 1277, 215, 3, 2, 2, 2, 1278, 1279, 7, 26, 2, 2, 1279, 1280, 5, 220, 111, 2, 1280, 217, 3, 2, 2, 2, 1281, 1282, 7, 11, 2, 2, 1282, 1287, 5, 220, 111, 2, 1283, 1284, 7, 14, 2, 2, 1284, 1286, 5, 220, 111, 2, 1285, 1283, 3, 2, 2, 2, 1286, 1289, 3, 2, 2, 2, 1287, 1285, 3, 2, 2, 2, 1287, 1288, 3, 2, 2, 2, 1288, 1291, 3, 2, 2, 2, 1289, 1287, 3, 2, 2, 2, 1290, 1292, 7, 14, 2, 2, 1291, 1290, 3, 2, 2, 2, 1291, 1292, 3, 2, 2, 2, 1292, 1293, 3, 2, 2, 2, 1293, 1294, 7, 12, 2, 2, 1294, 219, 3, 2, 2, 2, 1295, 1296, 7, 7, 2, 2, 1296, 1297, 5, 256, 129, 2, 1297, 1298, 7, 8, 2, 2, 1298, 1300, 7, 9, 2, 2, 1299, 1301, 5, 222, 112, 2, 1300, 1299, 3, 2, 2, 2, 1300, 1301, 3, 2, 2, 2, 1301, 1302, 3, 2, 2, 2, 1302, 1303, 7, 10, 2, 2, 1303, 1304, 7, 11, 2, 2, 1304, 1305, 5, 228, 115, 2, 1305, 1306, 7, 12, 2, 2, 1306, 221, 3, 2, 2, 2, 1307, 1312, 5, 224, 113, 2, 1308, 1309, 7, 14, 2, 2, 1309, 1311, 5, 224, 113, 2, 1310, 1308, 3, 2, 2, 2, 1311, 1314, 3, 2, 2, 2, 1312, 1310, 3, 2, 2, 2, 1312, 1313, 3, 2, 2, 2, 1313, 1317, 3, 2, 2, 2, 1314, 1312, 3, 2, 2, 2, 1315, 1316, 7, 14, 2, 2, 1316, 1318, 5, 226, 114, 2, 1317, 1315, 3, 2, 2, 2, 1317, 1318, 3, 2, 2, 2, 1318, 1327, 3, 2, 2, 2, 1319, 1327, 5, 226, 114, 2, 1320, 1327, 5, 232, 117, 2, 1321, 1324, 5, 238, 120, 2, 1322, 1323, 7, 17, 2, 2, 1323, 1325, 5, 222, 112, 2, 1324, 1322, 3, 2, 2, 2, 1324, 1325, 3, 2, 2, 2, 1325, 1327, 3, 2, 2, 2, 1326, 1307, 3, 2, 2, 2, 1326, 1319, 3, 2, 2, 2, 1326, 1320, 3, 2, 2, 2, 1326, 1321, 3, 2, 2, 2, 1327, 223, 3, 2, 2, 2, 1328, 1330, 5, 70, 36, 2, 1329, 1328, 3, 2, 2, 2, 1329, 1330, 3, 2, 2, 2, 1330, 1331, 3, 2, 2, 2, 1331, 1333, 7, 133, 2, 2, 1332, 1334, 5, 60, 31, 2, 1333, 1332, 3, 2, 2, 2, 1333, 1334, 3, 2, 2, 2, 1334, 1337, 3, 2, 2, 2, 1335, 1336, 7, 15, 2, 2, 1336, 1338, 5, 256, 129, 2, 1337, 1335, 3, 2, 2, 2, 1337, 1338, 3, 2, 2, 2, 1338, 225, 3, 2, 2, 2, 1339, 1340, 7, 18, 2, 2, 1340, 1341, 7, 133, 2, 2, 1341, 227, 3, 2, 2, 2, 1342, 1344, 5, 230, 116, 2, 1343, 1342, 3, 2, 2, 2, 1343, 1344, 3, 2, 2, 2, 1344, 229, 3, 2, 2, 2, 1345, 1347, 5, 122, 62, 2, 1346, 1345, 3, 2, 2, 2, 1347, 1348, 3, 2, 2, 2, 1348, 1346, 3, 2, 2, 2, 1348, 1349, 3, 2, 2, 2, 1349, 231, 3, 2, 2, 2, 1350, 1352, 7, 7, 2, 2, 1351, 1353, 5, 234, 118, 2, 1352, 1351, 3, 2, 2, 2, 1352, 1353, 3, 2, 2, 2, 1353, 1354, 3, 2, 2, 2, 1354, 1355, 7, 8, 2, 2, 1355, 233, 3, 2, 2, 2, 1356, 1365, 5, 256, 129, 2, 1357, 1359, 7, 14, 2, 2, 1358, 1357, 3, 2, 2, 2, 1359, 1360, 3, 2, 2, 2, 1360, 1358, 3, 2, 2, 2, 1360, 1361, 3, 2, 2, 2, 1361, 1362, 3, 2, 2, 2, 1362, 1364, 5, 256, 129, 2, 1363, 1358, 3, 2, 2, 2, 1364, 1367, 3, 2, 2, 2, 1365, 1363, 3, 2, 2, 2, 1365, 1366, 3, 2, 2, 2, 1366, 1374, 3, 2, 2, 2, 1367, 1365, 3, 2, 2, 2, 1368, 1370, 7, 14, 2, 2, 1369, 1368, 3, 2, 2, 2, 1370, 1371, 3, 2, 2, 2, 1371, 1369, 3, 2, 2, 2, 1371, 1372, 3, 2, 2, 2, 1372, 1373, 3, 2, 2, 2, 1373, 1375, 5, 236, 119, 2, 1374, 1369, 3, 2, 2, 2, 1374, 1375, 3, 2, 2, 2, 1375, 1378, 3, 2, 2, 2, 1376, 1378, 5, 236, 119, 2, 1377, 1356, 3, 2, 2, 2, 1377, 1376, 3, 2, 2, 2, 1378, 235, 3, 2, 2, 2, 1379, 1382, 7, 18, 2, 2, 1380, 1383, 7, 133, 2, 2, 1381, 1383, 5, 256, 129, 2, 1382, 1380, 3, 2, 2, 2, 1382, 1381, 3, 2, 2, 2, 1383, 237, 3, 2, 2, 2, 1384, 1393, 7, 11, 2, 2, 1385, 1390, 5, 240, 121, 2, 1386, 1387, 7, 14, 2, 2, 1387, 1389, 5, 240, 121, 2, 1388, 1386, 3, 2, 2, 2, 1389, 1392, 3, 2, 2, 2, 1390, 1388, 3, 2, 2, 2, 1390, 1391, 3, 2, 2, 2, 1391, 1394, 3, 2, 2, 2, 1392, 1390, 3, 2, 2, 2, 1393, 1385, 3, 2, 2, 2, 1393, 1394, 3, 2, 2, 2, 1394, 1396, 3, 2, 2, 2, 1395, 1397, 7, 14, 2, 2, 1396, 1395, 3, 2, 2, 2, 1396, 1397, 3, 2, 2, 2, 1397, 1398, 3, 2, 2, 2, 1398, 1399, 7, 12, 2, 2, 1399, 239, 3, 2, 2, 2, 1400, 1401, 5, 246, 124, 2, 1401, 1402, 9, 7, 2, 2, 1402, 1403, 5, 256, 129, 2, 1403, 1432, 3, 2, 2, 2, 1404, 1405, 7, 7, 2, 2, 1405, 1406, 5, 256, 129, 2, 1406, 1407, 7, 8, 2, 2, 1407, 1408, 7, 17, 2, 2, 1408, 1409, 5, 256, 129, 2, 1409, 1432, 3, 2, 2, 2, 1410, 1412, 7, 99, 2, 2, 1411, 1410, 3, 2, 2, 2, 1411, 1412, 3, 2, 2, 2, 1412, 1414, 3, 2, 2, 2, 1413, 1415, 7, 26, 2, 2, 1414, 1413, 3, 2, 2, 2, 1414, 1415, 3, 2, 2, 2, 1415, 1416, 3, 2, 2, 2, 1416, 1417, 5, 246, 124, 2, 1417, 1419, 7, 9, 2, 2, 1418, 1420, 5, 222, 112, 2, 1419, 1418, 3, 2, 2, 2, 1419, 1420, 3, 2, 2, 2, 1420, 1421, 3, 2, 2, 2, 1421, 1422, 7, 10, 2, 2, 1422, 1423, 7, 11, 2, 2, 1423, 1424, 5, 228, 115, 2, 1424, 1425, 7, 12, 2, 2, 1425, 1432, 3, 2, 2, 2, 1426, 1432, 5, 242, 122, 2, 1427, 1432, 5, 244, 123, 2, 1428, 1432, 5, 210, 106, 2, 1429, 1432, 7, 133, 2, 2, 1430, 1432, 5, 78, 40, 2, 1431, 1400, 3, 2, 2, 2, 1431, 1404, 3, 2, 2, 2, 1431, 1411, 3, 2, 2, 2, 1431, 1426, 3, 2, 2, 2, 1431, 1427, 3, 2, 2, 2, 1431, 1428, 3, 2, 2, 2, 1431, 1429, 3, 2, 2, 2, 1431, 1430, 3, 2, 2, 2, 1432, 241, 3, 2, 2, 2, 1433, 1434, 5, 276, 139, 2, 1434, 1435, 7, 9, 2, 2, 1435, 1437, 7, 10, 2, 2, 1436, 1438, 5, 60, 31, 2, 1437, 1436, 3, 2, 2, 2, 1437, 1438, 3, 2, 2, 2, 1438, 1439, 3, 2, 2, 2, 1439, 1440, 7, 11, 2, 2, 1440, 1441, 5, 228, 115, 2, 1441, 1442, 7, 12, 2, 2, 1442, 243, 3, 2, 2, 2, 1443, 1444, 5, 278, 140, 2, 1444, 1447, 7, 9, 2, 2, 1445, 1448, 7, 133, 2, 2, 1446, 1448, 5, 4, 3, 2, 1447, 1445, 3, 2, 2, 2, 1447, 1446, 3, 2, 2, 2, 1448, 1450, 3, 2, 2, 2, 1449, 1451, 5, 60, 31, 2, 1450, 1449, 3, 2, 2, 2, 1450, 1451, 3, 2, 2, 2, 1451, 1452, 3, 2, 2, 2, 1452, 1453, 7, 10, 2, 2, 1453, 1454, 7, 11, 2, 2, 1454, 1455, 5, 228, 115, 2, 1455, 1456, 7, 12, 2, 2, 1456, 245, 3, 2, 2, 2, 1457, 1465, 5, 270, 136, 2, 1458, 1465, 7, 134, 2, 2, 1459, 1465, 5, 268, 135, 2, 1460, 1461, 7, 7, 2, 2, 1461, 1462, 5, 256, 129, 2, 1462, 1463, 7, 8, 2, 2, 1463, 1465, 3, 2, 2, 2, 1464, 1457, 3, 2, 2, 2, 1464, 1458, 3, 2, 2, 2, 1464, 1459, 3, 2, 2, 2, 1464, 1460, 3, 2, 2, 2, 1465, 247, 3, 2, 2, 2, 1466, 1480, 7, 9, 2, 2, 1467, 1472, 5, 256, 129, 2, 1468, 1469, 7, 14, 2, 2, 1469, 1471, 5, 256, 129, 2, 1470, 1468, 3, 2, 2, 2, 1471, 1474, 3, 2, 2, 2, 1472, 1470, 3, 2, 2, 2, 1472, 1473, 3, 2, 2, 2, 1473, 1477, 3, 2, 2, 2, 1474, 1472, 3, 2, 2, 2, 1475, 1476, 7, 14, 2, 2, 1476, 1478, 5, 250, 126, 2, 1477, 1475, 3, 2, 2, 2, 1477, 1478, 3, 2, 2, 2, 1478, 1481, 3, 2, 2, 2, 1479, 1481, 5, 250, 126, 2, 1480, 1467, 3, 2, 2, 2, 1480, 1479, 3, 2, 2, 2, 1480, 1481, 3, 2, 2, 2, 1481, 1482, 3, 2, 2, 2, 1482, 1483, 7, 10, 2, 2, 1483, 249, 3, 2, 2, 2, 1484, 1485, 7, 18, 2, 2, 1485, 1486, 7, 133, 2, 2, 1486, 251, 3, 2, 2, 2, 1487, 1492, 5, 256, 129, 2, 1488, 1489, 7, 14, 2, 2, 1489, 1491, 5, 256, 129, 2, 1490, 1488, 3, 2, 2, 2, 1491, 1494, 3, 2, 2, 2, 1492, 1490, 3, 2, 2, 2, 1492, 1493, 3, 2, 2, 2, 1493, 1496, 3, 2, 2, 2, 1494, 1492, 3, 2, 2, 2, 1495, 1497, 7, 14, 2, 2, 1496, 1495, 3, 2, 2, 2, 1496, 1497, 3, 2, 2, 2, 1497, 253, 3, 2, 2, 2, 1498, 1500, 7, 99, 2, 2, 1499, 1498, 3, 2, 2, 2, 1499, 1500, 3, 2, 2, 2, 1500, 1501, 3, 2, 2, 2, 1501, 1503, 7, 87, 2, 2, 1502, 1504, 7, 133, 2, 2, 1503, 1502, 3, 2, 2, 2, 1503, 1504, 3, 2, 2, 2, 1504, 1505, 3, 2, 2, 2, 1505, 1507, 7, 9, 2, 2, 1506, 1508, 5, 222, 112, 2, 1507, 1506, 3, 2, 2, 2, 1507, 1508, 3, 2, 2, 2, 1508, 1509, 3, 2, 2, 2, 1509, 1511, 7, 10, 2, 2, 1510, 1512, 5, 60, 31, 2, 1511, 1510, 3, 2, 2, 2, 1511, 1512, 3, 2, 2, 2, 1512, 1513, 3, 2, 2, 2, 1513, 1514, 7, 11, 2, 2, 1514, 1515, 5, 228, 115, 2, 1515, 1516, 7, 12, 2, 2, 1516, 255, 3, 2, 2, 2, 1517, 1518, 8, 129, 1, 2, 1518, 1575, 5, 254, 128, 2, 1519, 1575, 5, 258, 130, 2, 1520, 1522, 7, 100, 2, 2, 1521, 1523, 7, 133, 2, 2, 1522, 1521, 3, 2, 2, 2, 1522, 1523, 3, 2, 2, 2, 1523, 1524, 3, 2, 2, 2, 1524, 1575, 5, 196, 99, 2, 1525, 1526, 7, 76, 2, 2, 1526, 1528, 5, 256, 129, 2, 1527, 1529, 5, 14, 8, 2, 1528, 1527, 3, 2, 2, 2, 1528, 1529, 3, 2, 2, 2, 1529, 1531, 3, 2, 2, 2, 1530, 1532, 5, 248, 125, 2, 1531, 1530, 3, 2, 2, 2, 1531, 1532, 3, 2, 2, 2, 1532, 1575, 3, 2, 2, 2, 1533, 1534, 7, 93, 2, 2, 1534, 1575, 5, 256, 129, 42, 1535, 1536, 7, 81, 2, 2, 1536, 1575, 5, 256, 129, 41, 1537, 1538, 7, 73, 2, 2, 1538, 1575, 5, 256, 129, 40, 1539, 1540, 7, 20, 2, 2, 1540, 1575, 5, 256, 129, 39, 1541, 1542, 7, 21, 2, 2, 1542, 1575, 5, 256, 129, 38, 1543, 1544, 7, 22, 2, 2, 1544, 1575, 5, 256, 129, 37, 1545, 1546, 7, 23, 2, 2, 1546, 1575, 5, 256, 129, 36, 1547, 1548, 7, 24, 2, 2, 1548, 1575, 5, 256, 129, 35, 1549, 1550, 7, 25, 2, 2, 1550, 1575, 5, 256, 129, 34, 1551, 1552, 7, 107, 2, 2, 1552, 1575, 5, 256, 129, 33, 1553, 1575, 5, 218, 110, 2, 1554, 1575, 5, 214, 108, 2, 1555, 1575, 5, 212, 107, 2, 1556, 1575, 5, 162, 82, 2, 1557, 1575, 7, 88, 2, 2, 1558, 1560, 5, 270, 136, 2, 1559, 1561, 5, 256, 129, 2, 1560, 1559, 3, 2, 2, 2, 1560, 1561, 3, 2, 2, 2, 1561, 1575, 3, 2, 2, 2, 1562, 1575, 7, 103, 2, 2, 1563, 1575, 5, 266, 134, 2, 1564, 1575, 5, 232, 117, 2, 1565, 1575, 5, 238, 120, 2, 1566, 1567, 7, 9, 2, 2, 1567, 1568, 5, 252, 127, 2, 1568, 1569, 7, 10, 2, 2, 1569, 1575, 3, 2, 2, 2, 1570, 1572, 5, 14, 8, 2, 1571, 1573, 5, 252, 127, 2, 1572, 1571, 3, 2, 2, 2, 1572, 1573, 3, 2, 2, 2, 1573, 1575, 3, 2, 2, 2, 1574, 1517, 3, 2, 2, 2, 1574, 1519, 3, 2, 2, 2, 1574, 1520, 3, 2, 2, 2, 1574, 1525, 3, 2, 2, 2, 1574, 1533, 3, 2, 2, 2, 1574, 1535, 3, 2, 2, 2, 1574, 1537, 3, 2, 2, 2, 1574, 1539, 3, 2, 2, 2, 1574, 1541, 3, 2, 2, 2, 1574, 1543, 3, 2, 2, 2, 1574, 1545, 3, 2, 2, 2, 1574, 1547, 3, 2, 2, 2, 1574, 1549, 3, 2, 2, 2, 1574, 1551, 3, 2, 2, 2, 1574, 1553, 3, 2, 2, 2, 1574, 1554, 3, 2, 2, 2, 1574, 1555, 3, 2, 2, 2, 1574, 1556, 3, 2, 2, 2, 1574, 1557, 3, 2, 2, 2, 1574, 1558, 3, 2, 2, 2, 1574, 1562, 3, 2, 2, 2, 1574, 1563, 3, 2, 2, 2, 1574, 1564, 3, 2, 2, 2, 1574, 1565, 3, 2, 2, 2, 1574, 1566, 3, 2, 2, 2, 1574, 1570, 3, 2, 2, 2, 1575, 1657, 3, 2, 2, 2, 1576, 1577, 12, 32, 2, 2, 1577, 1578, 7, 31, 2, 2, 1578, 1656, 5, 256, 129, 32, 1579, 1580, 12, 31, 2, 2, 1580, 1581, 9, 8, 2, 2, 1581, 1656, 5, 256, 129, 32, 1582, 1583, 12, 30, 2, 2, 1583, 1584, 9, 9, 2, 2, 1584, 1656, 5, 256, 129, 31, 1585, 1586, 12, 29, 2, 2, 1586, 1587, 9, 10, 2, 2, 1587, 1656, 5, 256, 129, 30, 1588, 1589, 12, 28, 2, 2, 1589, 1590, 9, 11, 2, 2, 1590, 1656, 5, 256, 129, 29, 1591, 1592, 12, 27, 2, 2, 1592, 1593, 7, 72, 2, 2, 1593, 1656, 5, 256, 129, 28, 1594, 1595, 12, 26, 2, 2, 1595, 1596, 7, 94, 2, 2, 1596, 1656, 5, 256, 129, 27, 1597, 1598, 12, 25, 2, 2, 1598, 1599, 9, 12, 2, 2, 1599, 1656, 5, 256, 129, 26, 1600, 1601, 12, 24, 2, 2, 1601, 1602, 7, 45, 2, 2, 1602, 1656, 5, 256, 129, 25, 1603, 1604, 12, 23, 2, 2, 1604, 1605, 7, 46, 2, 2, 1605, 1656, 5, 256, 129, 24, 1606, 1607, 12, 22, 2, 2, 1607, 1608, 7, 47, 2, 2, 1608, 1656, 5, 256, 129, 23, 1609, 1610, 12, 21, 2, 2, 1610, 1611, 7, 48, 2, 2, 1611, 1656, 5, 256, 129, 22, 1612, 1613, 12, 20, 2, 2, 1613, 1614, 7, 49, 2, 2, 1614, 1656, 5, 256, 129, 21, 1615, 1616, 12, 19, 2, 2, 1616, 1617, 7, 16, 2, 2, 1617, 1618, 5, 256, 129, 2, 1618, 1619, 7, 17, 2, 2, 1619, 1620, 5, 256, 129, 20, 1620, 1656, 3, 2, 2, 2, 1621, 1622, 12, 18, 2, 2, 1622, 1623, 7, 32, 2, 2, 1623, 1656, 5, 256, 129, 19, 1624, 1625, 12, 17, 2, 2, 1625, 1626, 7, 15, 2, 2, 1626, 1656, 5, 256, 129, 17, 1627, 1628, 12, 16, 2, 2, 1628, 1629, 5, 264, 133, 2, 1629, 1630, 5, 256, 129, 16, 1630, 1656, 3, 2, 2, 2, 1631, 1632, 12, 48, 2, 2, 1632, 1633, 7, 7, 2, 2, 1633, 1634, 5, 252, 127, 2, 1634, 1635, 7, 8, 2, 2, 1635, 1656, 3, 2, 2, 2, 1636, 1638, 12, 47, 2, 2, 1637, 1639, 7, 16, 2, 2, 1638, 1637, 3, 2, 2, 2, 1638, 1639, 3, 2, 2, 2, 1639, 1640, 3, 2, 2, 2, 1640, 1642, 7, 19, 2, 2, 1641, 1643, 7, 33, 2, 2, 1642, 1641, 3, 2, 2, 2, 1642, 1643, 3, 2, 2, 2, 1643, 1644, 3, 2, 2, 2, 1644, 1656, 5, 270, 136, 2, 1645, 1646, 12, 46, 2, 2, 1646, 1656, 5, 248, 125, 2, 1647, 1648, 12, 44, 2, 2, 1648, 1649, 6, 129, 37, 2, 1649, 1656, 7, 20, 2, 2, 1650, 1651, 12, 43, 2, 2, 1651, 1652, 6, 129, 39, 2, 1652, 1656, 7, 21, 2, 2, 1653, 1654, 12, 15, 2, 2, 1654, 1656, 7, 135, 2, 2, 1655, 1576, 3, 2, 2, 2, 1655, 1579, 3, 2, 2, 2, 1655, 1582, 3, 2, 2, 2, 1655, 1585, 3, 2, 2, 2, 1655, 1588, 3, 2, 2, 2, 1655, 1591, 3, 2, 2, 2, 1655, 1594, 3, 2, 2, 2, 1655, 1597, 3, 2, 2, 2, 1655, 1600, 3, 2, 2, 2, 1655, 1603, 3, 2, 2, 2, 1655, 1606, 3, 2, 2, 2, 1655, 1609, 3, 2, 2, 2, 1655, 1612, 3, 2, 2, 2, 1655, 1615, 3, 2, 2, 2, 1655, 1621, 3, 2, 2, 2, 1655, 1624, 3, 2, 2, 2, 1655, 1627, 3, 2, 2, 2, 1655, 1631, 3, 2, 2, 2, 1655, 1636, 3, 2, 2, 2, 1655, 1645, 3, 2, 2, 2, 1655, 1647, 3, 2, 2, 2, 1655, 1650, 3, 2, 2, 2, 1655, 1653, 3, 2, 2, 2, 1656, 1659, 3, 2, 2, 2, 1657, 1655, 3, 2, 2, 2, 1657, 1658, 3, 2, 2, 2, 1658, 257, 3, 2, 2, 2, 1659, 1657, 3, 2, 2, 2, 1660, 1662, 7, 99, 2, 2, 1661, 1660, 3, 2, 2, 2, 1661, 1662, 3, 2, 2, 2, 1662, 1663, 3, 2, 2, 2, 1663, 1665, 5, 260, 131, 2, 1664, 1666, 5, 60, 31, 2, 1665, 1664, 3, 2, 2, 2, 1665, 1666, 3, 2, 2, 2, 1666, 1667, 3, 2, 2, 2, 1667, 1668, 7, 61, 2, 2, 1668, 1669, 5, 262, 132, 2, 1669, 259, 3, 2, 2, 2, 1670, 1677, 7, 133, 2, 2, 1671, 1673, 7, 9, 2, 2, 1672, 1674, 5, 222, 112, 2, 1673, 1672, 3, 2, 2, 2, 1673, 1674, 3, 2, 2, 2, 1674, 1675, 3, 2, 2, 2, 1675, 1677, 7, 10, 2, 2, 1676, 1670, 3, 2, 2, 2, 1676, 1671, 3, 2, 2, 2, 1677, 261, 3, 2, 2, 2, 1678, 1684, 5, 256, 129, 2, 1679, 1680, 7, 11, 2, 2, 1680, 1681, 5, 228, 115, 2, 1681, 1682, 7, 12, 2, 2, 1682, 1684, 3, 2, 2, 2, 1683, 1678, 3, 2, 2, 2, 1683, 1679, 3, 2, 2, 2, 1684, 263, 3, 2, 2, 2, 1685, 1686, 9, 13, 2, 2, 1686, 265, 3, 2, 2, 2, 1687, 1694, 7, 63, 2, 2, 1688, 1694, 7, 64, 2, 2, 1689, 1694, 7, 134, 2, 2, 1690, 1694, 7, 135, 2, 2, 1691, 1694, 7, 6, 2, 2, 1692, 1694, 5, 268, 135, 2, 1693, 1687, 3, 2, 2, 2, 1693, 1688, 3, 2, 2, 2, 1693, 1689, 3, 2, 2, 2, 1693, 1690, 3, 2, 2, 2, 1693, 1691, 3, 2, 2, 2, 1693, 1692, 3, 2, 2, 2, 1694, 267, 3, 2, 2, 2, 1695, 1696, 9, 14, 2, 2, 1696, 269, 3, 2, 2, 2, 1697, 1700, 7, 133, 2, 2, 1698, 1700, 5, 272, 137, 2, 1699, 1697, 3, 2, 2, 2, 1699, 1698, 3, 2, 2, 2, 1700, 271, 3, 2, 2, 2, 1701, 1705, 5, 274, 138, 2, 1702, 1705, 7, 63, 2, 2, 1703, 1705, 7, 64, 2, 2, 1704, 1701, 3, 2, 2, 2, 1704, 1702, 3, 2, 2, 2, 1704, 1703, 3, 2, 2, 2, 1705, 273, 3, 2, 2, 2, 1706, 1707, 9, 15, 2, 2, 1707, 275, 3, 2, 2, 2, 1708, 1709, 7, 133, 2, 2, 1709, 1710, 6, 139, 41, 2, 1710, 1711, 5, 246, 124, 2, 1711, 277, 3, 2, 2, 2, 1712, 1713, 7, 133, 2, 2, 1713, 1714, 6, 140, 42, 2, 1714, 1715, 5, 246, 124, 2, 1715, 279, 3, 2, 2, 2, 1716, 1721, 7, 13, 2, 2, 1717, 1721, 7, 2, 2, 3, 1718, 1721, 6, 141, 43, 2, 1719, 1721, 6, 141, 44, 2, 1720, 1716, 3, 2, 2, 2, 1720, 1717, 3, 2, 2, 2, 1720, 1718, 3, 2, 2, 2, 1720, 1719, 3, 2, 2, 2, 1721, 281, 3, 2, 2, 2, 220, 287, 291, 300, 305, 308, 315, 324, 334, 345, 347, 368, 376, 384, 399, 403, 407, 413, 420, 430, 432, 448, 452, 456, 464, 468, 483, 487, 490, 494, 497, 501, 507, 511, 515, 523, 529, 536, 539, 541, 543, 550, 554, 557, 561, 567, 574, 578, 581, 586, 589, 592, 598, 602, 606, 610, 621, 628, 635, 640, 648, 651, 656, 659, 663, 673, 677, 683, 689, 696, 702, 708, 716, 721, 736, 743, 748, 756, 763, 770, 775, 808, 812, 819, 825, 833, 842, 846, 854, 862, 869, 873, 877, 881, 884, 887, 890, 894, 896, 903, 908, 911, 915, 918, 925, 934, 953, 957, 961, 971, 975, 982, 989, 997, 1005, 1011, 1018, 1025, 1032, 1039, 1057, 1061, 1063, 1070, 1076, 1081, 1096, 1099, 1104, 1107, 1114, 1123, 1127, 1136, 1139, 1144, 1150, 1153, 1159, 1174, 1178, 1181, 1185, 1188, 1194, 1197, 1206, 1210, 1213, 1217, 1220, 1223, 1226, 1229, 1232, 1238, 1243, 1253, 1257, 1270, 1274, 1287, 1291, 1300, 1312, 1317, 1324, 1326, 1329, 1333, 1337, 1343, 1348, 1352, 1360, 1365, 1371, 1374, 1377, 1382, 1390, 1393, 1396, 1411, 1414, 1419, 1431, 1437, 1447, 1450, 1464, 1472, 1477, 1480, 1492, 1496, 1499, 1503, 1507, 1511, 1522, 1528, 1531, 1560, 1572, 1574, 1638, 1642, 1655, 1657, 1661, 1665, 1673, 1676, 1683, 1693, 1699, 1704, 1720] \ No newline at end of file diff --git a/languages/ts/TypeScriptParser.tokens b/languages/ts/TypeScriptParser.tokens new file mode 100644 index 0000000000000000000000000000000000000000..64e7e7ca3af11c442acdcce28ca3070682075e69 --- /dev/null +++ b/languages/ts/TypeScriptParser.tokens @@ -0,0 +1,258 @@ +HashBangLine=1 +MultiLineComment=2 +SingleLineComment=3 +RegularExpressionLiteral=4 +OpenBracket=5 +CloseBracket=6 +OpenParen=7 +CloseParen=8 +OpenBrace=9 +CloseBrace=10 +SemiColon=11 +Comma=12 +Assign=13 +QuestionMark=14 +Colon=15 +Ellipsis=16 +Dot=17 +PlusPlus=18 +MinusMinus=19 +Plus=20 +Minus=21 +BitNot=22 +Not=23 +Multiply=24 +Lodash=25 +Dollar=26 +Divide=27 +Modulus=28 +Power=29 +NullCoalesce=30 +Hashtag=31 +RightShiftArithmetic=32 +LeftShiftArithmetic=33 +RightShiftLogical=34 +LessThan=35 +MoreThan=36 +LessThanEquals=37 +GreaterThanEquals=38 +Equals_=39 +NotEquals=40 +IdentityEquals=41 +IdentityNotEquals=42 +BitAnd=43 +BitXOr=44 +BitOr=45 +And=46 +Or=47 +MultiplyAssign=48 +DivideAssign=49 +ModulusAssign=50 +PlusAssign=51 +MinusAssign=52 +LeftShiftArithmeticAssign=53 +RightShiftArithmeticAssign=54 +RightShiftLogicalAssign=55 +BitAndAssign=56 +BitXorAssign=57 +BitOrAssign=58 +ARROW=59 +PowerAssign=60 +NullLiteral=61 +BooleanLiteral=62 +DecimalLiteral=63 +HexIntegerLiteral=64 +OctalIntegerLiteral=65 +OctalIntegerLiteral2=66 +BinaryIntegerLiteral=67 +Break=68 +Do=69 +Instanceof=70 +Typeof=71 +Case=72 +Else=73 +New=74 +Var=75 +Catch=76 +Finally=77 +Return=78 +Void=79 +Continue=80 +For=81 +Switch=82 +While=83 +Debugger=84 +Function=85 +This=86 +With=87 +Default=88 +If=89 +Throw=90 +Delete=91 +In=92 +Try=93 +As=94 +From=95 +ReadOnly=96 +Async=97 +Class=98 +Enum=99 +Extends=100 +Super=101 +Const=102 +Export=103 +Import=104 +Await=105 +Implements=106 +Let=107 +Private=108 +Public=109 +Interface=110 +Package=111 +Protected=112 +Static=113 +Yield=114 +ANY=115 +NUMBER=116 +BOOLEAN=117 +STRING=118 +SYMBOL=119 +Type=120 +Get=121 +Set=122 +Constructor=123 +Namespace=124 +Require=125 +Module=126 +Declare=127 +Abstract=128 +Is=129 +At=130 +Identifier=131 +StringLiteral=132 +TemplateStringLiteral=133 +WhiteSpaces=134 +LineTerminator=135 +HtmlComment=136 +CDataComment=137 +UnexpectedCharacter=138 +'['=5 +']'=6 +'('=7 +')'=8 +'{'=9 +'}'=10 +';'=11 +','=12 +'='=13 +'?'=14 +':'=15 +'...'=16 +'.'=17 +'++'=18 +'--'=19 +'+'=20 +'-'=21 +'~'=22 +'!'=23 +'*'=24 +'_'=25 +'$'=26 +'/'=27 +'%'=28 +'**'=29 +'??'=30 +'#'=31 +'>>'=32 +'<<'=33 +'>>>'=34 +'<'=35 +'>'=36 +'<='=37 +'>='=38 +'=='=39 +'!='=40 +'==='=41 +'!=='=42 +'&'=43 +'^'=44 +'|'=45 +'&&'=46 +'||'=47 +'*='=48 +'/='=49 +'%='=50 +'+='=51 +'-='=52 +'<<='=53 +'>>='=54 +'>>>='=55 +'&='=56 +'^='=57 +'|='=58 +'=>'=59 +'**='=60 +'null'=61 +'break'=68 +'do'=69 +'instanceof'=70 +'typeof'=71 +'case'=72 +'else'=73 +'new'=74 +'var'=75 +'catch'=76 +'finally'=77 +'return'=78 +'void'=79 +'continue'=80 +'for'=81 +'switch'=82 +'while'=83 +'debugger'=84 +'function'=85 +'this'=86 +'with'=87 +'default'=88 +'if'=89 +'throw'=90 +'delete'=91 +'in'=92 +'try'=93 +'as'=94 +'from'=95 +'readonly'=96 +'async'=97 +'class'=98 +'enum'=99 +'extends'=100 +'super'=101 +'const'=102 +'export'=103 +'import'=104 +'await'=105 +'implements'=106 +'let'=107 +'private'=108 +'public'=109 +'interface'=110 +'package'=111 +'protected'=112 +'static'=113 +'yield'=114 +'any'=115 +'number'=116 +'boolean'=117 +'string'=118 +'symbol'=119 +'type'=120 +'get '=121 +'set '=122 +'constructor'=123 +'namespace'=124 +'require'=125 +'module'=126 +'declare'=127 +'abstract'=128 +'is'=129 +'@'=130 diff --git a/languages/ts/typescript_base_lexer.go b/languages/ts/typescript_base_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..0c164b621b7ab61a50dff42c5170f42cff7cf553 --- /dev/null +++ b/languages/ts/typescript_base_lexer.go @@ -0,0 +1,107 @@ +package parser + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/pkg/infrastructure/container" +) + +var scopeStrictModes *container.Stack + +func init() { + scopeStrictModes = container.NewStack() +} + +// TypeScriptBaseLexer state +type TypeScriptBaseLexer struct { + *antlr.BaseLexer + + lastToken antlr.Token + useStrictDefault bool + useStrictCurrent bool +} + +func (l *TypeScriptBaseLexer) IsStartOfFile() bool { + return l.lastToken == nil +} + +// IsStrictMode is self explanatory. +func (l *TypeScriptBaseLexer) IsStrictMode() bool { + return l.useStrictCurrent +} + +func (l *TypeScriptBaseLexer) SetUseStrictDefault(value bool) { + l.useStrictCurrent = value + l.useStrictDefault = value +} + +func (l *TypeScriptBaseLexer) GetStrictDefault() bool { + return l.useStrictDefault +} + +// NextToken from the character stream. +func (l *TypeScriptBaseLexer) NextToken() antlr.Token { + next := l.BaseLexer.NextToken() // Get next token + if next.GetChannel() == antlr.TokenDefaultChannel { + // Keep track of the last token on default channel + l.lastToken = next + } + return next +} + +// ProcessOpenBrace is called when a { is encountered during +// lexing, we push a new scope everytime. +func (l *TypeScriptBaseLexer) ProcessOpenBrace() { + l.useStrictCurrent = l.useStrictDefault + if scopeStrictModes.Len() > 0 && scopeStrictModes.Peak().(bool) { + l.useStrictCurrent = true + } + scopeStrictModes.Push(l.useStrictCurrent) +} + +// ProcessCloseBrace is called when a } is encountered during +// lexing, we pop a scope unless we're inside global scope. +func (l *TypeScriptBaseLexer) ProcessCloseBrace() { + l.useStrictCurrent = l.useStrictDefault + if scopeStrictModes.Len() > 0 { + l.useStrictCurrent = scopeStrictModes.Pop().(bool) + } +} + +// ProcessStringLiteral is called when lexing a string literal. +func (l *TypeScriptBaseLexer) ProcessStringLiteral() { + if l.lastToken == nil || l.lastToken.GetTokenType() == TypeScriptLexerOpenBrace { + if l.GetText() == `"use strict"` || l.GetText() == "'use strict'" { + if scopeStrictModes.Len() > 0 { + scopeStrictModes.Pop() + } + l.useStrictCurrent = true + scopeStrictModes.Push(l.useStrictCurrent) + } + } +} + +// IsRegexPossible returns true if the lexer can match a +// regex literal. +func (l *TypeScriptBaseLexer) IsRegexPossible() bool { + if l.lastToken == nil { + return true + } + switch l.lastToken.GetTokenType() { + case + TypeScriptLexerIdentifier, + TypeScriptLexerNullLiteral, + TypeScriptLexerBooleanLiteral, + TypeScriptLexerThis, + TypeScriptLexerCloseBracket, + TypeScriptLexerCloseParen, + TypeScriptLexerOctalIntegerLiteral, + TypeScriptLexerDecimalLiteral, + TypeScriptLexerHexIntegerLiteral, + TypeScriptLexerStringLiteral, + TypeScriptLexerPlusPlus, + TypeScriptLexerMinusMinus: + return false + default: + return true + } +} diff --git a/languages/ts/typescript_base_parser.go b/languages/ts/typescript_base_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..2d88554388e92d63d1e6626a03119a5d534e50a0 --- /dev/null +++ b/languages/ts/typescript_base_parser.go @@ -0,0 +1,92 @@ +package parser + +import ( + "strings" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// TypeScriptBaseParser implementation. +type TypeScriptBaseParser struct { + *antlr.BaseParser +} + +// Short for p.prev(str string) +func (p *TypeScriptBaseParser) p(str string) bool { + return p.prev(str) +} + +// Whether the previous token value equals to str. +func (p *TypeScriptBaseParser) prev(str string) bool { + return p.GetTokenStream().LT(-1).GetText() == str +} + +// Short for p.next(str string) +func (p *TypeScriptBaseParser) n(str string) bool { + return p.next(str) +} + +// Whether the next token value equals to str. +func (p *TypeScriptBaseParser) next(str string) bool { + return p.GetTokenStream().LT(1).GetText() == str +} + +func (p *TypeScriptBaseParser) notLineTerminator() bool { + return !p.here(TypeScriptParserLineTerminator) +} + +func (p *TypeScriptBaseParser) notOpenBraceAndNotFunction() bool { + nextTokenType := p.GetTokenStream().LT(1).GetTokenType() + return nextTokenType != TypeScriptParserOpenBrace && nextTokenType != TypeScriptParserFunction +} + +func (p *TypeScriptBaseParser) closeBrace() bool { + return p.GetTokenStream().LT(1).GetTokenType() == TypeScriptParserCloseBrace +} + +// Returns true if on the current index of the parser's +// token stream a token of the given type exists on the +// Hidden channel. +func (p *TypeScriptBaseParser) here(_type int) bool { + // Get the token ahead of the current index. + possibleIndexEosToken := p.GetCurrentToken().GetTokenIndex() - 1 + ahead := p.GetTokenStream().Get(possibleIndexEosToken) + + // Check if the token resides on the HIDDEN channel and if it's of the + // provided type. + return ahead.GetChannel() == antlr.LexerHidden && ahead.GetTokenType() == _type +} + +// Returns true if on the current index of the parser's +// token stream a token exists on the Hidden channel which +// either is a line terminator, or is a multi line comment that +// contains a line terminator. +func (p *TypeScriptBaseParser) lineTerminatorAhead() bool { + // Get the token ahead of the current index. + possibleIndexEosToken := p.GetCurrentToken().GetTokenIndex() - 1 + ahead := p.GetTokenStream().Get(possibleIndexEosToken) + + if ahead.GetChannel() != antlr.LexerHidden { + // We're only interested in tokens on the HIDDEN channel. + return false + } + + if ahead.GetTokenType() == TypeScriptParserLineTerminator { + // There is definitely a line terminator ahead. + return true + } + + if ahead.GetTokenType() == TypeScriptParserWhiteSpaces { + // Get the token ahead of the current whitespaces. + possibleIndexEosToken = p.GetCurrentToken().GetTokenIndex() - 2 + ahead = p.GetTokenStream().Get(possibleIndexEosToken) + } + + // Get the token's text and type. + text := ahead.GetText() + _type := ahead.GetTokenType() + + // Check if the token is, or contains a line terminator. + return (_type == TypeScriptParserMultiLineComment && (strings.Contains(text, "\r") || strings.Contains(text, "\n"))) || + (_type == TypeScriptParserLineTerminator) +} diff --git a/languages/ts/typescript_lexer.go b/languages/ts/typescript_lexer.go new file mode 100644 index 0000000000000000000000000000000000000000..29b9c5cca96359882379de77be4d37a0c82293fd --- /dev/null +++ b/languages/ts/typescript_lexer.go @@ -0,0 +1,1003 @@ +// Code generated from TypeScriptLexer.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser + +import ( + "fmt" + "unicode" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import error +var _ = fmt.Printf +var _ = unicode.IsLetter + +var serializedLexerAtn = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 140, 1231, + 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, + 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, + 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, + 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, + 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, + 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, + 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, + 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, + 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, + 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, + 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, + 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, + 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, + 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, + 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, + 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, + 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, + 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, + 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, + 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, + 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, + 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, + 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, + 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, + 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, + 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, + 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, + 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, + 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, + 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, + 9, 151, 4, 152, 9, 152, 4, 153, 9, 153, 4, 154, 9, 154, 4, 155, 9, 155, + 4, 156, 9, 156, 4, 157, 9, 157, 4, 158, 9, 158, 4, 159, 9, 159, 4, 160, + 9, 160, 4, 161, 9, 161, 4, 162, 9, 162, 4, 163, 9, 163, 3, 2, 3, 2, 3, + 2, 3, 2, 3, 2, 7, 2, 333, 10, 2, 12, 2, 14, 2, 336, 11, 2, 3, 3, 3, 3, + 3, 3, 3, 3, 7, 3, 342, 10, 3, 12, 3, 14, 3, 345, 11, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 356, 10, 4, 12, 4, 14, 4, + 359, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 7, 5, 366, 10, 5, 12, 5, 14, + 5, 369, 11, 5, 3, 5, 3, 5, 3, 5, 7, 5, 374, 10, 5, 12, 5, 14, 5, 377, 11, + 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, + 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, + 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, + 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, + 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, + 3, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, + 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, + 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, + 40, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, + 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, + 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, + 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, + 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, + 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, + 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, + 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 545, 10, + 63, 3, 64, 3, 64, 3, 64, 7, 64, 550, 10, 64, 12, 64, 14, 64, 553, 11, 64, + 3, 64, 5, 64, 556, 10, 64, 3, 64, 3, 64, 6, 64, 560, 10, 64, 13, 64, 14, + 64, 561, 3, 64, 5, 64, 565, 10, 64, 3, 64, 3, 64, 5, 64, 569, 10, 64, 5, + 64, 571, 10, 64, 3, 65, 3, 65, 3, 65, 6, 65, 576, 10, 65, 13, 65, 14, 65, + 577, 3, 66, 3, 66, 6, 66, 582, 10, 66, 13, 66, 14, 66, 583, 3, 66, 3, 66, + 3, 67, 3, 67, 3, 67, 6, 67, 591, 10, 67, 13, 67, 14, 67, 592, 3, 68, 3, + 68, 3, 68, 6, 68, 598, 10, 68, 13, 68, 14, 68, 599, 3, 69, 3, 69, 3, 69, + 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, + 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, + 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, + 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, + 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, + 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, + 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, + 81, 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, + 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, + 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, + 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, + 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 89, + 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, + 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 93, + 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 3, + 96, 3, 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, + 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, + 99, 3, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, + 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, + 3, 102, 3, 102, 3, 102, 3, 102, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, + 3, 103, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 105, + 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 106, 3, 106, 3, 106, + 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, + 3, 107, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 108, + 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 110, + 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, + 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, + 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, + 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 113, 3, 114, 3, 114, + 3, 114, 3, 114, 3, 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 115, 3, 115, + 3, 115, 3, 115, 3, 116, 3, 116, 3, 116, 3, 116, 3, 117, 3, 117, 3, 117, + 3, 117, 3, 117, 3, 117, 3, 117, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, + 3, 118, 3, 118, 3, 118, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, + 3, 119, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 120, 3, 121, + 3, 121, 3, 121, 3, 121, 3, 121, 3, 122, 3, 122, 3, 122, 3, 122, 3, 122, + 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, + 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 125, + 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, 3, 125, + 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 127, + 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 128, 3, 128, 3, 128, + 3, 128, 3, 128, 3, 128, 3, 128, 3, 128, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, 3, 131, + 3, 131, 3, 132, 3, 132, 7, 132, 1012, 10, 132, 12, 132, 14, 132, 1015, + 11, 132, 3, 133, 3, 133, 7, 133, 1019, 10, 133, 12, 133, 14, 133, 1022, + 11, 133, 3, 133, 3, 133, 3, 133, 7, 133, 1027, 10, 133, 12, 133, 14, 133, + 1030, 11, 133, 3, 133, 5, 133, 1033, 10, 133, 3, 133, 3, 133, 3, 134, 3, + 134, 3, 134, 3, 134, 7, 134, 1041, 10, 134, 12, 134, 14, 134, 1044, 11, + 134, 3, 134, 3, 134, 3, 135, 6, 135, 1049, 10, 135, 13, 135, 14, 135, 1050, + 3, 135, 3, 135, 3, 136, 3, 136, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, + 3, 137, 3, 137, 3, 137, 7, 137, 1065, 10, 137, 12, 137, 14, 137, 1068, + 11, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 138, 3, 138, + 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, + 7, 138, 1087, 10, 138, 12, 138, 14, 138, 1090, 11, 138, 3, 138, 3, 138, + 3, 138, 3, 138, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 139, 3, 140, + 3, 140, 3, 140, 3, 140, 5, 140, 1106, 10, 140, 3, 141, 3, 141, 3, 141, + 3, 141, 5, 141, 1112, 10, 141, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, + 5, 142, 1119, 10, 142, 3, 143, 3, 143, 5, 143, 1123, 10, 143, 3, 144, 3, + 144, 3, 144, 3, 144, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, + 146, 3, 146, 3, 146, 6, 146, 1138, 10, 146, 13, 146, 14, 146, 1139, 3, + 146, 3, 146, 3, 147, 3, 147, 3, 148, 3, 148, 3, 149, 3, 149, 5, 149, 1150, + 10, 149, 3, 150, 3, 150, 3, 150, 3, 151, 3, 151, 3, 152, 3, 152, 3, 152, + 7, 152, 1160, 10, 152, 12, 152, 14, 152, 1163, 11, 152, 5, 152, 1165, 10, + 152, 3, 153, 3, 153, 5, 153, 1169, 10, 153, 3, 153, 6, 153, 1172, 10, 153, + 13, 153, 14, 153, 1173, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 5, 154, + 1181, 10, 154, 3, 155, 3, 155, 3, 155, 3, 155, 5, 155, 1187, 10, 155, 3, + 156, 5, 156, 1190, 10, 156, 3, 157, 5, 157, 1193, 10, 157, 3, 158, 5, 158, + 1196, 10, 158, 3, 159, 5, 159, 1199, 10, 159, 3, 160, 3, 160, 3, 160, 3, + 160, 7, 160, 1205, 10, 160, 12, 160, 14, 160, 1208, 11, 160, 3, 160, 5, + 160, 1211, 10, 160, 3, 161, 3, 161, 3, 161, 3, 161, 7, 161, 1217, 10, 161, + 12, 161, 14, 161, 1220, 11, 161, 3, 161, 5, 161, 1223, 10, 161, 3, 162, + 3, 162, 5, 162, 1227, 10, 162, 3, 163, 3, 163, 3, 163, 5, 343, 1066, 1088, + 2, 164, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, + 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, + 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, + 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, + 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, + 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, + 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, + 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 141, 72, + 143, 73, 145, 74, 147, 75, 149, 76, 151, 77, 153, 78, 155, 79, 157, 80, + 159, 81, 161, 82, 163, 83, 165, 84, 167, 85, 169, 86, 171, 87, 173, 88, + 175, 89, 177, 90, 179, 91, 181, 92, 183, 93, 185, 94, 187, 95, 189, 96, + 191, 97, 193, 98, 195, 99, 197, 100, 199, 101, 201, 102, 203, 103, 205, + 104, 207, 105, 209, 106, 211, 107, 213, 108, 215, 109, 217, 110, 219, 111, + 221, 112, 223, 113, 225, 114, 227, 115, 229, 116, 231, 117, 233, 118, 235, + 119, 237, 120, 239, 121, 241, 122, 243, 123, 245, 124, 247, 125, 249, 126, + 251, 127, 253, 128, 255, 129, 257, 130, 259, 131, 261, 132, 263, 133, 265, + 134, 267, 135, 269, 136, 271, 137, 273, 138, 275, 139, 277, 140, 279, 2, + 281, 2, 283, 2, 285, 2, 287, 2, 289, 2, 291, 2, 293, 2, 295, 2, 297, 2, + 299, 2, 301, 2, 303, 2, 305, 2, 307, 2, 309, 2, 311, 2, 313, 2, 315, 2, + 317, 2, 319, 2, 321, 2, 323, 2, 325, 2, 3, 2, 28, 5, 2, 12, 12, 15, 15, + 8234, 8235, 3, 2, 50, 59, 4, 2, 90, 90, 122, 122, 3, 2, 50, 57, 4, 2, 81, + 81, 113, 113, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 3, 2, 98, 98, 6, 2, + 11, 11, 13, 14, 34, 34, 162, 162, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, + 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 11, 2, 36, 36, 41, 41, 94, 94, 100, + 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 14, 2, 12, 12, 15, + 15, 36, 36, 41, 41, 50, 59, 94, 94, 100, 100, 104, 104, 112, 112, 116, + 116, 118, 120, 122, 122, 5, 2, 50, 59, 119, 119, 122, 122, 5, 2, 50, 59, + 67, 72, 99, 104, 3, 2, 51, 59, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, + 47, 4, 2, 38, 38, 97, 97, 257, 2, 67, 92, 99, 124, 172, 172, 183, 183, + 188, 188, 194, 216, 218, 248, 250, 545, 548, 565, 594, 687, 690, 698, 701, + 707, 722, 723, 738, 742, 752, 752, 892, 892, 904, 904, 906, 908, 910, 910, + 912, 931, 933, 976, 978, 985, 988, 1013, 1026, 1155, 1166, 1222, 1225, + 1226, 1229, 1230, 1234, 1271, 1274, 1275, 1331, 1368, 1371, 1371, 1379, + 1417, 1490, 1516, 1522, 1524, 1571, 1596, 1602, 1612, 1651, 1749, 1751, + 1751, 1767, 1768, 1788, 1790, 1810, 1810, 1812, 1838, 1922, 1959, 2311, + 2363, 2367, 2367, 2386, 2386, 2394, 2403, 2439, 2446, 2449, 2450, 2453, + 2474, 2476, 2482, 2484, 2484, 2488, 2491, 2526, 2527, 2529, 2531, 2546, + 2547, 2567, 2572, 2577, 2578, 2581, 2602, 2604, 2610, 2612, 2613, 2615, + 2616, 2618, 2619, 2651, 2654, 2656, 2656, 2676, 2678, 2695, 2701, 2703, + 2703, 2705, 2707, 2709, 2730, 2732, 2738, 2740, 2741, 2743, 2747, 2751, + 2751, 2770, 2770, 2786, 2786, 2823, 2830, 2833, 2834, 2837, 2858, 2860, + 2866, 2868, 2869, 2872, 2875, 2879, 2879, 2910, 2911, 2913, 2915, 2951, + 2956, 2960, 2962, 2964, 2967, 2971, 2972, 2974, 2974, 2976, 2977, 2981, + 2982, 2986, 2988, 2992, 2999, 3001, 3003, 3079, 3086, 3088, 3090, 3092, + 3114, 3116, 3125, 3127, 3131, 3170, 3171, 3207, 3214, 3216, 3218, 3220, + 3242, 3244, 3253, 3255, 3259, 3296, 3296, 3298, 3299, 3335, 3342, 3344, + 3346, 3348, 3370, 3372, 3387, 3426, 3427, 3463, 3480, 3484, 3507, 3509, + 3517, 3519, 3519, 3522, 3528, 3587, 3634, 3636, 3637, 3650, 3656, 3715, + 3716, 3718, 3718, 3721, 3722, 3724, 3724, 3727, 3727, 3734, 3737, 3739, + 3745, 3747, 3749, 3751, 3751, 3753, 3753, 3756, 3757, 3759, 3762, 3764, + 3765, 3775, 3782, 3784, 3784, 3806, 3807, 3842, 3842, 3906, 3948, 3978, + 3981, 4098, 4131, 4133, 4137, 4139, 4140, 4178, 4183, 4258, 4295, 4306, + 4344, 4354, 4443, 4449, 4516, 4522, 4603, 4610, 4616, 4618, 4680, 4682, + 4682, 4684, 4687, 4690, 4696, 4698, 4698, 4700, 4703, 4706, 4744, 4746, + 4746, 4748, 4751, 4754, 4784, 4786, 4786, 4788, 4791, 4794, 4800, 4802, + 4802, 4804, 4807, 4810, 4816, 4818, 4824, 4826, 4848, 4850, 4880, 4882, + 4882, 4884, 4887, 4890, 4896, 4898, 4936, 4938, 4956, 5026, 5110, 5123, + 5752, 5763, 5788, 5794, 5868, 6018, 6069, 6178, 6265, 6274, 6314, 7682, + 7837, 7842, 7931, 7938, 7959, 7962, 7967, 7970, 8007, 8010, 8015, 8018, + 8025, 8027, 8027, 8029, 8029, 8031, 8031, 8033, 8063, 8066, 8118, 8120, + 8126, 8128, 8128, 8132, 8134, 8136, 8142, 8146, 8149, 8152, 8157, 8162, + 8174, 8180, 8182, 8184, 8190, 8321, 8321, 8452, 8452, 8457, 8457, 8460, + 8469, 8471, 8471, 8475, 8479, 8486, 8486, 8488, 8488, 8490, 8490, 8492, + 8495, 8497, 8499, 8501, 8507, 8546, 8581, 12295, 12297, 12323, 12331, 12339, + 12343, 12346, 12348, 12355, 12438, 12447, 12448, 12451, 12540, 12542, 12544, + 12551, 12590, 12595, 12688, 12706, 12729, 13314, 19905, 19970, 42126, 44034, + 44034, 55205, 55205, 63746, 64047, 64258, 64264, 64277, 64281, 64287, 64287, + 64289, 64298, 64300, 64312, 64314, 64318, 64320, 64320, 64322, 64323, 64325, + 64326, 64328, 64435, 64469, 64831, 64850, 64913, 64916, 64969, 65010, 65021, + 65138, 65140, 65142, 65142, 65144, 65278, 65315, 65340, 65347, 65372, 65384, + 65472, 65476, 65481, 65484, 65489, 65492, 65497, 65500, 65502, 102, 2, + 770, 848, 866, 868, 1157, 1160, 1427, 1443, 1445, 1467, 1469, 1471, 1473, + 1473, 1475, 1476, 1478, 1478, 1613, 1623, 1650, 1650, 1752, 1758, 1761, + 1766, 1769, 1770, 1772, 1775, 1811, 1811, 1842, 1868, 1960, 1970, 2307, + 2309, 2366, 2366, 2368, 2383, 2387, 2390, 2404, 2405, 2435, 2437, 2494, + 2502, 2505, 2506, 2509, 2511, 2521, 2521, 2532, 2533, 2564, 2564, 2622, + 2622, 2624, 2628, 2633, 2634, 2637, 2639, 2674, 2675, 2691, 2693, 2750, + 2750, 2752, 2759, 2761, 2763, 2765, 2767, 2819, 2821, 2878, 2878, 2880, + 2885, 2889, 2890, 2893, 2895, 2904, 2905, 2948, 2949, 3008, 3012, 3016, + 3018, 3020, 3023, 3033, 3033, 3075, 3077, 3136, 3142, 3144, 3146, 3148, + 3151, 3159, 3160, 3204, 3205, 3264, 3270, 3272, 3274, 3276, 3279, 3287, + 3288, 3332, 3333, 3392, 3397, 3400, 3402, 3404, 3407, 3417, 3417, 3460, + 3461, 3532, 3532, 3537, 3542, 3544, 3544, 3546, 3553, 3572, 3573, 3635, + 3635, 3638, 3644, 3657, 3664, 3763, 3763, 3766, 3771, 3773, 3774, 3786, + 3791, 3866, 3867, 3895, 3895, 3897, 3897, 3899, 3899, 3904, 3905, 3955, + 3974, 3976, 3977, 3986, 3993, 3995, 4030, 4040, 4040, 4142, 4148, 4152, + 4155, 4184, 4187, 6070, 6101, 6315, 6315, 8402, 8414, 8419, 8419, 12332, + 12337, 12443, 12444, 64288, 64288, 65058, 65061, 22, 2, 50, 59, 1634, 1643, + 1778, 1787, 2408, 2417, 2536, 2545, 2664, 2673, 2792, 2801, 2920, 2929, + 3049, 3057, 3176, 3185, 3304, 3313, 3432, 3441, 3666, 3675, 3794, 3803, + 3874, 3883, 4162, 4171, 4971, 4979, 6114, 6123, 6162, 6171, 65298, 65307, + 9, 2, 97, 97, 8257, 8258, 12541, 12541, 65077, 65078, 65103, 65105, 65345, + 65345, 65383, 65383, 8, 2, 12, 12, 15, 15, 44, 44, 49, 49, 93, 94, 8234, + 8235, 7, 2, 12, 12, 15, 15, 49, 49, 93, 94, 8234, 8235, 6, 2, 12, 12, 15, + 15, 94, 95, 8234, 8235, 2, 1260, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, + 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, + 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, + 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, + 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, + 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, + 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, + 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, + 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, + 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, + 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, + 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, + 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, + 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, + 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, + 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, + 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, + 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, + 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, + 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, + 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, + 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, + 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, + 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, + 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, + 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, + 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 2, 197, 3, 2, 2, 2, 2, 199, 3, + 2, 2, 2, 2, 201, 3, 2, 2, 2, 2, 203, 3, 2, 2, 2, 2, 205, 3, 2, 2, 2, 2, + 207, 3, 2, 2, 2, 2, 209, 3, 2, 2, 2, 2, 211, 3, 2, 2, 2, 2, 213, 3, 2, + 2, 2, 2, 215, 3, 2, 2, 2, 2, 217, 3, 2, 2, 2, 2, 219, 3, 2, 2, 2, 2, 221, + 3, 2, 2, 2, 2, 223, 3, 2, 2, 2, 2, 225, 3, 2, 2, 2, 2, 227, 3, 2, 2, 2, + 2, 229, 3, 2, 2, 2, 2, 231, 3, 2, 2, 2, 2, 233, 3, 2, 2, 2, 2, 235, 3, + 2, 2, 2, 2, 237, 3, 2, 2, 2, 2, 239, 3, 2, 2, 2, 2, 241, 3, 2, 2, 2, 2, + 243, 3, 2, 2, 2, 2, 245, 3, 2, 2, 2, 2, 247, 3, 2, 2, 2, 2, 249, 3, 2, + 2, 2, 2, 251, 3, 2, 2, 2, 2, 253, 3, 2, 2, 2, 2, 255, 3, 2, 2, 2, 2, 257, + 3, 2, 2, 2, 2, 259, 3, 2, 2, 2, 2, 261, 3, 2, 2, 2, 2, 263, 3, 2, 2, 2, + 2, 265, 3, 2, 2, 2, 2, 267, 3, 2, 2, 2, 2, 269, 3, 2, 2, 2, 2, 271, 3, + 2, 2, 2, 2, 273, 3, 2, 2, 2, 2, 275, 3, 2, 2, 2, 2, 277, 3, 2, 2, 2, 3, + 327, 3, 2, 2, 2, 5, 337, 3, 2, 2, 2, 7, 351, 3, 2, 2, 2, 9, 362, 3, 2, + 2, 2, 11, 378, 3, 2, 2, 2, 13, 380, 3, 2, 2, 2, 15, 382, 3, 2, 2, 2, 17, + 384, 3, 2, 2, 2, 19, 386, 3, 2, 2, 2, 21, 389, 3, 2, 2, 2, 23, 392, 3, + 2, 2, 2, 25, 394, 3, 2, 2, 2, 27, 396, 3, 2, 2, 2, 29, 398, 3, 2, 2, 2, + 31, 400, 3, 2, 2, 2, 33, 402, 3, 2, 2, 2, 35, 406, 3, 2, 2, 2, 37, 408, + 3, 2, 2, 2, 39, 411, 3, 2, 2, 2, 41, 414, 3, 2, 2, 2, 43, 416, 3, 2, 2, + 2, 45, 418, 3, 2, 2, 2, 47, 420, 3, 2, 2, 2, 49, 422, 3, 2, 2, 2, 51, 424, + 3, 2, 2, 2, 53, 426, 3, 2, 2, 2, 55, 428, 3, 2, 2, 2, 57, 430, 3, 2, 2, + 2, 59, 432, 3, 2, 2, 2, 61, 435, 3, 2, 2, 2, 63, 438, 3, 2, 2, 2, 65, 440, + 3, 2, 2, 2, 67, 443, 3, 2, 2, 2, 69, 446, 3, 2, 2, 2, 71, 450, 3, 2, 2, + 2, 73, 452, 3, 2, 2, 2, 75, 454, 3, 2, 2, 2, 77, 457, 3, 2, 2, 2, 79, 460, + 3, 2, 2, 2, 81, 463, 3, 2, 2, 2, 83, 466, 3, 2, 2, 2, 85, 470, 3, 2, 2, + 2, 87, 474, 3, 2, 2, 2, 89, 476, 3, 2, 2, 2, 91, 478, 3, 2, 2, 2, 93, 480, + 3, 2, 2, 2, 95, 483, 3, 2, 2, 2, 97, 486, 3, 2, 2, 2, 99, 489, 3, 2, 2, + 2, 101, 492, 3, 2, 2, 2, 103, 495, 3, 2, 2, 2, 105, 498, 3, 2, 2, 2, 107, + 501, 3, 2, 2, 2, 109, 505, 3, 2, 2, 2, 111, 509, 3, 2, 2, 2, 113, 514, + 3, 2, 2, 2, 115, 517, 3, 2, 2, 2, 117, 520, 3, 2, 2, 2, 119, 523, 3, 2, + 2, 2, 121, 526, 3, 2, 2, 2, 123, 530, 3, 2, 2, 2, 125, 544, 3, 2, 2, 2, + 127, 570, 3, 2, 2, 2, 129, 572, 3, 2, 2, 2, 131, 579, 3, 2, 2, 2, 133, + 587, 3, 2, 2, 2, 135, 594, 3, 2, 2, 2, 137, 601, 3, 2, 2, 2, 139, 607, + 3, 2, 2, 2, 141, 610, 3, 2, 2, 2, 143, 621, 3, 2, 2, 2, 145, 628, 3, 2, + 2, 2, 147, 633, 3, 2, 2, 2, 149, 638, 3, 2, 2, 2, 151, 642, 3, 2, 2, 2, + 153, 646, 3, 2, 2, 2, 155, 652, 3, 2, 2, 2, 157, 660, 3, 2, 2, 2, 159, + 667, 3, 2, 2, 2, 161, 672, 3, 2, 2, 2, 163, 681, 3, 2, 2, 2, 165, 685, + 3, 2, 2, 2, 167, 692, 3, 2, 2, 2, 169, 698, 3, 2, 2, 2, 171, 707, 3, 2, + 2, 2, 173, 716, 3, 2, 2, 2, 175, 721, 3, 2, 2, 2, 177, 726, 3, 2, 2, 2, + 179, 734, 3, 2, 2, 2, 181, 737, 3, 2, 2, 2, 183, 743, 3, 2, 2, 2, 185, + 750, 3, 2, 2, 2, 187, 753, 3, 2, 2, 2, 189, 757, 3, 2, 2, 2, 191, 760, + 3, 2, 2, 2, 193, 765, 3, 2, 2, 2, 195, 774, 3, 2, 2, 2, 197, 780, 3, 2, + 2, 2, 199, 786, 3, 2, 2, 2, 201, 791, 3, 2, 2, 2, 203, 799, 3, 2, 2, 2, + 205, 805, 3, 2, 2, 2, 207, 811, 3, 2, 2, 2, 209, 818, 3, 2, 2, 2, 211, + 825, 3, 2, 2, 2, 213, 831, 3, 2, 2, 2, 215, 842, 3, 2, 2, 2, 217, 846, + 3, 2, 2, 2, 219, 854, 3, 2, 2, 2, 221, 861, 3, 2, 2, 2, 223, 871, 3, 2, + 2, 2, 225, 879, 3, 2, 2, 2, 227, 889, 3, 2, 2, 2, 229, 896, 3, 2, 2, 2, + 231, 902, 3, 2, 2, 2, 233, 906, 3, 2, 2, 2, 235, 913, 3, 2, 2, 2, 237, + 921, 3, 2, 2, 2, 239, 928, 3, 2, 2, 2, 241, 935, 3, 2, 2, 2, 243, 940, + 3, 2, 2, 2, 245, 945, 3, 2, 2, 2, 247, 950, 3, 2, 2, 2, 249, 962, 3, 2, + 2, 2, 251, 972, 3, 2, 2, 2, 253, 980, 3, 2, 2, 2, 255, 987, 3, 2, 2, 2, + 257, 995, 3, 2, 2, 2, 259, 1004, 3, 2, 2, 2, 261, 1007, 3, 2, 2, 2, 263, + 1009, 3, 2, 2, 2, 265, 1032, 3, 2, 2, 2, 267, 1036, 3, 2, 2, 2, 269, 1048, + 3, 2, 2, 2, 271, 1054, 3, 2, 2, 2, 273, 1058, 3, 2, 2, 2, 275, 1075, 3, + 2, 2, 2, 277, 1097, 3, 2, 2, 2, 279, 1105, 3, 2, 2, 2, 281, 1111, 3, 2, + 2, 2, 283, 1118, 3, 2, 2, 2, 285, 1122, 3, 2, 2, 2, 287, 1124, 3, 2, 2, + 2, 289, 1128, 3, 2, 2, 2, 291, 1134, 3, 2, 2, 2, 293, 1143, 3, 2, 2, 2, + 295, 1145, 3, 2, 2, 2, 297, 1149, 3, 2, 2, 2, 299, 1151, 3, 2, 2, 2, 301, + 1154, 3, 2, 2, 2, 303, 1164, 3, 2, 2, 2, 305, 1166, 3, 2, 2, 2, 307, 1180, + 3, 2, 2, 2, 309, 1186, 3, 2, 2, 2, 311, 1189, 3, 2, 2, 2, 313, 1192, 3, + 2, 2, 2, 315, 1195, 3, 2, 2, 2, 317, 1198, 3, 2, 2, 2, 319, 1210, 3, 2, + 2, 2, 321, 1222, 3, 2, 2, 2, 323, 1226, 3, 2, 2, 2, 325, 1228, 3, 2, 2, + 2, 327, 328, 6, 2, 2, 2, 328, 329, 7, 37, 2, 2, 329, 330, 7, 35, 2, 2, + 330, 334, 3, 2, 2, 2, 331, 333, 10, 2, 2, 2, 332, 331, 3, 2, 2, 2, 333, + 336, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 335, 3, 2, 2, 2, 335, 4, 3, + 2, 2, 2, 336, 334, 3, 2, 2, 2, 337, 338, 7, 49, 2, 2, 338, 339, 7, 44, + 2, 2, 339, 343, 3, 2, 2, 2, 340, 342, 11, 2, 2, 2, 341, 340, 3, 2, 2, 2, + 342, 345, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 343, 341, 3, 2, 2, 2, 344, + 346, 3, 2, 2, 2, 345, 343, 3, 2, 2, 2, 346, 347, 7, 44, 2, 2, 347, 348, + 7, 49, 2, 2, 348, 349, 3, 2, 2, 2, 349, 350, 8, 3, 2, 2, 350, 6, 3, 2, + 2, 2, 351, 352, 7, 49, 2, 2, 352, 353, 7, 49, 2, 2, 353, 357, 3, 2, 2, + 2, 354, 356, 10, 2, 2, 2, 355, 354, 3, 2, 2, 2, 356, 359, 3, 2, 2, 2, 357, + 355, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 360, 3, 2, 2, 2, 359, 357, + 3, 2, 2, 2, 360, 361, 8, 4, 2, 2, 361, 8, 3, 2, 2, 2, 362, 363, 7, 49, + 2, 2, 363, 367, 5, 319, 160, 2, 364, 366, 5, 321, 161, 2, 365, 364, 3, + 2, 2, 2, 366, 369, 3, 2, 2, 2, 367, 365, 3, 2, 2, 2, 367, 368, 3, 2, 2, + 2, 368, 370, 3, 2, 2, 2, 369, 367, 3, 2, 2, 2, 370, 371, 6, 5, 3, 2, 371, + 375, 7, 49, 2, 2, 372, 374, 5, 307, 154, 2, 373, 372, 3, 2, 2, 2, 374, + 377, 3, 2, 2, 2, 375, 373, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 10, 3, + 2, 2, 2, 377, 375, 3, 2, 2, 2, 378, 379, 7, 93, 2, 2, 379, 12, 3, 2, 2, + 2, 380, 381, 7, 95, 2, 2, 381, 14, 3, 2, 2, 2, 382, 383, 7, 42, 2, 2, 383, + 16, 3, 2, 2, 2, 384, 385, 7, 43, 2, 2, 385, 18, 3, 2, 2, 2, 386, 387, 7, + 125, 2, 2, 387, 388, 8, 10, 3, 2, 388, 20, 3, 2, 2, 2, 389, 390, 7, 127, + 2, 2, 390, 391, 8, 11, 4, 2, 391, 22, 3, 2, 2, 2, 392, 393, 7, 61, 2, 2, + 393, 24, 3, 2, 2, 2, 394, 395, 7, 46, 2, 2, 395, 26, 3, 2, 2, 2, 396, 397, + 7, 63, 2, 2, 397, 28, 3, 2, 2, 2, 398, 399, 7, 65, 2, 2, 399, 30, 3, 2, + 2, 2, 400, 401, 7, 60, 2, 2, 401, 32, 3, 2, 2, 2, 402, 403, 7, 48, 2, 2, + 403, 404, 7, 48, 2, 2, 404, 405, 7, 48, 2, 2, 405, 34, 3, 2, 2, 2, 406, + 407, 7, 48, 2, 2, 407, 36, 3, 2, 2, 2, 408, 409, 7, 45, 2, 2, 409, 410, + 7, 45, 2, 2, 410, 38, 3, 2, 2, 2, 411, 412, 7, 47, 2, 2, 412, 413, 7, 47, + 2, 2, 413, 40, 3, 2, 2, 2, 414, 415, 7, 45, 2, 2, 415, 42, 3, 2, 2, 2, + 416, 417, 7, 47, 2, 2, 417, 44, 3, 2, 2, 2, 418, 419, 7, 128, 2, 2, 419, + 46, 3, 2, 2, 2, 420, 421, 7, 35, 2, 2, 421, 48, 3, 2, 2, 2, 422, 423, 7, + 44, 2, 2, 423, 50, 3, 2, 2, 2, 424, 425, 7, 97, 2, 2, 425, 52, 3, 2, 2, + 2, 426, 427, 7, 38, 2, 2, 427, 54, 3, 2, 2, 2, 428, 429, 7, 49, 2, 2, 429, + 56, 3, 2, 2, 2, 430, 431, 7, 39, 2, 2, 431, 58, 3, 2, 2, 2, 432, 433, 7, + 44, 2, 2, 433, 434, 7, 44, 2, 2, 434, 60, 3, 2, 2, 2, 435, 436, 7, 65, + 2, 2, 436, 437, 7, 65, 2, 2, 437, 62, 3, 2, 2, 2, 438, 439, 7, 37, 2, 2, + 439, 64, 3, 2, 2, 2, 440, 441, 7, 64, 2, 2, 441, 442, 7, 64, 2, 2, 442, + 66, 3, 2, 2, 2, 443, 444, 7, 62, 2, 2, 444, 445, 7, 62, 2, 2, 445, 68, + 3, 2, 2, 2, 446, 447, 7, 64, 2, 2, 447, 448, 7, 64, 2, 2, 448, 449, 7, + 64, 2, 2, 449, 70, 3, 2, 2, 2, 450, 451, 7, 62, 2, 2, 451, 72, 3, 2, 2, + 2, 452, 453, 7, 64, 2, 2, 453, 74, 3, 2, 2, 2, 454, 455, 7, 62, 2, 2, 455, + 456, 7, 63, 2, 2, 456, 76, 3, 2, 2, 2, 457, 458, 7, 64, 2, 2, 458, 459, + 7, 63, 2, 2, 459, 78, 3, 2, 2, 2, 460, 461, 7, 63, 2, 2, 461, 462, 7, 63, + 2, 2, 462, 80, 3, 2, 2, 2, 463, 464, 7, 35, 2, 2, 464, 465, 7, 63, 2, 2, + 465, 82, 3, 2, 2, 2, 466, 467, 7, 63, 2, 2, 467, 468, 7, 63, 2, 2, 468, + 469, 7, 63, 2, 2, 469, 84, 3, 2, 2, 2, 470, 471, 7, 35, 2, 2, 471, 472, + 7, 63, 2, 2, 472, 473, 7, 63, 2, 2, 473, 86, 3, 2, 2, 2, 474, 475, 7, 40, + 2, 2, 475, 88, 3, 2, 2, 2, 476, 477, 7, 96, 2, 2, 477, 90, 3, 2, 2, 2, + 478, 479, 7, 126, 2, 2, 479, 92, 3, 2, 2, 2, 480, 481, 7, 40, 2, 2, 481, + 482, 7, 40, 2, 2, 482, 94, 3, 2, 2, 2, 483, 484, 7, 126, 2, 2, 484, 485, + 7, 126, 2, 2, 485, 96, 3, 2, 2, 2, 486, 487, 7, 44, 2, 2, 487, 488, 7, + 63, 2, 2, 488, 98, 3, 2, 2, 2, 489, 490, 7, 49, 2, 2, 490, 491, 7, 63, + 2, 2, 491, 100, 3, 2, 2, 2, 492, 493, 7, 39, 2, 2, 493, 494, 7, 63, 2, + 2, 494, 102, 3, 2, 2, 2, 495, 496, 7, 45, 2, 2, 496, 497, 7, 63, 2, 2, + 497, 104, 3, 2, 2, 2, 498, 499, 7, 47, 2, 2, 499, 500, 7, 63, 2, 2, 500, + 106, 3, 2, 2, 2, 501, 502, 7, 62, 2, 2, 502, 503, 7, 62, 2, 2, 503, 504, + 7, 63, 2, 2, 504, 108, 3, 2, 2, 2, 505, 506, 7, 64, 2, 2, 506, 507, 7, + 64, 2, 2, 507, 508, 7, 63, 2, 2, 508, 110, 3, 2, 2, 2, 509, 510, 7, 64, + 2, 2, 510, 511, 7, 64, 2, 2, 511, 512, 7, 64, 2, 2, 512, 513, 7, 63, 2, + 2, 513, 112, 3, 2, 2, 2, 514, 515, 7, 40, 2, 2, 515, 516, 7, 63, 2, 2, + 516, 114, 3, 2, 2, 2, 517, 518, 7, 96, 2, 2, 518, 519, 7, 63, 2, 2, 519, + 116, 3, 2, 2, 2, 520, 521, 7, 126, 2, 2, 521, 522, 7, 63, 2, 2, 522, 118, + 3, 2, 2, 2, 523, 524, 7, 63, 2, 2, 524, 525, 7, 64, 2, 2, 525, 120, 3, + 2, 2, 2, 526, 527, 7, 44, 2, 2, 527, 528, 7, 44, 2, 2, 528, 529, 7, 63, + 2, 2, 529, 122, 3, 2, 2, 2, 530, 531, 7, 112, 2, 2, 531, 532, 7, 119, 2, + 2, 532, 533, 7, 110, 2, 2, 533, 534, 7, 110, 2, 2, 534, 124, 3, 2, 2, 2, + 535, 536, 7, 118, 2, 2, 536, 537, 7, 116, 2, 2, 537, 538, 7, 119, 2, 2, + 538, 545, 7, 103, 2, 2, 539, 540, 7, 104, 2, 2, 540, 541, 7, 99, 2, 2, + 541, 542, 7, 110, 2, 2, 542, 543, 7, 117, 2, 2, 543, 545, 7, 103, 2, 2, + 544, 535, 3, 2, 2, 2, 544, 539, 3, 2, 2, 2, 545, 126, 3, 2, 2, 2, 546, + 547, 5, 303, 152, 2, 547, 551, 7, 48, 2, 2, 548, 550, 9, 3, 2, 2, 549, + 548, 3, 2, 2, 2, 550, 553, 3, 2, 2, 2, 551, 549, 3, 2, 2, 2, 551, 552, + 3, 2, 2, 2, 552, 555, 3, 2, 2, 2, 553, 551, 3, 2, 2, 2, 554, 556, 5, 305, + 153, 2, 555, 554, 3, 2, 2, 2, 555, 556, 3, 2, 2, 2, 556, 571, 3, 2, 2, + 2, 557, 559, 7, 48, 2, 2, 558, 560, 9, 3, 2, 2, 559, 558, 3, 2, 2, 2, 560, + 561, 3, 2, 2, 2, 561, 559, 3, 2, 2, 2, 561, 562, 3, 2, 2, 2, 562, 564, + 3, 2, 2, 2, 563, 565, 5, 305, 153, 2, 564, 563, 3, 2, 2, 2, 564, 565, 3, + 2, 2, 2, 565, 571, 3, 2, 2, 2, 566, 568, 5, 303, 152, 2, 567, 569, 5, 305, + 153, 2, 568, 567, 3, 2, 2, 2, 568, 569, 3, 2, 2, 2, 569, 571, 3, 2, 2, + 2, 570, 546, 3, 2, 2, 2, 570, 557, 3, 2, 2, 2, 570, 566, 3, 2, 2, 2, 571, + 128, 3, 2, 2, 2, 572, 573, 7, 50, 2, 2, 573, 575, 9, 4, 2, 2, 574, 576, + 5, 301, 151, 2, 575, 574, 3, 2, 2, 2, 576, 577, 3, 2, 2, 2, 577, 575, 3, + 2, 2, 2, 577, 578, 3, 2, 2, 2, 578, 130, 3, 2, 2, 2, 579, 581, 7, 50, 2, + 2, 580, 582, 9, 5, 2, 2, 581, 580, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, + 581, 3, 2, 2, 2, 583, 584, 3, 2, 2, 2, 584, 585, 3, 2, 2, 2, 585, 586, + 6, 66, 4, 2, 586, 132, 3, 2, 2, 2, 587, 588, 7, 50, 2, 2, 588, 590, 9, + 6, 2, 2, 589, 591, 9, 5, 2, 2, 590, 589, 3, 2, 2, 2, 591, 592, 3, 2, 2, + 2, 592, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 134, 3, 2, 2, 2, 594, + 595, 7, 50, 2, 2, 595, 597, 9, 7, 2, 2, 596, 598, 9, 8, 2, 2, 597, 596, + 3, 2, 2, 2, 598, 599, 3, 2, 2, 2, 599, 597, 3, 2, 2, 2, 599, 600, 3, 2, + 2, 2, 600, 136, 3, 2, 2, 2, 601, 602, 7, 100, 2, 2, 602, 603, 7, 116, 2, + 2, 603, 604, 7, 103, 2, 2, 604, 605, 7, 99, 2, 2, 605, 606, 7, 109, 2, + 2, 606, 138, 3, 2, 2, 2, 607, 608, 7, 102, 2, 2, 608, 609, 7, 113, 2, 2, + 609, 140, 3, 2, 2, 2, 610, 611, 7, 107, 2, 2, 611, 612, 7, 112, 2, 2, 612, + 613, 7, 117, 2, 2, 613, 614, 7, 118, 2, 2, 614, 615, 7, 99, 2, 2, 615, + 616, 7, 112, 2, 2, 616, 617, 7, 101, 2, 2, 617, 618, 7, 103, 2, 2, 618, + 619, 7, 113, 2, 2, 619, 620, 7, 104, 2, 2, 620, 142, 3, 2, 2, 2, 621, 622, + 7, 118, 2, 2, 622, 623, 7, 123, 2, 2, 623, 624, 7, 114, 2, 2, 624, 625, + 7, 103, 2, 2, 625, 626, 7, 113, 2, 2, 626, 627, 7, 104, 2, 2, 627, 144, + 3, 2, 2, 2, 628, 629, 7, 101, 2, 2, 629, 630, 7, 99, 2, 2, 630, 631, 7, + 117, 2, 2, 631, 632, 7, 103, 2, 2, 632, 146, 3, 2, 2, 2, 633, 634, 7, 103, + 2, 2, 634, 635, 7, 110, 2, 2, 635, 636, 7, 117, 2, 2, 636, 637, 7, 103, + 2, 2, 637, 148, 3, 2, 2, 2, 638, 639, 7, 112, 2, 2, 639, 640, 7, 103, 2, + 2, 640, 641, 7, 121, 2, 2, 641, 150, 3, 2, 2, 2, 642, 643, 7, 120, 2, 2, + 643, 644, 7, 99, 2, 2, 644, 645, 7, 116, 2, 2, 645, 152, 3, 2, 2, 2, 646, + 647, 7, 101, 2, 2, 647, 648, 7, 99, 2, 2, 648, 649, 7, 118, 2, 2, 649, + 650, 7, 101, 2, 2, 650, 651, 7, 106, 2, 2, 651, 154, 3, 2, 2, 2, 652, 653, + 7, 104, 2, 2, 653, 654, 7, 107, 2, 2, 654, 655, 7, 112, 2, 2, 655, 656, + 7, 99, 2, 2, 656, 657, 7, 110, 2, 2, 657, 658, 7, 110, 2, 2, 658, 659, + 7, 123, 2, 2, 659, 156, 3, 2, 2, 2, 660, 661, 7, 116, 2, 2, 661, 662, 7, + 103, 2, 2, 662, 663, 7, 118, 2, 2, 663, 664, 7, 119, 2, 2, 664, 665, 7, + 116, 2, 2, 665, 666, 7, 112, 2, 2, 666, 158, 3, 2, 2, 2, 667, 668, 7, 120, + 2, 2, 668, 669, 7, 113, 2, 2, 669, 670, 7, 107, 2, 2, 670, 671, 7, 102, + 2, 2, 671, 160, 3, 2, 2, 2, 672, 673, 7, 101, 2, 2, 673, 674, 7, 113, 2, + 2, 674, 675, 7, 112, 2, 2, 675, 676, 7, 118, 2, 2, 676, 677, 7, 107, 2, + 2, 677, 678, 7, 112, 2, 2, 678, 679, 7, 119, 2, 2, 679, 680, 7, 103, 2, + 2, 680, 162, 3, 2, 2, 2, 681, 682, 7, 104, 2, 2, 682, 683, 7, 113, 2, 2, + 683, 684, 7, 116, 2, 2, 684, 164, 3, 2, 2, 2, 685, 686, 7, 117, 2, 2, 686, + 687, 7, 121, 2, 2, 687, 688, 7, 107, 2, 2, 688, 689, 7, 118, 2, 2, 689, + 690, 7, 101, 2, 2, 690, 691, 7, 106, 2, 2, 691, 166, 3, 2, 2, 2, 692, 693, + 7, 121, 2, 2, 693, 694, 7, 106, 2, 2, 694, 695, 7, 107, 2, 2, 695, 696, + 7, 110, 2, 2, 696, 697, 7, 103, 2, 2, 697, 168, 3, 2, 2, 2, 698, 699, 7, + 102, 2, 2, 699, 700, 7, 103, 2, 2, 700, 701, 7, 100, 2, 2, 701, 702, 7, + 119, 2, 2, 702, 703, 7, 105, 2, 2, 703, 704, 7, 105, 2, 2, 704, 705, 7, + 103, 2, 2, 705, 706, 7, 116, 2, 2, 706, 170, 3, 2, 2, 2, 707, 708, 7, 104, + 2, 2, 708, 709, 7, 119, 2, 2, 709, 710, 7, 112, 2, 2, 710, 711, 7, 101, + 2, 2, 711, 712, 7, 118, 2, 2, 712, 713, 7, 107, 2, 2, 713, 714, 7, 113, + 2, 2, 714, 715, 7, 112, 2, 2, 715, 172, 3, 2, 2, 2, 716, 717, 7, 118, 2, + 2, 717, 718, 7, 106, 2, 2, 718, 719, 7, 107, 2, 2, 719, 720, 7, 117, 2, + 2, 720, 174, 3, 2, 2, 2, 721, 722, 7, 121, 2, 2, 722, 723, 7, 107, 2, 2, + 723, 724, 7, 118, 2, 2, 724, 725, 7, 106, 2, 2, 725, 176, 3, 2, 2, 2, 726, + 727, 7, 102, 2, 2, 727, 728, 7, 103, 2, 2, 728, 729, 7, 104, 2, 2, 729, + 730, 7, 99, 2, 2, 730, 731, 7, 119, 2, 2, 731, 732, 7, 110, 2, 2, 732, + 733, 7, 118, 2, 2, 733, 178, 3, 2, 2, 2, 734, 735, 7, 107, 2, 2, 735, 736, + 7, 104, 2, 2, 736, 180, 3, 2, 2, 2, 737, 738, 7, 118, 2, 2, 738, 739, 7, + 106, 2, 2, 739, 740, 7, 116, 2, 2, 740, 741, 7, 113, 2, 2, 741, 742, 7, + 121, 2, 2, 742, 182, 3, 2, 2, 2, 743, 744, 7, 102, 2, 2, 744, 745, 7, 103, + 2, 2, 745, 746, 7, 110, 2, 2, 746, 747, 7, 103, 2, 2, 747, 748, 7, 118, + 2, 2, 748, 749, 7, 103, 2, 2, 749, 184, 3, 2, 2, 2, 750, 751, 7, 107, 2, + 2, 751, 752, 7, 112, 2, 2, 752, 186, 3, 2, 2, 2, 753, 754, 7, 118, 2, 2, + 754, 755, 7, 116, 2, 2, 755, 756, 7, 123, 2, 2, 756, 188, 3, 2, 2, 2, 757, + 758, 7, 99, 2, 2, 758, 759, 7, 117, 2, 2, 759, 190, 3, 2, 2, 2, 760, 761, + 7, 104, 2, 2, 761, 762, 7, 116, 2, 2, 762, 763, 7, 113, 2, 2, 763, 764, + 7, 111, 2, 2, 764, 192, 3, 2, 2, 2, 765, 766, 7, 116, 2, 2, 766, 767, 7, + 103, 2, 2, 767, 768, 7, 99, 2, 2, 768, 769, 7, 102, 2, 2, 769, 770, 7, + 113, 2, 2, 770, 771, 7, 112, 2, 2, 771, 772, 7, 110, 2, 2, 772, 773, 7, + 123, 2, 2, 773, 194, 3, 2, 2, 2, 774, 775, 7, 99, 2, 2, 775, 776, 7, 117, + 2, 2, 776, 777, 7, 123, 2, 2, 777, 778, 7, 112, 2, 2, 778, 779, 7, 101, + 2, 2, 779, 196, 3, 2, 2, 2, 780, 781, 7, 101, 2, 2, 781, 782, 7, 110, 2, + 2, 782, 783, 7, 99, 2, 2, 783, 784, 7, 117, 2, 2, 784, 785, 7, 117, 2, + 2, 785, 198, 3, 2, 2, 2, 786, 787, 7, 103, 2, 2, 787, 788, 7, 112, 2, 2, + 788, 789, 7, 119, 2, 2, 789, 790, 7, 111, 2, 2, 790, 200, 3, 2, 2, 2, 791, + 792, 7, 103, 2, 2, 792, 793, 7, 122, 2, 2, 793, 794, 7, 118, 2, 2, 794, + 795, 7, 103, 2, 2, 795, 796, 7, 112, 2, 2, 796, 797, 7, 102, 2, 2, 797, + 798, 7, 117, 2, 2, 798, 202, 3, 2, 2, 2, 799, 800, 7, 117, 2, 2, 800, 801, + 7, 119, 2, 2, 801, 802, 7, 114, 2, 2, 802, 803, 7, 103, 2, 2, 803, 804, + 7, 116, 2, 2, 804, 204, 3, 2, 2, 2, 805, 806, 7, 101, 2, 2, 806, 807, 7, + 113, 2, 2, 807, 808, 7, 112, 2, 2, 808, 809, 7, 117, 2, 2, 809, 810, 7, + 118, 2, 2, 810, 206, 3, 2, 2, 2, 811, 812, 7, 103, 2, 2, 812, 813, 7, 122, + 2, 2, 813, 814, 7, 114, 2, 2, 814, 815, 7, 113, 2, 2, 815, 816, 7, 116, + 2, 2, 816, 817, 7, 118, 2, 2, 817, 208, 3, 2, 2, 2, 818, 819, 7, 107, 2, + 2, 819, 820, 7, 111, 2, 2, 820, 821, 7, 114, 2, 2, 821, 822, 7, 113, 2, + 2, 822, 823, 7, 116, 2, 2, 823, 824, 7, 118, 2, 2, 824, 210, 3, 2, 2, 2, + 825, 826, 7, 99, 2, 2, 826, 827, 7, 121, 2, 2, 827, 828, 7, 99, 2, 2, 828, + 829, 7, 107, 2, 2, 829, 830, 7, 118, 2, 2, 830, 212, 3, 2, 2, 2, 831, 832, + 7, 107, 2, 2, 832, 833, 7, 111, 2, 2, 833, 834, 7, 114, 2, 2, 834, 835, + 7, 110, 2, 2, 835, 836, 7, 103, 2, 2, 836, 837, 7, 111, 2, 2, 837, 838, + 7, 103, 2, 2, 838, 839, 7, 112, 2, 2, 839, 840, 7, 118, 2, 2, 840, 841, + 7, 117, 2, 2, 841, 214, 3, 2, 2, 2, 842, 843, 7, 110, 2, 2, 843, 844, 7, + 103, 2, 2, 844, 845, 7, 118, 2, 2, 845, 216, 3, 2, 2, 2, 846, 847, 7, 114, + 2, 2, 847, 848, 7, 116, 2, 2, 848, 849, 7, 107, 2, 2, 849, 850, 7, 120, + 2, 2, 850, 851, 7, 99, 2, 2, 851, 852, 7, 118, 2, 2, 852, 853, 7, 103, + 2, 2, 853, 218, 3, 2, 2, 2, 854, 855, 7, 114, 2, 2, 855, 856, 7, 119, 2, + 2, 856, 857, 7, 100, 2, 2, 857, 858, 7, 110, 2, 2, 858, 859, 7, 107, 2, + 2, 859, 860, 7, 101, 2, 2, 860, 220, 3, 2, 2, 2, 861, 862, 7, 107, 2, 2, + 862, 863, 7, 112, 2, 2, 863, 864, 7, 118, 2, 2, 864, 865, 7, 103, 2, 2, + 865, 866, 7, 116, 2, 2, 866, 867, 7, 104, 2, 2, 867, 868, 7, 99, 2, 2, + 868, 869, 7, 101, 2, 2, 869, 870, 7, 103, 2, 2, 870, 222, 3, 2, 2, 2, 871, + 872, 7, 114, 2, 2, 872, 873, 7, 99, 2, 2, 873, 874, 7, 101, 2, 2, 874, + 875, 7, 109, 2, 2, 875, 876, 7, 99, 2, 2, 876, 877, 7, 105, 2, 2, 877, + 878, 7, 103, 2, 2, 878, 224, 3, 2, 2, 2, 879, 880, 7, 114, 2, 2, 880, 881, + 7, 116, 2, 2, 881, 882, 7, 113, 2, 2, 882, 883, 7, 118, 2, 2, 883, 884, + 7, 103, 2, 2, 884, 885, 7, 101, 2, 2, 885, 886, 7, 118, 2, 2, 886, 887, + 7, 103, 2, 2, 887, 888, 7, 102, 2, 2, 888, 226, 3, 2, 2, 2, 889, 890, 7, + 117, 2, 2, 890, 891, 7, 118, 2, 2, 891, 892, 7, 99, 2, 2, 892, 893, 7, + 118, 2, 2, 893, 894, 7, 107, 2, 2, 894, 895, 7, 101, 2, 2, 895, 228, 3, + 2, 2, 2, 896, 897, 7, 123, 2, 2, 897, 898, 7, 107, 2, 2, 898, 899, 7, 103, + 2, 2, 899, 900, 7, 110, 2, 2, 900, 901, 7, 102, 2, 2, 901, 230, 3, 2, 2, + 2, 902, 903, 7, 99, 2, 2, 903, 904, 7, 112, 2, 2, 904, 905, 7, 123, 2, + 2, 905, 232, 3, 2, 2, 2, 906, 907, 7, 112, 2, 2, 907, 908, 7, 119, 2, 2, + 908, 909, 7, 111, 2, 2, 909, 910, 7, 100, 2, 2, 910, 911, 7, 103, 2, 2, + 911, 912, 7, 116, 2, 2, 912, 234, 3, 2, 2, 2, 913, 914, 7, 100, 2, 2, 914, + 915, 7, 113, 2, 2, 915, 916, 7, 113, 2, 2, 916, 917, 7, 110, 2, 2, 917, + 918, 7, 103, 2, 2, 918, 919, 7, 99, 2, 2, 919, 920, 7, 112, 2, 2, 920, + 236, 3, 2, 2, 2, 921, 922, 7, 117, 2, 2, 922, 923, 7, 118, 2, 2, 923, 924, + 7, 116, 2, 2, 924, 925, 7, 107, 2, 2, 925, 926, 7, 112, 2, 2, 926, 927, + 7, 105, 2, 2, 927, 238, 3, 2, 2, 2, 928, 929, 7, 117, 2, 2, 929, 930, 7, + 123, 2, 2, 930, 931, 7, 111, 2, 2, 931, 932, 7, 100, 2, 2, 932, 933, 7, + 113, 2, 2, 933, 934, 7, 110, 2, 2, 934, 240, 3, 2, 2, 2, 935, 936, 7, 118, + 2, 2, 936, 937, 7, 123, 2, 2, 937, 938, 7, 114, 2, 2, 938, 939, 7, 103, + 2, 2, 939, 242, 3, 2, 2, 2, 940, 941, 7, 105, 2, 2, 941, 942, 7, 103, 2, + 2, 942, 943, 7, 118, 2, 2, 943, 944, 7, 34, 2, 2, 944, 244, 3, 2, 2, 2, + 945, 946, 7, 117, 2, 2, 946, 947, 7, 103, 2, 2, 947, 948, 7, 118, 2, 2, + 948, 949, 7, 34, 2, 2, 949, 246, 3, 2, 2, 2, 950, 951, 7, 101, 2, 2, 951, + 952, 7, 113, 2, 2, 952, 953, 7, 112, 2, 2, 953, 954, 7, 117, 2, 2, 954, + 955, 7, 118, 2, 2, 955, 956, 7, 116, 2, 2, 956, 957, 7, 119, 2, 2, 957, + 958, 7, 101, 2, 2, 958, 959, 7, 118, 2, 2, 959, 960, 7, 113, 2, 2, 960, + 961, 7, 116, 2, 2, 961, 248, 3, 2, 2, 2, 962, 963, 7, 112, 2, 2, 963, 964, + 7, 99, 2, 2, 964, 965, 7, 111, 2, 2, 965, 966, 7, 103, 2, 2, 966, 967, + 7, 117, 2, 2, 967, 968, 7, 114, 2, 2, 968, 969, 7, 99, 2, 2, 969, 970, + 7, 101, 2, 2, 970, 971, 7, 103, 2, 2, 971, 250, 3, 2, 2, 2, 972, 973, 7, + 116, 2, 2, 973, 974, 7, 103, 2, 2, 974, 975, 7, 115, 2, 2, 975, 976, 7, + 119, 2, 2, 976, 977, 7, 107, 2, 2, 977, 978, 7, 116, 2, 2, 978, 979, 7, + 103, 2, 2, 979, 252, 3, 2, 2, 2, 980, 981, 7, 111, 2, 2, 981, 982, 7, 113, + 2, 2, 982, 983, 7, 102, 2, 2, 983, 984, 7, 119, 2, 2, 984, 985, 7, 110, + 2, 2, 985, 986, 7, 103, 2, 2, 986, 254, 3, 2, 2, 2, 987, 988, 7, 102, 2, + 2, 988, 989, 7, 103, 2, 2, 989, 990, 7, 101, 2, 2, 990, 991, 7, 110, 2, + 2, 991, 992, 7, 99, 2, 2, 992, 993, 7, 116, 2, 2, 993, 994, 7, 103, 2, + 2, 994, 256, 3, 2, 2, 2, 995, 996, 7, 99, 2, 2, 996, 997, 7, 100, 2, 2, + 997, 998, 7, 117, 2, 2, 998, 999, 7, 118, 2, 2, 999, 1000, 7, 116, 2, 2, + 1000, 1001, 7, 99, 2, 2, 1001, 1002, 7, 101, 2, 2, 1002, 1003, 7, 118, + 2, 2, 1003, 258, 3, 2, 2, 2, 1004, 1005, 7, 107, 2, 2, 1005, 1006, 7, 117, + 2, 2, 1006, 260, 3, 2, 2, 2, 1007, 1008, 7, 66, 2, 2, 1008, 262, 3, 2, + 2, 2, 1009, 1013, 5, 309, 155, 2, 1010, 1012, 5, 307, 154, 2, 1011, 1010, + 3, 2, 2, 2, 1012, 1015, 3, 2, 2, 2, 1013, 1011, 3, 2, 2, 2, 1013, 1014, + 3, 2, 2, 2, 1014, 264, 3, 2, 2, 2, 1015, 1013, 3, 2, 2, 2, 1016, 1020, + 7, 36, 2, 2, 1017, 1019, 5, 279, 140, 2, 1018, 1017, 3, 2, 2, 2, 1019, + 1022, 3, 2, 2, 2, 1020, 1018, 3, 2, 2, 2, 1020, 1021, 3, 2, 2, 2, 1021, + 1023, 3, 2, 2, 2, 1022, 1020, 3, 2, 2, 2, 1023, 1033, 7, 36, 2, 2, 1024, + 1028, 7, 41, 2, 2, 1025, 1027, 5, 281, 141, 2, 1026, 1025, 3, 2, 2, 2, + 1027, 1030, 3, 2, 2, 2, 1028, 1026, 3, 2, 2, 2, 1028, 1029, 3, 2, 2, 2, + 1029, 1031, 3, 2, 2, 2, 1030, 1028, 3, 2, 2, 2, 1031, 1033, 7, 41, 2, 2, + 1032, 1016, 3, 2, 2, 2, 1032, 1024, 3, 2, 2, 2, 1033, 1034, 3, 2, 2, 2, + 1034, 1035, 8, 133, 5, 2, 1035, 266, 3, 2, 2, 2, 1036, 1042, 7, 98, 2, + 2, 1037, 1038, 7, 94, 2, 2, 1038, 1041, 7, 98, 2, 2, 1039, 1041, 10, 9, + 2, 2, 1040, 1037, 3, 2, 2, 2, 1040, 1039, 3, 2, 2, 2, 1041, 1044, 3, 2, + 2, 2, 1042, 1040, 3, 2, 2, 2, 1042, 1043, 3, 2, 2, 2, 1043, 1045, 3, 2, + 2, 2, 1044, 1042, 3, 2, 2, 2, 1045, 1046, 7, 98, 2, 2, 1046, 268, 3, 2, + 2, 2, 1047, 1049, 9, 10, 2, 2, 1048, 1047, 3, 2, 2, 2, 1049, 1050, 3, 2, + 2, 2, 1050, 1048, 3, 2, 2, 2, 1050, 1051, 3, 2, 2, 2, 1051, 1052, 3, 2, + 2, 2, 1052, 1053, 8, 135, 2, 2, 1053, 270, 3, 2, 2, 2, 1054, 1055, 9, 2, + 2, 2, 1055, 1056, 3, 2, 2, 2, 1056, 1057, 8, 136, 2, 2, 1057, 272, 3, 2, + 2, 2, 1058, 1059, 7, 62, 2, 2, 1059, 1060, 7, 35, 2, 2, 1060, 1061, 7, + 47, 2, 2, 1061, 1062, 7, 47, 2, 2, 1062, 1066, 3, 2, 2, 2, 1063, 1065, + 11, 2, 2, 2, 1064, 1063, 3, 2, 2, 2, 1065, 1068, 3, 2, 2, 2, 1066, 1067, + 3, 2, 2, 2, 1066, 1064, 3, 2, 2, 2, 1067, 1069, 3, 2, 2, 2, 1068, 1066, + 3, 2, 2, 2, 1069, 1070, 7, 47, 2, 2, 1070, 1071, 7, 47, 2, 2, 1071, 1072, + 7, 64, 2, 2, 1072, 1073, 3, 2, 2, 2, 1073, 1074, 8, 137, 2, 2, 1074, 274, + 3, 2, 2, 2, 1075, 1076, 7, 62, 2, 2, 1076, 1077, 7, 35, 2, 2, 1077, 1078, + 7, 93, 2, 2, 1078, 1079, 7, 69, 2, 2, 1079, 1080, 7, 70, 2, 2, 1080, 1081, + 7, 67, 2, 2, 1081, 1082, 7, 86, 2, 2, 1082, 1083, 7, 67, 2, 2, 1083, 1084, + 7, 93, 2, 2, 1084, 1088, 3, 2, 2, 2, 1085, 1087, 11, 2, 2, 2, 1086, 1085, + 3, 2, 2, 2, 1087, 1090, 3, 2, 2, 2, 1088, 1089, 3, 2, 2, 2, 1088, 1086, + 3, 2, 2, 2, 1089, 1091, 3, 2, 2, 2, 1090, 1088, 3, 2, 2, 2, 1091, 1092, + 7, 95, 2, 2, 1092, 1093, 7, 95, 2, 2, 1093, 1094, 7, 64, 2, 2, 1094, 1095, + 3, 2, 2, 2, 1095, 1096, 8, 138, 2, 2, 1096, 276, 3, 2, 2, 2, 1097, 1098, + 11, 2, 2, 2, 1098, 1099, 3, 2, 2, 2, 1099, 1100, 8, 139, 6, 2, 1100, 278, + 3, 2, 2, 2, 1101, 1106, 10, 11, 2, 2, 1102, 1103, 7, 94, 2, 2, 1103, 1106, + 5, 283, 142, 2, 1104, 1106, 5, 299, 150, 2, 1105, 1101, 3, 2, 2, 2, 1105, + 1102, 3, 2, 2, 2, 1105, 1104, 3, 2, 2, 2, 1106, 280, 3, 2, 2, 2, 1107, + 1112, 10, 12, 2, 2, 1108, 1109, 7, 94, 2, 2, 1109, 1112, 5, 283, 142, 2, + 1110, 1112, 5, 299, 150, 2, 1111, 1107, 3, 2, 2, 2, 1111, 1108, 3, 2, 2, + 2, 1111, 1110, 3, 2, 2, 2, 1112, 282, 3, 2, 2, 2, 1113, 1119, 5, 285, 143, + 2, 1114, 1119, 7, 50, 2, 2, 1115, 1119, 5, 287, 144, 2, 1116, 1119, 5, + 289, 145, 2, 1117, 1119, 5, 291, 146, 2, 1118, 1113, 3, 2, 2, 2, 1118, + 1114, 3, 2, 2, 2, 1118, 1115, 3, 2, 2, 2, 1118, 1116, 3, 2, 2, 2, 1118, + 1117, 3, 2, 2, 2, 1119, 284, 3, 2, 2, 2, 1120, 1123, 5, 293, 147, 2, 1121, + 1123, 5, 295, 148, 2, 1122, 1120, 3, 2, 2, 2, 1122, 1121, 3, 2, 2, 2, 1123, + 286, 3, 2, 2, 2, 1124, 1125, 7, 122, 2, 2, 1125, 1126, 5, 301, 151, 2, + 1126, 1127, 5, 301, 151, 2, 1127, 288, 3, 2, 2, 2, 1128, 1129, 7, 119, + 2, 2, 1129, 1130, 5, 301, 151, 2, 1130, 1131, 5, 301, 151, 2, 1131, 1132, + 5, 301, 151, 2, 1132, 1133, 5, 301, 151, 2, 1133, 290, 3, 2, 2, 2, 1134, + 1135, 7, 119, 2, 2, 1135, 1137, 7, 125, 2, 2, 1136, 1138, 5, 301, 151, + 2, 1137, 1136, 3, 2, 2, 2, 1138, 1139, 3, 2, 2, 2, 1139, 1137, 3, 2, 2, + 2, 1139, 1140, 3, 2, 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 7, 127, + 2, 2, 1142, 292, 3, 2, 2, 2, 1143, 1144, 9, 13, 2, 2, 1144, 294, 3, 2, + 2, 2, 1145, 1146, 10, 14, 2, 2, 1146, 296, 3, 2, 2, 2, 1147, 1150, 5, 293, + 147, 2, 1148, 1150, 9, 15, 2, 2, 1149, 1147, 3, 2, 2, 2, 1149, 1148, 3, + 2, 2, 2, 1150, 298, 3, 2, 2, 2, 1151, 1152, 7, 94, 2, 2, 1152, 1153, 9, + 2, 2, 2, 1153, 300, 3, 2, 2, 2, 1154, 1155, 9, 16, 2, 2, 1155, 302, 3, + 2, 2, 2, 1156, 1165, 7, 50, 2, 2, 1157, 1161, 9, 17, 2, 2, 1158, 1160, + 9, 3, 2, 2, 1159, 1158, 3, 2, 2, 2, 1160, 1163, 3, 2, 2, 2, 1161, 1159, + 3, 2, 2, 2, 1161, 1162, 3, 2, 2, 2, 1162, 1165, 3, 2, 2, 2, 1163, 1161, + 3, 2, 2, 2, 1164, 1156, 3, 2, 2, 2, 1164, 1157, 3, 2, 2, 2, 1165, 304, + 3, 2, 2, 2, 1166, 1168, 9, 18, 2, 2, 1167, 1169, 9, 19, 2, 2, 1168, 1167, + 3, 2, 2, 2, 1168, 1169, 3, 2, 2, 2, 1169, 1171, 3, 2, 2, 2, 1170, 1172, + 9, 3, 2, 2, 1171, 1170, 3, 2, 2, 2, 1172, 1173, 3, 2, 2, 2, 1173, 1171, + 3, 2, 2, 2, 1173, 1174, 3, 2, 2, 2, 1174, 306, 3, 2, 2, 2, 1175, 1181, + 5, 309, 155, 2, 1176, 1181, 5, 313, 157, 2, 1177, 1181, 5, 315, 158, 2, + 1178, 1181, 5, 317, 159, 2, 1179, 1181, 4, 8206, 8207, 2, 1180, 1175, 3, + 2, 2, 2, 1180, 1176, 3, 2, 2, 2, 1180, 1177, 3, 2, 2, 2, 1180, 1178, 3, + 2, 2, 2, 1180, 1179, 3, 2, 2, 2, 1181, 308, 3, 2, 2, 2, 1182, 1187, 5, + 311, 156, 2, 1183, 1187, 9, 20, 2, 2, 1184, 1185, 7, 94, 2, 2, 1185, 1187, + 5, 289, 145, 2, 1186, 1182, 3, 2, 2, 2, 1186, 1183, 3, 2, 2, 2, 1186, 1184, + 3, 2, 2, 2, 1187, 310, 3, 2, 2, 2, 1188, 1190, 9, 21, 2, 2, 1189, 1188, + 3, 2, 2, 2, 1190, 312, 3, 2, 2, 2, 1191, 1193, 9, 22, 2, 2, 1192, 1191, + 3, 2, 2, 2, 1193, 314, 3, 2, 2, 2, 1194, 1196, 9, 23, 2, 2, 1195, 1194, + 3, 2, 2, 2, 1196, 316, 3, 2, 2, 2, 1197, 1199, 9, 24, 2, 2, 1198, 1197, + 3, 2, 2, 2, 1199, 318, 3, 2, 2, 2, 1200, 1211, 10, 25, 2, 2, 1201, 1211, + 5, 325, 163, 2, 1202, 1206, 7, 93, 2, 2, 1203, 1205, 5, 323, 162, 2, 1204, + 1203, 3, 2, 2, 2, 1205, 1208, 3, 2, 2, 2, 1206, 1204, 3, 2, 2, 2, 1206, + 1207, 3, 2, 2, 2, 1207, 1209, 3, 2, 2, 2, 1208, 1206, 3, 2, 2, 2, 1209, + 1211, 7, 95, 2, 2, 1210, 1200, 3, 2, 2, 2, 1210, 1201, 3, 2, 2, 2, 1210, + 1202, 3, 2, 2, 2, 1211, 320, 3, 2, 2, 2, 1212, 1223, 10, 26, 2, 2, 1213, + 1223, 5, 325, 163, 2, 1214, 1218, 7, 93, 2, 2, 1215, 1217, 5, 323, 162, + 2, 1216, 1215, 3, 2, 2, 2, 1217, 1220, 3, 2, 2, 2, 1218, 1216, 3, 2, 2, + 2, 1218, 1219, 3, 2, 2, 2, 1219, 1221, 3, 2, 2, 2, 1220, 1218, 3, 2, 2, + 2, 1221, 1223, 7, 95, 2, 2, 1222, 1212, 3, 2, 2, 2, 1222, 1213, 3, 2, 2, + 2, 1222, 1214, 3, 2, 2, 2, 1223, 322, 3, 2, 2, 2, 1224, 1227, 10, 27, 2, + 2, 1225, 1227, 5, 325, 163, 2, 1226, 1224, 3, 2, 2, 2, 1226, 1225, 3, 2, + 2, 2, 1227, 324, 3, 2, 2, 2, 1228, 1229, 7, 94, 2, 2, 1229, 1230, 10, 2, + 2, 2, 1230, 326, 3, 2, 2, 2, 49, 2, 334, 343, 357, 367, 375, 544, 551, + 555, 561, 564, 568, 570, 577, 583, 592, 599, 1013, 1020, 1028, 1032, 1040, + 1042, 1050, 1066, 1088, 1105, 1111, 1118, 1122, 1139, 1149, 1161, 1164, + 1168, 1173, 1180, 1186, 1189, 1192, 1195, 1198, 1206, 1210, 1218, 1222, + 1226, 7, 2, 3, 2, 3, 10, 2, 3, 11, 3, 3, 133, 4, 2, 4, 2, +} + +var lexerDeserializer = antlr.NewATNDeserializer(nil) +var lexerAtn = lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn) + +var lexerChannelNames = []string{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", "ERROR", +} + +var lexerModeNames = []string{ + "DEFAULT_MODE", +} + +var lexerLiteralNames = []string{ + "", "", "", "", "", "'['", "']'", "'('", "')'", "'{'", "'}'", "';'", "','", + "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", "'-'", "'~'", + "'!'", "'*'", "'_'", "'$'", "'/'", "'%'", "'**'", "'??'", "'#'", "'>>'", + "'<<'", "'>>>'", "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'==='", + "'!=='", "'&'", "'^'", "'|'", "'&&'", "'||'", "'*='", "'/='", "'%='", "'+='", + "'-='", "'<<='", "'>>='", "'>>>='", "'&='", "'^='", "'|='", "'=>'", "'**='", + "'null'", "", "", "", "", "", "", "'break'", "'do'", "'instanceof'", "'typeof'", + "'case'", "'else'", "'new'", "'var'", "'catch'", "'finally'", "'return'", + "'void'", "'continue'", "'for'", "'switch'", "'while'", "'debugger'", "'function'", + "'this'", "'with'", "'default'", "'if'", "'throw'", "'delete'", "'in'", + "'try'", "'as'", "'from'", "'readonly'", "'async'", "'class'", "'enum'", + "'extends'", "'super'", "'const'", "'export'", "'import'", "'await'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", "'any'", "'number'", "'boolean'", "'string'", "'symbol'", + "'type'", "'get '", "'set '", "'constructor'", "'namespace'", "'require'", + "'module'", "'declare'", "'abstract'", "'is'", "'@'", +} + +var lexerSymbolicNames = []string{ + "", "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Lodash", "Dollar", "Divide", "Modulus", "Power", "NullCoalesce", + "Hashtag", "RightShiftArithmetic", "LeftShiftArithmetic", "RightShiftLogical", + "LessThan", "MoreThan", "LessThanEquals", "GreaterThanEquals", "Equals_", + "NotEquals", "IdentityEquals", "IdentityNotEquals", "BitAnd", "BitXOr", + "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", + "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "ARROW", "PowerAssign", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "Break", "Do", "Instanceof", "Typeof", "Case", "Else", "New", "Var", "Catch", + "Finally", "Return", "Void", "Continue", "For", "Switch", "While", "Debugger", + "Function", "This", "With", "Default", "If", "Throw", "Delete", "In", "Try", + "As", "From", "ReadOnly", "Async", "NodeName", "Enum", "Extends", "Super", + "Const", "Export", "Import", "Await", "Implements", "Let", "Private", "Public", + "Interface", "Package", "Protected", "Static", "Yield", "ANY", "NUMBER", + "BOOLEAN", "STRING", "SYMBOL", "TypeType", "Get", "Set", "Constructor", "Namespace", + "Require", "Module", "Declare", "Abstract", "Is", "At", "Identifier", "StringLiteral", + "TemplateStringLiteral", "WhiteSpaces", "LineTerminator", "HtmlComment", + "CDataComment", "UnexpectedCharacter", +} + +var lexerRuleNames = []string{ + "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Lodash", "Dollar", "Divide", "Modulus", "Power", "NullCoalesce", + "Hashtag", "RightShiftArithmetic", "LeftShiftArithmetic", "RightShiftLogical", + "LessThan", "MoreThan", "LessThanEquals", "GreaterThanEquals", "Equals_", + "NotEquals", "IdentityEquals", "IdentityNotEquals", "BitAnd", "BitXOr", + "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", + "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "ARROW", "PowerAssign", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "Break", "Do", "Instanceof", "Typeof", "Case", "Else", "New", "Var", "Catch", + "Finally", "Return", "Void", "Continue", "For", "Switch", "While", "Debugger", + "Function", "This", "With", "Default", "If", "Throw", "Delete", "In", "Try", + "As", "From", "ReadOnly", "Async", "NodeName", "Enum", "Extends", "Super", + "Const", "Export", "Import", "Await", "Implements", "Let", "Private", "Public", + "Interface", "Package", "Protected", "Static", "Yield", "ANY", "NUMBER", + "BOOLEAN", "STRING", "SYMBOL", "TypeType", "Get", "Set", "Constructor", "Namespace", + "Require", "Module", "Declare", "Abstract", "Is", "At", "Identifier", "StringLiteral", + "TemplateStringLiteral", "WhiteSpaces", "LineTerminator", "HtmlComment", + "CDataComment", "UnexpectedCharacter", "DoubleStringCharacter", "SingleStringCharacter", + "EscapeSequence", "CharacterEscapeSequence", "HexEscapeSequence", "UnicodeEscapeSequence", + "ExtendedUnicodeEscapeSequence", "SingleEscapeCharacter", "NonEscapeCharacter", + "EscapeCharacter", "LineContinuation", "HexDigit", "DecimalIntegerLiteral", + "ExponentPart", "IdentifierPart", "IdentifierStart", "UnicodeLetter", "UnicodeCombiningMark", + "UnicodeDigit", "UnicodeConnectorPunctuation", "RegularExpressionFirstChar", + "RegularExpressionChar", "RegularExpressionClassChar", "RegularExpressionBackslashSequence", +} + +type TypeScriptLexer struct { + TypeScriptBaseLexer + channelNames []string + modeNames []string + // TODO: EOF string +} + +var lexerDecisionToDFA = make([]*antlr.DFA, len(lexerAtn.DecisionToState)) + +func init() { + for index, ds := range lexerAtn.DecisionToState { + lexerDecisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +func NewTypeScriptLexer(input antlr.CharStream) *TypeScriptLexer { + + l := new(TypeScriptLexer) + + l.BaseLexer = antlr.NewBaseLexer(input) + l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache()) + + l.channelNames = lexerChannelNames + l.modeNames = lexerModeNames + l.RuleNames = lexerRuleNames + l.LiteralNames = lexerLiteralNames + l.SymbolicNames = lexerSymbolicNames + l.GrammarFileName = "TypeScriptLexer.g4" + // TODO: l.EOF = antlr.TokenEOF + + return l +} + +// TypeScriptLexer tokens. +const ( + TypeScriptLexerHashBangLine = 1 + TypeScriptLexerMultiLineComment = 2 + TypeScriptLexerSingleLineComment = 3 + TypeScriptLexerRegularExpressionLiteral = 4 + TypeScriptLexerOpenBracket = 5 + TypeScriptLexerCloseBracket = 6 + TypeScriptLexerOpenParen = 7 + TypeScriptLexerCloseParen = 8 + TypeScriptLexerOpenBrace = 9 + TypeScriptLexerCloseBrace = 10 + TypeScriptLexerSemiColon = 11 + TypeScriptLexerComma = 12 + TypeScriptLexerAssign = 13 + TypeScriptLexerQuestionMark = 14 + TypeScriptLexerColon = 15 + TypeScriptLexerEllipsis = 16 + TypeScriptLexerDot = 17 + TypeScriptLexerPlusPlus = 18 + TypeScriptLexerMinusMinus = 19 + TypeScriptLexerPlus = 20 + TypeScriptLexerMinus = 21 + TypeScriptLexerBitNot = 22 + TypeScriptLexerNot = 23 + TypeScriptLexerMultiply = 24 + TypeScriptLexerLodash = 25 + TypeScriptLexerDollar = 26 + TypeScriptLexerDivide = 27 + TypeScriptLexerModulus = 28 + TypeScriptLexerPower = 29 + TypeScriptLexerNullCoalesce = 30 + TypeScriptLexerHashtag = 31 + TypeScriptLexerRightShiftArithmetic = 32 + TypeScriptLexerLeftShiftArithmetic = 33 + TypeScriptLexerRightShiftLogical = 34 + TypeScriptLexerLessThan = 35 + TypeScriptLexerMoreThan = 36 + TypeScriptLexerLessThanEquals = 37 + TypeScriptLexerGreaterThanEquals = 38 + TypeScriptLexerEquals_ = 39 + TypeScriptLexerNotEquals = 40 + TypeScriptLexerIdentityEquals = 41 + TypeScriptLexerIdentityNotEquals = 42 + TypeScriptLexerBitAnd = 43 + TypeScriptLexerBitXOr = 44 + TypeScriptLexerBitOr = 45 + TypeScriptLexerAnd = 46 + TypeScriptLexerOr = 47 + TypeScriptLexerMultiplyAssign = 48 + TypeScriptLexerDivideAssign = 49 + TypeScriptLexerModulusAssign = 50 + TypeScriptLexerPlusAssign = 51 + TypeScriptLexerMinusAssign = 52 + TypeScriptLexerLeftShiftArithmeticAssign = 53 + TypeScriptLexerRightShiftArithmeticAssign = 54 + TypeScriptLexerRightShiftLogicalAssign = 55 + TypeScriptLexerBitAndAssign = 56 + TypeScriptLexerBitXorAssign = 57 + TypeScriptLexerBitOrAssign = 58 + TypeScriptLexerARROW = 59 + TypeScriptLexerPowerAssign = 60 + TypeScriptLexerNullLiteral = 61 + TypeScriptLexerBooleanLiteral = 62 + TypeScriptLexerDecimalLiteral = 63 + TypeScriptLexerHexIntegerLiteral = 64 + TypeScriptLexerOctalIntegerLiteral = 65 + TypeScriptLexerOctalIntegerLiteral2 = 66 + TypeScriptLexerBinaryIntegerLiteral = 67 + TypeScriptLexerBreak = 68 + TypeScriptLexerDo = 69 + TypeScriptLexerInstanceof = 70 + TypeScriptLexerTypeof = 71 + TypeScriptLexerCase = 72 + TypeScriptLexerElse = 73 + TypeScriptLexerNew = 74 + TypeScriptLexerVar = 75 + TypeScriptLexerCatch = 76 + TypeScriptLexerFinally = 77 + TypeScriptLexerReturn = 78 + TypeScriptLexerVoid = 79 + TypeScriptLexerContinue = 80 + TypeScriptLexerFor = 81 + TypeScriptLexerSwitch = 82 + TypeScriptLexerWhile = 83 + TypeScriptLexerDebugger = 84 + TypeScriptLexerFunction = 85 + TypeScriptLexerThis = 86 + TypeScriptLexerWith = 87 + TypeScriptLexerDefault = 88 + TypeScriptLexerIf = 89 + TypeScriptLexerThrow = 90 + TypeScriptLexerDelete = 91 + TypeScriptLexerIn = 92 + TypeScriptLexerTry = 93 + TypeScriptLexerAs = 94 + TypeScriptLexerFrom = 95 + TypeScriptLexerReadOnly = 96 + TypeScriptLexerAsync = 97 + TypeScriptLexerClass = 98 + TypeScriptLexerEnum = 99 + TypeScriptLexerExtends = 100 + TypeScriptLexerSuper = 101 + TypeScriptLexerConst = 102 + TypeScriptLexerExport = 103 + TypeScriptLexerImport = 104 + TypeScriptLexerAwait = 105 + TypeScriptLexerImplements = 106 + TypeScriptLexerLet = 107 + TypeScriptLexerPrivate = 108 + TypeScriptLexerPublic = 109 + TypeScriptLexerInterface = 110 + TypeScriptLexerPackage = 111 + TypeScriptLexerProtected = 112 + TypeScriptLexerStatic = 113 + TypeScriptLexerYield = 114 + TypeScriptLexerANY = 115 + TypeScriptLexerNUMBER = 116 + TypeScriptLexerBOOLEAN = 117 + TypeScriptLexerSTRING = 118 + TypeScriptLexerSYMBOL = 119 + TypeScriptLexerType = 120 + TypeScriptLexerGet = 121 + TypeScriptLexerSet = 122 + TypeScriptLexerConstructor = 123 + TypeScriptLexerNamespace = 124 + TypeScriptLexerRequire = 125 + TypeScriptLexerModule = 126 + TypeScriptLexerDeclare = 127 + TypeScriptLexerAbstract = 128 + TypeScriptLexerIs = 129 + TypeScriptLexerAt = 130 + TypeScriptLexerIdentifier = 131 + TypeScriptLexerStringLiteral = 132 + TypeScriptLexerTemplateStringLiteral = 133 + TypeScriptLexerWhiteSpaces = 134 + TypeScriptLexerLineTerminator = 135 + TypeScriptLexerHtmlComment = 136 + TypeScriptLexerCDataComment = 137 + TypeScriptLexerUnexpectedCharacter = 138 +) + +// TypeScriptLexerERROR is the TypeScriptLexer channel. +const TypeScriptLexerERROR = 2 + +func (l *TypeScriptLexer) Action(localctx antlr.RuleContext, ruleIndex, actionIndex int) { + switch ruleIndex { + case 8: + l.OpenBrace_Action(localctx, actionIndex) + + case 9: + l.CloseBrace_Action(localctx, actionIndex) + + case 131: + l.StringLiteral_Action(localctx, actionIndex) + + default: + panic("No registered action for: " + fmt.Sprint(ruleIndex)) + } +} + +func (l *TypeScriptLexer) OpenBrace_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 0: + l.ProcessOpenBrace() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *TypeScriptLexer) CloseBrace_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 1: + l.ProcessCloseBrace() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} +func (l *TypeScriptLexer) StringLiteral_Action(localctx antlr.RuleContext, actionIndex int) { + switch actionIndex { + case 2: + l.ProcessStringLiteral() + + default: + panic("No registered action for: " + fmt.Sprint(actionIndex)) + } +} + +func (l *TypeScriptLexer) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { + switch ruleIndex { + case 0: + return l.HashBangLine_Sempred(localctx, predIndex) + + case 3: + return l.RegularExpressionLiteral_Sempred(localctx, predIndex) + + case 64: + return l.OctalIntegerLiteral_Sempred(localctx, predIndex) + + default: + panic("No registered predicate for: " + fmt.Sprint(ruleIndex)) + } +} + +func (p *TypeScriptLexer) HashBangLine_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 0: + return p.IsStartOfFile() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TypeScriptLexer) RegularExpressionLiteral_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 1: + return p.IsRegexPossible() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TypeScriptLexer) OctalIntegerLiteral_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 2: + return !p.IsStrictMode() + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} diff --git a/languages/ts/typescript_parser.go b/languages/ts/typescript_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..b29d302e27d7cc932782e9d1785d784e9e21a6c5 --- /dev/null +++ b/languages/ts/typescript_parser.go @@ -0,0 +1,27397 @@ +// Code generated from TypeScriptParser.g4 by ANTLR 4.7.2. DO NOT EDIT. + +package parser // TypeScriptParser + +import ( + "fmt" + "reflect" + "strconv" + + "github.com/antlr/antlr4/runtime/Go/antlr" +) + +// Suppress unused import errors +var _ = fmt.Printf +var _ = reflect.Copy +var _ = strconv.Itoa + +var parserATN = []uint16{ + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 140, 1723, + 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, + 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, + 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, + 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, + 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, + 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, + 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, + 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, + 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, + 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, + 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, + 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, + 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, + 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, + 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, + 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, + 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, + 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, + 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, + 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, + 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, + 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, + 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, + 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, + 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, + 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, + 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, + 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 3, 2, 3, 2, 3, + 2, 3, 3, 3, 3, 5, 3, 288, 10, 3, 3, 4, 3, 4, 5, 4, 292, 10, 4, 3, 4, 3, + 4, 3, 5, 3, 5, 3, 5, 7, 5, 299, 10, 5, 12, 5, 14, 5, 302, 11, 5, 3, 6, + 3, 6, 5, 6, 306, 10, 6, 3, 6, 5, 6, 309, 10, 6, 3, 7, 3, 7, 3, 7, 3, 8, + 3, 8, 5, 8, 316, 10, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 7, 9, 323, 10, 9, + 12, 9, 14, 9, 326, 11, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, + 11, 5, 11, 335, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, + 3, 12, 3, 12, 7, 12, 346, 10, 12, 12, 12, 14, 12, 349, 11, 12, 3, 13, 3, + 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, + 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 369, 10, 13, 3, 13, 3, + 13, 3, 13, 3, 13, 7, 13, 375, 10, 13, 12, 13, 14, 13, 378, 11, 13, 3, 14, + 3, 14, 3, 15, 3, 15, 3, 15, 5, 15, 385, 10, 15, 3, 16, 3, 16, 3, 16, 3, + 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, + 400, 10, 17, 3, 18, 3, 18, 5, 18, 404, 10, 18, 3, 19, 3, 19, 5, 19, 408, + 10, 19, 3, 19, 3, 19, 3, 20, 3, 20, 5, 20, 414, 10, 20, 3, 21, 3, 21, 3, + 21, 7, 21, 419, 10, 21, 12, 21, 14, 21, 422, 11, 21, 3, 22, 3, 22, 3, 22, + 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 431, 10, 22, 5, 22, 433, 10, 22, 3, + 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, + 3, 25, 7, 25, 447, 10, 25, 12, 25, 14, 25, 450, 11, 25, 3, 26, 5, 26, 453, + 10, 26, 3, 26, 3, 26, 5, 26, 457, 10, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, + 27, 3, 27, 5, 27, 465, 10, 27, 3, 27, 3, 27, 5, 27, 469, 10, 27, 3, 27, + 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 6, + 29, 482, 10, 29, 13, 29, 14, 29, 483, 3, 29, 3, 29, 5, 29, 488, 10, 29, + 3, 30, 5, 30, 491, 10, 30, 3, 30, 3, 30, 5, 30, 495, 10, 30, 3, 30, 5, + 30, 498, 10, 30, 3, 30, 3, 30, 5, 30, 502, 10, 30, 3, 31, 3, 31, 3, 31, + 3, 32, 5, 32, 508, 10, 32, 3, 32, 3, 32, 5, 32, 512, 10, 32, 3, 32, 3, + 32, 5, 32, 516, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 7, 33, 522, 10, 33, + 12, 33, 14, 33, 525, 11, 33, 3, 33, 3, 33, 3, 33, 5, 33, 530, 10, 33, 3, + 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 537, 10, 33, 3, 33, 5, 33, 540, + 10, 33, 5, 33, 542, 10, 33, 5, 33, 544, 10, 33, 3, 34, 3, 34, 3, 34, 7, + 34, 549, 10, 34, 12, 34, 14, 34, 552, 11, 34, 3, 35, 5, 35, 555, 10, 35, + 3, 35, 5, 35, 558, 10, 35, 3, 35, 3, 35, 5, 35, 562, 10, 35, 3, 36, 3, + 36, 3, 37, 3, 37, 5, 37, 568, 10, 37, 3, 38, 3, 38, 3, 38, 7, 38, 573, + 10, 38, 12, 38, 14, 38, 576, 11, 38, 3, 39, 5, 39, 579, 10, 39, 3, 39, + 5, 39, 582, 10, 39, 3, 39, 3, 39, 3, 39, 5, 39, 587, 10, 39, 3, 39, 5, + 39, 590, 10, 39, 3, 39, 5, 39, 593, 10, 39, 3, 40, 3, 40, 3, 40, 3, 40, + 5, 40, 599, 10, 40, 3, 41, 3, 41, 5, 41, 603, 10, 41, 3, 41, 3, 41, 5, + 41, 607, 10, 41, 3, 41, 3, 41, 5, 41, 611, 10, 41, 3, 42, 3, 42, 3, 42, + 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 5, 43, 622, 10, 43, 3, 43, 3, + 43, 3, 44, 3, 44, 3, 44, 5, 44, 629, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, + 3, 45, 5, 45, 636, 10, 45, 3, 45, 3, 45, 3, 45, 5, 45, 641, 10, 45, 3, + 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 649, 10, 45, 3, 46, 5, 46, + 652, 10, 46, 3, 46, 3, 46, 3, 46, 5, 46, 657, 10, 46, 3, 46, 5, 46, 660, + 10, 46, 3, 46, 3, 46, 5, 46, 664, 10, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, + 48, 3, 48, 7, 48, 672, 10, 48, 12, 48, 14, 48, 675, 11, 48, 3, 49, 5, 49, + 678, 10, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 684, 10, 49, 3, 49, 3, + 49, 3, 50, 3, 50, 5, 50, 690, 10, 50, 3, 51, 3, 51, 3, 51, 7, 51, 695, + 10, 51, 12, 51, 14, 51, 698, 11, 51, 3, 52, 3, 52, 3, 52, 5, 52, 703, 10, + 52, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 709, 10, 53, 3, 53, 3, 53, 3, 54, + 3, 54, 6, 54, 715, 10, 54, 13, 54, 14, 54, 716, 3, 54, 7, 54, 720, 10, + 54, 12, 54, 14, 54, 723, 11, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, + 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 737, 10, 55, 3, 56, + 3, 56, 3, 57, 6, 57, 742, 10, 57, 13, 57, 14, 57, 743, 3, 58, 3, 58, 3, + 58, 5, 58, 749, 10, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, + 757, 10, 59, 3, 59, 3, 59, 3, 59, 7, 59, 762, 10, 59, 12, 59, 14, 59, 765, + 11, 59, 3, 60, 3, 60, 3, 60, 3, 61, 5, 61, 771, 10, 61, 3, 61, 3, 61, 3, + 62, 5, 62, 776, 10, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, + 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, + 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, + 3, 63, 3, 63, 3, 63, 5, 63, 809, 10, 63, 3, 64, 3, 64, 5, 64, 813, 10, + 64, 3, 64, 3, 64, 3, 65, 6, 65, 818, 10, 65, 13, 65, 14, 65, 819, 3, 66, + 3, 66, 3, 66, 3, 66, 5, 66, 826, 10, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, + 67, 3, 67, 5, 67, 834, 10, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, + 3, 68, 5, 68, 843, 10, 68, 3, 68, 3, 68, 5, 68, 847, 10, 68, 3, 68, 3, + 68, 3, 68, 3, 69, 3, 69, 3, 69, 5, 69, 855, 10, 69, 3, 69, 3, 69, 3, 69, + 3, 69, 7, 69, 861, 10, 69, 12, 69, 14, 69, 864, 11, 69, 3, 69, 3, 69, 3, + 70, 3, 70, 5, 70, 870, 10, 70, 3, 70, 3, 70, 5, 70, 874, 10, 70, 3, 71, + 3, 71, 5, 71, 878, 10, 71, 3, 71, 3, 71, 5, 71, 882, 10, 71, 3, 71, 5, + 71, 885, 10, 71, 3, 71, 5, 71, 888, 10, 71, 3, 71, 5, 71, 891, 10, 71, + 3, 71, 3, 71, 5, 71, 895, 10, 71, 5, 71, 897, 10, 71, 3, 72, 3, 72, 3, + 72, 7, 72, 902, 10, 72, 12, 72, 14, 72, 905, 11, 72, 3, 73, 3, 73, 5, 73, + 909, 10, 73, 3, 73, 5, 73, 912, 10, 73, 3, 73, 3, 73, 5, 73, 916, 10, 73, + 3, 73, 5, 73, 919, 10, 73, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 5, 75, 926, + 10, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 5, 76, 935, 10, + 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, + 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 954, 10, 77, 3, + 77, 3, 77, 5, 77, 958, 10, 77, 3, 77, 3, 77, 5, 77, 962, 10, 77, 3, 77, + 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 972, 10, 77, 3, + 77, 3, 77, 5, 77, 976, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, + 983, 10, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 990, 10, 77, 3, + 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 998, 10, 77, 3, 77, 3, 77, + 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 1006, 10, 77, 3, 77, 3, 77, 3, 77, 3, + 77, 5, 77, 1012, 10, 77, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 5, 79, 1019, + 10, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 5, 80, 1026, 10, 80, 3, 80, + 3, 80, 3, 81, 3, 81, 3, 81, 5, 81, 1033, 10, 81, 3, 81, 3, 81, 3, 82, 3, + 82, 3, 82, 5, 82, 1040, 10, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, + 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 5, + 85, 1058, 10, 85, 3, 85, 3, 85, 5, 85, 1062, 10, 85, 5, 85, 1064, 10, 85, + 3, 85, 3, 85, 3, 86, 6, 86, 1069, 10, 86, 13, 86, 14, 86, 1070, 3, 87, + 3, 87, 3, 87, 3, 87, 5, 87, 1077, 10, 87, 3, 88, 3, 88, 3, 88, 5, 88, 1082, + 10, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, + 3, 91, 3, 91, 3, 91, 3, 91, 5, 91, 1097, 10, 91, 3, 91, 5, 91, 1100, 10, + 91, 3, 92, 3, 92, 3, 92, 5, 92, 1105, 10, 92, 3, 92, 5, 92, 1108, 10, 92, + 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 5, 93, 1115, 10, 93, 3, 94, 3, 94, 3, + 94, 3, 95, 3, 95, 3, 95, 3, 96, 5, 96, 1124, 10, 96, 3, 96, 3, 96, 5, 96, + 1128, 10, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 5, 96, 1137, + 10, 96, 3, 97, 5, 97, 1140, 10, 97, 3, 97, 3, 97, 3, 97, 5, 97, 1145, 10, + 97, 3, 97, 3, 97, 3, 97, 3, 98, 5, 98, 1151, 10, 98, 3, 98, 5, 98, 1154, + 10, 98, 3, 99, 3, 99, 7, 99, 1158, 10, 99, 12, 99, 14, 99, 1161, 11, 99, + 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 102, 3, + 102, 3, 102, 3, 102, 5, 102, 1175, 10, 102, 3, 103, 3, 103, 5, 103, 1179, + 10, 103, 3, 103, 5, 103, 1182, 10, 103, 3, 103, 3, 103, 5, 103, 1186, 10, + 103, 3, 103, 5, 103, 1189, 10, 103, 3, 103, 3, 103, 3, 103, 3, 103, 5, + 103, 1195, 10, 103, 3, 103, 5, 103, 1198, 10, 103, 3, 103, 3, 103, 3, 103, + 3, 103, 3, 103, 3, 103, 3, 103, 5, 103, 1207, 10, 103, 3, 103, 3, 103, + 5, 103, 1211, 10, 103, 3, 103, 5, 103, 1214, 10, 103, 3, 103, 3, 103, 5, + 103, 1218, 10, 103, 3, 103, 5, 103, 1221, 10, 103, 3, 104, 5, 104, 1224, + 10, 104, 3, 104, 5, 104, 1227, 10, 104, 3, 104, 5, 104, 1230, 10, 104, + 3, 104, 5, 104, 1233, 10, 104, 3, 105, 3, 105, 3, 105, 3, 106, 5, 106, + 1239, 10, 106, 3, 106, 3, 106, 3, 106, 5, 106, 1244, 10, 106, 3, 106, 3, + 106, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 5, 107, 1254, 10, + 107, 3, 107, 3, 107, 5, 107, 1258, 10, 107, 3, 107, 3, 107, 3, 107, 3, + 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 108, 7, 108, 1269, 10, 108, 12, + 108, 14, 108, 1272, 11, 108, 3, 108, 5, 108, 1275, 10, 108, 3, 108, 3, + 108, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 110, 7, 110, 1286, + 10, 110, 12, 110, 14, 110, 1289, 11, 110, 3, 110, 5, 110, 1292, 10, 110, + 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 5, 111, 1301, 10, + 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 7, + 112, 1311, 10, 112, 12, 112, 14, 112, 1314, 11, 112, 3, 112, 3, 112, 5, + 112, 1318, 10, 112, 3, 112, 3, 112, 3, 112, 3, 112, 3, 112, 5, 112, 1325, + 10, 112, 5, 112, 1327, 10, 112, 3, 113, 5, 113, 1330, 10, 113, 3, 113, + 3, 113, 5, 113, 1334, 10, 113, 3, 113, 3, 113, 5, 113, 1338, 10, 113, 3, + 114, 3, 114, 3, 114, 3, 115, 5, 115, 1344, 10, 115, 3, 116, 6, 116, 1347, + 10, 116, 13, 116, 14, 116, 1348, 3, 117, 3, 117, 5, 117, 1353, 10, 117, + 3, 117, 3, 117, 3, 118, 3, 118, 6, 118, 1359, 10, 118, 13, 118, 14, 118, + 1360, 3, 118, 7, 118, 1364, 10, 118, 12, 118, 14, 118, 1367, 11, 118, 3, + 118, 6, 118, 1370, 10, 118, 13, 118, 14, 118, 1371, 3, 118, 5, 118, 1375, + 10, 118, 3, 118, 5, 118, 1378, 10, 118, 3, 119, 3, 119, 3, 119, 5, 119, + 1383, 10, 119, 3, 120, 3, 120, 3, 120, 3, 120, 7, 120, 1389, 10, 120, 12, + 120, 14, 120, 1392, 11, 120, 5, 120, 1394, 10, 120, 3, 120, 5, 120, 1397, + 10, 120, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, + 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1412, 10, 121, 3, 121, + 5, 121, 1415, 10, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1420, 10, 121, 3, + 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 3, + 121, 5, 121, 1432, 10, 121, 3, 122, 3, 122, 3, 122, 3, 122, 5, 122, 1438, + 10, 122, 3, 122, 3, 122, 3, 122, 3, 122, 3, 123, 3, 123, 3, 123, 3, 123, + 5, 123, 1448, 10, 123, 3, 123, 5, 123, 1451, 10, 123, 3, 123, 3, 123, 3, + 123, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, 124, 3, + 124, 5, 124, 1465, 10, 124, 3, 125, 3, 125, 3, 125, 3, 125, 7, 125, 1471, + 10, 125, 12, 125, 14, 125, 1474, 11, 125, 3, 125, 3, 125, 5, 125, 1478, + 10, 125, 3, 125, 5, 125, 1481, 10, 125, 3, 125, 3, 125, 3, 126, 3, 126, + 3, 126, 3, 127, 3, 127, 3, 127, 7, 127, 1491, 10, 127, 12, 127, 14, 127, + 1494, 11, 127, 3, 127, 5, 127, 1497, 10, 127, 3, 128, 5, 128, 1500, 10, + 128, 3, 128, 3, 128, 5, 128, 1504, 10, 128, 3, 128, 3, 128, 5, 128, 1508, + 10, 128, 3, 128, 3, 128, 5, 128, 1512, 10, 128, 3, 128, 3, 128, 3, 128, + 3, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1523, 10, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1529, 10, 129, 3, 129, 5, 129, + 1532, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 5, 129, 1561, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 5, 129, 1573, 10, 129, + 5, 129, 1575, 10, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, + 3, 129, 3, 129, 5, 129, 1639, 10, 129, 3, 129, 3, 129, 5, 129, 1643, 10, + 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, + 129, 3, 129, 3, 129, 7, 129, 1656, 10, 129, 12, 129, 14, 129, 1659, 11, + 129, 3, 130, 5, 130, 1662, 10, 130, 3, 130, 3, 130, 5, 130, 1666, 10, 130, + 3, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 131, 5, 131, 1674, 10, 131, + 3, 131, 5, 131, 1677, 10, 131, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, + 5, 132, 1684, 10, 132, 3, 133, 3, 133, 3, 134, 3, 134, 3, 134, 3, 134, + 3, 134, 3, 134, 5, 134, 1694, 10, 134, 3, 135, 3, 135, 3, 136, 3, 136, + 5, 136, 1700, 10, 136, 3, 137, 3, 137, 3, 137, 5, 137, 1705, 10, 137, 3, + 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, 3, + 140, 3, 141, 3, 141, 3, 141, 3, 141, 5, 141, 1721, 10, 141, 3, 141, 2, + 6, 22, 24, 116, 256, 142, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, + 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, + 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, + 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, + 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, + 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, + 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, + 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, + 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, + 280, 2, 16, 4, 2, 81, 81, 117, 121, 3, 2, 13, 14, 4, 2, 110, 111, 114, + 114, 4, 2, 118, 118, 120, 120, 5, 2, 77, 77, 104, 104, 109, 109, 4, 2, + 15, 15, 17, 17, 4, 2, 26, 26, 29, 30, 3, 2, 22, 23, 3, 2, 34, 36, 3, 2, + 37, 40, 3, 2, 41, 44, 4, 2, 50, 60, 62, 62, 3, 2, 65, 69, 3, 2, 70, 116, + 2, 1918, 2, 282, 3, 2, 2, 2, 4, 287, 3, 2, 2, 2, 6, 289, 3, 2, 2, 2, 8, + 295, 3, 2, 2, 2, 10, 308, 3, 2, 2, 2, 12, 310, 3, 2, 2, 2, 14, 313, 3, + 2, 2, 2, 16, 319, 3, 2, 2, 2, 18, 327, 3, 2, 2, 2, 20, 334, 3, 2, 2, 2, + 22, 336, 3, 2, 2, 2, 24, 368, 3, 2, 2, 2, 26, 379, 3, 2, 2, 2, 28, 381, + 3, 2, 2, 2, 30, 386, 3, 2, 2, 2, 32, 390, 3, 2, 2, 2, 34, 403, 3, 2, 2, + 2, 36, 405, 3, 2, 2, 2, 38, 411, 3, 2, 2, 2, 40, 415, 3, 2, 2, 2, 42, 432, + 3, 2, 2, 2, 44, 434, 3, 2, 2, 2, 46, 439, 3, 2, 2, 2, 48, 443, 3, 2, 2, + 2, 50, 452, 3, 2, 2, 2, 52, 462, 3, 2, 2, 2, 54, 474, 3, 2, 2, 2, 56, 487, + 3, 2, 2, 2, 58, 490, 3, 2, 2, 2, 60, 503, 3, 2, 2, 2, 62, 507, 3, 2, 2, + 2, 64, 543, 3, 2, 2, 2, 66, 545, 3, 2, 2, 2, 68, 554, 3, 2, 2, 2, 70, 563, + 3, 2, 2, 2, 72, 567, 3, 2, 2, 2, 74, 569, 3, 2, 2, 2, 76, 578, 3, 2, 2, + 2, 78, 598, 3, 2, 2, 2, 80, 600, 3, 2, 2, 2, 82, 612, 3, 2, 2, 2, 84, 619, + 3, 2, 2, 2, 86, 625, 3, 2, 2, 2, 88, 635, 3, 2, 2, 2, 90, 651, 3, 2, 2, + 2, 92, 665, 3, 2, 2, 2, 94, 668, 3, 2, 2, 2, 96, 677, 3, 2, 2, 2, 98, 687, + 3, 2, 2, 2, 100, 691, 3, 2, 2, 2, 102, 699, 3, 2, 2, 2, 104, 704, 3, 2, + 2, 2, 106, 712, 3, 2, 2, 2, 108, 736, 3, 2, 2, 2, 110, 738, 3, 2, 2, 2, + 112, 741, 3, 2, 2, 2, 114, 745, 3, 2, 2, 2, 116, 756, 3, 2, 2, 2, 118, + 766, 3, 2, 2, 2, 120, 770, 3, 2, 2, 2, 122, 775, 3, 2, 2, 2, 124, 808, + 3, 2, 2, 2, 126, 810, 3, 2, 2, 2, 128, 817, 3, 2, 2, 2, 130, 821, 3, 2, + 2, 2, 132, 829, 3, 2, 2, 2, 134, 842, 3, 2, 2, 2, 136, 854, 3, 2, 2, 2, + 138, 867, 3, 2, 2, 2, 140, 896, 3, 2, 2, 2, 142, 898, 3, 2, 2, 2, 144, + 906, 3, 2, 2, 2, 146, 920, 3, 2, 2, 2, 148, 922, 3, 2, 2, 2, 150, 927, + 3, 2, 2, 2, 152, 1011, 3, 2, 2, 2, 154, 1013, 3, 2, 2, 2, 156, 1015, 3, + 2, 2, 2, 158, 1022, 3, 2, 2, 2, 160, 1029, 3, 2, 2, 2, 162, 1036, 3, 2, + 2, 2, 164, 1043, 3, 2, 2, 2, 166, 1049, 3, 2, 2, 2, 168, 1055, 3, 2, 2, + 2, 170, 1068, 3, 2, 2, 2, 172, 1072, 3, 2, 2, 2, 174, 1078, 3, 2, 2, 2, + 176, 1083, 3, 2, 2, 2, 178, 1087, 3, 2, 2, 2, 180, 1092, 3, 2, 2, 2, 182, + 1101, 3, 2, 2, 2, 184, 1114, 3, 2, 2, 2, 186, 1116, 3, 2, 2, 2, 188, 1119, + 3, 2, 2, 2, 190, 1123, 3, 2, 2, 2, 192, 1139, 3, 2, 2, 2, 194, 1150, 3, + 2, 2, 2, 196, 1155, 3, 2, 2, 2, 198, 1164, 3, 2, 2, 2, 200, 1167, 3, 2, + 2, 2, 202, 1174, 3, 2, 2, 2, 204, 1220, 3, 2, 2, 2, 206, 1223, 3, 2, 2, + 2, 208, 1234, 3, 2, 2, 2, 210, 1238, 3, 2, 2, 2, 212, 1250, 3, 2, 2, 2, + 214, 1264, 3, 2, 2, 2, 216, 1278, 3, 2, 2, 2, 218, 1281, 3, 2, 2, 2, 220, + 1295, 3, 2, 2, 2, 222, 1326, 3, 2, 2, 2, 224, 1329, 3, 2, 2, 2, 226, 1339, + 3, 2, 2, 2, 228, 1343, 3, 2, 2, 2, 230, 1346, 3, 2, 2, 2, 232, 1350, 3, + 2, 2, 2, 234, 1377, 3, 2, 2, 2, 236, 1379, 3, 2, 2, 2, 238, 1384, 3, 2, + 2, 2, 240, 1431, 3, 2, 2, 2, 242, 1433, 3, 2, 2, 2, 244, 1443, 3, 2, 2, + 2, 246, 1464, 3, 2, 2, 2, 248, 1466, 3, 2, 2, 2, 250, 1484, 3, 2, 2, 2, + 252, 1487, 3, 2, 2, 2, 254, 1499, 3, 2, 2, 2, 256, 1574, 3, 2, 2, 2, 258, + 1661, 3, 2, 2, 2, 260, 1676, 3, 2, 2, 2, 262, 1683, 3, 2, 2, 2, 264, 1685, + 3, 2, 2, 2, 266, 1693, 3, 2, 2, 2, 268, 1695, 3, 2, 2, 2, 270, 1699, 3, + 2, 2, 2, 272, 1704, 3, 2, 2, 2, 274, 1706, 3, 2, 2, 2, 276, 1708, 3, 2, + 2, 2, 278, 1712, 3, 2, 2, 2, 280, 1720, 3, 2, 2, 2, 282, 283, 7, 15, 2, + 2, 283, 284, 5, 256, 129, 2, 284, 3, 3, 2, 2, 2, 285, 288, 5, 232, 117, + 2, 286, 288, 5, 238, 120, 2, 287, 285, 3, 2, 2, 2, 287, 286, 3, 2, 2, 2, + 288, 5, 3, 2, 2, 2, 289, 291, 7, 37, 2, 2, 290, 292, 5, 8, 5, 2, 291, 290, + 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, 293, 3, 2, 2, 2, 293, 294, 7, 38, + 2, 2, 294, 7, 3, 2, 2, 2, 295, 300, 5, 10, 6, 2, 296, 297, 7, 14, 2, 2, + 297, 299, 5, 10, 6, 2, 298, 296, 3, 2, 2, 2, 299, 302, 3, 2, 2, 2, 300, + 298, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 9, 3, 2, 2, 2, 302, 300, 3, + 2, 2, 2, 303, 305, 7, 133, 2, 2, 304, 306, 5, 12, 7, 2, 305, 304, 3, 2, + 2, 2, 305, 306, 3, 2, 2, 2, 306, 309, 3, 2, 2, 2, 307, 309, 5, 6, 4, 2, + 308, 303, 3, 2, 2, 2, 308, 307, 3, 2, 2, 2, 309, 11, 3, 2, 2, 2, 310, 311, + 7, 102, 2, 2, 311, 312, 5, 20, 11, 2, 312, 13, 3, 2, 2, 2, 313, 315, 7, + 37, 2, 2, 314, 316, 5, 16, 9, 2, 315, 314, 3, 2, 2, 2, 315, 316, 3, 2, + 2, 2, 316, 317, 3, 2, 2, 2, 317, 318, 7, 38, 2, 2, 318, 15, 3, 2, 2, 2, + 319, 324, 5, 18, 10, 2, 320, 321, 7, 14, 2, 2, 321, 323, 5, 18, 10, 2, + 322, 320, 3, 2, 2, 2, 323, 326, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 324, + 325, 3, 2, 2, 2, 325, 17, 3, 2, 2, 2, 326, 324, 3, 2, 2, 2, 327, 328, 5, + 20, 11, 2, 328, 19, 3, 2, 2, 2, 329, 335, 5, 22, 12, 2, 330, 335, 5, 50, + 26, 2, 331, 335, 5, 52, 27, 2, 332, 335, 5, 30, 16, 2, 333, 335, 7, 134, + 2, 2, 334, 329, 3, 2, 2, 2, 334, 330, 3, 2, 2, 2, 334, 331, 3, 2, 2, 2, + 334, 332, 3, 2, 2, 2, 334, 333, 3, 2, 2, 2, 335, 21, 3, 2, 2, 2, 336, 337, + 8, 12, 1, 2, 337, 338, 5, 24, 13, 2, 338, 347, 3, 2, 2, 2, 339, 340, 12, + 5, 2, 2, 340, 341, 7, 47, 2, 2, 341, 346, 5, 22, 12, 6, 342, 343, 12, 4, + 2, 2, 343, 344, 7, 45, 2, 2, 344, 346, 5, 22, 12, 5, 345, 339, 3, 2, 2, + 2, 345, 342, 3, 2, 2, 2, 346, 349, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 347, + 348, 3, 2, 2, 2, 348, 23, 3, 2, 2, 2, 349, 347, 3, 2, 2, 2, 350, 351, 8, + 13, 1, 2, 351, 352, 7, 9, 2, 2, 352, 353, 5, 20, 11, 2, 353, 354, 7, 10, + 2, 2, 354, 369, 3, 2, 2, 2, 355, 369, 5, 26, 14, 2, 356, 369, 5, 28, 15, + 2, 357, 369, 5, 36, 19, 2, 358, 359, 7, 7, 2, 2, 359, 360, 5, 48, 25, 2, + 360, 361, 7, 8, 2, 2, 361, 369, 3, 2, 2, 2, 362, 369, 5, 54, 28, 2, 363, + 369, 7, 88, 2, 2, 364, 365, 5, 28, 15, 2, 365, 366, 7, 131, 2, 2, 366, + 367, 5, 24, 13, 3, 367, 369, 3, 2, 2, 2, 368, 350, 3, 2, 2, 2, 368, 355, + 3, 2, 2, 2, 368, 356, 3, 2, 2, 2, 368, 357, 3, 2, 2, 2, 368, 358, 3, 2, + 2, 2, 368, 362, 3, 2, 2, 2, 368, 363, 3, 2, 2, 2, 368, 364, 3, 2, 2, 2, + 369, 376, 3, 2, 2, 2, 370, 371, 12, 7, 2, 2, 371, 372, 6, 13, 5, 2, 372, + 373, 7, 7, 2, 2, 373, 375, 7, 8, 2, 2, 374, 370, 3, 2, 2, 2, 375, 378, + 3, 2, 2, 2, 376, 374, 3, 2, 2, 2, 376, 377, 3, 2, 2, 2, 377, 25, 3, 2, + 2, 2, 378, 376, 3, 2, 2, 2, 379, 380, 9, 2, 2, 2, 380, 27, 3, 2, 2, 2, + 381, 384, 5, 34, 18, 2, 382, 385, 5, 32, 17, 2, 383, 385, 5, 30, 16, 2, + 384, 382, 3, 2, 2, 2, 384, 383, 3, 2, 2, 2, 384, 385, 3, 2, 2, 2, 385, + 29, 3, 2, 2, 2, 386, 387, 7, 37, 2, 2, 387, 388, 5, 16, 9, 2, 388, 389, + 7, 38, 2, 2, 389, 31, 3, 2, 2, 2, 390, 391, 7, 37, 2, 2, 391, 392, 5, 16, + 9, 2, 392, 393, 7, 37, 2, 2, 393, 399, 5, 16, 9, 2, 394, 395, 7, 38, 2, + 2, 395, 396, 5, 4, 3, 2, 396, 397, 7, 38, 2, 2, 397, 400, 3, 2, 2, 2, 398, + 400, 7, 34, 2, 2, 399, 394, 3, 2, 2, 2, 399, 398, 3, 2, 2, 2, 400, 33, + 3, 2, 2, 2, 401, 404, 7, 133, 2, 2, 402, 404, 5, 106, 54, 2, 403, 401, + 3, 2, 2, 2, 403, 402, 3, 2, 2, 2, 404, 35, 3, 2, 2, 2, 405, 407, 7, 11, + 2, 2, 406, 408, 5, 38, 20, 2, 407, 406, 3, 2, 2, 2, 407, 408, 3, 2, 2, + 2, 408, 409, 3, 2, 2, 2, 409, 410, 7, 12, 2, 2, 410, 37, 3, 2, 2, 2, 411, + 413, 5, 40, 21, 2, 412, 414, 9, 3, 2, 2, 413, 412, 3, 2, 2, 2, 413, 414, + 3, 2, 2, 2, 414, 39, 3, 2, 2, 2, 415, 420, 5, 42, 22, 2, 416, 417, 9, 3, + 2, 2, 417, 419, 5, 42, 22, 2, 418, 416, 3, 2, 2, 2, 419, 422, 3, 2, 2, + 2, 420, 418, 3, 2, 2, 2, 420, 421, 3, 2, 2, 2, 421, 41, 3, 2, 2, 2, 422, + 420, 3, 2, 2, 2, 423, 433, 5, 58, 30, 2, 424, 433, 5, 62, 32, 2, 425, 433, + 5, 80, 41, 2, 426, 433, 5, 82, 42, 2, 427, 430, 5, 84, 43, 2, 428, 429, + 7, 61, 2, 2, 429, 431, 5, 20, 11, 2, 430, 428, 3, 2, 2, 2, 430, 431, 3, + 2, 2, 2, 431, 433, 3, 2, 2, 2, 432, 423, 3, 2, 2, 2, 432, 424, 3, 2, 2, + 2, 432, 425, 3, 2, 2, 2, 432, 426, 3, 2, 2, 2, 432, 427, 3, 2, 2, 2, 433, + 43, 3, 2, 2, 2, 434, 435, 5, 24, 13, 2, 435, 436, 6, 23, 6, 2, 436, 437, + 7, 7, 2, 2, 437, 438, 7, 8, 2, 2, 438, 45, 3, 2, 2, 2, 439, 440, 7, 7, + 2, 2, 440, 441, 5, 48, 25, 2, 441, 442, 7, 8, 2, 2, 442, 47, 3, 2, 2, 2, + 443, 448, 5, 20, 11, 2, 444, 445, 7, 14, 2, 2, 445, 447, 5, 20, 11, 2, + 446, 444, 3, 2, 2, 2, 447, 450, 3, 2, 2, 2, 448, 446, 3, 2, 2, 2, 448, + 449, 3, 2, 2, 2, 449, 49, 3, 2, 2, 2, 450, 448, 3, 2, 2, 2, 451, 453, 5, + 6, 4, 2, 452, 451, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 454, 3, 2, 2, + 2, 454, 456, 7, 9, 2, 2, 455, 457, 5, 64, 33, 2, 456, 455, 3, 2, 2, 2, + 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 459, 7, 10, 2, 2, 459, + 460, 7, 61, 2, 2, 460, 461, 5, 20, 11, 2, 461, 51, 3, 2, 2, 2, 462, 464, + 7, 76, 2, 2, 463, 465, 5, 6, 4, 2, 464, 463, 3, 2, 2, 2, 464, 465, 3, 2, + 2, 2, 465, 466, 3, 2, 2, 2, 466, 468, 7, 9, 2, 2, 467, 469, 5, 64, 33, + 2, 468, 467, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, + 471, 7, 10, 2, 2, 471, 472, 7, 61, 2, 2, 472, 473, 5, 20, 11, 2, 473, 53, + 3, 2, 2, 2, 474, 475, 7, 73, 2, 2, 475, 476, 5, 56, 29, 2, 476, 55, 3, + 2, 2, 2, 477, 488, 7, 133, 2, 2, 478, 479, 5, 270, 136, 2, 479, 480, 7, + 19, 2, 2, 480, 482, 3, 2, 2, 2, 481, 478, 3, 2, 2, 2, 482, 483, 3, 2, 2, + 2, 483, 481, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, + 486, 5, 270, 136, 2, 486, 488, 3, 2, 2, 2, 487, 477, 3, 2, 2, 2, 487, 481, + 3, 2, 2, 2, 488, 57, 3, 2, 2, 2, 489, 491, 7, 98, 2, 2, 490, 489, 3, 2, + 2, 2, 490, 491, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 494, 5, 246, 124, + 2, 493, 495, 7, 16, 2, 2, 494, 493, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, + 497, 3, 2, 2, 2, 496, 498, 5, 60, 31, 2, 497, 496, 3, 2, 2, 2, 497, 498, + 3, 2, 2, 2, 498, 501, 3, 2, 2, 2, 499, 500, 7, 61, 2, 2, 500, 502, 5, 20, + 11, 2, 501, 499, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 59, 3, 2, 2, 2, + 503, 504, 7, 17, 2, 2, 504, 505, 5, 20, 11, 2, 505, 61, 3, 2, 2, 2, 506, + 508, 5, 6, 4, 2, 507, 506, 3, 2, 2, 2, 507, 508, 3, 2, 2, 2, 508, 509, + 3, 2, 2, 2, 509, 511, 7, 9, 2, 2, 510, 512, 5, 64, 33, 2, 511, 510, 3, + 2, 2, 2, 511, 512, 3, 2, 2, 2, 512, 513, 3, 2, 2, 2, 513, 515, 7, 10, 2, + 2, 514, 516, 5, 60, 31, 2, 515, 514, 3, 2, 2, 2, 515, 516, 3, 2, 2, 2, + 516, 63, 3, 2, 2, 2, 517, 544, 5, 78, 40, 2, 518, 523, 5, 26, 14, 2, 519, + 520, 7, 14, 2, 2, 520, 522, 5, 26, 14, 2, 521, 519, 3, 2, 2, 2, 522, 525, + 3, 2, 2, 2, 523, 521, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 544, 3, 2, + 2, 2, 525, 523, 3, 2, 2, 2, 526, 529, 5, 74, 38, 2, 527, 528, 7, 14, 2, + 2, 528, 530, 5, 78, 40, 2, 529, 527, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, + 530, 544, 3, 2, 2, 2, 531, 541, 5, 66, 34, 2, 532, 539, 7, 14, 2, 2, 533, + 536, 5, 74, 38, 2, 534, 535, 7, 14, 2, 2, 535, 537, 5, 78, 40, 2, 536, + 534, 3, 2, 2, 2, 536, 537, 3, 2, 2, 2, 537, 540, 3, 2, 2, 2, 538, 540, + 5, 78, 40, 2, 539, 533, 3, 2, 2, 2, 539, 538, 3, 2, 2, 2, 540, 542, 3, + 2, 2, 2, 541, 532, 3, 2, 2, 2, 541, 542, 3, 2, 2, 2, 542, 544, 3, 2, 2, + 2, 543, 517, 3, 2, 2, 2, 543, 518, 3, 2, 2, 2, 543, 526, 3, 2, 2, 2, 543, + 531, 3, 2, 2, 2, 544, 65, 3, 2, 2, 2, 545, 550, 5, 68, 35, 2, 546, 547, + 7, 14, 2, 2, 547, 549, 5, 68, 35, 2, 548, 546, 3, 2, 2, 2, 549, 552, 3, + 2, 2, 2, 550, 548, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 67, 3, 2, 2, + 2, 552, 550, 3, 2, 2, 2, 553, 555, 5, 112, 57, 2, 554, 553, 3, 2, 2, 2, + 554, 555, 3, 2, 2, 2, 555, 557, 3, 2, 2, 2, 556, 558, 5, 70, 36, 2, 557, + 556, 3, 2, 2, 2, 557, 558, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 561, + 5, 72, 37, 2, 560, 562, 5, 60, 31, 2, 561, 560, 3, 2, 2, 2, 561, 562, 3, + 2, 2, 2, 562, 69, 3, 2, 2, 2, 563, 564, 9, 4, 2, 2, 564, 71, 3, 2, 2, 2, + 565, 568, 5, 270, 136, 2, 566, 568, 5, 4, 3, 2, 567, 565, 3, 2, 2, 2, 567, + 566, 3, 2, 2, 2, 568, 73, 3, 2, 2, 2, 569, 574, 5, 76, 39, 2, 570, 571, + 7, 14, 2, 2, 571, 573, 5, 76, 39, 2, 572, 570, 3, 2, 2, 2, 573, 576, 3, + 2, 2, 2, 574, 572, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 75, 3, 2, 2, + 2, 576, 574, 3, 2, 2, 2, 577, 579, 5, 112, 57, 2, 578, 577, 3, 2, 2, 2, + 578, 579, 3, 2, 2, 2, 579, 581, 3, 2, 2, 2, 580, 582, 5, 70, 36, 2, 581, + 580, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 583, 3, 2, 2, 2, 583, 592, + 5, 72, 37, 2, 584, 586, 7, 16, 2, 2, 585, 587, 5, 60, 31, 2, 586, 585, + 3, 2, 2, 2, 586, 587, 3, 2, 2, 2, 587, 593, 3, 2, 2, 2, 588, 590, 5, 60, + 31, 2, 589, 588, 3, 2, 2, 2, 589, 590, 3, 2, 2, 2, 590, 591, 3, 2, 2, 2, + 591, 593, 5, 2, 2, 2, 592, 584, 3, 2, 2, 2, 592, 589, 3, 2, 2, 2, 593, + 77, 3, 2, 2, 2, 594, 595, 7, 18, 2, 2, 595, 599, 5, 68, 35, 2, 596, 597, + 7, 18, 2, 2, 597, 599, 5, 256, 129, 2, 598, 594, 3, 2, 2, 2, 598, 596, + 3, 2, 2, 2, 599, 79, 3, 2, 2, 2, 600, 602, 7, 76, 2, 2, 601, 603, 5, 6, + 4, 2, 602, 601, 3, 2, 2, 2, 602, 603, 3, 2, 2, 2, 603, 604, 3, 2, 2, 2, + 604, 606, 7, 9, 2, 2, 605, 607, 5, 64, 33, 2, 606, 605, 3, 2, 2, 2, 606, + 607, 3, 2, 2, 2, 607, 608, 3, 2, 2, 2, 608, 610, 7, 10, 2, 2, 609, 611, + 5, 60, 31, 2, 610, 609, 3, 2, 2, 2, 610, 611, 3, 2, 2, 2, 611, 81, 3, 2, + 2, 2, 612, 613, 7, 7, 2, 2, 613, 614, 7, 133, 2, 2, 614, 615, 7, 17, 2, + 2, 615, 616, 9, 5, 2, 2, 616, 617, 7, 8, 2, 2, 617, 618, 5, 60, 31, 2, + 618, 83, 3, 2, 2, 2, 619, 621, 5, 246, 124, 2, 620, 622, 7, 16, 2, 2, 621, + 620, 3, 2, 2, 2, 621, 622, 3, 2, 2, 2, 622, 623, 3, 2, 2, 2, 623, 624, + 5, 62, 32, 2, 624, 85, 3, 2, 2, 2, 625, 626, 7, 122, 2, 2, 626, 628, 7, + 133, 2, 2, 627, 629, 5, 6, 4, 2, 628, 627, 3, 2, 2, 2, 628, 629, 3, 2, + 2, 2, 629, 630, 3, 2, 2, 2, 630, 631, 7, 15, 2, 2, 631, 632, 5, 20, 11, + 2, 632, 633, 7, 13, 2, 2, 633, 87, 3, 2, 2, 2, 634, 636, 5, 70, 36, 2, + 635, 634, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 637, 3, 2, 2, 2, 637, + 638, 7, 125, 2, 2, 638, 640, 7, 9, 2, 2, 639, 641, 5, 222, 112, 2, 640, + 639, 3, 2, 2, 2, 640, 641, 3, 2, 2, 2, 641, 642, 3, 2, 2, 2, 642, 648, + 7, 10, 2, 2, 643, 644, 7, 11, 2, 2, 644, 645, 5, 228, 115, 2, 645, 646, + 7, 12, 2, 2, 646, 649, 3, 2, 2, 2, 647, 649, 7, 13, 2, 2, 648, 643, 3, + 2, 2, 2, 648, 647, 3, 2, 2, 2, 648, 649, 3, 2, 2, 2, 649, 89, 3, 2, 2, + 2, 650, 652, 7, 105, 2, 2, 651, 650, 3, 2, 2, 2, 651, 652, 3, 2, 2, 2, + 652, 653, 3, 2, 2, 2, 653, 654, 7, 112, 2, 2, 654, 656, 7, 133, 2, 2, 655, + 657, 5, 6, 4, 2, 656, 655, 3, 2, 2, 2, 656, 657, 3, 2, 2, 2, 657, 659, + 3, 2, 2, 2, 658, 660, 5, 92, 47, 2, 659, 658, 3, 2, 2, 2, 659, 660, 3, + 2, 2, 2, 660, 661, 3, 2, 2, 2, 661, 663, 5, 36, 19, 2, 662, 664, 7, 13, + 2, 2, 663, 662, 3, 2, 2, 2, 663, 664, 3, 2, 2, 2, 664, 91, 3, 2, 2, 2, + 665, 666, 7, 102, 2, 2, 666, 667, 5, 94, 48, 2, 667, 93, 3, 2, 2, 2, 668, + 673, 5, 28, 15, 2, 669, 670, 7, 14, 2, 2, 670, 672, 5, 28, 15, 2, 671, + 669, 3, 2, 2, 2, 672, 675, 3, 2, 2, 2, 673, 671, 3, 2, 2, 2, 673, 674, + 3, 2, 2, 2, 674, 95, 3, 2, 2, 2, 675, 673, 3, 2, 2, 2, 676, 678, 7, 104, + 2, 2, 677, 676, 3, 2, 2, 2, 677, 678, 3, 2, 2, 2, 678, 679, 3, 2, 2, 2, + 679, 680, 7, 101, 2, 2, 680, 681, 7, 133, 2, 2, 681, 683, 7, 11, 2, 2, + 682, 684, 5, 98, 50, 2, 683, 682, 3, 2, 2, 2, 683, 684, 3, 2, 2, 2, 684, + 685, 3, 2, 2, 2, 685, 686, 7, 12, 2, 2, 686, 97, 3, 2, 2, 2, 687, 689, + 5, 100, 51, 2, 688, 690, 7, 14, 2, 2, 689, 688, 3, 2, 2, 2, 689, 690, 3, + 2, 2, 2, 690, 99, 3, 2, 2, 2, 691, 696, 5, 102, 52, 2, 692, 693, 7, 14, + 2, 2, 693, 695, 5, 102, 52, 2, 694, 692, 3, 2, 2, 2, 695, 698, 3, 2, 2, + 2, 696, 694, 3, 2, 2, 2, 696, 697, 3, 2, 2, 2, 697, 101, 3, 2, 2, 2, 698, + 696, 3, 2, 2, 2, 699, 702, 5, 246, 124, 2, 700, 701, 7, 15, 2, 2, 701, + 703, 5, 256, 129, 2, 702, 700, 3, 2, 2, 2, 702, 703, 3, 2, 2, 2, 703, 103, + 3, 2, 2, 2, 704, 705, 7, 126, 2, 2, 705, 706, 5, 106, 54, 2, 706, 708, + 7, 11, 2, 2, 707, 709, 5, 128, 65, 2, 708, 707, 3, 2, 2, 2, 708, 709, 3, + 2, 2, 2, 709, 710, 3, 2, 2, 2, 710, 711, 7, 12, 2, 2, 711, 105, 3, 2, 2, + 2, 712, 721, 7, 133, 2, 2, 713, 715, 7, 19, 2, 2, 714, 713, 3, 2, 2, 2, + 715, 716, 3, 2, 2, 2, 716, 714, 3, 2, 2, 2, 716, 717, 3, 2, 2, 2, 717, + 718, 3, 2, 2, 2, 718, 720, 7, 133, 2, 2, 719, 714, 3, 2, 2, 2, 720, 723, + 3, 2, 2, 2, 721, 719, 3, 2, 2, 2, 721, 722, 3, 2, 2, 2, 722, 107, 3, 2, + 2, 2, 723, 721, 3, 2, 2, 2, 724, 725, 7, 133, 2, 2, 725, 726, 7, 15, 2, + 2, 726, 727, 5, 106, 54, 2, 727, 728, 7, 13, 2, 2, 728, 737, 3, 2, 2, 2, + 729, 730, 7, 133, 2, 2, 730, 731, 7, 15, 2, 2, 731, 732, 7, 127, 2, 2, + 732, 733, 7, 9, 2, 2, 733, 734, 7, 134, 2, 2, 734, 735, 7, 10, 2, 2, 735, + 737, 7, 13, 2, 2, 736, 724, 3, 2, 2, 2, 736, 729, 3, 2, 2, 2, 737, 109, + 3, 2, 2, 2, 738, 739, 7, 134, 2, 2, 739, 111, 3, 2, 2, 2, 740, 742, 5, + 114, 58, 2, 741, 740, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 741, 3, 2, + 2, 2, 743, 744, 3, 2, 2, 2, 744, 113, 3, 2, 2, 2, 745, 748, 7, 132, 2, + 2, 746, 749, 5, 116, 59, 2, 747, 749, 5, 118, 60, 2, 748, 746, 3, 2, 2, + 2, 748, 747, 3, 2, 2, 2, 749, 115, 3, 2, 2, 2, 750, 751, 8, 59, 1, 2, 751, + 757, 7, 133, 2, 2, 752, 753, 7, 9, 2, 2, 753, 754, 5, 256, 129, 2, 754, + 755, 7, 10, 2, 2, 755, 757, 3, 2, 2, 2, 756, 750, 3, 2, 2, 2, 756, 752, + 3, 2, 2, 2, 757, 763, 3, 2, 2, 2, 758, 759, 12, 4, 2, 2, 759, 760, 7, 19, + 2, 2, 760, 762, 5, 270, 136, 2, 761, 758, 3, 2, 2, 2, 762, 765, 3, 2, 2, + 2, 763, 761, 3, 2, 2, 2, 763, 764, 3, 2, 2, 2, 764, 117, 3, 2, 2, 2, 765, + 763, 3, 2, 2, 2, 766, 767, 5, 116, 59, 2, 767, 768, 5, 248, 125, 2, 768, + 119, 3, 2, 2, 2, 769, 771, 5, 230, 116, 2, 770, 769, 3, 2, 2, 2, 770, 771, + 3, 2, 2, 2, 771, 772, 3, 2, 2, 2, 772, 773, 7, 2, 2, 3, 773, 121, 3, 2, + 2, 2, 774, 776, 7, 105, 2, 2, 775, 774, 3, 2, 2, 2, 775, 776, 3, 2, 2, + 2, 776, 777, 3, 2, 2, 2, 777, 778, 5, 124, 63, 2, 778, 123, 3, 2, 2, 2, + 779, 809, 5, 126, 64, 2, 780, 809, 5, 140, 71, 2, 781, 809, 5, 132, 67, + 2, 782, 809, 5, 138, 70, 2, 783, 809, 5, 146, 74, 2, 784, 809, 5, 130, + 66, 2, 785, 809, 5, 192, 97, 2, 786, 809, 5, 90, 46, 2, 787, 809, 5, 104, + 53, 2, 788, 809, 5, 150, 76, 2, 789, 809, 5, 152, 77, 2, 790, 809, 5, 156, + 79, 2, 791, 809, 5, 158, 80, 2, 792, 809, 5, 160, 81, 2, 793, 809, 5, 162, + 82, 2, 794, 809, 5, 164, 83, 2, 795, 809, 5, 176, 89, 2, 796, 809, 5, 166, + 84, 2, 797, 809, 5, 178, 90, 2, 798, 809, 5, 180, 91, 2, 799, 809, 5, 188, + 95, 2, 800, 809, 5, 190, 96, 2, 801, 809, 5, 258, 130, 2, 802, 809, 5, + 212, 107, 2, 803, 809, 5, 86, 44, 2, 804, 809, 5, 96, 49, 2, 805, 809, + 5, 148, 75, 2, 806, 807, 7, 105, 2, 2, 807, 809, 5, 124, 63, 2, 808, 779, + 3, 2, 2, 2, 808, 780, 3, 2, 2, 2, 808, 781, 3, 2, 2, 2, 808, 782, 3, 2, + 2, 2, 808, 783, 3, 2, 2, 2, 808, 784, 3, 2, 2, 2, 808, 785, 3, 2, 2, 2, + 808, 786, 3, 2, 2, 2, 808, 787, 3, 2, 2, 2, 808, 788, 3, 2, 2, 2, 808, + 789, 3, 2, 2, 2, 808, 790, 3, 2, 2, 2, 808, 791, 3, 2, 2, 2, 808, 792, + 3, 2, 2, 2, 808, 793, 3, 2, 2, 2, 808, 794, 3, 2, 2, 2, 808, 795, 3, 2, + 2, 2, 808, 796, 3, 2, 2, 2, 808, 797, 3, 2, 2, 2, 808, 798, 3, 2, 2, 2, + 808, 799, 3, 2, 2, 2, 808, 800, 3, 2, 2, 2, 808, 801, 3, 2, 2, 2, 808, + 802, 3, 2, 2, 2, 808, 803, 3, 2, 2, 2, 808, 804, 3, 2, 2, 2, 808, 805, + 3, 2, 2, 2, 808, 806, 3, 2, 2, 2, 809, 125, 3, 2, 2, 2, 810, 812, 7, 11, + 2, 2, 811, 813, 5, 128, 65, 2, 812, 811, 3, 2, 2, 2, 812, 813, 3, 2, 2, + 2, 813, 814, 3, 2, 2, 2, 814, 815, 7, 12, 2, 2, 815, 127, 3, 2, 2, 2, 816, + 818, 5, 124, 63, 2, 817, 816, 3, 2, 2, 2, 818, 819, 3, 2, 2, 2, 819, 817, + 3, 2, 2, 2, 819, 820, 3, 2, 2, 2, 820, 129, 3, 2, 2, 2, 821, 825, 7, 130, + 2, 2, 822, 823, 7, 133, 2, 2, 823, 826, 5, 62, 32, 2, 824, 826, 5, 140, + 71, 2, 825, 822, 3, 2, 2, 2, 825, 824, 3, 2, 2, 2, 826, 827, 3, 2, 2, 2, + 827, 828, 5, 280, 141, 2, 828, 131, 3, 2, 2, 2, 829, 833, 7, 106, 2, 2, + 830, 834, 5, 134, 68, 2, 831, 834, 5, 108, 55, 2, 832, 834, 5, 110, 56, + 2, 833, 830, 3, 2, 2, 2, 833, 831, 3, 2, 2, 2, 833, 832, 3, 2, 2, 2, 834, + 835, 3, 2, 2, 2, 835, 836, 5, 280, 141, 2, 836, 133, 3, 2, 2, 2, 837, 843, + 7, 28, 2, 2, 838, 843, 7, 27, 2, 2, 839, 843, 7, 26, 2, 2, 840, 843, 5, + 136, 69, 2, 841, 843, 5, 270, 136, 2, 842, 837, 3, 2, 2, 2, 842, 838, 3, + 2, 2, 2, 842, 839, 3, 2, 2, 2, 842, 840, 3, 2, 2, 2, 842, 841, 3, 2, 2, + 2, 843, 846, 3, 2, 2, 2, 844, 845, 7, 96, 2, 2, 845, 847, 5, 270, 136, + 2, 846, 844, 3, 2, 2, 2, 846, 847, 3, 2, 2, 2, 847, 848, 3, 2, 2, 2, 848, + 849, 7, 97, 2, 2, 849, 850, 7, 134, 2, 2, 850, 135, 3, 2, 2, 2, 851, 852, + 5, 270, 136, 2, 852, 853, 7, 14, 2, 2, 853, 855, 3, 2, 2, 2, 854, 851, + 3, 2, 2, 2, 854, 855, 3, 2, 2, 2, 855, 856, 3, 2, 2, 2, 856, 857, 7, 11, + 2, 2, 857, 862, 5, 270, 136, 2, 858, 859, 7, 14, 2, 2, 859, 861, 5, 270, + 136, 2, 860, 858, 3, 2, 2, 2, 861, 864, 3, 2, 2, 2, 862, 860, 3, 2, 2, + 2, 862, 863, 3, 2, 2, 2, 863, 865, 3, 2, 2, 2, 864, 862, 3, 2, 2, 2, 865, + 866, 7, 12, 2, 2, 866, 137, 3, 2, 2, 2, 867, 869, 7, 105, 2, 2, 868, 870, + 7, 90, 2, 2, 869, 868, 3, 2, 2, 2, 869, 870, 3, 2, 2, 2, 870, 873, 3, 2, + 2, 2, 871, 874, 5, 134, 68, 2, 872, 874, 5, 124, 63, 2, 873, 871, 3, 2, + 2, 2, 873, 872, 3, 2, 2, 2, 874, 139, 3, 2, 2, 2, 875, 877, 5, 4, 3, 2, + 876, 878, 5, 60, 31, 2, 877, 876, 3, 2, 2, 2, 877, 878, 3, 2, 2, 2, 878, + 879, 3, 2, 2, 2, 879, 881, 5, 2, 2, 2, 880, 882, 7, 13, 2, 2, 881, 880, + 3, 2, 2, 2, 881, 882, 3, 2, 2, 2, 882, 897, 3, 2, 2, 2, 883, 885, 5, 70, + 36, 2, 884, 883, 3, 2, 2, 2, 884, 885, 3, 2, 2, 2, 885, 887, 3, 2, 2, 2, + 886, 888, 5, 154, 78, 2, 887, 886, 3, 2, 2, 2, 887, 888, 3, 2, 2, 2, 888, + 890, 3, 2, 2, 2, 889, 891, 7, 98, 2, 2, 890, 889, 3, 2, 2, 2, 890, 891, + 3, 2, 2, 2, 891, 892, 3, 2, 2, 2, 892, 894, 5, 142, 72, 2, 893, 895, 7, + 13, 2, 2, 894, 893, 3, 2, 2, 2, 894, 895, 3, 2, 2, 2, 895, 897, 3, 2, 2, + 2, 896, 875, 3, 2, 2, 2, 896, 884, 3, 2, 2, 2, 897, 141, 3, 2, 2, 2, 898, + 903, 5, 144, 73, 2, 899, 900, 7, 14, 2, 2, 900, 902, 5, 144, 73, 2, 901, + 899, 3, 2, 2, 2, 902, 905, 3, 2, 2, 2, 903, 901, 3, 2, 2, 2, 903, 904, + 3, 2, 2, 2, 904, 143, 3, 2, 2, 2, 905, 903, 3, 2, 2, 2, 906, 908, 5, 184, + 93, 2, 907, 909, 5, 60, 31, 2, 908, 907, 3, 2, 2, 2, 908, 909, 3, 2, 2, + 2, 909, 911, 3, 2, 2, 2, 910, 912, 5, 256, 129, 2, 911, 910, 3, 2, 2, 2, + 911, 912, 3, 2, 2, 2, 912, 918, 3, 2, 2, 2, 913, 915, 7, 15, 2, 2, 914, + 916, 5, 6, 4, 2, 915, 914, 3, 2, 2, 2, 915, 916, 3, 2, 2, 2, 916, 917, + 3, 2, 2, 2, 917, 919, 5, 256, 129, 2, 918, 913, 3, 2, 2, 2, 918, 919, 3, + 2, 2, 2, 919, 145, 3, 2, 2, 2, 920, 921, 7, 13, 2, 2, 921, 147, 3, 2, 2, + 2, 922, 923, 6, 75, 8, 2, 923, 925, 5, 252, 127, 2, 924, 926, 7, 13, 2, + 2, 925, 924, 3, 2, 2, 2, 925, 926, 3, 2, 2, 2, 926, 149, 3, 2, 2, 2, 927, + 928, 7, 91, 2, 2, 928, 929, 7, 9, 2, 2, 929, 930, 5, 252, 127, 2, 930, + 931, 7, 10, 2, 2, 931, 934, 5, 124, 63, 2, 932, 933, 7, 75, 2, 2, 933, + 935, 5, 124, 63, 2, 934, 932, 3, 2, 2, 2, 934, 935, 3, 2, 2, 2, 935, 151, + 3, 2, 2, 2, 936, 937, 7, 71, 2, 2, 937, 938, 5, 124, 63, 2, 938, 939, 7, + 85, 2, 2, 939, 940, 7, 9, 2, 2, 940, 941, 5, 252, 127, 2, 941, 942, 7, + 10, 2, 2, 942, 943, 5, 280, 141, 2, 943, 1012, 3, 2, 2, 2, 944, 945, 7, + 85, 2, 2, 945, 946, 7, 9, 2, 2, 946, 947, 5, 252, 127, 2, 947, 948, 7, + 10, 2, 2, 948, 949, 5, 124, 63, 2, 949, 1012, 3, 2, 2, 2, 950, 951, 7, + 83, 2, 2, 951, 953, 7, 9, 2, 2, 952, 954, 5, 252, 127, 2, 953, 952, 3, + 2, 2, 2, 953, 954, 3, 2, 2, 2, 954, 955, 3, 2, 2, 2, 955, 957, 7, 13, 2, + 2, 956, 958, 5, 252, 127, 2, 957, 956, 3, 2, 2, 2, 957, 958, 3, 2, 2, 2, + 958, 959, 3, 2, 2, 2, 959, 961, 7, 13, 2, 2, 960, 962, 5, 252, 127, 2, + 961, 960, 3, 2, 2, 2, 961, 962, 3, 2, 2, 2, 962, 963, 3, 2, 2, 2, 963, + 964, 7, 10, 2, 2, 964, 1012, 5, 124, 63, 2, 965, 966, 7, 83, 2, 2, 966, + 967, 7, 9, 2, 2, 967, 968, 5, 154, 78, 2, 968, 969, 5, 142, 72, 2, 969, + 971, 7, 13, 2, 2, 970, 972, 5, 252, 127, 2, 971, 970, 3, 2, 2, 2, 971, + 972, 3, 2, 2, 2, 972, 973, 3, 2, 2, 2, 973, 975, 7, 13, 2, 2, 974, 976, + 5, 252, 127, 2, 975, 974, 3, 2, 2, 2, 975, 976, 3, 2, 2, 2, 976, 977, 3, + 2, 2, 2, 977, 978, 7, 10, 2, 2, 978, 979, 5, 124, 63, 2, 979, 1012, 3, + 2, 2, 2, 980, 982, 7, 83, 2, 2, 981, 983, 7, 107, 2, 2, 982, 981, 3, 2, + 2, 2, 982, 983, 3, 2, 2, 2, 983, 984, 3, 2, 2, 2, 984, 985, 7, 9, 2, 2, + 985, 989, 5, 256, 129, 2, 986, 990, 7, 94, 2, 2, 987, 988, 7, 133, 2, 2, + 988, 990, 6, 77, 9, 2, 989, 986, 3, 2, 2, 2, 989, 987, 3, 2, 2, 2, 990, + 991, 3, 2, 2, 2, 991, 992, 5, 252, 127, 2, 992, 993, 7, 10, 2, 2, 993, + 994, 5, 124, 63, 2, 994, 1012, 3, 2, 2, 2, 995, 997, 7, 83, 2, 2, 996, + 998, 7, 107, 2, 2, 997, 996, 3, 2, 2, 2, 997, 998, 3, 2, 2, 2, 998, 999, + 3, 2, 2, 2, 999, 1000, 7, 9, 2, 2, 1000, 1001, 5, 154, 78, 2, 1001, 1005, + 5, 144, 73, 2, 1002, 1006, 7, 94, 2, 2, 1003, 1004, 7, 133, 2, 2, 1004, + 1006, 6, 77, 10, 2, 1005, 1002, 3, 2, 2, 2, 1005, 1003, 3, 2, 2, 2, 1006, + 1007, 3, 2, 2, 2, 1007, 1008, 5, 252, 127, 2, 1008, 1009, 7, 10, 2, 2, + 1009, 1010, 5, 124, 63, 2, 1010, 1012, 3, 2, 2, 2, 1011, 936, 3, 2, 2, + 2, 1011, 944, 3, 2, 2, 2, 1011, 950, 3, 2, 2, 2, 1011, 965, 3, 2, 2, 2, + 1011, 980, 3, 2, 2, 2, 1011, 995, 3, 2, 2, 2, 1012, 153, 3, 2, 2, 2, 1013, + 1014, 9, 6, 2, 2, 1014, 155, 3, 2, 2, 2, 1015, 1018, 7, 82, 2, 2, 1016, + 1017, 6, 79, 11, 2, 1017, 1019, 7, 133, 2, 2, 1018, 1016, 3, 2, 2, 2, 1018, + 1019, 3, 2, 2, 2, 1019, 1020, 3, 2, 2, 2, 1020, 1021, 5, 280, 141, 2, 1021, + 157, 3, 2, 2, 2, 1022, 1025, 7, 70, 2, 2, 1023, 1024, 6, 80, 12, 2, 1024, + 1026, 7, 133, 2, 2, 1025, 1023, 3, 2, 2, 2, 1025, 1026, 3, 2, 2, 2, 1026, + 1027, 3, 2, 2, 2, 1027, 1028, 5, 280, 141, 2, 1028, 159, 3, 2, 2, 2, 1029, + 1032, 7, 80, 2, 2, 1030, 1031, 6, 81, 13, 2, 1031, 1033, 5, 252, 127, 2, + 1032, 1030, 3, 2, 2, 2, 1032, 1033, 3, 2, 2, 2, 1033, 1034, 3, 2, 2, 2, + 1034, 1035, 5, 280, 141, 2, 1035, 161, 3, 2, 2, 2, 1036, 1039, 7, 116, + 2, 2, 1037, 1038, 6, 82, 14, 2, 1038, 1040, 5, 252, 127, 2, 1039, 1037, + 3, 2, 2, 2, 1039, 1040, 3, 2, 2, 2, 1040, 1041, 3, 2, 2, 2, 1041, 1042, + 5, 280, 141, 2, 1042, 163, 3, 2, 2, 2, 1043, 1044, 7, 89, 2, 2, 1044, 1045, + 7, 9, 2, 2, 1045, 1046, 5, 252, 127, 2, 1046, 1047, 7, 10, 2, 2, 1047, + 1048, 5, 124, 63, 2, 1048, 165, 3, 2, 2, 2, 1049, 1050, 7, 84, 2, 2, 1050, + 1051, 7, 9, 2, 2, 1051, 1052, 5, 252, 127, 2, 1052, 1053, 7, 10, 2, 2, + 1053, 1054, 5, 168, 85, 2, 1054, 167, 3, 2, 2, 2, 1055, 1057, 7, 11, 2, + 2, 1056, 1058, 5, 170, 86, 2, 1057, 1056, 3, 2, 2, 2, 1057, 1058, 3, 2, + 2, 2, 1058, 1063, 3, 2, 2, 2, 1059, 1061, 5, 174, 88, 2, 1060, 1062, 5, + 170, 86, 2, 1061, 1060, 3, 2, 2, 2, 1061, 1062, 3, 2, 2, 2, 1062, 1064, + 3, 2, 2, 2, 1063, 1059, 3, 2, 2, 2, 1063, 1064, 3, 2, 2, 2, 1064, 1065, + 3, 2, 2, 2, 1065, 1066, 7, 12, 2, 2, 1066, 169, 3, 2, 2, 2, 1067, 1069, + 5, 172, 87, 2, 1068, 1067, 3, 2, 2, 2, 1069, 1070, 3, 2, 2, 2, 1070, 1068, + 3, 2, 2, 2, 1070, 1071, 3, 2, 2, 2, 1071, 171, 3, 2, 2, 2, 1072, 1073, + 7, 74, 2, 2, 1073, 1074, 5, 252, 127, 2, 1074, 1076, 7, 17, 2, 2, 1075, + 1077, 5, 128, 65, 2, 1076, 1075, 3, 2, 2, 2, 1076, 1077, 3, 2, 2, 2, 1077, + 173, 3, 2, 2, 2, 1078, 1079, 7, 90, 2, 2, 1079, 1081, 7, 17, 2, 2, 1080, + 1082, 5, 128, 65, 2, 1081, 1080, 3, 2, 2, 2, 1081, 1082, 3, 2, 2, 2, 1082, + 175, 3, 2, 2, 2, 1083, 1084, 7, 133, 2, 2, 1084, 1085, 7, 17, 2, 2, 1085, + 1086, 5, 124, 63, 2, 1086, 177, 3, 2, 2, 2, 1087, 1088, 7, 92, 2, 2, 1088, + 1089, 6, 90, 15, 2, 1089, 1090, 5, 252, 127, 2, 1090, 1091, 5, 280, 141, + 2, 1091, 179, 3, 2, 2, 2, 1092, 1093, 7, 95, 2, 2, 1093, 1099, 5, 126, + 64, 2, 1094, 1096, 5, 182, 92, 2, 1095, 1097, 5, 186, 94, 2, 1096, 1095, + 3, 2, 2, 2, 1096, 1097, 3, 2, 2, 2, 1097, 1100, 3, 2, 2, 2, 1098, 1100, + 5, 186, 94, 2, 1099, 1094, 3, 2, 2, 2, 1099, 1098, 3, 2, 2, 2, 1100, 181, + 3, 2, 2, 2, 1101, 1107, 7, 78, 2, 2, 1102, 1104, 7, 9, 2, 2, 1103, 1105, + 5, 184, 93, 2, 1104, 1103, 3, 2, 2, 2, 1104, 1105, 3, 2, 2, 2, 1105, 1106, + 3, 2, 2, 2, 1106, 1108, 7, 10, 2, 2, 1107, 1102, 3, 2, 2, 2, 1107, 1108, + 3, 2, 2, 2, 1108, 1109, 3, 2, 2, 2, 1109, 1110, 5, 126, 64, 2, 1110, 183, + 3, 2, 2, 2, 1111, 1115, 7, 133, 2, 2, 1112, 1115, 5, 232, 117, 2, 1113, + 1115, 5, 238, 120, 2, 1114, 1111, 3, 2, 2, 2, 1114, 1112, 3, 2, 2, 2, 1114, + 1113, 3, 2, 2, 2, 1115, 185, 3, 2, 2, 2, 1116, 1117, 7, 79, 2, 2, 1117, + 1118, 5, 126, 64, 2, 1118, 187, 3, 2, 2, 2, 1119, 1120, 7, 86, 2, 2, 1120, + 1121, 5, 280, 141, 2, 1121, 189, 3, 2, 2, 2, 1122, 1124, 7, 99, 2, 2, 1123, + 1122, 3, 2, 2, 2, 1123, 1124, 3, 2, 2, 2, 1124, 1125, 3, 2, 2, 2, 1125, + 1127, 7, 87, 2, 2, 1126, 1128, 7, 26, 2, 2, 1127, 1126, 3, 2, 2, 2, 1127, + 1128, 3, 2, 2, 2, 1128, 1129, 3, 2, 2, 2, 1129, 1130, 7, 133, 2, 2, 1130, + 1136, 5, 62, 32, 2, 1131, 1132, 7, 11, 2, 2, 1132, 1133, 5, 228, 115, 2, + 1133, 1134, 7, 12, 2, 2, 1134, 1137, 3, 2, 2, 2, 1135, 1137, 7, 13, 2, + 2, 1136, 1131, 3, 2, 2, 2, 1136, 1135, 3, 2, 2, 2, 1137, 191, 3, 2, 2, + 2, 1138, 1140, 7, 130, 2, 2, 1139, 1138, 3, 2, 2, 2, 1139, 1140, 3, 2, + 2, 2, 1140, 1141, 3, 2, 2, 2, 1141, 1142, 7, 100, 2, 2, 1142, 1144, 7, + 133, 2, 2, 1143, 1145, 5, 6, 4, 2, 1144, 1143, 3, 2, 2, 2, 1144, 1145, + 3, 2, 2, 2, 1145, 1146, 3, 2, 2, 2, 1146, 1147, 5, 194, 98, 2, 1147, 1148, + 5, 196, 99, 2, 1148, 193, 3, 2, 2, 2, 1149, 1151, 5, 198, 100, 2, 1150, + 1149, 3, 2, 2, 2, 1150, 1151, 3, 2, 2, 2, 1151, 1153, 3, 2, 2, 2, 1152, + 1154, 5, 200, 101, 2, 1153, 1152, 3, 2, 2, 2, 1153, 1154, 3, 2, 2, 2, 1154, + 195, 3, 2, 2, 2, 1155, 1159, 7, 11, 2, 2, 1156, 1158, 5, 202, 102, 2, 1157, + 1156, 3, 2, 2, 2, 1158, 1161, 3, 2, 2, 2, 1159, 1157, 3, 2, 2, 2, 1159, + 1160, 3, 2, 2, 2, 1160, 1162, 3, 2, 2, 2, 1161, 1159, 3, 2, 2, 2, 1162, + 1163, 7, 12, 2, 2, 1163, 197, 3, 2, 2, 2, 1164, 1165, 7, 102, 2, 2, 1165, + 1166, 5, 28, 15, 2, 1166, 199, 3, 2, 2, 2, 1167, 1168, 7, 108, 2, 2, 1168, + 1169, 5, 94, 48, 2, 1169, 201, 3, 2, 2, 2, 1170, 1175, 5, 88, 45, 2, 1171, + 1175, 5, 204, 103, 2, 1172, 1175, 5, 208, 105, 2, 1173, 1175, 5, 124, 63, + 2, 1174, 1170, 3, 2, 2, 2, 1174, 1171, 3, 2, 2, 2, 1174, 1172, 3, 2, 2, + 2, 1174, 1173, 3, 2, 2, 2, 1175, 203, 3, 2, 2, 2, 1176, 1178, 5, 206, 104, + 2, 1177, 1179, 7, 26, 2, 2, 1178, 1177, 3, 2, 2, 2, 1178, 1179, 3, 2, 2, + 2, 1179, 1181, 3, 2, 2, 2, 1180, 1182, 7, 33, 2, 2, 1181, 1180, 3, 2, 2, + 2, 1181, 1182, 3, 2, 2, 2, 1182, 1183, 3, 2, 2, 2, 1183, 1185, 5, 246, + 124, 2, 1184, 1186, 5, 60, 31, 2, 1185, 1184, 3, 2, 2, 2, 1185, 1186, 3, + 2, 2, 2, 1186, 1188, 3, 2, 2, 2, 1187, 1189, 5, 2, 2, 2, 1188, 1187, 3, + 2, 2, 2, 1188, 1189, 3, 2, 2, 2, 1189, 1190, 3, 2, 2, 2, 1190, 1191, 7, + 13, 2, 2, 1191, 1221, 3, 2, 2, 2, 1192, 1194, 5, 206, 104, 2, 1193, 1195, + 7, 26, 2, 2, 1194, 1193, 3, 2, 2, 2, 1194, 1195, 3, 2, 2, 2, 1195, 1197, + 3, 2, 2, 2, 1196, 1198, 7, 33, 2, 2, 1197, 1196, 3, 2, 2, 2, 1197, 1198, + 3, 2, 2, 2, 1198, 1199, 3, 2, 2, 2, 1199, 1200, 5, 246, 124, 2, 1200, 1206, + 5, 62, 32, 2, 1201, 1202, 7, 11, 2, 2, 1202, 1203, 5, 228, 115, 2, 1203, + 1204, 7, 12, 2, 2, 1204, 1207, 3, 2, 2, 2, 1205, 1207, 7, 13, 2, 2, 1206, + 1201, 3, 2, 2, 2, 1206, 1205, 3, 2, 2, 2, 1207, 1221, 3, 2, 2, 2, 1208, + 1210, 5, 206, 104, 2, 1209, 1211, 7, 26, 2, 2, 1210, 1209, 3, 2, 2, 2, + 1210, 1211, 3, 2, 2, 2, 1211, 1213, 3, 2, 2, 2, 1212, 1214, 7, 33, 2, 2, + 1213, 1212, 3, 2, 2, 2, 1213, 1214, 3, 2, 2, 2, 1214, 1217, 3, 2, 2, 2, + 1215, 1218, 5, 242, 122, 2, 1216, 1218, 5, 244, 123, 2, 1217, 1215, 3, + 2, 2, 2, 1217, 1216, 3, 2, 2, 2, 1218, 1221, 3, 2, 2, 2, 1219, 1221, 5, + 130, 66, 2, 1220, 1176, 3, 2, 2, 2, 1220, 1192, 3, 2, 2, 2, 1220, 1208, + 3, 2, 2, 2, 1220, 1219, 3, 2, 2, 2, 1221, 205, 3, 2, 2, 2, 1222, 1224, + 7, 99, 2, 2, 1223, 1222, 3, 2, 2, 2, 1223, 1224, 3, 2, 2, 2, 1224, 1226, + 3, 2, 2, 2, 1225, 1227, 5, 70, 36, 2, 1226, 1225, 3, 2, 2, 2, 1226, 1227, + 3, 2, 2, 2, 1227, 1229, 3, 2, 2, 2, 1228, 1230, 7, 115, 2, 2, 1229, 1228, + 3, 2, 2, 2, 1229, 1230, 3, 2, 2, 2, 1230, 1232, 3, 2, 2, 2, 1231, 1233, + 7, 98, 2, 2, 1232, 1231, 3, 2, 2, 2, 1232, 1233, 3, 2, 2, 2, 1233, 207, + 3, 2, 2, 2, 1234, 1235, 5, 82, 42, 2, 1235, 1236, 7, 13, 2, 2, 1236, 209, + 3, 2, 2, 2, 1237, 1239, 7, 26, 2, 2, 1238, 1237, 3, 2, 2, 2, 1238, 1239, + 3, 2, 2, 2, 1239, 1240, 3, 2, 2, 2, 1240, 1241, 7, 133, 2, 2, 1241, 1243, + 7, 9, 2, 2, 1242, 1244, 5, 222, 112, 2, 1243, 1242, 3, 2, 2, 2, 1243, 1244, + 3, 2, 2, 2, 1244, 1245, 3, 2, 2, 2, 1245, 1246, 7, 10, 2, 2, 1246, 1247, + 7, 11, 2, 2, 1247, 1248, 5, 228, 115, 2, 1248, 1249, 7, 12, 2, 2, 1249, + 211, 3, 2, 2, 2, 1250, 1251, 7, 87, 2, 2, 1251, 1253, 7, 26, 2, 2, 1252, + 1254, 7, 133, 2, 2, 1253, 1252, 3, 2, 2, 2, 1253, 1254, 3, 2, 2, 2, 1254, + 1255, 3, 2, 2, 2, 1255, 1257, 7, 9, 2, 2, 1256, 1258, 5, 222, 112, 2, 1257, + 1256, 3, 2, 2, 2, 1257, 1258, 3, 2, 2, 2, 1258, 1259, 3, 2, 2, 2, 1259, + 1260, 7, 10, 2, 2, 1260, 1261, 7, 11, 2, 2, 1261, 1262, 5, 228, 115, 2, + 1262, 1263, 7, 12, 2, 2, 1263, 213, 3, 2, 2, 2, 1264, 1265, 7, 11, 2, 2, + 1265, 1270, 5, 216, 109, 2, 1266, 1267, 7, 14, 2, 2, 1267, 1269, 5, 216, + 109, 2, 1268, 1266, 3, 2, 2, 2, 1269, 1272, 3, 2, 2, 2, 1270, 1268, 3, + 2, 2, 2, 1270, 1271, 3, 2, 2, 2, 1271, 1274, 3, 2, 2, 2, 1272, 1270, 3, + 2, 2, 2, 1273, 1275, 7, 14, 2, 2, 1274, 1273, 3, 2, 2, 2, 1274, 1275, 3, + 2, 2, 2, 1275, 1276, 3, 2, 2, 2, 1276, 1277, 7, 12, 2, 2, 1277, 215, 3, + 2, 2, 2, 1278, 1279, 7, 26, 2, 2, 1279, 1280, 5, 220, 111, 2, 1280, 217, + 3, 2, 2, 2, 1281, 1282, 7, 11, 2, 2, 1282, 1287, 5, 220, 111, 2, 1283, + 1284, 7, 14, 2, 2, 1284, 1286, 5, 220, 111, 2, 1285, 1283, 3, 2, 2, 2, + 1286, 1289, 3, 2, 2, 2, 1287, 1285, 3, 2, 2, 2, 1287, 1288, 3, 2, 2, 2, + 1288, 1291, 3, 2, 2, 2, 1289, 1287, 3, 2, 2, 2, 1290, 1292, 7, 14, 2, 2, + 1291, 1290, 3, 2, 2, 2, 1291, 1292, 3, 2, 2, 2, 1292, 1293, 3, 2, 2, 2, + 1293, 1294, 7, 12, 2, 2, 1294, 219, 3, 2, 2, 2, 1295, 1296, 7, 7, 2, 2, + 1296, 1297, 5, 256, 129, 2, 1297, 1298, 7, 8, 2, 2, 1298, 1300, 7, 9, 2, + 2, 1299, 1301, 5, 222, 112, 2, 1300, 1299, 3, 2, 2, 2, 1300, 1301, 3, 2, + 2, 2, 1301, 1302, 3, 2, 2, 2, 1302, 1303, 7, 10, 2, 2, 1303, 1304, 7, 11, + 2, 2, 1304, 1305, 5, 228, 115, 2, 1305, 1306, 7, 12, 2, 2, 1306, 221, 3, + 2, 2, 2, 1307, 1312, 5, 224, 113, 2, 1308, 1309, 7, 14, 2, 2, 1309, 1311, + 5, 224, 113, 2, 1310, 1308, 3, 2, 2, 2, 1311, 1314, 3, 2, 2, 2, 1312, 1310, + 3, 2, 2, 2, 1312, 1313, 3, 2, 2, 2, 1313, 1317, 3, 2, 2, 2, 1314, 1312, + 3, 2, 2, 2, 1315, 1316, 7, 14, 2, 2, 1316, 1318, 5, 226, 114, 2, 1317, + 1315, 3, 2, 2, 2, 1317, 1318, 3, 2, 2, 2, 1318, 1327, 3, 2, 2, 2, 1319, + 1327, 5, 226, 114, 2, 1320, 1327, 5, 232, 117, 2, 1321, 1324, 5, 238, 120, + 2, 1322, 1323, 7, 17, 2, 2, 1323, 1325, 5, 222, 112, 2, 1324, 1322, 3, + 2, 2, 2, 1324, 1325, 3, 2, 2, 2, 1325, 1327, 3, 2, 2, 2, 1326, 1307, 3, + 2, 2, 2, 1326, 1319, 3, 2, 2, 2, 1326, 1320, 3, 2, 2, 2, 1326, 1321, 3, + 2, 2, 2, 1327, 223, 3, 2, 2, 2, 1328, 1330, 5, 70, 36, 2, 1329, 1328, 3, + 2, 2, 2, 1329, 1330, 3, 2, 2, 2, 1330, 1331, 3, 2, 2, 2, 1331, 1333, 7, + 133, 2, 2, 1332, 1334, 5, 60, 31, 2, 1333, 1332, 3, 2, 2, 2, 1333, 1334, + 3, 2, 2, 2, 1334, 1337, 3, 2, 2, 2, 1335, 1336, 7, 15, 2, 2, 1336, 1338, + 5, 256, 129, 2, 1337, 1335, 3, 2, 2, 2, 1337, 1338, 3, 2, 2, 2, 1338, 225, + 3, 2, 2, 2, 1339, 1340, 7, 18, 2, 2, 1340, 1341, 7, 133, 2, 2, 1341, 227, + 3, 2, 2, 2, 1342, 1344, 5, 230, 116, 2, 1343, 1342, 3, 2, 2, 2, 1343, 1344, + 3, 2, 2, 2, 1344, 229, 3, 2, 2, 2, 1345, 1347, 5, 122, 62, 2, 1346, 1345, + 3, 2, 2, 2, 1347, 1348, 3, 2, 2, 2, 1348, 1346, 3, 2, 2, 2, 1348, 1349, + 3, 2, 2, 2, 1349, 231, 3, 2, 2, 2, 1350, 1352, 7, 7, 2, 2, 1351, 1353, + 5, 234, 118, 2, 1352, 1351, 3, 2, 2, 2, 1352, 1353, 3, 2, 2, 2, 1353, 1354, + 3, 2, 2, 2, 1354, 1355, 7, 8, 2, 2, 1355, 233, 3, 2, 2, 2, 1356, 1365, + 5, 256, 129, 2, 1357, 1359, 7, 14, 2, 2, 1358, 1357, 3, 2, 2, 2, 1359, + 1360, 3, 2, 2, 2, 1360, 1358, 3, 2, 2, 2, 1360, 1361, 3, 2, 2, 2, 1361, + 1362, 3, 2, 2, 2, 1362, 1364, 5, 256, 129, 2, 1363, 1358, 3, 2, 2, 2, 1364, + 1367, 3, 2, 2, 2, 1365, 1363, 3, 2, 2, 2, 1365, 1366, 3, 2, 2, 2, 1366, + 1374, 3, 2, 2, 2, 1367, 1365, 3, 2, 2, 2, 1368, 1370, 7, 14, 2, 2, 1369, + 1368, 3, 2, 2, 2, 1370, 1371, 3, 2, 2, 2, 1371, 1369, 3, 2, 2, 2, 1371, + 1372, 3, 2, 2, 2, 1372, 1373, 3, 2, 2, 2, 1373, 1375, 5, 236, 119, 2, 1374, + 1369, 3, 2, 2, 2, 1374, 1375, 3, 2, 2, 2, 1375, 1378, 3, 2, 2, 2, 1376, + 1378, 5, 236, 119, 2, 1377, 1356, 3, 2, 2, 2, 1377, 1376, 3, 2, 2, 2, 1378, + 235, 3, 2, 2, 2, 1379, 1382, 7, 18, 2, 2, 1380, 1383, 7, 133, 2, 2, 1381, + 1383, 5, 256, 129, 2, 1382, 1380, 3, 2, 2, 2, 1382, 1381, 3, 2, 2, 2, 1383, + 237, 3, 2, 2, 2, 1384, 1393, 7, 11, 2, 2, 1385, 1390, 5, 240, 121, 2, 1386, + 1387, 7, 14, 2, 2, 1387, 1389, 5, 240, 121, 2, 1388, 1386, 3, 2, 2, 2, + 1389, 1392, 3, 2, 2, 2, 1390, 1388, 3, 2, 2, 2, 1390, 1391, 3, 2, 2, 2, + 1391, 1394, 3, 2, 2, 2, 1392, 1390, 3, 2, 2, 2, 1393, 1385, 3, 2, 2, 2, + 1393, 1394, 3, 2, 2, 2, 1394, 1396, 3, 2, 2, 2, 1395, 1397, 7, 14, 2, 2, + 1396, 1395, 3, 2, 2, 2, 1396, 1397, 3, 2, 2, 2, 1397, 1398, 3, 2, 2, 2, + 1398, 1399, 7, 12, 2, 2, 1399, 239, 3, 2, 2, 2, 1400, 1401, 5, 246, 124, + 2, 1401, 1402, 9, 7, 2, 2, 1402, 1403, 5, 256, 129, 2, 1403, 1432, 3, 2, + 2, 2, 1404, 1405, 7, 7, 2, 2, 1405, 1406, 5, 256, 129, 2, 1406, 1407, 7, + 8, 2, 2, 1407, 1408, 7, 17, 2, 2, 1408, 1409, 5, 256, 129, 2, 1409, 1432, + 3, 2, 2, 2, 1410, 1412, 7, 99, 2, 2, 1411, 1410, 3, 2, 2, 2, 1411, 1412, + 3, 2, 2, 2, 1412, 1414, 3, 2, 2, 2, 1413, 1415, 7, 26, 2, 2, 1414, 1413, + 3, 2, 2, 2, 1414, 1415, 3, 2, 2, 2, 1415, 1416, 3, 2, 2, 2, 1416, 1417, + 5, 246, 124, 2, 1417, 1419, 7, 9, 2, 2, 1418, 1420, 5, 222, 112, 2, 1419, + 1418, 3, 2, 2, 2, 1419, 1420, 3, 2, 2, 2, 1420, 1421, 3, 2, 2, 2, 1421, + 1422, 7, 10, 2, 2, 1422, 1423, 7, 11, 2, 2, 1423, 1424, 5, 228, 115, 2, + 1424, 1425, 7, 12, 2, 2, 1425, 1432, 3, 2, 2, 2, 1426, 1432, 5, 242, 122, + 2, 1427, 1432, 5, 244, 123, 2, 1428, 1432, 5, 210, 106, 2, 1429, 1432, + 7, 133, 2, 2, 1430, 1432, 5, 78, 40, 2, 1431, 1400, 3, 2, 2, 2, 1431, 1404, + 3, 2, 2, 2, 1431, 1411, 3, 2, 2, 2, 1431, 1426, 3, 2, 2, 2, 1431, 1427, + 3, 2, 2, 2, 1431, 1428, 3, 2, 2, 2, 1431, 1429, 3, 2, 2, 2, 1431, 1430, + 3, 2, 2, 2, 1432, 241, 3, 2, 2, 2, 1433, 1434, 5, 276, 139, 2, 1434, 1435, + 7, 9, 2, 2, 1435, 1437, 7, 10, 2, 2, 1436, 1438, 5, 60, 31, 2, 1437, 1436, + 3, 2, 2, 2, 1437, 1438, 3, 2, 2, 2, 1438, 1439, 3, 2, 2, 2, 1439, 1440, + 7, 11, 2, 2, 1440, 1441, 5, 228, 115, 2, 1441, 1442, 7, 12, 2, 2, 1442, + 243, 3, 2, 2, 2, 1443, 1444, 5, 278, 140, 2, 1444, 1447, 7, 9, 2, 2, 1445, + 1448, 7, 133, 2, 2, 1446, 1448, 5, 4, 3, 2, 1447, 1445, 3, 2, 2, 2, 1447, + 1446, 3, 2, 2, 2, 1448, 1450, 3, 2, 2, 2, 1449, 1451, 5, 60, 31, 2, 1450, + 1449, 3, 2, 2, 2, 1450, 1451, 3, 2, 2, 2, 1451, 1452, 3, 2, 2, 2, 1452, + 1453, 7, 10, 2, 2, 1453, 1454, 7, 11, 2, 2, 1454, 1455, 5, 228, 115, 2, + 1455, 1456, 7, 12, 2, 2, 1456, 245, 3, 2, 2, 2, 1457, 1465, 5, 270, 136, + 2, 1458, 1465, 7, 134, 2, 2, 1459, 1465, 5, 268, 135, 2, 1460, 1461, 7, + 7, 2, 2, 1461, 1462, 5, 256, 129, 2, 1462, 1463, 7, 8, 2, 2, 1463, 1465, + 3, 2, 2, 2, 1464, 1457, 3, 2, 2, 2, 1464, 1458, 3, 2, 2, 2, 1464, 1459, + 3, 2, 2, 2, 1464, 1460, 3, 2, 2, 2, 1465, 247, 3, 2, 2, 2, 1466, 1480, + 7, 9, 2, 2, 1467, 1472, 5, 256, 129, 2, 1468, 1469, 7, 14, 2, 2, 1469, + 1471, 5, 256, 129, 2, 1470, 1468, 3, 2, 2, 2, 1471, 1474, 3, 2, 2, 2, 1472, + 1470, 3, 2, 2, 2, 1472, 1473, 3, 2, 2, 2, 1473, 1477, 3, 2, 2, 2, 1474, + 1472, 3, 2, 2, 2, 1475, 1476, 7, 14, 2, 2, 1476, 1478, 5, 250, 126, 2, + 1477, 1475, 3, 2, 2, 2, 1477, 1478, 3, 2, 2, 2, 1478, 1481, 3, 2, 2, 2, + 1479, 1481, 5, 250, 126, 2, 1480, 1467, 3, 2, 2, 2, 1480, 1479, 3, 2, 2, + 2, 1480, 1481, 3, 2, 2, 2, 1481, 1482, 3, 2, 2, 2, 1482, 1483, 7, 10, 2, + 2, 1483, 249, 3, 2, 2, 2, 1484, 1485, 7, 18, 2, 2, 1485, 1486, 7, 133, + 2, 2, 1486, 251, 3, 2, 2, 2, 1487, 1492, 5, 256, 129, 2, 1488, 1489, 7, + 14, 2, 2, 1489, 1491, 5, 256, 129, 2, 1490, 1488, 3, 2, 2, 2, 1491, 1494, + 3, 2, 2, 2, 1492, 1490, 3, 2, 2, 2, 1492, 1493, 3, 2, 2, 2, 1493, 1496, + 3, 2, 2, 2, 1494, 1492, 3, 2, 2, 2, 1495, 1497, 7, 14, 2, 2, 1496, 1495, + 3, 2, 2, 2, 1496, 1497, 3, 2, 2, 2, 1497, 253, 3, 2, 2, 2, 1498, 1500, + 7, 99, 2, 2, 1499, 1498, 3, 2, 2, 2, 1499, 1500, 3, 2, 2, 2, 1500, 1501, + 3, 2, 2, 2, 1501, 1503, 7, 87, 2, 2, 1502, 1504, 7, 133, 2, 2, 1503, 1502, + 3, 2, 2, 2, 1503, 1504, 3, 2, 2, 2, 1504, 1505, 3, 2, 2, 2, 1505, 1507, + 7, 9, 2, 2, 1506, 1508, 5, 222, 112, 2, 1507, 1506, 3, 2, 2, 2, 1507, 1508, + 3, 2, 2, 2, 1508, 1509, 3, 2, 2, 2, 1509, 1511, 7, 10, 2, 2, 1510, 1512, + 5, 60, 31, 2, 1511, 1510, 3, 2, 2, 2, 1511, 1512, 3, 2, 2, 2, 1512, 1513, + 3, 2, 2, 2, 1513, 1514, 7, 11, 2, 2, 1514, 1515, 5, 228, 115, 2, 1515, + 1516, 7, 12, 2, 2, 1516, 255, 3, 2, 2, 2, 1517, 1518, 8, 129, 1, 2, 1518, + 1575, 5, 254, 128, 2, 1519, 1575, 5, 258, 130, 2, 1520, 1522, 7, 100, 2, + 2, 1521, 1523, 7, 133, 2, 2, 1522, 1521, 3, 2, 2, 2, 1522, 1523, 3, 2, + 2, 2, 1523, 1524, 3, 2, 2, 2, 1524, 1575, 5, 196, 99, 2, 1525, 1526, 7, + 76, 2, 2, 1526, 1528, 5, 256, 129, 2, 1527, 1529, 5, 14, 8, 2, 1528, 1527, + 3, 2, 2, 2, 1528, 1529, 3, 2, 2, 2, 1529, 1531, 3, 2, 2, 2, 1530, 1532, + 5, 248, 125, 2, 1531, 1530, 3, 2, 2, 2, 1531, 1532, 3, 2, 2, 2, 1532, 1575, + 3, 2, 2, 2, 1533, 1534, 7, 93, 2, 2, 1534, 1575, 5, 256, 129, 42, 1535, + 1536, 7, 81, 2, 2, 1536, 1575, 5, 256, 129, 41, 1537, 1538, 7, 73, 2, 2, + 1538, 1575, 5, 256, 129, 40, 1539, 1540, 7, 20, 2, 2, 1540, 1575, 5, 256, + 129, 39, 1541, 1542, 7, 21, 2, 2, 1542, 1575, 5, 256, 129, 38, 1543, 1544, + 7, 22, 2, 2, 1544, 1575, 5, 256, 129, 37, 1545, 1546, 7, 23, 2, 2, 1546, + 1575, 5, 256, 129, 36, 1547, 1548, 7, 24, 2, 2, 1548, 1575, 5, 256, 129, + 35, 1549, 1550, 7, 25, 2, 2, 1550, 1575, 5, 256, 129, 34, 1551, 1552, 7, + 107, 2, 2, 1552, 1575, 5, 256, 129, 33, 1553, 1575, 5, 218, 110, 2, 1554, + 1575, 5, 214, 108, 2, 1555, 1575, 5, 212, 107, 2, 1556, 1575, 5, 162, 82, + 2, 1557, 1575, 7, 88, 2, 2, 1558, 1560, 5, 270, 136, 2, 1559, 1561, 5, + 256, 129, 2, 1560, 1559, 3, 2, 2, 2, 1560, 1561, 3, 2, 2, 2, 1561, 1575, + 3, 2, 2, 2, 1562, 1575, 7, 103, 2, 2, 1563, 1575, 5, 266, 134, 2, 1564, + 1575, 5, 232, 117, 2, 1565, 1575, 5, 238, 120, 2, 1566, 1567, 7, 9, 2, + 2, 1567, 1568, 5, 252, 127, 2, 1568, 1569, 7, 10, 2, 2, 1569, 1575, 3, + 2, 2, 2, 1570, 1572, 5, 14, 8, 2, 1571, 1573, 5, 252, 127, 2, 1572, 1571, + 3, 2, 2, 2, 1572, 1573, 3, 2, 2, 2, 1573, 1575, 3, 2, 2, 2, 1574, 1517, + 3, 2, 2, 2, 1574, 1519, 3, 2, 2, 2, 1574, 1520, 3, 2, 2, 2, 1574, 1525, + 3, 2, 2, 2, 1574, 1533, 3, 2, 2, 2, 1574, 1535, 3, 2, 2, 2, 1574, 1537, + 3, 2, 2, 2, 1574, 1539, 3, 2, 2, 2, 1574, 1541, 3, 2, 2, 2, 1574, 1543, + 3, 2, 2, 2, 1574, 1545, 3, 2, 2, 2, 1574, 1547, 3, 2, 2, 2, 1574, 1549, + 3, 2, 2, 2, 1574, 1551, 3, 2, 2, 2, 1574, 1553, 3, 2, 2, 2, 1574, 1554, + 3, 2, 2, 2, 1574, 1555, 3, 2, 2, 2, 1574, 1556, 3, 2, 2, 2, 1574, 1557, + 3, 2, 2, 2, 1574, 1558, 3, 2, 2, 2, 1574, 1562, 3, 2, 2, 2, 1574, 1563, + 3, 2, 2, 2, 1574, 1564, 3, 2, 2, 2, 1574, 1565, 3, 2, 2, 2, 1574, 1566, + 3, 2, 2, 2, 1574, 1570, 3, 2, 2, 2, 1575, 1657, 3, 2, 2, 2, 1576, 1577, + 12, 32, 2, 2, 1577, 1578, 7, 31, 2, 2, 1578, 1656, 5, 256, 129, 32, 1579, + 1580, 12, 31, 2, 2, 1580, 1581, 9, 8, 2, 2, 1581, 1656, 5, 256, 129, 32, + 1582, 1583, 12, 30, 2, 2, 1583, 1584, 9, 9, 2, 2, 1584, 1656, 5, 256, 129, + 31, 1585, 1586, 12, 29, 2, 2, 1586, 1587, 9, 10, 2, 2, 1587, 1656, 5, 256, + 129, 30, 1588, 1589, 12, 28, 2, 2, 1589, 1590, 9, 11, 2, 2, 1590, 1656, + 5, 256, 129, 29, 1591, 1592, 12, 27, 2, 2, 1592, 1593, 7, 72, 2, 2, 1593, + 1656, 5, 256, 129, 28, 1594, 1595, 12, 26, 2, 2, 1595, 1596, 7, 94, 2, + 2, 1596, 1656, 5, 256, 129, 27, 1597, 1598, 12, 25, 2, 2, 1598, 1599, 9, + 12, 2, 2, 1599, 1656, 5, 256, 129, 26, 1600, 1601, 12, 24, 2, 2, 1601, + 1602, 7, 45, 2, 2, 1602, 1656, 5, 256, 129, 25, 1603, 1604, 12, 23, 2, + 2, 1604, 1605, 7, 46, 2, 2, 1605, 1656, 5, 256, 129, 24, 1606, 1607, 12, + 22, 2, 2, 1607, 1608, 7, 47, 2, 2, 1608, 1656, 5, 256, 129, 23, 1609, 1610, + 12, 21, 2, 2, 1610, 1611, 7, 48, 2, 2, 1611, 1656, 5, 256, 129, 22, 1612, + 1613, 12, 20, 2, 2, 1613, 1614, 7, 49, 2, 2, 1614, 1656, 5, 256, 129, 21, + 1615, 1616, 12, 19, 2, 2, 1616, 1617, 7, 16, 2, 2, 1617, 1618, 5, 256, + 129, 2, 1618, 1619, 7, 17, 2, 2, 1619, 1620, 5, 256, 129, 20, 1620, 1656, + 3, 2, 2, 2, 1621, 1622, 12, 18, 2, 2, 1622, 1623, 7, 32, 2, 2, 1623, 1656, + 5, 256, 129, 19, 1624, 1625, 12, 17, 2, 2, 1625, 1626, 7, 15, 2, 2, 1626, + 1656, 5, 256, 129, 17, 1627, 1628, 12, 16, 2, 2, 1628, 1629, 5, 264, 133, + 2, 1629, 1630, 5, 256, 129, 16, 1630, 1656, 3, 2, 2, 2, 1631, 1632, 12, + 48, 2, 2, 1632, 1633, 7, 7, 2, 2, 1633, 1634, 5, 252, 127, 2, 1634, 1635, + 7, 8, 2, 2, 1635, 1656, 3, 2, 2, 2, 1636, 1638, 12, 47, 2, 2, 1637, 1639, + 7, 16, 2, 2, 1638, 1637, 3, 2, 2, 2, 1638, 1639, 3, 2, 2, 2, 1639, 1640, + 3, 2, 2, 2, 1640, 1642, 7, 19, 2, 2, 1641, 1643, 7, 33, 2, 2, 1642, 1641, + 3, 2, 2, 2, 1642, 1643, 3, 2, 2, 2, 1643, 1644, 3, 2, 2, 2, 1644, 1656, + 5, 270, 136, 2, 1645, 1646, 12, 46, 2, 2, 1646, 1656, 5, 248, 125, 2, 1647, + 1648, 12, 44, 2, 2, 1648, 1649, 6, 129, 37, 2, 1649, 1656, 7, 20, 2, 2, + 1650, 1651, 12, 43, 2, 2, 1651, 1652, 6, 129, 39, 2, 1652, 1656, 7, 21, + 2, 2, 1653, 1654, 12, 15, 2, 2, 1654, 1656, 7, 135, 2, 2, 1655, 1576, 3, + 2, 2, 2, 1655, 1579, 3, 2, 2, 2, 1655, 1582, 3, 2, 2, 2, 1655, 1585, 3, + 2, 2, 2, 1655, 1588, 3, 2, 2, 2, 1655, 1591, 3, 2, 2, 2, 1655, 1594, 3, + 2, 2, 2, 1655, 1597, 3, 2, 2, 2, 1655, 1600, 3, 2, 2, 2, 1655, 1603, 3, + 2, 2, 2, 1655, 1606, 3, 2, 2, 2, 1655, 1609, 3, 2, 2, 2, 1655, 1612, 3, + 2, 2, 2, 1655, 1615, 3, 2, 2, 2, 1655, 1621, 3, 2, 2, 2, 1655, 1624, 3, + 2, 2, 2, 1655, 1627, 3, 2, 2, 2, 1655, 1631, 3, 2, 2, 2, 1655, 1636, 3, + 2, 2, 2, 1655, 1645, 3, 2, 2, 2, 1655, 1647, 3, 2, 2, 2, 1655, 1650, 3, + 2, 2, 2, 1655, 1653, 3, 2, 2, 2, 1656, 1659, 3, 2, 2, 2, 1657, 1655, 3, + 2, 2, 2, 1657, 1658, 3, 2, 2, 2, 1658, 257, 3, 2, 2, 2, 1659, 1657, 3, + 2, 2, 2, 1660, 1662, 7, 99, 2, 2, 1661, 1660, 3, 2, 2, 2, 1661, 1662, 3, + 2, 2, 2, 1662, 1663, 3, 2, 2, 2, 1663, 1665, 5, 260, 131, 2, 1664, 1666, + 5, 60, 31, 2, 1665, 1664, 3, 2, 2, 2, 1665, 1666, 3, 2, 2, 2, 1666, 1667, + 3, 2, 2, 2, 1667, 1668, 7, 61, 2, 2, 1668, 1669, 5, 262, 132, 2, 1669, + 259, 3, 2, 2, 2, 1670, 1677, 7, 133, 2, 2, 1671, 1673, 7, 9, 2, 2, 1672, + 1674, 5, 222, 112, 2, 1673, 1672, 3, 2, 2, 2, 1673, 1674, 3, 2, 2, 2, 1674, + 1675, 3, 2, 2, 2, 1675, 1677, 7, 10, 2, 2, 1676, 1670, 3, 2, 2, 2, 1676, + 1671, 3, 2, 2, 2, 1677, 261, 3, 2, 2, 2, 1678, 1684, 5, 256, 129, 2, 1679, + 1680, 7, 11, 2, 2, 1680, 1681, 5, 228, 115, 2, 1681, 1682, 7, 12, 2, 2, + 1682, 1684, 3, 2, 2, 2, 1683, 1678, 3, 2, 2, 2, 1683, 1679, 3, 2, 2, 2, + 1684, 263, 3, 2, 2, 2, 1685, 1686, 9, 13, 2, 2, 1686, 265, 3, 2, 2, 2, + 1687, 1694, 7, 63, 2, 2, 1688, 1694, 7, 64, 2, 2, 1689, 1694, 7, 134, 2, + 2, 1690, 1694, 7, 135, 2, 2, 1691, 1694, 7, 6, 2, 2, 1692, 1694, 5, 268, + 135, 2, 1693, 1687, 3, 2, 2, 2, 1693, 1688, 3, 2, 2, 2, 1693, 1689, 3, + 2, 2, 2, 1693, 1690, 3, 2, 2, 2, 1693, 1691, 3, 2, 2, 2, 1693, 1692, 3, + 2, 2, 2, 1694, 267, 3, 2, 2, 2, 1695, 1696, 9, 14, 2, 2, 1696, 269, 3, + 2, 2, 2, 1697, 1700, 7, 133, 2, 2, 1698, 1700, 5, 272, 137, 2, 1699, 1697, + 3, 2, 2, 2, 1699, 1698, 3, 2, 2, 2, 1700, 271, 3, 2, 2, 2, 1701, 1705, + 5, 274, 138, 2, 1702, 1705, 7, 63, 2, 2, 1703, 1705, 7, 64, 2, 2, 1704, + 1701, 3, 2, 2, 2, 1704, 1702, 3, 2, 2, 2, 1704, 1703, 3, 2, 2, 2, 1705, + 273, 3, 2, 2, 2, 1706, 1707, 9, 15, 2, 2, 1707, 275, 3, 2, 2, 2, 1708, + 1709, 7, 133, 2, 2, 1709, 1710, 6, 139, 41, 2, 1710, 1711, 5, 246, 124, + 2, 1711, 277, 3, 2, 2, 2, 1712, 1713, 7, 133, 2, 2, 1713, 1714, 6, 140, + 42, 2, 1714, 1715, 5, 246, 124, 2, 1715, 279, 3, 2, 2, 2, 1716, 1721, 7, + 13, 2, 2, 1717, 1721, 7, 2, 2, 3, 1718, 1721, 6, 141, 43, 2, 1719, 1721, + 6, 141, 44, 2, 1720, 1716, 3, 2, 2, 2, 1720, 1717, 3, 2, 2, 2, 1720, 1718, + 3, 2, 2, 2, 1720, 1719, 3, 2, 2, 2, 1721, 281, 3, 2, 2, 2, 220, 287, 291, + 300, 305, 308, 315, 324, 334, 345, 347, 368, 376, 384, 399, 403, 407, 413, + 420, 430, 432, 448, 452, 456, 464, 468, 483, 487, 490, 494, 497, 501, 507, + 511, 515, 523, 529, 536, 539, 541, 543, 550, 554, 557, 561, 567, 574, 578, + 581, 586, 589, 592, 598, 602, 606, 610, 621, 628, 635, 640, 648, 651, 656, + 659, 663, 673, 677, 683, 689, 696, 702, 708, 716, 721, 736, 743, 748, 756, + 763, 770, 775, 808, 812, 819, 825, 833, 842, 846, 854, 862, 869, 873, 877, + 881, 884, 887, 890, 894, 896, 903, 908, 911, 915, 918, 925, 934, 953, 957, + 961, 971, 975, 982, 989, 997, 1005, 1011, 1018, 1025, 1032, 1039, 1057, + 1061, 1063, 1070, 1076, 1081, 1096, 1099, 1104, 1107, 1114, 1123, 1127, + 1136, 1139, 1144, 1150, 1153, 1159, 1174, 1178, 1181, 1185, 1188, 1194, + 1197, 1206, 1210, 1213, 1217, 1220, 1223, 1226, 1229, 1232, 1238, 1243, + 1253, 1257, 1270, 1274, 1287, 1291, 1300, 1312, 1317, 1324, 1326, 1329, + 1333, 1337, 1343, 1348, 1352, 1360, 1365, 1371, 1374, 1377, 1382, 1390, + 1393, 1396, 1411, 1414, 1419, 1431, 1437, 1447, 1450, 1464, 1472, 1477, + 1480, 1492, 1496, 1499, 1503, 1507, 1511, 1522, 1528, 1531, 1560, 1572, + 1574, 1638, 1642, 1655, 1657, 1661, 1665, 1673, 1676, 1683, 1693, 1699, + 1704, 1720, +} +var deserializer = antlr.NewATNDeserializer(nil) +var deserializedATN = deserializer.DeserializeFromUInt16(parserATN) + +var literalNames = []string{ + "", "", "", "", "", "'['", "']'", "'('", "')'", "'{'", "'}'", "';'", "','", + "'='", "'?'", "':'", "'...'", "'.'", "'++'", "'--'", "'+'", "'-'", "'~'", + "'!'", "'*'", "'_'", "'$'", "'/'", "'%'", "'**'", "'??'", "'#'", "'>>'", + "'<<'", "'>>>'", "'<'", "'>'", "'<='", "'>='", "'=='", "'!='", "'==='", + "'!=='", "'&'", "'^'", "'|'", "'&&'", "'||'", "'*='", "'/='", "'%='", "'+='", + "'-='", "'<<='", "'>>='", "'>>>='", "'&='", "'^='", "'|='", "'=>'", "'**='", + "'null'", "", "", "", "", "", "", "'break'", "'do'", "'instanceof'", "'typeof'", + "'case'", "'else'", "'new'", "'var'", "'catch'", "'finally'", "'return'", + "'void'", "'continue'", "'for'", "'switch'", "'while'", "'debugger'", "'function'", + "'this'", "'with'", "'default'", "'if'", "'throw'", "'delete'", "'in'", + "'try'", "'as'", "'from'", "'readonly'", "'async'", "'class'", "'enum'", + "'extends'", "'super'", "'const'", "'export'", "'import'", "'await'", "'implements'", + "'let'", "'private'", "'public'", "'interface'", "'package'", "'protected'", + "'static'", "'yield'", "'any'", "'number'", "'boolean'", "'string'", "'symbol'", + "'type'", "'get '", "'set '", "'constructor'", "'namespace'", "'require'", + "'module'", "'declare'", "'abstract'", "'is'", "'@'", +} +var symbolicNames = []string{ + "", "HashBangLine", "MultiLineComment", "SingleLineComment", "RegularExpressionLiteral", + "OpenBracket", "CloseBracket", "OpenParen", "CloseParen", "OpenBrace", + "CloseBrace", "SemiColon", "Comma", "Assign", "QuestionMark", "Colon", + "Ellipsis", "Dot", "PlusPlus", "MinusMinus", "Plus", "Minus", "BitNot", + "Not", "Multiply", "Lodash", "Dollar", "Divide", "Modulus", "Power", "NullCoalesce", + "Hashtag", "RightShiftArithmetic", "LeftShiftArithmetic", "RightShiftLogical", + "LessThan", "MoreThan", "LessThanEquals", "GreaterThanEquals", "Equals_", + "NotEquals", "IdentityEquals", "IdentityNotEquals", "BitAnd", "BitXOr", + "BitOr", "And", "Or", "MultiplyAssign", "DivideAssign", "ModulusAssign", + "PlusAssign", "MinusAssign", "LeftShiftArithmeticAssign", "RightShiftArithmeticAssign", + "RightShiftLogicalAssign", "BitAndAssign", "BitXorAssign", "BitOrAssign", + "ARROW", "PowerAssign", "NullLiteral", "BooleanLiteral", "DecimalLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "OctalIntegerLiteral2", "BinaryIntegerLiteral", + "Break", "Do", "Instanceof", "Typeof", "Case", "Else", "New", "Var", "Catch", + "Finally", "Return", "Void", "Continue", "For", "Switch", "While", "Debugger", + "Function", "This", "With", "Default", "If", "Throw", "Delete", "In", "Try", + "As", "From", "ReadOnly", "Async", "NodeName", "Enum", "Extends", "Super", + "Const", "Export", "Import", "Await", "Implements", "Let", "Private", "Public", + "Interface", "Package", "Protected", "Static", "Yield", "ANY", "NUMBER", + "BOOLEAN", "STRING", "SYMBOL", "TypeType", "Get", "Set", "Constructor", "Namespace", + "Require", "Module", "Declare", "Abstract", "Is", "At", "Identifier", "StringLiteral", + "TemplateStringLiteral", "WhiteSpaces", "LineTerminator", "HtmlComment", + "CDataComment", "UnexpectedCharacter", +} + +var ruleNames = []string{ + "initializer", "bindingPattern", "typeParameters", "typeParameterList", + "typeParameter", "constraint", "typeArguments", "typeArgumentList", "typeArgument", + "type_", "unionOrIntersectionOrPrimaryType", "primaryType", "predefinedType", + "typeReference", "typeGeneric", "typeIncludeGeneric", "typeName", "objectType", + "typeBody", "typeMemberList", "typeMember", "arrayType", "tupleType", "tupleElementTypes", + "functionType", "constructorType", "typeQuery", "typeQueryExpression", + "propertySignature", "typeAnnotation", "callSignature", "parameterList", + "requiredParameterList", "requiredParameter", "accessibilityModifier", + "identifierOrPattern", "optionalParameterList", "optionalParameter", "restParameter", + "constructSignature", "indexSignature", "methodSignature", "typeAliasDeclaration", + "constructorDeclaration", "interfaceDeclaration", "interfaceExtendsClause", + "classOrInterfaceTypeList", "enumDeclaration", "enumBody", "enumMemberList", + "enumMember", "namespaceDeclaration", "namespaceName", "importAliasDeclaration", + "importAll", "decoratorList", "decorator", "decoratorMemberExpression", + "decoratorCallExpression", "program", "sourceElement", "statement", "block", + "statementList", "abstractDeclaration", "importStatement", "importFromBlock", + "multipleImportStatement", "exportStatement", "variableStatement", "variableDeclarationList", + "variableDeclaration", "emptyStatement_", "expressionStatement", "ifStatement", + "iterationStatement", "varModifier", "continueStatement", "breakStatement", + "returnStatement", "yieldStatement", "withStatement", "switchStatement", + "caseBlock", "caseClauses", "caseClause", "defaultClause", "labelledStatement", + "throwStatement", "tryStatement", "catchProduction", "assignable", "finallyProduction", + "debuggerStatement", "functionDeclaration", "classDeclaration", "classHeritage", + "classTail", "classExtendsClause", "implementsClause", "classElement", + "propertyMemberDeclaration", "propertyMemberBase", "indexMemberDeclaration", + "generatorMethod", "generatorFunctionDeclaration", "generatorBlock", "generatorDefinition", + "iteratorBlock", "iteratorDefinition", "formalParameterList", "formalParameterArg", + "lastFormalParameterArg", "functionBody", "sourceElements", "arrayLiteral", + "elementList", "lastElement", "objectLiteral", "propertyAssignment", "getAccessor", + "setAccessor", "propertyName", "arguments", "lastArgument", "expressionSequence", + "functionExpressionDeclaration", "singleExpression", "arrowFunctionDeclaration", + "arrowFunctionParameters", "arrowFunctionBody", "assignmentOperator", "literal", + "numericLiteral", "identifierName", "reservedWord", "keyword", "getter", + "setter", "eos", +} +var decisionToDFA = make([]*antlr.DFA, len(deserializedATN.DecisionToState)) + +func init() { + for index, ds := range deserializedATN.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(ds, index) + } +} + +type TypeScriptParser struct { + TypeScriptBaseParser +} + +func NewTypeScriptParser(input antlr.TokenStream) *TypeScriptParser { + this := new(TypeScriptParser) + + this.BaseParser = antlr.NewBaseParser(input) + + this.Interpreter = antlr.NewParserATNSimulator(this, deserializedATN, decisionToDFA, antlr.NewPredictionContextCache()) + this.RuleNames = ruleNames + this.LiteralNames = literalNames + this.SymbolicNames = symbolicNames + this.GrammarFileName = "TypeScriptParser.g4" + + return this +} + +// TypeScriptParser tokens. +const ( + TypeScriptParserEOF = antlr.TokenEOF + TypeScriptParserHashBangLine = 1 + TypeScriptParserMultiLineComment = 2 + TypeScriptParserSingleLineComment = 3 + TypeScriptParserRegularExpressionLiteral = 4 + TypeScriptParserOpenBracket = 5 + TypeScriptParserCloseBracket = 6 + TypeScriptParserOpenParen = 7 + TypeScriptParserCloseParen = 8 + TypeScriptParserOpenBrace = 9 + TypeScriptParserCloseBrace = 10 + TypeScriptParserSemiColon = 11 + TypeScriptParserComma = 12 + TypeScriptParserAssign = 13 + TypeScriptParserQuestionMark = 14 + TypeScriptParserColon = 15 + TypeScriptParserEllipsis = 16 + TypeScriptParserDot = 17 + TypeScriptParserPlusPlus = 18 + TypeScriptParserMinusMinus = 19 + TypeScriptParserPlus = 20 + TypeScriptParserMinus = 21 + TypeScriptParserBitNot = 22 + TypeScriptParserNot = 23 + TypeScriptParserMultiply = 24 + TypeScriptParserLodash = 25 + TypeScriptParserDollar = 26 + TypeScriptParserDivide = 27 + TypeScriptParserModulus = 28 + TypeScriptParserPower = 29 + TypeScriptParserNullCoalesce = 30 + TypeScriptParserHashtag = 31 + TypeScriptParserRightShiftArithmetic = 32 + TypeScriptParserLeftShiftArithmetic = 33 + TypeScriptParserRightShiftLogical = 34 + TypeScriptParserLessThan = 35 + TypeScriptParserMoreThan = 36 + TypeScriptParserLessThanEquals = 37 + TypeScriptParserGreaterThanEquals = 38 + TypeScriptParserEquals_ = 39 + TypeScriptParserNotEquals = 40 + TypeScriptParserIdentityEquals = 41 + TypeScriptParserIdentityNotEquals = 42 + TypeScriptParserBitAnd = 43 + TypeScriptParserBitXOr = 44 + TypeScriptParserBitOr = 45 + TypeScriptParserAnd = 46 + TypeScriptParserOr = 47 + TypeScriptParserMultiplyAssign = 48 + TypeScriptParserDivideAssign = 49 + TypeScriptParserModulusAssign = 50 + TypeScriptParserPlusAssign = 51 + TypeScriptParserMinusAssign = 52 + TypeScriptParserLeftShiftArithmeticAssign = 53 + TypeScriptParserRightShiftArithmeticAssign = 54 + TypeScriptParserRightShiftLogicalAssign = 55 + TypeScriptParserBitAndAssign = 56 + TypeScriptParserBitXorAssign = 57 + TypeScriptParserBitOrAssign = 58 + TypeScriptParserARROW = 59 + TypeScriptParserPowerAssign = 60 + TypeScriptParserNullLiteral = 61 + TypeScriptParserBooleanLiteral = 62 + TypeScriptParserDecimalLiteral = 63 + TypeScriptParserHexIntegerLiteral = 64 + TypeScriptParserOctalIntegerLiteral = 65 + TypeScriptParserOctalIntegerLiteral2 = 66 + TypeScriptParserBinaryIntegerLiteral = 67 + TypeScriptParserBreak = 68 + TypeScriptParserDo = 69 + TypeScriptParserInstanceof = 70 + TypeScriptParserTypeof = 71 + TypeScriptParserCase = 72 + TypeScriptParserElse = 73 + TypeScriptParserNew = 74 + TypeScriptParserVar = 75 + TypeScriptParserCatch = 76 + TypeScriptParserFinally = 77 + TypeScriptParserReturn = 78 + TypeScriptParserVoid = 79 + TypeScriptParserContinue = 80 + TypeScriptParserFor = 81 + TypeScriptParserSwitch = 82 + TypeScriptParserWhile = 83 + TypeScriptParserDebugger = 84 + TypeScriptParserFunction = 85 + TypeScriptParserThis = 86 + TypeScriptParserWith = 87 + TypeScriptParserDefault = 88 + TypeScriptParserIf = 89 + TypeScriptParserThrow = 90 + TypeScriptParserDelete = 91 + TypeScriptParserIn = 92 + TypeScriptParserTry = 93 + TypeScriptParserAs = 94 + TypeScriptParserFrom = 95 + TypeScriptParserReadOnly = 96 + TypeScriptParserAsync = 97 + TypeScriptParserClass = 98 + TypeScriptParserEnum = 99 + TypeScriptParserExtends = 100 + TypeScriptParserSuper = 101 + TypeScriptParserConst = 102 + TypeScriptParserExport = 103 + TypeScriptParserImport = 104 + TypeScriptParserAwait = 105 + TypeScriptParserImplements = 106 + TypeScriptParserLet = 107 + TypeScriptParserPrivate = 108 + TypeScriptParserPublic = 109 + TypeScriptParserInterface = 110 + TypeScriptParserPackage = 111 + TypeScriptParserProtected = 112 + TypeScriptParserStatic = 113 + TypeScriptParserYield = 114 + TypeScriptParserANY = 115 + TypeScriptParserNUMBER = 116 + TypeScriptParserBOOLEAN = 117 + TypeScriptParserSTRING = 118 + TypeScriptParserSYMBOL = 119 + TypeScriptParserType = 120 + TypeScriptParserGet = 121 + TypeScriptParserSet = 122 + TypeScriptParserConstructor = 123 + TypeScriptParserNamespace = 124 + TypeScriptParserRequire = 125 + TypeScriptParserModule = 126 + TypeScriptParserDeclare = 127 + TypeScriptParserAbstract = 128 + TypeScriptParserIs = 129 + TypeScriptParserAt = 130 + TypeScriptParserIdentifier = 131 + TypeScriptParserStringLiteral = 132 + TypeScriptParserTemplateStringLiteral = 133 + TypeScriptParserWhiteSpaces = 134 + TypeScriptParserLineTerminator = 135 + TypeScriptParserHtmlComment = 136 + TypeScriptParserCDataComment = 137 + TypeScriptParserUnexpectedCharacter = 138 +) + +// TypeScriptParser rules. +const ( + TypeScriptParserRULE_initializer = 0 + TypeScriptParserRULE_bindingPattern = 1 + TypeScriptParserRULE_typeParameters = 2 + TypeScriptParserRULE_typeParameterList = 3 + TypeScriptParserRULE_typeParameter = 4 + TypeScriptParserRULE_constraint = 5 + TypeScriptParserRULE_typeArguments = 6 + TypeScriptParserRULE_typeArgumentList = 7 + TypeScriptParserRULE_typeArgument = 8 + TypeScriptParserRULE_type_ = 9 + TypeScriptParserRULE_unionOrIntersectionOrPrimaryType = 10 + TypeScriptParserRULE_primaryType = 11 + TypeScriptParserRULE_predefinedType = 12 + TypeScriptParserRULE_typeReference = 13 + TypeScriptParserRULE_typeGeneric = 14 + TypeScriptParserRULE_typeIncludeGeneric = 15 + TypeScriptParserRULE_typeName = 16 + TypeScriptParserRULE_objectType = 17 + TypeScriptParserRULE_typeBody = 18 + TypeScriptParserRULE_typeMemberList = 19 + TypeScriptParserRULE_typeMember = 20 + TypeScriptParserRULE_arrayType = 21 + TypeScriptParserRULE_tupleType = 22 + TypeScriptParserRULE_tupleElementTypes = 23 + TypeScriptParserRULE_functionType = 24 + TypeScriptParserRULE_constructorType = 25 + TypeScriptParserRULE_typeQuery = 26 + TypeScriptParserRULE_typeQueryExpression = 27 + TypeScriptParserRULE_propertySignature = 28 + TypeScriptParserRULE_typeAnnotation = 29 + TypeScriptParserRULE_callSignature = 30 + TypeScriptParserRULE_parameterList = 31 + TypeScriptParserRULE_requiredParameterList = 32 + TypeScriptParserRULE_requiredParameter = 33 + TypeScriptParserRULE_accessibilityModifier = 34 + TypeScriptParserRULE_identifierOrPattern = 35 + TypeScriptParserRULE_optionalParameterList = 36 + TypeScriptParserRULE_optionalParameter = 37 + TypeScriptParserRULE_restParameter = 38 + TypeScriptParserRULE_constructSignature = 39 + TypeScriptParserRULE_indexSignature = 40 + TypeScriptParserRULE_methodSignature = 41 + TypeScriptParserRULE_typeAliasDeclaration = 42 + TypeScriptParserRULE_constructorDeclaration = 43 + TypeScriptParserRULE_interfaceDeclaration = 44 + TypeScriptParserRULE_interfaceExtendsClause = 45 + TypeScriptParserRULE_classOrInterfaceTypeList = 46 + TypeScriptParserRULE_enumDeclaration = 47 + TypeScriptParserRULE_enumBody = 48 + TypeScriptParserRULE_enumMemberList = 49 + TypeScriptParserRULE_enumMember = 50 + TypeScriptParserRULE_namespaceDeclaration = 51 + TypeScriptParserRULE_namespaceName = 52 + TypeScriptParserRULE_importAliasDeclaration = 53 + TypeScriptParserRULE_importAll = 54 + TypeScriptParserRULE_decoratorList = 55 + TypeScriptParserRULE_decorator = 56 + TypeScriptParserRULE_decoratorMemberExpression = 57 + TypeScriptParserRULE_decoratorCallExpression = 58 + TypeScriptParserRULE_program = 59 + TypeScriptParserRULE_sourceElement = 60 + TypeScriptParserRULE_statement = 61 + TypeScriptParserRULE_block = 62 + TypeScriptParserRULE_statementList = 63 + TypeScriptParserRULE_abstractDeclaration = 64 + TypeScriptParserRULE_importStatement = 65 + TypeScriptParserRULE_importFromBlock = 66 + TypeScriptParserRULE_multipleImportStatement = 67 + TypeScriptParserRULE_exportStatement = 68 + TypeScriptParserRULE_variableStatement = 69 + TypeScriptParserRULE_variableDeclarationList = 70 + TypeScriptParserRULE_variableDeclaration = 71 + TypeScriptParserRULE_emptyStatement_ = 72 + TypeScriptParserRULE_expressionStatement = 73 + TypeScriptParserRULE_ifStatement = 74 + TypeScriptParserRULE_iterationStatement = 75 + TypeScriptParserRULE_varModifier = 76 + TypeScriptParserRULE_continueStatement = 77 + TypeScriptParserRULE_breakStatement = 78 + TypeScriptParserRULE_returnStatement = 79 + TypeScriptParserRULE_yieldStatement = 80 + TypeScriptParserRULE_withStatement = 81 + TypeScriptParserRULE_switchStatement = 82 + TypeScriptParserRULE_caseBlock = 83 + TypeScriptParserRULE_caseClauses = 84 + TypeScriptParserRULE_caseClause = 85 + TypeScriptParserRULE_defaultClause = 86 + TypeScriptParserRULE_labelledStatement = 87 + TypeScriptParserRULE_throwStatement = 88 + TypeScriptParserRULE_tryStatement = 89 + TypeScriptParserRULE_catchProduction = 90 + TypeScriptParserRULE_assignable = 91 + TypeScriptParserRULE_finallyProduction = 92 + TypeScriptParserRULE_debuggerStatement = 93 + TypeScriptParserRULE_functionDeclaration = 94 + TypeScriptParserRULE_classDeclaration = 95 + TypeScriptParserRULE_classHeritage = 96 + TypeScriptParserRULE_classTail = 97 + TypeScriptParserRULE_classExtendsClause = 98 + TypeScriptParserRULE_implementsClause = 99 + TypeScriptParserRULE_classElement = 100 + TypeScriptParserRULE_propertyMemberDeclaration = 101 + TypeScriptParserRULE_propertyMemberBase = 102 + TypeScriptParserRULE_indexMemberDeclaration = 103 + TypeScriptParserRULE_generatorMethod = 104 + TypeScriptParserRULE_generatorFunctionDeclaration = 105 + TypeScriptParserRULE_generatorBlock = 106 + TypeScriptParserRULE_generatorDefinition = 107 + TypeScriptParserRULE_iteratorBlock = 108 + TypeScriptParserRULE_iteratorDefinition = 109 + TypeScriptParserRULE_formalParameterList = 110 + TypeScriptParserRULE_formalParameterArg = 111 + TypeScriptParserRULE_lastFormalParameterArg = 112 + TypeScriptParserRULE_functionBody = 113 + TypeScriptParserRULE_sourceElements = 114 + TypeScriptParserRULE_arrayLiteral = 115 + TypeScriptParserRULE_elementList = 116 + TypeScriptParserRULE_lastElement = 117 + TypeScriptParserRULE_objectLiteral = 118 + TypeScriptParserRULE_propertyAssignment = 119 + TypeScriptParserRULE_getAccessor = 120 + TypeScriptParserRULE_setAccessor = 121 + TypeScriptParserRULE_propertyName = 122 + TypeScriptParserRULE_arguments = 123 + TypeScriptParserRULE_lastArgument = 124 + TypeScriptParserRULE_expressionSequence = 125 + TypeScriptParserRULE_functionExpressionDeclaration = 126 + TypeScriptParserRULE_singleExpression = 127 + TypeScriptParserRULE_arrowFunctionDeclaration = 128 + TypeScriptParserRULE_arrowFunctionParameters = 129 + TypeScriptParserRULE_arrowFunctionBody = 130 + TypeScriptParserRULE_assignmentOperator = 131 + TypeScriptParserRULE_literal = 132 + TypeScriptParserRULE_numericLiteral = 133 + TypeScriptParserRULE_identifierName = 134 + TypeScriptParserRULE_reservedWord = 135 + TypeScriptParserRULE_keyword = 136 + TypeScriptParserRULE_getter = 137 + TypeScriptParserRULE_setter = 138 + TypeScriptParserRULE_eos = 139 +) + +// IInitializerContext is an interface to support dynamic dispatch. +type IInitializerContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsInitializerContext differentiates from other interfaces. + IsInitializerContext() +} + +type InitializerContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyInitializerContext() *InitializerContext { + var p = new(InitializerContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = TypeScriptParserRULE_initializer + return p +} + +func (*InitializerContext) IsInitializerContext() {} + +func NewInitializerContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InitializerContext { + var p = new(InitializerContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = TypeScriptParserRULE_initializer + + return p +} + +func (s *InitializerContext) GetParser() antlr.Parser { return s.parser } + +func (s *InitializerContext) Assign() antlr.TerminalNode { + return s.GetToken(TypeScriptParserAssign, 0) +} + +func (s *InitializerContext) SingleExpression() ISingleExpressionContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ISingleExpressionContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ISingleExpressionContext) +} + +func (s *InitializerContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *InitializerContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *InitializerContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.EnterInitializer(s) + } +} + +func (s *InitializerContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.ExitInitializer(s) + } +} + +func (p *TypeScriptParser) Initializer() (localctx IInitializerContext) { + localctx = NewInitializerContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 0, TypeScriptParserRULE_initializer) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(280) + p.Match(TypeScriptParserAssign) + } + { + p.SetState(281) + p.singleExpression(0) + } + + return localctx +} + +// IBindingPatternContext is an interface to support dynamic dispatch. +type IBindingPatternContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsBindingPatternContext differentiates from other interfaces. + IsBindingPatternContext() +} + +type BindingPatternContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyBindingPatternContext() *BindingPatternContext { + var p = new(BindingPatternContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = TypeScriptParserRULE_bindingPattern + return p +} + +func (*BindingPatternContext) IsBindingPatternContext() {} + +func NewBindingPatternContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BindingPatternContext { + var p = new(BindingPatternContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = TypeScriptParserRULE_bindingPattern + + return p +} + +func (s *BindingPatternContext) GetParser() antlr.Parser { return s.parser } + +func (s *BindingPatternContext) ArrayLiteral() IArrayLiteralContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayLiteralContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IArrayLiteralContext) +} + +func (s *BindingPatternContext) ObjectLiteral() IObjectLiteralContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IObjectLiteralContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IObjectLiteralContext) +} + +func (s *BindingPatternContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BindingPatternContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *BindingPatternContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.EnterBindingPattern(s) + } +} + +func (s *BindingPatternContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.ExitBindingPattern(s) + } +} + +func (p *TypeScriptParser) BindingPattern() (localctx IBindingPatternContext) { + localctx = NewBindingPatternContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 2, TypeScriptParserRULE_bindingPattern) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + p.SetState(285) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case TypeScriptParserOpenBracket: + { + p.SetState(283) + p.ArrayLiteral() + } + + case TypeScriptParserOpenBrace: + { + p.SetState(284) + p.ObjectLiteral() + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + return localctx +} + +// ITypeParametersContext is an interface to support dynamic dispatch. +type ITypeParametersContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsTypeParametersContext differentiates from other interfaces. + IsTypeParametersContext() +} + +type TypeParametersContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTypeParametersContext() *TypeParametersContext { + var p = new(TypeParametersContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = TypeScriptParserRULE_typeParameters + return p +} + +func (*TypeParametersContext) IsTypeParametersContext() {} + +func NewTypeParametersContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeParametersContext { + var p = new(TypeParametersContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = TypeScriptParserRULE_typeParameters + + return p +} + +func (s *TypeParametersContext) GetParser() antlr.Parser { return s.parser } + +func (s *TypeParametersContext) LessThan() antlr.TerminalNode { + return s.GetToken(TypeScriptParserLessThan, 0) +} + +func (s *TypeParametersContext) MoreThan() antlr.TerminalNode { + return s.GetToken(TypeScriptParserMoreThan, 0) +} + +func (s *TypeParametersContext) TypeParameterList() ITypeParameterListContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeParameterListContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITypeParameterListContext) +} + +func (s *TypeParametersContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeParametersContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TypeParametersContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.EnterTypeParameters(s) + } +} + +func (s *TypeParametersContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.ExitTypeParameters(s) + } +} + +func (p *TypeScriptParser) TypeParameters() (localctx ITypeParametersContext) { + localctx = NewTypeParametersContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 4, TypeScriptParserRULE_typeParameters) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(287) + p.Match(TypeScriptParserLessThan) + } + p.SetState(289) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if _la == TypeScriptParserLessThan || _la == TypeScriptParserIdentifier { + { + p.SetState(288) + p.TypeParameterList() + } + + } + { + p.SetState(291) + p.Match(TypeScriptParserMoreThan) + } + + return localctx +} + +// ITypeParameterListContext is an interface to support dynamic dispatch. +type ITypeParameterListContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsTypeParameterListContext differentiates from other interfaces. + IsTypeParameterListContext() +} + +type TypeParameterListContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTypeParameterListContext() *TypeParameterListContext { + var p = new(TypeParameterListContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = TypeScriptParserRULE_typeParameterList + return p +} + +func (*TypeParameterListContext) IsTypeParameterListContext() {} + +func NewTypeParameterListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeParameterListContext { + var p = new(TypeParameterListContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = TypeScriptParserRULE_typeParameterList + + return p +} + +func (s *TypeParameterListContext) GetParser() antlr.Parser { return s.parser } + +func (s *TypeParameterListContext) AllTypeParameter() []ITypeParameterContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ITypeParameterContext)(nil)).Elem()) + var tst = make([]ITypeParameterContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(ITypeParameterContext) + } + } + + return tst +} + +func (s *TypeParameterListContext) TypeParameter(i int) ITypeParameterContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeParameterContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(ITypeParameterContext) +} + +func (s *TypeParameterListContext) AllComma() []antlr.TerminalNode { + return s.GetTokens(TypeScriptParserComma) +} + +func (s *TypeParameterListContext) Comma(i int) antlr.TerminalNode { + return s.GetToken(TypeScriptParserComma, i) +} + +func (s *TypeParameterListContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeParameterListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TypeParameterListContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.EnterTypeParameterList(s) + } +} + +func (s *TypeParameterListContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.ExitTypeParameterList(s) + } +} + +func (p *TypeScriptParser) TypeParameterList() (localctx ITypeParameterListContext) { + localctx = NewTypeParameterListContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 6, TypeScriptParserRULE_typeParameterList) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(293) + p.TypeParameter() + } + p.SetState(298) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + for _la == TypeScriptParserComma { + { + p.SetState(294) + p.Match(TypeScriptParserComma) + } + { + p.SetState(295) + p.TypeParameter() + } + + p.SetState(300) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + } + + return localctx +} + +// ITypeParameterContext is an interface to support dynamic dispatch. +type ITypeParameterContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsTypeParameterContext differentiates from other interfaces. + IsTypeParameterContext() +} + +type TypeParameterContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTypeParameterContext() *TypeParameterContext { + var p = new(TypeParameterContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = TypeScriptParserRULE_typeParameter + return p +} + +func (*TypeParameterContext) IsTypeParameterContext() {} + +func NewTypeParameterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeParameterContext { + var p = new(TypeParameterContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = TypeScriptParserRULE_typeParameter + + return p +} + +func (s *TypeParameterContext) GetParser() antlr.Parser { return s.parser } + +func (s *TypeParameterContext) Identifier() antlr.TerminalNode { + return s.GetToken(TypeScriptParserIdentifier, 0) +} + +func (s *TypeParameterContext) Constraint() IConstraintContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IConstraintContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IConstraintContext) +} + +func (s *TypeParameterContext) TypeParameters() ITypeParametersContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeParametersContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITypeParametersContext) +} + +func (s *TypeParameterContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeParameterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TypeParameterContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.EnterTypeParameter(s) + } +} + +func (s *TypeParameterContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.ExitTypeParameter(s) + } +} + +func (p *TypeScriptParser) TypeParameter() (localctx ITypeParameterContext) { + localctx = NewTypeParameterContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 8, TypeScriptParserRULE_typeParameter) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.SetState(306) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case TypeScriptParserIdentifier: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(301) + p.Match(TypeScriptParserIdentifier) + } + p.SetState(303) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if _la == TypeScriptParserExtends { + { + p.SetState(302) + p.Constraint() + } + + } + + case TypeScriptParserLessThan: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(305) + p.TypeParameters() + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + + return localctx +} + +// IConstraintContext is an interface to support dynamic dispatch. +type IConstraintContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsConstraintContext differentiates from other interfaces. + IsConstraintContext() +} + +type ConstraintContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyConstraintContext() *ConstraintContext { + var p = new(ConstraintContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = TypeScriptParserRULE_constraint + return p +} + +func (*ConstraintContext) IsConstraintContext() {} + +func NewConstraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConstraintContext { + var p = new(ConstraintContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = TypeScriptParserRULE_constraint + + return p +} + +func (s *ConstraintContext) GetParser() antlr.Parser { return s.parser } + +func (s *ConstraintContext) Extends() antlr.TerminalNode { + return s.GetToken(TypeScriptParserExtends, 0) +} + +func (s *ConstraintContext) Type_() IType_Context { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IType_Context)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IType_Context) +} + +func (s *ConstraintContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ConstraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ConstraintContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.EnterConstraint(s) + } +} + +func (s *ConstraintContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.ExitConstraint(s) + } +} + +func (p *TypeScriptParser) Constraint() (localctx IConstraintContext) { + localctx = NewConstraintContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 10, TypeScriptParserRULE_constraint) + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(308) + p.Match(TypeScriptParserExtends) + } + { + p.SetState(309) + p.Type_() + } + + return localctx +} + +// ITypeArgumentsContext is an interface to support dynamic dispatch. +type ITypeArgumentsContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsTypeArgumentsContext differentiates from other interfaces. + IsTypeArgumentsContext() +} + +type TypeArgumentsContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTypeArgumentsContext() *TypeArgumentsContext { + var p = new(TypeArgumentsContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = TypeScriptParserRULE_typeArguments + return p +} + +func (*TypeArgumentsContext) IsTypeArgumentsContext() {} + +func NewTypeArgumentsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeArgumentsContext { + var p = new(TypeArgumentsContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = TypeScriptParserRULE_typeArguments + + return p +} + +func (s *TypeArgumentsContext) GetParser() antlr.Parser { return s.parser } + +func (s *TypeArgumentsContext) LessThan() antlr.TerminalNode { + return s.GetToken(TypeScriptParserLessThan, 0) +} + +func (s *TypeArgumentsContext) MoreThan() antlr.TerminalNode { + return s.GetToken(TypeScriptParserMoreThan, 0) +} + +func (s *TypeArgumentsContext) TypeArgumentList() ITypeArgumentListContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeArgumentListContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(ITypeArgumentListContext) +} + +func (s *TypeArgumentsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeArgumentsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TypeArgumentsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.EnterTypeArguments(s) + } +} + +func (s *TypeArgumentsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TypeScriptParserListener); ok { + listenerT.ExitTypeArguments(s) + } +} + +func (p *TypeScriptParser) TypeArguments() (localctx ITypeArgumentsContext) { + localctx = NewTypeArgumentsContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 12, TypeScriptParserRULE_typeArguments) + var _la int + + defer func() { + p.ExitRule() + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(311) + p.Match(TypeScriptParserLessThan) + } + p.SetState(313) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if (((_la-5)&-(0x1f+1)) == 0 && ((1< expr op=POWER expr +# | op=(ADD | MINUS | NOT_OP) expr +# | expr op=(STAR | DIV | MOD | IDIV | AT) expr +# | expr op=(ADD | MINUS) expr +# | expr op=(LEFT_SHIFT | RIGHT_SHIFT) expr +# | expr op=AND_OP expr +# | expr op=XOR expr +# | expr op=OR_OP expr +# ; + +# atom +"123" + +# AWAIT atom +await 5 + +# atom trailer +"1231".lower() + +# atom trailer trailer +"1231".lower().upper() + +# AWAIT atom trailer trailer +await "1231".lower().upper() + +# expr op=POWER expr op=POWER expr +2 ** 2 ** 3 + +# ADD expr ++6 + +# MINUS expr +-6 + +# NOT_OP expr +~6 + +# expr STAR expr +6 * 7 + +# expr DIV expr +6 / 7 + +# expr MOD expr +6 % 8 + +# expr IDIV expr +6 // 7 + +# expr AT expr +6 @ 2 + +# expr ADD expr +6 + 1 + +# expr MINUS expr +7 - 9 + +# expr LEFT_SHIFT expr +8 << 9 + +# expr RIGHT_SHIFT expr +4 >> 1 + +# expr op=AND_OP expr +4 & 6 + +# expr op=XOR expr +4 ^ 7 + +# expr op=OR_OP expr +7 | 1 diff --git a/pkg/application/analysis/pyapp/testdata/grammar/expr_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/expr_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..a5cb296b978117d24ed705fbe4e499a86cffef30 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/expr_stmt.py @@ -0,0 +1,49 @@ +# expr_stmt: testlist_star_expr assign_part? +# +# testlist_star_expr : (test | star_expr) (COMMA (test | star_expr))* COMMA? +# +# assign_part +# : (ASSIGN testlist_star_expr)* (ASSIGN yield_expr)? +# | COLON test (ASSIGN testlist)? +# | op=( ADD_ASSIGN +# | SUB_ASSIGN +# | MULT_ASSIGN +# | AT_ASSIGN +# | DIV_ASSIGN +# | MOD_ASSIGN +# | AND_ASSIGN +# | OR_ASSIGN +# | XOR_ASSIGN +# | LEFT_SHIFT_ASSIGN +# | RIGHT_SHIFT_ASSIGN +# | POWER_ASSIGN +# | IDIV_ASSIGN +# ) +# (yield_expr | testlist) +# ; + +# Yield tests (should not be used outside the function) +def f(): + # test ASSIGN yield_expr + x = yield + + # test COMMA test COMMA ASSIGN test COMMA star_expr ASSIGN yield_expr + x, [*t], = y, *z = yield + + # test '+=' yield_expr + x += yield + +# test ASSIGN testlist_star_expr +z = 1, *y + +# test ASSIGN test COMMA test ASSIGN test COMMA star_expr COMMA +x = y, a = z, *q, + +# test COLON test +x: int + +# COLON test ASSIGN testlist +x: int = 8 + +# test '-=' testlist +x -= 9 diff --git a/pkg/application/analysis/pyapp/testdata/grammar/for_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/for_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..df1084e70c1668f6d2e9650886dfb11d58d3584b --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/for_stmt.py @@ -0,0 +1,17 @@ +# for_stmt: ASYNC? FOR exprlist IN testlist COLON suite else_clause? + +# FOR exprlist IN testlist COLON suite +for x in range(1): + pass + +# FOR exprlist IN testlist COLON suite (else_clause)? +for x in range(1): + x +else: + pass + +# async_stmt must be inside async function +async def f(): + # ASYNC for_stmt + async for _ in range(5): + pass diff --git a/pkg/application/analysis/pyapp/testdata/grammar/funcdef.py b/pkg/application/analysis/pyapp/testdata/grammar/funcdef.py new file mode 100755 index 0000000000000000000000000000000000000000..591140544ea5590480cf9ea2d9e5c52c0511da1b --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/funcdef.py @@ -0,0 +1,10 @@ +# funcdef: ASYNC? DEF name OPEN_PAREN typedargslist? CLOSE_PAREN (ARROW test)? COLON suite + +# DEF NAME OPEN_PAREN CLOSE_PAREN COLON suite +def foo(): pass + +# ASYNC DEF NAME OPEN_PAREN typedargslist? CLOSE_PAREN COLON suite +async def bar(one): pass + +# DEF NAME OPEN_PAREN typedargslist? CLOSE_PAREN ARROW test COLON suite +def baz(one, two) -> int: pass diff --git a/pkg/application/analysis/pyapp/testdata/grammar/if_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/if_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..d915190f9eecadf96f8f36379510aeee5de35f29 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/if_stmt.py @@ -0,0 +1,24 @@ +# if_stmt: IF cond=test COLON suite elif_clause* else_clause? + +# IF test COLON suite +if x == 5: pass + +# IF test COLON suite elif_clause +if x == 4: + pass +elif x == 3: + pass + +# IF test COLON suite else_clause +if x == 7: + pass +else: + pass + +# IF test COLON suite elif_clause elif_clause else_clause +if x == 4: + pass +elif x == 3: + pass +else: + pass diff --git a/pkg/application/analysis/pyapp/testdata/grammar/import_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/import_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..e9b00c3c1b8c285e41e3efe2d3108fbf74f4fc08 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/import_stmt.py @@ -0,0 +1,41 @@ + +# First, check this one +# import_stmt: IMPORT dotted_as_names +# dotted_as_names: dotted_as_name (COMMA dotted_as_name)*; +# dotted_as_name: dotted_name (AS NAME)?; + +# IMPORT dotted_name +import collections.abc + +# IMPORT dotted_name AS NAME +import collections.abc as ss + +# IMPORT dotted_name AS NAME COMMA dotted_name +import collections.abc as ss, itertools + +# Then check this +# import_from: FROM ((DOT | ELLIPSIS)* dotted_name | (DOT | ELLIPSIS)+) +# IMPORT (STAR | OPEN_PAREN import_as_names CLOSE_PAREN | import_as_names); +# import_as_names: import_as_name (COMMA import_as_name)*; +# import_as_name: NAME (AS NAME)?; + +# FROM dotted_name IMPORT import_as_name +from classdef import bar as b + +# FROM DOT IMPORT import_as_name +from . import bar + +# FROM DOT DOT DOT IMPORT import_as_name +from . . . import bar + +# FROM DOT dotted_name IMPORT import_as_name +from .classdef import bar + +# FROM dotted_name IMPORT STAR +from sys import * + +# FROM dotted_name IMPORT import_as_name COMMA import_as_name +from collections import bar, baz + +# FROM dotted_name IMPORT OPEN_PAREN import_as_name CLOSE_PAREN +from collections import (bar) diff --git a/pkg/application/analysis/pyapp/testdata/grammar/logical_test.py b/pkg/application/analysis/pyapp/testdata/grammar/logical_test.py new file mode 100755 index 0000000000000000000000000000000000000000..3e50e9e7e88c0f2330593401fc7e4e876052de64 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/logical_test.py @@ -0,0 +1,50 @@ +# logical_test +# : comparison +# | NOT logical_test +# | logical_test op=AND logical_test +# | logical_test op=OR logical_test +# ; +# +# comparison +# : comparison (LESS_THAN | GREATER_THAN | EQUALS | GT_EQ | LT_EQ | NOT_EQ_1 | NOT_EQ_2 | optional=NOT? IN | IS optional=NOT?) comparison +# | expr +# ; + +# expr EQUALS expr +a == b + +# not expr +not a + +# expr AND expr +a and b + +# expr OR expr +a or b + +# expr LESS_THAN expr +a < b + +# expr GREATER_THAN expr +a > b + +# expr GT_EQ expr +a >= b + +# expr LT_EQ expr +a <= b + +# expr NOT_EQ_2 expr +a != b + +# expr IN expr +a in b + +# expr NOT IN expr +a not in b + +# expr IS expr +a is b + +# expr IS NOT expr +a is not b diff --git a/pkg/application/analysis/pyapp/testdata/grammar/simple_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/simple_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..b1c808260fd9ca5af8accab11a877a20ec20c3dd --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/simple_stmt.py @@ -0,0 +1,13 @@ +# simple_stmt: small_stmt (SEMI_COLON small_stmt)* SEMI_COLON? (NEWLINE | EOF) + +# small_stmt NEWLINE +x = 5 + +# small_stmt SEMI_COLON small_stmt NEWLINE +x = 5 ; y = 7 + +# small_stmt SEMI_COLON NEWLINE +x = 5 ; + +# small_stmt SEMI_COLON small_stmt SEMI_COLON small_stmt SEMI_COLON small_stmt SEMI_COLON EOF +x = 5 ; y = 7 ; z = 9 ; \ No newline at end of file diff --git a/pkg/application/analysis/pyapp/testdata/grammar/small_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/small_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..81d375cfd77070d29631c7bec3d78c7568b60485 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/small_stmt.py @@ -0,0 +1,58 @@ +# del_stmt: DEL exprlist + +del x, d[1], await f + +# pass_stmt: PASS +for i in u: pass + +# break_stmt: BREAK +for i in u: break + +# continue_stmt: CONTINUE +for i in u: continue + +# return_stmt: RETURN testlist? +def f(): + # RETURN + return +def g(): + # RETURN testlist + return 1, 3 + +# [Python 3] raise_stmt: RAISE (test (FROM test)?)? + +# RAISE test FROM test +raise a from b + +# RAISE test +raise a + +try: + a +except: + # RAISE + raise + +# global_stmt: GLOBAL name (COMMA name)* + +# GLOBAL name +global a + +# GLOBAL name COMMA name +global a, b + +# assert_stmt: ASSERT test (COMMA test)? + +# ASSERT test +assert a + +# ASSERT test COMMA test +assert a, b + +# nonlocal_stmt: NONLOCAL name (COMMA name)* + +# NONLOCAL name +nonlocal a + +# NONLOCAL name (COMMA name) +nonlocal a, v diff --git a/pkg/application/analysis/pyapp/testdata/grammar/subscript.py b/pkg/application/analysis/pyapp/testdata/grammar/subscript.py new file mode 100755 index 0000000000000000000000000000000000000000..dec7b60045dc207980293745271130f705098d32 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/subscript.py @@ -0,0 +1,42 @@ +# subscript +# : ELLIPSIS +# | test +# | test? COLON test? sliceop? +# ; +# +# sliceop +# : COLON test? +# ; + +# ELLIPSIS +b[...] + +# test +b[a] + +# COLON +b[:] + +# test COLON +b[a:] + +# COLON test +b[:a] + +# test COLON test +b[a:a] + +# COLON COLON +b[::] + +# COLON COLON test +b[::-1] + +# test COLON COLON test +b[a::2] + +# COLON test COLON test +b[:a:2] + +# test COLON test COLON test +b[1:a:2] diff --git a/pkg/application/analysis/pyapp/testdata/grammar/test.py b/pkg/application/analysis/pyapp/testdata/grammar/test.py new file mode 100755 index 0000000000000000000000000000000000000000..78c08bd2ed62f0ce714fab78d8681438d36dc9fc --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/test.py @@ -0,0 +1,16 @@ +# test +# : logical_test (IF logical_test ELSE test)? +# | LAMBDA varargslist? COLON test +# ; + +# logical_test +x == y + +# logical_test IF logical_test ELSE test +x == y if z == b else a == u + +# LAMBDA COLON test +lambda: a + +# LAMBDA varargslist COLON test +lambda x, y: a diff --git a/pkg/application/analysis/pyapp/testdata/grammar/testlist_comp.py b/pkg/application/analysis/pyapp/testdata/grammar/testlist_comp.py new file mode 100755 index 0000000000000000000000000000000000000000..46acc2ac9025b88c7170d755b3e3a6087394950b --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/testlist_comp.py @@ -0,0 +1,15 @@ +# testlist_comp +# : (test | star_expr) (comp_for | (COMMA (test | star_expr))* COMMA?) +# ; + +# test +[x] + +# star_expr comp_for +[z for z in a] + +# test COMMA star_expr COMMA +[x, *a,] + +# star_expr COMMA test COMMA star_expr +[*u, a, *i] diff --git a/pkg/application/analysis/pyapp/testdata/grammar/tokens.py b/pkg/application/analysis/pyapp/testdata/grammar/tokens.py new file mode 100755 index 0000000000000000000000000000000000000000..51ca18391aebed28e427cb56eb77548fcd43cc28 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/tokens.py @@ -0,0 +1,29 @@ +DECIMAL = 0000000000 +DECIMAL = 1234567890 +OCT_1 = 0o01234567 +OCT_2 = 0O01234567 +HEX_1 = 0x0123456789abcdef +HEX_2 = 0X0123456789ABCDEF +BIN_1 = 0b01 +BIN_1 = 0B01 +IMAG_1 = 0123456789.0123456789j +IMAG_2 = 0123456789J +FLOAT_1 = 0123456789.e1234567890 +FLOAT_2 = .0123456789E1234567890 + +LINE_JOIN_EXPR = 2 + \ + 2 + +SHORT_STRING_1 = 'a \'\\ b' +SHORT_STRING_2 = "a \"\\ b" +LONG_STRING_1 = b""" asdf " qwer +zxcv +""" +LONG_STRING_1 = r''' aasdf ' qwer +zxcv +''' +STRING_WITH_LINE_JOIND = "a \ +b" + +# COMMENT + diff --git a/pkg/application/analysis/pyapp/testdata/grammar/trailer.py b/pkg/application/analysis/pyapp/testdata/grammar/trailer.py new file mode 100755 index 0000000000000000000000000000000000000000..1bc19351550ba356aa1bb9af32e2d97ff2a0e9a5 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/trailer.py @@ -0,0 +1,29 @@ +# trailer +# : OPEN_PAREN (argument (COMMA argument)* COMMA?)? CLOSE_PAREN +# | OPEN_BRACKET subscript (COMMA subscript)* COMMA? CLOSE_BRACKET +# | DOT name +# ; + +# DOT name +a.b + +# OPEN_PAREN CLOSE_PAREN +x() + +# OPEN_PAREN argument CLOSE_PAREN +x(a) + +# OPEN_PAREN argument COMMA argument COMMA CLOSE_PAREN +x(a, b,) + +# OPEN_PAREN argument COMMA argument COMMA argument CLOSE_PAREN +x(a, b, c) + +# OPEN_BRACKET subscript CLOSE_BRACKET +x[a] + +# OPEN_BRACKET subscript COMMA subscript COMMA CLOSE_BRACKET +x[a, b,] + +# OPEN_BRACKET subscript COMMA subscript COMMA subscript CLOSE_BRACKET +x[a, b, c] \ No newline at end of file diff --git a/pkg/application/analysis/pyapp/testdata/grammar/try_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/try_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..8b926ab56c6ff469ef152b9557f1024bf84c4ac2 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/try_stmt.py @@ -0,0 +1,31 @@ +# try_stmt: TRY COLON suite (except_clause+ else_clause? finaly_clause? | finaly_clause) + +# TRY COLON suite except_clause +try: + pass +except: + pass + +# TRY COLON suite except_clause except_clause else_clause +try: + pass +except Exception as ex: + pass +except: + pass +else: + pass + +# TRY COLON suite except_clause finaly_clause +try: + pass +except Exception: + pass +finally: + pass + +# TRY COLON suite finaly_clause +try: + pass +finally: + pass diff --git a/pkg/application/analysis/pyapp/testdata/grammar/typedargslist.py b/pkg/application/analysis/pyapp/testdata/grammar/typedargslist.py new file mode 100755 index 0000000000000000000000000000000000000000..a093c243d03b3d3e66051e7eab8c260add43fe46 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/typedargslist.py @@ -0,0 +1,17 @@ +# typedargslist +# : (def_parameters COMMA)? (args (COMMA def_parameters)? (COMMA kwargs)? | kwargs) +# | def_parameters +# ; + +# def_parameters COMMA +def single(x, *, i): pass + +# def_parameters COMMA kwargs +def f1(x, y, **z): pass + +# def_parameters COMMA args COMMA def_parameters COMMA kwargs COMMA +def f1(x, y, *z: int, a, b, **c: int,): pass + +# def_parameters COMMA args +def f1(x, y, *z): pass + diff --git a/pkg/application/analysis/pyapp/testdata/grammar/varargslist.py b/pkg/application/analysis/pyapp/testdata/grammar/varargslist.py new file mode 100755 index 0000000000000000000000000000000000000000..5f2afae24d33f0734d13d029035b3343d6b6f3ed --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/varargslist.py @@ -0,0 +1,50 @@ +# varargslist +# : (vardef_parameters COMMA)? (varargs (COMMA vardef_parameters)? (COMMA varkwargs)? | varkwargs) COMMA? +# | vardef_parameters COMMA? +# ; +# +# vardef_parameters +# : vardef_parameter (COMMA vardef_parameter)* +# ; +# +# vardef_parameter +# : name (ASSIGN test)? +# ; +# +# varargs +# : STAR name +# ; +# +# varkwargs +# : POWER name +# ; + +# vardef_parameters COMMA +# NAME COMMA +lambda x,: 5 + +# vardef_parameters COMMA +# NAME COMMA STAR COMMA NAME COMMA +lambda x, *, y,: 5 + +# vardef_parameters +# NAME COMMA STAR COMMA NAME ASSIGN test +lambda x, *, y=7: 5 + +# varargs +lambda *y: 8 + +# varargs COMMA vardef_parameters COMMA +lambda *y, z: 8 + +# vardef_parameters COMMA varargs COMMA vardef_parameters COMMA +lambda a, b, *y, z: 8 + +# vardef_parameters COMMA varargs COMMA vardef_parameters COMMA varkwargs +lambda a, b, *y, z, **k: 8 + +# varkwargs +lambda **z: 8 + +# vardef_parameters COMMA varkwargs +lambda a, b, c, **k: 8 diff --git a/pkg/application/analysis/pyapp/testdata/grammar/while_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/while_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..35dc082b290ed7afd574fc018f3d7441c3a26fa2 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/while_stmt.py @@ -0,0 +1,11 @@ +# while_stmt: WHILE test COLON suite else_clause? + +# WHILE test COLON suite +while x == 3: + x += 1 + +# WHILE test COLON suite else_clause +while x == 3: + x += 1 +else: + pass diff --git a/pkg/application/analysis/pyapp/testdata/grammar/with_stmt.py b/pkg/application/analysis/pyapp/testdata/grammar/with_stmt.py new file mode 100755 index 0000000000000000000000000000000000000000..9d24ece7680cd8a6f1bf54ed6afa057a374e9bc3 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/with_stmt.py @@ -0,0 +1,15 @@ +# with_stmt: ASYNC? WITH with_item (COMMA with_item)* COLON suite + +# WITH with_item COLON suite +with open("with_stmt.py"): + pass + +# WITH with_item COMMA with_item COLON suite +with open("with_stmt.py") as a, open("with_stmt.py") as b: + pass + +# async_stmt must be inside async function +async def f(): + # ASYNC with_stmt + async with open("with_stmt.py") as f: + pass diff --git a/pkg/application/analysis/pyapp/testdata/grammar/yield_expr.py b/pkg/application/analysis/pyapp/testdata/grammar/yield_expr.py new file mode 100755 index 0000000000000000000000000000000000000000..8da2d24ec2b4907fa55f9250f4d0547a8ddbb127 --- /dev/null +++ b/pkg/application/analysis/pyapp/testdata/grammar/yield_expr.py @@ -0,0 +1,20 @@ +# yield_expr +# : YIELD yield_arg? +# ; +# +# yield_arg +# : FROM test +# | testlist +# ; + +def f(): + + # YIELD + yield + + # YIELD FROM test + yield from g + + # YIELD testlist + yield x, a, b if x else a + diff --git a/pkg/application/analysis/tsapp/ts_ident_app.go b/pkg/application/analysis/tsapp/ts_ident_app.go new file mode 100644 index 0000000000000000000000000000000000000000..c5cf86c48a994a8f38673c294879000705e6b8e6 --- /dev/null +++ b/pkg/application/analysis/tsapp/ts_ident_app.go @@ -0,0 +1,45 @@ +package tsapp + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + parser "github.com/phodal/coca/languages/ts" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_typescript" +) + +func processStream(is antlr.CharStream) *parser.TypeScriptParser { + lexer := parser.NewTypeScriptLexer(is) + stream := antlr.NewCommonTokenStream(lexer, 0) + return parser.NewTypeScriptParser(stream) +} + +func ProcessTsString(code string) *parser.TypeScriptParser { + is := antlr.NewInputStream(code) + return processStream(is) +} + +type TypeScriptIdentApp struct { + +} + +func (t *TypeScriptIdentApp) AnalysisPackageManager(path string) core_domain.CodePackageInfo { + return core_domain.CodePackageInfo{} +} + +func (t *TypeScriptIdentApp) Analysis(code string, fileName string) core_domain.CodeContainer { + scriptParser := ProcessTsString(code) + context := scriptParser.Program() + + listener := ast_typescript.NewTypeScriptIdentListener(fileName) + antlr.NewParseTreeWalker().Walk(listener, context) + + return listener.GetNodeInfo() +} + +func (t *TypeScriptIdentApp) SetExtensions(extension interface{}) { + +} + +func (t *TypeScriptIdentApp) IdentAnalysis(s string, file string) []core_domain.CodeMember { + return nil +} diff --git a/pkg/application/analysis/tsapp/ts_ident_app_regression_test.go b/pkg/application/analysis/tsapp/ts_ident_app_regression_test.go new file mode 100644 index 0000000000000000000000000000000000000000..a720fd4ca85bc066c777e6ecade5f2e9a06d89e4 --- /dev/null +++ b/pkg/application/analysis/tsapp/ts_ident_app_regression_test.go @@ -0,0 +1,30 @@ +package tsapp + +import ( + . "github.com/onsi/gomega" + "io/ioutil" + "testing" +) + +func Test_Regression(t *testing.T) { + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + code, _ := ioutil.ReadFile("../../../../_fixtures/ts/regressions/import_comma_issue.ts") + + results := app.Analysis(string(code), "") + + g.Expect(len(results.Imports)).To(Equal(3)) +} + +// todo: ignore this test for fast CI +func Test_ProcessErrorGrammar(t *testing.T) { + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + code, _ := ioutil.ReadFile("../../../../../_fixtures/ts/regressions/callback_hell.ts") + + results := app.Analysis(string(code), "") + + g.Expect(len(results.Members)).To(Equal(0)) +} diff --git a/pkg/application/analysis/tsapp/ts_ident_app_test.go b/pkg/application/analysis/tsapp/ts_ident_app_test.go new file mode 100644 index 0000000000000000000000000000000000000000..17ae273d35fab4774e3e4118931e06a2243f16b9 --- /dev/null +++ b/pkg/application/analysis/tsapp/ts_ident_app_test.go @@ -0,0 +1,243 @@ +package tsapp + +import ( + . "github.com/onsi/gomega" + "io/ioutil" + "testing" +) + +func Test_TypeScriptClassNode(t *testing.T) { + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + codefile := app.Analysis(` +interface IPerson { + name: string; +} + +class Person implements IPerson { + public publicString: string; + private privateString: string; + protected protectedString: string; + readonly readonlyString: string; + name: string; + + constructor(name: string) { + this.name = name; + } +} +`, "") + + g.Expect(codefile.DataStructures[0].NodeName).To(Equal("IPerson")) + g.Expect(codefile.DataStructures[1].NodeName).To(Equal("Person")) + g.Expect(codefile.DataStructures[1].Functions[0].Name).To(Equal("constructor")) + g.Expect(codefile.DataStructures[1].Implements[0]).To(Equal("IPerson")) +} + +func Test_TypeScriptMultipleClass(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + code, _ := ioutil.ReadFile("../../../../_fixtures/ts/grammar/Class.ts") + + codeFile := app.Analysis(string(code), "") + + g.Expect(len(codeFile.DataStructures)).To(Equal(4)) + g.Expect(len(codeFile.DataStructures[1].Implements)).To(Equal(1)) + g.Expect(codeFile.DataStructures[1].Implements[0]).To(Equal("IPerson")) +} + +func Test_TypeScriptAbstractClass(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + code, _ := ioutil.ReadFile("../../../../_fixtures/ts/grammar/AbstractClass.ts") + + codeFile := app.Analysis(string(code), "") + + g.Expect(len(codeFile.DataStructures)).To(Equal(3)) + g.Expect(codeFile.DataStructures[0].Type).To(Equal("Class")) + g.Expect(codeFile.DataStructures[1].NodeName).To(Equal("Employee")) + g.Expect(codeFile.DataStructures[1].Extend).To(Equal("Person")) +} + +func Test_ShouldGetClassFromModule(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + code, _ := ioutil.ReadFile("../../../../_fixtures/ts/grammar/Module.ts") + + results := app.Analysis(string(code), "") + + g.Expect(len(results.DataStructures)).To(Equal(1)) + g.Expect(results.DataStructures[0].NodeName).To(Equal("Employee")) +} + +func Test_ShouldEnableGetClassMethod(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + + codefile := app.Analysis(` +class Employee { + displayName():void { + console.log("hello, world"); + } +} +`, "") + + g.Expect(len(codefile.DataStructures[0].Functions)).To(Equal(1)) +} + +func Test_ShouldGetInterfaceImplements(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + + results := app.Analysis(` +export interface IPerson { + name: string; + gender: string; +} + +interface IEmployee extends IPerson{ + empCode: number; + readonly empName: string; + empDept?:string; + getSalary: (number) => number; // arrow function + getManagerName(number): string; +} +`, "") + + g.Expect(results.DataStructures[1].Extend).To(Equal("IPerson")) +} + +func Test_ShouldGetInterfaceProperty(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + codeFile := app.Analysis(` +export interface IPerson { + name: string; + gender: string; + getSalary: (number) => number; + getManagerName(number): string; +} +`, "") + + firstDataStruct := codeFile.DataStructures[0] + + g.Expect(len(firstDataStruct.Fields)).To(Equal(2)) + g.Expect(len(firstDataStruct.Functions)).To(Equal(2)) + + firstMethod := firstDataStruct.Functions[0] + secondMethod := firstDataStruct.Functions[1] + + g.Expect(firstMethod.Name).To(Equal("getSalary")) + g.Expect(secondMethod.Name).To(Equal("getManagerName")) + g.Expect(secondMethod.Parameters[0].TypeType).To(Equal("number")) +} + +func Test_ShouldGetDefaultFunctionName(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + + codeFile := app.Analysis(` +function Sum(x: number, y: number) : void { + console.log('processNumKeyPairs: key = ' + key + ', value = ' + value) + return x + y; +} +`, "") + + ds := codeFile.DataStructures + + firstFunction := ds[0].Functions[0] + params := firstFunction.Parameters + g.Expect(firstFunction.MultipleReturns[0].TypeType).To(Equal("void")) + g.Expect(len(params)).To(Equal(2)) + g.Expect(params[0].TypeValue).To(Equal("x")) + g.Expect(params[0].TypeType).To(Equal("number")) +} + +func Test_ShouldHandleRestParameters(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + + codeFile := app.Analysis(` +function buildName(firstName: string, ...restOfName: string[]) { + return firstName + " " + restOfName.join(" "); +} +`, "") + + firstFunction:= codeFile.DataStructures[0].Functions[0] + params := firstFunction.Parameters + g.Expect(len(params)).To(Equal(2)) + g.Expect(params[0].TypeValue).To(Equal("firstName")) + g.Expect(params[1].TypeValue).To(Equal("restOfName")) +} + +func Test_ShouldGetClassFields(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + code, _ := ioutil.ReadFile("../../../../_fixtures/ts/grammar/Class.ts") + + codeFile := app.Analysis(string(code), "") + + codeFields := codeFile.DataStructures[1].Fields + g.Expect(len(codeFields)).To(Equal(5)) + g.Expect(codeFields[0].Modifiers[0]).To(Equal("public")) +} + +func Test_ShouldReturnBlockImports(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + + results := app.Analysis(` +import { ZipCodeValidator } from "./ZipCodeValidator"; + +`, "") + + g.Expect(len(results.Imports)).To(Equal(1)) + g.Expect(results.Imports[0].Source).To(Equal("./ZipCodeValidator")) +} + +func Test_ShouldReturnAsImports(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + + results := app.Analysis(` +import zip = require("./ZipCodeValidator"); +`, "") + + g.Expect(len(results.Imports)).To(Equal(1)) + + g.Expect(results.Imports[0].Source).To(Equal("./ZipCodeValidator")) +} + +// Todo: fix for $ and * +func Test_ShouldReturnAllImports(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + app := new(TypeScriptIdentApp) + code, _ := ioutil.ReadFile("../../../../_fixtures/ts/grammar/Import.ts") + results := app.Analysis(string(code), "") + + g.Expect(len(results.Imports)).To(Equal(5)) +} diff --git a/pkg/application/api/java_api_app.go b/pkg/application/api/java_api_app.go new file mode 100644 index 0000000000000000000000000000000000000000..9cff9f61ed7223a22f84f2908ea0a1a244628141 --- /dev/null +++ b/pkg/application/api/java_api_app.go @@ -0,0 +1,41 @@ +package api + +import ( + "fmt" + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/pkg/adapter/cocafile" + api_domain2 "github.com/phodal/coca/pkg/domain/api_domain" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_java" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_java/ast_api_java" + "path/filepath" +) + +var allApis []api_domain2.RestAPI + +type JavaApiApp struct { +} + +func (j *JavaApiApp) AnalysisPath(codeDir string, parsedDeps []core_domain.CodeDataStruct, identifiersMap map[string]core_domain.CodeDataStruct, diMap map[string]string) []api_domain2.RestAPI { + files := cocafile.GetJavaFiles(codeDir) + allApis = nil + for index := range files { + file := files[index] + + displayName := filepath.Base(file) + fmt.Println("parse java call: " + displayName) + + parser := ast_java.ProcessJavaFile(file) + context := parser.CompilationUnit() + + listener := ast_api_java.NewJavaAPIListener(identifiersMap, diMap) + listener.AppendClasses(parsedDeps) + + antlr.NewParseTreeWalker().Walk(listener, context) + + currentRestApis := listener.GetClassApis() + allApis = append(allApis, currentRestApis...) + } + + return allApis +} diff --git a/core/adapter/api/java_api_app_test.go b/pkg/application/api/java_api_app_test.go similarity index 39% rename from core/adapter/api/java_api_app_test.go rename to pkg/application/api/java_api_app_test.go index a618007114549580a4ea1f499e1fe6e3a8c0059b..8606c2f6788d51acef1416ac77b9a894552d82c8 100644 --- a/core/adapter/api/java_api_app_test.go +++ b/pkg/application/api/java_api_app_test.go @@ -2,10 +2,8 @@ package api import ( . "github.com/onsi/gomega" - "github.com/phodal/coca/core/adapter" - "github.com/phodal/coca/core/adapter/call" - "github.com/phodal/coca/core/adapter/identifier" - "path/filepath" + "github.com/phodal/coca/cocatest/testhelper" + "github.com/phodal/coca/pkg/domain/core_domain" "testing" ) @@ -13,20 +11,8 @@ func TestJavaCallApp_AnalysisPath(t *testing.T) { g := NewGomegaWithT(t) codePath := "../../../_fixtures/call" - codePath = filepath.FromSlash(codePath) - - identifierApp := new(identifier.JavaIdentifierApp) - identifiers := identifierApp.AnalysisPath(codePath) - var classes []string = nil - for _, node := range identifiers { - classes = append(classes, node.Package+"."+node.ClassName) - } - - callApp := call.NewJavaCallApp() - callNodes := callApp.AnalysisPath(codePath, classes, identifiers) - - identifiersMap := adapter.BuildIdentifierMap(identifiers) - diMap := adapter.BuildDIMap(identifiers, identifiersMap) + callNodes, identifiersMap, identifiers := testhelper.BuildAnalysisDeps(codePath) + diMap := core_domain.BuildDIMap(identifiers, identifiersMap) app := new(JavaApiApp) restApis := app.AnalysisPath(codePath, callNodes, identifiersMap, diMap) diff --git a/core/domain/arch/arch_app.go b/pkg/application/arch/arch_app.go similarity index 61% rename from core/domain/arch/arch_app.go rename to pkg/application/arch/arch_app.go index 7bef7082e1bda773e4435abfb0fed82607dc1885..9991012d17fac54b2910a2a6b8d9dc9686d2c8d0 100644 --- a/core/domain/arch/arch_app.go +++ b/pkg/application/arch/arch_app.go @@ -1,29 +1,29 @@ package arch import ( - "github.com/phodal/coca/core/domain/arch/tequila" - "github.com/phodal/coca/core/models" + "github.com/phodal/coca/pkg/application/arch/tequila" + "github.com/phodal/coca/pkg/domain/core_domain" ) type ArchApp struct { } func NewArchApp() ArchApp { - return *&ArchApp{} + return ArchApp{} } -func (a ArchApp) Analysis(deps []models.JClassNode, identifiersMap map[string]models.JIdentifier) *tequila.FullGraph { +func (a ArchApp) Analysis(deps []core_domain.CodeDataStruct, identifiersMap map[string]core_domain.CodeDataStruct) *tequila.FullGraph { fullGraph := &tequila.FullGraph{ NodeList: make(map[string]string), RelationList: make(map[string]*tequila.Relation), } for _, clz := range deps { - if clz.Class == "Main" { + if clz.NodeName == "Main" { continue } - src := clz.Package + "." + clz.Class + src := clz.Package + "." + clz.NodeName fullGraph.NodeList[src] = src for _, impl := range clz.Implements { @@ -44,9 +44,9 @@ func (a ArchApp) Analysis(deps []models.JClassNode, identifiersMap map[string]mo return fullGraph } -func addCallInField(clz models.JClassNode, src string, fullGraph tequila.FullGraph) { - for _, field := range clz.MethodCalls { - dst := field.Package + "." + field.Class +func addCallInField(clz core_domain.CodeDataStruct, src string, fullGraph tequila.FullGraph) { + for _, field := range clz.FunctionCalls { + dst := field.Package + "." + field.NodeName relation := &tequila.Relation{ From: src, To: dst, @@ -57,15 +57,15 @@ func addCallInField(clz models.JClassNode, src string, fullGraph tequila.FullGra } } -func addCallInMethod(clz models.JClassNode, identifiersMap map[string]models.JIdentifier, src string, fullGraph tequila.FullGraph) { - for _, method := range clz.Methods { +func addCallInMethod(clz core_domain.CodeDataStruct, identifiersMap map[string]core_domain.CodeDataStruct, src string, fullGraph tequila.FullGraph) { + for _, method := range clz.Functions { if method.Name == "main" { continue } // TODO: add implements, extends support - for _, call := range method.MethodCalls { - dst := call.Package + "." + call.Class + for _, call := range method.FunctionCalls { + dst := call.Package + "." + call.NodeName if src == dst { continue } @@ -83,7 +83,7 @@ func addCallInMethod(clz models.JClassNode, identifiersMap map[string]models.JId } } -func addExtend(clz models.JClassNode, src string, fullGraph tequila.FullGraph) { +func addExtend(clz core_domain.CodeDataStruct, src string, fullGraph tequila.FullGraph) { if clz.Extend != "" { relation := &tequila.Relation{ From: src, diff --git a/core/domain/arch/arch_app_test.go b/pkg/application/arch/arch_app_test.go similarity index 37% rename from core/domain/arch/arch_app_test.go rename to pkg/application/arch/arch_app_test.go index edc749fc7be36dfea759e3800608c202ec5a7aa8..07ac96050948ba4537a9cd99157af06c60d1e1b5 100644 --- a/core/domain/arch/arch_app_test.go +++ b/pkg/application/arch/arch_app_test.go @@ -3,34 +3,19 @@ package arch import ( "encoding/json" . "github.com/onsi/gomega" - "github.com/phodal/coca/core/adapter" - "github.com/phodal/coca/core/adapter/call" - "github.com/phodal/coca/core/adapter/identifier" - "github.com/phodal/coca/core/domain/arch/tequila" - "github.com/phodal/coca/core/support" - "io" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cocatest" + "github.com/phodal/coca/cocatest/testhelper" + "github.com/phodal/coca/pkg/application/arch/tequila" "path/filepath" - "reflect" "testing" ) -func TestConceptAnalyser_Analysis(t *testing.T) { +func TestArch_Analysis(t *testing.T) { g := NewGomegaWithT(t) - codePath := "../../../_fixtures/arch/step2-java" - codePath = filepath.FromSlash(codePath) - - identifierApp := new(identifier.JavaIdentifierApp) - identifiers := identifierApp.AnalysisPath(codePath) - var classes []string = nil - for _, node := range identifiers { - classes = append(classes, node.Package+"."+node.ClassName) - } - - callApp := call.NewJavaCallApp() - callNodes := callApp.AnalysisPath(codePath, classes, identifiers) - - identifiersMap := adapter.BuildIdentifierMap(identifiers) + codePath := "../../../_fixtures/grammar/java/arch/step2-java" + callNodes, identifiersMap, _ := testhelper.BuildAnalysisDeps(codePath) app := NewArchApp() results := app.Analysis(callNodes, identifiersMap) @@ -42,35 +27,23 @@ func TestConceptAnalyser_Analysis(t *testing.T) { g.Expect(results.RelationList["domain.AggregateRootA->domain.AggregateRoot"].To).To(Equal("domain.AggregateRoot")) graph := results.ToDot(".", func(key string) bool { - return false + return true }) g.Expect(len(graph.Nodes.Lookup)).To(Equal(13)) g.Expect(len(graph.SubGraphs.SubGraphs)).To(Equal(3)) jsonContent, _ := json.MarshalIndent(results, "", "\t") - content := support.ReadFile(filepath.FromSlash(codePath + "/" + "results.json")) + content := cmd_util.ReadFile(filepath.FromSlash(codePath + "/" + "results.json")) - g.Expect(JSONBytesEqual(jsonContent, content)).To(Equal(true)) + g.Expect(cocatest.JSONBytesEqual(jsonContent, content, "")).To(Equal(true)) } -func TestConceptAnalyser_AnalysisWithFans(t *testing.T) { +func TestArch_AnalysisWithFans(t *testing.T) { g := NewGomegaWithT(t) - codePath := "../../../_fixtures/arch/step2-java" - codePath = filepath.FromSlash(codePath) - - identifierApp := new(identifier.JavaIdentifierApp) - identifiers := identifierApp.AnalysisPath(codePath) - var classes []string = nil - for _, node := range identifiers { - classes = append(classes, node.Package+"."+node.ClassName) - } - - callApp := call.NewJavaCallApp() - callNodes := callApp.AnalysisPath(codePath, classes, identifiers) - - identifiersMap := adapter.BuildIdentifierMap(identifiers) + codePath := "../../../_fixtures/grammar/java/arch/step2-java" + callNodes, identifiersMap, _ := testhelper.BuildAnalysisDeps(codePath) app := NewArchApp() result := app.Analysis(callNodes, identifiersMap) @@ -88,28 +61,3 @@ func TestConceptAnalyser_AnalysisWithFans(t *testing.T) { g.Eventually(fans[0].FanIn).Should(Equal(2)) g.Eventually(fans[0].FanOut).Should(Equal(0)) } - -func JSONEqual(a, b io.Reader) (bool, error) { - var j, j2 interface{} - d := json.NewDecoder(a) - if err := d.Decode(&j); err != nil { - return false, err - } - d = json.NewDecoder(b) - if err := d.Decode(&j2); err != nil { - return false, err - } - return reflect.DeepEqual(j2, j), nil -} - -// JSONBytesEqual compares the JSON in two byte slices. -func JSONBytesEqual(a, b []byte) (bool, error) { - var j, j2 interface{} - if err := json.Unmarshal(a, &j); err != nil { - return false, err - } - if err := json.Unmarshal(b, &j2); err != nil { - return false, err - } - return reflect.DeepEqual(j2, j), nil -} diff --git a/core/domain/arch/tequila/LICENSE b/pkg/application/arch/tequila/LICENSE similarity index 100% rename from core/domain/arch/tequila/LICENSE rename to pkg/application/arch/tequila/LICENSE diff --git a/core/domain/arch/tequila/incl_viz.go b/pkg/application/arch/tequila/incl_viz.go similarity index 39% rename from core/domain/arch/tequila/incl_viz.go rename to pkg/application/arch/tequila/incl_viz.go index 1168b88567720e87113297b89729d9f4c63e70da..30e995a402be6dc4611296eceb5cf7ce7a664936 100644 --- a/core/domain/arch/tequila/incl_viz.go +++ b/pkg/application/arch/tequila/incl_viz.go @@ -14,6 +14,8 @@ type Relation struct { } type FullGraph struct { + layerIndex int + nodeIndex int NodeList map[string]string RelationList map[string]*Relation } @@ -24,20 +26,20 @@ type Fan struct { FanOut int } -func (f *FullGraph) MergeHeaderFile(merge func(string) string) *FullGraph { +func (fullGraph *FullGraph) MergeHeaderFile(merge func(string) string) *FullGraph { result := &FullGraph{ NodeList: make(map[string]string), RelationList: make(map[string]*Relation), } nodes := make(map[string]string) - for key := range f.NodeList { + for key := range fullGraph.NodeList { mergedKey := merge(key) nodes[key] = mergedKey result.NodeList[mergedKey] = mergedKey } - for key := range f.RelationList { - relation := f.RelationList[key] + for key := range fullGraph.RelationList { + relation := fullGraph.RelationList[key] mergedFrom := merge(relation.From) mergedTo := merge(relation.To) if mergedFrom == mergedTo { @@ -55,8 +57,8 @@ func (f *FullGraph) MergeHeaderFile(merge func(string) string) *FullGraph { return result } -func (f *FullGraph) SortedByFan(merge func(string) string) []*Fan { - mergedGraph := f.MergeHeaderFile(merge) +func (fullGraph *FullGraph) SortedByFan(merge func(string) string) []*Fan { + mergedGraph := fullGraph.MergeHeaderFile(merge) result := make([]*Fan, len(mergedGraph.NodeList)) index := 0 fanMap := make(map[string]*Fan) @@ -77,11 +79,23 @@ func (f *FullGraph) SortedByFan(merge func(string) string) []*Fan { return result } -var fullGraph *FullGraph +func buildLayerAttr(layer string, layerIndex int) (map[string]string, string) { + layerAttr := make(map[string]string) + layerAttr["label"] = "\"" + layer + "\"" + layerName := "cluster" + strconv.Itoa(layerIndex) + return layerAttr, layerName +} + +func (fullGraph *FullGraph) buildRelationAttr(text string) map[string]string { + attrs := make(map[string]string) + attrs["label"] = "\"" + text + "\"" + attrs["shape"] = "box" + return attrs +} -func (fullGraph *FullGraph) ToDot(split string, filter func(string) bool) *gographviz.Graph { +func (fullGraph *FullGraph) ToDot(split string, include func(string) bool) *gographviz.Graph { graph := gographviz.NewGraph() - graph.SetName("G") + _ = graph.SetName("G") nodeIndex := 1 layerIndex := 1 @@ -90,37 +104,31 @@ func (fullGraph *FullGraph) ToDot(split string, filter func(string) bool) *gogra layerMap := make(map[string][]string) for nodeKey := range fullGraph.NodeList { - if filter(nodeKey) { - continue + if include(nodeKey) || include(fullGraph.NodeList[nodeKey]) { + tmp := strings.Split(nodeKey, split) + packageName := tmp[0] + if packageName == nodeKey { + packageName = "main" + } + if len(tmp) > 2 { + packageName = strings.Join(tmp[0:len(tmp)-1], split) + } + + if _, ok := layerMap[packageName]; !ok { + layerMap[packageName] = make([]string, 0) + } + layerMap[packageName] = append(layerMap[packageName], nodeKey) } - - tmp := strings.Split(nodeKey, split) - packageName := tmp[0] - if packageName == nodeKey { - packageName = "main" - } - if len(tmp) > 2 { - packageName = strings.Join(tmp[0:len(tmp)-1], split) - } - - if _, ok := layerMap[packageName]; !ok { - layerMap[packageName] = make([]string, 0) - } - layerMap[packageName] = append(layerMap[packageName], nodeKey) } for layer := range layerMap { - layerAttr := make(map[string]string) - layerAttr["label"] = "\"" + layer + "\"" - layerName := "cluster" + strconv.Itoa(layerIndex) - graph.AddSubGraph("G", layerName, layerAttr) + layerAttr, layerName := buildLayerAttr(layer, layerIndex) + _ = graph.AddSubGraph("G", layerName, layerAttr) layerIndex++ for _, node := range layerMap[layer] { - attrs := make(map[string]string) fileName := strings.Replace(node, layer+split, "", -1) - attrs["label"] = "\"" + fileName + "\"" - attrs["shape"] = "box" - graph.AddNode(layerName, "node"+strconv.Itoa(nodeIndex), attrs) + attrs := fullGraph.buildRelationAttr(fileName) + _ = graph.AddNode(layerName, "node"+strconv.Itoa(nodeIndex), attrs) nodes[node] = "node" + strconv.Itoa(nodeIndex) nodeIndex++ } @@ -137,13 +145,76 @@ func (fullGraph *FullGraph) ToDot(split string, filter func(string) bool) *gogra attrs := make(map[string]string) attrs["style"] = relation.Style - graph.AddEdge(fromNode, toNode, true, attrs) + _ = graph.AddEdge(fromNode, toNode, true, attrs) + } + } + + return graph +} + +func (fullGraph *FullGraph) ToMapDot(include func(string) bool) *gographviz.Graph { + node := fullGraph.BuildMapTree(include) + dot := fullGraph.MapToGraph(node) + return dot +} + +func (fullGraph *FullGraph) MapToGraph(trie *PathTrie) *gographviz.Graph { + graph := gographviz.NewGraph() + _ = graph.SetName("G") + + nodes := make(map[string]string) + fullGraph.layerIndex = 1 + fullGraph.nodeIndex = 1 + + for _, child := range trie.Children { + fullGraph.buildGraphNode("G", child, graph, nodes, "") + } + + for key := range fullGraph.RelationList { + relation := fullGraph.RelationList[key] + if nodes[relation.From] != "" && nodes[relation.To] != "" { + fromNode := nodes[relation.From] + toNode := nodes[relation.To] + + attrs := make(map[string]string) + attrs["style"] = relation.Style + + _ = graph.AddEdge(fromNode, toNode, true, attrs) } } return graph } -var Foo = func() string { - return "" +func (fullGraph *FullGraph) buildGraphNode(subgraph string, current *PathTrie, graph *gographviz.Graph, nodes map[string]string, s string) { + if s != "" { + s = s + "." + current.Value + } else { + s = s + current.Value + } + + layerAttr, layerName := buildLayerAttr(current.Value, fullGraph.layerIndex) + _ = graph.AddSubGraph(subgraph, layerName, layerAttr) + fullGraph.layerIndex++ + + if len(current.Children) > 0 { + for _, child := range current.Children { + fullGraph.buildGraphNode(layerName, child, graph, nodes, s) + } + } else { + _ = graph.AddNode(subgraph, "node"+strconv.Itoa(fullGraph.nodeIndex), fullGraph.buildRelationAttr(current.Value)) + nodes[s] = "node" + strconv.Itoa(fullGraph.nodeIndex) + fullGraph.nodeIndex++ + } +} + +func (fullGraph *FullGraph) BuildMapTree(include func(key string) bool) *PathTrie { + pkgTrie := NewPathTrie() + for nodeKey := range fullGraph.NodeList { + if include(nodeKey) || include(fullGraph.NodeList[nodeKey]) { + pkgTrie.Put(strings.ReplaceAll(nodeKey, ".", "/")) + } + } + + return pkgTrie } diff --git a/pkg/application/arch/tequila/incl_viz_test.go b/pkg/application/arch/tequila/incl_viz_test.go new file mode 100644 index 0000000000000000000000000000000000000000..b23974cf89d4730ae7bdeb70d83e7ff508e5b08a --- /dev/null +++ b/pkg/application/arch/tequila/incl_viz_test.go @@ -0,0 +1,102 @@ +package tequila + +import ( + . "github.com/onsi/gomega" + "github.com/phodal/coca/cmd/cmd_util" + "strings" + "testing" +) + +func createBasicMap() (*PathTrie, *FullGraph) { + fullGraph, nodeFilter := createGraph() + + node := fullGraph.BuildMapTree(nodeFilter) + return node, fullGraph +} + +func createGraph() (*FullGraph, func(key string) bool) { + fullGraph := &FullGraph{ + NodeList: make(map[string]string), + RelationList: make(map[string]*Relation), + } + from := "com.phodal.Ledge" + to := "com.spring.Boot" + + fullGraph.NodeList[from] = from + fullGraph.NodeList[to] = to + + relation := Relation{ + From: from, + To: to, + Style: "\"solid\"", + } + fullGraph.RelationList["com.phodal.Ledge->com.spring.Boot"] = &relation + + var nodeFilter = func(key string) bool { + return true + } + return fullGraph, nodeFilter +} + +func Test_BuildGraphNode(t *testing.T) { + g := NewGomegaWithT(t) + node, _ := createBasicMap() + + g.Expect(len(node.Children["com"].Children)).To(Equal(2)) +} + +func Test_ShouldMergeSameMap(t *testing.T) { + g := NewGomegaWithT(t) + fullGraph, nodeFilter := createGraph() + fullGraph.NodeList["com.phodal.coca"] = "com.phodal.coca" + node := fullGraph.BuildMapTree(nodeFilter) + + g.Expect(len(node.Children["com"].Children)).To(Equal(2)) +} + +func Test_BuildNodeDot(t *testing.T) { + g := NewGomegaWithT(t) + graph, nodeFilter := createGraph() + graph.NodeList["com.phodal.coca"] = "com.phodal.coca" + node := graph.BuildMapTree(nodeFilter) + dot := graph.MapToGraph(node) + + result := dot.String() + cmd_util.WriteToCocaFile("demo.dot", result) + + g.Expect(len(dot.SubGraphs.SubGraphs)).To(Equal(6)) +} + +func Test_ShouldShowPackageOnly(t *testing.T) { + g := NewGomegaWithT(t) + + fullGraph, nodeFilter := createGraph() + + fullGraph= fullGraph.MergeHeaderFile(MergeHeaderFunc) + node := fullGraph.ToMapDot(nodeFilter) + + g.Expect(strings.Contains(node.String(), "Ledge")).To(Equal(false)) + g.Expect(strings.Contains(node.String(), "Boot")).To(Equal(false)) +} + +func Test_ShouldShowMergePackage(t *testing.T) { + g := NewGomegaWithT(t) + + fullGraph, nodeFilter := createGraph() + + fullGraph= fullGraph.MergeHeaderFile(MergePackageFunc) + node := fullGraph.ToMapDot(nodeFilter) + + g.Expect(strings.Contains(node.String(), "Ledge")).To(Equal(false)) + g.Expect(strings.Contains(node.String(), "Boot")).To(Equal(false)) +} + +func Test_ShouldConvertDot(t *testing.T) { + g := NewGomegaWithT(t) + + fullGraph, nodeFilter := createGraph() + + node := fullGraph.ToDot(".", nodeFilter) + + g.Expect(strings.Contains(node.String(), "Ledge")).To(Equal(true)) +} diff --git a/core/domain/arch/tequila/merge_viz.go b/pkg/application/arch/tequila/merge_viz.go similarity index 72% rename from core/domain/arch/tequila/merge_viz.go rename to pkg/application/arch/tequila/merge_viz.go index e5e526628a31386b535dce5d2a276ae0cc60dbcc..3c46f4977975da85a000670e1823710f8dc08cdf 100644 --- a/core/domain/arch/tequila/merge_viz.go +++ b/pkg/application/arch/tequila/merge_viz.go @@ -6,6 +6,14 @@ import ( var Level = 7 +var MergeHeaderFunc = func(input string) string { + tmp := strings.Split(input, ".") + if len(tmp) > 1 { + return strings.Join(tmp[0:len(tmp)-1], ".") + } + return input +} + var MergePackageFunc = func(input string) string { split := "/" if !strings.Contains(input, split) { diff --git a/pkg/application/arch/tequila/path_trie.go b/pkg/application/arch/tequila/path_trie.go new file mode 100644 index 0000000000000000000000000000000000000000..40c64411449caaba698d41d7bb0057058c8e4fe0 --- /dev/null +++ b/pkg/application/arch/tequila/path_trie.go @@ -0,0 +1,68 @@ +// https://github.com/dghubble/trie +//The MIT License (MIT) +// +//Copyright (c) 2014 Dalton Hubble +// +//Permission is hereby granted, free of charge, to any person obtaining a copy +//of this software and associated documentation files (the "Software"), to deal +//in the Software without restriction, including without limitation the rights +//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//copies of the Software, and to permit persons to whom the Software is +//furnished to do so, subject to the following conditions: +// +//The above copyright notice and this permission notice shall be included in +//all copies or substantial portions of the Software. +// +//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +//THE SOFTWARE. + +package tequila + +import "strings" + +type StringSegmenter func(key string, start int) (segment string, nextIndex int) + +func PathSegmenter(path string, start int) (segment string, next int) { + if len(path) == 0 || start < 0 || start > len(path)-1 { + return "", -1 + } + end := strings.IndexRune(path[start+1:], '/') // next '/' after 0th rune + if end == -1 { + return path[start:], -1 + } + return path[start : start+end+1], start + end + 1 +} + +type PathTrie struct { + segmenter StringSegmenter + Value string + Children map[string]*PathTrie +} + +func NewPathTrie() *PathTrie { + return &PathTrie{ + segmenter: PathSegmenter, + } +} + +func (trie *PathTrie) Put(key string) { + node := trie + for part, i := trie.segmenter(key, 0); part != ""; part, i = trie.segmenter(key, i) { + child, _ := node.Children[part] + if child == nil { + if node.Children == nil { + node.Children = map[string]*PathTrie{} + } + child = NewPathTrie() + node.Children[part] = child + } + + child.Value = strings.ReplaceAll(part, "/", "") + node = child + } +} diff --git a/pkg/application/bs/bad_smell_app.go b/pkg/application/bs/bad_smell_app.go new file mode 100644 index 0000000000000000000000000000000000000000..63905059efee4cd0d7be2e8cb69fc200175eae8f --- /dev/null +++ b/pkg/application/bs/bad_smell_app.go @@ -0,0 +1,57 @@ +package bs + +import ( + "fmt" + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/domain/bs_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_java" + "github.com/phodal/coca/pkg/infrastructure/ast/bs_java" + "path/filepath" +) + +var nodeInfos []bs_domain.BSDataStruct + +type BadSmellApp struct { +} + +func NewBadSmellApp() *BadSmellApp { + return &BadSmellApp{} +} + +func (j *BadSmellApp) AnalysisPath(codeDir string) *[]bs_domain.BSDataStruct { + nodeInfos = nil + files := cocafile.GetJavaFiles(codeDir) + for index := range files { + nodeInfo := bs_domain.NewJFullClassNode() + file := files[index] + + displayName := filepath.Base(file) + fmt.Println("parse java call: " + displayName) + + parser := ast_java.ProcessJavaFile(file) + context := parser.CompilationUnit() + + listener := bs_java.NewBadSmellListener() + + antlr.NewParseTreeWalker().Walk(listener, context) + + nodeInfo = listener.GetNodeInfo() + nodeInfo.FilePath = file + nodeInfos = append(nodeInfos, nodeInfo) + } + + return &nodeInfos +} + +func (j *BadSmellApp) IdentifyBadSmell(nodeInfos *[]bs_domain.BSDataStruct, ignoreRules []string) []bs_domain.BadSmellModel { + bsList := AnalysisBadSmell(*nodeInfos) + + mapIgnoreRules := make(map[string]bool) + for _, ignore := range ignoreRules { + mapIgnoreRules[ignore] = true + } + + filteredBsList := bs_domain.FilterBadSmellList(bsList, mapIgnoreRules) + return filteredBsList +} diff --git a/pkg/application/bs/bad_smell_app_test.go b/pkg/application/bs/bad_smell_app_test.go new file mode 100644 index 0000000000000000000000000000000000000000..0e755476b9484d6294aa51327e34b5bab4537434 --- /dev/null +++ b/pkg/application/bs/bad_smell_app_test.go @@ -0,0 +1,121 @@ +package bs + +import ( + . "github.com/onsi/gomega" + "path/filepath" + "testing" +) + +func TestBadSmellApp_ComplexCondition(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/ComplexIf.java" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(1)) + g.Expect(bsList[0].Bs).To(Equal("complexCondition")) +} +func TestBadSmellApp_DataClass(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/DataClass.java" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(1)) + g.Expect(bsList[0].Bs).To(Equal("dataClass")) +} + +func TestBadSmellApp_LongMethod(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/LongMethod.java" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(2)) + g.Expect(bsList[0].Bs).To(Equal("longMethod")) + g.Expect(bsList[1].Bs).To(Equal("refusedBequest")) +} + +func TestBadSmellApp_LazyElement(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/LazyClass.java" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(1)) + g.Expect(bsList[0].Bs).To(Equal("lazyElement")) +} + +func TestBadSmellApp_LongParameters(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/LongParameter.java" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(1)) + g.Expect(bsList[0].Bs).To(Equal("longParameterList")) +} + +func TestBadSmellApp_MultipleIf(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/MultipleIf.java" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(1)) + g.Expect(bsList[0].Bs).To(Equal("repeatedSwitches")) +} + +func TestBadSmellApp_LargeClass(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/LargeClass.java" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(1)) + g.Expect(bsList[0].Bs).To(Equal("largeClass")) +} + +func TestBadSmellApp_GraphCall(t *testing.T) { + g := NewGomegaWithT(t) + + bsApp := NewBadSmellApp() + codePath := "../../../_fixtures/bs/graphcall" + codePath = filepath.FromSlash(codePath) + + bs := bsApp.AnalysisPath(codePath) + bsList := bsApp.IdentifyBadSmell(bs, nil) + + g.Expect(len(bsList)).To(Equal(1)) + g.Expect(bsList[0].Bs).To(Equal("graphConnectedCall")) + g.Expect(bsList[0].Description).To(Equal("graphcall.GraphCallA->graphcall.GraphCallB->graphcall.GraphCallC;graphcall.GraphCallA->graphcall.GraphCallC")) +} + diff --git a/pkg/application/bs/bs_app.go b/pkg/application/bs/bs_app.go new file mode 100644 index 0000000000000000000000000000000000000000..4aec5ae88044577636002dabe0236d03ea275865 --- /dev/null +++ b/pkg/application/bs/bs_app.go @@ -0,0 +1,137 @@ +package bs + +import ( + "encoding/json" + "github.com/huleTW/bad-smell-analysis/graphcall" + "github.com/phodal/coca/pkg/domain/bs_domain" + "strconv" +) + +var ( + BS_LONG_PARAS_LENGTH = 5 + BS_IF_SWITCH_LENGTH = 8 + BS_LARGE_LENGTH = 20 + BS_METHOD_LENGTH = 30 + BS_IF_LINES_LENGTH = 3 + + SMELL_GARPH_CONNECTED_CALL = "graphConnectedCall" + SMELL_LAZY_ELEMENT = "lazyElement" + SMELL_LONG_METHOD = "longMethod" + SMELL_DATA_CLASS = "dataClass" + SMELL_REFUSED_BEQUEST = "refusedBequest" + SMELL_LARGE_CLASS = "largeClass" + SMELL_COMPLEX_CONDITION = "complexCondition" + SMELL_REPEATED_SWITCHES = "repeatedSwitches" + SMELL_LONG_PARAMETER_LIST = "longParameterList" +) + +func AnalysisBadSmell(nodes []bs_domain.BSDataStruct) []bs_domain.BadSmellModel { + var badSmellList []bs_domain.BadSmellModel + for _, node := range nodes { + checkLazyElement(node, &badSmellList) + + onlyHaveGetterAndSetter := true + for _, method := range node.Functions { + checkLongMethod(method, node, &badSmellList) + + if !(method.IsGetterSetter()) { + onlyHaveGetterAndSetter = false + } + + checkLongParameterList(method, node, &badSmellList) + checkRepeatedSwitches(method, node, &badSmellList) + checkComplexIf(method, node, &badSmellList) + } + + checkDataClass(onlyHaveGetterAndSetter, node, &badSmellList) + checkRefusedBequest(node, &badSmellList) + checkLargeClass(node, &badSmellList) + } + checkConnectedGraphCall(nodes, &badSmellList) + return badSmellList +} + +func checkConnectedGraphCall(nodes []bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + var classNodes = map[string][]string{} + var classNodeMaps = map[string]bool{} + for _, node := range nodes { + classNodeMaps[node.GetClassFullName()] = true + } + for _, node := range nodes { + classNodes[node.GetClassFullName()] = bs_domain.GetCalledClasses(node, classNodeMaps) + } + var badSmellGraphCall = graphcall.NewBadSmellGraphCall() + var descriptions = badSmellGraphCall.AnalysisGraphCallPath(classNodes) + for _, description := range descriptions { + *badSmellList = append(*badSmellList, bs_domain.BadSmellModel{Bs: SMELL_GARPH_CONNECTED_CALL, Description: description}) + } +} + +func checkLazyElement(node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + if node.Type == "Class" && len(node.Functions) < 1 { + *badSmellList = append(*badSmellList, bs_domain.BadSmellModel{File: node.FilePath, Bs: SMELL_LAZY_ELEMENT}) + } +} + +func checkLongMethod(method bs_domain.BSFunction, node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + methodLength := method.Position.StopLine - method.Position.StartLine + + if methodLength > BS_METHOD_LENGTH { + description := "method length: " + strconv.Itoa(methodLength) + longMethod := bs_domain.BadSmellModel{File: node.FilePath, Line: strconv.Itoa(method.Position.StartLine), Bs: SMELL_LONG_METHOD, Description: description, Size: methodLength} + *badSmellList = append(*badSmellList, longMethod) + } +} + +func checkDataClass(onlyHaveGetterAndSetter bool, node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + if onlyHaveGetterAndSetter && node.Type == "Class" && len(node.Functions) > 0 { + dataClass := bs_domain.BadSmellModel{File: node.FilePath, Bs: SMELL_DATA_CLASS, Size: len(node.Functions)} + *badSmellList = append(*badSmellList, dataClass) + } +} + +func checkRefusedBequest(node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + if node.Extend != "" { + if node.HasCallSuper() { + *badSmellList = append(*badSmellList, bs_domain.BadSmellModel{File: node.FilePath, Bs: SMELL_REFUSED_BEQUEST}) + } + } +} + +func checkLargeClass(node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + normalClassLength := bs_domain.WithoutGetterSetterClass(node.Functions) + if node.Type == "Class" && normalClassLength >= BS_LARGE_LENGTH { + description := "methods number (without getter/setter): " + strconv.Itoa(normalClassLength) + *badSmellList = append(*badSmellList, bs_domain.BadSmellModel{File: node.FilePath, Bs: SMELL_LARGE_CLASS, Description: description, Size: normalClassLength}) + } +} + +func checkComplexIf(method bs_domain.BSFunction, node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + for _, info := range method.FunctionBS.IfInfo { + if info.EndLine-info.StartLine >= BS_IF_LINES_LENGTH { + longParams := bs_domain.BadSmellModel{File: node.FilePath, Line: strconv.Itoa(info.StartLine), Bs: SMELL_COMPLEX_CONDITION, Description: SMELL_COMPLEX_CONDITION} + *badSmellList = append(*badSmellList, longParams) + } + } +} + +func checkRepeatedSwitches(method bs_domain.BSFunction, node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + if method.FunctionBS.IfSize >= BS_IF_SWITCH_LENGTH { + longParams := bs_domain.BadSmellModel{File: node.FilePath, Line: strconv.Itoa(method.Position.StartLine), Bs: SMELL_REPEATED_SWITCHES, Description: "ifSize", Size: method.FunctionBS.IfSize} + *badSmellList = append(*badSmellList, longParams) + } + + if method.FunctionBS.SwitchSize >= BS_IF_SWITCH_LENGTH { + longParams := bs_domain.BadSmellModel{File: node.FilePath, Line: strconv.Itoa(method.Position.StartLine), Bs: SMELL_REPEATED_SWITCHES, Description: "switchSize", Size: method.FunctionBS.SwitchSize} + *badSmellList = append(*badSmellList, longParams) + } +} + +func checkLongParameterList(method bs_domain.BSFunction, node bs_domain.BSDataStruct, badSmellList *[]bs_domain.BadSmellModel) { + if len(method.Parameters) > BS_LONG_PARAS_LENGTH { + paramsJson, _ := json.Marshal(method.Parameters) + str := string(paramsJson[:]) + longParams := bs_domain.BadSmellModel{File: node.FilePath, Line: strconv.Itoa(method.Position.StartLine), Bs: SMELL_LONG_PARAMETER_LIST, Description: str, Size: len(method.Parameters)} + *badSmellList = append(*badSmellList, longParams) + } +} diff --git a/core/domain/call_graph/call_graph.go b/pkg/application/call/call_graph.go similarity index 55% rename from core/domain/call_graph/call_graph.go rename to pkg/application/call/call_graph.go index d7a3b4b4040385f573665828bfe26c934ca6a012..b60a3e08445f6ec98ffde5b9c0155da22873491e 100644 --- a/core/domain/call_graph/call_graph.go +++ b/pkg/application/call/call_graph.go @@ -1,8 +1,10 @@ -package call_graph +package call import ( - "github.com/phodal/coca/core/adapter/api" - "github.com/phodal/coca/core/models" + "github.com/phodal/coca/pkg/application/rcall" + apidomain2 "github.com/phodal/coca/pkg/domain/api_domain" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/jpackage" "strings" ) @@ -10,12 +12,21 @@ type CallGraph struct { } func NewCallGraph() CallGraph { - return *&CallGraph{} + return CallGraph{} } -func (c CallGraph) Analysis(funcName string, clzs []models.JClassNode) string { +func (c CallGraph) Analysis(funcName string, clzs []core_domain.CodeDataStruct, lookup bool) string { methodMap := BuildMethodMap(clzs) chain := BuildCallChain(funcName, methodMap, nil) + + if lookup { + var projectMethodMap = rcall.BuildProjectMethodMap(clzs) + rcallMap := rcall.BuildRCallMethodMap(clzs, projectMethodMap) + graph := rcall.NewRCallGraph() + rCallChain := graph.BuildRCallChain(funcName, rcallMap) + chain = chain + rCallChain + } + dotContent := ToGraphviz(chain) return dotContent } @@ -24,6 +35,7 @@ func (c CallGraph) Analysis(funcName string, clzs []models.JClassNode) string { func ToGraphviz(chain string) string { //rankdir = LR; var result = "digraph G {\n" + result += "rankdir = LR;\n" result = result + chain result = result + "}\n" return result @@ -40,8 +52,8 @@ func BuildCallChain(funcName string, methodMap map[string][]string, diMap map[st if len(methodMap[funcName]) > 0 { var arrayResult = "" for _, child := range methodMap[funcName] { - if _, ok := diMap[getClz(child)]; ok { - child = diMap[getClz(child)] + "." + getMethodName(child) + if _, ok := diMap[jpackage.GetClassName(child)]; ok { + child = diMap[jpackage.GetClassName(child)] + "." + jpackage.GetMethodName(child) } if len(methodMap[child]) > 0 { arrayResult = arrayResult + BuildCallChain(child, methodMap, diMap) @@ -55,34 +67,24 @@ func BuildCallChain(funcName string, methodMap map[string][]string, diMap map[st return "\n" } -func getClz(child string) string { - split := strings.Split(child, ".") - return strings.Join(split[:len(split)-1], ".") -} - -func getMethodName(child string) string { - split := strings.Split(child, ".") - return strings.Join(split[len(split)-1:], ".") -} - -func (c CallGraph) AnalysisByFiles(restApis []api.RestApi, deps []models.JClassNode, diMap map[string]string) (string, []CallApiCount) { +func (c CallGraph) AnalysisByFiles(restApis []apidomain2.RestAPI, deps []core_domain.CodeDataStruct, diMap map[string]string) (string, []apidomain2.CallAPI) { methodMap := BuildMethodMap(deps) - var apiCallSCounts []CallApiCount + var apiCallSCounts []apidomain2.CallAPI results := "digraph G { \n" for _, restApi := range restApis { - caller := restApi.PackageName + "." + restApi.ClassName + "." + restApi.MethodName + caller := restApi.BuildFullMethodPath() loopCount = 0 chain := "\"" + restApi.HttpMethod + " " + restApi.Uri + "\" -> \"" + escapeStr(caller) + "\";\n" apiCallChain := BuildCallChain(caller, methodMap, diMap) chain = chain + apiCallChain - count := &CallApiCount{ - HttpMethod: restApi.HttpMethod, + count := &apidomain2.CallAPI{ + HTTPMethod: restApi.HttpMethod, Caller: caller, - Uri: restApi.Uri, + URI: restApi.Uri, Size: len(strings.Split(apiCallChain, " -> ")), } apiCallSCounts = append(apiCallSCounts, *count) @@ -97,18 +99,12 @@ func escapeStr(caller string) string { return strings.ReplaceAll(caller, "\"", "\\\"") } -func BuildMethodMap(clzs []models.JClassNode) map[string][]string { +func BuildMethodMap(clzs []core_domain.CodeDataStruct) map[string][]string { var methodMap = make(map[string][]string) for _, clz := range clzs { - for _, method := range clz.Methods { - var methodName = clz.Package + "." + clz.Class + "." + method.Name - var calls []string - for _, call := range method.MethodCalls { - if call.Class != "" { - calls = append(calls, call.Package+"."+call.Class+"."+call.MethodName) - } - } - methodMap[methodName] = calls + for _, method := range clz.Functions { + methodName := method.BuildFullMethodName(clz) + methodMap[methodName] = method.GetAllCallString() } } diff --git a/pkg/application/call/call_graph_test.go b/pkg/application/call/call_graph_test.go new file mode 100644 index 0000000000000000000000000000000000000000..acb81088fe5cf67ef68325c72d65d63fec633ebf --- /dev/null +++ b/pkg/application/call/call_graph_test.go @@ -0,0 +1,109 @@ +package call_test + +import ( + "encoding/json" + . "github.com/onsi/gomega" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cocatest/testhelper" + "github.com/phodal/coca/pkg/application/api" + "github.com/phodal/coca/pkg/application/call" + api_domain2 "github.com/phodal/coca/pkg/domain/api_domain" + "github.com/phodal/coca/pkg/domain/core_domain" + "path/filepath" + "testing" +) + +func Test_ShouldBuildSuccessDataFromJson(t *testing.T) { + g := NewGomegaWithT(t) + + var parsedDeps []core_domain.CodeDataStruct + analyser := call.NewCallGraph() + codePath := "../../../_fixtures/call/call_api_test.json" + codePath = filepath.FromSlash(codePath) + + file := cmd_util.ReadFile(codePath) + _ = json.Unmarshal(file, &parsedDeps) + + dotContent := analyser.Analysis("com.phodal.pholedge.book.BookController.createBook", parsedDeps, false) + + g.Expect(dotContent).To(Equal(`digraph G { +rankdir = LR; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.BookFactory.create"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.command.CreateBookCommand.getIsbn"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.command.CreateBookCommand.getName"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.BookRepository.save"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.Book.getId"; +"com.phodal.pholedge.book.BookController.createBook" -> "com.phodal.pholedge.book.BookService.createBook"; +} +`)) + +} + +func Test_ShouldBuildSuccessDataFromSourceData(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/grammar/java/examples/api" + callNodes, identifiersMap, identifiers := testhelper.BuildAnalysisDeps(codePath) + + diMap := core_domain.BuildDIMap(identifiers, identifiersMap) + app := new(api.JavaApiApp) + restApis := app.AnalysisPath(codePath, callNodes, identifiersMap, diMap) + + analyser := call.NewCallGraph() + dotContent, apis := analyser.AnalysisByFiles(restApis, callNodes, diMap) + + api_domain2.SortAPIs(apis) + g.Expect(len(apis)).To(Equal(4)) + g.Expect(apis[0].Size).To(Equal(4)) + g.Expect(apis[1].Size).To(Equal(7)) + g.Expect(apis[2].Size).To(Equal(12)) + g.Expect(apis[3].Size).To(Equal(16)) + + g.Expect(dotContent).To(Equal(`digraph G { + +"POST /books" -> "com.phodal.pholedge.book.BookController.createBook"; +"com.phodal.pholedge.book.BookFactory.create" -> "com.phodal.pholedge.core.IdGenerator.generate"; +"com.phodal.pholedge.book.model.Book.create" -> "com.phodal.pholedge.book.model.Book.builder"; +"com.phodal.pholedge.book.model.Book.create" -> "com.phodal.pholedge.book.model.Book.id"; +"com.phodal.pholedge.book.model.Book.create" -> "com.phodal.pholedge.book.model.Book.isbn"; +"com.phodal.pholedge.book.model.Book.create" -> "com.phodal.pholedge.book.model.Book.name"; +"com.phodal.pholedge.book.model.Book.create" -> "com.phodal.pholedge.book.model.Book.createdAt"; +"com.phodal.pholedge.book.model.Book.create" -> "com.phodal.pholedge.book.model.Book.build"; +"com.phodal.pholedge.book.BookFactory.create" -> "com.phodal.pholedge.book.model.Book.create"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.BookFactory.create"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.command.CreateBookCommand.getIsbn"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.command.CreateBookCommand.getName"; +"com.phodal.pholedge.book.BookRepository.save" -> "com.phodal.pholedge.book.model.this.bookMapper.doSave"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.BookRepository.save"; +"com.phodal.pholedge.book.BookService.createBook" -> "com.phodal.pholedge.book.model.Book.getId"; +"com.phodal.pholedge.book.BookController.createBook" -> "com.phodal.pholedge.book.BookService.createBook"; + +"PUT /books/{id}" -> "com.phodal.pholedge.book.BookController.updateBook"; +"com.phodal.pholedge.book.BookRepository.byId" -> "com.phodal.pholedge.book.model.this.bookMapper.byId"; +"com.phodal.pholedge.book.BookRepository.byId" -> "com.phodal.pholedge.core.exception.NotFoundException"; +"com.phodal.pholedge.book.BookService.updateBook" -> "com.phodal.pholedge.book.BookRepository.byId"; +"com.phodal.pholedge.book.BookService.updateBook" -> "com.phodal.pholedge.book.model.Book.save"; +"com.phodal.pholedge.book.BookService.updateBook" -> "com.phodal.pholedge.book.model.command.UpdateBookCommand.getIsbn"; +"com.phodal.pholedge.book.BookService.updateBook" -> "com.phodal.pholedge.book.model.command.UpdateBookCommand.getName"; +"com.phodal.pholedge.book.BookRepository.save" -> "com.phodal.pholedge.book.model.this.bookMapper.doSave"; +"com.phodal.pholedge.book.BookService.updateBook" -> "com.phodal.pholedge.book.BookRepository.save"; +"com.phodal.pholedge.book.model.Book.toRepresentation" -> "com.phodal.pholedge.book.model.BookRepresentaion"; +"com.phodal.pholedge.book.BookService.updateBook" -> "com.phodal.pholedge.book.model.Book.toRepresentation"; +"com.phodal.pholedge.book.BookController.updateBook" -> "com.phodal.pholedge.book.BookService.updateBook"; + +"GET /books/" -> "com.phodal.pholedge.book.BookController.getBookList"; +"com.phodal.pholedge.book.BookRepository.list" -> "com.phodal.pholedge.book.model.this.bookMapper.list"; +"com.phodal.pholedge.book.BookService.getBooksLists" -> "com.phodal.pholedge.book.BookRepository.list"; +"com.phodal.pholedge.book.BookController.getBookList" -> "com.phodal.pholedge.book.BookService.getBooksLists"; + +"GET /books/{id}" -> "com.phodal.pholedge.book.BookController.getBookById"; +"com.phodal.pholedge.book.BookRepository.byId" -> "com.phodal.pholedge.book.model.this.bookMapper.byId"; +"com.phodal.pholedge.book.BookRepository.byId" -> "com.phodal.pholedge.core.exception.NotFoundException"; +"com.phodal.pholedge.book.BookService.getBookById" -> "com.phodal.pholedge.book.BookRepository.byId"; +"com.phodal.pholedge.book.model.Book.toRepresentation" -> "com.phodal.pholedge.book.model.BookRepresentaion"; +"com.phodal.pholedge.book.BookService.getBookById" -> "com.phodal.pholedge.book.model.Book.toRepresentation"; +"com.phodal.pholedge.book.BookController.getBookById" -> "com.phodal.pholedge.book.BookService.getBookById"; +} +`)) + +} diff --git a/core/domain/call_graph/stop_words/languages/en.go b/pkg/application/call/stop_words/languages/en.go similarity index 100% rename from core/domain/call_graph/stop_words/languages/en.go rename to pkg/application/call/stop_words/languages/en.go diff --git a/pkg/application/cloc/cloc_app.go b/pkg/application/cloc/cloc_app.go new file mode 100644 index 0000000000000000000000000000000000000000..2ae6d7c72dece8eec86c7c6e0859d29823121a63 --- /dev/null +++ b/pkg/application/cloc/cloc_app.go @@ -0,0 +1,74 @@ +package cloc + +import ( + "encoding/json" + "fmt" + "github.com/boyter/scc/processor" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cmd/config" + "github.com/phodal/coca/pkg/domain/cloc" + "io/ioutil" + "os" + "sort" +) + +func ConvertToCsv(outputFiles []string, keys []string) [][]string { + var basemap = make(map[string]processor.LanguageSummary) + for _, key := range keys { + basemap[key] = processor.LanguageSummary{} + } + + var languageMap = make(map[string]map[string]processor.LanguageSummary) + for _, filePath := range outputFiles { + cloc.BuildLanguageMap(languageMap, keys, filePath) + } + + deb, _ := json.Marshal(languageMap) + cmd_util.WriteToCocaFile("debug_cloc.json", string(deb)) + + csvData := cloc.BuildClocCsvData(languageMap, keys) + return csvData +} + +func BuildBaseKey(baseDir string) []string { + contents, _ := ioutil.ReadFile(baseDir) + var languages []processor.LanguageSummary + err := json.Unmarshal(contents, &languages) + if err != nil { + fmt.Println("Error parsing JSON: ", err) + } + + var keys []string + for _, data := range languages { + keys = append(keys, data.Name) + } + + return keys +} + +func CreateClocDir() error { + os.Mkdir(config.CocaConfig.ReporterPath, os.ModePerm) + return os.Mkdir(config.CocaConfig.ReporterPath+"/cloc/", os.ModePerm) +} + +func IsIgnoreDir(baseName string) bool { + dirs := []string{".git", ".svn", ".hg", ".idea", "coca_reporter"} + for _, dir := range dirs { + if dir == baseName { + return true + } + } + return false +} + +func SortLangeByCode(languageSummaries []processor.LanguageSummary) { + for _, langSummary := range languageSummaries { + files := langSummary.Files + sort.Slice(files, func(i, j int) bool { + return files[i].Code > files[j].Code + }) + + langSummary.Files = files + } +} + diff --git a/core/domain/concept/concept_analyser.go b/pkg/application/concept/concept_analyser.go similarity index 51% rename from core/domain/concept/concept_analyser.go rename to pkg/application/concept/concept_analyser.go index 73761df54e0d18b2a90907f54e2cbc1432d4e2cc..b5d43e6d0a3ff591cb6c737bd0febc4cb8ae0009 100644 --- a/core/domain/concept/concept_analyser.go +++ b/pkg/application/concept/concept_analyser.go @@ -1,49 +1,45 @@ package concept import ( - languages2 "github.com/phodal/coca/core/domain/call_graph/stop_words/languages" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + languages2 "github.com/phodal/coca/pkg/application/call/stop_words/languages" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/constants" + "github.com/phodal/coca/pkg/infrastructure/string_helper" ) type ConceptAnalyser struct { } func NewConceptAnalyser() ConceptAnalyser { - return *&ConceptAnalyser{} + return ConceptAnalyser{} } -func (c ConceptAnalyser) run() { - -} - -func (c ConceptAnalyser) Analysis(clzs *[]models.JClassNode) support.PairList { +func (c ConceptAnalyser) Analysis(clzs *[]core_domain.CodeDataStruct) string_helper.PairList { return buildMethodsFromDeps(*clzs) } -func buildMethodsFromDeps(clzs []models.JClassNode) support.PairList { +func buildMethodsFromDeps(clzs []core_domain.CodeDataStruct) string_helper.PairList { var methodsName []string var methodStr string for _, clz := range clzs { - for _, method := range clz.Methods { + for _, method := range clz.Functions { methodName := method.Name methodsName = append(methodsName, methodName) methodStr = methodStr + " " + methodName } } - words := SegmentConceptCamelcase(methodsName) - + words := SegmentCamelcase(methodsName) words = removeNormalWords(words) - wordCounts := support.RankByWordCount(words) + wordCounts := string_helper.SortWord(words) return wordCounts } func removeNormalWords(words map[string]int) map[string]int { var newWords = words var stopwords = languages2.ENGLISH_STOP_WORDS - stopwords = append(stopwords, support.TechStopWords...) + stopwords = append(stopwords, constants.TechStopWords...) for _, normalWord := range stopwords { if newWords[normalWord] > 0 { delete(newWords, normalWord) diff --git a/core/domain/concept/concept_analyser_test.go b/pkg/application/concept/concept_analyser_test.go similarity index 59% rename from core/domain/concept/concept_analyser_test.go rename to pkg/application/concept/concept_analyser_test.go index 7c34a48b74c7a51e7b28c45c95baba061c7cc671..2ecde6d1ad6d1f5db07ac3417bb640ad14223bea 100644 --- a/core/domain/concept/concept_analyser_test.go +++ b/pkg/application/concept/concept_analyser_test.go @@ -2,8 +2,8 @@ package concept import ( "encoding/json" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/domain/core_domain" "log" "path/filepath" "testing" @@ -14,12 +14,12 @@ import ( func TestConceptAnalyser_Analysis(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct analyser := NewConceptAnalyser() - codePath := "../../../_fixtures/call_api_test.json" + codePath := "../../../_fixtures/call/call_api_test.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) if file == nil { log.Fatal("lost file") } @@ -28,5 +28,5 @@ func TestConceptAnalyser_Analysis(t *testing.T) { counts := analyser.Analysis(&parsedDeps) - g.Expect(counts.Len()).To(Equal(4)) -} \ No newline at end of file + g.Expect(len(counts)).To(Equal(4)) +} diff --git a/core/domain/concept/concept_segmenter.go b/pkg/application/concept/concept_segmenter.go similarity index 93% rename from core/domain/concept/concept_segmenter.go rename to pkg/application/concept/concept_segmenter.go index 03d8e2d69d821bf1688ced867793ef7ecb50be49..66bd08265561285def0899f817364e09a81e47fe 100644 --- a/core/domain/concept/concept_segmenter.go +++ b/pkg/application/concept/concept_segmenter.go @@ -11,7 +11,7 @@ type ConceptSegmenter struct { var strMap map[string]int -func SegmentConceptCamelcase(methodsName []string) map[string]int { +func SegmentCamelcase(methodsName []string) map[string]int { strMap = make(map[string]int) for _, name := range methodsName { // get, set diff --git a/core/domain/count/count_app.go b/pkg/application/count/count_app.go similarity index 40% rename from core/domain/count/count_app.go rename to pkg/application/count/count_app.go index 1ef5dc3fb60a71592ffd65701b87d074f1e3694c..22e9fdfc5ec8e1d9cb09bdfe5ee8ead4664de799 100644 --- a/core/domain/count/count_app.go +++ b/pkg/application/count/count_app.go @@ -1,22 +1,22 @@ package count -import "github.com/phodal/coca/core/models" +import ( + "github.com/phodal/coca/pkg/domain/core_domain" +) -func BuildCallMap(parserDeps []models.JClassNode) map[string]int { - var projectMethods = make(map[string]bool) +func BuildCallMap(parserDeps []core_domain.CodeDataStruct) map[string]int { + var projectMethods = make(map[string]string) for _, clz := range parserDeps { - for _, method := range clz.Methods { - projectMethods[clz.Package+"."+clz.Class+"."+method.Name] = true - } + clz.BuildStringMethodMap(projectMethods) } // TODO: support identify data class var callMap = make(map[string]int) for _, clz := range parserDeps { - for _, method := range clz.Methods { - for _, call := range method.MethodCalls { - callMethod := call.Package + "." + call.Class + "." + call.MethodName - if projectMethods[callMethod] { + for _, method := range clz.Functions { + for _, call := range method.FunctionCalls { + callMethod := call.BuildFullMethodName() + if _, ok := projectMethods[callMethod]; ok { if callMap[callMethod] == 0 { callMap[callMethod] = 1 } else { @@ -29,3 +29,4 @@ func BuildCallMap(parserDeps []models.JClassNode) map[string]int { return callMap } + diff --git a/core/domain/count/count_app_test.go b/pkg/application/count/count_app_test.go similarity index 78% rename from core/domain/count/count_app_test.go rename to pkg/application/count/count_app_test.go index 13daa0f29dec54c3e34613ad05c399dbf861caf4..294054c43272c9463314fb0be4baffba71093e42 100644 --- a/core/domain/count/count_app_test.go +++ b/pkg/application/count/count_app_test.go @@ -3,18 +3,18 @@ package count import ( "encoding/json" . "github.com/onsi/gomega" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/domain/core_domain" "path/filepath" "testing" ) func TestBuildCallMap(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct codePath := "../../../_fixtures/count/call.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) _ = json.Unmarshal(file, &parsedDeps) callMap := BuildCallMap(parsedDeps) diff --git a/pkg/application/deps/dep_app.go b/pkg/application/deps/dep_app.go new file mode 100644 index 0000000000000000000000000000000000000000..bc6eeab2f5bd4f5f1379e7b7111f2bd985cead06 --- /dev/null +++ b/pkg/application/deps/dep_app.go @@ -0,0 +1,65 @@ +package deps + +import ( + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/domain/core_domain" + "path/filepath" + "strings" +) + +type DepAnalysisApp struct { +} + +func NewDepApp() *DepAnalysisApp { + return &DepAnalysisApp{} +} + +func (d *DepAnalysisApp) BuildImportMap(deps []core_domain.CodeDataStruct) map[string]core_domain.CodeImport { + var impMap = make(map[string]core_domain.CodeImport) + for _, clz := range deps { + for _, imp := range clz.Imports { + impMap[imp.Source] = imp + } + } + + return impMap +} + +func (d *DepAnalysisApp) AnalysisPath(path string, nodes []core_domain.CodeDataStruct) []core_domain.CodeDependency { + path, _ = filepath.Abs(path) + pomXmls := cocafile.GetFilesWithFilter(path, cocafile.PomXmlFilter) + gradleFiles := cocafile.GetFilesWithFilter(path, cocafile.BuildGradleFilter) + + var mavenDeps []core_domain.CodeDependency = nil + for _, pomFile := range pomXmls { + currentMavenDeps := AnalysisMaven(pomFile) + mavenDeps = append(mavenDeps, currentMavenDeps...) + } + for _, gradleFile := range gradleFiles { + dependencies := AnalysisGradleFile(gradleFile) + mavenDeps = append(mavenDeps, dependencies...) + } + + importMap := d.BuildImportMap(nodes) + + var needRemoveMap = make(map[int]int) + for depIndex, dep := range mavenDeps { + for key := range importMap { + if strings.Contains(key, dep.GroupId) { + needRemoveMap[depIndex] = depIndex + continue + } + } + } + + var results []core_domain.CodeDependency = nil + for index, dep := range mavenDeps { + if _, ok := needRemoveMap[index]; !ok { + results = append(results, dep) + } + } + + return results +} + +var DepApp DepAnalysisApp // export for Plugins \ No newline at end of file diff --git a/pkg/application/deps/dep_app_test.go b/pkg/application/deps/dep_app_test.go new file mode 100644 index 0000000000000000000000000000000000000000..a1dde0ca7e0141395d8ca60f4a7b59538482c6db --- /dev/null +++ b/pkg/application/deps/dep_app_test.go @@ -0,0 +1,98 @@ +package deps + +import ( + . "github.com/onsi/gomega" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cocatest/testhelper" + "testing" +) + +func Test_ShouldReturnGradleDep(t *testing.T) { + g := NewGomegaWithT(t) + + pluginsStr := `dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' + developmentOnly 'org.springframework.boot:spring-boot-devtools' +}` + + results := AnalysisGradleString(pluginsStr) + + g.Expect(len(results)).To(Equal(2)) + g.Expect(results[0].ArtifactId).To(Equal("spring-boot-starter-web")) +} + +func Test_ShouldReturnCorrectGradleDepsFroFile(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/deps/gradle/build.gradle" + bytes := cmd_util.ReadFile(codePath) + + mavenDeps := AnalysisGradleString(string(bytes)) + + g.Expect(len(mavenDeps)).To(Equal(14)) +} + +func Test_ShouldHandleExclude(t *testing.T) { + g := NewGomegaWithT(t) + + pluginsStr := `dependencies { + testImplementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + exclude module: 'junit' + } +}` + + results := AnalysisGradleString(pluginsStr) + + g.Expect(len(results)).To(Equal(1)) + g.Expect(results[0].ArtifactId).To(Equal("spring-boot-starter-test")) + g.Expect(results[0].GroupId).To(Equal("org.springframework.boot")) +} + +func Test_ShouldReturnCorrectMavenDeps(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/deps/maven/pom.xml" + mavenDeps := AnalysisMaven(codePath) + + g.Expect(len(mavenDeps)).To(Equal(12)) +} + +func Test_ShouldReturnNilWhenErrorPath(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/god_know_it" + mavenDeps := AnalysisMaven(codePath) + + g.Expect(len(mavenDeps)).To(Equal(0)) +} + +func Test_ShouldCountDeps_WhenHadClassNodes(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/grammar/java/examples/api/" + classNodes, _, _ := testhelper.BuildAnalysisDeps(codePath) + + depApp := NewDepApp() + importMap := depApp.BuildImportMap(classNodes) + + g.Expect(len(importMap)).To(Equal(25)) +} + +func Test_ListUnusedImportForOneGradleFile(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/deps/maven_sample/" + classNodes, _, _ := testhelper.BuildAnalysisDeps(codePath) + + mavenDeps := AnalysisMaven(codePath + "pom.xml") + g.Expect(len(mavenDeps)).To(Equal(6)) + + depApp := NewDepApp() + deps := depApp.AnalysisPath(codePath, classNodes) + + g.Expect(len(deps)).To(Equal(3)) + g.Expect(deps[0].GroupId).To(Equal("org.flywaydb")) + g.Expect(deps[1].GroupId).To(Equal("mysql")) + g.Expect(deps[2].GroupId).To(Equal("org.springframework.cloud")) +} diff --git a/pkg/application/deps/gradle_analysis.go b/pkg/application/deps/gradle_analysis.go new file mode 100644 index 0000000000000000000000000000000000000000..e682defe6493c309631deeb57d9481da6f7c7a48 --- /dev/null +++ b/pkg/application/deps/gradle_analysis.go @@ -0,0 +1,22 @@ +package deps + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_groovy" +) + +func AnalysisGradleFile(path string) []core_domain.CodeDependency { + bytes := cmd_util.ReadFile(path) + return AnalysisGradleString(string(bytes)) +} + +func AnalysisGradleString(str string) []core_domain.CodeDependency { + parser := ast_groovy.ProcessGroovyString(str) + context := parser.CompilationUnit() + listener := ast_groovy.NewGroovyIdentListener() + antlr.NewParseTreeWalker().Walk(listener, context) + + return listener.GetDepsInfo() +} diff --git a/pkg/application/deps/maven_analysis.go b/pkg/application/deps/maven_analysis.go new file mode 100644 index 0000000000000000000000000000000000000000..2911e5c2a931ef3845dc70541b306d617132918f --- /dev/null +++ b/pkg/application/deps/maven_analysis.go @@ -0,0 +1,53 @@ +package deps + +import ( + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/xmlparse" + "os" +) + +func AnalysisMaven(xmlPath string) []core_domain.CodeDependency { + xmlFile, _ := os.Open(xmlPath) + parseXml := xmlparse.ParseXML(xmlFile) + for _, element := range parseXml.Elements { + val := element.Val.(xmlparse.XMLNode) + if val.Name == "dependencies" { + return BuildDeps(val) + } + } + return nil +} + +func BuildDeps(val xmlparse.XMLNode) []core_domain.CodeDependency { + var deps []core_domain.CodeDependency = nil + for _, depElement := range val.Elements { + depNode := depElement.Val.(xmlparse.XMLNode) + dependency := core_domain.NewCodeDependency("", "") + + for _, depValue := range depNode.Elements { + node := depValue.Val.(xmlparse.XMLNode) + if node.Name == "groupId" { + for _, textNode := range node.Elements { + dependency.GroupId = textNode.Val.(string) + } + } + + if node.Name == "artifactId" { + for _, textNode := range node.Elements { + dependency.ArtifactId = textNode.Val.(string) + } + } + + if node.Name == "scope" { + for _, textNode := range node.Elements { + dependency.Scope = textNode.Val.(string) + } + } + } + + deps = append(deps, *dependency) + } + + return deps +} + diff --git a/core/domain/evaluate/README.md b/pkg/application/evaluate/README.md similarity index 100% rename from core/domain/evaluate/README.md rename to pkg/application/evaluate/README.md diff --git a/core/domain/evaluate/analyser.go b/pkg/application/evaluate/analyser.go similarity index 61% rename from core/domain/evaluate/analyser.go rename to pkg/application/evaluate/analyser.go index 38be46c49627e3eacfa08ae39b867c45ef69d88e..730db475f27f9f9968893f65b1c01c718293ae16 100644 --- a/core/domain/evaluate/analyser.go +++ b/pkg/application/evaluate/analyser.go @@ -1,61 +1,71 @@ package evaluate import ( - "github.com/phodal/coca/core/domain/evaluate/evaluator" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/pkg/application/evaluate/evaluator" + "github.com/phodal/coca/pkg/domain/core_domain" "gonum.org/v1/gonum/stat" - "strings" ) type Analyser struct { } func NewEvaluateAnalyser() Analyser { - return *&Analyser{} + return Analyser{} } -func (a Analyser) Analysis(classNodes []models.JClassNode, identifiers []models.JIdentifier) evaluator.EvaluateModel { - var servicesNode []models.JClassNode = nil +func (a Analyser) Analysis(classNodes []core_domain.CodeDataStruct, identifiers []core_domain.CodeDataStruct) evaluator.EvaluateModel { + var servicesNode []core_domain.CodeDataStruct = nil var evaluation Evaluation var result = evaluator.NewEvaluateModel() - var nodeMap = make(map[string]models.JClassNode) + var nodeMap = make(map[string]core_domain.CodeDataStruct) for _, node := range classNodes { - nodeMap[node.Class] = node + nodeMap[node.NodeName] = node - if strings.Contains(strings.ToLower(node.Class), "util") || strings.Contains(strings.ToLower(node.Class), "utils") { + if node.IsUtilClass() { result.Summary.UtilsCount++ evaluation = Evaluation{evaluator.Util{}} evaluation.Evaluate(&result, node) } - if strings.Contains(strings.ToLower(node.Class), "service") { + if node.IsServiceClass() { servicesNode = append(servicesNode, node) } else { evaluation = Evaluation{evaluator.Empty{}} } } + SummaryMethodIdentifier(identifiers, &result) + + evaluation = Evaluation{evaluator.Service{}} + evaluation.EvaluateList(&result, servicesNode, nodeMap, identifiers) + + nullableEva := Evaluation{evaluator.NullPointException{}} + nullableEva.EvaluateList(&result, servicesNode, nodeMap, identifiers) + + return result +} + +func SummaryMethodIdentifier(identifiers []core_domain.CodeDataStruct, result *evaluator.EvaluateModel) { var methodLengthArray []float64 var methodCountArray []float64 for _, ident := range identifiers { result.Summary.ClassCount++ - methodCountArray = append(methodCountArray, float64(len(ident.Methods))) + methodCountArray = append(methodCountArray, float64(len(ident.Functions))) - for _, method := range ident.Methods { + for _, method := range ident.Functions { result.Summary.MethodCount++ - if support.Contains(method.Modifiers, "static") { + if method.IsStatic() { result.Summary.StaticMethodCount++ } - if !strings.HasPrefix(method.Name, "set") && !strings.HasPrefix(method.Name, "get") { + if method.IsGetterSetter() { result.Summary.NormalMethodCount++ - methodLength := method.StopLine - method.StartLine + 1 + methodLength := method.Position.StopLine - method.Position.StartLine + 1 result.Summary.TotalMethodLength = result.Summary.TotalMethodLength + methodLength methodLengthArray = append(methodLengthArray, float64(methodLength)) @@ -65,12 +75,4 @@ func (a Analyser) Analysis(classNodes []models.JClassNode, identifiers []models. result.Summary.MethodLengthStdDeviation = stat.StdDev(methodLengthArray, nil) result.Summary.MethodNumStdDeviation = stat.StdDev(methodCountArray, nil) - - evaluation = Evaluation{evaluator.Service{}} - evaluation.EvaluateList(&result, servicesNode, nodeMap, identifiers) - - nullableEva := Evaluation{evaluator.NullPointException{}} - nullableEva.EvaluateList(&result, servicesNode, nodeMap, identifiers) - - return result } diff --git a/core/domain/evaluate/analyser_test.go b/pkg/application/evaluate/analyser_test.go similarity index 65% rename from core/domain/evaluate/analyser_test.go rename to pkg/application/evaluate/analyser_test.go index 9077167a9d324c4e43031fa1ddd2768441effa17..b50aa63504760eedace84a9b3ca12f11fdeb94bb 100644 --- a/core/domain/evaluate/analyser_test.go +++ b/pkg/application/evaluate/analyser_test.go @@ -3,10 +3,10 @@ package evaluate import ( "encoding/json" . "github.com/onsi/gomega" - "github.com/phodal/coca/core/adapter/call" - "github.com/phodal/coca/core/adapter/identifier" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cocatest/testhelper" + "github.com/phodal/coca/pkg/application/evaluate/evaluator" + "github.com/phodal/coca/pkg/domain/core_domain" "path/filepath" "testing" ) @@ -14,11 +14,11 @@ import ( func TestAnalyser_Analysis(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct analyser := NewEvaluateAnalyser() codePath := "../../../_fixtures/evaluate/service.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) _ = json.Unmarshal(file, &parsedDeps) analyser.Analysis(parsedDeps, nil) @@ -29,11 +29,11 @@ func TestAnalyser_Analysis(t *testing.T) { func Test_Service_LifeCycle(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct analyser := NewEvaluateAnalyser() codePath := "../../../_fixtures/evaluate/service_lifecycle.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) _ = json.Unmarshal(file, &parsedDeps) result := analyser.Analysis(parsedDeps, nil) @@ -46,11 +46,11 @@ func Test_Service_LifeCycle(t *testing.T) { func Test_Service_Same_Return_Type(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct analyser := NewEvaluateAnalyser() codePath := "../../../_fixtures/evaluate/service_same_return_type.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) _ = json.Unmarshal(file, &parsedDeps) results := analyser.Analysis(parsedDeps, nil) @@ -61,11 +61,11 @@ func Test_Service_Same_Return_Type(t *testing.T) { func Test_Long_Parameters(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct analyser := NewEvaluateAnalyser() codePath := "../../../_fixtures/evaluate/service_long_parameters.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) _ = json.Unmarshal(file, &parsedDeps) result := analyser.Analysis(parsedDeps, nil) @@ -80,19 +80,33 @@ func TestNullPointException(t *testing.T) { g := NewGomegaWithT(t) codePath := "../../../_fixtures/evaluate/null" - codePath = filepath.FromSlash(codePath) - identifierApp := new(identifier.JavaIdentifierApp) - identifiers := identifierApp.AnalysisPath(codePath) - var classes []string = nil - for _, node := range identifiers { - classes = append(classes, node.Package+"."+node.ClassName) - } + result := buildEvaluateResult(codePath) + + g.Expect(len(result.Nullable.Items)).To(Equal(2)) +} + +func TestStaticUtils(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/evaluate/utils" + result := buildEvaluateResult(codePath) + + g.Expect(result.Summary.UtilsCount).To(Equal(1)) +} + +func Test_CheckFornull(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/evaluate/checkfornull" + result := buildEvaluateResult(codePath) - callApp := call.NewJavaCallApp() - callNodes := callApp.AnalysisPath(codePath, classes, identifiers) + g.Expect(len(result.Nullable.Items)).To(Equal(1)) +} + +func buildEvaluateResult(codePath string) evaluator.EvaluateModel { + callNodes, _, identifiers := testhelper.BuildAnalysisDeps(codePath) analyser := NewEvaluateAnalyser() result := analyser.Analysis(callNodes, identifiers) - - g.Expect(len(result.Nullable.Items)).To(Equal(2)) + return result } diff --git a/core/domain/evaluate/evaluate.go b/pkg/application/evaluate/evaluate.go similarity index 39% rename from core/domain/evaluate/evaluate.go rename to pkg/application/evaluate/evaluate.go index 95b1459e71a56529283a08ee1a0afc3ee7bb1438..097c8f3e571cdaf90815e1d3dacf6293b13e0e18 100644 --- a/core/domain/evaluate/evaluate.go +++ b/pkg/application/evaluate/evaluate.go @@ -1,23 +1,23 @@ package evaluate import ( - "github.com/phodal/coca/core/domain/evaluate/evaluator" - "github.com/phodal/coca/core/models" + "github.com/phodal/coca/pkg/application/evaluate/evaluator" + "github.com/phodal/coca/pkg/domain/core_domain" ) type Evaluator interface { - Evaluate(result *evaluator.EvaluateModel, node models.JClassNode) - EvaluateList(evaluateModel *evaluator.EvaluateModel, nodes []models.JClassNode, nodeMap map[string]models.JClassNode, identifiers []models.JIdentifier) + Evaluate(result *evaluator.EvaluateModel, node core_domain.CodeDataStruct) + EvaluateList(evaluateModel *evaluator.EvaluateModel, nodes []core_domain.CodeDataStruct, nodeMap map[string]core_domain.CodeDataStruct, identifiers []core_domain.CodeDataStruct) } type Evaluation struct { Evaluator Evaluator } -func (o *Evaluation) Evaluate(result *evaluator.EvaluateModel, node models.JClassNode) { +func (o *Evaluation) Evaluate(result *evaluator.EvaluateModel, node core_domain.CodeDataStruct) { o.Evaluator.Evaluate(result, node) } -func (o *Evaluation) EvaluateList(evaluateModel *evaluator.EvaluateModel, nodes []models.JClassNode, nodeMap map[string]models.JClassNode, identifiers []models.JIdentifier) { +func (o *Evaluation) EvaluateList(evaluateModel *evaluator.EvaluateModel, nodes []core_domain.CodeDataStruct, nodeMap map[string]core_domain.CodeDataStruct, identifiers []core_domain.CodeDataStruct) { o.Evaluator.EvaluateList(evaluateModel, nodes, nodeMap, identifiers) } diff --git a/core/domain/evaluate/evaluator/controller.go b/pkg/application/evaluate/evaluator/controller.go similarity index 46% rename from core/domain/evaluate/evaluator/controller.go rename to pkg/application/evaluate/evaluator/controller.go index b2ec9ec83f4490d5771e2c3a06edcbc5b33a01be..f421d1e65eb2a13d87a8d533b18e194c251b49d1 100644 --- a/core/domain/evaluate/evaluator/controller.go +++ b/pkg/application/evaluate/evaluator/controller.go @@ -2,13 +2,13 @@ package evaluator import ( "fmt" - "github.com/phodal/coca/core/models" + "github.com/phodal/coca/pkg/domain/core_domain" ) type Controller struct { } -func (Controller) Evaluate(node models.JClassNode) { +func (Controller) Evaluate(node core_domain.CodeDataStruct) { fmt.Println("controller") } diff --git a/pkg/application/evaluate/evaluator/empty.go b/pkg/application/evaluate/evaluator/empty.go new file mode 100644 index 0000000000000000000000000000000000000000..04d505688691e77aa3e2598b2451cb28e8de807c --- /dev/null +++ b/pkg/application/evaluate/evaluator/empty.go @@ -0,0 +1,17 @@ +package evaluator + +import ( + "github.com/phodal/coca/pkg/domain/core_domain" +) + +type Empty struct { + +} + +func (Empty) Evaluate(*EvaluateModel, core_domain.CodeDataStruct) { + +} + +func (Empty) EvaluateList(*EvaluateModel, []core_domain.CodeDataStruct, map[string]core_domain.CodeDataStruct, []core_domain.CodeDataStruct) { + +} \ No newline at end of file diff --git a/core/domain/evaluate/evaluator/models.go b/pkg/application/evaluate/evaluator/models.go similarity index 92% rename from core/domain/evaluate/evaluator/models.go rename to pkg/application/evaluate/evaluator/models.go index 62acaabb171cb4cef8289a0fa0f607e1e2db14a5..c247139d246e6e6b05481c83240c1a1c37a90de7 100644 --- a/core/domain/evaluate/evaluator/models.go +++ b/pkg/application/evaluate/evaluator/models.go @@ -35,5 +35,5 @@ type EvaluateModel struct { } func NewEvaluateModel() EvaluateModel { - return *&EvaluateModel{Nullable: Nullable{Items: nil}} + return EvaluateModel{Nullable: Nullable{Items: nil}} } diff --git a/core/domain/evaluate/evaluator/null_exception.go b/pkg/application/evaluate/evaluator/null_exception.go similarity index 30% rename from core/domain/evaluate/evaluator/null_exception.go rename to pkg/application/evaluate/evaluator/null_exception.go index e8999d003b85a9e44406d96261f4631a49e91a60..bf1423d4e0c65720aa7b662ac158d4bcab4d25f0 100644 --- a/core/domain/evaluate/evaluator/null_exception.go +++ b/pkg/application/evaluate/evaluator/null_exception.go @@ -1,35 +1,41 @@ -package evaluator + package evaluator import ( - "github.com/phodal/coca/core/models" + "github.com/phodal/coca/pkg/domain/core_domain" ) type NullPointException struct { } -func (NullPointException) Evaluate(*EvaluateModel, models.JClassNode) { +func (NullPointException) Evaluate(*EvaluateModel, core_domain.CodeDataStruct) { } -func (n NullPointException) EvaluateList(evaluateModel *EvaluateModel, nodes []models.JClassNode, nodeMap map[string]models.JClassNode, identifiers []models.JIdentifier) { +func (n NullPointException) EvaluateList(evaluateModel *EvaluateModel, nodes []core_domain.CodeDataStruct, nodeMap map[string]core_domain.CodeDataStruct, identifiers []core_domain.CodeDataStruct) { var nullableList []string = nil + var nullableMap = make(map[string]string) for _, ident := range identifiers { - for _, method := range ident.Methods { + for _, method := range ident.Functions { + methodName := buildMethodPath(ident, method) if method.IsReturnNull { - nullableList = append(nullableList, buildMethodPath(ident, method)) + nullableMap[methodName] = methodName } else { for _, annotation := range method.Annotations { - if annotation.QualifiedName == "Nullable" { - nullableList = append(nullableList, buildMethodPath(ident, method)) + if annotation.Name == "Nullable" || annotation.Name == "CheckForNull" { + nullableMap[methodName] = methodName } } } } } + for _, value := range nullableMap { + nullableList = append(nullableList, value) + } + evaluateModel.Nullable.Items = nullableList } -func buildMethodPath(ident models.JIdentifier, method models.JMethod) string { - return ident.Package + "." + ident.ClassName + "." + method.Name +func buildMethodPath(ident core_domain.CodeDataStruct, method core_domain.CodeFunction) string { + return ident.Package + "." + ident.NodeName + "." + method.Name } diff --git a/core/domain/evaluate/evaluator/service.go b/pkg/application/evaluate/evaluator/service.go similarity index 61% rename from core/domain/evaluate/evaluator/service.go rename to pkg/application/evaluate/evaluator/service.go index 4fdf47da5d71073265bf6aaf7a11f129b506c67b..54d3ccc80bba9720e5f2ca2007485a41cbbc0533 100644 --- a/core/domain/evaluate/evaluator/service.go +++ b/pkg/application/evaluate/evaluator/service.go @@ -1,20 +1,20 @@ package evaluator import ( - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "github.com/phodal/coca/core/support/apriori" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/apriori" + "github.com/phodal/coca/pkg/infrastructure/constants" "strings" ) type Service struct { } -var serviceNodeMap map[string]models.JClassNode +var serviceNodeMap map[string]core_domain.CodeDataStruct var returnTypeMap map[string][]string -var longParameterList []models.JMethod +var longParameterList []core_domain.CodeFunction -func (s Service) EvaluateList(evaluateModel *EvaluateModel, nodes []models.JClassNode, nodeMap map[string]models.JClassNode, identifiers []models.JIdentifier) { +func (s Service) EvaluateList(evaluateModel *EvaluateModel, nodes []core_domain.CodeDataStruct, nodeMap map[string]core_domain.CodeDataStruct, identifiers []core_domain.CodeDataStruct) { serviceNodeMap = nodeMap longParameterList = nil returnTypeMap = make(map[string][]string) @@ -24,17 +24,17 @@ func (s Service) EvaluateList(evaluateModel *EvaluateModel, nodes []models.JClas } evaluateModel.ServiceSummary.ReturnTypeMap = returnTypeMap - findRelatedMethodParameter(evaluateModel, longParameterList) + findRelatedMethodParameters(evaluateModel, longParameterList) } -func findRelatedMethodParameter(model *EvaluateModel, list []models.JMethod) { +func findRelatedMethodParameters(model *EvaluateModel, list []core_domain.CodeFunction) { var dataset [][]string for _, method := range list { - var methodlist []string + var paramTypeList []string for _, param := range method.Parameters { - methodlist = append(methodlist, param.Type) + paramTypeList = append(paramTypeList, param.TypeValue) } - dataset = append(dataset, methodlist) + dataset = append(dataset, paramTypeList) } var newOptions = apriori.NewOptions(0.8, 0.8, 0, 0) @@ -49,9 +49,9 @@ func findRelatedMethodParameter(model *EvaluateModel, list []models.JMethod) { } } -func (s Service) Evaluate(result *EvaluateModel, node models.JClassNode) { +func (s Service) Evaluate(result *EvaluateModel, node core_domain.CodeDataStruct) { var methodNameArray [][]string - for _, method := range node.Methods { + for _, method := range node.Functions { methodNameArray = append(methodNameArray, SplitCamelcase(method.Name)) } @@ -64,36 +64,32 @@ func (s Service) Evaluate(result *EvaluateModel, node models.JClassNode) { } // TODO: support for same end words - if s.enableSameBehavior() { - - } + //if s.enableSameBehavior() { + // + //} if s.enableAbstractParameters() { - for _, method := range node.Methods { - if len(method.Parameters) >= 4 { + for _, method := range node.Functions { + PARAMETERR_LENGTH_LIMIT := 4 + if len(method.Parameters) >= PARAMETERR_LENGTH_LIMIT { longParameterList = append(longParameterList, method) } } } if s.enableSameReturnType() { - for _, method := range node.Methods { - if !s.isJavaType(method) { - methodType := method.Type + for _, method := range node.Functions { + if !method.IsJavaLangReturnType() { + methodType := method.ReturnType if _, ok := serviceNodeMap[methodType]; ok { - fullMethodName := node.Package + "." + node.Class + "." + method.Name - returnTypeMap[methodType] = append(returnTypeMap[methodType], fullMethodName) + returnTypeMap[methodType] = append(returnTypeMap[methodType], method.BuildFullMethodName(node)) } } } } } -func (s Service) isJavaType(method models.JMethod) bool { - return method.Type == "String" || method.Type == "int" -} - func (s Service) buildLifecycle(methodNameArray [][]string) map[string][]string { var hadLifecycle = make(map[string][]string) var nameMap = make(map[string][]string) @@ -103,7 +99,7 @@ func (s Service) buildLifecycle(methodNameArray [][]string) map[string][]string } firstWord := nameArray[0] - if !(support.IsTechStopWords(firstWord)) { + if !(IsTechStopWords(firstWord)) { nameMap[firstWord] = append(nameMap[firstWord], strings.Join(nameArray, "")) } if len(nameMap[firstWord]) > 1 { @@ -114,11 +110,17 @@ func (s Service) buildLifecycle(methodNameArray [][]string) map[string][]string return hadLifecycle } -func (s Service) enableLifecycle() bool { - return true +func IsTechStopWords(firstWord string) bool { + for _, word := range constants.TechStopWords { + if word == firstWord { + return true; + } + } + + return false; } -func (s Service) enableSameBehavior() bool { +func (s Service) enableLifecycle() bool { return true } diff --git a/core/domain/evaluate/evaluator/splitter_util.go b/pkg/application/evaluate/evaluator/splitter_util.go similarity index 100% rename from core/domain/evaluate/evaluator/splitter_util.go rename to pkg/application/evaluate/evaluator/splitter_util.go diff --git a/core/domain/evaluate/evaluator/util.go b/pkg/application/evaluate/evaluator/util.go similarity index 33% rename from core/domain/evaluate/evaluator/util.go rename to pkg/application/evaluate/evaluator/util.go index f7a0edc162b896b5e6468aabdb199ac2ea871b29..e9ca870cebcbc22530669abd9822b5f37e2a62f3 100644 --- a/core/domain/evaluate/evaluator/util.go +++ b/pkg/application/evaluate/evaluator/util.go @@ -1,16 +1,16 @@ package evaluator import ( - "github.com/phodal/coca/core/models" + "github.com/phodal/coca/pkg/domain/core_domain" ) type Util struct { } -func (Util) Evaluate(result *EvaluateModel, node models.JClassNode) { +func (Util) Evaluate(result *EvaluateModel, node core_domain.CodeDataStruct) { } -func (s Util) EvaluateList(evaluateModel *EvaluateModel, nodes []models.JClassNode, nodeMap map[string]models.JClassNode, identifiers []models.JIdentifier) { +func (s Util) EvaluateList(evaluateModel *EvaluateModel, nodes []core_domain.CodeDataStruct, nodeMap map[string]core_domain.CodeDataStruct, identifiers []core_domain.CodeDataStruct) { } diff --git a/core/domain/gitt/README.md b/pkg/application/git/README.md similarity index 96% rename from core/domain/gitt/README.md rename to pkg/application/git/README.md index af20af5270a27d46755e384f8c0f0c375b5c4537..85ddf669991d352d9946704ccb999794905025ad 100644 --- a/core/domain/gitt/README.md +++ b/pkg/application/git/README.md @@ -2,7 +2,7 @@ GitLogs ``` -git log --all --date=short --pretty="format:[%h] %aN %ad %s" --numstat --reverse +git log --all --date=short --pretty="format:[%h] %aN %ad %s" --numstat --reverse --summary ``` Delete diff --git a/core/domain/gitt/changelog.go b/pkg/application/git/changelog.go similarity index 73% rename from core/domain/gitt/changelog.go rename to pkg/application/git/changelog.go index e29f016df9f582e330d28d4033e841a00e4eef99..c879939aae41659a63f70751d8c7810e656a649b 100644 --- a/core/domain/gitt/changelog.go +++ b/pkg/application/git/changelog.go @@ -1,8 +1,9 @@ -package gitt +package git import ( "fmt" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/pkg/infrastructure/string_helper" + "io" "regexp" ) @@ -12,22 +13,21 @@ var ( // high fix // high features -// -func ShowChangeLogSummary(commits []CommitMessage) { +func ShowChangeLogSummary(commits []CommitMessage, output io.Writer) { changeMap := BuildChangeMap(commits) for key, value := range changeMap { - sortValue := support.RankByWordCount(value) + sortValue := string_helper.SortWord(value) maxSize := len(sortValue) if maxSize > 10 { maxSize = 10 } - fmt.Println(key + ":") - fmt.Println("---------------------") + fmt.Fprintf(output, "%s :\n", key) + fmt.Fprintln(output, "---------------------") for _, val := range sortValue[:maxSize] { - fmt.Println(val.Key, val.Value) + fmt.Fprintf(output, "%s, %d\n", val.Key, val.Value) } - fmt.Println("=====================") + fmt.Fprintln(output, "=====================") } } diff --git a/core/domain/gitt/changelog_test.go b/pkg/application/git/changelog_test.go similarity index 97% rename from core/domain/gitt/changelog_test.go rename to pkg/application/git/changelog_test.go index 036f82aa3db33eb50ebc268187daecce3c13aa25..22ea1c0715b6896f263215029f53719d564656d8 100644 --- a/core/domain/gitt/changelog_test.go +++ b/pkg/application/git/changelog_test.go @@ -1,4 +1,4 @@ -package gitt +package git import ( . "github.com/onsi/gomega" diff --git a/core/domain/gitt/gitt.go b/pkg/application/git/git.go similarity index 85% rename from core/domain/gitt/gitt.go rename to pkg/application/git/git.go index 6250f0d5d2c8c3b9776873dc5d9a703543eb4b14..aa6bb6ddd55e9e33ac2857b5db1438bcf8308ab6 100644 --- a/core/domain/gitt/gitt.go +++ b/pkg/application/git/git.go @@ -1,10 +1,9 @@ -package gitt +package git import ( "bytes" "encoding/json" - "fmt" - "github.com/phodal/coca/core/support/apriori" + "github.com/phodal/coca/pkg/infrastructure/apriori" "log" "sort" "strings" @@ -51,7 +50,7 @@ func GetTeamSummary(messages []CommitMessage) []TeamSummary { var sortInfos []TeamSummary for _, info := range infos { - sortInfos = append(sortInfos, *&TeamSummary{info.EntityName, len(info.Authors), len(info.Revs)}) + sortInfos = append(sortInfos, TeamSummary{info.EntityName, len(info.Authors), len(info.Revs)}) } sort.Slice(sortInfos, func(i, j int) bool { @@ -80,7 +79,7 @@ func BuildCommitMessageMap(messages []CommitMessage, infos map[string]ProjectInf revs[commitMessage.Rev] = commitMessage.Rev date, _ := time.Parse(timeFormat, commitMessage.Date) - infos[fileName] = *&ProjectInfo{fileName, authors, revs, date} + infos[fileName] = ProjectInfo{fileName, authors, revs, date} } else { infos[fileName].Authors[commitMessage.Author] = commitMessage.Author infos[fileName].Revs[commitMessage.Rev] = commitMessage.Rev @@ -133,10 +132,16 @@ type TopAuthor struct { LineCount int } -func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) []apriori.RelationRecord { +var GIT_RELATED_MAX_SIZE = 10 +var MIN_DATASET = 2 + +func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) [][]string { var dataset [][]string for _, commitMessage := range commitMessages { var set []string + if len(commitMessage.Changes) > GIT_RELATED_MAX_SIZE { + continue + } for _, change := range commitMessage.Changes { if strings.HasSuffix(change.File, ".java") && !strings.HasSuffix(change.File, "Test.java") { if strings.Contains(change.File, "core/main/java/") { @@ -148,34 +153,37 @@ func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) []apr } } - if len(set) > 2 { + if len(set) > MIN_DATASET { dataset = append(dataset, set) } } - var newOptions apriori.Options = apriori.NewOptions(0.1, 0.9, 0, 0) + var newOptions = apriori.NewOptions(0.1, 0.9, 0, 0) decoder := json.NewDecoder(bytes.NewReader(relatedConfig)) decoder.UseNumber() - error := decoder.Decode(&newOptions) - if error != nil { - log.Fatal(error) + err := decoder.Decode(&newOptions) + if err != nil { + log.Fatal(err) return nil } - fmt.Println(newOptions) - apriori := apriori.NewApriori(dataset) - result := apriori.Calculate(newOptions) + newApriori := apriori.NewApriori(dataset) + result := newApriori.Calculate(newOptions) + var availableResults [][]string = nil for _, res := range result { items := res.GetSupportRecord().GetItems() - if len(items) > 2 { - fmt.Println(items) - fmt.Println(res.GetSupportRecord().GetSupport()) + if len(items) > MIN_DATASET { + availableResults = append(availableResults, items) } } - return result + if len(availableResults) > 0 { + return availableResults + } + + return nil } func GetTopAuthors(commitMessages []CommitMessage) []TopAuthor { @@ -193,7 +201,7 @@ func GetTopAuthors(commitMessages []CommitMessage) []TopAuthor { var topAuthors []TopAuthor for _, info := range authors { - topAuthors = append(topAuthors, *&TopAuthor{info.Name, info.CommitCount, info.LineCount}) + topAuthors = append(topAuthors, TopAuthor{info.Name, info.CommitCount, info.LineCount}) } sort.Slice(topAuthors, func(i, j int) bool { diff --git a/core/domain/gitt/gitt_test.go b/pkg/application/git/git_test.go similarity index 87% rename from core/domain/gitt/gitt_test.go rename to pkg/application/git/git_test.go index 341a7e79549c6b2f3cf3da9e04bab78dfed0ea63..464e6b7cf69a1582dbed7bbcc8be056fa3f462eb 100644 --- a/core/domain/gitt/gitt_test.go +++ b/pkg/application/git/git_test.go @@ -1,4 +1,4 @@ -package gitt +package git import ( . "github.com/onsi/gomega" @@ -181,7 +181,35 @@ func TestChangeModel(t *testing.T) { g.Expect(result[0].Changes[0].File).To(Equal("adapter/call/visitor/JavaCallVisitor.go")) g.Expect(result[0].Changes[0].Mode).To(Equal("delete")) - //g.Expect(result[0].Changes[2].File).To(Equal("learn_go_suite_test.go")) - //g.Expect(result[0].Changes[2].Mode).To(Equal("create")) +} + + +func Test_ShouldReturnRelatedFiles(t *testing.T) { + g := NewGomegaWithT(t) + + result := BuildMessageByInput(` +[ef9165d] Phodal Huang 2019-12-18 refactor: extract vars +0 0 adapter/JavaCallListener.java +0 0 adapter/JavaCallListener2.java +0 0 adapter/JavaCallListener3.java +0 0 adapter/JavaCallListener5.java + +[ef9165c] Phodal Huang 2019-12-18 refactor: extract vars +0 0 adapter/JavaCallListener.java +0 0 adapter/JavaCallListener2.java +0 0 adapter/JavaCallListener3.java +0 0 adapter/JavaCallListener4.java +`) + relatedConfig := []byte(`{ + "minSupport": 0.1, + "minConfidence": 0.9, + "minLift": 0, + "maxLength": 3 +} +`) + + relatedFiles := GetRelatedFiles(result, relatedConfig) + + g.Expect(len(relatedFiles)).To(Equal(7)) } diff --git a/core/domain/gitt/log_parser.go b/pkg/application/git/log_parser.go similarity index 58% rename from core/domain/gitt/log_parser.go rename to pkg/application/git/log_parser.go index 3348358dd638ef1d1f0716d9b2ef2f79206c8afd..5858a9c172e5c992dd5e5a0e85177cb7da78f13f 100644 --- a/core/domain/gitt/log_parser.go +++ b/pkg/application/git/log_parser.go @@ -1,4 +1,4 @@ -package gitt +package git import ( "regexp" @@ -21,7 +21,7 @@ var ( changesReg = regexp.MustCompile(changes) complexMoveReg = regexp.MustCompile(complexMoveRegStr) basicMvReg = regexp.MustCompile(basicMoveRegStr) - changeModelReg = regexp.MustCompile(changeModel) + changeModeReg = regexp.MustCompile(changeModel) ) func UpdateMessageForChange(changedFile string) (string, string, string) { @@ -34,9 +34,7 @@ func UpdateMessageForChange(changedFile string) (string, string, string) { var oldLastChanged = changed[4] // TODO: support for Windows rename if changed[2] == "" { - if strings.HasPrefix(oldLastChanged, "/") { - oldLastChanged = oldLastChanged[1:] - } + oldLastChanged = strings.TrimPrefix(oldLastChanged, "/") } oldFileName = changed[1] + changed[2] + oldLastChanged @@ -47,69 +45,66 @@ func UpdateMessageForChange(changedFile string) (string, string, string) { return changedFile, oldFileName, newFileName } -var changeMap = make(map[string]string) - func ParseLog(text string) { changeModel = "" allString := revReg.FindAllString(text, -1) if len(allString) == 1 { str := "" - id := revReg.FindStringSubmatch(text) str = strings.Split(text, id[0])[1] auth := authorReg.FindStringSubmatch(str) str = strings.Split(str, auth[1])[1] dat := dateReg.FindStringSubmatch(str) msg := strings.Split(str, dat[0])[1] - msg = msg[1:] + if len(msg) > 1 { + msg = msg[1:] + } - currentCommitMessage = *&CommitMessage{id[1], auth[1][1:], dat[0], msg, nil} + currentCommitMessage = CommitMessage{id[1], auth[1][1:], dat[0], msg, nil} } else if changesReg.MatchString(text) { changes := changesReg.FindStringSubmatch(text) deleted, _ := strconv.Atoi(changes[2]) added, _ := strconv.Atoi(changes[1]) fileFieldName := changes[3] - change := *&FileChange{added, deleted, fileFieldName, ""} - - //currentFileChanges = append(currentFileChanges, *change) + change := FileChange{added, deleted, fileFieldName, ""} currentFileChangeMap[fileFieldName] = change - } else if changeModelReg.MatchString(text) { - matches := changeModelReg.FindStringSubmatch(text) - - if len(matches) > 4 { - mode := matches[1] + } else if changeModeReg.MatchString(text) { + buildChangeMode(text) + } else if currentCommitMessage.Rev != "" { + for _, value := range currentFileChangeMap { + currentFileChanges = append(currentFileChanges, value) + } - if _, ok := currentFileChangeMap[matches[4]]; ok { - change := currentFileChangeMap[matches[4]] - change.Mode = mode - currentFileChangeMap[matches[4]] = change - } else { - if mode == "delete" { - deleteFile := *&FileChange{ - Added: 0, - Deleted: 0, - File: matches[4], - Mode: "delete", - } + currentFileChangeMap = make(map[string]FileChange) + currentCommitMessage.Changes = currentFileChanges + commitMessages = append(commitMessages, currentCommitMessage) - currentFileChanges = append(currentFileChanges, deleteFile) - } + currentCommitMessage = CommitMessage{"", "", "", "", nil} + currentFileChanges = nil + } +} +func buildChangeMode(text string) { + matches := changeModeReg.FindStringSubmatch(text) + + CHANGE_MODE_INDEX := 4 + if len(matches) > CHANGE_MODE_INDEX { + mode := matches[1] + + if _, ok := currentFileChangeMap[matches[CHANGE_MODE_INDEX]]; ok { + change := currentFileChangeMap[matches[CHANGE_MODE_INDEX]] + change.Mode = mode + currentFileChangeMap[matches[CHANGE_MODE_INDEX]] = change + } else if mode == "delete" { + deleteFile := FileChange{ + Added: 0, + Deleted: 0, + File: matches[CHANGE_MODE_INDEX], + Mode: "delete", } - } - } else { - if currentCommitMessage.Rev != "" { - for _, value := range currentFileChangeMap { - currentFileChanges = append(currentFileChanges, value) - } - - currentFileChangeMap = make(map[string]FileChange) - currentCommitMessage.Changes = currentFileChanges - commitMessages = append(commitMessages, currentCommitMessage) - currentCommitMessage = *&CommitMessage{"", "", "", "", nil} - currentFileChanges = nil + currentFileChanges = append(currentFileChanges, deleteFile) } } } diff --git a/core/domain/gitt/models.go b/pkg/application/git/models.go similarity index 88% rename from core/domain/gitt/models.go rename to pkg/application/git/models.go index 2dc07854d292eb9127b7ce787c16a70d126ade9a..c55faf631caa70b7a68991eaa84ccc67943b4d77 100644 --- a/core/domain/gitt/models.go +++ b/pkg/application/git/models.go @@ -1,12 +1,7 @@ -package gitt +package git import "time" -type CodeAge struct { - EntityName string - Age time.Time -} - type CodeAgeDisplay struct { EntityName string Month string diff --git a/core/domain/call_graph/rcall/rcall_graph.go b/pkg/application/rcall/rcall_graph.go similarity index 35% rename from core/domain/call_graph/rcall/rcall_graph.go rename to pkg/application/rcall/rcall_graph.go index 5b28e58716755f3ad00529577ff7fa66797c220c..879fa0b646fa69629b71f4123781080b20995611 100644 --- a/core/domain/call_graph/rcall/rcall_graph.go +++ b/pkg/application/rcall/rcall_graph.go @@ -1,53 +1,55 @@ package rcall import ( - "github.com/phodal/coca/core/domain/call_graph" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" - "encoding/json" + "github.com/phodal/coca/pkg/domain/core_domain" ) type RCallGraph struct { } func NewRCallGraph() RCallGraph { - return *&RCallGraph{} + return RCallGraph{} } -func (c RCallGraph) Analysis(funcName string, clzs []models.JClassNode) string { +func (c RCallGraph) Analysis(funcName string, clzs []core_domain.CodeDataStruct, writeCallback func(rcallMap map[string][]string)) string { var projectMethodMap = BuildProjectMethodMap(clzs) rcallMap := BuildRCallMethodMap(clzs, projectMethodMap) - mapJson, _ := json.MarshalIndent(rcallMap, "", "\t") - support.WriteToCocaFile("rcallmap.json", string(mapJson)) + writeCallback(rcallMap) - chain := c.buildRCallChain(funcName, rcallMap) - - graphvizReverse := "rankdir = LR;\nedge [dir=\"back\"];\n" - chain = graphvizReverse + chain - dotContent := call_graph.ToGraphviz(chain) + chain := c.BuildRCallChain(funcName, rcallMap) + dotContent := ToGraphviz(chain) return dotContent } -func BuildProjectMethodMap(clzs []models.JClassNode) map[string]int { +// TODO: be a utils +func ToGraphviz(chain string) string { + var result = "digraph G {\n" + //result += "rankdir = LR;\n" + result = result + chain + result = result + "}\n" + return result +} + +func BuildProjectMethodMap(clzs []core_domain.CodeDataStruct) map[string]int { var maps = make(map[string]int) for _, clz := range clzs { - for _, method := range clz.Methods { - maps[clz.Package+"."+clz.Class+"."+method.Name] = 1 + for _, method := range clz.Functions { + maps[method.BuildFullMethodName(clz)] = 1 } } return maps } -func BuildRCallMethodMap(clzs []models.JClassNode, projectMaps map[string]int) map[string][]string { +func BuildRCallMethodMap(parserDeps []core_domain.CodeDataStruct, projectMaps map[string]int) map[string][]string { var methodMap = make(map[string][]string) - for _, clz := range clzs { - for _, method := range clz.Methods { - var caller = clz.Package + "." + clz.Class + "." + method.Name - for _, call := range method.MethodCalls { - if call.Class != "" { - callee := buildMethodFullName(call) + for _, clz := range parserDeps { + for _, method := range clz.Functions { + var caller = method.BuildFullMethodName(clz) + for _, jMethodCall := range method.FunctionCalls { + if jMethodCall.NodeName != "" { + callee := jMethodCall.BuildFullMethodName() if projectMaps[callee] < 1 { continue } @@ -60,14 +62,11 @@ func BuildRCallMethodMap(clzs []models.JClassNode, projectMaps map[string]int) m return methodMap } -func buildMethodFullName(call models.JMethodCall) string { - return call.Package + "." + call.Class + "." + call.MethodName -} - var loopCount = 0 +var lastChild = "" -func (c RCallGraph) buildRCallChain(funcName string, methodMap map[string][]string) string { - if loopCount > 6 { +func (c RCallGraph) BuildRCallChain(funcName string, methodMap map[string][]string) string { + if loopCount >= 6 { return "\n" } loopCount++ @@ -75,10 +74,18 @@ func (c RCallGraph) buildRCallChain(funcName string, methodMap map[string][]stri if len(methodMap[funcName]) > 0 { var arrayResult = "" for _, child := range methodMap[funcName] { + if child == lastChild { + return "" + } if len(methodMap[child]) > 0 { - arrayResult = arrayResult + c.buildRCallChain(child, methodMap) + lastChild = child + arrayResult = arrayResult + c.BuildRCallChain(child, methodMap) + } + if funcName == child { + continue } - arrayResult = arrayResult + "\"" + funcName + "\" -> \"" + child + "\";\n" + newCall := "\"" + child + "\" -> \"" + funcName + "\";\n" + arrayResult = arrayResult + newCall } return arrayResult diff --git a/pkg/application/rcall/rcall_graph_test.go b/pkg/application/rcall/rcall_graph_test.go new file mode 100644 index 0000000000000000000000000000000000000000..c824eb6f2a59f152c034f2f8879448fbdb0094ad --- /dev/null +++ b/pkg/application/rcall/rcall_graph_test.go @@ -0,0 +1,56 @@ +package rcall + +import ( + "encoding/json" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/domain/core_domain" + "log" + "testing" + + . "github.com/onsi/gomega" +) + +func MockWriteCallMap(rcallMap map[string][]string) { + +} + +func TestRCallGraph_Analysis(t *testing.T) { + g := NewGomegaWithT(t) + + var parsedDeps []core_domain.CodeDataStruct + analyser := NewRCallGraph() + file := cmd_util.ReadFile("../../../_fixtures/call/call_api_test.json") + if file == nil { + log.Fatal("lost file") + } + + _ = json.Unmarshal(file, &parsedDeps) + + content := analyser.Analysis("com.phodal.pholedge.book.BookService.createBook", parsedDeps, MockWriteCallMap) + + g.Expect(content).To(Equal(`digraph G { +"com.phodal.pholedge.book.BookController.createBook" -> "com.phodal.pholedge.book.BookService.createBook"; +} +`)) +} + +func TestRCallGraph_Constructor(t *testing.T) { + g := NewGomegaWithT(t) + + var parsedDeps []core_domain.CodeDataStruct + analyser := NewRCallGraph() + file := cmd_util.ReadFile("../../../_fixtures/rcall/constructor_call.json") + if file == nil { + log.Fatal("lost file") + } + + _ = json.Unmarshal(file, &parsedDeps) + + content := analyser.Analysis("com.phodal.coca.analysis.JavaCallApp.parse", parsedDeps, MockWriteCallMap) + + // Todo bug: to be fix + g.Expect(content).To(Equal(`digraph G { +"com.phodal.coca.analysis.JavaCallApp.analysisDir" -> "com.phodal.coca.analysis.JavaCallApp.parse"; +} +`)) +} diff --git a/core/domain/refactor/base/java_refactor_listener.go b/pkg/application/refactor/base/java_refactor_listener.go similarity index 70% rename from core/domain/refactor/base/java_refactor_listener.go rename to pkg/application/refactor/base/java_refactor_listener.go index f7bf6a72919d469ff08097555b014205e245842e..717a5926132e8e999ba9b6903ee84ff65287dc66 100644 --- a/core/domain/refactor/base/java_refactor_listener.go +++ b/pkg/application/refactor/base/java_refactor_listener.go @@ -1,13 +1,13 @@ package base import ( - models2 "github.com/phodal/coca/core/domain/refactor/base/models" . "github.com/phodal/coca/languages/java" + model "github.com/phodal/coca/pkg/application/refactor/base/models" "strings" "unicode" ) -var node models2.JFullIdentifier; +var node model.JFullIdentifier type JavaRefactorListener struct { BaseJavaParserListener @@ -19,7 +19,7 @@ func (s *JavaRefactorListener) EnterPackageDeclaration(ctx *PackageDeclarationCo startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - pkgInfo := *&models2.JPkgInfo{node.Pkg, startLine, stopLine} + pkgInfo := model.JPkgInfo{Name: node.Pkg, StartLine: startLine, StopLine: stopLine} node.SetPkgInfo(pkgInfo) } @@ -31,7 +31,7 @@ func (s *JavaRefactorListener) EnterImportDeclaration(ctx *ImportDeclarationCont startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - jImport := *&models2.JImport{importText, startLine, stopLine} + jImport := model.JImport{Name: importText, StartLine: startLine, StopLine: stopLine} node.AddImport(jImport) } @@ -41,12 +41,11 @@ func (s *JavaRefactorListener) EnterClassDeclaration(ctx *ClassDeclarationContex node.Name = ctx.IDENTIFIER().GetText() } -// throws func (s *JavaRefactorListener) EnterQualifiedNameList(ctx *QualifiedNameListContext) { for _, qualified := range ctx.AllQualifiedName() { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{qualified.GetText(), node.Pkg, startLine, stopLine} + field := model.JField{Name: qualified.GetText(), Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } } @@ -55,7 +54,7 @@ func (s *JavaRefactorListener) EnterCatchType(ctx *CatchTypeContext) { for _, qualified := range ctx.AllQualifiedName() { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{qualified.GetText(), node.Pkg, startLine, stopLine} + field := model.JField{Name: qualified.GetText(), Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } } @@ -67,8 +66,7 @@ func (s *JavaRefactorListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMet stopLine := ctx.GetStop().GetLine() stopLinePosition := ctx.GetStop().GetColumn() name := ctx.IDENTIFIER().GetText() - //XXX: find the start position of {, not public - method := *&models2.JFullMethod{name, startLine, startLinePosition, stopLine, stopLinePosition} + method := model.JFullMethod{Name: name, StartLine: startLine, StartLinePosition: startLinePosition, StopLine: stopLine, StopLinePosition: stopLinePosition} node.AddMethod(method) } @@ -80,19 +78,19 @@ func (s *JavaRefactorListener) EnterInterfaceDeclaration(ctx *InterfaceDeclarati func (s *JavaRefactorListener) EnterTypeType(ctx *TypeTypeContext) { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{ctx.GetText(), node.Pkg, startLine, stopLine} + field := model.JField{Name: ctx.GetText(), Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } func (s *JavaRefactorListener) EnterClassOrInterfaceType(ctx *ClassOrInterfaceTypeContext) { identifiers := ctx.AllIDENTIFIER() - for index, _ := range identifiers { + for index := range identifiers { context := ctx.IDENTIFIER(index) name := context.GetText() startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{name, node.Pkg, startLine, stopLine} + field := model.JField{Name: name, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } } @@ -103,19 +101,19 @@ func (s *JavaRefactorListener) EnterAnnotation(ctx *AnnotationContext) { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{annotation, node.Pkg, startLine, stopLine} + field := model.JField{Name: annotation, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } func (s *JavaRefactorListener) EnterLambdaParameters(ctx *LambdaParametersContext) { identifiers := ctx.AllIDENTIFIER() - for index, _ := range identifiers { + for index := range identifiers { context := ctx.IDENTIFIER(index) name := context.GetText() startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{name, node.Pkg, startLine, stopLine} + field := model.JField{Name: name, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } } @@ -124,7 +122,7 @@ func (s *JavaRefactorListener) EnterMethodCall(ctx *MethodCallContext) { text := ctx.IDENTIFIER().GetText() startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{text, node.Pkg, startLine, stopLine} + field := model.JField{Name: text, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } @@ -134,7 +132,7 @@ func (s *JavaRefactorListener) EnterExpressionList(ctx *ExpressionListContext) { if isUppercaseText(expText) { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{expText, node.Pkg, startLine, stopLine} + field := model.JField{Name: expText, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } } @@ -146,7 +144,7 @@ func (s *JavaRefactorListener) EnterStatement(ctx *StatementContext) { if isUppercaseText(expText) { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{expText, node.Pkg, startLine, stopLine} + field := model.JField{Name: expText, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } } @@ -154,14 +152,14 @@ func (s *JavaRefactorListener) EnterStatement(ctx *StatementContext) { func (s *JavaRefactorListener) EnterCreatedName(ctx *CreatedNameContext) { identifiers := ctx.AllIDENTIFIER() - for index, _ := range identifiers { + for index := range identifiers { context := ctx.IDENTIFIER(index) name := context.GetText() startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := &models2.JField{name, node.Pkg, startLine, stopLine} - node.AddField(*field) + field := model.JField{Name: name, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} + node.AddField(field) } } @@ -172,7 +170,7 @@ func (s *JavaRefactorListener) EnterExpression(ctx *ExpressionContext) { if isUppercaseText(expText) { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := *&models2.JField{expText, node.Pkg, startLine, stopLine} + field := model.JField{Name: expText, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} node.AddField(field) } } @@ -192,8 +190,8 @@ func (s *JavaRefactorListener) EnterExpression(ctx *ExpressionContext) { if isUppercaseText(expText) { startLine := ctx.GetStart().GetLine() stopLine := ctx.GetStop().GetLine() - field := &models2.JField{expText, node.Pkg, startLine, stopLine} - node.AddField(*field) + field := model.JField{Name: expText, Source: node.Pkg, StartLine: startLine, StopLine: stopLine} + node.AddField(field) } } } @@ -203,10 +201,10 @@ func isUppercaseText(text string) bool { return !strings.Contains(text, ".") && unicode.IsUpper([]rune(text)[0]) } -func (s *JavaRefactorListener) InitNode(identifier models2.JFullIdentifier) { +func (s *JavaRefactorListener) InitNode(identifier model.JFullIdentifier) { node = identifier } -func (s *JavaRefactorListener) GetNodeInfo() models2.JFullIdentifier { +func (s *JavaRefactorListener) GetNodeInfo() model.JFullIdentifier { return node } diff --git a/core/domain/refactor/base/models/jfull_identifier.go b/pkg/application/refactor/base/models/jfull_identifier.go similarity index 96% rename from core/domain/refactor/base/models/jfull_identifier.go rename to pkg/application/refactor/base/models/jfull_identifier.go index a211aa8c4df686948b153ac80bd082f16499f77f..6221eaec3083feec5b3489f3020780565c759cc0 100644 --- a/core/domain/refactor/base/models/jfull_identifier.go +++ b/pkg/application/refactor/base/models/jfull_identifier.go @@ -35,7 +35,7 @@ type JFullIdentifier struct { } func NewJFullIdentifier() JFullIdentifier { - identifier := *&JFullIdentifier{"", "", ""} + identifier := JFullIdentifier{"", "", ""} methods = nil fields = make(map[string]JField) imports = nil diff --git a/core/domain/refactor/base/models/jmove_struct.go b/pkg/application/refactor/base/models/jmove_struct.go similarity index 100% rename from core/domain/refactor/base/models/jmove_struct.go rename to pkg/application/refactor/base/models/jmove_struct.go diff --git a/core/domain/refactor/move_class/move_class_app.go b/pkg/application/refactor/moveclass/move_class_app.go similarity index 88% rename from core/domain/refactor/move_class/move_class_app.go rename to pkg/application/refactor/moveclass/move_class_app.go index 30522f299c316c348942760f33214b9857a84b64..823a1dac1040a183f53b488581ad9005d8efb470 100644 --- a/core/domain/refactor/move_class/move_class_app.go +++ b/pkg/application/refactor/moveclass/move_class_app.go @@ -1,12 +1,13 @@ -package move_class +package moveclass import ( "bufio" "fmt" "github.com/antlr/antlr4/runtime/Go/antlr" - base2 "github.com/phodal/coca/core/domain/refactor/base" - models2 "github.com/phodal/coca/core/domain/refactor/base/models" - utils2 "github.com/phodal/coca/core/support" + "github.com/phodal/coca/pkg/adapter/cocafile" + base2 "github.com/phodal/coca/pkg/application/refactor/base" + models2 "github.com/phodal/coca/pkg/application/refactor/base/models" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_java" "io" "io/ioutil" "log" @@ -34,13 +35,13 @@ func NewMoveClassApp(config string, pPath string) *MoveClassApp { func (j *MoveClassApp) Analysis() []models2.JMoveStruct { // TODO: 使用 Deps.json 来移动包 - files := utils2.GetJavaFiles(configPath) + files := cocafile.GetJavaFiles(configPath) for index := range files { file := files[index] currentFile, _ = filepath.Abs(file) - parser := utils2.ProcessFile(file) + parser := ast_java.ProcessJavaFile(file) context := parser.CompilationUnit() node := models2.NewJFullIdentifier() @@ -50,7 +51,7 @@ func (j *MoveClassApp) Analysis() []models2.JMoveStruct { antlr.NewParseTreeWalker().Walk(listener, context) node = listener.GetNodeInfo() - moveStruct := &models2.JMoveStruct{node, currentFile, node.GetImports()} + moveStruct := &models2.JMoveStruct{JFullIdentifier: node, Path: currentFile, Deps: node.GetImports()} nodes = append(nodes, *moveStruct) } diff --git a/core/domain/refactor/move_class/move_class_app_test.go b/pkg/application/refactor/moveclass/move_class_app_test.go similarity index 74% rename from core/domain/refactor/move_class/move_class_app_test.go rename to pkg/application/refactor/moveclass/move_class_app_test.go index 1d3b3b0ee6ad9be9394837466a784a50d666e578..6411f5761b6febf95bc81fc7762bec861f2a1ae2 100644 --- a/core/domain/refactor/move_class/move_class_app_test.go +++ b/pkg/application/refactor/moveclass/move_class_app_test.go @@ -1,10 +1,8 @@ -package move_class +package moveclass import ( - "fmt" . "github.com/onsi/gomega" "os" - "os/exec" "path/filepath" "testing" ) @@ -20,12 +18,6 @@ func TestMoveClassApp(t *testing.T) { app.Analysis() app.Refactoring() - cmd := exec.Command("pwd") - output, _ := cmd.CombinedOutput() - fmt.Println("////////////////////////") - fmt.Println(string(output)) - - // todo: fix in CI stat, _ := os.Stat(filepath.FromSlash(absPath + "/move/b/ImportForB.java")) g.Expect(stat.Name()).To(Equal("ImportForB.java")) diff --git a/core/domain/refactor/rename/rename_method.go b/pkg/application/refactor/rename/rename_method.go similarity index 31% rename from core/domain/refactor/rename/rename_method.go rename to pkg/application/refactor/rename/rename_method.go index a07a636298011e00d9d2ae82fc855fdb9608786f..a5aed3c2d274b3a7a2d20ba879f3d6d765481b74 100644 --- a/core/domain/refactor/rename/rename_method.go +++ b/pkg/application/refactor/rename/rename_method.go @@ -1,60 +1,48 @@ package unused import ( - support3 "github.com/phodal/coca/core/domain/refactor/rename/support" - . "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/pkg/application/refactor/rename/support" + "github.com/phodal/coca/pkg/domain/core_domain" "io/ioutil" "log" "strings" ) -var parsedChange []support3.RefactorChangeRelate +var parsedChange []support.RefactorChangeRelate type RemoveMethodApp struct { } -var configPath string -var conf string -var parsedDeps []JClassNode +var parsedDeps []core_domain.CodeDataStruct -func RenameMethodApp(deps []JClassNode, p string) *RemoveMethodApp { +func RenameMethodApp(deps []core_domain.CodeDataStruct) *RemoveMethodApp { parsedDeps = deps - configPath = p return &RemoveMethodApp{} } -func (j *RemoveMethodApp) Start() { - configBytes := support.ReadFile(configPath) - if configBytes == nil { - return - } - - conf = string(configBytes) - - parsedChange = support3.ParseRelates(conf) - +func (j *RemoveMethodApp) Refactoring(conf string) { + parsedChange = support.ParseRelates(conf) startParse(parsedDeps, parsedChange) } -func startParse(nodes []JClassNode, relates []support3.RefactorChangeRelate) { +func startParse(nodes []core_domain.CodeDataStruct, relates []support.RefactorChangeRelate) { for _, pkgNode := range nodes { for _, related := range relates { - oldInfo := support3.BuildMethodPackageInfo(related.OldObj) - newInfo := support3.BuildMethodPackageInfo(related.NewObj) + oldInfo := support.BuildMethodPackageInfo(related.OldObj) + newInfo := support.BuildMethodPackageInfo(related.NewObj) - if pkgNode.Package+pkgNode.Class == oldInfo.Package+oldInfo.Class { - for _, method := range pkgNode.Methods { + if pkgNode.Package+pkgNode.NodeName == oldInfo.Package+oldInfo.Class { + for _, method := range pkgNode.Functions { if method.Name == oldInfo.Method { updateSelfRefs(pkgNode, method, newInfo) } } } - for _, method := range pkgNode.Methods { - for _, methodCall := range method.MethodCalls { - if methodCall.Package+methodCall.Class == oldInfo.Package+oldInfo.Class { - if methodCall.MethodName == oldInfo.Method { + for _, method := range pkgNode.Functions { + for _, methodCall := range method.FunctionCalls { + if methodCall.Package+methodCall.NodeName == oldInfo.Package+oldInfo.Class { + if methodCall.FunctionName == oldInfo.Method { updateSelfRefs(pkgNode, methodCallToMethodModel(methodCall), newInfo) } } @@ -64,12 +52,22 @@ func startParse(nodes []JClassNode, relates []support3.RefactorChangeRelate) { } } -func methodCallToMethodModel(call JMethodCall) JMethod { - return *&JMethod{Name: call.MethodName, Type: call.Type, StartLine: call.StartLine, StartLinePosition: call.StartLinePosition, StopLine: call.StopLine, StopLinePosition: call.StopLinePosition} +func methodCallToMethodModel(call core_domain.CodeCall) core_domain.CodeFunction { + position := core_domain.CodePosition{ + StartLine: call.Position.StartLine, + StartLinePosition: call.Position.StartLinePosition, + StopLine: call.Position.StopLine, + StopLinePosition: call.Position.StopLinePosition, + } + return core_domain.CodeFunction{ + Name: call.FunctionName, + ReturnType: call.Type, + Position: position, + } } -func updateSelfRefs(node JClassNode, method JMethod, info *support3.PackageClassInfo) { - path := node.Path +func updateSelfRefs(node core_domain.CodeDataStruct, method core_domain.CodeFunction, info *support.PackageClassInfo) { + path := node.FilePath input, err := ioutil.ReadFile(path) if err != nil { log.Fatalln(err) @@ -78,8 +76,8 @@ func updateSelfRefs(node JClassNode, method JMethod, info *support3.PackageClass lines := strings.Split(string(input), "\n") for i, line := range lines { - if i == method.StartLine-1 { - newLine := line[:method.StartLinePosition] + info.Method + line[method.StopLinePosition:] + if i == method.Position.StartLine-1 { + newLine := line[:method.Position.StartLinePosition] + info.Method + line[method.Position.StopLinePosition:] lines[i] = newLine } } diff --git a/core/domain/refactor/rename/rename_method_test.go b/pkg/application/refactor/rename/rename_method_test.go similarity index 33% rename from core/domain/refactor/rename/rename_method_test.go rename to pkg/application/refactor/rename/rename_method_test.go index 238043436c5638e97e7361e89fe6c4729e6f9554..8f7dc20050ae91be4db50ef8b205f8ad82785732 100644 --- a/core/domain/refactor/rename/rename_method_test.go +++ b/pkg/application/refactor/rename/rename_method_test.go @@ -2,59 +2,36 @@ package unused import ( . "github.com/onsi/gomega" - "github.com/phodal/coca/core/adapter/call" - "github.com/phodal/coca/core/adapter/identifier" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/cocatest/testhelper" + "github.com/phodal/coca/pkg/application/analysis/javaapp" "path/filepath" - "sync" "testing" ) func TestRenameMethodApp(t *testing.T) { g := NewGomegaWithT(t) - var wg sync.WaitGroup - codePath := "../../../../_fixtures/refactor/unused" configPath := "../../../../_fixtures/refactor/rename.config" codePath = filepath.FromSlash(codePath) configPath = filepath.FromSlash(configPath) - identifierApp := new(identifier.JavaIdentifierApp) + identifierApp := new(javaapp.JavaIdentifierApp) identifiers := identifierApp.AnalysisPath(codePath) var classes []string = nil for _, node := range identifiers { - classes = append(classes, node.Package+"."+node.ClassName) + classes = append(classes, node.Package+"."+node.NodeName) } - wg.Add(1) - callApp := call.NewJavaCallApp() - callNodes := callApp.AnalysisPath(codePath, classes, identifiers) - - wg.Add(1) - go func() { - - RenameMethodApp(callNodes, configPath).Start() - defer wg.Done() - - newnodes := callApp.AnalysisPath(codePath, classes, identifiers) - g.Expect(newnodes[0].Methods[0].Name).To(Equal("demoA")) - - }() - - wg.Add(1) - go func() { - wg.Wait() - - configPath2 := "../../../../_fixtures/refactor/rename_back.config" - configPath2 = filepath.FromSlash(configPath2) - - RenameMethodApp(callNodes, configPath2).Start() - defer wg.Done() + callApp := javaapp.NewJavaFullApp() + callNodes := callApp.AnalysisPath(codePath, identifiers) - renameBackNodes := callApp.AnalysisPath(codePath, classes, identifiers) - g.Expect(renameBackNodes[0].Methods[0].Name).To(Equal("demo")) + configBytes := cmd_util.ReadFile(configPath) + RenameMethodApp(callNodes).Refactoring(string(configBytes)) - wg.Wait() - }() + newnodes := callApp.AnalysisPath(codePath, identifiers) + g.Expect(newnodes[0].Functions[0].Name).To(Equal("demo")) + testhelper.ResetGitDir(codePath) } diff --git a/core/domain/refactor/rename/support/package_info_helper.go b/pkg/application/refactor/rename/support/package_info_helper.go similarity index 100% rename from core/domain/refactor/rename/support/package_info_helper.go rename to pkg/application/refactor/rename/support/package_info_helper.go diff --git a/pkg/application/refactor/rename/support/package_info_helper_test.go b/pkg/application/refactor/rename/support/package_info_helper_test.go new file mode 100644 index 0000000000000000000000000000000000000000..945db001b6eadd1abe0a4a98a6348bef732cb486 --- /dev/null +++ b/pkg/application/refactor/rename/support/package_info_helper_test.go @@ -0,0 +1,25 @@ +package support + +import ( + "reflect" + "testing" +) + +func TestBuildMethodPackageInfo(t *testing.T) { + tests := []struct { + name string + want *PackageClassInfo + }{ + { + "com.phodal.Coca.hello", + &PackageClassInfo{"com.phodal", "Coca", "hello"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := BuildMethodPackageInfo(tt.name); !reflect.DeepEqual(got, tt.want) { + t.Errorf("BuildMethodPackageInfo() = %v, want %v", got, tt.want) + } + }) + } +} \ No newline at end of file diff --git a/core/domain/refactor/rename/support/refactor_change_model.go b/pkg/application/refactor/rename/support/refactor_change_model.go similarity index 100% rename from core/domain/refactor/rename/support/refactor_change_model.go rename to pkg/application/refactor/rename/support/refactor_change_model.go diff --git a/core/domain/refactor/rename/support/related_parser.go b/pkg/application/refactor/rename/support/related_parser.go similarity index 100% rename from core/domain/refactor/rename/support/related_parser.go rename to pkg/application/refactor/rename/support/related_parser.go diff --git a/core/domain/refactor/unused/remove_unused_import.go b/pkg/application/refactor/unused/remove_unused_import.go similarity index 85% rename from core/domain/refactor/unused/remove_unused_import.go rename to pkg/application/refactor/unused/remove_unused_import.go index 8f58d467c5cd128c2924b55b4179f1c4168ee708..b782d50798c08f6af115450562a9efac62a70db5 100644 --- a/core/domain/refactor/unused/remove_unused_import.go +++ b/pkg/application/refactor/unused/remove_unused_import.go @@ -3,9 +3,10 @@ package unused import ( "fmt" "github.com/antlr/antlr4/runtime/Go/antlr" - base2 "github.com/phodal/coca/core/domain/refactor/base" - models2 "github.com/phodal/coca/core/domain/refactor/base/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/pkg/adapter/cocafile" + base2 "github.com/phodal/coca/pkg/application/refactor/base" + models2 "github.com/phodal/coca/pkg/application/refactor/base/models" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_java" "io/ioutil" "os" "path/filepath" @@ -25,7 +26,7 @@ func NewRemoveUnusedImportApp(pPath string) *RemoveUnusedImportApp { } func (j *RemoveUnusedImportApp) Analysis() []models2.JFullIdentifier { - files := support.GetJavaFiles(configPath) + files := cocafile.GetJavaFiles(configPath) var nodes []models2.JFullIdentifier = nil for index := range files { @@ -33,9 +34,9 @@ func (j *RemoveUnusedImportApp) Analysis() []models2.JFullIdentifier { currentFile, _ = filepath.Abs(file) displayName := filepath.Base(file) - fmt.Println("Start parse java call: " + displayName) + fmt.Println("parse java call: " + displayName) - parser := support.ProcessFile(file) + parser := ast_java.ProcessJavaFile(file) context := parser.CompilationUnit() node := models2.NewJFullIdentifier() diff --git a/core/domain/refactor/unused/remove_unused_import_test.go b/pkg/application/refactor/unused/remove_unused_import_test.go similarity index 57% rename from core/domain/refactor/unused/remove_unused_import_test.go rename to pkg/application/refactor/unused/remove_unused_import_test.go index 0d70be25f97eed118a42c28689d5533b5dcdc302..9a48def39c24687b6619e066c5b5731011af1516 100644 --- a/core/domain/refactor/unused/remove_unused_import_test.go +++ b/pkg/application/refactor/unused/remove_unused_import_test.go @@ -2,6 +2,7 @@ package unused import ( . "github.com/onsi/gomega" + "github.com/phodal/coca/cocatest/testhelper" "path/filepath" "testing" ) @@ -9,9 +10,13 @@ import ( func TestRemoveUnusedImportApp_Analysis(t *testing.T) { g := NewGomegaWithT(t) - codePath := "../../../../_fixtures/refactor/unused" codePath = filepath.FromSlash(codePath) + testhelper.ResetGitDir(codePath) + + deps1, _, _ := testhelper.BuildAnalysisDeps(codePath) + g.Expect(len(deps1[0].Imports)).To(Equal(3)) + app := NewRemoveUnusedImportApp(codePath) results := app.Analysis() @@ -19,4 +24,10 @@ func TestRemoveUnusedImportApp_Analysis(t *testing.T) { errorLines := BuildErrorLines(results[0]) g.Expect(errorLines).To(Equal([]int{3,4,5})) + + app.Refactoring(results) + + deps, _, _ := testhelper.BuildAnalysisDeps(codePath) + g.Expect(len(deps[0].Imports)).To(Equal(0)) + testhelper.ResetGitDir(codePath) } diff --git a/core/domain/refactor/unused_classes/unused_classes_app.go b/pkg/application/refactor/unusedclasses/unused_classes_app.go similarity index 60% rename from core/domain/refactor/unused_classes/unused_classes_app.go rename to pkg/application/refactor/unusedclasses/unused_classes_app.go index 4bd85fa1b64046f4ce5f8441d1f8854d30dcf572..8f808674d70a0d1c6610f24449ca9bc367d4caa1 100644 --- a/core/domain/refactor/unused_classes/unused_classes_app.go +++ b/pkg/application/refactor/unusedclasses/unused_classes_app.go @@ -1,28 +1,27 @@ -package unused_classes +package unusedclasses import ( - . "github.com/phodal/coca/core/models" + "github.com/phodal/coca/pkg/domain/core_domain" "sort" "strings" ) -var parsedDeps []JClassNode var analysisPackage = "" -func Refactoring(parsedDeps []JClassNode) []string { +func Refactoring(parsedDeps []core_domain.CodeDataStruct) []string { sourceClasses := make(map[string]string) targetClasses := make(map[string]string) for _, node := range parsedDeps { if strings.Contains(node.Package, analysisPackage) { - className := node.Package + "." + node.Class + className := node.Package + "." + node.NodeName sourceClasses[className] = className } - for _, method := range node.Methods { - for _, methodCall := range method.MethodCalls { + for _, method := range node.Functions { + for _, methodCall := range method.FunctionCalls { if strings.Contains(methodCall.Package, analysisPackage) { - className := methodCall.Package + "." + methodCall.Class + className := methodCall.Package + "." + methodCall.NodeName targetClasses[className] = className } } @@ -36,6 +35,6 @@ func Refactoring(parsedDeps []JClassNode) []string { } } - sort.Sort(sort.StringSlice(excludePackage)) + sort.Strings(excludePackage) return excludePackage } diff --git a/core/domain/refactor/unused_classes/unused_classes_app_test.go b/pkg/application/refactor/unusedclasses/unused_classes_app_test.go similarity index 65% rename from core/domain/refactor/unused_classes/unused_classes_app_test.go rename to pkg/application/refactor/unusedclasses/unused_classes_app_test.go index 560a024fb3532bd89da46ed054ae7d46c34514e7..a1e2c3583976d3f97b84be7d8011293fa3660a70 100644 --- a/core/domain/refactor/unused_classes/unused_classes_app_test.go +++ b/pkg/application/refactor/unusedclasses/unused_classes_app_test.go @@ -1,10 +1,10 @@ -package unused_classes +package unusedclasses import ( "encoding/json" . "github.com/onsi/gomega" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/domain/core_domain" "path/filepath" "testing" ) @@ -13,10 +13,10 @@ func TestRefactoring(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct codePath := "../../../../_fixtures/count/call.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) _ = json.Unmarshal(file, &parsedDeps) results := Refactoring(parsedDeps) diff --git a/core/adapter/sql/sql_identifier_app.go b/pkg/application/sql/sql_identifier_app.go similarity index 83% rename from core/adapter/sql/sql_identifier_app.go rename to pkg/application/sql/sql_identifier_app.go index e52c2a4857637717f2fdc4a028cb4d0f89603c8f..84c00b699b28d9b482182d1e27f993fa34847a88 100644 --- a/core/adapter/sql/sql_identifier_app.go +++ b/pkg/application/sql/sql_identifier_app.go @@ -3,7 +3,8 @@ package sql import ( "fmt" "github.com/antlr/antlr4/runtime/Go/antlr" - "github.com/phodal/coca/core/adapter/sql/parse" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_sql" + "github.com/phodal/coca/pkg/infrastructure/xmlparse" parser2 "github.com/phodal/coca/languages/sql" "os" "path/filepath" @@ -15,10 +16,10 @@ type SqlIdentifierApp struct { } func NewSqlIdentifierApp() SqlIdentifierApp { - return *&SqlIdentifierApp{} + return SqlIdentifierApp{} } -func (j *SqlIdentifierApp) AnalysisPath(codeDir string) []SqlNode { +func (j *SqlIdentifierApp) AnalysisPath(codeDir string) []ast_sql.SQLNode { xmlFiles := (*SqlIdentifierApp)(nil).xmlFiles(codeDir) for _, xmlFile := range xmlFiles { xmlFile, err := os.Open(xmlFile) @@ -26,7 +27,7 @@ func (j *SqlIdentifierApp) AnalysisPath(codeDir string) []SqlNode { fmt.Println(err) } - parsedXml := parse.ParseXml(xmlFile) + parsedXml := xmlparse.ParseXML(xmlFile) for _, attr := range parsedXml.Attrs { if strings.Contains(attr.Name.Local, "namespace") { fmt.Println(attr.Value) @@ -34,7 +35,7 @@ func (j *SqlIdentifierApp) AnalysisPath(codeDir string) []SqlNode { } } - var infos []SqlNode + var infos []ast_sql.SQLNode files := (*SqlIdentifierApp)(nil).sqlFiles(codeDir) for index := range files { file := files[index] @@ -42,7 +43,7 @@ func (j *SqlIdentifierApp) AnalysisPath(codeDir string) []SqlNode { parser := (*SqlIdentifierApp)(nil).processFile(file) context := parser.Parse() - listener := NewSqlIdentifierListener() + listener := ast_sql.NewSqlIdentifierListener() antlr.NewParseTreeWalker().Walk(listener, context) diff --git a/core/adapter/sql/sql_identifier_app_test.go b/pkg/application/sql/sql_identifier_app_test.go similarity index 92% rename from core/adapter/sql/sql_identifier_app_test.go rename to pkg/application/sql/sql_identifier_app_test.go index e0dd2708e2826a31885dca7405f57e2d2d912977..cafab1f3c15b3a65239ab4fe091f254a65163ec1 100644 --- a/core/adapter/sql/sql_identifier_app_test.go +++ b/pkg/application/sql/sql_identifier_app_test.go @@ -10,7 +10,7 @@ func TestJavaIdentifierApp_AnalysisPath(t *testing.T) { g := NewGomegaWithT(t) identApp := NewSqlIdentifierApp() - results := identApp.AnalysisPath(filepath.FromSlash("../../../_fixtures/sql")) + results := identApp.AnalysisPath(filepath.FromSlash("../../../_fixtures/grammar/sql")) g.Expect(len(results)).To(Equal(1)) } diff --git a/core/domain/suggest/suggest_app.go b/pkg/application/suggest/suggest_app.go similarity index 46% rename from core/domain/suggest/suggest_app.go rename to pkg/application/suggest/suggest_app.go index eadc1070b7f7b3bbea642ebd0a31e61c468e8951..6cdd5e20c902a2a1f05f9f478a2035001f87d5e5 100644 --- a/core/domain/suggest/suggest_app.go +++ b/pkg/application/suggest/suggest_app.go @@ -1,23 +1,23 @@ package suggest import ( - "github.com/phodal/coca/core/models" - "strings" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/domain/support_domain" ) type SuggestApp struct { } func NewSuggestApp() SuggestApp { - return *&SuggestApp{} + return SuggestApp{} } -func (a SuggestApp) AnalysisPath(deps []models.JClassNode) []Suggest { - var suggests []Suggest +func (a SuggestApp) AnalysisPath(deps []core_domain.CodeDataStruct) []api_domain.Suggest { + var suggests []api_domain.Suggest for _, clz := range deps { if clz.Type == "Class" { // TODO: DSL => class constructor.len > 3 - if len(clz.Methods) > 0 { + if len(clz.Functions) > 0 { suggests = factorySuggest(clz, suggests) } } @@ -27,12 +27,12 @@ func (a SuggestApp) AnalysisPath(deps []models.JClassNode) []Suggest { return suggests } -func factorySuggest(clz models.JClassNode, suggests []Suggest) []Suggest { +func factorySuggest(clz core_domain.CodeDataStruct, suggests []api_domain.Suggest) []api_domain.Suggest { var constructorCount = 0 - var longestParaConstructorMethod = clz.Methods[0] + var longestParaConstructorMethod = clz.Functions[0] - var currentSuggestList []Suggest = nil - for _, method := range clz.Methods { + var currentSuggestList []api_domain.Suggest = nil + for _, method := range clz.Functions { if method.IsConstructor { constructorCount++ @@ -40,11 +40,13 @@ func factorySuggest(clz models.JClassNode, suggests []Suggest) []Suggest { longestParaConstructorMethod = method } - declLineNum := method.StopLine - method.StartLine + declLineNum := method.Position.StopLine - method.Position.StartLine // 参数过多,且在构造函数里调用过多 - if declLineNum > len(method.Parameters)-3 && (len(method.MethodCalls) > len(method.Parameters)+3) { - suggest := NewSuggest(clz, "factory", "complex constructor") - suggest.Line = method.StartLine + PARAMETER_LINE_OFFSET := 3 + PARAMETER_METHOD_CALL_OFFSET := 3 + if declLineNum > len(method.Parameters)-PARAMETER_LINE_OFFSET && (len(method.FunctionCalls) > len(method.Parameters)+PARAMETER_METHOD_CALL_OFFSET) { + suggest := api_domain.NewSuggest(clz, "factory", "complex constructor") + suggest.Line = method.Position.StartLine currentSuggestList = append(currentSuggestList, suggest) } } @@ -52,35 +54,18 @@ func factorySuggest(clz models.JClassNode, suggests []Suggest) []Suggest { // TODO 合并 suggest if constructorCount >= 3 { - suggest := NewSuggest(clz, "factory", "too many constructor") + suggest := api_domain.NewSuggest(clz, "factory", "too many constructor") suggest.Size = constructorCount currentSuggestList = append(currentSuggestList, suggest) } if len(longestParaConstructorMethod.Parameters) >= 5 { - suggest := NewSuggest(clz, "builder", "too many parameters") + suggest := api_domain.NewSuggest(clz, "builder", "too many parameters") suggest.Size = len(longestParaConstructorMethod.Parameters) currentSuggestList = append(currentSuggestList, suggest) } - var suggest = NewSuggest(clz, "", "") - for _, s := range currentSuggestList { - if !strings.Contains(suggest.Pattern, s.Pattern) { - if suggest.Pattern != "" { - suggest.Pattern = suggest.Pattern + ", " + s.Pattern - } else { - suggest.Pattern = s.Pattern - } - } - - if !strings.Contains(suggest.Reason, s.Reason) { - if suggest.Reason != "" { - suggest.Reason = suggest.Reason + ", " + s.Reason - } else { - suggest.Reason = s.Reason - } - } - } + suggest := api_domain.MergeSuggest(clz, currentSuggestList) if suggest.Pattern != "" { suggests = append(suggests, suggest) diff --git a/core/domain/suggest/suggest_app_test.go b/pkg/application/suggest/suggest_app_test.go similarity index 82% rename from core/domain/suggest/suggest_app_test.go rename to pkg/application/suggest/suggest_app_test.go index 7fbf7445402e5923827676ae0d6047cf64395031..90a3fb534f4176f3df193aa5bed1f3475f2a48b3 100644 --- a/core/domain/suggest/suggest_app_test.go +++ b/pkg/application/suggest/suggest_app_test.go @@ -2,8 +2,8 @@ package suggest import ( "encoding/json" - "github.com/phodal/coca/core/models" - "github.com/phodal/coca/core/support" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/domain/core_domain" "log" "path/filepath" "testing" @@ -14,11 +14,11 @@ import ( func TestConceptAnalyser_Analysis(t *testing.T) { g := NewGomegaWithT(t) - var parsedDeps []models.JClassNode + var parsedDeps []core_domain.CodeDataStruct analyser := NewSuggestApp() codePath := "../../../_fixtures/suggest/factory/factory_suggest.json" codePath = filepath.FromSlash(codePath) - file := support.ReadFile(codePath) + file := cmd_util.ReadFile(codePath) if file == nil { log.Fatal("lost file") } diff --git a/pkg/application/tbs/tbs_app.go b/pkg/application/tbs/tbs_app.go new file mode 100644 index 0000000000000000000000000000000000000000..8ff513524b60897bb37500647f1a41093fdd112b --- /dev/null +++ b/pkg/application/tbs/tbs_app.go @@ -0,0 +1,195 @@ +package tbs + +import ( + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/constants" +) + +type TbsApp struct { +} + +func NewTbsApp() *TbsApp { + return &TbsApp{} +} + +type TestBadSmell struct { + FileName string + Type string + Description string + Line int +} + +func (a TbsApp) AnalysisPath(deps []core_domain.CodeDataStruct, identifiersMap map[string]core_domain.CodeDataStruct) []TestBadSmell { + var results []TestBadSmell = nil + callMethodMap := core_domain.BuildCallMethodMap(deps) + for _, clz := range deps { + for _, method := range clz.Functions { + if !method.IsJunitTest() { + continue + } + + currentMethodCalls := updateMethodCallsForSelfCall(method, clz, callMethodMap) + method.FunctionCalls = currentMethodCalls + + var testType = "" + for _, annotation := range method.Annotations { + checkIgnoreTest(clz.FilePath, annotation, &results, &testType) + checkEmptyTest(clz.FilePath, annotation, &results, method, &testType) + } + + var methodCallMap = make(map[string][]core_domain.CodeCall) + var hasAssert = false + for index, methodCall := range currentMethodCalls { + if methodCall.FunctionName == "" { + if index == len(currentMethodCalls)-1 { + checkAssert(hasAssert, clz.FilePath, method, &results, &testType) + } + continue + } + + methodCallMap[methodCall.BuildFullMethodName()] = append(methodCallMap[methodCall.BuildFullMethodName()], methodCall) + + checkRedundantPrintTest(clz.FilePath, methodCall, &results, &testType) + checkSleepyTest(clz.FilePath, methodCall, method, &results, &testType) + checkRedundantAssertionTest(clz.FilePath, methodCall, method, &results, &testType) + + if methodCall.HasAssertion() { + hasAssert = true + } + + if index == len(currentMethodCalls)-1 { + checkAssert(hasAssert, clz.FilePath, method, &results, &testType) + } + } + + checkDuplicateAssertTest(clz, &results, methodCallMap, method, &testType) + } + } + + return results +} + +func checkAssert(hasAssert bool, filePath string, method core_domain.CodeFunction, results *[]TestBadSmell, testType *string) { + if !hasAssert { + *testType = "UnknownTest" + tbs := TestBadSmell{ + FileName: filePath, + Type: *testType, + Description: "", + Line: method.Position.StartLine, + } + + *results = append(*results, tbs) + } +} + +func updateMethodCallsForSelfCall(method core_domain.CodeFunction, clz core_domain.CodeDataStruct, callMethodMap map[string]core_domain.CodeFunction) []core_domain.CodeCall { + currentMethodCalls := method.FunctionCalls + for _, methodCall := range currentMethodCalls { + if methodCall.NodeName == clz.NodeName { + jMethod := callMethodMap[methodCall.BuildFullMethodName()] + if jMethod.Name != "" { + currentMethodCalls = append(currentMethodCalls, jMethod.FunctionCalls...) + } + } + } + return currentMethodCalls +} + +func checkRedundantAssertionTest(path string, call core_domain.CodeCall, method core_domain.CodeFunction, results *[]TestBadSmell, testType *string) { + TWO_PARAMETERS := 2 + if len(call.Parameters) == TWO_PARAMETERS { + if call.Parameters[0].TypeValue == call.Parameters[1].TypeValue { + *testType = "RedundantAssertionTest" + tbs := TestBadSmell{ + FileName: path, + Type: *testType, + Description: "", + Line: method.Position.StartLine, + } + + *results = append(*results, tbs) + } + } +} + +func checkDuplicateAssertTest(clz core_domain.CodeDataStruct, results *[]TestBadSmell, methodCallMap map[string][]core_domain.CodeCall, method core_domain.CodeFunction, testType *string) { + var isDuplicateAssert = false + for _, methodCall := range methodCallMap { + if len(methodCall) >= constants.DuplicatedAssertionLimitLength { + if methodCall[len(methodCall)-1].HasAssertion() { + isDuplicateAssert = true + } + } + } + + if isDuplicateAssert { + *testType = "DuplicateAssertTest" + tbs := TestBadSmell{ + FileName: clz.FilePath, + Type: *testType, + Description: "", + Line: method.Position.StartLine, + } + + *results = append(*results, tbs) + } +} + +func checkSleepyTest(path string, call core_domain.CodeCall, jMethod core_domain.CodeFunction, results *[]TestBadSmell, testType *string) { + if call.IsThreadSleep() { + *testType = "SleepyTest" + tbs := TestBadSmell{ + FileName: path, + Type: *testType, + Description: "", + Line: call.Position.StartLine, + } + + *results = append(*results, tbs) + } +} + +func checkRedundantPrintTest(path string, mCall core_domain.CodeCall, results *[]TestBadSmell, testType *string) { + if mCall.IsSystemOutput() { + *testType = "RedundantPrintTest" + tbs := TestBadSmell{ + FileName: path, + Type: *testType, + Description: "", + Line: mCall.Position.StartLine, + } + + *results = append(*results, tbs) + } +} + +func checkEmptyTest(path string, annotation core_domain.CodeAnnotation, results *[]TestBadSmell, method core_domain.CodeFunction, testType *string) { + if annotation.IsTest() { + if len(method.FunctionCalls) <= 1 { + *testType = "EmptyTest" + tbs := TestBadSmell{ + FileName: path, + Type: *testType, + Description: "", + Line: method.Position.StartLine, + } + + *results = append(*results, tbs) + } + } +} + +func checkIgnoreTest(clzPath string, annotation core_domain.CodeAnnotation, results *[]TestBadSmell, testType *string) { + if annotation.IsIgnoreTest() { + *testType = "IgnoreTest" + tbs := TestBadSmell{ + FileName: clzPath, + Type: *testType, + Description: "", + Line: 0, + } + + *results = append(*results, tbs) + } +} diff --git a/pkg/application/tbs/tbs_app_test.go b/pkg/application/tbs/tbs_app_test.go new file mode 100644 index 0000000000000000000000000000000000000000..7b988b4c03b83aabc9b6fc0000a600aba1281fc7 --- /dev/null +++ b/pkg/application/tbs/tbs_app_test.go @@ -0,0 +1,156 @@ +package tbs + +import ( + . "github.com/onsi/gomega" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/domain/core_domain" + "path/filepath" + "testing" +) + +func TestTbsApp_EmptyTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/usecases/EmptyTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(result[0].FileName).To(Equal(filepath.FromSlash("../../../_fixtures/tbs/usecases/EmptyTest.java"))) + g.Expect(result[0].Line).To(Equal(8)) + g.Expect(result[0].Type).To(Equal("EmptyTest")) +} + +func TestTbsApp_IgnoreTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/usecases/IgnoreTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(len(result)).To(Equal(1)) + g.Expect(result[0].Line).To(Equal(0)) + g.Expect(result[0].Type).To(Equal("IgnoreTest")) +} + +func TestTbsApp_RedundantPrintTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/usecases/RedundantPrintTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(result[0].Line).To(Equal(9)) + g.Expect(result[0].Type).To(Equal("RedundantPrintTest")) +} + +func TestTbsApp_SleepyTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/usecases/SleepyTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(result[0].Line).To(Equal(8)) + g.Expect(result[0].Type).To(Equal("SleepyTest")) +} + +func TestTbsApp_DuplicateAssertTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/usecases/DuplicateAssertTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(len(result)).To(Equal(1)) + g.Expect(result[0].Line).To(Equal(9)) + g.Expect(result[0].Type).To(Equal("DuplicateAssertTest")) +} + +func TestTbsApp_UnknownTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/usecases/UnknownTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(result[0].Type).To(Equal("EmptyTest")) + g.Expect(result[0].Line).To(Equal(7)) + g.Expect(result[1].Type).To(Equal("UnknownTest")) +} + +func TestTbsApp_RedundantAssertionTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/usecases/RedundantAssertionTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(len(result)).To(Equal(1)) + g.Expect(result[0].Type).To(Equal("RedundantAssertionTest")) +} + +func TestTbsApp_CreatorNotUnknownTest(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/regression/CreatorNotUnknownTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(len(result)).To(Equal(0)) +} + +func TestTbsApp_CallAssertInClassTests(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/regression/CallAssertInClassTests.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(len(result)).To(Equal(0)) +} + +func TestTbsApp_ShouldReturnEmptyForFunc(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/regression/EnvironmentSystemIntegrationTests.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(len(result)).To(Equal(0)) +} + +func TestTbsApp_ShouldReturnMultipleResult(t *testing.T) { + g := NewGomegaWithT(t) + codePath := "../../../_fixtures/tbs/regression/I18NTest.java" + codePath = filepath.FromSlash(codePath) + + result := buildTbsResult(codePath) + + g.Expect(len(result)).To(Equal(4)) +} + +func buildTbsResult(codePath string) []TestBadSmell { + identifiersMap, classNodes := BuildTestAnalysisResultsByPath(codePath) + + app := NewTbsApp() + result := app.AnalysisPath(classNodes, identifiersMap) + return result +} + +func BuildTestAnalysisResultsByPath(codePath string) (map[string]core_domain.CodeDataStruct, []core_domain.CodeDataStruct) { + files := cocafile.GetJavaTestFiles(codePath) + + identifiers := cmd_util.LoadTestIdentify(files) + identifiersMap := core_domain.BuildIdentifierMap(identifiers) + + var classes []string = nil + for _, node := range identifiers { + classes = append(classes, node.Package+"."+node.NodeName) + } + + analysisApp := javaapp.NewJavaFullApp() + classNodes := analysisApp.AnalysisFiles(identifiers, files) + return identifiersMap, classNodes +} diff --git a/core/domain/todo/astitodo/README.md b/pkg/application/todo/astitodo/README.md similarity index 100% rename from core/domain/todo/astitodo/README.md rename to pkg/application/todo/astitodo/README.md diff --git a/core/domain/todo/astitodo/astitodo.go b/pkg/application/todo/astitodo/astitodo.go similarity index 74% rename from core/domain/todo/astitodo/astitodo.go rename to pkg/application/todo/astitodo/astitodo.go index 49031518f661063d17dba70a96f02848e918e957..f0240b6a1dafc3018eeae88114181f6307fb8782 100644 --- a/core/domain/todo/astitodo/astitodo.go +++ b/pkg/application/todo/astitodo/astitodo.go @@ -12,18 +12,20 @@ type TODO struct { Assignee string Filename string Line int - Message []string + Message string } var ( - regexpAssignee = regexp.MustCompile("^\\([\\w \\._\\+\\-@]+\\)") + assignRegStr = "^\\([\\w \\._\\+\\-@]+\\)" + regexpAssignee = regexp.MustCompile(assignRegStr) ) func ParseComment(token antlr.Token, filename string) *TODO { comment := token.GetText() var t = strings.TrimSpace(comment) - if strings.HasPrefix(t, "//") || strings.HasPrefix(t, "/*") || strings.HasPrefix(t, "*/") { + // todo: add todo list + if strings.HasPrefix(t, "//") || strings.HasPrefix(t, "/*") || strings.HasPrefix(t, "*/") || strings.HasPrefix(t, "#") { t = strings.TrimSpace(t[2:]) } @@ -46,7 +48,7 @@ func ParseComment(token antlr.Token, filename string) *TODO { } // Append text - todo.Message = append(todo.Message, t) + todo.Message = handleForMultipleLine(t) return todo } @@ -54,6 +56,14 @@ func ParseComment(token antlr.Token, filename string) *TODO { return nil } +// todo: handle for letter +func handleForMultipleLine(t string) string { + t = strings.ReplaceAll(t, "*/", " ") + t = strings.ReplaceAll(t, "*", " ") + t = strings.ReplaceAll(t, "\n", " ") + return t +} + func IsTodoIdentifier(s string) (int, bool) { for _, indent := range todoIdentifiers { if strings.HasPrefix(strings.ToUpper(s), indent) { diff --git a/core/domain/todo/todo_app.go b/pkg/application/todo/todo_app.go similarity index 47% rename from core/domain/todo/todo_app.go rename to pkg/application/todo/todo_app.go index d8dfe8d58b20a849117737f70727a18a86bbb641..2b1bf8040c945a5f063454fa133b6ce682610f29 100644 --- a/core/domain/todo/todo_app.go +++ b/pkg/application/todo/todo_app.go @@ -3,12 +3,11 @@ package todo import ( "fmt" "github.com/antlr/antlr4/runtime/Go/antlr" - "github.com/phodal/coca/core/domain/gitt" - "github.com/phodal/coca/core/domain/todo/astitodo" - "github.com/phodal/coca/core/support" - . "github.com/phodal/coca/languages/java" - "log" - "os/exec" + . "github.com/phodal/coca/languages/comment" + "github.com/phodal/coca/pkg/adapter/cocafile" + "github.com/phodal/coca/pkg/adapter/shell" + "github.com/phodal/coca/pkg/application/git" + "github.com/phodal/coca/pkg/application/todo/astitodo" "path/filepath" "strconv" "strings" @@ -18,7 +17,7 @@ type TodoApp struct { } func NewTodoApp() TodoApp { - return *&TodoApp{ + return TodoApp{ } } @@ -29,11 +28,22 @@ type TodoDetail struct { Author string Line string Assignee string - Message []string + Message string } -func (a TodoApp) AnalysisPath(path string) []*astitodo.TODO { - todos := buildComment(path) +func (a TodoApp) AnalysisPath(path string, filters []string) []*astitodo.TODO { + var CodeFileFilter = func(path string) bool { + extensions := filters + for _, ext := range extensions { + if strings.HasSuffix(path, ext) { + return true + } + } + + return false + } + + todos := BuildComments(path, CodeFileFilter) return todos } @@ -41,7 +51,7 @@ func (a TodoApp) BuildWithGitHistory(todos []*astitodo.TODO) []TodoDetail { var todoList []TodoDetail = nil for _, todo := range todos { - lineOutput := runGitGetLog(todo.Line, todo.Filename) + lineOutput := shell.RunGitGetLog(todo.Line, todo.Filename) todoDetail := &TodoDetail{ Date: "", @@ -51,7 +61,7 @@ func (a TodoApp) BuildWithGitHistory(todos []*astitodo.TODO) []TodoDetail { Assignee: todo.Assignee, Message: todo.Message, } - commitMessages := gitt.BuildMessageByInput(lineOutput) + commitMessages := git.BuildMessageByInput(lineOutput) if len(commitMessages) > 0 { commit := commitMessages[0] @@ -64,24 +74,29 @@ func (a TodoApp) BuildWithGitHistory(todos []*astitodo.TODO) []TodoDetail { return todoList } -func buildComment(path string) []*astitodo.TODO { +func BuildComments(path string, fileFilters func(path string) bool) []*astitodo.TODO { var todos []*astitodo.TODO - files := support.GetJavaFiles(path) + + files := cocafile.GetFilesWithFilter(path, fileFilters) for index := range files { file := files[index] displayName := filepath.Base(file) - //abs, _ := filepath.Abs(file) - fmt.Println("Start parse java call: " + displayName) + fmt.Println("parse java call: " + displayName) is, _ := antlr.NewFileStream(file) - lexer := NewJavaLexer(is) + lexer := NewCommentLexer(is) for _, token := range lexer.GetAllTokens() { - COMMENT_TOKEN_INDEX := 109 - COMMENT_LINE_TOKNE_INDEX := 110 + COMMENT := 1 + LINE_COMMENT := 2 + PYTHON_COMMENT := 3 + // based on `JavaLexer.tokens` file - if token.GetTokenType() == COMMENT_TOKEN_INDEX || token.GetTokenType() == COMMENT_LINE_TOKNE_INDEX { + if token.GetTokenType() == COMMENT || + token.GetTokenType() == LINE_COMMENT || + token.GetTokenType() == PYTHON_COMMENT { + todo := astitodo.ParseComment(token, file) if todo != nil { todos = append(todos, todo) @@ -92,18 +107,3 @@ func buildComment(path string) []*astitodo.TODO { return todos } - -func runGitGetLog(line int, fileName string) string { - // git log -1 -L2:README.md --pretty="format:[%h] %aN %ad %s" --date=short - historyArgs := []string{"log", "-1", "-L" + strconv.Itoa(line) + ":" + fileName, "--pretty=\"format:[%h] %aN %ad %s\"", "--date=short"} - cmd := exec.Command("git", historyArgs...) - out, err := cmd.CombinedOutput() - if err != nil { - fmt.Println(string(out)) - log.Fatalf("cmd.Run() failed with %s\n", err) - } - - split := strings.Split(string(out), "\n") - output := split[0] + "\n " - return output -} diff --git a/pkg/application/todo/todo_app_test.go b/pkg/application/todo/todo_app_test.go new file mode 100644 index 0000000000000000000000000000000000000000..ecba8940926c2aab93877883a4b6be1315ea66c5 --- /dev/null +++ b/pkg/application/todo/todo_app_test.go @@ -0,0 +1,40 @@ +package todo + +import ( + . "github.com/onsi/gomega" + "path/filepath" + "testing" +) + +func TestNewTodoApp(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/todo" + codePath = filepath.FromSlash(codePath) + app := NewTodoApp() + + stodos := app.AnalysisPath(codePath, []string{".go", ".py", ".js", ".ts", ".java", ".kotlin", ".groovy"}) + todos := app.BuildWithGitHistory(stodos) + + // todo: add suport for python + g.Expect(len(todos)).To(Equal(4)) + g.Expect(todos[0].Line).To(Equal("3")) + g.Expect(todos[1].FileName).To(ContainSubstring(filepath.FromSlash("_fixtures/todo/Todo.java"))) + g.Expect(todos[1].Author).To(ContainSubstring("Phodal Huang")) + g.Expect(todos[1].Line).To(Equal("6")) + g.Expect(todos[2].Message).To(Equal("add more content")) + g.Expect(todos[2].Assignee).To(Equal("phodal")) +} + +func Test_ShouldReturnNullWhenNotTodo(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/tbs" + codePath = filepath.FromSlash(codePath) + app := NewTodoApp() + + stodos := app.AnalysisPath(codePath, []string{".go", ".py", ".js", ".ts", ".java", ".kotlin", ".groovy"}) + todos := app.BuildWithGitHistory(stodos) + + g.Expect(len(todos)).To(Equal(0)) +} diff --git a/pkg/application/visual/visual.go b/pkg/application/visual/visual.go new file mode 100644 index 0000000000000000000000000000000000000000..8aa0d8f594547d8eddb163ac6c59f53a99bd0f9e --- /dev/null +++ b/pkg/application/visual/visual.go @@ -0,0 +1,59 @@ +package visual + +import "github.com/phodal/coca/pkg/domain/core_domain" + +type DData struct { + Nodes []DNode `json:"nodes,omitempty"` + Links []DLink `json:"links,omitempty"` +} + +type DNode struct { + ID string `json:"id,omitempty"` + Group int `json:"group,omitempty"` +} + +type DLink struct { + Source string `json:"source,omitempty"` + Target string `json:"target,omitempty"` + Value int `json:"value,omitempty"` +} + +func FromDeps(deps []core_domain.CodeDataStruct) DData { + var data DData + nodeMap := make(map[string]DNode) + sourceTargetMap := make(map[string]int) + var links []DLink + var groupIndex = 0 + + for _, dep := range deps { + groupIndex++ + nodeMap[dep.GetClassFullName()] = DNode{ + ID: dep.GetClassFullName(), + Group: groupIndex, + } + for _, pkg := range dep.FunctionCalls { + if pkg.BuildClassFullName() != "" { + nodeMap[pkg.BuildClassFullName()] = DNode{ + ID: pkg.BuildClassFullName(), + Group: groupIndex, + } + links = append(links, DLink{ + Source: dep.GetClassFullName(), + Target: pkg.BuildClassFullName(), + Value: 1, + }) + sourceTargetMap[dep.GetClassFullName()+".coca."+pkg.BuildClassFullName()]++ + } + } + } + + for _, value := range nodeMap { + data.Nodes = append(data.Nodes, value) + } + for _, link := range links { + link.Value = sourceTargetMap[link.Source+".coca."+link.Target] + } + + data.Links = links + return data +} diff --git a/pkg/application/visual/visual_test.go b/pkg/application/visual/visual_test.go new file mode 100644 index 0000000000000000000000000000000000000000..2b33f3ea88f320319e486f89c799fe813bed4f32 --- /dev/null +++ b/pkg/application/visual/visual_test.go @@ -0,0 +1,48 @@ +package visual + +import ( + "encoding/json" + . "github.com/onsi/gomega" + "github.com/phodal/coca/cmd/cmd_util" + "github.com/phodal/coca/pkg/application/analysis/javaapp" + "github.com/phodal/coca/pkg/domain/core_domain" + "path/filepath" + "testing" +) + +func Test_BasicVisualSupport(t *testing.T) { + g := NewGomegaWithT(t) + + var parsedDeps []core_domain.CodeDataStruct + codePath := "../../../_fixtures/evaluate/service_long_parameters.json" + codePath = filepath.FromSlash(codePath) + file := cmd_util.ReadFile(codePath) + _ = json.Unmarshal(file, &parsedDeps) + + ddata := FromDeps(parsedDeps) + + g.Expect(len(ddata.Links)).To(Equal(0)) + g.Expect(len(ddata.Nodes)).To(Equal(3)) +} + +func Test_LinkedVisual(t *testing.T) { + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/grammar/java/arch/step2-java" + codePath = filepath.FromSlash(codePath) + + identifierApp := new(javaapp.JavaIdentifierApp) + iNodes := identifierApp.AnalysisPath(codePath) + var classes []string = nil + for _, node := range iNodes { + classes = append(classes, node.Package+"."+node.NodeName) + } + + callApp := javaapp.NewJavaFullApp() + callNodes := callApp.AnalysisPath(codePath, iNodes) + + ddata := FromDeps(callNodes) + + g.Expect(len(ddata.Links)).To(Equal(7)) + g.Expect(len(ddata.Nodes)).To(Equal(14)) +} diff --git a/pkg/domain/api_domain/call_api.go b/pkg/domain/api_domain/call_api.go new file mode 100644 index 0000000000000000000000000000000000000000..623a840ec1843a54242e369b7db2bae727224d29 --- /dev/null +++ b/pkg/domain/api_domain/call_api.go @@ -0,0 +1,16 @@ +package api_domain + +import "sort" + +type CallAPI struct { + HTTPMethod string + URI string + Caller string + Size int +} + +func SortAPIs(callAPIs []CallAPI) { + sort.Slice(callAPIs, func(i, j int) bool { + return callAPIs[i].Size < callAPIs[j].Size + }) +} diff --git a/pkg/domain/api_domain/call_api_test.go b/pkg/domain/api_domain/call_api_test.go new file mode 100644 index 0000000000000000000000000000000000000000..57d8791e27499157d38a7015fdc440e5c252854c --- /dev/null +++ b/pkg/domain/api_domain/call_api_test.go @@ -0,0 +1,23 @@ +package api_domain + +import ( + . "github.com/onsi/gomega" + "testing" +) + +func TestSortApi(t *testing.T) { + g := NewGomegaWithT(t) + var apis []CallAPI + api3 := &CallAPI{"get","/blog","home", 3} + api2 := &CallAPI{"get","/blog","home", 5} + api5 := &CallAPI{"get","/blog","home", 2} + apis = append(apis, *api3) + apis = append(apis, *api2) + apis = append(apis, *api5) + + g.Expect(apis[0].Size).To(Equal(3)) + + SortAPIs(apis) + + g.Expect(apis[0].Size).To(Equal(2)) +} \ No newline at end of file diff --git a/pkg/domain/api_domain/rest_api.go b/pkg/domain/api_domain/rest_api.go new file mode 100644 index 0000000000000000000000000000000000000000..ef1bb18405144c39ae875dd88a50ccbef5e8031c --- /dev/null +++ b/pkg/domain/api_domain/rest_api.go @@ -0,0 +1,35 @@ +package api_domain + +import ( + "strings" +) + +type RestAPI struct { + Uri string + HttpMethod string + MethodName string + ResponseStatus string + RequestBodyClass string + MethodParams map[string]string + PackageName string + ClassName string +} + +func (r *RestAPI) BuildFullMethodPath() string { + return r.PackageName + "." + r.ClassName + "." + r.MethodName +} + +func FilterApiByPrefix(apiPrefix string, apis []RestAPI, ) []RestAPI { + var restFieldsApi []RestAPI + if apiPrefix != "" { + for _, api := range apis { + if strings.HasPrefix(api.Uri, apiPrefix) { + restFieldsApi = append(restFieldsApi, api) + } + } + } else { + restFieldsApi = apis + } + + return restFieldsApi +} diff --git a/pkg/domain/api_domain/rest_api_test.go b/pkg/domain/api_domain/rest_api_test.go new file mode 100644 index 0000000000000000000000000000000000000000..561c3545d316f72d18d074f2dcd100f152a70d57 --- /dev/null +++ b/pkg/domain/api_domain/rest_api_test.go @@ -0,0 +1,20 @@ +package api_domain + +import ( + . "github.com/onsi/gomega" + "testing" +) + +func Test_FilterRestApi(t *testing.T) { + g := NewGomegaWithT(t) + var apis []RestAPI + blogApi := &RestAPI{"/blog", "", "", "", "", nil, "", "",} + homeApi := &RestAPI{"/home", "", "", "", "", nil, "", "",} + apis = append(apis, *blogApi) + apis = append(apis, *homeApi) + + filteredApi := FilterApiByPrefix("/blog", apis) + + g.Expect(len(filteredApi)).To(Equal(1)) + g.Expect(filteredApi[0].Uri).To(Equal("/blog")) +} diff --git a/pkg/domain/bs_domain/bad_smell.go b/pkg/domain/bs_domain/bad_smell.go new file mode 100644 index 0000000000000000000000000000000000000000..8266482197bca872952ea8b85295b39bf032fb3a --- /dev/null +++ b/pkg/domain/bs_domain/bad_smell.go @@ -0,0 +1,40 @@ +package bs_domain + +import "sort" + +type BadSmellModel struct { + File string `json:"EntityName,omitempty"` + Line string `json:"Line,omitempty"` + Bs string `json:"BS,omitempty"` + Description string `json:"Description,omitempty"` + Size int `size:"Description,omitempty"` +} + +func SortSmellByType(models []BadSmellModel, filterFunc func(key string) bool) map[string][]BadSmellModel { + sortSmells := make(map[string][]BadSmellModel) + for _, model := range models { + sortSmells[model.Bs] = append(sortSmells[model.Bs], model) + } + + for key, smells := range sortSmells { + if filterFunc(key) { + sort.Slice(smells, func(i, j int) bool { + return smells[i].Size > (smells[j].Size) + }) + + sortSmells[key] = smells + } + } + + return sortSmells +} + +func FilterBadSmellList(models []BadSmellModel, ignoreRules map[string]bool) []BadSmellModel { + var results []BadSmellModel + for _, model := range models { + if !ignoreRules[model.Bs] { + results = append(results, model) + } + } + return results +} diff --git a/pkg/domain/bs_domain/bs_node.go b/pkg/domain/bs_domain/bs_node.go new file mode 100644 index 0000000000000000000000000000000000000000..67bf8e6dc757ffd0038b8470e4d5f9b268258f9a --- /dev/null +++ b/pkg/domain/bs_domain/bs_node.go @@ -0,0 +1,96 @@ +package bs_domain + +import ( + "github.com/phodal/coca/pkg/domain/core_domain" +) + +type BSDataStruct struct { + core_domain.CodeDataStruct + + Functions []BSFunction + DataStructBS ClassBadSmellInfo +} + +type BSFunction struct { + core_domain.CodeFunction + + FunctionBody string + FunctionBS FunctionBSInfo +} + +type FunctionBSInfo struct { + IfSize int + SwitchSize int + IfInfo []IfParInfo +} + +type IfParInfo struct { + StartLine int + EndLine int +} + +func NewIfPairInfo() IfParInfo { + return IfParInfo{ + StartLine: 0, + EndLine: 0, + } +} + +func NewMethodBadSmellInfo() FunctionBSInfo { + return FunctionBSInfo{ + IfSize: 0, + SwitchSize: 0, + IfInfo: nil, + } +} + +type ClassBadSmellInfo struct { + OverrideSize int + PublicVarSize int +} + +func NewJFullClassNode() BSDataStruct { + info := ClassBadSmellInfo{0, 0} + return BSDataStruct{ + DataStructBS: info, + } +} + +func (b *BSDataStruct) HasCallSuper() bool { + hasCallSuperMethod := false + for _, methodCall := range b.FunctionCalls { + if methodCall.NodeName == b.Extend { + hasCallSuperMethod = true + } + } + + return hasCallSuperMethod +} + +//fixme java lambda & recursive +func GetCalledClasses(class BSDataStruct, maps map[string]bool) []string { + var calledClassesMap = make(map[string]struct{}) + var calledClasses []string + for _, methodCalled := range class.FunctionCalls { + if methodCalled.NodeName == "" || !maps[methodCalled.BuildClassFullName()] || class.GetClassFullName() == methodCalled.BuildClassFullName() { + continue + } + calledClassesMap[methodCalled.BuildClassFullName()] = struct{}{} + } + for key := range calledClassesMap { + calledClasses = append(calledClasses, key) + } + + return calledClasses +} + +func WithoutGetterSetterClass(fullMethods []BSFunction) int { + var normalMethodSize = 0 + for _, method := range fullMethods { + if !(method.IsGetterSetter()) { + normalMethodSize++ + } + } + + return normalMethodSize +} diff --git a/pkg/domain/bs_domain/bs_node_test.go b/pkg/domain/bs_domain/bs_node_test.go new file mode 100644 index 0000000000000000000000000000000000000000..7b26e9299867f8c99e4d2699125a0a910e51e48e --- /dev/null +++ b/pkg/domain/bs_domain/bs_node_test.go @@ -0,0 +1,63 @@ +package bs_domain + +import ( + . "github.com/onsi/gomega" + "github.com/phodal/coca/pkg/domain/core_domain" + "testing" +) + +func Test_IsGetter(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + position := core_domain.CodePosition{ + StartLine: 0, + StartLinePosition: 0, + StopLine: 0, + StopLinePosition: 0, + } + + function := core_domain.CodeFunction{ + Name: "getHome", + ReturnType: "", + Position: position, + Modifiers: nil, + Parameters: nil, + } + + bs := &BSFunction{ + CodeFunction: function, + FunctionBody: "", + FunctionBS: FunctionBSInfo{}, + } + + g.Expect(bs.IsGetterSetter()).To(Equal(true)) +} + +func Test_IsSetter(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + position := core_domain.CodePosition{ + StartLine: 0, + StartLinePosition: 0, + StopLine: 0, + StopLinePosition: 0, + } + + function := core_domain.CodeFunction{ + Name: "setHome", + ReturnType: "", + Position: position, + Modifiers: nil, + Parameters: nil, + } + + bs := &BSFunction{ + CodeFunction: function, + FunctionBody: "", + FunctionBS: FunctionBSInfo{}, + } + + g.Expect(bs.IsGetterSetter()).To(Equal(true)) +} diff --git a/pkg/domain/cloc/cloc_summary.go b/pkg/domain/cloc/cloc_summary.go new file mode 100644 index 0000000000000000000000000000000000000000..64a5e27f82ccb00c459db677dcc9725ca640bd22 --- /dev/null +++ b/pkg/domain/cloc/cloc_summary.go @@ -0,0 +1,63 @@ +package cloc + +import ( + "encoding/json" + "fmt" + "github.com/boyter/scc/processor" + "io/ioutil" + "path/filepath" + "strconv" + "strings" +) + +func BuildClocCsvData(languageMap map[string]map[string]processor.LanguageSummary, keys []string) [][]string { + var data [][]string + baseKey := []string{"package", "summary"} + data = append(data, append(baseKey, keys...)) + + for dirName, dirSummary := range languageMap { + var column []string + column = append(column, dirName) + + var codes []string + var summary int64 + + for _, key := range keys { + lang := dirSummary[key] + summary = summary + lang.Code + codes = append(codes, strconv.Itoa(int(lang.Code))) + } + + column = append(column, strconv.Itoa(int(summary))) + column = append(column, codes...) + data = append(data, column) + } + return data +} + +func BuildLanguageMap(languageMap map[string]map[string]processor.LanguageSummary, keys []string, filePath string) { + var dirLangSummary []processor.LanguageSummary + contents, _ := ioutil.ReadFile(filePath) + err := json.Unmarshal(contents, &dirLangSummary) + if err != nil { + fmt.Println("Error parsing JSON: ", err) + } + + dirName := strings.TrimSuffix(filepath.Base(filePath), filepath.Ext(filePath)) + languageMap[dirName] = make(map[string]processor.LanguageSummary) + + for _, key := range keys { + var hasSet = false + for _, langSummary := range dirLangSummary { + if key == langSummary.Name { + hasSet = true + langSummary.Name = key + languageMap[dirName][key] = langSummary + break + } + } + if !hasSet { + languageMap[dirName][key] = processor.LanguageSummary{} + } + } +} diff --git a/pkg/domain/cloc/cloc_summary_test.go b/pkg/domain/cloc/cloc_summary_test.go new file mode 100644 index 0000000000000000000000000000000000000000..7e2ab89f5898f38c53832ef85cfc7a8a005b0ea0 --- /dev/null +++ b/pkg/domain/cloc/cloc_summary_test.go @@ -0,0 +1,63 @@ +package cloc + +import ( + "encoding/json" + "fmt" + "github.com/boyter/scc/processor" + . "github.com/onsi/gomega" + "path/filepath" + "testing" +) + +func Test_parser_json_languages(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + var data = `[ + {"Name":"Java","Bytes":21169200,"CodeBytes":0,"Lines":540043,"Code":381028,"Comment":93196,"Blank":65819,"Complexity":43899,"Count":4435,"WeightedComplexity":0,"Files":[]}, + {"Name":"Kotlin","Bytes":6961705,"CodeBytes":0,"Lines":168900,"Code":118448,"Comment":30743,"Blank":19709,"Complexity":7636,"Count":1315,"WeightedComplexity":0,"Files":[]} +] +` + + var f []processor.LanguageSummary + err := json.Unmarshal([]byte(data), &f) + if err != nil { + fmt.Println("Error parsing JSON: ", err) + } + fmt.Println(f) + + g.Expect(len(f)).To(Equal(2)) +} + +func TestGenerateCsv(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + var languageMap = make(map[string]map[string]processor.LanguageSummary) + var keys = []string{"Java", "Kotlin"} + languageMap["home"] = make(map[string]processor.LanguageSummary) + languageMap["home"]["Java"] = processor.LanguageSummary{} + + data := BuildClocCsvData(languageMap, keys) + + g.Expect(data[0]).To(Equal([]string{"package", "summary", "Java", "Kotlin"})) + g.Expect(data[1]).To(Equal([]string{"home", "0", "0", "0"})) +} + +func TestShouldBuildLanguageMap(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + codePath := "../../../_fixtures/cloc/summary/android.json" + codePath = filepath.FromSlash(codePath) + + var keys = []string{"Java", "Kotlin", "Phodal"} + languageMap := make(map[string]map[string]processor.LanguageSummary) + + BuildLanguageMap(languageMap, keys, codePath) + + g.Expect(len(languageMap["android"])).To(Equal(3)) + g.Expect(languageMap["android"]["Java"].Code).To(Equal(int64(381639))) + g.Expect(languageMap["android"]["Kotlin"].Code).To(Equal(int64(123963))) + g.Expect(languageMap["android"]["Phodal"].Code).To(Equal(int64(0))) +} diff --git a/pkg/domain/core_domain/code_annotation.go b/pkg/domain/core_domain/code_annotation.go new file mode 100644 index 0000000000000000000000000000000000000000..d9e3be75bde769d5c5c5820637621ffd0e3f14d6 --- /dev/null +++ b/pkg/domain/core_domain/code_annotation.go @@ -0,0 +1,41 @@ +package core_domain + +type AnnotationKeyValue struct { + Key string + Value string +} + +func NewAnnotationKeyValue(key string, value string) AnnotationKeyValue { + return AnnotationKeyValue{ + Key: key, + Value: value, + } +} + +type CodeAnnotation struct { + Name string + KeyValues []AnnotationKeyValue +} + +func NewAnnotation() CodeAnnotation { + return CodeAnnotation{ + Name: "", + KeyValues: nil, + } +} + +func (n *CodeAnnotation) IsComponentOrRepository() bool { + return n.Name == "Component" || n.Name == "Repository" +} + +func (n *CodeAnnotation) IsTest() bool { + return n.Name == "Test" +} + +func (n *CodeAnnotation) IsIgnoreTest() bool { + return n.Name == "Ignore" +} + +func (n *CodeAnnotation) IsIgnoreOrTest() bool { + return n.IsTest() || n.IsIgnoreTest() +} \ No newline at end of file diff --git a/pkg/domain/core_domain/code_call.go b/pkg/domain/core_domain/code_call.go new file mode 100644 index 0000000000000000000000000000000000000000..707e65b2c1e0136b085b2c62d34432213acced6a --- /dev/null +++ b/pkg/domain/core_domain/code_call.go @@ -0,0 +1,50 @@ +package core_domain + +import ( + "github.com/phodal/coca/pkg/infrastructure/constants" + "strings" +) + +type CodeCall struct { + Package string + Type string + NodeName string + FunctionName string + Parameters []CodeProperty + Position CodePosition +} + +func NewCodeMethodCall() CodeCall { + return CodeCall{} +} + +func (c *CodeCall) BuildFullMethodName() string { + isConstructor := c.FunctionName == "" + if isConstructor { + return c.Package + "." + c.NodeName + } + return c.Package + "." + c.NodeName + "." + c.FunctionName +} + +func (c *CodeCall) BuildClassFullName() string { + return c.Package + "." + c.NodeName +} + +func (c *CodeCall) IsSystemOutput() bool { + return c.NodeName == "System.out" && (c.FunctionName == "println" || c.FunctionName == "printf" || c.FunctionName == "print") +} + +func (c *CodeCall) IsThreadSleep() bool { + return c.FunctionName == "sleep" && c.NodeName == "Thread" +} + +func (c *CodeCall) HasAssertion() bool { + methodName := strings.ToLower(c.FunctionName) + for _, assertion := range constants.ASSERTION_LIST { + if strings.HasPrefix(methodName, assertion) { + return true + } + } + + return false +} diff --git a/pkg/domain/core_domain/code_data_struct.go b/pkg/domain/core_domain/code_data_struct.go new file mode 100644 index 0000000000000000000000000000000000000000..caeffd37813b71712a89cebce036e2f869c02d85 --- /dev/null +++ b/pkg/domain/core_domain/code_data_struct.go @@ -0,0 +1,92 @@ +package core_domain + +import "strings" + +type CodeDataStruct struct { + NodeName string + Type string + Package string + FilePath string + Fields []CodeField + Extend string + MultipleExtend []string // for C++ + Implements []string + Functions []CodeFunction + InnerStructures []CodeDataStruct + Annotations []CodeAnnotation + FunctionCalls []CodeCall // for field call + InOutProperties []CodeProperty //for golang interface + //Parameters []CodeProperty + Extension interface{} + Imports []CodeImport // deprecated: should get from code file +} + +func NewDataStruct() *CodeDataStruct { + return &CodeDataStruct{} +} + +func (d *CodeDataStruct) IsUtilClass() bool { + return strings.Contains(strings.ToLower(d.NodeName), "util") || strings.Contains(strings.ToLower(d.NodeName), "utils") +} + +func (d *CodeDataStruct) IsServiceClass() bool { + return strings.Contains(strings.ToLower(d.NodeName), "service") +} + +func (d *CodeDataStruct) SetMethodFromMap(methodMap map[string]CodeFunction) { + var methodsArray []CodeFunction + for _, value := range methodMap { + methodsArray = append(methodsArray, value) + } + + d.Functions = methodsArray +} + +func (d *CodeDataStruct) BuildStringMethodMap(projectMethods map[string]string) { + for _, method := range d.Functions { + projectMethods[method.BuildFullMethodName(*d)] = method.BuildFullMethodName(*d) + } +} + +func (d *CodeDataStruct) IsNotEmpty() bool { + return len(d.Functions) > 0 || len(d.FunctionCalls) > 0 +} + +func BuildCallMethodMap(deps []CodeDataStruct) map[string]CodeFunction { + var callMethodMap = make(map[string]CodeFunction) + for _, clz := range deps { + for _, method := range clz.Functions { + callMethodMap[method.BuildFullMethodName(clz)] = method + } + } + return callMethodMap +} + +func (d *CodeDataStruct) GetClassFullName() string { + return d.Package + "." + d.NodeName +} + +func BuildIdentifierMap(identifiers []CodeDataStruct) map[string]CodeDataStruct { + var identifiersMap = make(map[string]CodeDataStruct) + + for _, ident := range identifiers { + identifiersMap[ident.Package+"."+ident.NodeName] = ident + } + return identifiersMap +} + +func BuildDIMap(identifiers []CodeDataStruct, identifierMap map[string]CodeDataStruct) map[string]string { + var diMap = make(map[string]string) + for _, clz := range identifiers { + if len(clz.Annotations) > 0 { + for _, annotation := range clz.Annotations { + if (annotation.IsComponentOrRepository()) && len(clz.Implements) > 0 { + superClz := identifierMap[clz.Implements[0]] + diMap[superClz.GetClassFullName()] = superClz.GetClassFullName() + } + } + } + } + + return diMap +} diff --git a/pkg/domain/core_domain/code_dependency.go b/pkg/domain/core_domain/code_dependency.go new file mode 100644 index 0000000000000000000000000000000000000000..af9c933ee61bb56b559ff580901df9c62f8291ee --- /dev/null +++ b/pkg/domain/core_domain/code_dependency.go @@ -0,0 +1,18 @@ +package core_domain + +type CodeDependency struct { + GroupId string + ArtifactId string + Scope string + Type string + Version string + Optional bool +} + +func NewCodeDependency(group string, artifact string) *CodeDependency { + return &CodeDependency{ + GroupId: group, + ArtifactId: artifact, + Optional: false, + } +} diff --git a/pkg/domain/core_domain/code_field.go b/pkg/domain/core_domain/code_field.go new file mode 100644 index 0000000000000000000000000000000000000000..43806324a8acca32a077ebcf55f733961732e92f --- /dev/null +++ b/pkg/domain/core_domain/code_field.go @@ -0,0 +1,20 @@ +package core_domain + +type CodeField struct { + TypeType string + TypeValue string + Modifiers []string +} + +func NewJField(typeType string, typeValue string, modifier string) CodeField { + property := CodeField{ + TypeValue: typeValue, + TypeType: typeType, + } + + if modifier != "" { + property.Modifiers = append(property.Modifiers, modifier) + } + + return property +} diff --git a/pkg/domain/core_domain/code_file.go b/pkg/domain/core_domain/code_file.go new file mode 100644 index 0000000000000000000000000000000000000000..fb5e7c6ab23e222e1593945b9b142b8162e546af --- /dev/null +++ b/pkg/domain/core_domain/code_file.go @@ -0,0 +1,11 @@ +package core_domain + +type CodeContainer struct { + FullName string + PackageName string + Imports []CodeImport + Members []CodeMember + DataStructures []CodeDataStruct + Fields []CodeField + Containers []CodeContainer +} diff --git a/pkg/domain/core_domain/code_function.go b/pkg/domain/core_domain/code_function.go new file mode 100644 index 0000000000000000000000000000000000000000..ca8bef2d79bc8c94cf94e17a5ac203f9623814b8 --- /dev/null +++ b/pkg/domain/core_domain/code_function.go @@ -0,0 +1,71 @@ +package core_domain + +import ( + "github.com/phodal/coca/pkg/infrastructure/string_helper" + "strings" +) + +type CodeFunction struct { + Name string + ReturnType string + MultipleReturns []CodeProperty + Parameters []CodeProperty + FunctionCalls []CodeCall + Override bool + Annotations []CodeAnnotation + + IsConstructor bool // todo: move to extension + IsReturnNull bool // todo: move to extension + + Modifiers []string + InnerStructures []CodeDataStruct + InnerFunctions []CodeFunction + Extension interface{} + Position CodePosition +} + +func (m *CodeFunction) BuildSingleReturnType(typeType string) *CodeProperty { + return &CodeProperty{ + TypeType: typeType, + } +} + +func NewJMethod() CodeFunction { + return CodeFunction{} +} + +func (m *CodeFunction) IsJavaLangReturnType() bool { + return m.ReturnType == "String" || m.ReturnType == "int" || m.ReturnType == "float" || m.ReturnType == "void" || m.ReturnType == "char" || m.ReturnType == "double" +} + +func (m *CodeFunction) IsStatic() bool { + return string_helper.StringArrayContains(m.Modifiers, "static") +} + +func (m *CodeFunction) IsGetterSetter() bool { + return strings.HasPrefix(m.Name, "set") || strings.HasPrefix(m.Name, "get") +} + +func (m *CodeFunction) BuildFullMethodName(node CodeDataStruct) string { + return node.Package + "." + node.NodeName + "." + m.Name +} + +func (m *CodeFunction) GetAllCallString() []string { + var calls []string + for _, call := range m.FunctionCalls { + if call.NodeName != "" { + calls = append(calls, call.BuildFullMethodName()) + } + } + return calls +} + +func (m *CodeFunction) IsJunitTest() bool { + var isTest = false + for _, annotation := range m.Annotations { + if annotation.IsIgnoreOrTest() { + isTest = true + } + } + return isTest +} diff --git a/pkg/domain/core_domain/code_import.go b/pkg/domain/core_domain/code_import.go new file mode 100644 index 0000000000000000000000000000000000000000..47b9bf5082bfe0f6df1ee9f7cddc9bbb26325ce6 --- /dev/null +++ b/pkg/domain/core_domain/code_import.go @@ -0,0 +1,15 @@ +package core_domain + +type CodeImport struct { + Source string + AsName string + ImportName string + UsageName []string + Scope string // function, method or class +} + +func NewJImport(str string) CodeImport { + return CodeImport{ + Source: str, + } +} diff --git a/pkg/domain/core_domain/code_member.go b/pkg/domain/core_domain/code_member.go new file mode 100644 index 0000000000000000000000000000000000000000..eaf838c52edd3fa27ee814ea7ef69bd2b58e0b11 --- /dev/null +++ b/pkg/domain/core_domain/code_member.go @@ -0,0 +1,36 @@ +package core_domain + +type CodeMember struct { + ID string + AliasPackage string + Name string + Type string + Structures []CodeDataStruct + FunctionNodes []CodeFunction + Namespace []string + FileID string + DataStructID string + Position CodePosition +} + +func NewCodeMember() *CodeMember { + return &CodeMember{} +} + +func (c *CodeMember) BuildMemberId() { + IsDefaultFunction := c.DataStructID == "default" + if IsDefaultFunction { + for _, function := range c.FunctionNodes { + c.ID = c.AliasPackage + ":" + function.Name + } + } else { + packageName := c.FileID + if c.FileID != c.AliasPackage { + packageName = c.FileID + "|" + c.AliasPackage + } + if c.FileID == "" && c.AliasPackage != "" { + packageName = c.AliasPackage + } + c.ID = packageName + "::" + c.DataStructID + } +} diff --git a/pkg/domain/core_domain/code_module.go b/pkg/domain/core_domain/code_module.go new file mode 100644 index 0000000000000000000000000000000000000000..ee0a403e5f3d14d16861571d642f0bd49d734b14 --- /dev/null +++ b/pkg/domain/core_domain/code_module.go @@ -0,0 +1,6 @@ +package core_domain + +type CodeModule struct { + Packages []CodePackage + PackageInfo CodePackageInfo +} diff --git a/pkg/domain/core_domain/code_package.go b/pkg/domain/core_domain/code_package.go new file mode 100644 index 0000000000000000000000000000000000000000..fecaf3d5b01cc149e79aed0525ff6b3fe4df6a44 --- /dev/null +++ b/pkg/domain/core_domain/code_package.go @@ -0,0 +1,12 @@ +package core_domain + +type CodePackage struct { + Name string + ID string + CodeFiles []CodeContainer + Extension interface{} +} + +type GoCodePackage struct { + Fields []CodeField +} diff --git a/pkg/domain/core_domain/code_package_info.go b/pkg/domain/core_domain/code_package_info.go new file mode 100644 index 0000000000000000000000000000000000000000..4ca7d622f6ef64a3b1729557a7524bc041e818a2 --- /dev/null +++ b/pkg/domain/core_domain/code_package_info.go @@ -0,0 +1,6 @@ +package core_domain + +type CodePackageInfo struct { + ProjectName string + Dependencies []CodeDependency +} diff --git a/pkg/domain/core_domain/code_position.go b/pkg/domain/core_domain/code_position.go new file mode 100644 index 0000000000000000000000000000000000000000..0dc1cd734a9e533e11bc1326e655b86101f4721f --- /dev/null +++ b/pkg/domain/core_domain/code_position.go @@ -0,0 +1,9 @@ +package core_domain + +type CodePosition struct { + StartLine int + StartLinePosition int + StopLine int + StopLinePosition int +} + diff --git a/pkg/domain/core_domain/code_project.go b/pkg/domain/core_domain/code_project.go new file mode 100644 index 0000000000000000000000000000000000000000..7a295e191527cc98c89ca4c3f1cd9e172a4efb72 --- /dev/null +++ b/pkg/domain/core_domain/code_project.go @@ -0,0 +1,5 @@ +package core_domain + +type CodeProject struct { + Modules []CodeModule +} diff --git a/pkg/domain/core_domain/code_property.go b/pkg/domain/core_domain/code_property.go new file mode 100644 index 0000000000000000000000000000000000000000..c40f45df07c85384dee399e2d586fc311b850828 --- /dev/null +++ b/pkg/domain/core_domain/code_property.go @@ -0,0 +1,18 @@ +package core_domain + +type CodeProperty struct { + Modifiers []string + ParamName string + TypeValue string + TypeType string + ReturnTypes []CodeProperty + Parameters []CodeProperty +} + +func NewCodeParameter(typeType string, typeValue string) CodeProperty { + return CodeProperty{ + TypeValue: typeValue, + TypeType: typeType, + } +} + diff --git a/pkg/domain/support_domain/suggest.go b/pkg/domain/support_domain/suggest.go new file mode 100644 index 0000000000000000000000000000000000000000..f12120bd6f0a6bb7388fe2722fcff696af9f74d8 --- /dev/null +++ b/pkg/domain/support_domain/suggest.go @@ -0,0 +1,48 @@ +package api_domain + +import ( + "github.com/phodal/coca/pkg/domain/core_domain" + "strings" +) + +type Suggest struct { + File string + Package string + Class string + Pattern string + Reason string + Size int + Line int +} + +func NewSuggest(clz core_domain.CodeDataStruct, pattern, reason string) Suggest { + return Suggest{ + File: clz.FilePath, + Package: clz.Package, + Class: clz.NodeName, + Pattern: pattern, + Reason: reason, + } +} + +func MergeSuggest(clz core_domain.CodeDataStruct, currentSuggestList []Suggest) Suggest { + var suggest = NewSuggest(clz, "", "") + for _, s := range currentSuggestList { + if !strings.Contains(suggest.Pattern, s.Pattern) { + if suggest.Pattern != "" { + suggest.Pattern = suggest.Pattern + ", " + s.Pattern + } else { + suggest.Pattern = s.Pattern + } + } + + if !strings.Contains(suggest.Reason, s.Reason) { + if suggest.Reason != "" { + suggest.Reason = suggest.Reason + ", " + s.Reason + } else { + suggest.Reason = s.Reason + } + } + } + return suggest +} diff --git a/core/support/apriori/apriori.go b/pkg/infrastructure/apriori/apriori.go similarity index 96% rename from core/support/apriori/apriori.go rename to pkg/infrastructure/apriori/apriori.go index a5c9fdf2500dd0f9c9c68920bb7f25ebfeb50345..db16287da66ef510583bd0c67e66604f01ec1583 100644 --- a/core/support/apriori/apriori.go +++ b/pkg/infrastructure/apriori/apriori.go @@ -280,25 +280,23 @@ func (a *Apriori) generateSupportRecords(supportRecordChan chan SupportRecord, m supportRecordChan <- SupportRecord{[]string{}, -1} } -func (a *Apriori) generateRelationRecords(relationRecords chan RelationRecord, supportRecord SupportRecord, minConfidence float64, minLift float64) { - // Calculate ordered stats - filteredOrderedStatistics := a.filterOrderedStatistics( - a.generateOrderedStatistics(supportRecord), - minConfidence, - minLift) - - if len(filteredOrderedStatistics) != 0 { - relationRecords <- RelationRecord{supportRecord, filteredOrderedStatistics} - } -} +//func (a *Apriori) generateRelationRecords(relationRecords chan RelationRecord, supportRecord SupportRecord, minConfidence float64, minLift float64) { +// // Calculate ordered stats +// filteredOrderedStatistics := a.filterOrderedStatistics( +// a.generateOrderedStatistics(supportRecord), +// minConfidence, +// minLift) +// +// if len(filteredOrderedStatistics) != 0 { +// relationRecords <- RelationRecord{supportRecord, filteredOrderedStatistics} +// } +//} // Returns the Apriori candidates as a list. func (a *Apriori) createNextCandidates(prevCandidates [][]string, length int) [][]string { var items []string for _, candidate := range prevCandidates { - for _, item := range candidate { - items = append(items, item) - } + items = append(items, candidate...) } sort.Strings(items) items = a.uniqueItems(items) diff --git a/pkg/infrastructure/ast/ast_go/cocago_builder.go b/pkg/infrastructure/ast/ast_go/cocago_builder.go new file mode 100644 index 0000000000000000000000000000000000000000..57e2542e857a61d8d30e279f0f02be2d64d53096 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/cocago_builder.go @@ -0,0 +1,285 @@ +package ast_go + +import ( + "fmt" + . "github.com/phodal/coca/pkg/domain/core_domain" + "go/ast" + "reflect" + "strings" +) + +func BuildPropertyField(name string, field *ast.Field) *CodeProperty { + var typeName string + var typeType string + var params []CodeProperty + var results []CodeProperty + switch x := field.Type.(type) { + case *ast.Ident: + typeType = "Identify" + typeName = x.String() + case *ast.ArrayType: + typeType = "ArrayType" + switch typeX := x.Elt.(type) { + case *ast.Ident: + typeName = typeX.String() + case *ast.SelectorExpr: + typeName = getSelectorName(*typeX) + default: + fmt.Fprintf(output, "BuildPropertyField ArrayType %s\n", reflect.TypeOf(x.Elt)) + } + case *ast.FuncType: + typeType = "Function" + typeName = "func" + if x.Params != nil { + params = BuildFieldToProperty(x.Params.List) + } + if x.Results != nil { + results = BuildFieldToProperty(x.Results.List) + } + case *ast.StarExpr: + typeName = getStarExprName(*x) + typeType = "Star" + case *ast.SelectorExpr: + typeName = getSelectorName(*x) + case *ast.InterfaceType: + typeType = "interface{}" // todo: need check for all interface + typeName = "interface{}" + default: + fmt.Fprintf(output, "BuildPropertyField %s\n", reflect.TypeOf(x)) + } + + property := &CodeProperty{ + Modifiers: nil, + ParamName: name, + TypeType: typeType, + TypeValue: typeName, + ReturnTypes: results, + Parameters: params, + } + return property +} + +func getSelectorName(typeX ast.SelectorExpr) string { + return typeX.X.(*ast.Ident).String() + "." + typeX.Sel.Name +} + +func getStarExprName(starExpr ast.StarExpr) string { + switch x := starExpr.X.(type) { + case *ast.Ident: + return x.Name + case *ast.SelectorExpr: + return getSelectorName(*x) + default: + fmt.Println("getStarExprName", reflect.TypeOf(x)) + return "" + } +} + +func BuildFunction(x *ast.FuncDecl, file *CodeContainer) *CodeFunction { + codeFunc := &CodeFunction{ + Name: x.Name.String(), + } + + if x.Type.Params != nil { + parameters := BuildFieldToProperty(x.Type.Params.List) + codeFunc.Parameters = append(codeFunc.Parameters, parameters...) + } + + if x.Type.Results != nil { + codeFunc.MultipleReturns = append(codeFunc.Parameters, BuildFieldToProperty(x.Type.Results.List)...) + } + + fields := file.Fields + var localVars []CodeProperty + for _, param := range codeFunc.Parameters { + localVars = append(localVars, CodeProperty{ + TypeType: param.ParamName, + TypeValue: param.TypeValue, + }) + } + for _, item := range x.Body.List { + localVars, _ = BuildMethodCall(codeFunc, item, fields, localVars, file.Imports, file.PackageName) + } + return codeFunc +} + +func BuildFieldToProperty(fieldList []*ast.Field) []CodeProperty { + var properties []CodeProperty + for _, field := range fieldList { + property := BuildPropertyField(getFieldName(field), field) + properties = append(properties, *property) + } + return properties +} + +func BuildMethodCall(codeFunc *CodeFunction, item ast.Stmt, fields []CodeField, localVars []CodeProperty, imports []CodeImport, packageName string) ([]CodeProperty, CodeCall) { + var call CodeCall + switch it := item.(type) { + case *ast.ExprStmt: + BuildMethodCallExprStmt(it, codeFunc, fields, imports, packageName, localVars) + case *ast.DeferStmt: + call = BuildCallFromExpr(it.Call, codeFunc, fields, imports, packageName, localVars) + codeFunc.FunctionCalls = append(codeFunc.FunctionCalls, call) + case *ast.AssignStmt: + vars := BuildLocalVars(it, codeFunc, imports) + localVars = vars + case *ast.IfStmt: + case *ast.ReturnStmt: + for _, resultExpr := range it.Results { + typ, caller, callee := BuildExpr(resultExpr) + if typ == "call" { + var calls []CodeCall + for _, param := range codeFunc.Parameters { + if param.ParamName == caller { + target := ParseTarget(caller, fields, localVars, codeFunc) + packageName := getPackageName(target, callee, imports) + + call.Package = packageName + call.FunctionName = callee + call.NodeName = target + calls = append(calls, call) + } + } + + codeFunc.FunctionCalls = append(codeFunc.FunctionCalls, calls...) + } + } + default: + fmt.Fprintf(output, "methodCall %s\n", reflect.TypeOf(it)) + } + + return localVars, call +} + +func BuildLocalVars(it *ast.AssignStmt, codeFunc *CodeFunction, imports []CodeImport) []CodeProperty { + var vars []CodeProperty + for _, lh := range it.Lhs { + var left string + switch lhx := lh.(type) { + case *ast.Ident: + left = lhx.Name + } + + for _, expr := range it.Rhs { + typ, exprName, kind := BuildExpr(expr) + property := CodeProperty{ + TypeValue: left, + TypeType: kind, + } + + vars = append(vars, property) + + if typ == "call" { + packageName := getPackageName(exprName, "", imports) + if packageName != "" { + call := CodeCall{ + Package: packageName, + Type: "", + NodeName: exprName, + } + + codeFunc.FunctionCalls = append(codeFunc.FunctionCalls, call) + } + } + } + } + return vars +} + +func BuildMethodCallExprStmt(it *ast.ExprStmt, codeFunc *CodeFunction, fields []CodeField, imports []CodeImport, currentPackage string, localVars []CodeProperty) { + switch expr := it.X.(type) { + case *ast.CallExpr: + call := BuildCallFromExpr(expr, codeFunc, fields, imports, currentPackage, localVars) + codeFunc.FunctionCalls = append(codeFunc.FunctionCalls, call) + default: + fmt.Fprintf(output, "BuildMethodCallExprStmt: %s\n", reflect.TypeOf(expr)) + } +} + +func BuildCallFromExpr(expr *ast.CallExpr, codeFunc *CodeFunction, fields []CodeField, imports []CodeImport, currentPackage string, localVars []CodeProperty) CodeCall { + _, selector, selName := BuildExpr(expr.Fun.(ast.Expr)) + target := ParseTarget(selector, fields, localVars, codeFunc) + packageName := getPackageName(target, selector, imports) + if packageName == "" { + packageName = currentPackage + } + + call := CodeCall{ + Package: packageName, + Type: target, + NodeName: selector, + FunctionName: selName, + } + + for _, arg := range expr.Args { + if reflect.TypeOf(arg.(ast.Expr)).String() == "*ast.FuncLit" { + funcLit := arg.(ast.Expr).(*ast.FuncLit) + for _, item := range funcLit.Body.List { + _, methodCall := BuildMethodCall(codeFunc, item, fields, localVars, imports, packageName) + + if methodCall.NodeName != "" { + codeFunc.FunctionCalls = append(codeFunc.FunctionCalls, methodCall) + } + } + } + + _, value, kind := BuildExpr(arg.(ast.Expr)) + property := &CodeProperty{ + TypeValue: value, + TypeType: kind, + } + + call.Parameters = append(call.Parameters, *property) + } + return call +} + +func getPackageName(target string, selector string, imports []CodeImport) string { + packageName := "" + if strings.Contains(target, ".") { + split := strings.Split(target, ".") + for _, imp := range imports { + if strings.HasSuffix(imp.Source, split[0]) { + return split[0] + } + } + } + + for _, imp := range imports { + if imp.Source == target { + return target + } + } + + for _, member := range identCodeMembers { + if member.DataStructID == target { + return member.AliasPackage + } + } + + packageName = currentPackage.Name + return packageName +} + +func ParseTarget(selector string, fields []CodeField, localVars []CodeProperty, codeFunc *CodeFunction) string { + if codeFunc != nil { + for _, param := range codeFunc.Parameters { + if param.ParamName == selector { + return param.TypeValue + } + } + } + for _, localVar := range localVars { + if selector == localVar.TypeValue { + return localVar.TypeType + } + } + + for _, field := range fields { + if field.TypeValue == selector { + return field.TypeType + } + } + + return selector +} diff --git a/pkg/infrastructure/ast/ast_go/cocago_parser.go b/pkg/infrastructure/ast/ast_go/cocago_parser.go new file mode 100644 index 0000000000000000000000000000000000000000..2a892a036f2df70fd5b8eaed528d3687610082e2 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/cocago_parser.go @@ -0,0 +1,358 @@ +package ast_go + +import ( + "bytes" + "flag" + "fmt" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/yourbasic/radix" + "go/ast" + "go/parser" + "go/token" + "io" + "io/ioutil" + "os" + "path/filepath" + "reflect" + "strings" +) + +var currentPackage *core_domain.CodePackage +var identCodeMembers []core_domain.CodeMember + +type CocagoParser struct { + CodeMembers []core_domain.CodeMember + PackageManager core_domain.CodePackageInfo +} + +var output io.Writer + +func NewCocagoParser() *CocagoParser { + currentPackage = &core_domain.CodePackage{} + output = os.Stdout + if flag.Lookup("test") == nil { + output = new(bytes.Buffer) + } + return &CocagoParser{} +} + +func (n *CocagoParser) SetOutput(out io.Writer) io.Writer { + output = out + return output +} + +func (n *CocagoParser) ProcessFile(fileName string) core_domain.CodeContainer { + absPath, _ := filepath.Abs(fileName) + content, _ := ioutil.ReadFile(absPath) + + fmt.Fprintf(output, "process file %s\n", fileName) + + code := string(content) + + codeFile := n.ProcessString(code, fileName, nil) + return *codeFile +} + +func (n *CocagoParser) ProcessString(code string, fileName string, codeMembers []core_domain.CodeMember) *core_domain.CodeContainer { + identCodeMembers = codeMembers + n.CodeMembers = codeMembers + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, fileName, code, 0) + if err != nil { + panic(err) + } + + codeFile := n.Visitor(f, fset, fileName) + currentPackage.CodeFiles = append(currentPackage.CodeFiles, *codeFile) + return codeFile +} + +func (n *CocagoParser) IdentAnalysis(code string, fileName string) *core_domain.CodeContainer { + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, fileName, code, 0) + if err != nil { + panic(err) + } + + codeFile := n.Visitor(f, fset, fileName) + return codeFile +} + +func (n *CocagoParser) Visitor(f *ast.File, fset *token.FileSet, fileName string) *core_domain.CodeContainer { + var currentStruct core_domain.CodeDataStruct + var currentFile core_domain.CodeContainer + var currentFunc *core_domain.CodeFunction + var dsMap = make(map[string]*core_domain.CodeDataStruct) + + packageName := BuildImportName(fileName) + currentFile.FullName = packageName + currentPackage.Name = packageName + + var funcType = "" + var lastIdent = "" + + ast.Inspect(f, func(node ast.Node) bool { + switch x := node.(type) { + case *ast.Ident: + lastIdent = x.Name + case *ast.File: + currentFile.PackageName = x.Name.String() + case *ast.ImportSpec: + imp := BuildImport(x, fileName, n.PackageManager) + currentFile.Imports = append(currentFile.Imports, *imp) + case *ast.ValueSpec: + names := x.Names + for _, name := range names { + _, selSource, selName := BuildValSpec(x.Type) + field := core_domain.CodeField{ + TypeType: selSource + "." + selName, + TypeValue: name.Name, + } + + currentFile.Fields = append(currentFile.Fields, field) + } + case *ast.TypeSpec: + currentStruct = core_domain.CodeDataStruct{} + currentStruct.NodeName = x.Name.Name + currentStruct.Package = currentFile.PackageName + //currentStruct.FilePath = BuildImportName(fileName) + dsMap[currentStruct.NodeName] = ¤tStruct + case *ast.StructType: + AddStructType(currentStruct.NodeName, x, ¤tFile, dsMap) + case *ast.FuncDecl: + funcType = "FuncDecl" + currentFunc, recv := AddFunctionDecl(x, ¤tFile) + if recv != "" { + dsMap[recv].Functions = append(dsMap[recv].Functions, *currentFunc) + } + case *ast.FuncType: + if funcType != "FuncDecl" { + AddNestedFunction(currentFunc, x) + } + + funcType = "" + case *ast.InterfaceType: + // todo: dirty fix + if len(x.Methods.List) < 1 { + break + } + currentStruct := AddInterface(x, lastIdent, ¤tFile) + dsMap[currentStruct.NodeName] = ¤tStruct + default: + if reflect.TypeOf(x) != nil && reflect.TypeOf(output).String() != "*bytes.Buffer" { + //fmt.Fprintf(output, "Visitor case %s\n", reflect.TypeOf(x)) + } + } + return true + }) + + currentFile.DataStructures = nil + for _, ds := range dsMap { + currentFile.DataStructures = append(currentFile.DataStructures, *ds) + } + SortInterface(currentFile.DataStructures) + + return ¤tFile +} + +func (n *CocagoParser) SetPackageManager(manager core_domain.CodePackageInfo) { + n.PackageManager = manager +} + +func BuildValSpec(expr ast.Expr) (string, string, string) { + switch x := expr.(type) { + case *ast.StarExpr: + return BuildExpr(x.X) + default: + fmt.Fprintf(output, "Visitor case %s\n", reflect.TypeOf(x)) + } + return "", "", "" +} + +func SortInterface(slice []core_domain.CodeDataStruct) { + radix.SortSlice(slice, func(i int) string { return slice[i].NodeName }) +} + +func BuildImport(x *ast.ImportSpec, fileName string, manager core_domain.CodePackageInfo) *core_domain.CodeImport { + path := x.Path.Value + cleanPath := path[1 : len(path)-1] + asName := "" + if x.Name != nil { + asName = x.Name.String() + } + moduleName := manager.ProjectName + if moduleName == "" { + moduleName = "github.com/phodal/coca" + } + withOutModuleName := strings.ReplaceAll(cleanPath, moduleName, "") + all := strings.ReplaceAll(withOutModuleName, "/", ".") + if strings.HasPrefix(all, ".") { + all = all[1:] + } + imp := &core_domain.CodeImport{ + Source: all, + AsName: asName, + ImportName: "", + UsageName: nil, + Scope: "", + } + + return imp +} + +func BuildImportName(fileName string) string { + fileName = filepath.FromSlash(fileName) + splitFileName := strings.Split(fileName, string(filepath.Separator)) + importName := "" + if len(splitFileName) > 2 { + importName = strings.Join(splitFileName[:len(splitFileName)-1], ".") + } + if strings.HasPrefix(importName, ".") { + importName = importName[1:] + } + return importName +} + +func AddInterface(x *ast.InterfaceType, ident string, codeFile *core_domain.CodeContainer) core_domain.CodeDataStruct { + properties := BuildFieldToProperty(x.Methods.List) + + dataStruct := core_domain.CodeDataStruct{ + NodeName: ident, + InOutProperties: properties, + } + + member := core_domain.NewCodeMember() + member.DataStructID = ident + member.Type = "interface" + setMemberPackageInfo(member, codeFile) + + codeFile.Members = append(codeFile.Members, *member) + + return dataStruct +} + +func setMemberPackageInfo(member *core_domain.CodeMember, codeFile *core_domain.CodeContainer) { + member.AliasPackage = codeFile.PackageName + member.FileID = codeFile.FullName + member.BuildMemberId() +} + +func AddNestedFunction(currentFunc *core_domain.CodeFunction, x *ast.FuncType) { + +} + +func AddFunctionDecl(x *ast.FuncDecl, currentFile *core_domain.CodeContainer) (*core_domain.CodeFunction, string) { + recv := "" + if x.Recv != nil { + recv = BuildReceiver(x, recv) + } + codeFunc := BuildFunction(x, currentFile) + + if recv == "" { + member := &core_domain.CodeMember{ + DataStructID: "default", + Type: "method", + } + + member.FunctionNodes = append(member.FunctionNodes, *codeFunc) + setMemberPackageInfo(member, currentFile) + currentFile.Members = append(currentFile.Members, *member) + } + + return codeFunc, recv +} + +func BuildReceiver(x *ast.FuncDecl, recv string) string { + for _, item := range x.Recv.List { + switch x := item.Type.(type) { + case *ast.StarExpr: + recv = getStarExprName(*x) + case *ast.Ident: + recv = x.Name + default: + fmt.Fprintf(output, "AddFunctionDecl %s\n", reflect.TypeOf(x)) + } + } + return recv +} + +func BuildExpr(expr ast.Expr) (string, string, string) { + switch x := expr.(type) { + case *ast.SelectorExpr: + selector := "" + switch sele := x.X.(type) { + case *ast.Ident: + selector = sele.String() + case *ast.IndexExpr: + _, indexVar, _ := BuildExpr(sele.X) + selector = indexVar + default: + fmt.Println("BuildExpr selector", reflect.TypeOf(sele)) + } + + selName := x.Sel.Name + return "selector", selector, selName + case *ast.BasicLit: + return "basiclit", x.Value, x.Kind.String() + case *ast.Ident: + name := "" + if x.Obj != nil { + name = x.Obj.Kind.String() + } + return "ident", x.Name, name + case *ast.CallExpr: + _, value, _ := BuildExpr(x.Fun) + var callArgs []string + for _, arg := range x.Args { + argType, argValue, argKind := BuildExpr(arg) + if argType == "selector" { + callArgs = append(callArgs, argValue+"."+argKind) + } + } + return "call", value, strings.Join(callArgs, ",") + case *ast.FuncLit: + // inner function + case *ast.TypeAssertExpr: + case *ast.BinaryExpr: + _, val, s2 := BuildExpr(x.X) + return "call", val, s2 + default: + fmt.Fprintf(output, "BuildExpr %s\n", reflect.TypeOf(x)) + } + return "", "", "" +} + +func getFieldName(field *ast.Field) string { + if len(field.Names) < 1 { + return "" + } + return field.Names[0].Name +} + +func AddStructType(currentNodeName string, x *ast.StructType, currentFile *core_domain.CodeContainer, dsMap map[string]*core_domain.CodeDataStruct) { + member := core_domain.NewCodeMember() + member.DataStructID = currentNodeName + member.Type = "struct" + setMemberPackageInfo(member, currentFile) + + var ioproperties []core_domain.CodeProperty + var calls []core_domain.CodeCall + for _, field := range x.Fields.List { + property := BuildPropertyField(getFieldName(field), field) + member.FileID = currentFile.FullName + ioproperties = append(ioproperties, *property) + + call := core_domain.CodeCall{ + Package: getPackageName(property.TypeValue, "", currentFile.Imports), + NodeName: property.TypeValue, + } + calls = append(calls, call) + } + + // todo : when dsMap key-value create it + if dsMap[currentNodeName] != nil { + dsMap[currentNodeName].InOutProperties = ioproperties + dsMap[currentNodeName].FunctionCalls = append(dsMap[currentNodeName].FunctionCalls, calls...) + } + currentFile.Members = append(currentFile.Members, *member) +} diff --git a/pkg/infrastructure/ast/ast_go/cocago_parser_test.go b/pkg/infrastructure/ast/ast_go/cocago_parser_test.go new file mode 100644 index 0000000000000000000000000000000000000000..3d8d8c6d17bcfb20ae37285ecf38029e983d6c6e --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/cocago_parser_test.go @@ -0,0 +1,185 @@ +package ast_go + +import ( + . "github.com/onsi/gomega" + "github.com/phodal/coca/cocatest" + "io/ioutil" + "os" + "testing" +) + +func TestMain(m *testing.M) { + setup() + code := m.Run() + shutdown() + os.Exit(code) +} + +var testParser *CocagoParser + +func setup() { + testParser = NewCocagoParser() + //buf := new(bytes.Buffer) + //testParser.SetOutput(buf) +} + +func shutdown() { + testParser = nil +} + +func TestCocagoParser_ProcessFile(t *testing.T) { + tests := []struct { + name string + fileName string + }{ + { + "data_struct_property", + "data_struct_property", + }, + { + "struct_with_func", + "struct_with_func", + }, + { + "struct_with_func_decl", + "struct_with_func_decl", + }, + { + "struct_type_zero", + "struct_type_zero", + }, + { + "normal_method", + "normal_method", + }, + { + "hello_world", + "hello_world", + }, + { + "multiple_method_call", + "multiple_method_call", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + filePath := getFilePath(tt.fileName) + if got := testParser.ProcessFile(filePath + ".code"); !cocatest.JSONFileBytesEqual(got, filePath+".json") { + t.Errorf("ProcessFile() = %v, want %v", got, tt.fileName) + } + }) + } +} + +func Test_Method_Call(t *testing.T) { + tests := []struct { + name string + fileName string + }{ + { + "local_var_method_call", + "local_var_method_call", + }, + { + "param_method_call", + "param_method_call", + }, + { + "var_inside_method_with_call", + "var_inside_method_with_call", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + filePath := "testdata/method_call/" + tt.fileName + if got := testParser.ProcessFile(filePath + ".code"); !cocatest.JSONFileBytesEqual(got, filePath+".json") { + t.Errorf("ProcessFile() = %v, want %v", got, tt.fileName) + } + }) + } +} + +func getFilePath(name string) string { + return "testdata/node_infos/" + name +} + +func Test_MemberFunctionNodesForTwoMethod(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + filePath := getFilePath("normal_method") + results := testParser.ProcessFile(filePath + ".code") + g.Expect(len(results.Members)).To(Equal(2)) + g.Expect(len(results.Members[0].FunctionNodes)).To(Equal(1)) + g.Expect(len(results.Members[1].FunctionNodes)).To(Equal(1)) +} + +func Test_basic_interface(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + filePath := getFilePath("basic_interface") + results := testParser.ProcessFile(filePath + ".code") + g.Expect(cocatest.JSONFileBytesEqual(results, filePath+".json")).To(Equal(true)) +} + +func Test_IdentFuncMember(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + code, _ := ioutil.ReadFile("testdata/node_infos/normal_method.code") + results := testParser.IdentAnalysis(string(code), "core_domain:CodeDataStruct") + g.Expect(results.Members[0].ID).To(Equal("testdata:ProcessTsString")) +} + +func Test_RelatedImport(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + results := testParser.ProcessString(` +package goapp + +import ( + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/cocago" +) + +type GoIdentApp struct { + Extensions interface{} +} + +func (g *GoIdentApp) Analysis(code string, fileName string) core_domain.CodeFile { + parser := cocago.NewCocagoParser() + var imports []core_domain.CodeImport + if g.Extensions != nil { + imports = g.Extensions.([]core_domain.CodeImport) + } + return *parser.ProcessString(code, fileName, imports) +} +`, "call", nil) + + g.Expect(len(results.DataStructures)).To(Equal(1)) +} +func Test_ShowShowSelfMethodCall(t *testing.T) { + t.Parallel() + g := NewGomegaWithT(t) + + results := testParser.ProcessString(` +package node_infos + +import "fmt" + +func ShowChangeLogSummary() { + changeMap := BuildChangeMap(commits) + fmt.Println(changeMap) +} + +func BuildChangeMap() { + UpdateMessageForChange() +} + +`, "self_method_call.go", nil) + + g.Expect(len(results.Members)).To(Equal(2)) + g.Expect(len(results.Members[0].FunctionNodes[0].FunctionCalls)).To(Equal(1)) +} diff --git a/pkg/infrastructure/ast/ast_go/cocago_regression_test.go b/pkg/infrastructure/ast/ast_go/cocago_regression_test.go new file mode 100644 index 0000000000000000000000000000000000000000..215a78dc3f52a7907fa692829b6cf3cb812f12c2 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/cocago_regression_test.go @@ -0,0 +1,15 @@ +package ast_go + +func getRegressionFile(name string) string { + return "testdata/regression/" + name +} + +// todo: fix package issues with input +//func Test_Regression1(t *testing.T) { +// t.Parallel() +// g := NewGomegaWithT(t) +// +// filePath := getRegressionFile("coll_stack") +// results := testParser.ProcessFile(filePath + ".code") +// g.Expect(cocatest.JSONFileBytesEqual(results, filePath+".json")).To(Equal(true)) +//} diff --git a/pkg/infrastructure/ast/ast_go/parser_panic_test.go b/pkg/infrastructure/ast/ast_go/parser_panic_test.go new file mode 100644 index 0000000000000000000000000000000000000000..98955997dbe73d88243b9bb3cefd1a0dd2bcdb8e --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/parser_panic_test.go @@ -0,0 +1,17 @@ +package ast_go + +import ( + "github.com/phodal/coca/cocatest" + "path/filepath" + "testing" +) + +func Test_ShouldPainWhenReadFileError(t *testing.T) { + t.Parallel() + cocatest.AssertPanic(t, errorReadFile) +} + +func errorReadFile() { + abs, _ := filepath.Abs("../../pkg/domain/code_file.go2") + testParser.ProcessFile(abs) +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/method_call/local_var_method_call.code b/pkg/infrastructure/ast/ast_go/testdata/method_call/local_var_method_call.code new file mode 100644 index 0000000000000000000000000000000000000000..842bf7cdc741018e41f6e54e7e1af0b179bd439b --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/method_call/local_var_method_call.code @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" + "sync" +) + +var l *sync.Mutex + +func main() { + l = new(sync.Mutex) + l.Lock() + defer l.Unlock() + fmt.Println("1") +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/method_call/local_var_method_call.json b/pkg/infrastructure/ast/ast_go/testdata/method_call/local_var_method_call.json new file mode 100644 index 0000000000000000000000000000000000000000..9aa89458c4279c2222d545338eacde493eb7e848 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/method_call/local_var_method_call.json @@ -0,0 +1,132 @@ +{ + "Containers": null, + "DataStructures": null, + "Fields": [ + { + "Modifiers": null, + "TypeType": "sync.Mutex", + "TypeValue": "l" + } + ], + "FullName": "testdata.method_call", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "fmt", + "UsageName": null + }, + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "sync", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "main", + "DataStructID": "default", + "FileID": "testdata.method_call", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "new", + "Package": "testdata.method_call", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "Lock", + "NodeName": "l", + "Package": "sync", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "sync.Mutex" + }, + { + "FunctionName": "Unlock", + "NodeName": "l", + "Package": "sync", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "sync.Mutex" + }, + { + "FunctionName": "Println", + "NodeName": "fmt", + "Package": "fmt", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "STRING", + "TypeValue": "\"1\"" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "fmt" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "main", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "main:main", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "main" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/method_call/param_method_call.code b/pkg/infrastructure/ast/ast_go/testdata/method_call/param_method_call.code new file mode 100644 index 0000000000000000000000000000000000000000..ef6d50c400d2ba965a5065e24d5c348fcfd25390 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/method_call/param_method_call.code @@ -0,0 +1,9 @@ +package api_domain + +import "sort" + +func SortAPIs(callAPIs []CallAPI) { + sort.Slice(callAPIs, func(i, j int) bool { + return callAPIs[i].Size < callAPIs[j].Size + }) +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/method_call/param_method_call.json b/pkg/infrastructure/ast/ast_go/testdata/method_call/param_method_call.json new file mode 100644 index 0000000000000000000000000000000000000000..8f149fc2837b225e6df9ea52321ec7405bcf99de --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/method_call/param_method_call.json @@ -0,0 +1,123 @@ +{ + "Containers": null, + "DataStructures": null, + "Fields": null, + "FullName": "testdata.method_call", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "sort", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "api_domain", + "DataStructID": "default", + "FileID": "testdata.method_call", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "Size", + "NodeName": "CallAPI", + "Package": "testdata.method_call", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "Size", + "NodeName": "CallAPI", + "Package": "testdata.method_call", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "Slice", + "NodeName": "sort", + "Package": "sort", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "var", + "TypeValue": "callAPIs" + }, + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "", + "TypeValue": "" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "sort" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "SortAPIs", + "Override": false, + "Parameters": [ + { + "Modifiers": null, + "ParamName": "callAPIs", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "ArrayType", + "TypeValue": "CallAPI" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "api_domain:SortAPIs", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "api_domain" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/method_call/var_inside_method_with_call.code b/pkg/infrastructure/ast/ast_go/testdata/method_call/var_inside_method_with_call.code new file mode 100644 index 0000000000000000000000000000000000000000..5cb7be7589c43813b96da4f5b833fe0569d62524 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/method_call/var_inside_method_with_call.code @@ -0,0 +1,13 @@ +package main + +import ( + "fmt" + "sync" +) + +func main() { + l := new(sync.Mutex) + l.Lock() + defer l.Unlock() + fmt.Println("1") +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/method_call/var_inside_method_with_call.json b/pkg/infrastructure/ast/ast_go/testdata/method_call/var_inside_method_with_call.json new file mode 100644 index 0000000000000000000000000000000000000000..d52dca83c847608edeeba463064563eb2f469121 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/method_call/var_inside_method_with_call.json @@ -0,0 +1,126 @@ +{ + "Containers": null, + "DataStructures": null, + "Fields": null, + "FullName": "testdata.method_call", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "fmt", + "UsageName": null + }, + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "sync", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "main", + "DataStructID": "default", + "FileID": "testdata.method_call", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "new", + "Package": "testdata.method_call", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "Lock", + "NodeName": "l", + "Package": "sync", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "sync.Mutex" + }, + { + "FunctionName": "Unlock", + "NodeName": "l", + "Package": "sync", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "sync.Mutex" + }, + { + "FunctionName": "Println", + "NodeName": "fmt", + "Package": "fmt", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "STRING", + "TypeValue": "\"1\"" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "fmt" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "main", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "main:main", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "main" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/anonymous_methods.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/anonymous_methods.code new file mode 100644 index 0000000000000000000000000000000000000000..ff95e58bf4693b5609d065b1c9e88bca57ea1aba --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/anonymous_methods.code @@ -0,0 +1,16 @@ +package testdata + +import "fmt" +import . "time" + +func AnonymousMethods() { + lambd := func(s string) { + Sleep(10) + fmt.Println(s) + } + + lambd("From lambda!") + func() { + fmt.Println("Create and invoke!") + }() +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/basic_interface.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/basic_interface.code new file mode 100644 index 0000000000000000000000000000000000000000..853cdc99ef9172b175c33eeba1198e499ce59ac0 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/basic_interface.code @@ -0,0 +1,15 @@ +package testdata + + +type Shape interface { + Area(a float64) float64 +} + +type Object interface { + Volume() float64 +} + +type Material interface { + Shape + Object +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/basic_interface.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/basic_interface.json new file mode 100644 index 0000000000000000000000000000000000000000..6af7c2aa43f9f040a9240b0b7aadba139b448235 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/basic_interface.json @@ -0,0 +1,175 @@ +{ + "Containers": null, + "DataStructures": [ + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": null, + "Functions": null, + "Implements": null, + "Imports": null, + "InOutProperties": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "Shape" + }, + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "Object" + } + ], + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "Material", + "Package": "", + "Type": "" + }, + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": null, + "Functions": null, + "Implements": null, + "Imports": null, + "InOutProperties": [ + { + "Modifiers": null, + "ParamName": "Volume", + "Parameters": null, + "ReturnTypes": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "float64" + } + ], + "TypeType": "Function", + "TypeValue": "func" + } + ], + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "Object", + "Package": "", + "Type": "" + }, + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": null, + "Functions": null, + "Implements": null, + "Imports": null, + "InOutProperties": [ + { + "Modifiers": null, + "ParamName": "Area", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "a", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "float64" + } + ], + "ReturnTypes": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "float64" + } + ], + "TypeType": "Function", + "TypeValue": "func" + } + ], + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "Shape", + "Package": "", + "Type": "" + } + ], + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": null, + "Members": [ + { + "AliasPackage": "testdata", + "DataStructID": "Shape", + "FileID": "testdata.node_infos", + "FunctionNodes": null, + "ID": "testdata.node_infos|testdata::Shape", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "interface" + }, + { + "AliasPackage": "testdata", + "DataStructID": "Object", + "FileID": "testdata.node_infos", + "FunctionNodes": null, + "ID": "testdata.node_infos|testdata::Object", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "interface" + }, + { + "AliasPackage": "testdata", + "DataStructID": "Material", + "FileID": "testdata.node_infos", + "FunctionNodes": null, + "ID": "testdata.node_infos|testdata::Material", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "interface" + } + ], + "PackageName": "testdata" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/data_struct_property.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/data_struct_property.code new file mode 100644 index 0000000000000000000000000000000000000000..cf575581eeda62d07d27ae7325ec75492a5c2dfb --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/data_struct_property.code @@ -0,0 +1,11 @@ +package trial + +import "github.com/phodal/coca/pkg/domain" + +type CodeFile struct { + FullName string + PackageName string + Imports []string + Members []CodeMember + ClassNodes []domain.JClassNode +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/data_struct_property.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/data_struct_property.json new file mode 100644 index 0000000000000000000000000000000000000000..32be710b1e88fa11268e5dece81699d99cba8925 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/data_struct_property.json @@ -0,0 +1,160 @@ +{ + "Containers": null, + "DataStructures": [ + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "string", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "string", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "string", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "CodeMember", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "domain.JClassNode", + "Package": "domain", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "Functions": null, + "Implements": null, + "Imports": null, + "InOutProperties": [ + { + "Modifiers": null, + "ParamName": "FullName", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "string" + }, + { + "Modifiers": null, + "ParamName": "PackageName", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "string" + }, + { + "Modifiers": null, + "ParamName": "Imports", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "ArrayType", + "TypeValue": "string" + }, + { + "Modifiers": null, + "ParamName": "Members", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "ArrayType", + "TypeValue": "CodeMember" + }, + { + "Modifiers": null, + "ParamName": "ClassNodes", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "ArrayType", + "TypeValue": "domain.JClassNode" + } + ], + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "CodeFile", + "Package": "trial", + "Type": "" + } + ], + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "pkg.domain", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "trial", + "DataStructID": "CodeFile", + "FileID": "testdata.node_infos", + "FunctionNodes": null, + "ID": "testdata.node_infos|trial::CodeFile", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "struct" + } + ], + "PackageName": "trial" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/hello_world.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/hello_world.code new file mode 100644 index 0000000000000000000000000000000000000000..bb0095c31d6367b6413c9313fe0395f15dd66980 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/hello_world.code @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("hello, world") +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/hello_world.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/hello_world.json new file mode 100644 index 0000000000000000000000000000000000000000..c0696f3f9c64efff2ec5dabf34a44f788c402cef --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/hello_world.json @@ -0,0 +1,80 @@ +{ + "Containers": null, + "DataStructures": null, + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "fmt", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "main", + "DataStructID": "default", + "FileID": "testdata.node_infos", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "Println", + "NodeName": "fmt", + "Package": "fmt", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "STRING", + "TypeValue": "\"hello, world\"" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "fmt" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "main", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "main:main", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "main" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/multiple_method_call.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/multiple_method_call.code new file mode 100644 index 0000000000000000000000000000000000000000..8d346f3dcf73fe353f6f952946aa7b1b3038fb0f --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/multiple_method_call.code @@ -0,0 +1,26 @@ +package samples + +import ( + "fmt" + "time" +) + +func Ch() { + var ball = make(chan string) + kickBall := func(playerName string) { + for { + fmt.Println(<-ball, "kicked the ball.") + time.Sleep(time.Second) + ball <- playerName + } + } + go kickBall("John") + go kickBall("Alice") + go kickBall("Bob") + go kickBall("Emily") + time.Sleep(time.Second * 2) + ball <- "referee" // kick off + + var c chan bool // nil + <-c // blocking here for ever +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/multiple_method_call.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/multiple_method_call.json new file mode 100644 index 0000000000000000000000000000000000000000..5882fcb828a8c94def978e3617d4c7a71b46ce92 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/multiple_method_call.json @@ -0,0 +1,98 @@ +{ + "Containers": null, + "DataStructures": null, + "Fields": [ + { + "Modifiers": null, + "TypeType": ".", + "TypeValue": "ball" + }, + { + "Modifiers": null, + "TypeType": ".", + "TypeValue": "c" + } + ], + "FullName": "testdata.node_infos", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "fmt", + "UsageName": null + }, + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "time", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "samples", + "DataStructID": "default", + "FileID": "testdata.node_infos", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "Sleep", + "NodeName": "time", + "Package": "time", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Second", + "TypeValue": "time" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "time" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "Ch", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "samples:Ch", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "samples" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/nested_method.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/nested_method.code new file mode 100644 index 0000000000000000000000000000000000000000..124e4886d3a4fceea98d8f5fb78e201597380679 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/nested_method.code @@ -0,0 +1,11 @@ +package testdata + +import "fmt" + +func f() { + foo := func(s string) { + fmt.Println(s) + } + + foo("Hello World!") +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/nested_method.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/nested_method.json new file mode 100644 index 0000000000000000000000000000000000000000..7f605bc50533055c04acd1906b2ded0e08166543 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/nested_method.json @@ -0,0 +1,80 @@ +{ + "Containers": null, + "DataStructures": null, + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "fmt", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "testdata", + "DataStructID": "default", + "FileID": "testdata.node_infos", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "var", + "NodeName": "foo", + "Package": "testdata.node_infos", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "STRING", + "TypeValue": "\"Hello World!\"" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "f", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "testdata:f", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "testdata" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/normal_method.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/normal_method.code new file mode 100644 index 0000000000000000000000000000000000000000..7a51997c787fdc7ac78fb3818ddc8ee375d51e7a --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/normal_method.code @@ -0,0 +1,18 @@ +package testdata + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + parser "github.com/phodal/coca/languages/ts" +) + +func ProcessTsString(code string) *parser.TypeScriptParser { + is := antlr.NewInputStream(code) + return processStream(is) +} + +func processStream(is antlr.CharStream) *parser.TypeScriptParser { + lexer := parser.NewTypeScriptLexer(is) + stream := antlr.NewCommonTokenStream(lexer, 0) + parser := parser.NewTypeScriptParser(stream) + return parser +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/normal_method.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/normal_method.json new file mode 100644 index 0000000000000000000000000000000000000000..1a569d95e4d91859d772cd7a28adb8161b317b12 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/normal_method.json @@ -0,0 +1,209 @@ +{ + "Containers": null, + "DataStructures": null, + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "github.com.antlr.antlr4.runtime.Go.antlr", + "UsageName": null + }, + { + "AsName": "parser", + "ImportName": "", + "Scope": "", + "Source": "languages.ts", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "testdata", + "DataStructID": "default", + "FileID": "testdata.node_infos", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "antlr", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": [ + { + "Modifiers": null, + "ParamName": "code", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "string" + }, + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Star", + "TypeValue": "parser.TypeScriptParser" + } + ], + "Name": "ProcessTsString", + "Override": false, + "Parameters": [ + { + "Modifiers": null, + "ParamName": "code", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "string" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "testdata:ProcessTsString", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + }, + { + "AliasPackage": "testdata", + "DataStructID": "default", + "FileID": "testdata.node_infos", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "parser", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "antlr", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "parser", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": [ + { + "Modifiers": null, + "ParamName": "is", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "", + "TypeValue": "antlr.CharStream" + }, + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Star", + "TypeValue": "parser.TypeScriptParser" + } + ], + "Name": "processStream", + "Override": false, + "Parameters": [ + { + "Modifiers": null, + "ParamName": "is", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "", + "TypeValue": "antlr.CharStream" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "testdata:processStream", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "testdata" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_type_zero.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_type_zero.code new file mode 100644 index 0000000000000000000000000000000000000000..f386bafea33bb498d2ee16a3e8f59c54eb26af92 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_type_zero.code @@ -0,0 +1,8 @@ +package testdata + +type O struct { +} + +func (O) typee() { + +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_type_zero.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_type_zero.json new file mode 100644 index 0000000000000000000000000000000000000000..df9cc46a2deef63d90abc5f32f7f9aa12217d4a8 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_type_zero.json @@ -0,0 +1,67 @@ +{ + "Containers": null, + "DataStructures": [ + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": null, + "Functions": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": null, + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "typee", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "Implements": null, + "Imports": null, + "InOutProperties": null, + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "O", + "Package": "testdata", + "Type": "" + } + ], + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": null, + "Members": [ + { + "AliasPackage": "testdata", + "DataStructID": "O", + "FileID": "testdata.node_infos", + "FunctionNodes": null, + "ID": "testdata.node_infos|testdata::O", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "struct" + } + ], + "PackageName": "testdata" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func.code new file mode 100644 index 0000000000000000000000000000000000000000..b28307f56b331c46f529a0b90de6a3958611ed3a --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func.code @@ -0,0 +1,7 @@ +package testdata + +type Person struct { + work func() + name string + age int32 +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func.json new file mode 100644 index 0000000000000000000000000000000000000000..a4397297486ade114e73adb1dbe735a0b2bce90b --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func.json @@ -0,0 +1,110 @@ +{ + "Containers": null, + "DataStructures": [ + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "func", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "string", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "int32", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "Functions": null, + "Implements": null, + "Imports": null, + "InOutProperties": [ + { + "Modifiers": null, + "ParamName": "work", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Function", + "TypeValue": "func" + }, + { + "Modifiers": null, + "ParamName": "name", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "string" + }, + { + "Modifiers": null, + "ParamName": "age", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "int32" + } + ], + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "Person", + "Package": "testdata", + "Type": "" + } + ], + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": null, + "Members": [ + { + "AliasPackage": "testdata", + "DataStructID": "Person", + "FileID": "testdata.node_infos", + "FunctionNodes": null, + "ID": "testdata.node_infos|testdata::Person", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "struct" + } + ], + "PackageName": "testdata" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func_decl.code b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func_decl.code new file mode 100644 index 0000000000000000000000000000000000000000..aa9467bb5bb4cbc61d764ca9a7529532153069e3 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func_decl.code @@ -0,0 +1,13 @@ +package testdata + +import "fmt" + +type person struct { + name string + age int + personfunc func() +} + +func (*person) outside() { + fmt.Println("Declared outside and invoked!!!") +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func_decl.json b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func_decl.json new file mode 100644 index 0000000000000000000000000000000000000000..5ecee89096ea80c9ce4583dcd5e31723b3632e8b --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/node_infos/struct_with_func_decl.json @@ -0,0 +1,163 @@ +{ + "Containers": null, + "DataStructures": [ + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "string", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "int", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "func", + "Package": "testdata.node_infos", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "Functions": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "Println", + "NodeName": "fmt", + "Package": "fmt", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "STRING", + "TypeValue": "\"Declared outside and invoked!!!\"" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "fmt" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "outside", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "Implements": null, + "Imports": null, + "InOutProperties": [ + { + "Modifiers": null, + "ParamName": "name", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "string" + }, + { + "Modifiers": null, + "ParamName": "age", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "int" + }, + { + "Modifiers": null, + "ParamName": "personfunc", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Function", + "TypeValue": "func" + } + ], + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "person", + "Package": "testdata", + "Type": "" + } + ], + "Fields": null, + "FullName": "testdata.node_infos", + "Imports": [ + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "fmt", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "testdata", + "DataStructID": "person", + "FileID": "testdata.node_infos", + "FunctionNodes": null, + "ID": "testdata.node_infos|testdata::person", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "struct" + } + ], + "PackageName": "testdata" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_go/testdata/regression/coll_stack.code b/pkg/infrastructure/ast/ast_go/testdata/regression/coll_stack.code new file mode 100644 index 0000000000000000000000000000000000000000..d2d604bc3b355f26cc50fab6c29d62024b8cb16f --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/regression/coll_stack.code @@ -0,0 +1,49 @@ +package container + +import ( + l "container/list" + "sync" +) + +type Stack struct { + list *l.List + mu sync.Mutex +} + +func NewStack() *Stack { + list := l.New() + return &Stack{list: list,} +} + +func (s *Stack) Push(t interface{}){ + s.mu.Lock() + defer s.mu.Unlock() + s.list.PushFront(t) +} + +func (s *Stack) Pop() interface{} { + s.mu.Lock() + defer s.mu.Unlock() + ele := s.list.Front() + if nil != ele { + s.list.Remove(ele) + return ele.Value + } + + return nil +} + +func (s *Stack) Peak() interface{} { + s.mu.Lock() + defer s.mu.Unlock() + ele := s.list.Front() + return ele.Value +} + +func (s *Stack) Len() int { + return s.list.Len() +} + +func (s *Stack) IsEmpty() bool { + return s.list.Len() == 0 +} diff --git a/pkg/infrastructure/ast/ast_go/testdata/regression/coll_stack.json b/pkg/infrastructure/ast/ast_go/testdata/regression/coll_stack.json new file mode 100644 index 0000000000000000000000000000000000000000..cb880941888b0cc8fa7b3f52e7ce9fa024be6957 --- /dev/null +++ b/pkg/infrastructure/ast/ast_go/testdata/regression/coll_stack.json @@ -0,0 +1,405 @@ +{ + "DataStructures": [ + { + "Annotations": null, + "Extend": "", + "Extension": null, + "Fields": null, + "FilePath": "", + "FunctionCalls": [ + { + "FunctionName": "", + "NodeName": "l.List", + "Package": "testdata.regression", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "", + "NodeName": "sync.Mutex", + "Package": "sync", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "Functions": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "Lock", + "NodeName": "", + "Package": "container", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "Unlock", + "NodeName": "", + "Package": "container", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "PushFront", + "NodeName": "", + "Package": "container", + "Parameters": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "var", + "TypeValue": "t" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": null, + "Name": "Push", + "Override": false, + "Parameters": [ + { + "Modifiers": null, + "ParamName": "t", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "interface{}", + "TypeValue": "interface{}" + } + ], + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + }, + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "Lock", + "NodeName": "", + "Package": "container", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "Unlock", + "NodeName": "", + "Package": "container", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "interface{}", + "TypeValue": "interface{}" + } + ], + "Name": "Pop", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + }, + { + "Annotations": null, + "Extension": null, + "FunctionCalls": [ + { + "FunctionName": "Lock", + "NodeName": "", + "Package": "container", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + }, + { + "FunctionName": "Unlock", + "NodeName": "", + "Package": "container", + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Type": "" + } + ], + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "interface{}", + "TypeValue": "interface{}" + } + ], + "Name": "Peak", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + }, + { + "Annotations": null, + "Extension": null, + "FunctionCalls": null, + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "int" + } + ], + "Name": "Len", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + }, + { + "Annotations": null, + "Extension": null, + "FunctionCalls": null, + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Identify", + "TypeValue": "bool" + } + ], + "Name": "IsEmpty", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "Implements": null, + "Imports": null, + "InOutProperties": [ + { + "Modifiers": null, + "ParamName": "list", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Star", + "TypeValue": "l.List" + }, + { + "Modifiers": null, + "ParamName": "mu", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "", + "TypeValue": "sync.Mutex" + } + ], + "InnerStructures": null, + "MultipleExtend": null, + "NodeName": "Stack", + "Package": "container", + "Type": "" + } + ], + "Fields": null, + "FullName": "testdata.regression", + "Imports": [ + { + "AsName": "l", + "ImportName": "", + "Scope": "", + "Source": "container.list", + "UsageName": null + }, + { + "AsName": "", + "ImportName": "", + "Scope": "", + "Source": "sync", + "UsageName": null + } + ], + "Members": [ + { + "AliasPackage": "container", + "DataStructID": "Stack", + "FileID": "testdata.regression", + "FunctionNodes": null, + "ID": "testdata.regression|container::Stack", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "struct" + }, + { + "AliasPackage": "container", + "DataStructID": "default", + "FileID": "testdata.regression", + "FunctionNodes": [ + { + "Annotations": null, + "Extension": null, + "FunctionCalls": null, + "InnerFunctions": null, + "InnerStructures": null, + "IsConstructor": false, + "IsReturnNull": false, + "Modifiers": null, + "MultipleReturns": [ + { + "Modifiers": null, + "ParamName": "", + "Parameters": null, + "ReturnTypes": null, + "TypeType": "Star", + "TypeValue": "Stack" + } + ], + "Name": "NewStack", + "Override": false, + "Parameters": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "ReturnType": "" + } + ], + "ID": "container:NewStack", + "Name": "", + "Namespace": null, + "Position": { + "StartLine": 0, + "StartLinePosition": 0, + "StopLine": 0, + "StopLinePosition": 0 + }, + "Structures": null, + "Type": "method" + } + ], + "PackageName": "container" +} \ No newline at end of file diff --git a/pkg/infrastructure/ast/ast_groovy/gradle_process_helper.go b/pkg/infrastructure/ast/ast_groovy/gradle_process_helper.go new file mode 100644 index 0000000000000000000000000000000000000000..6ed78342aee6b229803dac35713e5753fd51dec7 --- /dev/null +++ b/pkg/infrastructure/ast/ast_groovy/gradle_process_helper.go @@ -0,0 +1,14 @@ +package ast_groovy + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/languages/groovy" +) + +func ProcessGroovyString(code string) *parser.GroovyParser { + is := antlr.NewInputStream(code) + lexer := parser.NewGroovyLexer(is) + stream := antlr.NewCommonTokenStream(lexer, 0) + parser := parser.NewGroovyParser(stream) + return parser +} diff --git a/pkg/infrastructure/ast/ast_groovy/groovy_identifier_listener.go b/pkg/infrastructure/ast/ast_groovy/groovy_identifier_listener.go new file mode 100644 index 0000000000000000000000000000000000000000..0836e93f507297a1c8c195d62bf2593a15b61e21 --- /dev/null +++ b/pkg/infrastructure/ast/ast_groovy/groovy_identifier_listener.go @@ -0,0 +1,122 @@ +package ast_groovy + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + parser "github.com/phodal/coca/languages/groovy" + "github.com/phodal/coca/pkg/domain/core_domain" + "reflect" + "strings" +) + +var nodeDeps []core_domain.CodeDependency + +type GroovyIdentifierListener struct { + parser.BaseGroovyParserListener +} + +func NewGroovyIdentListener() *GroovyIdentifierListener { + nodeDeps = nil + return &GroovyIdentifierListener{} +} + +// TODO : +// 1. delete groovy build code +// 2. use regex replace it +// 3. remove the features +func (s *GroovyIdentifierListener) EnterScriptStatement(ctx *parser.ScriptStatementContext) { + if reflect.TypeOf(ctx.GetChild(0)).String() == "*parser.ExpressionStmtAltContext" { + cmdExpr := ctx.GetChild(0).(*parser.ExpressionStmtAltContext).StatementExpression().GetChild(0).(*parser.CommandExpressionContext).Expression() + if cmdExpr != nil { + if reflect.TypeOf(cmdExpr.GetChild(0)).String() == "*parser.PostfixExpressionContext" { + pathExprCtx := cmdExpr.GetChild(0).(*parser.PostfixExpressionContext).GetChild(0).(*parser.PathExpressionContext) + buildGroovyMap(pathExprCtx) + } + } + } +} + +func (s *GroovyIdentifierListener) GetDepsInfo() []core_domain.CodeDependency { + return nodeDeps +} + +func buildGroovyMap(pathExprCtx *parser.PathExpressionContext) []core_domain.CodeDependency { + if reflect.TypeOf(pathExprCtx.GetChild(0)).String() == "*parser.IdentifierPrmrAltContext" { + if pathExprCtx.GetChild(0).(antlr.ParseTree).GetText() != "dependencies" { + return nil + } + } + pathChild := pathExprCtx.GetChild(1) + if pathChild != nil { + pathElement := pathChild.(*parser.PathElementContext) + + if pathElement.ClosureOrLambdaExpression() != nil { + expressionContext := pathElement.ClosureOrLambdaExpression().(*parser.ClosureOrLambdaExpressionContext) + if reflect.TypeOf(expressionContext.GetChild(0)).String() == "*parser.ClosureContext" { + closureContext := expressionContext.GetChild(0).(*parser.ClosureContext) + nodeDeps = buildBlockStatements(closureContext) + return nodeDeps + } + } + } + return nil +} + +func buildBlockStatements(closureContext *parser.ClosureContext) []core_domain.CodeDependency { + var results []core_domain.CodeDependency + statementsContext := closureContext.BlockStatementsOpt().(*parser.BlockStatementsOptContext).BlockStatements().(*parser.BlockStatementsContext) + for _, blockStatement := range statementsContext.AllBlockStatement() { + var result *core_domain.CodeDependency = nil + + commandExprCtx := blockStatement.GetChild(0).GetChild(0).GetChild(0).(*parser.CommandExpressionContext) + pathExpression := commandExprCtx.GetChild(0).(*parser.PostfixExprAltForExprContext).GetChild(0).(*parser.PostfixExpressionContext).PathExpression() + scope := pathExpression.GetChild(0).(antlr.ParseTree).GetText() + + // with quote testImplementation('org.springframework.boot:spring-boot-starter-test') + isWithQuote := pathExpression.GetChildCount() >= 2 + if isWithQuote { + argumentsContext := pathExpression.GetChild(1).(*parser.PathElementContext).GetChild(0).(*parser.ArgumentsContext) + argListCtx := argumentsContext.GetChild(1).(*parser.EnhancedArgumentListContext) + for _, argElement := range argListCtx.AllEnhancedArgumentListElement() { + result = ConvertToJDep(argElement.GetText()) + } + } + + // normal: developmentOnly 'org.springframework.boot:spring-boot-devtools' + if commandExprCtx.GetChildCount() >= 2 { + argumentListContext := commandExprCtx.GetChild(1).(*parser.ArgumentListContext) + result = BuildDependency(argumentListContext) + } + + if result != nil { + result.Scope = scope + results = append(results, *result) + } + } + + return results +} + +func BuildDependency(argumentListContext *parser.ArgumentListContext) *core_domain.CodeDependency { + var result *core_domain.CodeDependency = nil + for _, arg := range argumentListContext.AllArgumentListElement() { + if reflect.TypeOf(arg.(*parser.ArgumentListElementContext).GetChild(0)).String() == "*parser.ExpressionListElementContext" { + listElementContext := arg.(*parser.ArgumentListElementContext).GetChild(0).(*parser.ExpressionListElementContext) + literalPrmrAltContext := listElementContext. + GetChild(0). + GetChild(0). + GetChild(0). + GetChild(0). + (*parser.LiteralPrmrAltContext) + + resultStr := literalPrmrAltContext.Literal().GetChild(0).(*parser.StringLiteralContext).StringLiteral().GetText() + result = ConvertToJDep(resultStr) + } + } + return result +} + +func ConvertToJDep(result string) *core_domain.CodeDependency { + withQuote := strings.ReplaceAll(result, "'", "") + split := strings.Split(withQuote, ":") + return core_domain.NewCodeDependency(split[0], split[1]) +} diff --git a/core/adapter/api/java_api_listener.go b/pkg/infrastructure/ast/ast_java/ast_api_java/java_api_listener.go similarity index 54% rename from core/adapter/api/java_api_listener.go rename to pkg/infrastructure/ast/ast_java/ast_api_java/java_api_listener.go index 9c29f32fc991ad04a28050d43e441edfa18a519d..84fedc24b2b8288c3a2dbf015c5375b99806c541 100644 --- a/core/adapter/api/java_api_listener.go +++ b/pkg/infrastructure/ast/ast_java/ast_api_java/java_api_listener.go @@ -1,93 +1,76 @@ -package api +package ast_api_java import ( "github.com/antlr/antlr4/runtime/Go/antlr" - models2 "github.com/phodal/coca/core/models" "github.com/phodal/coca/languages/java" + api_domain2 "github.com/phodal/coca/pkg/domain/api_domain" + "github.com/phodal/coca/pkg/domain/core_domain" "reflect" "strings" ) -var jClassNodes []models2.JClassNode - -type RestApi struct { - Uri string - HttpMethod string - MethodName string - ResponseStatus string - RequestBodyClass string - MethodParams map[string]string - PackageName string - ClassName string -} +var jClassNodes []core_domain.CodeDataStruct var hasEnterClass = false var isSpringRestController = false var hasEnterRestController = false -var baseApiUrlName string +var baseApiUrl string var localVars = make(map[string]string) -var currentRestApi RestApi -var RestApis []RestApi +var currentRestAPI api_domain2.RestAPI +var restAPIs []api_domain2.RestAPI var currentClz string var currentPkg string -var identMap map[string]models2.JIdentifier +var identMap map[string]core_domain.CodeDataStruct var imports []string -var currentExtends = "" var currentImplements = "" -var depInjectMap map[string]string -func NewJavaApiListener(jIdentMap map[string]models2.JIdentifier, diMap map[string]string) *JavaApiListener { +func NewJavaAPIListener(jIdentMap map[string]core_domain.CodeDataStruct, diMap map[string]string) *JavaAPIListener { isSpringRestController = false currentClz = "" currentPkg = "" - currentExtends = "" currentImplements = "" imports = nil + restAPIs = nil identMap = jIdentMap - depInjectMap = diMap params := make(map[string]string) - currentRestApi = *&RestApi{"", "", "", "", "", params, "", ""} - return &JavaApiListener{} + currentRestAPI = api_domain2.RestAPI{MethodParams: params} + return &JavaAPIListener{} } -type JavaApiListener struct { +type JavaAPIListener struct { parser.BaseJavaParserListener } -func (s *JavaApiListener) EnterImportDeclaration(ctx *parser.ImportDeclarationContext) { +func (s *JavaAPIListener) EnterImportDeclaration(ctx *parser.ImportDeclarationContext) { importText := ctx.QualifiedName().GetText() imports = append(imports, importText) } -func (s *JavaApiListener) EnterPackageDeclaration(ctx *parser.PackageDeclarationContext) { +func (s *JavaAPIListener) EnterPackageDeclaration(ctx *parser.PackageDeclarationContext) { currentPkg = ctx.QualifiedName().GetText() } -func (s *JavaApiListener) EnterClassDeclaration(ctx *parser.ClassDeclarationContext) { +func (s *JavaAPIListener) EnterClassDeclaration(ctx *parser.ClassDeclarationContext) { hasEnterClass = true if ctx.IDENTIFIER() != nil { currentClz = ctx.IDENTIFIER().GetText() } - if ctx.EXTENDS() != nil { - currentExtends = ctx.TypeType().GetText() - } - if ctx.IMPLEMENTS() != nil { currentImplements = ctx.TypeList().GetText() } } -func (s *JavaApiListener) ExitClassDeclaration(ctx *parser.ClassDeclarationContext) { +func (s *JavaAPIListener) ExitClassDeclaration(ctx *parser.ClassDeclarationContext) { hasEnterClass = false } -func (s *JavaApiListener) EnterAnnotation(ctx *parser.AnnotationContext) { +func (s *JavaAPIListener) EnterAnnotation(ctx *parser.AnnotationContext) { annotationName := ctx.QualifiedName().GetText() if annotationName == "RestController" || annotationName == "Controller" { isSpringRestController = true @@ -98,41 +81,25 @@ func (s *JavaApiListener) EnterAnnotation(ctx *parser.AnnotationContext) { } if !hasEnterClass { - // 类声明处的注解 - if annotationName == "RequestMapping" { - if ctx.ElementValuePairs() != nil { - allValuePair := ctx.ElementValuePairs().(*parser.ElementValuePairsContext).AllElementValuePair() - for _, valuePair := range allValuePair { - pair := valuePair.(*parser.ElementValuePairContext) - if pair.IDENTIFIER().GetText() == "value" { - text := pair.ElementValue().GetText() - baseApiUrlName = text[1 : len(text)-1] - } - } - } else if ctx.ElementValue() != nil { - text := ctx.ElementValue().GetText() - baseApiUrlName = text[1 : len(text)-1] - } else { - baseApiUrlName = "/" - } - } + buildBaseApiUrlString(annotationName, ctx) } - if !(annotationName == "RequestMapping" || annotationName == "GetMapping" || annotationName == "PutMapping" || annotationName == "PostMapping" || annotationName == "DeleteMapping") { + notAPI := annotationName == "RequestMapping" || annotationName == "GetMapping" || annotationName == "PutMapping" || annotationName == "PostMapping" || annotationName == "DeleteMapping" + if !notAPI { return } hasEnterRestController = true uri := "" if ctx.ElementValue() != nil { - uri = baseApiUrlName + ctx.ElementValue().GetText() + uri = baseApiUrl + ctx.ElementValue().GetText() } else { - uri = baseApiUrlName + uri = baseApiUrl } uriRemoveQuote := strings.ReplaceAll(uri, "\"", "") - currentRestApi = RestApi{uriRemoveQuote, "", "", "", "", nil, "", ""} + currentRestAPI = api_domain2.RestAPI{Uri: uriRemoveQuote} if annotationName != "RequestMapping" { if hasEnterClass { addApiMethod(annotationName) @@ -150,8 +117,29 @@ func (s *JavaApiListener) EnterAnnotation(ctx *parser.AnnotationContext) { } if pair.IDENTIFIER().GetText() == "value" { text := pair.ElementValue().GetText() - currentRestApi.Uri = baseApiUrlName + text[1:len(text)-1] + currentRestAPI.Uri = baseApiUrl + text[1:len(text)-1] + } + } + } +} + +func buildBaseApiUrlString(annotationName string, ctx *parser.AnnotationContext) { + // 类声明处的注解 + if annotationName == "RequestMapping" { + if ctx.ElementValuePairs() != nil { + allValuePair := ctx.ElementValuePairs().(*parser.ElementValuePairsContext).AllElementValuePair() + for _, valuePair := range allValuePair { + pair := valuePair.(*parser.ElementValuePairContext) + if pair.IDENTIFIER().GetText() == "value" { + text := pair.ElementValue().GetText() + baseApiUrl = text[1 : len(text)-1] + } } + } else if ctx.ElementValue() != nil { + text := ctx.ElementValue().GetText() + baseApiUrl = text[1 : len(text)-1] + } else { + baseApiUrl = "/" } } } @@ -162,59 +150,37 @@ func addApiMethod(annotationName string) { "GetMapping", "RequestMethod.GET", "GET": - currentRestApi.HttpMethod = "GET" + currentRestAPI.HttpMethod = "GET" case "PutMapping", "RequestMethod.PUT", "PUT": - currentRestApi.HttpMethod = "PUT" + currentRestAPI.HttpMethod = "PUT" case "PostMapping", "RequestMethod.POST", "POST": - currentRestApi.HttpMethod = "POST" + currentRestAPI.HttpMethod = "POST" case "DeleteMapping", "RequestMethod.DELETE", "DELETE": - currentRestApi.HttpMethod = "DELETE" + currentRestAPI.HttpMethod = "DELETE" } } var requestBodyClass string -func (s *JavaApiListener) EnterMethodDeclaration(ctx *parser.MethodDeclarationContext) { +func (s *JavaAPIListener) EnterMethodDeclaration(ctx *parser.MethodDeclarationContext) { methodName := ctx.IDENTIFIER().GetText() if currentImplements != "" { - var superClz = "" - for index := range imports { - imp := imports[index] - if strings.HasSuffix(imp, "."+currentImplements) { - superClz = imp - } - // TODO: 支持 interface 在同一个包内 - } - - if _, ok := identMap[superClz]; ok { - for _, method := range identMap[superClz].Methods { - if method.Name == methodName { - for _, annotation := range method.Annotations { - if annotation.QualifiedName == "ServiceMethod" { - currentRestApi.PackageName = currentPkg - currentRestApi.ClassName = currentClz - currentRestApi.MethodName = methodName - - RestApis = append(RestApis, currentRestApi) - return - } - } - } - } + if buildApiForInterfaceAnnotation(methodName) { + return } } @@ -223,16 +189,16 @@ func (s *JavaApiListener) EnterMethodDeclaration(ctx *parser.MethodDeclarationCo return } - currentRestApi.PackageName = currentPkg - currentRestApi.ClassName = currentClz - currentRestApi.MethodName = methodName + currentRestAPI.PackageName = currentPkg + currentRestAPI.ClassName = currentClz + currentRestAPI.MethodName = methodName if ctx.FormalParameters().GetText() == "()" { - currentRestApi.RequestBodyClass = requestBodyClass + currentRestAPI.RequestBodyClass = requestBodyClass hasEnterRestController = false requestBodyClass = "" - RestApis = append(RestApis, currentRestApi) + restAPIs = append(restAPIs, currentRestAPI) } else { - buildRestApi(ctx) + buildRestApiWithParameters(ctx) } } @@ -243,6 +209,35 @@ func (s *JavaApiListener) EnterMethodDeclaration(ctx *parser.MethodDeclarationCo } } +func buildApiForInterfaceAnnotation(methodName string) bool { + var superClz = "" + for index := range imports { + imp := imports[index] + if strings.HasSuffix(imp, "."+currentImplements) { + superClz = imp + } + // TODO: 支持 interface 在同一个包内 + } + + if _, ok := identMap[superClz]; ok { + for _, method := range identMap[superClz].Functions { + if method.Name == methodName { + for _, annotation := range method.Annotations { + if annotation.Name == "ServiceMethod" { + currentRestAPI.PackageName = currentPkg + currentRestAPI.ClassName = currentClz + currentRestAPI.MethodName = methodName + + restAPIs = append(restAPIs, currentRestAPI) + return true + } + } + } + } + } + return false +} + func filterMethodCall(blockContext antlr.Tree) { blcStatement := blockContext.(*parser.BlockContext).AllBlockStatement() for _, rangeStatement := range blcStatement { @@ -256,7 +251,7 @@ func filterMethodCall(blockContext antlr.Tree) { } } -func buildRestApi(ctx *parser.MethodDeclarationContext) { +func buildRestApiWithParameters(ctx *parser.MethodDeclarationContext) { parameterList := ctx.FormalParameters().GetChild(1).(*parser.FormalParameterListContext) formalParameter := parameterList.AllFormalParameter() for _, param := range formalParameter { @@ -271,10 +266,6 @@ func buildRestApi(ctx *parser.MethodDeclarationContext) { if qualifiedName == "RequestBody" { hasRequestBody = true } - - if qualifiedName == "PathVariable" { - //fmt.Println() - } } } @@ -287,36 +278,32 @@ func buildRestApi(ctx *parser.MethodDeclarationContext) { localVars[paramValue] = paramType } - currentRestApi.RequestBodyClass = requestBodyClass + currentRestAPI.RequestBodyClass = requestBodyClass buildMethodParameters(requestBodyClass) hasEnterRestController = false requestBodyClass = "" - RestApis = append(RestApis, currentRestApi) + restAPIs = append(restAPIs, currentRestAPI) } func buildMethodParameters(requestBodyClass string) { params := make(map[string]string) for _, clz := range jClassNodes { - if clz.Class == requestBodyClass { + if clz.NodeName == requestBodyClass { for _, field := range clz.Fields { - params[field.Value] = field.Type + params[field.TypeValue] = field.TypeType } } } - currentRestApi.MethodParams = params + currentRestAPI.MethodParams = params } -func (s *JavaApiListener) appendClasses(classes []models2.JClassNode) { +func (s *JavaAPIListener) AppendClasses(classes []core_domain.CodeDataStruct) { jClassNodes = classes } -func (s *JavaApiListener) getClassApis() []RestApi { - return RestApis -} - -func (s *JavaApiListener) getCurrentApi() RestApi { - return currentRestApi +func (s *JavaAPIListener) GetClassApis() []api_domain2.RestAPI { + return restAPIs } diff --git a/pkg/infrastructure/ast/ast_java/ast_java_target_handler.go b/pkg/infrastructure/ast/ast_java/ast_java_target_handler.go new file mode 100644 index 0000000000000000000000000000000000000000..a09a41fe252a713851a299e5beb3835bd789e3e2 --- /dev/null +++ b/pkg/infrastructure/ast/ast_java/ast_java_target_handler.go @@ -0,0 +1,130 @@ +package ast_java + +import ( + "github.com/phodal/coca/languages/java" + "reflect" + "strings" +) + +func ParseTargetType(targetCtx string) string { + targetType := targetCtx + + //TODO: update this reflect + typeOf := reflect.TypeOf(targetCtx).String() + if strings.HasSuffix(typeOf, "MethodCallContext") { + targetType = currentClz + } else { + fieldType := mapFields[targetCtx] + formalType := formalParameters[targetCtx] + localVarType := localVars[targetCtx] + if fieldType != "" { + targetType = fieldType + } else if formalType != "" { + targetType = formalType + } else if localVarType != "" { + targetType = localVarType + } + } + + return targetType +} + +func WarpTargetFullType(targetType string) (string, string) { + callType := "" + if strings.EqualFold(currentClz, targetType) { + callType = "self" + return currentPkg + "." + targetType, callType + } + + // TODO: update for array + split := strings.Split(targetType, ".") + str := split[0] + pureTargetType := strings.ReplaceAll(strings.ReplaceAll(str, "[", ""), "]", "") + + if pureTargetType != "" { + for _, imp := range imports { + if strings.HasSuffix(imp, pureTargetType) { + callType = "chain" + return imp, callType + } + } + } + + for _, clz := range clzs { + if strings.HasSuffix(clz, "."+pureTargetType) { + callType = "same package" + return clz, callType + } + } + + if pureTargetType == "super" || pureTargetType == "this" { + for _, imp := range imports { + if strings.HasSuffix(imp, currentClzExtend) { + callType = "super" + return imp, callType + } + } + } + + if _, ok := identMap[currentPkg+"."+targetType]; ok { + callType = "same package 2" + return currentPkg + "." + targetType, callType + } + + return "", callType +} + +func RemoveTarget(fullType string) string { + split := strings.Split(fullType, ".") + return strings.Join(split[:len(split)-1], ".") +} + +func HandleEmptyFullType(ctx *parser.MethodCallContext, targetType string, methodName string, packageName string) (string, string) { + if ctx.GetText() == targetType { + clz := currentClz + // 处理 static 方法,如 now() + for _, imp := range imports { + if strings.HasSuffix(imp, "."+methodName) { + packageName = imp + clz = "" + } + } + + targetType = clz + } else { + if strings.Contains(targetType, "this.") { + targetType = buildSelfThisTarget(targetType) + } + //targetType = buildMethodNameForBuilder(ctx, targetType) + } + return targetType, packageName +} +// todo: check usecases +//func buildMethodNameForBuilder(ctx *parser.MethodCallContext, targetType string) string { +// switch parentCtx := ctx.GetParent().(type) { +// case *parser.ExpressionContext: +// switch parentParentCtx := parentCtx.GetParent().(type) { +// case *parser.VariableInitializerContext: +// switch varDeclCtx := parentParentCtx.GetParent().(type) { +// case *parser.VariableDeclaratorContext: +// targetType = getTargetFromVarDecl(varDeclCtx, targetType) +// } +// } +// } +// +// return targetType +//} +// +//func getTargetFromVarDecl(ctx *parser.VariableDeclaratorContext, targetType string) string { +// switch x := ctx.GetParent().(type) { +// case *parser.VariableDeclaratorsContext: +// switch parentType := x.GetParent().(type) { +// case *parser.LocalVariableDeclarationContext: +// { +// targetType = parentType.TypeType().GetText() +// } +// } +// } +// return targetType +//} + diff --git a/core/adapter/common_listener/common_listener.go b/pkg/infrastructure/ast/ast_java/common_listener/common_listener.go similarity index 31% rename from core/adapter/common_listener/common_listener.go rename to pkg/infrastructure/ast/ast_java/common_listener/common_listener.go index 0b47146a7bd967b4c9ddb48c79bb74b6112abde2..b83e9024a1be218fb3e29402a1be82ac1f8d92a0 100644 --- a/core/adapter/common_listener/common_listener.go +++ b/pkg/infrastructure/ast/ast_java/common_listener/common_listener.go @@ -1,32 +1,39 @@ package common_listener import ( - "github.com/phodal/coca/core/models" "github.com/phodal/coca/languages/java" + "github.com/phodal/coca/pkg/domain/core_domain" + "reflect" ) -func BuildAnnotation(ctx *parser.AnnotationContext) models.Annotation { +func BuildAnnotation(ctx *parser.AnnotationContext) core_domain.CodeAnnotation { annotationName := ctx.QualifiedName().GetText() - annotation := models.NewAnnotation() - annotation.QualifiedName = annotationName + annotation := core_domain.NewAnnotation() + annotation.Name = annotationName if ctx.ElementValuePairs() != nil { pairs := ctx.ElementValuePairs().(*parser.ElementValuePairsContext).AllElementValuePair() for _, pair := range pairs { pairCtx := pair.(*parser.ElementValuePairContext) - pairCtx.ElementValue() - annotation.ValuePairs = append(annotation.ValuePairs, *&models.AnnotationKeyValue{ - Key: pairCtx.IDENTIFIER().GetText(), - Value: pairCtx.ElementValue().GetText(), - }) + + key := pairCtx.IDENTIFIER().GetText() + value := pairCtx.ElementValue().GetText() + annotation.KeyValues = append(annotation.KeyValues, core_domain.NewAnnotationKeyValue(key, value)) } } else if ctx.ElementValue() != nil { value := ctx.ElementValue().GetText() - annotation.ValuePairs = append(annotation.ValuePairs, *&models.AnnotationKeyValue{ - Key: value, - Value: value, - }) + annotation.KeyValues = append(annotation.KeyValues, core_domain.NewAnnotationKeyValue(value, value)) } return annotation } +func BuildAnnotationForMethod(context *parser.ModifierContext, method *core_domain.CodeFunction) { + if context.ClassOrInterfaceModifier() != nil { + if reflect.TypeOf(context.ClassOrInterfaceModifier().GetChild(0)).String() == "*parser.AnnotationContext" { + annotationCtx := context.ClassOrInterfaceModifier().GetChild(0).(*parser.AnnotationContext) + + annotation := BuildAnnotation(annotationCtx) + method.Annotations = append(method.Annotations, annotation) + } + } +} diff --git a/pkg/infrastructure/ast/ast_java/java_full_converter.go b/pkg/infrastructure/ast/ast_java/java_full_converter.go new file mode 100644 index 0000000000000000000000000000000000000000..d4f242d4c551e5055b39413034dd7d29e1c63196 --- /dev/null +++ b/pkg/infrastructure/ast/ast_java/java_full_converter.go @@ -0,0 +1,74 @@ +package ast_java + +import ( + "github.com/phodal/coca/languages/java" + "github.com/phodal/coca/pkg/domain/core_domain" + "strings" +) + +func BuildMethodParameters(parameters parser.IFormalParametersContext) []core_domain.CodeProperty { + var methodParams []core_domain.CodeProperty = nil + parameterList := parameters.GetChild(1).(*parser.FormalParameterListContext) + formalParameter := parameterList.AllFormalParameter() + for _, param := range formalParameter { + paramContext := param.(*parser.FormalParameterContext) + paramType := paramContext.TypeType().GetText() + paramValue := paramContext.VariableDeclaratorId().(*parser.VariableDeclaratorIdContext).IDENTIFIER().GetText() + + localVars[paramValue] = paramType + parameter := core_domain.NewCodeParameter(paramType, paramValue) + methodParams = append(methodParams, parameter) + } + return methodParams +} + +func BuildMethodCallMethod(jMethodCall *core_domain.CodeCall, callee string, targetType string, ctx *parser.MethodCallContext) { + methodName := callee + packageName := currentPkg + + fullType, callType := WarpTargetFullType(targetType) + if targetType == "super" || callee == "super" { + callType = "super" + targetType = currentClzExtend + } + jMethodCall.Type = callType + + if fullType != "" { + packageName = RemoveTarget(fullType) + methodName = callee + } else { + targetType, packageName = HandleEmptyFullType(ctx, targetType, methodName, packageName) + } + + // TODO: 处理链试调用 + // for normal builder chain call + if isChainCall(targetType) { + split := strings.Split(targetType, ".") + targetType = split[0] + targetType = ParseTargetType(targetType) + } + + jMethodCall.Package = packageName + jMethodCall.FunctionName = methodName + jMethodCall.NodeName = targetType +} + +func BuildMethodCallLocation(jMethodCall *core_domain.CodeCall, ctx *parser.MethodCallContext, callee string) { + jMethodCall.Position.StartLine = ctx.GetStart().GetLine() + jMethodCall.Position.StartLinePosition = ctx.GetStart().GetColumn() + jMethodCall.Position.StopLine = ctx.GetStop().GetLine() + jMethodCall.Position.StopLinePosition = jMethodCall.Position.StartLinePosition + len(callee) +} + +func BuildMethodCallParameters(jMethodCall *core_domain.CodeCall, ctx *parser.MethodCallContext) { + if ctx.ExpressionList() != nil { + var parameters []core_domain.CodeProperty + for _, expression := range ctx.ExpressionList().(*parser.ExpressionListContext).AllExpression() { + expressionCtx := expression.(*parser.ExpressionContext) + + parameter := core_domain.NewCodeParameter("", expressionCtx.GetText()) + parameters = append(parameters, parameter) + } + jMethodCall.Parameters = parameters + } +} diff --git a/core/adapter/call/java_call_listener.go b/pkg/infrastructure/ast/ast_java/java_full_listener.go similarity index 31% rename from core/adapter/call/java_call_listener.go rename to pkg/infrastructure/ast/ast_java/java_full_listener.go index c74dbcc1cd3f807ae668dde890354c9b44cec92f..9e9e128894ea3ea5901719b14428994340817e12 100644 --- a/core/adapter/call/java_call_listener.go +++ b/pkg/infrastructure/ast/ast_java/java_full_listener.go @@ -1,10 +1,10 @@ -package call +package ast_java import ( "github.com/antlr/antlr4/runtime/Go/antlr" - "github.com/phodal/coca/core/adapter/common_listener" - "github.com/phodal/coca/core/models" "github.com/phodal/coca/languages/java" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_java/common_listener" "reflect" "strconv" "strings" @@ -14,138 +14,174 @@ var imports []string var clzs []string var currentPkg string var currentClz string -var fields []models.JAppField -var methodCalls []models.JMethodCall +var fields []core_domain.CodeField +var methodCalls []core_domain.CodeCall var currentType string var mapFields = make(map[string]string) var localVars = make(map[string]string) var formalParameters = make(map[string]string) + var currentClzExtend = "" -var currentMethod models.JMethod -var methodMap = make(map[string]models.JMethod) +var currentMethod core_domain.CodeFunction +var methodMap = make(map[string]core_domain.CodeFunction) +var creatorMethodMap = make(map[string]core_domain.CodeFunction) -var methodQueue []models.JMethod -var classQueue []string +var methodQueue []core_domain.CodeFunction +var classStringQueue []string -var identMap map[string]models.JIdentifier +var identMap map[string]core_domain.CodeDataStruct var isOverrideMethod = false -var currentNode models.JClassNode -var classNodes []models.JClassNode +var classNodeQueue []core_domain.CodeDataStruct + +var currentNode *core_domain.CodeDataStruct +var classNodes []core_domain.CodeDataStruct +var currentCreatorNode core_domain.CodeDataStruct var fileName = "" var hasEnterClass = false -func NewJavaCallListener(nodes map[string]models.JIdentifier, file string) *JavaCallListener { +func NewJavaFullListener(nodes map[string]core_domain.CodeDataStruct, file string) *JavaFullListener { identMap = nodes imports = nil fileName = file currentPkg = "" classNodes = nil - currentNode = models.NewClassNode() - classQueue = nil + currentNode = core_domain.NewDataStruct() + classStringQueue = nil + classNodeQueue = nil methodQueue = nil initClass() - return &JavaCallListener{} + return &JavaFullListener{} } func initClass() { currentClz = "" currentClzExtend = "" - currentMethod = models.NewJMethod() - currentNode.MethodCalls = nil + currentMethod = core_domain.NewJMethod() + currentNode.FunctionCalls = nil - methodMap = make(map[string]models.JMethod) + methodMap = make(map[string]core_domain.CodeFunction) methodCalls = nil fields = nil isOverrideMethod = false } -type JavaCallListener struct { +type JavaFullListener struct { parser.BaseJavaParserListener } -func (s *JavaCallListener) getNodeInfo() []models.JClassNode { +func (s *JavaFullListener) GetNodeInfo() []core_domain.CodeDataStruct { return classNodes } -func (s *JavaCallListener) ExitClassBody(ctx *parser.ClassBodyContext) { +func (s *JavaFullListener) ExitClassBody(ctx *parser.ClassBodyContext) { hasEnterClass = false s.exitBody() } -func (s *JavaCallListener) ExitInterfaceBody(ctx *parser.InterfaceBodyContext) { +func (s *JavaFullListener) ExitInterfaceBody(ctx *parser.InterfaceBodyContext) { hasEnterClass = false s.exitBody() } -func (s *JavaCallListener) exitBody() { - if currentNode.Class != "" { - var methodsArray []models.JMethod - for _, value := range methodMap { - methodsArray = append(methodsArray, value) - } - +func (s *JavaFullListener) exitBody() { + if currentNode.NodeName != "" { currentNode.Fields = fields - currentNode.Type = currentType - currentNode.Methods = methodsArray - currentNode.Path = fileName - classNodes = append(classNodes, currentNode) + currentNode.FilePath = fileName + currentNode.SetMethodFromMap(methodMap) } - currentNode = models.NewClassNode() + + if currentType == "CreatorClass" { + currentNode.SetMethodFromMap(creatorMethodMap) + return + } + + if currentNode.NodeName == "" { + currentNode = core_domain.NewDataStruct() + initClass() + return + } + + if currentNode.Type == "InnerStructures" && len(classNodeQueue) >= 1 { + classNodeQueue[0].InnerStructures = append(currentNode.InnerStructures, *currentNode) + } else { + classNodes = append(classNodes, *currentNode) + } + + if len(classNodeQueue) >= 1 { + if len(classNodeQueue) == 1 { + currentNode = &classNodeQueue[0] + } else { + classNodeQueue = classNodeQueue[0 : len(classNodeQueue)-1] + currentNode = &classNodeQueue[len(classNodeQueue)-1] + } + } else { + currentNode = core_domain.NewDataStruct() + } + initClass() } -func (s *JavaCallListener) EnterPackageDeclaration(ctx *parser.PackageDeclarationContext) { +func (s *JavaFullListener) EnterPackageDeclaration(ctx *parser.PackageDeclarationContext) { currentNode.Package = ctx.QualifiedName().GetText() currentPkg = ctx.QualifiedName().GetText() } -func (s *JavaCallListener) EnterImportDeclaration(ctx *parser.ImportDeclarationContext) { +func (s *JavaFullListener) EnterImportDeclaration(ctx *parser.ImportDeclarationContext) { importText := ctx.QualifiedName().GetText() imports = append(imports, importText) + currentNode.Imports = append(currentNode.Imports, core_domain.NewJImport(importText)) } -func (s *JavaCallListener) EnterClassDeclaration(ctx *parser.ClassDeclarationContext) { +func (s *JavaFullListener) EnterClassDeclaration(ctx *parser.ClassDeclarationContext) { + if currentNode.NodeName != "" { + classNodeQueue = append(classNodeQueue, *currentNode) + currentType = "InnerStructures" + } else { + currentType = "Class" + } + hasEnterClass = true currentClzExtend = "" - currentType = "Class" if ctx.IDENTIFIER() != nil { currentClz = ctx.IDENTIFIER().GetText() - currentNode.Class = currentClz + currentNode.NodeName = currentClz } if ctx.EXTENDS() != nil { currentClzExtend = ctx.TypeType().GetText() - buildExtend(currentClzExtend) + currentNode.Extend = buildExtend(currentClzExtend) } if ctx.IMPLEMENTS() != nil { types := ctx.TypeList().(*parser.TypeListContext).AllTypeType() for _, typ := range types { - typeText := typ.GetText() - buildImplement(typeText) + currentNode.Implements = append(currentNode.Implements, buildImplement(typ.GetText())) } } + currentNode.Type = currentType // TODO: 支持依赖注入 } -func (s *JavaCallListener) EnterInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { +func (s *JavaFullListener) EnterInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { hasEnterClass = true currentType = "Interface" - currentNode.Class = ctx.IDENTIFIER().GetText() + currentNode.NodeName = ctx.IDENTIFIER().GetText() if ctx.EXTENDS() != nil { types := ctx.TypeList().(*parser.TypeListContext).AllTypeType() for _, typ := range types { - buildExtend(typ.GetText()) + currentNode.Extend = buildExtend(typ.GetText()) } } + + currentNode.Type = currentType } -func (s *JavaCallListener) EnterInterfaceBodyDeclaration(ctx *parser.InterfaceBodyDeclarationContext) { +func (s *JavaFullListener) EnterInterfaceBodyDeclaration(ctx *parser.InterfaceBodyDeclarationContext) { hasEnterClass = true for _, modifier := range ctx.AllModifier() { modifier := modifier.(*parser.ModifierContext).GetChild(0) @@ -156,40 +192,31 @@ func (s *JavaCallListener) EnterInterfaceBodyDeclaration(ctx *parser.InterfaceBo } } -func (s *JavaCallListener) EnterInterfaceMethodDeclaration(ctx *parser.InterfaceMethodDeclarationContext) { - startLine := ctx.GetStart().GetLine() - startLinePosition := ctx.IDENTIFIER().GetSymbol().GetColumn() - stopLine := ctx.GetStop().GetLine() +func (s *JavaFullListener) EnterInterfaceMethodDeclaration(ctx *parser.InterfaceMethodDeclarationContext) { name := ctx.IDENTIFIER().GetText() - stopLinePosition := startLinePosition + len(name) - typeType := ctx.TypeTypeOrVoid().GetText() - method := &models.JMethod{Name: name, Type: typeType, StartLine: startLine, StartLinePosition: startLinePosition, StopLine: stopLine, StopLinePosition: stopLinePosition} - updateMethod(method) -} + if reflect.TypeOf(ctx.GetParent().GetParent().GetChild(0)).String() == "*parser.ModifierContext" { + common_listener.BuildAnnotationForMethod(ctx.GetParent().GetParent().GetChild(0).(*parser.ModifierContext), ¤tMethod) + } -func (s *JavaCallListener) ExitInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { + position := BuildPosition(ctx.BaseParserRuleContext, name) + method := &core_domain.CodeFunction{Name: name, ReturnType: typeType, Position: position} + updateMethod(method) } -func (s *JavaCallListener) EnterFormalParameter(ctx *parser.FormalParameterContext) { +func (s *JavaFullListener) EnterFormalParameter(ctx *parser.FormalParameterContext) { formalParameters[ctx.VariableDeclaratorId().GetText()] = ctx.TypeType().GetText() } -func (s *JavaCallListener) EnterFieldDeclaration(ctx *parser.FieldDeclarationContext) { - decelerators := ctx.VariableDeclarators() - typeType := decelerators.GetParent().GetChild(0).(*parser.TypeTypeContext) - for _, declarator := range decelerators.(*parser.VariableDeclaratorsContext).AllVariableDeclarator() { - var typeCtx *parser.ClassOrInterfaceTypeContext = nil - if reflect.TypeOf(typeType.GetChild(0)).String() == "*parser.ClassOrInterfaceTypeContext" { - typeCtx = typeType.GetChild(0).(*parser.ClassOrInterfaceTypeContext) - } - +func (s *JavaFullListener) EnterFieldDeclaration(ctx *parser.FieldDeclarationContext) { + declarators := ctx.VariableDeclarators() + typeType := declarators.GetParent().GetChild(0).(*parser.TypeTypeContext) + for _, declarator := range declarators.(*parser.VariableDeclaratorsContext).AllVariableDeclarator() { + var typeCtx = BuildTypeCtxByIndex(typeType, nil, 0) if typeType.GetChildCount() > 1 { - if reflect.TypeOf(typeType.GetChild(1)).String() == "*parser.ClassOrInterfaceTypeContext" { - typeCtx = typeType.GetChild(1).(*parser.ClassOrInterfaceTypeContext) - } + typeCtx = BuildTypeCtxByIndex(typeType, typeCtx, 1) } if typeCtx == nil { @@ -199,13 +226,22 @@ func (s *JavaCallListener) EnterFieldDeclaration(ctx *parser.FieldDeclarationCon typeTypeText := typeCtx.IDENTIFIER(0).GetText() value := declarator.(*parser.VariableDeclaratorContext).VariableDeclaratorId().(*parser.VariableDeclaratorIdContext).IDENTIFIER().GetText() mapFields[value] = typeTypeText - fields = append(fields, *&models.JAppField{Type: typeTypeText, Value: value}) + field := core_domain.NewJField(typeTypeText, value, "") + fields = append(fields, field) buildFieldCall(typeTypeText, ctx) } } -func (s *JavaCallListener) EnterLocalVariableDeclaration(ctx *parser.LocalVariableDeclarationContext) { +func BuildTypeCtxByIndex(typeType *parser.TypeTypeContext, typeCtx *parser.ClassOrInterfaceTypeContext, index int) *parser.ClassOrInterfaceTypeContext { + switch x := typeType.GetChild(index).(type) { + case *parser.ClassOrInterfaceTypeContext: + typeCtx = x + } + return typeCtx +} + +func (s *JavaFullListener) EnterLocalVariableDeclaration(ctx *parser.LocalVariableDeclarationContext) { typ := ctx.GetChild(0).(antlr.ParseTree).GetText() if ctx.GetChild(1) != nil { if ctx.GetChild(1).GetChild(0) != nil && ctx.GetChild(1).GetChild(0).GetChild(0) != nil { @@ -215,7 +251,7 @@ func (s *JavaCallListener) EnterLocalVariableDeclaration(ctx *parser.LocalVariab } } -func (s *JavaCallListener) EnterAnnotation(ctx *parser.AnnotationContext) { +func (s *JavaFullListener) EnterAnnotation(ctx *parser.AnnotationContext) { // Todo: support override method annotationName := ctx.QualifiedName().GetText() if annotationName == "Override" { @@ -224,27 +260,28 @@ func (s *JavaCallListener) EnterAnnotation(ctx *parser.AnnotationContext) { isOverrideMethod = false } - if hasEnterClass { + if !hasEnterClass { annotation := common_listener.BuildAnnotation(ctx) - currentMethod.Annotations = append(currentMethod.Annotations, annotation) - } else { - annotation := common_listener.BuildAnnotation(ctx) - currentNode.Annotations = append(currentNode.Annotations, annotation) + if currentType == "CreatorClass" { + currentCreatorNode.Annotations = append(currentCreatorNode.Annotations, annotation) + } else { + currentNode.Annotations = append(currentNode.Annotations, annotation) + } } } -func (s *JavaCallListener) EnterConstructorDeclaration(ctx *parser.ConstructorDeclarationContext) { - method := &models.JMethod{ - Name: ctx.IDENTIFIER().GetText(), - Type: "", - StartLine: ctx.GetStart().GetLine(), - StartLinePosition: ctx.GetStart().GetColumn(), - StopLine: ctx.GetStop().GetLine(), - StopLinePosition: ctx.GetStop().GetColumn(), - Override: isOverrideMethod, - Parameters: nil, - Annotations: currentMethod.Annotations, - IsConstructor: true, +func (s *JavaFullListener) EnterConstructorDeclaration(ctx *parser.ConstructorDeclarationContext) { + name := ctx.IDENTIFIER().GetText() + position := BuildPosition(ctx.BaseParserRuleContext, name) + + method := &core_domain.CodeFunction{ + Name: name, + ReturnType: "", + Override: isOverrideMethod, + Parameters: nil, + Annotations: currentMethod.Annotations, + IsConstructor: true, + Position: position, } parameters := ctx.FormalParameters() @@ -255,29 +292,39 @@ func (s *JavaCallListener) EnterConstructorDeclaration(ctx *parser.ConstructorDe updateMethod(method) } -func (s *JavaCallListener) ExitConstructorDeclaration(ctx *parser.ConstructorDeclarationContext) { - currentMethod = models.NewJMethod() +func (s *JavaFullListener) ExitConstructorDeclaration(ctx *parser.ConstructorDeclarationContext) { + currentMethod = core_domain.NewJMethod() isOverrideMethod = false } -func (s *JavaCallListener) EnterMethodDeclaration(ctx *parser.MethodDeclarationContext) { - startLine := ctx.GetStart().GetLine() - startLinePosition := ctx.IDENTIFIER().GetSymbol().GetColumn() - stopLine := ctx.GetStop().GetLine() - name := ctx.IDENTIFIER().GetText() - stopLinePosition := startLinePosition + len(name) +func (s *JavaFullListener) EnterMethodDeclaration(ctx *parser.MethodDeclarationContext) { + name := "" + if ctx.IDENTIFIER() != nil { + name = ctx.IDENTIFIER().GetText() + } typeType := ctx.TypeTypeOrVoid().GetText() - method := &models.JMethod{ - Name: name, Type: typeType, - StartLine: startLine, - StartLinePosition: startLinePosition, - StopLine: stopLine, - StopLinePosition: stopLinePosition, - Annotations: currentMethod.Annotations, - Override: isOverrideMethod, - Parameters: nil, + if reflect.TypeOf(ctx.GetParent().GetParent().GetChild(0)).String() == "*parser.ModifierContext" { + common_listener.BuildAnnotationForMethod(ctx.GetParent().GetParent().GetChild(0).(*parser.ModifierContext), ¤tMethod) + } + + // check, before your refactor + position := core_domain.CodePosition{ + StartLine: ctx.GetStart().GetLine(), + StartLinePosition: ctx.IDENTIFIER().GetSymbol().GetColumn(), // different + StopLine: ctx.GetStop().GetLine(), + StopLinePosition: ctx.IDENTIFIER().GetSymbol().GetColumn() + len(name), + } + + method := &core_domain.CodeFunction{ + Name: name, + ReturnType: typeType, + Annotations: currentMethod.Annotations, + Override: isOverrideMethod, + Parameters: nil, + InnerStructures: nil, + Position: position, } parameters := ctx.FormalParameters() @@ -288,181 +335,180 @@ func (s *JavaCallListener) EnterMethodDeclaration(ctx *parser.MethodDeclarationC updateMethod(method) } -func buildMethodParameters(parameters parser.IFormalParametersContext, method *models.JMethod) bool { +func buildMethodParameters(parameters parser.IFormalParametersContext, method *core_domain.CodeFunction) bool { if parameters != nil { if parameters.GetChild(0) == nil || parameters.GetText() == "()" || parameters.GetChild(1) == nil { updateMethod(method) return true } - var methodParams []models.JParameter = nil - parameterList := parameters.GetChild(1).(*parser.FormalParameterListContext) - formalParameter := parameterList.AllFormalParameter() - for _, param := range formalParameter { - paramContext := param.(*parser.FormalParameterContext) - paramType := paramContext.TypeType().GetText() - paramValue := paramContext.VariableDeclaratorId().(*parser.VariableDeclaratorIdContext).IDENTIFIER().GetText() - - localVars[paramValue] = paramType - methodParams = append(methodParams, *&models.JParameter{Name: paramValue, Type: paramType}) - } - - method.Parameters = methodParams + method.Parameters = BuildMethodParameters(parameters) + updateMethod(method) } return false } -func updateMethod(method *models.JMethod) { - currentMethod = *method - methodQueue = append(methodQueue, *method) - methodMap[getMethodMapName(*method)] = *method +func updateMethod(method *core_domain.CodeFunction) { + if currentType == "CreatorClass" { + creatorMethodMap[getMethodMapName(*method)] = *method + } else { + currentMethod = *method + methodQueue = append(methodQueue, *method) + methodMap[getMethodMapName(*method)] = *method + } } -func (s *JavaCallListener) ExitMethodDeclaration(ctx *parser.MethodDeclarationContext) { +func (s *JavaFullListener) ExitMethodDeclaration(ctx *parser.MethodDeclarationContext) { exitMethod() } func exitMethod() { - if methodQueue == nil || len(methodQueue) < 1 { - currentMethod = models.NewJMethod() + if currentType == "CreatorClass" { return } - if len(methodQueue) <= 2 { - currentMethod = methodQueue[0] - } else { - methodQueue = methodQueue[0 : len(methodQueue)-1] - currentMethod = models.NewJMethod() - } + currentMethod = core_domain.NewJMethod() } // TODO: add inner creator examples -func (s *JavaCallListener) EnterInnerCreator(ctx *parser.InnerCreatorContext) { +func (s *JavaFullListener) EnterInnerCreator(ctx *parser.InnerCreatorContext) { if ctx.IDENTIFIER() != nil { currentClz = ctx.IDENTIFIER().GetText() - classQueue = append(classQueue, currentClz) + classStringQueue = append(classStringQueue, currentClz) } } // TODO: add inner creator examples -func (s *JavaCallListener) ExitInnerCreator(ctx *parser.InnerCreatorContext) { - if classQueue == nil || len(classQueue) <= 1 { +func (s *JavaFullListener) ExitInnerCreator(ctx *parser.InnerCreatorContext) { + if classStringQueue == nil || len(classStringQueue) <= 1 { return } - classQueue = classQueue[0 : len(classQueue)-1] - currentClz = classQueue[len(classQueue)-1] + classStringQueue = classStringQueue[0 : len(classStringQueue)-1] + currentClz = classStringQueue[len(classStringQueue)-1] } -func getMethodMapName(method models.JMethod) string { +func getMethodMapName(method core_domain.CodeFunction) string { name := method.Name if name == "" && len(methodQueue) > 1 { name = methodQueue[len(methodQueue)-1].Name } - return currentPkg + "." + currentClz + "." + name + ":" + strconv.Itoa(method.StartLine) + return currentPkg + "." + currentClz + "." + name + ":" + strconv.Itoa(method.Position.StartLine) } -func (s *JavaCallListener) EnterCreator(ctx *parser.CreatorContext) { +func (s *JavaFullListener) EnterCreator(ctx *parser.CreatorContext) { variableName := ctx.GetParent().GetParent().GetChild(0).(antlr.ParseTree).GetText() - createdName := ctx.CreatedName().GetText() - localVars[variableName] = createdName + allIdentifiers := ctx.CreatedName().(*parser.CreatedNameContext).AllIDENTIFIER() - if currentMethod.Name == "" { - return - } + for _, identifier := range allIdentifiers { + createdName := identifier.GetText() + localVars[variableName] = createdName + + buildCreatorCall(createdName, ctx) + + if currentMethod.Name == "" { + return + } - buildCreatedCall(createdName, ctx) + if ctx.ClassCreatorRest() == nil { + return + } + + if ctx.ClassCreatorRest().(*parser.ClassCreatorRestContext).ClassBody() == nil { + return + } + + currentType = "CreatorClass" + text := ctx.CreatedName().GetText() + creatorNode := &core_domain.CodeDataStruct{ + Package: currentPkg, + NodeName: text, + Type: "CreatorClass", + FilePath: "", + Fields: nil, + Functions: nil, + FunctionCalls: nil, + Extend: "", + Implements: nil, + Annotations: nil, + } + + currentCreatorNode = *creatorNode + } } -func buildCreatedCall(createdName string, ctx *parser.CreatorContext) { - method := methodMap[getMethodMapName(currentMethod)] - fullType, _ := warpTargetFullType(createdName) +func (s *JavaFullListener) ExitCreator(ctx *parser.CreatorContext) { + if currentCreatorNode.NodeName != "" { + method := methodMap[getMethodMapName(currentMethod)] + method.InnerStructures = append(method.InnerStructures, currentCreatorNode) + methodMap[getMethodMapName(currentMethod)] = method + } - jMethodCall := &models.JMethodCall{ - Package: removeTarget(fullType), - Type: "creator", - Class: createdName, - MethodName: "", - StartLine: ctx.GetStart().GetLine(), - StartLinePosition: ctx.GetStart().GetColumn(), - StopLine: ctx.GetStop().GetLine(), - StopLinePosition: ctx.GetStop().GetColumn(), + if currentType == "CreatorClass" { + currentType = "" } + currentCreatorNode = *core_domain.NewDataStruct() - method.MethodCalls = append(method.MethodCalls, *jMethodCall) - methodMap[getMethodMapName(currentMethod)] = method + if classNodeQueue == nil || len(classNodeQueue) < 1 { + return + } } -func (s *JavaCallListener) EnterLocalTypeDeclaration(ctx *parser.LocalTypeDeclarationContext) { - // TODO -} +func buildCreatorCall(createdName string, ctx *parser.CreatorContext) { + method := methodMap[getMethodMapName(currentMethod)] + fullType, _ := WarpTargetFullType(createdName) -func (s *JavaCallListener) EnterMethodCall(ctx *parser.MethodCallContext) { - var jMethodCall = models.NewJMethodCall() + position := BuildPosition(ctx.BaseParserRuleContext, createdName) - var targetCtx = ctx.GetParent().GetChild(0).(antlr.ParseTree).GetText() - var targetType = parseTargetType(targetCtx) - callee := ctx.GetChild(0).(antlr.ParseTree).GetText() + jMethodCall := &core_domain.CodeCall{ + Package: RemoveTarget(fullType), + Type: "CreatorClass", + NodeName: createdName, + Position: position, + } - jMethodCall.StartLine = ctx.GetStart().GetLine() - jMethodCall.StartLinePosition = ctx.GetStart().GetColumn() - jMethodCall.StopLine = ctx.GetStop().GetLine() - jMethodCall.StopLinePosition = jMethodCall.StartLinePosition + len(callee) + method.FunctionCalls = append(method.FunctionCalls, *jMethodCall) + methodMap[getMethodMapName(currentMethod)] = method +} - fullType, callType := warpTargetFullType(targetType) - if targetType == "super" || callee == "super" { - callType = "super" - targetType = currentClzExtend +func BuildPosition(ctx *antlr.BaseParserRuleContext, nodeName string) core_domain.CodePosition { + position := core_domain.CodePosition{ + StartLine: ctx.GetStart().GetLine(), + StartLinePosition: ctx.GetStart().GetColumn(), + StopLine: ctx.GetStop().GetLine(), + StopLinePosition: ctx.GetStop().GetColumn() + len(nodeName), } - jMethodCall.Type = callType - methodName := callee - packageName := currentPkg + return position +} + +func (s *JavaFullListener) EnterMethodCall(ctx *parser.MethodCallContext) { + var jMethodCall = core_domain.NewCodeMethodCall() - if fullType != "" { - if targetType == "" { - // 处理自调用 - targetType = currentClz - } + targetCtx := ctx.GetParent().GetChild(0).(antlr.ParseTree) + var targetType = ParseTargetType(targetCtx.GetText()) - packageName = removeTarget(fullType) - methodName = callee - } else { - if ctx.GetText() == targetType { - clz := currentClz - // 处理 static 方法,如 now() - for _, imp := range imports { - if strings.HasSuffix(imp, "."+methodName) { - packageName = imp - clz = "" - } - } - - targetType = clz - } else { - targetType = buildSpecificTarget(targetType) - targetType = buildMethodNameForBuilder(ctx, targetType) + if targetCtx.GetChild(0) != nil { + switch x := targetCtx.GetChild(0).(type) { + case *parser.MethodCallContext: + targetType = x.IDENTIFIER().GetText() } } - jMethodCall.Package = packageName - jMethodCall.MethodName = methodName + callee := ctx.GetChild(0).(antlr.ParseTree).GetText() - // TODO: 处理链试调用 - if isChainCall(targetType) { - split := strings.Split(targetType, ".") - targetType = split[0] - } - jMethodCall.Class = targetType + BuildMethodCallLocation(&jMethodCall, ctx, callee) + BuildMethodCallMethod(&jMethodCall, callee, targetType, ctx) + BuildMethodCallParameters(&jMethodCall, ctx) - addMethodCall(jMethodCall) + sendResultToMethodCallMap(jMethodCall) } -func addMethodCall(jMethodCall models.JMethodCall) { +func sendResultToMethodCallMap(jMethodCall core_domain.CodeCall) { methodCalls = append(methodCalls, jMethodCall) method := methodMap[getMethodMapName(currentMethod)] - method.MethodCalls = append(method.MethodCalls, jMethodCall) + method.FunctionCalls = append(method.FunctionCalls, jMethodCall) methodMap[getMethodMapName(currentMethod)] = method } @@ -470,42 +516,18 @@ func isChainCall(targetType string) bool { return strings.Contains(targetType, "(") && strings.Contains(targetType, ")") && strings.Contains(targetType, ".") } -func buildMethodNameForBuilder(ctx *parser.MethodCallContext, targetType string) string { - // TODO: refactor - if reflect.TypeOf(ctx.GetParent()).String() == "*parser.ExpressionContext" { - parentCtx := ctx.GetParent().(*parser.ExpressionContext) - if reflect.TypeOf(parentCtx.GetParent()).String() == "*parser.VariableInitializerContext" { - varParent := parentCtx.GetParent().(*parser.VariableInitializerContext).GetParent() - if reflect.TypeOf(varParent).String() == "*parser.VariableDeclaratorContext" { - varDeclParent := varParent.(*parser.VariableDeclaratorContext).GetParent() - if reflect.TypeOf(varDeclParent).String() == "*parser.VariableDeclaratorsContext" { - parent := varDeclParent.(*parser.VariableDeclaratorsContext).GetParent() - if reflect.TypeOf(parent).String() == "*parser.LocalVariableDeclarationContext" { - context := parent.(*parser.LocalVariableDeclarationContext) - targetType = context.TypeType().GetText() - } - } - } +func buildSelfThisTarget(targetType string) string { + targetType = strings.ReplaceAll(targetType, "this.", "") + for _, field := range fields { + if field.TypeValue == targetType { + targetType = field.TypeType } } return targetType } -func buildSpecificTarget(targetType string) string { - isSelfFieldCall := strings.Contains(targetType, "this.") - if isSelfFieldCall { - targetType = strings.ReplaceAll(targetType, "this.", "") - for _, field := range fields { - if field.Value == targetType { - targetType = field.Type - } - } - } - return targetType -} - -func (s *JavaCallListener) EnterExpression(ctx *parser.ExpressionContext) { +func (s *JavaFullListener) EnterExpression(ctx *parser.ExpressionContext) { // lambda BlogPO::of if ctx.COLONCOLON() != nil { if ctx.Expression(0) == nil { @@ -514,131 +536,54 @@ func (s *JavaCallListener) EnterExpression(ctx *parser.ExpressionContext) { text := ctx.Expression(0).GetText() methodName := ctx.IDENTIFIER().GetText() - targetType := parseTargetType(text) - - fullType, _ := warpTargetFullType(targetType) - - startLine := ctx.GetStart().GetLine() - startLinePosition := ctx.GetStart().GetColumn() - stopLine := ctx.GetStop().GetLine() - stopLinePosition := startLinePosition + len(text) - - jMethodCall := &models.JMethodCall{removeTarget(fullType), "lambda", targetType, methodName, startLine, startLinePosition, stopLine, stopLinePosition} - addMethodCall(*jMethodCall) - } -} + targetType := ParseTargetType(text) -func (s *JavaCallListener) appendClasses(classes []string) { - clzs = classes -} - -func removeTarget(fullType string) string { - split := strings.Split(fullType, ".") - return strings.Join(split[:len(split)-1], ".") -} + fullType, _ := WarpTargetFullType(targetType) -func parseTargetType(targetCtx string) string { - targetVar := targetCtx - targetType := targetVar + position := BuildPosition(ctx.BaseParserRuleContext, text) - //TODO: update this reflect - typeOf := reflect.TypeOf(targetCtx).String() - if strings.HasSuffix(typeOf, "MethodCallContext") { - targetType = currentClz - } else { - //if isChainCall(targetVar) { - // split := strings.Split(targetType, ".") - // targetVar = split[0] - //} - - fieldType := mapFields[targetVar] - formalType := formalParameters[targetVar] - localVarType := localVars[targetVar] - if fieldType != "" { - targetType = fieldType - } else if formalType != "" { - targetType = formalType - } else if localVarType != "" { - targetType = localVarType + jMethodCall := &core_domain.CodeCall{ + Package: RemoveTarget(fullType), + Type: "lambda", + NodeName: targetType, + FunctionName: methodName, + Position: position, } + sendResultToMethodCallMap(*jMethodCall) } - - return targetType } -func warpTargetFullType(targetType string) (string, string) { - callType := "" - if strings.EqualFold(currentClz, targetType) { - callType = "self" - return currentPkg + "." + targetType, "" - } - - // TODO: update for array - split := strings.Split(targetType, ".") - str := split[0] - pureTargetType := strings.ReplaceAll(strings.ReplaceAll(str, "[", ""), "]", "") - - if pureTargetType != "" { - for _, imp := range imports { - if strings.HasSuffix(imp, pureTargetType) { - callType = "chain" - return imp, callType - } - } - } - - //maybe the same package - for _, clz := range clzs { - if strings.HasSuffix(clz, "."+pureTargetType) { - callType = "same package" - return clz, callType - } - } - - //1. current package, 2. import by * - if pureTargetType == "super" || pureTargetType == "this" { - for _, imp := range imports { - if strings.HasSuffix(imp, currentClzExtend) { - callType = pureTargetType - return imp, callType - } - } - } - - if _, ok := identMap[currentPkg+"."+targetType]; ok { - callType = "same package 2" - return currentPkg + "." + targetType, callType - } - - return "", callType +func (s *JavaFullListener) AppendClasses(classes []string) { + clzs = classes } -func buildExtend(extendName string) { - target, _ := warpTargetFullType(extendName) +func buildExtend(extendName string) string { + var extend = extendName + target, _ := WarpTargetFullType(extendName) if target != "" { - currentNode.Extend = target + extend = target } + + return extend } func buildFieldCall(typeType string, ctx *parser.FieldDeclarationContext) { - target, _ := warpTargetFullType(typeType) + target, _ := WarpTargetFullType(typeType) if target != "" { - jMethodCall := &models.JMethodCall{ - Package: removeTarget(target), - Type: "field", - Class: typeType, - MethodName: "", - StartLine: ctx.GetStart().GetLine(), - StartLinePosition: ctx.GetStart().GetColumn(), - StopLine: ctx.GetStop().GetLine(), - StopLinePosition: ctx.GetStop().GetColumn(), + position := BuildPosition(ctx.BaseParserRuleContext, target) + + jMethodCall := &core_domain.CodeCall{ + Package: RemoveTarget(target), + Type: "field", + NodeName: typeType, + Position: position, } - currentNode.MethodCalls = append(currentNode.MethodCalls, *jMethodCall) + currentNode.FunctionCalls = append(currentNode.FunctionCalls, *jMethodCall) } } -func buildImplement(text string) { - target, _ := warpTargetFullType(text) - currentNode.Implements = append(currentNode.Implements, target) +func buildImplement(text string) string { + target, _ := WarpTargetFullType(text) + return target } diff --git a/pkg/infrastructure/ast/ast_java/java_full_listener_test.go b/pkg/infrastructure/ast/ast_java/java_full_listener_test.go new file mode 100644 index 0000000000000000000000000000000000000000..062c83f483993663ecd4266dd6922a4eb6828b86 --- /dev/null +++ b/pkg/infrastructure/ast/ast_java/java_full_listener_test.go @@ -0,0 +1 @@ +package ast_java diff --git a/core/adapter/identifier/java_identifier_listener.go b/pkg/infrastructure/ast/ast_java/java_identify/java_identifier_listener.go similarity index 60% rename from core/adapter/identifier/java_identifier_listener.go rename to pkg/infrastructure/ast/ast_java/java_identify/java_identifier_listener.go index 1b77afb8daaa62fa0c8afbcc95b68efceef2d065..dfe3745891926c043079dc31b412885e93b34ef1 100644 --- a/core/adapter/identifier/java_identifier_listener.go +++ b/pkg/infrastructure/ast/ast_java/java_identify/java_identifier_listener.go @@ -1,25 +1,25 @@ -package identifier +package java_identify import ( "github.com/antlr/antlr4/runtime/Go/antlr" - "github.com/phodal/coca/core/adapter/common_listener" - "github.com/phodal/coca/core/models" "github.com/phodal/coca/languages/java" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/ast_java/common_listener" "reflect" "strings" ) -var currentNode *models.JIdentifier -var nodes []models.JIdentifier +var currentNode *core_domain.CodeDataStruct +var nodes []core_domain.CodeDataStruct -var currentMethod models.JMethod +var currentMethod core_domain.CodeFunction var hasEnterClass = false var imports []string func NewJavaIdentifierListener() *JavaIdentifierListener { nodes = nil - currentNode = models.NewJIdentifier() - currentMethod = models.NewJMethod() + currentNode = core_domain.NewDataStruct() + currentMethod = core_domain.NewJMethod() return &JavaIdentifierListener{} } @@ -39,106 +39,67 @@ func (s *JavaIdentifierListener) EnterPackageDeclaration(ctx *parser.PackageDecl func (s *JavaIdentifierListener) EnterClassDeclaration(ctx *parser.ClassDeclarationContext) { hasEnterClass = true - currentNode.ClassType = "Class" + currentNode.Type = "Class" if ctx.IDENTIFIER() != nil { - currentNode.ClassName = ctx.IDENTIFIER().GetText() + currentNode.NodeName = ctx.IDENTIFIER().GetText() } if ctx.EXTENDS() != nil { - currentNode.ExtendsName = ctx.TypeType().GetText() + if ctx.TypeType() != nil { + currentNode.Extend = ctx.TypeType().GetText() + } } if ctx.IMPLEMENTS() != nil { - types := ctx.TypeList().(*parser.TypeListContext).AllTypeType() - for _, typ := range types { - typeText := typ.GetText() - for _, imp := range imports { - if strings.HasSuffix(imp, "."+typeText) { - currentNode.Implements = append(currentNode.Implements, imp) + list := ctx.TypeList() + switch x := list.(type) { + case *parser.TypeListContext: + { + types := x.AllTypeType() + for _, typ := range types { + typeText := typ.GetText() + for _, imp := range imports { + if strings.HasSuffix(imp, "."+typeText) { + currentNode.Implements = append(currentNode.Implements, imp) + } + } } } } + } - currentMethod = models.NewJMethod() + currentMethod = core_domain.NewJMethod() } func (s *JavaIdentifierListener) ExitClassBody(ctx *parser.ClassBodyContext) { hasEnterClass = false - if currentNode.ClassName != "" { - currentNode.Methods = currentNode.GetMethods() - nodes = append(nodes, *currentNode) - } - currentNode = models.NewJIdentifier() -} - -func (s *JavaIdentifierListener) ExitInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { - hasEnterClass = false - if currentNode.ClassName != "" { - currentNode.Methods = currentNode.GetMethods() + if currentNode.NodeName != "" { nodes = append(nodes, *currentNode) } - currentNode = models.NewJIdentifier() + currentNode = core_domain.NewDataStruct() } func (s *JavaIdentifierListener) EnterConstructorDeclaration(ctx *parser.ConstructorDeclarationContext) { - - currentMethod = *&models.JMethod{ - Name: ctx.IDENTIFIER().GetText(), - Type: "", + position := core_domain.CodePosition{ StartLine: ctx.GetStart().GetLine(), StartLinePosition: ctx.GetStart().GetColumn(), StopLine: ctx.GetStop().GetLine(), StopLinePosition: ctx.GetStop().GetColumn(), - Override: isOverrideMethod, - Annotations: currentMethod.Annotations, - IsConstructor: true, } -} -func (s *JavaIdentifierListener) ExitConstructorDeclaration(ctx *parser.ConstructorDeclarationContext) { - - currentNode.AddMethod(currentMethod) - _ = models.NewJMethod() -} - -func (s *JavaIdentifierListener) EnterInterfaceBodyDeclaration(ctx *parser.InterfaceBodyDeclarationContext) { - hasEnterClass = true - for _, modifier := range ctx.AllModifier() { - modifier := modifier.(*parser.ModifierContext).GetChild(0) - if reflect.TypeOf(modifier.GetChild(0)).String() == "*parser.AnnotationContext" { - annotationContext := modifier.GetChild(0).(*parser.AnnotationContext) - common_listener.BuildAnnotation(annotationContext) - } + currentMethod = core_domain.CodeFunction{ + Name: ctx.IDENTIFIER().GetText(), + ReturnType: "", + Override: isOverrideMethod, + Annotations: currentMethod.Annotations, + IsConstructor: true, + Position: position, } } -func (s *JavaIdentifierListener) EnterInterfaceMethodDeclaration(ctx *parser.InterfaceMethodDeclarationContext) { - startLine := ctx.GetStart().GetLine() - startLinePosition := ctx.GetStart().GetColumn() - stopLine := ctx.GetStop().GetLine() - stopLinePosition := ctx.GetStop().GetColumn() - name := ctx.IDENTIFIER().GetText() - //XXX: find the start position of {, not public - typeType := ctx.TypeTypeOrVoid().GetText() - - annotations := currentMethod.Annotations - currentMethod = *&models.JMethod{ - Name: name, - Type: typeType, - StartLine: startLine, - StartLinePosition: startLinePosition, - StopLine: stopLine, - StopLinePosition: stopLinePosition, - Override: isOverrideMethod, - Annotations: annotations, - } -} - -func (s *JavaIdentifierListener) ExitInterfaceMethodDeclaration(ctx *parser.InterfaceMethodDeclarationContext) { - - currentNode.AddMethod(currentMethod) - _ = models.NewJMethod() +func (s *JavaIdentifierListener) ExitConstructorDeclaration(ctx *parser.ConstructorDeclarationContext) { + currentNode.Functions = append(currentNode.Functions, currentMethod) } var isOverrideMethod = false @@ -150,20 +111,30 @@ func (s *JavaIdentifierListener) EnterMethodDeclaration(ctx *parser.MethodDeclar startLinePosition := ctx.GetStart().GetColumn() stopLine := ctx.GetStop().GetLine() stopLinePosition := ctx.GetStop().GetColumn() - name := ctx.IDENTIFIER().GetText() + name := "" + if ctx.IDENTIFIER() != nil { + name = ctx.IDENTIFIER().GetText() + } typeType := ctx.TypeTypeOrVoid().GetText() - annotations := currentMethod.Annotations - currentMethod = *&models.JMethod{ - Name: name, - Type: typeType, + if reflect.TypeOf(ctx.GetParent().GetParent().GetChild(0)).String() == "*parser.ModifierContext" { + common_listener.BuildAnnotationForMethod(ctx.GetParent().GetParent().GetChild(0).(*parser.ModifierContext), ¤tMethod) + } + + position := core_domain.CodePosition{ StartLine: startLine, StartLinePosition: startLinePosition, StopLine: stopLine, StopLinePosition: stopLinePosition, - Override: isOverrideMethod, - Annotations: annotations, + } + + currentMethod = core_domain.CodeFunction{ + Name: name, + ReturnType: typeType, + Override: isOverrideMethod, + Annotations: currentMethod.Annotations, + Position: position, } if reflect.TypeOf(ctx.GetParent().GetParent()).String() == "*parser.ClassBodyDeclarationContext" { @@ -179,22 +150,17 @@ func (s *JavaIdentifierListener) EnterMethodDeclaration(ctx *parser.MethodDeclar } func (s *JavaIdentifierListener) ExitMethodDeclaration(ctx *parser.MethodDeclarationContext) { - - currentNode.AddMethod(currentMethod) - _ = models.NewJMethod() + currentNode.Functions = append(currentNode.Functions, currentMethod) + currentMethod = core_domain.NewJMethod() } func (s *JavaIdentifierListener) EnterAnnotation(ctx *parser.AnnotationContext) { - // Todo: support override method annotationName := ctx.QualifiedName().GetText() if annotationName == "Override" { isOverrideMethod = true } - if hasEnterClass { - annotation := common_listener.BuildAnnotation(ctx) - currentMethod.Annotations = append(currentMethod.Annotations, annotation) - } else { + if !hasEnterClass { annotation := common_listener.BuildAnnotation(ctx) currentNode.Annotations = append(currentNode.Annotations, annotation) } @@ -202,8 +168,50 @@ func (s *JavaIdentifierListener) EnterAnnotation(ctx *parser.AnnotationContext) func (s *JavaIdentifierListener) EnterInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { hasEnterClass = true - currentNode.ClassType = "Interface" - currentNode.ClassName = ctx.IDENTIFIER().GetText() + currentNode.Type = "Interface" + currentNode.NodeName = ctx.IDENTIFIER().GetText() +} + +func (s *JavaIdentifierListener) ExitInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { + hasEnterClass = false + if currentNode.NodeName != "" { + nodes = append(nodes, *currentNode) + } + currentNode = core_domain.NewDataStruct() +} + +func (s *JavaIdentifierListener) EnterInterfaceMethodDeclaration(ctx *parser.InterfaceMethodDeclarationContext) { + startLine := ctx.GetStart().GetLine() + startLinePosition := ctx.GetStart().GetColumn() + stopLine := ctx.GetStop().GetLine() + stopLinePosition := ctx.GetStop().GetColumn() + name := ctx.IDENTIFIER().GetText() + //XXX: find the start position of {, not public + typeType := ctx.TypeTypeOrVoid().GetText() + + if reflect.TypeOf(ctx.GetParent().GetParent().GetChild(0)).String() == "*parser.ModifierContext" { + common_listener.BuildAnnotationForMethod(ctx.GetParent().GetParent().GetChild(0).(*parser.ModifierContext), ¤tMethod) + } + + position := core_domain.CodePosition{ + StartLine: startLine, + StartLinePosition: startLinePosition, + StopLine: stopLine, + StopLinePosition: stopLinePosition, + } + + currentMethod = core_domain.CodeFunction{ + Name: name, + ReturnType: typeType, + Override: isOverrideMethod, + Annotations: currentMethod.Annotations, + Position: position, + } +} + +func (s *JavaIdentifierListener) ExitInterfaceMethodDeclaration(ctx *parser.InterfaceMethodDeclarationContext) { + currentNode.Functions = append(currentNode.Functions, currentMethod) + currentMethod = core_domain.NewJMethod() } func (s *JavaIdentifierListener) EnterExpression(ctx *parser.ExpressionContext) { @@ -216,6 +224,6 @@ func (s *JavaIdentifierListener) EnterExpression(ctx *parser.ExpressionContext) } } -func (s *JavaIdentifierListener) getNodes() []models.JIdentifier { +func (s *JavaIdentifierListener) GetNodes() []core_domain.CodeDataStruct { return nodes } diff --git a/pkg/infrastructure/ast/ast_java/java_process_helper.go b/pkg/infrastructure/ast/ast_java/java_process_helper.go new file mode 100644 index 0000000000000000000000000000000000000000..863f2c0ba28bf5e21eb42e2f039b1b92950a1822 --- /dev/null +++ b/pkg/infrastructure/ast/ast_java/java_process_helper.go @@ -0,0 +1,23 @@ +package ast_java + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/languages/java" +) + +func ProcessJavaFile(path string) *parser.JavaParser { + is, _ := antlr.NewFileStream(path) + return processStream(is) +} + +func processStream(is antlr.CharStream) *parser.JavaParser { + lexer := parser.NewJavaLexer(is) + stream := antlr.NewCommonTokenStream(lexer, 0) + parser := parser.NewJavaParser(stream) + return parser +} + +func ProcessJavaString(code string) *parser.JavaParser { + is := antlr.NewInputStream(code) + return processStream(is) +} diff --git a/pkg/infrastructure/ast/ast_python/python_ident_listener.go b/pkg/infrastructure/ast/ast_python/python_ident_listener.go new file mode 100644 index 0000000000000000000000000000000000000000..9914cf10e8efafa89247bd95c1bf763f6b950bb6 --- /dev/null +++ b/pkg/infrastructure/ast/ast_python/python_ident_listener.go @@ -0,0 +1,170 @@ +package ast_python + +import ( + "bytes" + "github.com/antlr/antlr4/runtime/Go/antlr" + parser "github.com/phodal/coca/languages/python" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/astutil" + "io" + "os" + "strings" +) + +type PythonIdentListener struct { + parser.BasePythonParserListener +} + +var currentCodeFile *core_domain.CodeContainer +var currentDataStruct *core_domain.CodeDataStruct +var debug = false +var output io.Writer +var hasEnterMember = false + +func NewPythonIdentListener(fileName string) *PythonIdentListener { + currentCodeFile = &core_domain.CodeContainer{} + currentCodeFile.FullName = fileName + output = os.Stdout + + return &PythonIdentListener{} +} + +func (s *PythonIdentListener) SetDebugOutput(isDebug bool) io.Writer { + output = new(bytes.Buffer) + debug = isDebug + + return output +} + +func (s *PythonIdentListener) EnterImport_stmt(ctx *parser.Import_stmtContext) { + dotNames := ctx.Dotted_as_names().(*parser.Dotted_as_namesContext).AllDotted_as_name() + + codeImport := &core_domain.CodeImport{} + context := dotNames[0].(*parser.Dotted_as_nameContext) + codeImport.Source = context.Dotted_name().GetText() + if context.Name() != nil { + codeImport.UsageName = append(codeImport.UsageName, context.Name().GetText()) + } + + for _, usageName := range dotNames[1:] { + nameContext := usageName.(*parser.Dotted_as_nameContext) + codeImport.UsageName = append(codeImport.UsageName, nameContext.GetText()) + } + + currentCodeFile.Imports = append(currentCodeFile.Imports, *codeImport) +} + +func (s *PythonIdentListener) EnterFrom_stmt(ctx *parser.From_stmtContext) { + codeImport := &core_domain.CodeImport{} + codeImport.Source = ctx.From_stmt_source().GetText() + usageName := ctx.From_stmt_as_names().GetText() + + asNameCtx := ctx.From_stmt_as_names().(*parser.From_stmt_as_namesContext) + if asNameCtx.OPEN_PAREN() != nil { + usageName = asNameCtx.Import_as_names().GetText() + } + if strings.Contains(usageName, ",") { + usageNames := strings.Split(usageName, ",") + codeImport.UsageName = append(codeImport.UsageName, usageNames...) + } else { + codeImport.UsageName = append(codeImport.UsageName, usageName) + } + + currentCodeFile.Imports = append(currentCodeFile.Imports, *codeImport) +} + +func (s *PythonIdentListener) EnterClassdef(ctx *parser.ClassdefContext) { + hasEnterMember = true + dataStruct := &core_domain.CodeDataStruct{ + NodeName: ctx.Name().GetText(), + } + + ctxIndex := astutil.GetNodeIndex(ctx) + if ctxIndex > 0 { + decorators := BuildDecoratorsByIndex(ctx, ctxIndex) + dataStruct.Annotations = decorators + } + + currentDataStruct = dataStruct +} + +func (s *PythonIdentListener) ExitClassdef(ctx *parser.ClassdefContext) { + hasEnterMember = false + currentCodeFile.DataStructures = append(currentCodeFile.DataStructures, *currentDataStruct) + currentDataStruct = nil +} + +func (s *PythonIdentListener) EnterFuncdef(ctx *parser.FuncdefContext) { + hasEnterMember = true + function := core_domain.CodeFunction{ + Name: ctx.Name().GetText(), + } + + ctxIndex := astutil.GetNodeIndex(ctx) + if ctxIndex > 0 { + decorators := BuildDecoratorsByIndex(ctx, ctxIndex) + function.Annotations = decorators + } + + member := core_domain.NewCodeMember() + member.Name = ctx.Name().GetText() + + if currentDataStruct != nil { + currentDataStruct.Functions = append(currentDataStruct.Functions, function) + } else { + member.FunctionNodes = append(member.FunctionNodes, function) + currentCodeFile.Members = append(currentCodeFile.Members, *member) + } +} + +func (s *PythonIdentListener) ExitFuncdef(ctx *parser.FuncdefContext) { + hasEnterMember = false +} + +func BuildDecoratorsByIndex(node antlr.ParseTree, index int) []core_domain.CodeAnnotation { + var nodes []parser.DecoratorContext + for i := 0; i < index; i++ { + context := node.GetParent().GetChild(i).(*parser.DecoratorContext) + nodes = append(nodes, *context) + } + + var annotations []core_domain.CodeAnnotation + for _, node := range nodes { + decorator := BuildDecorator(&node) + annotations = append(annotations, *decorator) + } + + return annotations +} + +func BuildDecorator(x *parser.DecoratorContext) *core_domain.CodeAnnotation { + text := x.Dotted_name().GetText() + + annotation := &core_domain.CodeAnnotation{ + Name: text, + } + + if x.Arglist() != nil { + annotation.KeyValues = BuildArgList(x.Arglist().(*parser.ArglistContext)) + } + + return annotation +} + +func BuildArgList(context *parser.ArglistContext) []core_domain.AnnotationKeyValue { + var arguments []core_domain.AnnotationKeyValue + for _, arg := range context.AllArgument() { + argContext := arg.(*parser.ArgumentContext) + argument := &core_domain.AnnotationKeyValue{ + Key: "", + Value: argContext.GetText(), + } + arguments = append(arguments, *argument) + } + + return arguments +} + +func (s *PythonIdentListener) GetCodeFileInfo() core_domain.CodeContainer { + return *currentCodeFile +} diff --git a/core/adapter/sql/sql_identifier_listener.go b/pkg/infrastructure/ast/ast_sql/sql_identifier_listener.go similarity index 56% rename from core/adapter/sql/sql_identifier_listener.go rename to pkg/infrastructure/ast/ast_sql/sql_identifier_listener.go index f610e0e2c322660de9164615adf9fe2d3279e288..cb9ffac7caeb844295a512084f8b5368c65f908d 100644 --- a/core/adapter/sql/sql_identifier_listener.go +++ b/pkg/infrastructure/ast/ast_sql/sql_identifier_listener.go @@ -1,36 +1,28 @@ -package sql +package ast_sql import ( "fmt" "github.com/phodal/coca/languages/sql" ) -type SqlIdentifierListener struct { +type SQLIdentifierListener struct { parser.BaseSqlListener } -type SqlNode struct { +type SQLNode struct { } -var sqlNode SqlNode +var sqlNode SQLNode func init() { - sqlNode = *&SqlNode{} + sqlNode = SQLNode{} } -func NewSqlIdentifierListener() *SqlIdentifierListener { - return &SqlIdentifierListener{} +func NewSqlIdentifierListener() *SQLIdentifierListener { + return &SQLIdentifierListener{} } -func (s *SqlIdentifierListener) EnterSelect_stmt(ctx *parser.Select_stmtContext) { - -} - -func (s *SqlIdentifierListener) EnterSelect_or_values(ctx *parser.Select_or_valuesContext) { - -} - -func (s *SqlIdentifierListener) EnterSelect_core(ctx *parser.Select_coreContext) { +func (s *SQLIdentifierListener) EnterSelect_core(ctx *parser.Select_coreContext) { columns := ctx.AllResult_column() for _, col := range columns { column := col.(*parser.Result_columnContext) @@ -50,6 +42,6 @@ func (s *SqlIdentifierListener) EnterSelect_core(ctx *parser.Select_coreContext) } } -func (s *SqlIdentifierListener) GetNodeInfo() SqlNode { +func (s *SQLIdentifierListener) GetNodeInfo() SQLNode { return sqlNode } diff --git a/pkg/infrastructure/ast/ast_typescript/typescript_ident_converter.go b/pkg/infrastructure/ast/ast_typescript/typescript_ident_converter.go new file mode 100644 index 0000000000000000000000000000000000000000..f4e08664010aa52ac47e90a1ba76aa0572b4c01e --- /dev/null +++ b/pkg/infrastructure/ast/ast_typescript/typescript_ident_converter.go @@ -0,0 +1,112 @@ +package ast_typescript + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/languages/ts" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/astutil" +) + +func BuildConstructorMethod(ctx *parser.ConstructorDeclarationContext) *core_domain.CodeFunction { + function := &core_domain.CodeFunction{ + Name: "constructor", + } + + astutil.AddFunctionPosition(function, ctx.GetChild(0).GetParent().(*antlr.BaseParserRuleContext)) + + if ctx.AccessibilityModifier() != nil { + modifier := ctx.AccessibilityModifier().GetText() + + function.Modifiers = append(function.Modifiers, modifier) + } + + return function +} + +func BuildMemberMethod(ctx *parser.PropertyMemberDeclarationContext) *core_domain.CodeFunction { + function := &core_domain.CodeFunction{ + Name: ctx.PropertyName().GetText(), + } + function.Position.StartLine = ctx.GetStart().GetLine() + function.Position.StartLinePosition = ctx.GetStart().GetColumn() + function.Position.StopLine = ctx.GetStop().GetLine() + function.Position.StopLinePosition = ctx.GetStop().GetColumn() + + return function +} + +func BuildImplements(typeList parser.IClassOrInterfaceTypeListContext) []string { + typeListContext := typeList.(*parser.ClassOrInterfaceTypeListContext) + + var implements []string = nil + for _, typeType := range typeListContext.AllTypeReference() { + typeRefs := typeType.(*parser.TypeReferenceContext).TypeName().GetText() + implements = append(implements, typeRefs) + } + + return implements +} + +func BuildMethodParameter(context *parser.ParameterListContext) ([]core_domain.CodeProperty) { + childNode := context.GetChild(0) + var parameters []core_domain.CodeProperty = nil + + switch x := childNode.(type) { + case *parser.RequiredParameterListContext: + listContext := x + + properties := buildRequireParameterList(listContext) + parameters = append(parameters, properties...) + + if context.RestParameter() != nil { + restParamCtx := context.RestParameter().(*parser.RestParameterContext) + codeProperty := buildRestParameters(restParamCtx) + + parameters = append(parameters, codeProperty) + } + case *parser.PredefinedTypeContext: + predefinedTypeContext := x + parameter := core_domain.CodeProperty{ + TypeValue: "any", + TypeType: predefinedTypeContext.GetText(), + } + parameters = append(parameters, parameter) + } + + return parameters +} + +func buildRestParameters(ctx *parser.RestParameterContext) core_domain.CodeProperty { + context := ctx.GetChild(1).(*parser.RequiredParameterContext) + return buildRequiredParameter(context) +} + +func buildRequireParameterList(listContext *parser.RequiredParameterListContext) []core_domain.CodeProperty { + var requireCodeParams []core_domain.CodeProperty = nil + + for _, requiredParameter := range listContext.AllRequiredParameter() { + paramCtx := requiredParameter.(*parser.RequiredParameterContext) + property := buildRequiredParameter(paramCtx) + + requireCodeParams = append(requireCodeParams, property) + } + return requireCodeParams +} + +func buildRequiredParameter(paramCtx *parser.RequiredParameterContext) core_domain.CodeProperty { + paramType := "" + if paramCtx.TypeAnnotation() != nil { + annotationContext := paramCtx.TypeAnnotation().(*parser.TypeAnnotationContext) + paramType = BuildTypeAnnotation(annotationContext) + } + parameter := core_domain.CodeProperty{ + TypeValue: paramCtx.IdentifierOrPattern().GetText(), + TypeType: paramType, + } + + return parameter +} + +func BuildTypeAnnotation(annotationContext *parser.TypeAnnotationContext) string { + return annotationContext.Type_().GetText() +} diff --git a/pkg/infrastructure/ast/ast_typescript/typescript_ident_listener.go b/pkg/infrastructure/ast/ast_typescript/typescript_ident_listener.go new file mode 100644 index 0000000000000000000000000000000000000000..1322af0dc4c6188d886be88169d891f246cb5d43 --- /dev/null +++ b/pkg/infrastructure/ast/ast_typescript/typescript_ident_listener.go @@ -0,0 +1,257 @@ +package ast_typescript + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + parser "github.com/phodal/coca/languages/ts" + "github.com/phodal/coca/pkg/domain/core_domain" + "github.com/phodal/coca/pkg/infrastructure/ast/astutil" + "strings" +) + +var defaultClass = "default" + +type TypeScriptIdentListener struct { + currentDataStruct *core_domain.CodeDataStruct + dataStructures []core_domain.CodeDataStruct + dataStructQueue []core_domain.CodeDataStruct + filePath string + codeFile core_domain.CodeContainer + + parser.BaseTypeScriptParserListener +} + +func NewTypeScriptIdentListener(fileName string) *TypeScriptIdentListener { + listener := &TypeScriptIdentListener{} + listener.filePath = fileName + return listener +} + +func (s *TypeScriptIdentListener) GetNodeInfo() core_domain.CodeContainer { + isScriptCalls := s.currentDataStruct != nil && s.currentDataStruct.IsNotEmpty() + if isScriptCalls { + if len(s.currentDataStruct.Functions) < 1 { + function := &core_domain.CodeFunction{} + function.Name = "default" + function.FunctionCalls = append(function.FunctionCalls, s.currentDataStruct.FunctionCalls...) + + s.currentDataStruct.Functions = append(s.currentDataStruct.Functions, *function) + } + + s.dataStructures = append(s.dataStructures, *s.currentDataStruct) + } + + s.codeFile.DataStructures = s.dataStructures + return s.codeFile +} + +func (s *TypeScriptIdentListener) EnterImportFromBlock(ctx *parser.ImportFromBlockContext) { + replaceSingleQuote := UpdateImportStr(ctx.StringLiteral().GetText()) + imp := &core_domain.CodeImport{Source: replaceSingleQuote} + importName := ctx.GetChild(0).(antlr.ParseTree).GetText() + imp.ImportName = importName + s.codeFile.Imports = append(s.codeFile.Imports, *imp) +} + +func UpdateImportStr(importText string) string { + replaceDoubleQuote := strings.ReplaceAll(importText, "\"", "") + replaceSingleQuote := strings.ReplaceAll(replaceDoubleQuote, "'", "") + return replaceSingleQuote +} + +func (s *TypeScriptIdentListener) EnterImportAliasDeclaration(ctx *parser.ImportAliasDeclarationContext) { + replaceSingleQuote := UpdateImportStr(ctx.StringLiteral().GetText()) + imp := &core_domain.CodeImport{Source: replaceSingleQuote} + s.codeFile.Imports = append(s.codeFile.Imports, *imp) +} + +func (s *TypeScriptIdentListener) EnterImportAll(ctx *parser.ImportAllContext) { + replaceSingleQuote := UpdateImportStr(ctx.StringLiteral().GetText()) + imp := &core_domain.CodeImport{Source: replaceSingleQuote} + s.codeFile.Imports = append(s.codeFile.Imports, *imp) +} + +func (s *TypeScriptIdentListener) EnterInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { + s.currentDataStruct = &core_domain.CodeDataStruct{ + Type: "Interface", + NodeName: ctx.Identifier().GetText(), + } + + if ctx.InterfaceExtendsClause() != nil { + extendsContext := ctx.InterfaceExtendsClause().(*parser.InterfaceExtendsClauseContext) + elements := BuildImplements(extendsContext.ClassOrInterfaceTypeList()) + s.currentDataStruct.Extend = elements[0] + } + + objectTypeCtx := ctx.ObjectType().(*parser.ObjectTypeContext) + if objectTypeCtx.TypeBody() != nil { + bodyCtx := objectTypeCtx.TypeBody().(*parser.TypeBodyContext) + typeMemberListCtx := bodyCtx.TypeMemberList().(*parser.TypeMemberListContext) + + BuildInterfaceTypeBody(typeMemberListCtx, s.currentDataStruct) + } +} + +func BuildInterfaceTypeBody(ctx *parser.TypeMemberListContext, dataStruct *core_domain.CodeDataStruct) { + for _, typeMember := range ctx.AllTypeMember() { + typeMemberCtx := typeMember.(*parser.TypeMemberContext) + memberChild := typeMemberCtx.GetChild(0) + switch x := memberChild.(type) { + case *parser.PropertySignatureContext: + BuildInterfacePropertySignature(x, dataStruct) + case *parser.MethodSignatureContext: + function := core_domain.CodeFunction{ + Name: x.PropertyName().GetText(), + } + + FillMethodFromCallSignature(x.CallSignature().(*parser.CallSignatureContext), &function) + + dataStruct.Functions = append(dataStruct.Functions, function) + } + } +} + +func BuildInterfacePropertySignature(signatureCtx *parser.PropertySignatureContext, dataStruct *core_domain.CodeDataStruct) { + typeType := BuildTypeAnnotation(signatureCtx.TypeAnnotation().(*parser.TypeAnnotationContext)) + typeValue := signatureCtx.PropertyName().(*parser.PropertyNameContext).GetText() + + isArrowFunc := signatureCtx.Type_() != nil + if isArrowFunc { + function := &core_domain.CodeFunction{ + Name: typeValue, + } + param := core_domain.CodeProperty{ + TypeValue: "any", + TypeType: typeType, + } + + returnType := core_domain.CodeProperty{ + TypeType: signatureCtx.Type_().GetText(), + } + function.Parameters = append(function.Parameters, param) + function.MultipleReturns = append(function.MultipleReturns, returnType) + + dataStruct.Functions = append(dataStruct.Functions, *function) + } else { + codeField := &core_domain.CodeField{} + codeField.TypeType = typeType + codeField.TypeValue = typeValue + + dataStruct.Fields = append(dataStruct.Fields, *codeField) + } +} + +func (s *TypeScriptIdentListener) ExitInterfaceDeclaration(ctx *parser.InterfaceDeclarationContext) { + s.exitClass() +} + +func (s *TypeScriptIdentListener) EnterClassDeclaration(ctx *parser.ClassDeclarationContext) { + s.currentDataStruct = &core_domain.CodeDataStruct{ + Type: "Class", + NodeName: ctx.Identifier().GetText(), + } + + heritageContext := ctx.ClassHeritage().(*parser.ClassHeritageContext) + if heritageContext.ImplementsClause() != nil { + typeList := heritageContext.ImplementsClause().(*parser.ImplementsClauseContext).ClassOrInterfaceTypeList() + + implements := BuildImplements(typeList) + s.currentDataStruct.Implements = implements + } + + if heritageContext.ClassExtendsClause() != nil { + referenceContext := heritageContext.ClassExtendsClause().(*parser.ClassExtendsClauseContext).TypeReference().(*parser.TypeReferenceContext) + + s.currentDataStruct.Extend = referenceContext.TypeName().GetText() + } + + classTailContext := ctx.ClassTail().(*parser.ClassTailContext) + s.handleClassBodyElements(classTailContext) + + s.dataStructQueue = append(s.dataStructQueue, *s.currentDataStruct) +} + +func (s *TypeScriptIdentListener) handleClassBodyElements(classTailContext *parser.ClassTailContext) { + for _, classElement := range classTailContext.AllClassElement() { + elementChild := classElement.GetChild(0) + switch x := elementChild.(type) { + case *parser.ConstructorDeclarationContext: + codeFunction := BuildConstructorMethod(x) + + s.currentDataStruct.Functions = append(s.currentDataStruct.Functions, *codeFunction) + case *parser.PropertyMemberDeclarationContext: + s.HandlePropertyMember(x, s.currentDataStruct) + } + } +} + +func (s *TypeScriptIdentListener) HandlePropertyMember(propertyMemberCtx *parser.PropertyMemberDeclarationContext, dataStruct *core_domain.CodeDataStruct) { + callSignatureSizePos := 3 + if propertyMemberCtx.PropertyName() != nil { + modifier := propertyMemberCtx.PropertyMemberBase().GetText() + codeField := core_domain.CodeField{ + TypeValue: propertyMemberCtx.PropertyName().GetText(), + } + codeField.Modifiers = append(codeField.Modifiers, modifier) + if propertyMemberCtx.TypeAnnotation() != nil { + codeField.TypeType = BuildTypeAnnotation(propertyMemberCtx.TypeAnnotation().(*parser.TypeAnnotationContext)) + } + + dataStruct.Fields = append(dataStruct.Fields, codeField) + } + + if propertyMemberCtx.GetChildCount() >= callSignatureSizePos { + callSignCtxPos := 2 + switch propertyMemberCtx.GetChild(callSignCtxPos).(type) { + case *parser.CallSignatureContext: + memberFunction := BuildMemberMethod(propertyMemberCtx) + dataStruct.Functions = append(dataStruct.Functions, *memberFunction) + } + } +} + +func (s *TypeScriptIdentListener) ExitClassDeclaration(ctx *parser.ClassDeclarationContext) { + s.exitClass() +} + +func (s *TypeScriptIdentListener) exitClass() { + s.dataStructures = append(s.dataStructures, *s.currentDataStruct) + if len(s.dataStructQueue) > 1 { + s.dataStructQueue = s.dataStructQueue[0 : len(s.dataStructQueue)-1] + s.currentDataStruct = &s.dataStructQueue[len(s.dataStructQueue)-1] + } else { + s.currentDataStruct = core_domain.NewDataStruct() + } +} + +func (s *TypeScriptIdentListener) EnterFunctionDeclaration(ctx *parser.FunctionDeclarationContext) { + function := &core_domain.CodeFunction{ + Name: ctx.Identifier().GetText(), + } + + callSignatureContext := ctx.CallSignature().(*parser.CallSignatureContext) + FillMethodFromCallSignature(callSignatureContext, function) + + astutil.AddFunctionPosition(function, ctx.GetChild(0).GetParent().(*antlr.BaseParserRuleContext)) + + if s.currentDataStruct == nil { + s.currentDataStruct = &core_domain.CodeDataStruct{} + } + s.currentDataStruct.Functions = append(s.currentDataStruct.Functions, *function) +} + +func FillMethodFromCallSignature(callSignatureContext *parser.CallSignatureContext, function *core_domain.CodeFunction) { + if callSignatureContext.ParameterList() != nil { + parameterListContext := callSignatureContext.ParameterList().(*parser.ParameterListContext) + functionParameters := BuildMethodParameter(parameterListContext) + + function.Parameters = append(function.Parameters, functionParameters...) + } + + if callSignatureContext.TypeAnnotation() != nil { + annotationContext := callSignatureContext.TypeAnnotation().(*parser.TypeAnnotationContext) + typeAnnotation := BuildTypeAnnotation(annotationContext) + + returnType := function.BuildSingleReturnType(typeAnnotation) + function.MultipleReturns = append(function.MultipleReturns, *returnType) + } +} diff --git a/pkg/infrastructure/ast/astutil/pare_tree_util.go b/pkg/infrastructure/ast/astutil/pare_tree_util.go new file mode 100644 index 0000000000000000000000000000000000000000..62910f2720c3adacb5e3249d4b8316723d42ba7e --- /dev/null +++ b/pkg/infrastructure/ast/astutil/pare_tree_util.go @@ -0,0 +1,17 @@ +package astutil + +import "github.com/antlr/antlr4/runtime/Go/antlr" + +func GetNodeIndex(node antlr.ParseTree) int { + if node == nil || node.GetParent() == nil { + return -1 + } + parent := node.GetParent() + + for i := 0; i < parent.GetChildCount(); i++ { + if parent.GetChild(i) == node { + return i + } + } + return 0 +} diff --git a/pkg/infrastructure/ast/astutil/position.go b/pkg/infrastructure/ast/astutil/position.go new file mode 100644 index 0000000000000000000000000000000000000000..6f9336a81871e2cfd55966c61b1b7a27ea277c0b --- /dev/null +++ b/pkg/infrastructure/ast/astutil/position.go @@ -0,0 +1,14 @@ +package astutil + +import ( + "github.com/antlr/antlr4/runtime/Go/antlr" + "github.com/phodal/coca/pkg/domain/core_domain" +) + +func AddFunctionPosition(m *core_domain.CodeFunction, ctx *antlr.BaseParserRuleContext) { + m.Position.StartLine = ctx.GetStart().GetLine() + m.Position.StartLinePosition = ctx.GetStart().GetColumn() + m.Position.StopLine = ctx.GetStop().GetLine() + m.Position.StopLinePosition = ctx.GetStop().GetColumn() +} + diff --git a/core/adapter/bs/bad_smell_listener.go b/pkg/infrastructure/ast/bs_java/bad_smell_listener.go similarity index 69% rename from core/adapter/bs/bad_smell_listener.go rename to pkg/infrastructure/ast/bs_java/bad_smell_listener.go index 998ae56c390d356822db00b118bc9c9511e24cdc..980e246f88dc75e7de4168c4b8c70611d487b649 100644 --- a/core/adapter/bs/bad_smell_listener.go +++ b/pkg/infrastructure/ast/bs_java/bad_smell_listener.go @@ -1,9 +1,10 @@ -package bs +package bs_java import ( "github.com/antlr/antlr4/runtime/Go/antlr" - models2 "github.com/phodal/coca/core/adapter/bs/models" . "github.com/phodal/coca/languages/java" + "github.com/phodal/coca/pkg/domain/bs_domain" + "github.com/phodal/coca/pkg/domain/core_domain" "reflect" "strings" ) @@ -17,13 +18,13 @@ var currentClzType string var currentClzExtends string var currentClzImplements []string -var methods []models2.BsJMethod -var methodCalls []models2.BsJMethodCall +var methods []bs_domain.BSFunction +var methodCalls []core_domain.CodeCall var fields = make(map[string]string) var localVars = make(map[string]string) var formalParameters = make(map[string]string) -var currentClassBs models2.ClassBadSmellInfo +var currentClassBs bs_domain.ClassBadSmellInfo func NewBadSmellListener() *BadSmellListener { currentClz = "" @@ -39,17 +40,19 @@ type BadSmellListener struct { BaseJavaParserListener } -func (s *BadSmellListener) getNodeInfo() models2.BsJClass { - return *&models2.BsJClass{ - currentPkg, - currentClz, - currentClzType, - "", - currentClzExtends, - currentClzImplements, - methods, - methodCalls, - currentClassBs, +func (s *BadSmellListener) GetNodeInfo() bs_domain.BSDataStruct { + dataStruct := core_domain.CodeDataStruct{ + Package: currentPkg, + NodeName: currentClz, + Type: currentClzType, + Extend: currentClzExtends, + Implements: currentClzImplements, + FunctionCalls: methodCalls, + } + return bs_domain.BSDataStruct{ + CodeDataStruct: dataStruct, + Functions: methods, + DataStructBS: currentClassBs, } } @@ -73,13 +76,13 @@ func (s *BadSmellListener) EnterClassDeclaration(ctx *ClassDeclarationContext) { if ctx.IMPLEMENTS() != nil { typeList := ctx.TypeList().(*TypeListContext) for _, typ := range typeList.AllTypeType() { - typeData := getTypeDATA(typ.(*TypeTypeContext)) + typeData := getTypeData(typ.(*TypeTypeContext)) currentClzImplements = append(currentClzImplements, typeData) } } } -func getTypeDATA(typ *TypeTypeContext) string { +func getTypeData(typ *TypeTypeContext) string { var typeData string classOrInterface := typ.ClassOrInterfaceType().(*ClassOrInterfaceTypeContext) if classOrInterface != nil { @@ -103,19 +106,14 @@ func (s *BadSmellListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMethodD stopLinePosition := startLinePosition + len(name) methodBody := ctx.MethodBody().GetText() - var modifiers = "" - allModifier := ctx.AllInterfaceMethodModifier() - methodModifierLen := len(allModifier) - for index, modifier := range allModifier { - modifiers = modifiers + modifier.GetText() - if index < methodModifierLen-1 { - modifiers = modifiers + "," - } + var modifiers []string + for _, mo := range ctx.AllInterfaceMethodModifier() { + modifiers = append(modifiers, mo.GetText()) } typeType := ctx.TypeTypeOrVoid().GetText() - var methodParams []models2.JFullParameter = nil + var methodParams []core_domain.CodeProperty = nil parameters := ctx.FormalParameters() if parameters != nil { if reflect.TypeOf(parameters.GetChild(1)).String() == "*parser.FormalParameterListContext" { @@ -125,24 +123,32 @@ func (s *BadSmellListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMethodD paramContext := param.(*FormalParameterContext) paramType := paramContext.TypeType().GetText() paramValue := paramContext.VariableDeclaratorId().(*VariableDeclaratorIdContext).IDENTIFIER().GetText() - methodParams = append(methodParams, *&models2.JFullParameter{paramType, paramValue}) + methodParams = append(methodParams, core_domain.CodeProperty{TypeValue: paramType, TypeType: paramValue}) } } } - methodBSInfo := models2.NewMethodBadSmellInfo() + methodBSInfo := bs_domain.NewMethodBadSmellInfo() - method := &models2.BsJMethod{ - Name: name, - Type: typeType, + position := core_domain.CodePosition{ StartLine: startLine, StartLinePosition: startLinePosition, StopLine: stopLine, StopLinePosition: stopLinePosition, - MethodBody: methodBody, - Modifier: modifiers, - Parameters: methodParams, - MethodBs: methodBSInfo, + } + + function := core_domain.CodeFunction{ + Name: name, + ReturnType: typeType, + Modifiers: modifiers, + Parameters: methodParams, + Position: position, + } + + method := &bs_domain.BSFunction{ + CodeFunction: function, + FunctionBody: methodBody, + FunctionBS: methodBSInfo, } methods = append(methods, *method) @@ -180,7 +186,7 @@ func (s *BadSmellListener) EnterMethodDeclaration(ctx *MethodDeclarationContext) typeType := ctx.TypeTypeOrVoid().GetText() methodBody := ctx.MethodBody().GetText() - var methodParams []models2.JFullParameter = nil + var methodParams []core_domain.CodeProperty = nil parameters := ctx.FormalParameters() if parameters != nil { if reflect.TypeOf(parameters.GetChild(1)).String() == "*parser.FormalParameterListContext" { @@ -190,27 +196,38 @@ func (s *BadSmellListener) EnterMethodDeclaration(ctx *MethodDeclarationContext) paramContext := param.(*FormalParameterContext) paramType := paramContext.TypeType().GetText() paramValue := paramContext.VariableDeclaratorId().(*VariableDeclaratorIdContext).IDENTIFIER().GetText() - methodParams = append(methodParams, models2.JFullParameter{paramType, paramValue}) + methodParams = append(methodParams, core_domain.CodeProperty{TypeValue: paramType, TypeType: paramValue}) localVars[paramValue] = paramType } } } - methodBSInfo := models2.NewMethodBadSmellInfo() + methodBSInfo := bs_domain.NewMethodBadSmellInfo() methodBadSmellInfo := buildMethodBSInfo(ctx, methodBSInfo) - method := &models2.BsJMethod{ - Name: name, - Type: typeType, + position := core_domain.CodePosition{ StartLine: startLine, StartLinePosition: startLinePosition, StopLine: stopLine, StopLinePosition: stopLinePosition, - MethodBody: methodBody, - Modifier: modifier, - Parameters: methodParams, - MethodBs: methodBadSmellInfo, + } + + var modifiers []string = nil + modifiers = append(modifiers, modifier) + + function := core_domain.CodeFunction{ + Name: name, + ReturnType: typeType, + Modifiers: modifiers, + Parameters: methodParams, + Position: position, + } + + method := &bs_domain.BSFunction{ + CodeFunction: function, + FunctionBody: methodBody, + FunctionBS: methodBadSmellInfo, } methods = append(methods, *method) } @@ -230,7 +247,7 @@ func getModifier(ctx *MethodDeclarationContext) string { return modifier } -func buildMethodBSInfo(context *MethodDeclarationContext, bsInfo models2.MethodBadSmellInfo) models2.MethodBadSmellInfo { +func buildMethodBSInfo(context *MethodDeclarationContext, bsInfo bs_domain.FunctionBSInfo) bs_domain.FunctionBSInfo { methodBody := context.MethodBody() blockContext := methodBody.GetChild(0) if reflect.TypeOf(blockContext).String() == "*parser.BlockContext" { @@ -241,28 +258,7 @@ func buildMethodBSInfo(context *MethodDeclarationContext, bsInfo models2.MethodB continue } - statementCtx := statement.GetChild(0).(*StatementContext) - if (reflect.TypeOf(statementCtx.GetChild(1)).String()) == "*parser.ParExpressionContext" { - if statementCtx.GetChild(0).(antlr.ParseTree).GetText() == "if" { - if reflect.TypeOf(statementCtx.GetChild(1)).String() == "*parser.ParExpressionContext" { - parCtx := statementCtx.GetChild(1).(*ParExpressionContext) - startLine := parCtx.GetStart().GetLine() - endLine := parCtx.GetStop().GetLine() - - info := models2.NewIfPairInfo() - info.StartLine = startLine - info.EndLine = endLine - bsInfo.IfInfo = append(bsInfo.IfInfo, info) - } - - bsInfo.IfSize = bsInfo.IfSize + 1 - } - - if statementCtx.GetChild(0).(antlr.ParseTree).GetText() == "switch" { - bsInfo.SwitchSize = bsInfo.SwitchSize + 1 - } - - } + countMethodIfSwitch(statement, &bsInfo) } } } @@ -270,9 +266,29 @@ func buildMethodBSInfo(context *MethodDeclarationContext, bsInfo models2.MethodB return bsInfo } -func (s *BadSmellListener) EnterFormalParameterList(ctx *FormalParameterListContext) { - //fmt.Println(ctx.GetParent().GetParent().(antlr.RuleNode).get) - //fmt.Println(ctx.AllFormalParameter() +func countMethodIfSwitch(statement IBlockStatementContext, bsInfo *bs_domain.FunctionBSInfo) { + statementCtx := statement.GetChild(0).(*StatementContext) + if (reflect.TypeOf(statementCtx.GetChild(1)).String()) == "*parser.ParExpressionContext" { + if statementCtx.GetChild(0).(antlr.ParseTree).GetText() == "if" { + if reflect.TypeOf(statementCtx.GetChild(1)).String() == "*parser.ParExpressionContext" { + parCtx := statementCtx.GetChild(1).(*ParExpressionContext) + startLine := parCtx.GetStart().GetLine() + endLine := parCtx.GetStop().GetLine() + + info := bs_domain.NewIfPairInfo() + info.StartLine = startLine + info.EndLine = endLine + bsInfo.IfInfo = append(bsInfo.IfInfo, info) + } + + bsInfo.IfSize = bsInfo.IfSize + 1 + } + + if statementCtx.GetChild(0).(antlr.ParseTree).GetText() == "switch" { + bsInfo.SwitchSize = bsInfo.SwitchSize + 1 + } + + } } func (s *BadSmellListener) EnterAnnotation(ctx *AnnotationContext) { @@ -286,22 +302,11 @@ func (s *BadSmellListener) EnterCreator(ctx *CreatorContext) { localVars[variableName] = ctx.CreatedName().GetText() } -func (s *BadSmellListener) EnterLocalTypeDeclaration(ctx *LocalTypeDeclarationContext) { - -} - func (s *BadSmellListener) EnterMethodCall(ctx *MethodCallContext) { var targetCtx = ctx.GetParent().GetChild(0).(antlr.ParseTree).GetText() var targetType = parseTargetType(targetCtx) callee := ctx.GetChild(0).(antlr.ParseTree).GetText() - startLine := ctx.GetStart().GetLine() - startLinePosition := ctx.GetStart().GetColumn() - stopLine := ctx.GetStop().GetLine() - stopLinePosition := startLinePosition + len(callee) - - //typeType := ctx.GetChild(0).(antlr.ParseTree).TypeTypeOrVoid().GetText() - // TODO: 处理链试调用 if strings.Contains(targetType, "()") && strings.Contains(targetType, ".") { split := strings.Split(targetType, ".") @@ -309,19 +314,26 @@ func (s *BadSmellListener) EnterMethodCall(ctx *MethodCallContext) { targetType = localVars[sourceTarget] } + position := core_domain.CodePosition{ + StartLine: ctx.GetStart().GetLine(), + StartLinePosition: ctx.GetStart().GetColumn(), + StopLine: ctx.GetStop().GetLine(), + StopLinePosition: ctx.GetStart().GetColumn() + len(callee), + } + fullType := warpTargetFullType(targetType) if targetType == "super" { targetType = currentClzExtends } if fullType != "" { - jMethodCall := *&models2.BsJMethodCall{removeTarget(fullType), "", targetType, callee, startLine, startLinePosition, stopLine, stopLinePosition} + jMethodCall := core_domain.CodeCall{Package: removeTarget(fullType), NodeName: targetType, FunctionName: callee, Position: position} methodCalls = append(methodCalls, jMethodCall) } else { if ctx.GetText() == targetType { - jMethodCall := *&models2.BsJMethodCall{currentPkg, "", currentClz, callee, startLine, startLinePosition, stopLine, stopLinePosition} + jMethodCall := core_domain.CodeCall{Package: currentPkg, NodeName: currentClz, FunctionName: callee, Position: position} methodCalls = append(methodCalls, jMethodCall) } else { - jMethodCall := *&models2.BsJMethodCall{currentPkg, "NEEDFIX", targetType, callee, startLine, startLinePosition, stopLine, stopLinePosition} + jMethodCall := core_domain.CodeCall{Package: currentPkg, Type: "NEEDFIX", NodeName: targetType, FunctionName: callee, Position: position} methodCalls = append(methodCalls, jMethodCall) } } @@ -335,20 +347,18 @@ func (s *BadSmellListener) EnterExpression(ctx *ExpressionContext) { targetType := parseTargetType(text) fullType := warpTargetFullType(targetType) - startLine := ctx.GetStart().GetLine() - startLinePosition := ctx.GetStart().GetColumn() - stopLine := ctx.GetStop().GetLine() - stopLinePosition := startLinePosition + len(text) + position := core_domain.CodePosition{ + StartLine: ctx.GetStart().GetLine(), + StartLinePosition: ctx.GetStart().GetColumn(), + StopLine: ctx.GetStop().GetLine(), + StopLinePosition: ctx.GetStart().GetColumn() + len(text), + } - jMethodCall := &models2.BsJMethodCall{removeTarget(fullType), "", targetType, methodName, startLine, startLinePosition, stopLine, stopLinePosition} - methodCalls = append(methodCalls, *jMethodCall) + jMethodCall := core_domain.CodeCall{Package: removeTarget(fullType), NodeName: targetType, FunctionName: methodName, Position: position} + methodCalls = append(methodCalls, jMethodCall) } } -func (s *BadSmellListener) appendClasses(classes []string) { - clzs = classes -} - func removeTarget(fullType string) string { split := strings.Split(fullType, ".") return strings.Join(split[:len(split)-1], ".") diff --git a/core/support/tech_stop_words.go b/pkg/infrastructure/constants/java_target_config.go similarity index 72% rename from core/support/tech_stop_words.go rename to pkg/infrastructure/constants/java_target_config.go index 4a9b41f4247f2258a46594612eb1905535e6b57c..b12591dd136e9912a7e18d890d6f65e844e0ed25 100644 --- a/core/support/tech_stop_words.go +++ b/pkg/infrastructure/constants/java_target_config.go @@ -1,4 +1,19 @@ -package support +package constants + +// TBS Config List + +var ( + DuplicatedAssertionLimitLength = 5 + ASSERTION_LIST = []string{ + "assert", + "should", + "check", // ArchUnit, + "maynotbe", // ArchUnit, + "is", // RestAssured, + "spec", // RestAssured, + "verify", // Mockito, + } +) var TechStopWords = []string{ "get", @@ -79,13 +94,3 @@ var TechStopWords = []string{ "return", } -func IsTechStopWords(firstWord string) bool { - for _, word := range TechStopWords { - if word == firstWord { - return true; - } - } - - return false; -} - diff --git a/core/adapter/sql/parse/coll_stack.go b/pkg/infrastructure/container/coll_stack.go similarity index 61% rename from core/adapter/sql/parse/coll_stack.go rename to pkg/infrastructure/container/coll_stack.go index 10e8ae695a1f2c8193bdee7833260a0e95e0d6ac..d2d604bc3b355f26cc50fab6c29d62024b8cb16f 100644 --- a/core/adapter/sql/parse/coll_stack.go +++ b/pkg/infrastructure/container/coll_stack.go @@ -1,27 +1,27 @@ -package parse +package container import ( l "container/list" "sync" ) -type stack struct { +type Stack struct { list *l.List mu sync.Mutex } -func NewStack() *stack { +func NewStack() *Stack { list := l.New() - return &stack{list: list,} + return &Stack{list: list,} } -func (s *stack) Push(t interface{}){ +func (s *Stack) Push(t interface{}){ s.mu.Lock() defer s.mu.Unlock() s.list.PushFront(t) } -func (s *stack) Pop() interface{} { +func (s *Stack) Pop() interface{} { s.mu.Lock() defer s.mu.Unlock() ele := s.list.Front() @@ -33,17 +33,17 @@ func (s *stack) Pop() interface{} { return nil } -func (s *stack) Peak() interface{} { +func (s *Stack) Peak() interface{} { s.mu.Lock() defer s.mu.Unlock() ele := s.list.Front() return ele.Value } -func (s *stack) Len() int { +func (s *Stack) Len() int { return s.list.Len() } -func (s *stack) IsEmpty() bool { +func (s *Stack) IsEmpty() bool { return s.list.Len() == 0 } diff --git a/pkg/infrastructure/jpackage/jpackage.go b/pkg/infrastructure/jpackage/jpackage.go new file mode 100644 index 0000000000000000000000000000000000000000..6abeb940fb32b0d54147f33ebd9d89d0fcc24e3b --- /dev/null +++ b/pkg/infrastructure/jpackage/jpackage.go @@ -0,0 +1,14 @@ +package jpackage + +import "strings" + +func GetClassName(path string) string { + split := strings.Split(path, ".") + return strings.Join(split[:len(split)-1], ".") +} + +func GetMethodName(path string) string { + split := strings.Split(path, ".") + return strings.Join(split[len(split)-1:], ".") +} + diff --git a/pkg/infrastructure/jpackage/jpackage_test.go b/pkg/infrastructure/jpackage/jpackage_test.go new file mode 100644 index 0000000000000000000000000000000000000000..6af6b64ab13df8faed1fcd56a290b9923e5a881f --- /dev/null +++ b/pkg/infrastructure/jpackage/jpackage_test.go @@ -0,0 +1,37 @@ +package jpackage + +import "testing" + +func TestGetMethodName(t *testing.T) { + tests := []struct { + name string + origin string + want string + }{ + {"get package", "com.phodal.coca.JPackage.getMethodName", "getMethodName"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := GetMethodName(tt.origin); got != tt.want { + t.Errorf("GetMethodName() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestGetClassName(t *testing.T) { + tests := []struct { + name string + path string + want string + }{ + {"get package", "JPackage.getMethodName", "JPackage"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := GetClassName(tt.path); got != tt.want { + t.Errorf("GetClassName() = %v, want %v", got, tt.want) + } + }) + } +} \ No newline at end of file diff --git a/core/support/word_freq.go b/pkg/infrastructure/string_helper/coca_sort.go similarity index 73% rename from core/support/word_freq.go rename to pkg/infrastructure/string_helper/coca_sort.go index 6529525095db70eae205432f794138451b7236be..dd1647054c1fc352cd8911f3b5e20f8a3dd42887 100644 --- a/core/support/word_freq.go +++ b/pkg/infrastructure/string_helper/coca_sort.go @@ -1,9 +1,11 @@ -package support +package string_helper -import "sort" +import ( + "github.com/yourbasic/radix" +) // from: https://stackoverflow.com/questions/18695346/how-to-sort-a-mapstringint-by-its-values -func RankByWordCount(wordFrequencies map[string]int) PairList { +func SortWord(wordFrequencies map[string]int) PairList { pl := make(PairList, len(wordFrequencies)) i := 0 for k, v := range wordFrequencies { @@ -11,7 +13,7 @@ func RankByWordCount(wordFrequencies map[string]int) PairList { i++ } - sort.Sort(sort.Reverse(pl)) + radix.SortSlice(pl, func(i int) string { return pl[i].Key }) return pl } diff --git a/core/support/string_array.go b/pkg/infrastructure/string_helper/string_array.go similarity index 53% rename from core/support/string_array.go rename to pkg/infrastructure/string_helper/string_array.go index c4d781b8f2c0c4b675bedafccd98a242741c6b7f..815ddd2d9e911a1ddbc6f86f3cff3721f31c73ce 100644 --- a/core/support/string_array.go +++ b/pkg/infrastructure/string_helper/string_array.go @@ -1,8 +1,8 @@ -package support +package string_helper import "sort" -func Contains(s []string, searchterm string) bool { +func StringArrayContains(s []string, searchterm string) bool { i := sort.SearchStrings(s, searchterm) return i < len(s) && s[i] == searchterm } diff --git a/core/adapter/sql/parse/LICENSE b/pkg/infrastructure/xmlparse/LICENSE similarity index 100% rename from core/adapter/sql/parse/LICENSE rename to pkg/infrastructure/xmlparse/LICENSE diff --git a/core/adapter/sql/parse/README.md b/pkg/infrastructure/xmlparse/README.md similarity index 100% rename from core/adapter/sql/parse/README.md rename to pkg/infrastructure/xmlparse/README.md diff --git a/core/adapter/sql/parse/xml_parser.go b/pkg/infrastructure/xmlparse/xml_parser.go similarity index 72% rename from core/adapter/sql/parse/xml_parser.go rename to pkg/infrastructure/xmlparse/xml_parser.go index 3268346784fa194a2f86b6a0b41a60a68eb76cb3..5de5d0259bb0e0d6baf7358186f86cb75c13a960 100644 --- a/core/adapter/sql/parse/xml_parser.go +++ b/pkg/infrastructure/xmlparse/xml_parser.go @@ -1,7 +1,8 @@ -package parse +package xmlparse import ( "encoding/xml" + "github.com/phodal/coca/pkg/infrastructure/container" "io" "strings" ) @@ -10,11 +11,11 @@ type ElemType string const ( eleTpText ElemType = "text" // 静态文本节点 - eleTpNode ElemType = "node" // 节点子节点 + eleTpNode ElemType = "XMLNode" // 节点子节点 ) -type node struct { - Id string +type XMLNode struct { + ID string Name string Attrs map[string]xml.Attr Elements []element @@ -25,11 +26,11 @@ type element struct { Val interface{} } -func ParseXml(r io.Reader) *node { +func ParseXML(r io.Reader) *XMLNode { parser := xml.NewDecoder(r) - var root node + var root XMLNode - st := NewStack() + st := container.NewStack() for { token, err := parser.Token() if err != nil { @@ -37,36 +38,35 @@ func ParseXml(r io.Reader) *node { } switch t := token.(type) { case xml.StartElement: //tag start - elmt := xml.StartElement(t) - name := elmt.Name.Local - attr := elmt.Attr + name := t.Name.Local + attr := t.Attr attrMap := make(map[string]xml.Attr) for _, val := range attr { attrMap[val.Name.Local] = val } - node := node{ + node := XMLNode{ Name: name, Attrs: attrMap, Elements: make([]element, 0), } for _, val := range attr { if val.Name.Local == "id" { - node.Id = val.Value + node.ID = val.Value } } st.Push(node) case xml.EndElement: //tag end if st.Len() > 0 { - //cur node - n := st.Pop().(node) - if st.Len() > 0 { //if the root node then append to element + //cur XMLNode + n := st.Pop().(XMLNode) + if st.Len() > 0 { //if the root XMLNode then append to element e := element{ ElementType: eleTpNode, Val: n, } - pn := st.Pop().(node) + pn := st.Pop().(XMLNode) els := pn.Elements els = append(els, e) pn.Elements = els @@ -77,10 +77,8 @@ func ParseXml(r io.Reader) *node { } case xml.CharData: //tag content if st.Len() > 0 { - n := st.Pop().(node) - - bytes := xml.CharData(t) - content := strings.TrimSpace(string(bytes)) + n := st.Pop().(XMLNode) + content := strings.TrimSpace(string(t)) if content != "" { e := element{ ElementType: eleTpText, diff --git a/scripts/compile-antlr.sh b/scripts/compile-antlr.sh index a9d0fb5cb2797873cbc66ecd83575179bcd085d4..2223ccbaf88fb5e73e44957648b5cc3dea21e2a3 100755 --- a/scripts/compile-antlr.sh +++ b/scripts/compile-antlr.sh @@ -5,4 +5,27 @@ cd languages/g4 antlr -Dlanguage=Go -listener JavaLexer.g4 -o ../java antlr -Dlanguage=Go -listener JavaParser.g4 -o ../java -antlr -Dlanguage=Go -listener Sql.g4 -o ../sql +#antlr -Dlanguage=Go -listener Sql.g4 -o ../sql + +antlr -Dlanguage=Go -listener GroovyLexer.g4 -o ../groovy +antlr -Dlanguage=Go -listener GroovyParser.g4 -o ../groovy + +antlr -Dlanguage=Go -listener JavaScriptLexer.g4 -o ../js +antlr -Dlanguage=Go -listener JavaScriptParser.g4 -o ../js + +antlr -Dlanguage=Go -listener TypeScriptLexer.g4 -o ../ts +antlr -Dlanguage=Go -listener TypeScriptParser.g4 -o ../ts + +#antlr -Dlanguage=Go -listener GoLexer.g4 -o ../go +#antlr -Dlanguage=Go -listener GoParser.g4 -o ../go + +antlr -Dlanguage=Go -listener PythonLexer.g4 -o ../python +antlr -Dlanguage=Go -listener PythonParser.g4 -o ../python + +#antlr -Dlanguage=Java -listener PythonLexer.g4 -o ../compare/java +#antlr -Dlanguage=Java -listener PythonParser.g4 -o ../compare/java + +#antlr -Dlanguage=Java -listener TypeScriptLexer.g4 -o ../compare/src/main/java/tsantlr +#antlr -Dlanguage=Java -listener TypeScriptParser.g4 -o ../compare/src/main/java/tsantlr + +antlr -Dlanguage=Go -listener CommentLexer.g4 -o ../comment diff --git a/showcases/android-gradle-dsl.svg b/showcases/android-gradle-dsl.svg new file mode 100644 index 0000000000000000000000000000000000000000..d3aa0d82141a2c4140e42db3d313ecdc149d76de --- /dev/null +++ b/showcases/android-gradle-dsl.svg @@ -0,0 +1,813 @@ + + + + + + +G + + +cluster1 + +com + + +cluster2 + +android + + +cluster3 + +tools + + +cluster4 + +idea + + +cluster5 + +gradle + + +cluster6 + +dsl + + +cluster22 + +parser + + +cluster30 + +android + + +cluster31 + +productFlavors + + +cluster44 + +model + + +cluster45 + +ext + + +cluster50 + +android + + +cluster51 + +productFlavors + + +cluster7 + +api + + +cluster12 + +android + + +cluster15 + +productFlavors + + + +node17 + +settings + + + +node14 + +elements + + + +node17->node14 + + + + + +node25 + +files + + + +node14->node25 + + + + + +node26 + +semantics + + + +node14->node26 + + + + + +node11 + +ext + + + +node14->node11 + + + + + +node27 + +build + + + +node14->node27 + + + + + +node28 + +ext + + + +node14->node28 + + + + + +node30 + +apply + + + +node14->node30 + + + + + +node15 + +groovy + + + +node15->node14 + + + + + +node1 + +dependencies + + + +node15->node1 + + + + + +node15->node25 + + + + + +node15->node11 + + + + + +node18 + +configurations + + + +node15->node18 + + + + + +node31 + +dependencies + + + +node15->node31 + + + + + +node42 + +kotlin + + + +node12 + +java + + + +node42->node12 + + + + + +node10 + +util + + + +node42->node10 + + + + + +node12->node11 + + + + + +node25->node14 + + + + + +node25->node15 + + + + + +node19 + +java + + + +node25->node19 + + + + + +node29 + +include + + + +node25->node29 + + + + + +node25->node30 + + + + + +node37 + +splits + + + +node37->node14 + + + + + +node9 + +splits + + + +node37->node9 + + + + + +node9->node10 + + + + + +node13 + +repositories + + + +node13->node14 + + + + + +node13->node26 + + + + + +node26->node14 + + + + + +node44 + +repositories + + + +node44->node14 + + + + + +node44->node13 + + + + + +node3 + +repositories + + + +node44->node3 + + + + + +node32 + +transforms + + + +node44->node32 + + + + + +node3->node10 + + + + + +node11->node10 + + + + + +node35 + +dependencies + + + +node35->node14 + + + + + +node35->node1 + + + + + +node35->node11 + + + + + +node35->node32 + + + + + +node32->node14 + + + + + +node34 + +configurations + + + +node34->node14 + + + + + +node34->node18 + + + + + +node4 + +configurations + + + +node34->node4 + + + + + +node18->node14 + + + + + +node18->node26 + + + + + +node19->node14 + + + + + +node19->node26 + + + + + +node43 + +build + + + +node43->node44 + + + + + +node38 + +testOptions + + + +node8 + +testOptions + + + +node38->node8 + + + + + +node27->node14 + + + + + +node27->node26 + + + + + +node28->node14 + + + + + +node28->node26 + + + + + +node36 + +externalNativeBuild + + + +node7 + +externalNativeBuild + + + +node36->node7 + + + + + +node10->node11 + + + + + +node29->node14 + + + + + +node29->node26 + + + + + +node31->node1 + + + + + +node31->node26 + + + + + +node24 + +externalNativeBuild + + + +node24->node14 + + + + + +node24->node26 + + + + + +node20 + +externalNativeBuild + + + +node20->node14 + + + + + +node20->node26 + + + + + +node40 + +externalNativeBuild + + + +node6 + +externalNativeBuild + + + +node40->node6 + + + + + +node6->node10 + + + + + +node39 + +sourceSets + + + +node5 + +sourceSets + + + +node39->node5 + + + + + +node5->node10 + + + + + +node22 + +splits + + + +node22->node14 + + + + + +node22->node26 + + + + + +node16 + +plugins + + + +node16->node14 + + + + + +node16->node26 + + + + + +node21 + +sourceSets + + + +node21->node14 + + + + + +node21->node26 + + + + + +node4->node10 + + + + + +node41 + +java + + + +node41->node12 + + + + + +node41->node10 + + + + + +node23 + +testOptions + + + +node23->node14 + + + + + +node23->node26 + + + + + +node33 + +notifications + + + +node2 + +values + + + diff --git a/showcases/android-gradle-elements.svg b/showcases/android-gradle-elements.svg new file mode 100644 index 0000000000000000000000000000000000000000..b1e3707fc7ddfeaae227b48d0c5c74196f009353 --- /dev/null +++ b/showcases/android-gradle-elements.svg @@ -0,0 +1,401 @@ + + + + + + +G + + +cluster1 + +com + + +cluster2 + +android + + +cluster3 + +tools + + +cluster4 + +idea + + +cluster5 + +gradle + + +cluster6 + +dsl + + +cluster7 + +parser + + +cluster8 + +elements + + + +node20 + +FakeElement + + + +node7 + +GradleDslSimpleExpression + + + +node20->node7 + + + + + +node3 + +GradleDslSettableExpression + + + +node20->node3 + + + + + +node15 + +GradleNameElement + + + +node20->node15 + + + + + +node5 + +GradleDslElement + + + +node20->node5 + + + + + +node21 + +GradleDslExpressionList + + + +node7->node21 + + + + + +node7->node5 + + + + + +node17 + +GradleDslElementImpl + + + +node7->node17 + + + + + +node11 + +GradleDslExpressionMap + + + +node7->node11 + + + + + +node3->node7 + + + + + +node16 + +GradleDslMethodCall + + + +node16->node7 + + + + + +node16->node15 + + + + + +node16->node21 + + + + + +node23 + +GradleDslExpression + + + +node16->node23 + + + + + +node21->node15 + + + + + +node21->node5 + + + + + +node21->node23 + + + + + +node22 + +GradleDslLiteral + + + +node21->node22 + + + + + +node17->node15 + + + + + +node17->node5 + + + + + +node13 + +BaseCompileOptionsDslElement + + + +node13->node15 + + + + + +node9 + +GradleDslBlockElement + + + +node13->node9 + + + + + +node18 + +GradleDslGlobalValue + + + +node18->node7 + + + + + +node18->node15 + + + + + +node1 + +GradleDslUnknownElement + + + +node1->node7 + + + + + +node1->node15 + + + + + +node11->node15 + + + + + +node11->node5 + + + + + +node11->node23 + + + + + +node11->node22 + + + + + +node19 + +FakeFileElement + + + +node19->node20 + + + + + +node19->node16 + + + + + +node19->node15 + + + + + +node9->node5 + + + + + +node22->node3 + + + + + +node22->node15 + + + + + +node10 + +AnchorProvider + + + +node12 + +GradlePropertiesDslElement + + + +node14 + +GradleDslElementMap + + + +node2 + +GradleDslNamedDomainElement + + + +node4 + +GradlePropertiesDslElementConstructor + + + +node6 + +GradleDslClosure + + + +node8 + +GradleDslNamedDomainContainer + + + diff --git a/showcases/android-studio-android-arch.svg b/showcases/android-studio-android-arch.svg new file mode 100644 index 0000000000000000000000000000000000000000..a31b1542185065efcf205c603f01723fcce0c9fa --- /dev/null +++ b/showcases/android-studio-android-arch.svg @@ -0,0 +1,14724 @@ + + + + + + +G + + +cluster10 + +com.android.tools.idea.gradle.dsl.model.configurations + + +cluster100 + +com.android.tools.idea.gradle.eclipse + + +cluster101 + +com.android.tools.idea.gradle.dsl.api.android.testOptions + + +cluster102 + +com.android.tools.idea.gradle.project.sync.idea.data.model + + +cluster103 + +com.android.tools.idea.gradle.refactoring + + +cluster104 + +com.android.tools.idea.gradle.dsl.api.android.sourceSets + + +cluster105 + +com.android.tools.idea.gradle.project.sync.errors + + +cluster106 + +com.android.tools.idea.gradle.dsl.model.android.productFlavors.externalNativeBuild + + +cluster107 + +com.android.tools.idea.gradle.dsl.model.build + + +cluster108 + +com.android.tools.idea.gradle.roots + + +cluster109 + +com.android.tools.idea.gradle.project.sync.setup.module.idea.java + + +cluster11 + +com.android.tools.idea.gradle.project.sync.setup.post.upgrade + + +cluster110 + +com.android.tools.idea.gradle.project.sync.idea + + +cluster111 + +com.android.tools.idea.gradle.project.sync.cleanup + + +cluster112 + +com.android.tools.idea.gradle.run + + +cluster113 + +com.android.tools.idea.gradle.dsl.parser.repositories + + +cluster114 + +com.android.tools.idea.gradle + + +cluster115 + +com.android.tools.idea.gradle.dsl.parser.semantics + + +cluster116 + +com.android.tools.idea.gradle.dsl.model.android.productFlavors + + +cluster117 + +com.android.tools.idea.gradle.project.sync.setup.post.cleanup + + +cluster118 + +com.android.tools.idea.gradle.dsl.parser.configurations + + +cluster119 + +com.android.tools.idea.gradle.dsl.parser.android.splits + + +cluster12 + +com.android.tools.idea.gradle.dsl.api.configurations + + +cluster120 + +com.android.tools.idea.gradle.structure.configurables.dependencies + + +cluster121 + +com.android.tools.idea.gradle.dsl.api.ext + + +cluster122 + +com.android.tools.idea.gradle.dependencies + + +cluster123 + +com.android.tools.idea.gradle.projectView + + +cluster124 + +com.android.tools.idea.gradle.dsl.parser.include + + +cluster125 + +com.android.tools.idea.gradle.project.metrics + + +cluster126 + +com.android.tools.idea.gradle.dsl.parser.elements + + +cluster127 + +com.android.tools.idea.gradle.dsl.parser.build + + +cluster128 + +com.android.tools.idea.gradle.structure.configurables.ui.dependencies + + +cluster129 + +com.android.tools.idea.gradle.dsl.parser.groovy + + +cluster13 + +com.android.tools.idea.gradle.dsl.model.android.splits + + +cluster130 + +com.android.tools.idea.gradle.dsl.parser.android.sourceSets + + +cluster131 + +com.android.tools.idea.gradle.dsl.parser.android + + +cluster1 + +com.android.tools.idea.gradle.dsl.model.android + + +cluster132 + +com.android.tools.idea.gradle.project.sync.setup.module.dependency + + +cluster133 + +com.android.tools.idea.gradle.project.facet.java + + +cluster134 + +com.android.tools.idea.gradle.dsl.parser.android.externalNativeBuild + + +cluster135 + +com.android.tools.idea.gradle.dsl.api.android.productFlavors + + +cluster136 + +com.android.tools.idea.gradle.dsl.parser.plugins + + +cluster137 + +com.android.tools.idea.gradle.dsl.model.dependencies + + +cluster138 + +com.android.tools.idea.gradle.variant.conflict + + +cluster139 + +com.android.tools.idea.gradle.stubs.gradle + + +cluster14 + +com.android.tools.idea.gradle.project.sync + + +cluster140 + +com.android.tools.idea.gradle.structure.configurables.dependencies.details + + +cluster141 + +com.android.tools.idea.gradle.project.facet.ndk + + +cluster142 + +com.android.tools.idea.gradle.project.sync.setup.module.java + + +cluster143 + +com.android.tools.idea.gradle.dsl.api.android + + +cluster144 + +com.android.tools.idea.gradle.project.build.invoker + + +cluster145 + +com.android.tools.idea.gradle.dsl.model + + +cluster146 + +com.android.tools.idea.gradle.service.repo + + +cluster147 + +com.android.tools.idea.gradle.variant.view + + +cluster148 + +com.android.tools.idea.gradle.project.build.compiler + + +cluster149 + +com.android.tools.idea.gradle.task + + +cluster15 + +com.android.tools.idea.gradle.util.ui + + +cluster150 + +com.android.tools.idea.gradle.dsl.parser.android.testOptions + + +cluster151 + +com.android.tools.idea.gradle.project.sync.setup + + +cluster16 + +com.android.tools.idea.gradle.dsl.api.java + + +cluster17 + +com.android.tools.idea.gradle.project.common + + +cluster18 + +com.android.tools.idea.gradle.variant.ui + + +cluster19 + +com.android.tools.idea.gradle.project.sync.setup.module.common + + +cluster2 + +com.android.tools.idea.gradle.stubs.android + + +cluster20 + +com.android.tools.idea.gradle.structure.dependencies.android + + +cluster21 + +com.android.tools.idea.gradle.structure.configurables.java.dependencies + + +cluster22 + +com.android.tools.idea.gradle.project.model + + +cluster23 + +com.android.tools.idea.gradle.dsl.model.repositories + + +cluster24 + +com.android.tools.idea.gradle.util + + +cluster25 + +com.android.tools.idea.gradle.project.facet.gradle + + +cluster26 + +com.android.tools.idea.gradle.dsl.api.android.splits + + +cluster27 + +com.android.tools.idea.gradle.dsl.model.android.externalNativeBuild + + +cluster28 + +com.android.tools.idea.gradle.dsl.parser.apply + + +cluster29 + +com.android.tools.idea.gradle.structure.configurables + + +cluster3 + +com.android.tools.idea.gradle.structure.configurables.ui.properties.manipulation + + +cluster30 + +com.android.tools.idea.gradle.project.sync.idea.data + + +cluster31 + +com.android.tools.idea.gradle.structure.configurables.dependencies.treeview.graph + + +cluster32 + +com.android.tools.idea.gradle.structure.configurables.issues + + +cluster33 + +com.android.tools.idea.gradle.project.sync.setup.post.module + + +cluster34 + +com.android.tools.idea.gradle.actions + + +cluster35 + +com.android.tools.idea.gradle.structure.dependencies + + +cluster36 + +com.android.tools.idea.gradle.project.sync.setup.post.project + + +cluster37 + +com.android.tools.idea.gradle.structure.configurables.ui + + +cluster38 + +com.android.tools.idea.gradle.dsl.api.values + + +cluster39 + +com.android.tools.idea.gradle.dsl.api.repositories + + +cluster4 + +com.android.tools.idea.gradle.project.build.attribution + + +cluster40 + +com.android.tools.idea.gradle.dsl.parser.android.productFlavors.externalNativeBuild + + +cluster41 + +com.android.tools.idea.gradle.project.sync.setup.module + + +cluster42 + +com.android.tools.idea.gradle.dsl.api.util + + +cluster43 + +com.android.tools.idea.gradle.dsl.model.kotlin + + +cluster44 + +com.android.tools.idea.gradle.dsl.parser.java + + +cluster45 + +com.android.tools.idea.gradle.quickfix + + +cluster46 + +com.android.tools.idea.gradle.project + + +cluster47 + +com.android.tools.idea.gradle.project.sync.precheck + + +cluster48 + +com.android.tools.idea.gradle.project.sync.setup.module.ndk + + +cluster49 + +com.android.tools.idea.gradle.structure.configurables.ui.properties + + +cluster5 + +com.android.tools.idea.gradle.structure.configurables.dependencies.module + + +cluster50 + +com.android.tools.idea.gradle.model.java + + +cluster51 + +com.android.tools.idea.gradle.project.sync.messages + + +cluster52 + +com.android.tools.idea.gradle.project.sync.idea.data.service + + +cluster53 + +com.android.tools.idea.gradle.project.build.invoker.messages + + +cluster54 + +com.android.tools.idea.gradle.project.sync.validation.common + + +cluster55 + +com.android.tools.idea.gradle.structure.services + + +cluster56 + +com.android.tools.idea.gradle.dsl.parser.files + + +cluster57 + +com.android.tools.idea.gradle.dsl.parser.ext + + +cluster58 + +com.android.tools.idea.gradle.project.sync.common + + +cluster59 + +com.android.tools.idea.gradle.project.sync.issues.processor + + +cluster6 + +com.android.tools.idea.gradle.project.sync.setup.module.android + + +cluster60 + +com.android.tools.idea.gradle.dsl.parser.settings + + +cluster61 + +com.android.tools.idea.gradle.project.sync.idea.notification + + +cluster62 + +com.android.tools.idea.gradle.rendering + + +cluster63 + +com.android.tools.idea.gradle.dsl.api + + +cluster64 + +com.android.tools.idea.gradle.project.sync.setup.post + + +cluster65 + +com.android.tools.idea.gradle.structure.model.repositories.search + + +cluster66 + +com.android.tools.idea.gradle.structure.configurables.dependencies.treeview + + +cluster67 + +com.android.tools.idea.gradle.structure.model.pom + + +cluster68 + +com.android.tools.idea.gradle.project.build + + +cluster69 + +com.android.tools.idea.gradle.structure.model + + +cluster7 + +com.android.tools.idea.gradle.project.build.events + + +cluster70 + +com.android.tools.idea.gradle.project.sync.hyperlink + + +cluster71 + +com.android.tools.idea.gradle.dsl.api.dependencies + + +cluster72 + +com.android.tools.idea.gradle.dsl.model.android.sourceSets + + +cluster73 + +com.android.tools.idea.gradle.dsl.model.java + + +cluster74 + +com.android.tools.idea.gradle.filters + + +cluster75 + +com.android.tools.idea.gradle.dsl.parser.dependencies + + +cluster76 + +com.android.tools.idea.gradle.structure.navigation + + +cluster77 + +com.android.tools.idea.gradle.sdk + + +cluster78 + +com.android.tools.idea.gradle.dsl.model.ext + + +cluster79 + +com.android.tools.idea.gradle.project.build.output + + +cluster8 + +com.android.tools.idea.gradle.project.sync.setup.module.idea + + +cluster80 + +com.android.tools.idea.gradle.npw.project + + +cluster81 + +com.android.tools.idea.gradle.dsl.parser.android.productFlavors + + +cluster82 + +com.android.tools.idea.gradle.plugin + + +cluster83 + +com.android.tools.idea.gradle.project.importing + + +cluster84 + +com.android.tools.idea.gradle.dsl.api.android.productFlavors.externalNativeBuild + + +cluster85 + +com.android.tools.idea.gradle.structure.configurables.android.dependencies.project + + +cluster86 + +com.android.tools.idea.gradle.structure + + +cluster87 + +com.android.tools.idea.gradle.structure.configurables.suggestions + + +cluster88 + +com.android.tools.idea.gradle.service.resolve + + +cluster89 + +com.android.tools.idea.gradle.project.sync.issues + + +cluster9 + +com.android.tools.idea.gradle.structure.configurables.ui.treeview + + +cluster90 + +com.android.tools.idea.gradle.dsl.parser + + +cluster91 + +com.android.tools.idea.gradle.stubs + + +cluster92 + +com.android.tools.idea.gradle.dsl.model.ext.transforms + + +cluster93 + +com.android.tools.idea.gradle.project.sync.validation.android + + +cluster94 + +com.android.tools.idea.gradle.notification + + +cluster95 + +com.android.tools.idea.gradle.project.library + + +cluster96 + +com.android.tools.idea.gradle.structure.configurables.android.dependencies.module + + +cluster97 + +com.android.tools.idea.gradle.dsl.api.android.externalNativeBuild + + +cluster98 + +com.android.tools.idea.gradle.dsl.model.android.testOptions + + +cluster99 + +com.android.tools.idea.gradle.dsl.model.notifications + + + +node537 + +GradleBrokenPipeErrorHandler + + + +node568 + +BaseSyncErrorHandler + + + +node537->node568 + + + + + +node388 + +OpenUrlHyperlink + + + +node537->node388 + + + + + +node300 + +GradleSyncMessages + + + +node568->node300 + + + + + +node551 + +SyncErrorHandler + + + +node568->node551 + + + + + +node699 + +PackagingOptionsDslElement + + + +node669 + +GradleDslElement + + + +node699->node669 + + + + + +node664 + +GradleDslBlockElement + + + +node699->node664 + + + + + +node622 + +PropertiesElementDescription + + + +node699->node622 + + + + + +node661 + +AnchorProvider + + + +node669->node661 + + + + + +node529 + +CopyHandler + + + +node529->node669 + + + + + +node523 + +AdtImportBuilder + + + +node529->node523 + + + + + +node522 + +EclipseProject + + + +node529->node522 + + + + + +node257 + +GradleExperimentalSettings + + + +node529->node257 + + + + + +node521 + +ImportModule + + + +node529->node521 + + + + + +node526 + +ImportSummary + + + +node529->node526 + + + + + +node194 + +EditFlavorsAction + + + +node190 + +AbstractProjectStructureAction + + + +node194->node190 + + + + + +node461 + +AndroidProjectSettingsService + + + +node194->node461 + + + + + +node151 + +GradleFacet + + + +node190->node151 + + + + + +node186 + +AndroidStudioGradleAction + + + +node190->node186 + + + + + +node613 + +AndroidGradleJavaProjectModelModifier + + + +node613->node151 + + + + + +node122 + +AndroidModuleModel + + + +node613->node122 + + + + + +node719 + +JavaFacet + + + +node613->node719 + + + + + +node415 + +ArtifactDependencySpec + + + +node613->node415 + + + + + +node146 + +GradleUtil + + + +node613->node146 + + + + + +node335 + +GradleBuildModel + + + +node613->node335 + + + + + +node99 + +JavaModel + + + +node613->node99 + + + + + +node86 + +GradleSyncListener + + + +node613->node86 + + + + + +node777 + +AndroidModel + + + +node613->node777 + + + + + +node414 + +DependenciesModel + + + +node613->node414 + + + + + +node763 + +CompileOptionsModel + + + +node613->node763 + + + + + +node114 + +GradleModuleModel + + + +node151->node114 + + + + + +node140 + +DynamicAppUtils + + + +node140->node151 + + + + + +node608 + +PostBuildModelProvider + + + +node140->node608 + + + + + +node140->node122 + + + + + +node119 + +JavaModuleModel + + + +node140->node119 + + + + + +node700 + +LintOptionsDslElement + + + +node700->node669 + + + + + +node700->node664 + + + + + +node700->node622 + + + + + +node664->node669 + + + + + +node643 + +ConfigurationNameMapper + + + +node664->node643 + + + + + +node161 + +ApplyDslElement + + + +node664->node161 + + + + + +node422 + +FakeArtifactElement + + + +node659 + +FakeElement + + + +node422->node659 + + + + + +node660 + +GradleNameElement + + + +node422->node660 + + + + + +node653 + +GradleDslSimpleExpression + + + +node422->node653 + + + + + +node422->node415 + + + + + +node487 + +GradleReferenceInjection + + + +node422->node487 + + + + + +node432 + +PropertyUtil + + + +node422->node432 + + + + + +node659->node669 + + + + + +node659->node660 + + + + + +node659->node653 + + + + + +node655 + +GradleDslSettableExpression + + + +node659->node655 + + + + + +node158 + +CMakeModelImpl + + + +node509 + +CMakeModel + + + +node158->node509 + + + + + +node160 + +AbstractBuildModelImpl + + + +node158->node160 + + + + + +node511 + +AbstractBuildModel + + + +node509->node511 + + + + + +node359 + +AndroidProjectTaskRunner + + + +node359->node151 + + + + + +node359->node719 + + + + + +node793 + +GradleTaskFinder + + + +node359->node793 + + + + + +node277 + +BuildSettings + + + +node359->node277 + + + + + +node789 + +GradleBuildInvoker + + + +node359->node789 + + + + + +node501 + +EncodingValidationStrategy + + + +node501->node300 + + + + + +node501->node122 + + + + + +node502 + +AndroidProjectValidationStrategy + + + +node501->node502 + + + + + +node562 + +GradleDslMethodNotFoundErrorHandler + + + +node562->node300 + + + + + +node391 + +FixAndroidGradlePluginVersionHyperlink + + + +node562->node391 + + + + + +node139 + +GradleWrapper + + + +node562->node139 + + + + + +node377 + +OpenFileHyperlink + + + +node562->node377 + + + + + +node562->node146 + + + + + +node562->node551 + + + + + +node710 + +ExternalNativeBuildDslElement + + + +node710->node664 + + + + + +node710->node622 + + + + + +node554 + +UnknownHostErrorHandler + + + +node554->node568 + + + + + +node554->node388 + + + + + +node401 + +ToggleOfflineModeHyperlink + + + +node554->node401 + + + + + +node49 + +CompilerOutputModuleSetupStep + + + +node49->node122 + + + + + +node242 + +AndroidModuleSetupStep + + + +node49->node242 + + + + + +node104 + +CompilerSettingsSetup + + + +node49->node104 + + + + + +node115 + +ModuleModel + + + +node122->node115 + + + + + +node123 + +AndroidModelFeatures + + + +node122->node123 + + + + + +node617 + +AndroidGradleClassJarProvider + + + +node122->node617 + + + + + +node164 + +DataNodeCaches + + + +node164->node151 + + + + + +node164->node719 + + + + + +node759 + +NdkFacet + + + +node164->node759 + + + + + +node719->node119 + + + + + +node581 + +CheckAndroidModuleWithoutVariantsStep + + + +node581->node300 + + + + + +node60 + +JavaModuleSetupStep + + + +node581->node60 + + + + + +node581->node119 + + + + + +node733 + +FileTreeDependencyModelImpl + + + +node494 + +SingleArgumentMethodTransform + + + +node733->node494 + + + + + +node733->node660 + + + + + +node427 + +GradlePropertyModelBuilder + + + +node733->node427 + + + + + +node640 + +GradlePropertyModel + + + +node733->node640 + + + + + +node657 + +GradleDslMethodCall + + + +node733->node657 + + + + + +node491 + +MapMethodTransform + + + +node733->node491 + + + + + +node497 + +SingleArgToMapTransform + + + +node733->node497 + + + + + +node408 + +FileTreeDependencyModel + + + +node733->node408 + + + + + +node494->node660 + + + + + +node494->node657 + + + + + +node490 + +PropertyTransform + + + +node494->node490 + + + + + +node120 + +NdkModuleModel + + + +node120->node115 + + + + + +node443 + +NdkOptionsDslElement + + + +node443->node669 + + + + + +node443->node664 + + + + + +node443->node622 + + + + + +node127 + +RepositoriesModelImpl + + + +node127->node669 + + + + + +node128 + +FlatDirRepositoryModel + + + +node127->node128 + + + + + +node127->node660 + + + + + +node662 + +GradleDslExpression + + + +node127->node662 + + + + + +node794 + +GradleDslBlockModel + + + +node127->node794 + + + + + +node124 + +MavenRepositoryModelImpl + + + +node127->node124 + + + + + +node127->node657 + + + + + +node149 + +GradleVersions + + + +node127->node149 + + + + + +node612 + +FlatDirRepositoryDslElement + + + +node127->node612 + + + + + +node131 + +GoogleDefaultRepositoryModelImpl + + + +node127->node131 + + + + + +node610 + +MavenCredentialsDslElement + + + +node127->node610 + + + + + +node126 + +MavenCentralRepositoryModel + + + +node127->node126 + + + + + +node232 + +RepositoriesModel + + + +node127->node232 + + + + + +node132 + +JCenterDefaultRepositoryModel + + + +node127->node132 + + + + + +node611 + +MavenRepositoryDslElement + + + +node127->node611 + + + + + +node130 + +JCenterRepositoryModel + + + +node127->node130 + + + + + +node128->node427 + + + + + +node125 + +RepositoryModelImpl + + + +node128->node125 + + + + + +node656 + +GradlePropertiesDslElement + + + +node128->node656 + + + + + +node446 + +LatestKnownPluginVersionProvider + + + +node446->node446 + + + + + +node134 + +EmbeddedDistributionPaths + + + +node446->node134 + + + + + +node663 + +GradleDslLiteral + + + +node663->node660 + + + + + +node637 + +ReferenceTo + + + +node663->node637 + + + + + +node663->node655 + + + + + +node482 + +GradleDslNameConverter + + + +node660->node482 + + + + + +node396 + +ConfirmSHA256FromGradleWrapperHyperlink + + + +node396->node139 + + + + + +node144 + +PersistentSHA256Checksums + + + +node396->node144 + + + + + +node119->node719 + + + + + +node119->node115 + + + + + +node295 + +JavaModuleContentRoot + + + +node119->node295 + + + + + +node59 + +JavaModuleSetup + + + +node59->node49 + + + + + +node59->node581 + + + + + +node59->node119 + + + + + +node578 + +JavaLanguageLevelModuleSetupStep + + + +node59->node578 + + + + + +node47 + +ContentRootsModuleSetupStep + + + +node59->node47 + + + + + +node579 + +ArtifactsByConfigurationModuleSetupStep + + + +node59->node579 + + + + + +node576 + +DependenciesModuleSetupStep + + + +node59->node576 + + + + + +node580 + +JavaFacetModuleSetupStep + + + +node59->node580 + + + + + +node759->node120 + + + + + +node459 + +TargetModulesPanel + + + +node353 + +GoToModuleAction + + + +node459->node353 + + + + + +node65 + +AbstractBaseCollapseAllAction + + + +node459->node65 + + + + + +node62 + +NodeHyperlinkSupport + + + +node459->node62 + + + + + +node593 + +AndroidStudioCleanUpTask + + + +node590 + +ProjectCleanUpTask + + + +node593->node590 + + + + + +node51 + +DependenciesAndroidModuleSetupStep + + + +node51->node122 + + + + + +node716 + +DependenciesExtractor + + + +node51->node716 + + + + + +node51->node242 + + + + + +node477 + +UnresolvedDependenciesReporter + + + +node51->node477 + + + + + +node714 + +LibraryDependency + + + +node51->node714 + + + + + +node712 + +ModuleDependency + + + +node51->node712 + + + + + +node52 + +AndroidModuleDependenciesSetup + + + +node51->node52 + + + + + +node715 + +DependencySet + + + +node716->node715 + + + + + +node716->node714 + + + + + +node716->node712 + + + + + +node742 + +IdeaModuleStub + + + +node489 + +FileStructure + + + +node742->node489 + + + + + +node743 + +GradleProjectStub + + + +node742->node743 + + + + + +node740 + +IdeaProjectStub + + + +node742->node740 + + + + + +node741 + +IdeaContentRootStub + + + +node742->node741 + + + + + +node653->node669 + + + + + +node671 + +GradleDslExpressionMap + + + +node653->node671 + + + + + +node320 + +GradleDslFile + + + +node653->node320 + + + + + +node653->node662 + + + + + +node801 + +GradleSettingsModelImpl + + + +node653->node801 + + + + + +node431 + +GradlePropertyModelImpl + + + +node653->node431 + + + + + +node653->node487 + + + + + +node654 + +GradleDslGlobalValue + + + +node653->node654 + + + + + +node651 + +GradleDslElementImpl + + + +node653->node651 + + + + + +node653->node482 + + + + + +node665 + +GradleDslExpressionList + + + +node653->node665 + + + + + +node797 + +CachedValue + + + +node653->node797 + + + + + +node358 + +GradleBuildState + + + +node356 + +BuildSummary + + + +node358->node356 + + + + + +node362 + +BuildContext + + + +node358->node362 + + + + + +node356->node362 + + + + + +node796 + +GradleBuildModelImpl + + + +node796->node127 + + + + + +node796->node663 + + + + + +node796->node660 + + + + + +node796->node671 + + + + + +node796->node320 + + + + + +node796->node801 + + + + + +node15 + +AndroidModelImpl + + + +node796->node15 + + + + + +node673 + +SubProjectsDslElement + + + +node796->node673 + + + + + +node800 + +PluginModelImpl + + + +node796->node800 + + + + + +node796->node335 + + + + + +node726 + +PluginsDslElement + + + +node796->node726 + + + + + +node426 + +ExtModelImpl + + + +node796->node426 + + + + + +node573 + +BuildScriptModelImpl + + + +node796->node573 + + + + + +node332 + +GradleSettingsModel + + + +node796->node332 + + + + + +node228 + +GradleNotNullValue + + + +node796->node228 + + + + + +node488 + +BuildModelContext + + + +node796->node488 + + + + + +node69 + +ConfigurationsModelImpl + + + +node796->node69 + + + + + +node419 + +JavaModelImpl + + + +node796->node419 + + + + + +node795 + +GradleFileModelImpl + + + +node796->node795 + + + + + +node798 + +GradlePropertiesModel + + + +node796->node798 + + + + + +node796->node161 + + + + + +node671->node669 + + + + + +node671->node663 + + + + + +node671->node660 + + + + + +node671->node622 + + + + + +node671->node662 + + + + + +node702 + +SigningConfigDslElement + + + +node702->node664 + + + + + +node702->node622 + + + + + +node650 + +GradleDslNamedDomainElement + + + +node702->node650 + + + + + +node658 + +GradlePropertiesDslElementConstructor + + + +node622->node658 + + + + + +node571 + +AbstractBuildOptionsModelImpl + + + +node571->node427 + + + + + +node571->node794 + + + + + +node453 + +AbstractBuildOptionsModel + + + +node571->node453 + + + + + +node427->node669 + + + + + +node427->node431 + + + + + +node427->node654 + + + + + +node418 + +LanguageLevelPropertyModelImpl + + + +node427->node418 + + + + + +node429 + +PasswordPropertyModelImpl + + + +node427->node429 + + + + + +node428 + +SigningConfigPropertyModelImpl + + + +node427->node428 + + + + + +node427->node656 + + + + + +node250 + +JvmTargetPropertyModelImpl + + + +node427->node250 + + + + + +node320->node660 + + + + + +node320->node320 + + + + + +node483 + +GradleDslParser + + + +node320->node483 + + + + + +node681 + +GroovyDslParser + + + +node320->node681 + + + + + +node320->node656 + + + + + +node320->node488 + + + + + +node680 + +GroovyDslWriter + + + +node320->node680 + + + + + +node485 + +GradleDslWriter + + + +node320->node485 + + + + + +node320->node161 + + + + + +node787 + +TaskExecutionProgressIndicator + + + +node786 + +BuildStopper + + + +node787->node786 + + + + + +node315 + +GradleOperations + + + +node315->node415 + + + + + +node266 + +GradleProjectInfo + + + +node315->node266 + + + + + +node315->node335 + + + + + +node315->node86 + + + + + +node315->node414 + + + + + +node337 + +GradleModelProvider + + + +node415->node337 + + + + + +node470 + +ExternalNdkBuildIssuesReporter + + + +node470->node529 + + + + + +node479 + +BaseSyncIssuesReporter + + + +node470->node479 + + + + + +node470->node551 + + + + + +node479->node300 + + + + + +node479->node146 + + + + + +node675 + +DependencyInfoPanel + + + +node755 + +DependencyDetails + + + +node675->node755 + + + + + +node173 + +IssuesViewer + + + +node675->node173 + + + + + +node772 + +DataBindingModel + + + +node247 + +GradleDslModel + + + +node772->node247 + + + + + +node793->node151 + + + + + +node793->node140 + + + + + +node793->node122 + + + + + +node793->node719 + + + + + +node788 + +TestCompileType + + + +node793->node788 + + + + + +node782 + +GradleRootPathFinder + + + +node793->node782 + + + + + +node346 + +ProjectStructureUsageTracker + + + +node346->node122 + + + + + +node346->node715 + + + + + +node346->node149 + + + + + +node715->node715 + + + + + +node715->node714 + + + + + +node248 + +TypeReference + + + +node640->node248 + + + + + +node685 + +ProductFlavorDslElement + + + +node685->node622 + + + + + +node692 + +AbstractProductFlavorDslElement + + + +node685->node692 + + + + + +node685->node650 + + + + + +node39 + +VariantStub + + + +node32 + +AndroidArtifactStub + + + +node39->node32 + + + + + +node29 + +JavaArtifactStub + + + +node39->node29 + + + + + +node30 + +ProductFlavorStub + + + +node39->node30 + + + + + +node31 + +BaseArtifactStub + + + +node32->node31 + + + + + +node35 + +OutputFileStub + + + +node32->node35 + + + + + +node25 + +AndroidArtifactOutputStub + + + +node32->node25 + + + + + +node588 + +ProjectSetUpTask + + + +node588->node266 + + + + + +node278 + +AndroidGradleProjectComponent + + + +node588->node278 + + + + + +node588->node86 + + + + + +node342 + +PostSyncProjectSetup + + + +node588->node342 + + + + + +node589 + +IdeaSyncPopulateProjectTask + + + +node588->node589 + + + + + +node266->node151 + + + + + +node266->node122 + + + + + +node811 + +AndroidGradleBuildConfiguration + + + +node266->node811 + + + + + +node472 + +SimpleDeduplicatingSyncIssueReporter + + + +node472->node300 + + + + + +node472->node479 + + + + + +node472->node377 + + + + + +node338 + +ProjectBuildModel + + + +node472->node338 + + + + + +node472->node523 + + + + + +node662->node669 + + + + + +node441 + +VectorDrawablesOptionsDslElement + + + +node441->node664 + + + + + +node441->node622 + + + + + +node578->node122 + + + + + +node578->node60 + + + + + +node578->node119 + + + + + +node552 + +MissingAndroidPluginErrorHandler + + + +node552->node568 + + + + + +node552->node320 + + + + + +node552->node377 + + + + + +node552->node146 + + + + + +node552->node335 + + + + + +node552->node338 + + + + + +node404 + +AddGoogleMavenRepositoryHyperlink + + + +node552->node404 + + + + + +node385 + +OpenPluginBuildFileHyperlink + + + +node552->node385 + + + + + +node9 + +LintOptionsModelImpl + + + +node9->node794 + + + + + +node774 + +LintOptionsModel + + + +node9->node774 + + + + + +node794->node427 + + + + + +node794->node247 + + + + + +node794->node431 + + + + + +node794->node656 + + + + + +node14 + +ProductFlavorModelImpl + + + +node14->node660 + + + + + +node14->node653 + + + + + +node14->node671 + + + + + +node14->node427 + + + + + +node623 + +NdkOptionsModelImpl + + + +node14->node623 + + + + + +node625 + +VectorDrawablesOptionsModelImpl + + + +node14->node625 + + + + + +node14->node432 + + + + + +node639 + +ResolvedPropertyModel + + + +node14->node639 + + + + + +node624 + +ExternalNativeBuildOptionsModelImpl + + + +node14->node624 + + + + + +node778 + +ProductFlavorModel + + + +node14->node778 + + + + + +node14->node665 + + + + + +node331 + +GradleModelSource + + + +node331->node796 + + + + + +node727 + +ArtifactDependencySpecImpl + + + +node331->node727 + + + + + +node331->node801 + + + + + +node802 + +ProjectBuildModelImpl + + + +node331->node802 + + + + + +node331->node337 + + + + + +node727->node415 + + + + + +node410 + +ArtifactDependencyModel + + + +node727->node410 + + + + + +node801->node663 + + + + + +node801->node660 + + + + + +node801->node796 + + + + + +node801->node320 + + + + + +node801->node637 + + + + + +node801->node657 + + + + + +node801->node332 + + + + + +node648 + +IncludeDslElement + + + +node801->node648 + + + + + +node801->node488 + + + + + +node801->node795 + + + + + +node328 + +ProjectPropertiesDslElement + + + +node801->node328 + + + + + +node298 + +GradleSyncMessagesStub + + + +node298->node300 + + + + + +node431->node669 + + + + + +node431->node663 + + + + + +node431->node660 + + + + + +node431->node671 + + + + + +node431->node640 + + + + + +node431->node487 + + + + + +node431->node637 + + + + + +node431->node490 + + + + + +node433 + +ResolvedPropertyModelImpl + + + +node431->node433 + + + + + +node431->node651 + + + + + +node431->node665 + + + + + +node442 + +ExternalNativeBuildOptionsDslElement + + + +node442->node664 + + + + + +node442->node622 + + + + + +node511->node247 + + + + + +node595 + +GradleDistributionCleanUpTask + + + +node595->node139 + + + + + +node595->node590 + + + + + +node145 + +GradleProjectSettingsFinder + + + +node595->node145 + + + + + +node595->node149 + + + + + +node270 + +ChooseGradleHomeDialog + + + +node595->node270 + + + + + +node15->node660 + + + + + +node15->node653 + + + + + +node15->node427 + + + + + +node15->node9 + + + + + +node15->node794 + + + + + +node15->node14 + + + + + +node3 + +BuildFeaturesModelImpl + + + +node15->node3 + + + + + +node16 + +KotlinOptionsModelImpl + + + +node15->node16 + + + + + +node701 + +ProductFlavorsDslElement + + + +node15->node701 + + + + + +node706 + +BuildTypesDslElement + + + +node15->node706 + + + + + +node6 + +CompileOptionsModelImpl + + + +node15->node6 + + + + + +node5 + +SigningConfigModelImpl + + + +node15->node5 + + + + + +node711 + +SourceSetsDslElement + + + +node15->node711 + + + + + +node15->node777 + + + + + +node11 + +SourceSetModelImpl + + + +node15->node11 + + + + + +node12 + +AaptOptionsModelImpl + + + +node15->node12 + + + + + +node7 + +PackagingOptionsModelImpl + + + +node15->node7 + + + + + +node19 + +DependenciesInfoModelImpl + + + +node15->node19 + + + + + +node13 + +BuildTypeModelImpl + + + +node15->node13 + + + + + +node4 + +ViewBindingModelImpl + + + +node15->node4 + + + + + +node10 + +SplitsModelImpl + + + +node15->node10 + + + + + +node8 + +ExternalNativeBuildModelImpl + + + +node15->node8 + + + + + +node695 + +SigningConfigsDslElement + + + +node15->node695 + + + + + +node1 + +AdbOptionsModelImpl + + + +node15->node1 + + + + + +node17 + +DataBindingModelImpl + + + +node15->node17 + + + + + +node18 + +TestOptionsModelImpl + + + +node15->node18 + + + + + +node2 + +DexOptionsModelImpl + + + +node15->node2 + + + + + +node3->node794 + + + + + +node773 + +BuildFeaturesModel + + + +node3->node773 + + + + + +node16->node794 + + + + + +node771 + +KotlinOptionsModel + + + +node16->node771 + + + + + +node416 + +SourceDirectoryModelImpl + + + +node416->node653 + + + + + +node416->node794 + + + + + +node536 + +SourceDirectoryModel + + + +node416->node536 + + + + + +node536->node247 + + + + + +node673->node664 + + + + + +node673->node622 + + + + + +node487->node669 + + + + + +node487->node653 + + + + + +node637->node640 + + + + + +node764 + +SigningConfigModel + + + +node637->node764 + + + + + +node273 + +RunConfigurationChecker + + + +node603 + +MakeBeforeRunTaskProviderUtil + + + +node273->node603 + + + + + +node265 + +FixAndroidRunConfigurationsAction + + + +node273->node265 + + + + + +node607 + +MakeBeforeRunTask + + + +node603->node607 + + + + + +node597 + +MakeBeforeRunTaskProvider + + + +node603->node597 + + + + + +node749 + +ProjectIdentifierStub + + + +node743->node749 + + + + + +node750 + +GradleTaskStub + + + +node743->node750 + + + + + +node744 + +GradleScriptStub + + + +node743->node744 + + + + + +node745 + +BuildIdentifierStub + + + +node749->node745 + + + + + +node550 + +MissingAndroidSdkErrorHandler + + + +node550->node568 + + + + + +node550->node377 + + + + + +node546 + +UnsupportedGradleVersionErrorHandler + + + +node546->node568 + + + + + +node546->node377 + + + + + +node546->node145 + + + + + +node393 + +CreateGradleWrapperHyperlink + + + +node546->node393 + + + + + +node389 + +OpenGradleSettingsHyperlink + + + +node546->node389 + + + + + +node393->node139 + + + + + +node393->node145 + + + + + +node47->node122 + + + + + +node47->node242 + + + + + +node483->node482 + + + + + +node278->node122 + + + + + +node278->node266 + + + + + +node364 + +JpsBuildContext + + + +node278->node364 + + + + + +node278->node789 + + + + + +node255 + +LegacyAndroidProjects + + + +node278->node255 + + + + + +node363 + +GradleBuildContext + + + +node278->node363 + + + + + +node387 + +SelectJdkFromFileSystemHyperlink + + + +node278->node387 + + + + + +node124->node427 + + + + + +node231 + +MavenRepositoryModel + + + +node124->node231 + + + + + +node133 + +UrlBasedRepositoryModelImpl + + + +node124->node133 + + + + + +node124->node656 + + + + + +node129 + +MavenCredentialsModel + + + +node124->node129 + + + + + +node43 + +ResolvedDependenciesPanel + + + +node43->node353 + + + + + +node354 + +DependencySelection + + + +node43->node354 + + + + + +node221 + +SelectionChangeEventDispatcher + + + +node43->node221 + + + + + +node43->node65 + + + + + +node79 + +GradleModuleModels + + + +node43->node79 + + + + + +node351 + +ResolvedDependenciesTreeBuilder + + + +node43->node351 + + + + + +node43->node62 + + + + + +node555 + +MissingBuildToolsErrorHandler + + + +node555->node568 + + + + + +node555->node391 + + + + + +node555->node146 + + + + + +node400 + +InstallBuildToolsHyperlink + + + +node555->node400 + + + + + +node245 + +NdkModuleSetup + + + +node290 + +NdkFacetModuleSetupStep + + + +node245->node290 + + + + + +node288 + +ContentRootModuleSetupStep + + + +node245->node288 + + + + + +node290->node119 + + + + + +node290->node759 + + + + + +node757 + +NdkFacetType + + + +node290->node757 + + + + + +node239 + +NdkModuleSetupStep + + + +node290->node239 + + + + + +node684 + +SourceFileDslElement + + + +node684->node664 + + + + + +node684->node622 + + + + + +node330 + +GradleRenderErrorContributor + + + +node330->node391 + + + + + +node330->node122 + + + + + +node586 + +AndroidGradleProjectResolver + + + +node586->node122 + + + + + +node116 + +IdeaJavaModuleModelFactory + + + +node586->node116 + + + + + +node586->node523 + + + + + +node323 + +CommandLineArgs + + + +node586->node323 + + + + + +node532 + +ProjectCleanupModel + + + +node586->node532 + + + + + +node587 + +ProjectFinder + + + +node586->node587 + + + + + +node91 + +SyncActionOptions + + + +node586->node91 + + + + + +node324 + +VariantSelector + + + +node586->node324 + + + + + +node141 + +LocalProperties + + + +node586->node141 + + + + + +node586->node114 + + + + + +node116->node119 + + + + + +node116->node295 + + + + + +node294 + +JavaModuleDependency + + + +node116->node294 + + + + + +node296 + +IdeaJarLibraryDependencyFactory + + + +node116->node296 + + + + + +node160->node794 + + + + + +node160->node511 + + + + + +node496 + +RepositoryClosureTransform + + + +node496->node669 + + + + + +node496->node660 + + + + + +node666 + +GradleDslClosure + + + +node496->node666 + + + + + +node492 + +DefaultTransform + + + +node496->node492 + + + + + +node670 + +GradleDslUnknownElement + + + +node670->node660 + + + + + +node670->node653 + + + + + +node701->node669 + + + + + +node701->node622 + + + + + +node701->node14 + + + + + +node693 + +AbstractFlavorTypeCollectionDslElement + + + +node701->node693 + + + + + +node652 + +GradleDslNamedDomainContainer + + + +node701->node652 + + + + + +node668 + +GradleDslElementMap + + + +node693->node668 + + + + + +node692->node669 + + + + + +node692->node660 + + + + + +node692->node671 + + + + + +node692->node657 + + + + + +node687 + +AbstractFlavorTypeDslElement + + + +node692->node687 + + + + + +node692->node665 + + + + + +node238 + +NdkBuildOptionsDslElement + + + +node238->node622 + + + + + +node236 + +AbstractBuildOptionsDslElement + + + +node238->node236 + + + + + +node236->node669 + + + + + +node236->node664 + + + + + +node449 + +OpenMigrationToGradleUrlHyperlink + + + +node449->node388 + + + + + +node495 + +FileTransform + + + +node495->node669 + + + + + +node495->node494 + + + + + +node672 + +FakeFileElement + + + +node495->node672 + + + + + +node495->node432 + + + + + +node495->node657 + + + + + +node681->node669 + + + + + +node681->node422 + + + + + +node681->node663 + + + + + +node681->node660 + + + + + +node681->node653 + + + + + +node681->node671 + + + + + +node681->node320 + + + + + +node681->node415 + + + + + +node681->node662 + + + + + +node681->node487 + + + + + +node681->node637 + + + + + +node681->node483 + + + + + +node681->node670 + + + + + +node681->node666 + + + + + +node681->node657 + + + + + +node681->node665 + + + + + +node679 + +GroovyDslNameConverter + + + +node681->node679 + + + + + +node682 + +GroovyDslUtil + + + +node681->node682 + + + + + +node628 + +ConfigurationDslElement + + + +node681->node628 + + + + + +node666->node662 + + + + + +node579->node60 + + + + + +node579->node119 + + + + + +node583 + +JavaModuleDependenciesSetup + + + +node579->node583 + + + + + +node329 + +GradleNotificationExtension + + + +node329->node300 + + + + + +node329->node551 + + + + + +node374 + +FixGradleVersionInWrapperHyperlink + + + +node374->node139 + + + + + +node374->node145 + + + + + +node575 + +ContentRootsModuleSetupStep + + + +node575->node60 + + + + + +node575->node119 + + + + + +node582 + +JavaContentEntriesSetup + + + +node575->node582 + + + + + +node575->node295 + + + + + +node582->node119 + + + + + +node582->node295 + + + + + +node106 + +ContentEntriesSetup + + + +node582->node106 + + + + + +node800->node669 + + + + + +node800->node653 + + + + + +node800->node427 + + + + + +node800->node432 + + + + + +node800->node639 + + + + + +node800->node665 + + + + + +node340 + +PluginModel + + + +node800->node340 + + + + + +node596 + +HttpProxySettingsCleanUpTask + + + +node596->node593 + + + + + +node596->node377 + + + + + +node258 + +ProxySettingsDialog + + + +node596->node258 + + + + + +node136 + +ProxySettings + + + +node596->node136 + + + + + +node135 + +GradleProperties + + + +node596->node135 + + + + + +node275 + +PropertyBasedDoNotAskOption + + + +node258->node275 + + + + + +node258->node136 + + + + + +node234 + +UrlBasedRepositoryModel + + + +node231->node234 + + + + + +node233 + +RepositoryModel + + + +node234->node233 + + + + + +node263 + +SupportedModuleChecker + + + +node263->node266 + + + + + +node244 + +AndroidModuleSetup + + + +node244->node49 + + + + + +node244->node122 + + + + + +node244->node51 + + + + + +node244->node47 + + + + + +node53 + +AndroidFacetModuleSetupStep + + + +node244->node53 + + + + + +node48 + +SdkModuleSetupStep + + + +node244->node48 + + + + + +node623->node794 + + + + + +node725 + +NdkOptionsModel + + + +node623->node725 + + + + + +node725->node247 + + + + + +node425 + +GradleAndroidSdkEventListener + + + +node425->node266 + + + + + +node425->node141 + + + + + +node252 + +AndroidUnresolvedReferenceQuickFixProvider + + + +node252->node151 + + + + + +node355 + +MavenPoms + + + +node355->node669 + + + + + +node355->node715 + + + + + +node146->node151 + + + + + +node146->node122 + + + + + +node146->node139 + + + + + +node146->node119 + + + + + +node146->node715 + + + + + +node146->node145 + + + + + +node146->node335 + + + + + +node146->node777 + + + + + +node146->node134 + + + + + +node137 + +GradleLocalCache + + + +node146->node137 + + + + + +node728 + +FileDependencyModelImpl + + + +node728->node663 + + + + + +node728->node660 + + + + + +node728->node653 + + + + + +node728->node427 + + + + + +node728->node657 + + + + + +node409 + +FileDependencyModel + + + +node728->node409 + + + + + +node626 + +SdksCleanupStep + + + +node626->node300 + + + + + +node343 + +ProjectCleanupStep + + + +node626->node343 + + + + + +node371 + +InstallPlatformHyperlink + + + +node626->node371 + + + + + +node570 + +CMakeOptionsModelImpl + + + +node570->node571 + + + + + +node454 + +CMakeOptionsModel + + + +node570->node454 + + + + + +node335->node337 + + + + + +node336 + +GradleFileModel + + + +node335->node336 + + + + + +node180 + +RebuildGradleProjectAction + + + +node180->node186 + + + + + +node180->node789 + + + + + +node186->node266 + + + + + +node672->node659 + + + + + +node672->node660 + + + + + +node672->node432 + + + + + +node672->node657 + + + + + +node803 + +GradleFileModelTestCase + + + +node803->node640 + + + + + +node803->node335 + + + + + +node803->node338 + + + + + +node803->node340 + + + + + +node338->node337 + + + + + +node338->node257 + + + + + +node625->node794 + + + + + +node724 + +VectorDrawablesOptionsModel + + + +node625->node724 + + + + + +node724->node247 + + + + + +node125->node669 + + + + + +node125->node427 + + + + + +node125->node496 + + + + + +node125->node233 + + + + + +node125->node656 + + + + + +node576->node60 + + + + + +node576->node119 + + + + + +node576->node477 + + + + + +node576->node583 + + + + + +node674 + +BuildScriptDslElement + + + +node674->node669 + + + + + +node674->node664 + + + + + +node674->node622 + + + + + +node498 + +LayoutRenderingIssueValidationStrategy + + + +node498->node300 + + + + + +node498->node391 + + + + + +node498->node122 + + + + + +node498->node388 + + + + + +node498->node146 + + + + + +node498->node502 + + + + + +node432->node669 + + + + + +node432->node659 + + + + + +node432->node663 + + + + + +node432->node660 + + + + + +node432->node653 + + + + + +node432->node662 + + + + + +node432->node431 + + + + + +node432->node487 + + + + + +node432->node495 + + + + + +node432->node657 + + + + + +node432->node490 + + + + + +node432->node492 + + + + + +node432->node655 + + + + + +node559 + +InternetConnectionErrorHandler + + + +node559->node568 + + + + + +node559->node401 + + + + + +node325 + +RemoveSdkFromManifestProcessor + + + +node325->node335 + + + + + +node325->node338 + + + + + +node325->node639 + + + + + +node639->node640 + + + + + +node657->node663 + + + + + +node657->node660 + + + + + +node657->node653 + + + + + +node657->node662 + + + + + +node657->node432 + + + + + +node657->node665 + + + + + +node706->node669 + + + + + +node706->node622 + + + + + +node706->node693 + + + + + +node706->node13 + + + + + +node706->node652 + + + + + +node474 + +SdkInManifestIssuesReporter + + + +node474->node472 + + + + + +node474->node377 + + + + + +node474->node778 + + + + + +node378 + +RemoveSdkFromManifestHyperlink + + + +node474->node378 + + + + + +node184 + +MakeGradleProjectAction + + + +node184->node186 + + + + + +node184->node789 + + + + + +node512 + +AdbOptionsModel + + + +node512->node247 + + + + + +node731 + +ModuleDependencyModelImpl + + + +node731->node494 + + + + + +node731->node660 + + + + + +node731->node671 + + + + + +node731->node427 + + + + + +node731->node657 + + + + + +node731->node491 + + + + + +node412 + +ModuleDependencyModel + + + +node731->node412 + + + + + +node731->node497 + + + + + +node491->node660 + + + + + +node491->node671 + + + + + +node491->node657 + + + + + +node491->node490 + + + + + +node491->node665 + + + + + +node806 + +BuildVariantSelectionChangeListener + + + +node806->node122 + + + + + +node806->node759 + + + + + +node805 + +BuildVariantUpdater + + + +node806->node805 + + + + + +node561 + +MissingPlatformErrorHandler + + + +node561->node300 + + + + + +node561->node551 + + + + + +node368 + +OpenAndroidSdkManagerHyperlink + + + +node561->node368 + + + + + +node561->node371 + + + + + +node775 + +BaseCompileOptionsModel + + + +node99->node775 + + + + + +node775->node247 + + + + + +node689 + +DefaultConfigDslElement + + + +node689->node622 + + + + + +node689->node692 + + + + + +node149->node139 + + + + + +node149->node145 + + + + + +node560 + +MissingDependencyErrorHandler + + + +node560->node300 + + + + + +node560->node377 + + + + + +node560->node551 + + + + + +node560->node401 + + + + + +node392 + +SearchInBuildFilesHyperlink + + + +node560->node392 + + + + + +node73 + +ConfigurationModel + + + +node73->node247 + + + + + +node451 + +TopLevelModuleFactory + + + +node451->node151 + + + + + +node451->node622 + + + + + +node480 + +DeprecatedConfigurationReporter + + + +node480->node472 + + + + + +node480->node377 + + + + + +node480->node335 + + + + + +node480->node338 + + + + + +node654->node660 + + + + + +node654->node653 + + + + + +node100 + +LanguageLevelPropertyModel + + + +node418->node100 + + + + + +node249 + +LanguageLevelUtil + + + +node418->node249 + + + + + +node418->node433 + + + + + +node100->node639 + + + + + +node429->node494 + + + + + +node429->node490 + + + + + +node636 + +PasswordPropertyModel + + + +node429->node636 + + + + + +node490->node660 + + + + + +node490->node671 + + + + + +node490->node665 + + + + + +node524 + +AdtImportSdkStep + + + +node460 + +IdeSdksConfigurable + + + +node524->node460 + + + + + +node499 + +BuildToolsVersionReader + + + +node499->node300 + + + + + +node499->node122 + + + + + +node499->node335 + + + + + +node499->node499 + + + + + +node499->node777 + + + + + +node499->node502 + + + + + +node148 + +GradleProjects + + + +node148->node151 + + + + + +node148->node719 + + + + + +node538 + +UnsupportedModelVersionErrorHandler + + + +node538->node568 + + + + + +node538->node391 + + + + + +node538->node146 + + + + + +node624->node653 + + + + + +node624->node794 + + + + + +node624->node570 + + + + + +node572 + +NdkBuildOptionsModelImpl + + + +node624->node572 + + + + + +node723 + +ExternalNativeBuildOptionsModel + + + +node624->node723 + + + + + +node204 + +AddModuleDependencyDialog + + + +node203 + +ModuleDependenciesForm + + + +node204->node203 + + + + + +node365 + +PsModelNameComparator + + + +node203->node365 + + + + + +node612->node669 + + + + + +node612->node664 + + + + + +node612->node622 + + + + + +node6->node763 + + + + + +node799 + +BaseCompileOptionsModelImpl + + + +node6->node799 + + + + + +node558 + +FailedToParseSdkErrorHandler + + + +node558->node568 + + + + + +node726->node664 + + + + + +node726->node622 + + + + + +node694 + +DexOptionsDslElement + + + +node694->node664 + + + + + +node694->node622 + + + + + +node580->node151 + + + + + +node580->node719 + + + + + +node580->node60 + + + + + +node580->node119 + + + + + +node327 + +FixBuildToolsProcessor + + + +node327->node338 + + + + + +node327->node639 + + + + + +node327->node777 + + + + + +node326 + +AddRepoProcessor + + + +node326->node335 + + + + + +node326->node338 + + + + + +node33 + +DependenciesStub + + + +node29->node33 + + + + + +node29->node31 + + + + + +node38 + +JavaLibraryStub + + + +node33->node38 + + + + + +node428->node5 + + + + + +node428->node433 + + + + + +node641 + +SigningConfigPropertyModel + + + +node428->node641 + + + + + +node5->node653 + + + + + +node5->node794 + + + + + +node5->node764 + + + + + +node249->node637 + + + + + +node249->node639 + + + + + +node426->node794 + + + + + +node426->node431 + + + + + +node426->node657 + + + + + +node638 + +ExtModel + + + +node426->node638 + + + + + +node573->node127 + + + + + +node573->node653 + + + + + +node573->node794 + + + + + +node573->node426 + + + + + +node333 + +BuildScriptModel + + + +node573->node333 + + + + + +node332->node337 + + + + + +node332->node336 + + + + + +node711->node622 + + + + + +node711->node11 + + + + + +node711->node668 + + + + + +node711->node652 + + + + + +node172 + +NavigationHyperlinkListener + + + +node172->node529 + + + + + +node168 + +LinkHandler + + + +node172->node168 + + + + + +node169 + +GoToPathLinkHandler + + + +node172->node169 + + + + + +node170 + +InternetLinkHandler + + + +node172->node170 + + + + + +node269 + +ProjectBuildFileChecksums + + + +node269->node151 + + + + + +node269->node141 + + + + + +node269->node114 + + + + + +node523->node86 + + + + + +node323->node257 + + + + + +node101 + +GradleInitScripts + + + +node323->node101 + + + + + +node518 + +AdtImportPrefsStep + + + +node518->node523 + + + + + +node131->node133 + + + + + +node235 + +GoogleDefaultRepositoryModel + + + +node131->node235 + + + + + +node133->node427 + + + + + +node133->node496 + + + + + +node133->node234 + + + + + +node133->node125 + + + + + +node584 + +GradleSyncExecutor + + + +node584->node164 + + + + + +node584->node588 + + + + + +node584->node523 + + + + + +node584->node342 + + + + + +node88 + +PsdModuleModels + + + +node584->node88 + + + + + +node103 + +RootSourceFolder + + + +node106->node103 + + + + + +node572->node571 + + + + + +node455 + +NdkBuildOptionsModel + + + +node572->node455 + + + + + +node642 + +MultiTypePropertyModel + + + +node642->node640 + + + + + +node433->node669 + + + + + +node433->node671 + + + + + +node433->node640 + + + + + +node433->node431 + + + + + +node433->node432 + + + + + +node433->node639 + + + + + +node433->node665 + + + + + +node602 + +DefaultGradleBuilder + + + +node606 + +BeforeRunBuilder + + + +node602->node606 + + + + + +node777->node247 + + + + + +node760 + +JavaModuleCleanupStep + + + +node760->node719 + + + + + +node241 + +ModuleCleanupStep + + + +node760->node241 + + + + + +node11->node653 + + + + + +node11->node794 + + + + + +node11->node416 + + + + + +node417 + +SourceFileModelImpl + + + +node11->node417 + + + + + +node768 + +SourceSetModel + + + +node11->node768 + + + + + +node417->node653 + + + + + +node417->node794 + + + + + +node535 + +SourceFileModel + + + +node417->node535 + + + + + +node648->node669 + + + + + +node648->node622 + + + + + +node648->node656 + + + + + +node413 + +DependencyModel + + + +node412->node413 + + + + + +node430 + +MultiTypePropertyModelImpl + + + +node430->node431 + + + + + +node532->node532 + + + + + +node812 + +AndroidGradleBuildTargetScopeProvider + + + +node812->node266 + + + + + +node812->node277 + + + + + +node720 + +CMakeDslElement + + + +node720->node622 + + + + + +node722 + +AbstractBuildDslElement + + + +node720->node722 + + + + + +node722->node664 + + + + + +node457 + +MainPanel + + + +node457->node459 + + + + + +node634 + +AbstractMainDependenciesPanel + + + +node457->node634 + + + + + +node458 + +DependencyGraphPanel + + + +node457->node458 + + + + + +node219 + +AbstractMainPanel + + + +node634->node219 + + + + + +node757->node759 + + + + + +node758 + +NdkFacetConfiguration + + + +node757->node758 + + + + + +node638->node247 + + + + + +node169->node168 + + + + + +node424 + +Places + + + +node169->node424 + + + + + +node289 + +NdkModuleCleanupStep + + + +node289->node151 + + + + + +node289->node759 + + + + + +node289->node241 + + + + + +node454->node453 + + + + + +node12->node427 + + + + + +node12->node794 + + + + + +node762 + +AaptOptionsModel + + + +node12->node762 + + + + + +node349 + +ProjectCleanup + + + +node349->node343 + + + + + +node349->node239 + + + + + +node321 + +ElementSort + + + +node321->node669 + + + + + +node321->node656 + + + + + +node322 + +ExtDslElement + + + +node322->node669 + + + + + +node322->node664 + + + + + +node322->node622 + + + + + +node369 + +FixBuildToolsVersionHyperlink + + + +node369->node327 + + + + + +node211 + +IgnoredBuildScriptSetupStep + + + +node211->node151 + + + + + +node211->node300 + + + + + +node211->node119 + + + + + +node211->node377 + + + + + +node345 + +ProjectSetupStep + + + +node211->node345 + + + + + +node7->node427 + + + + + +node7->node794 + + + + + +node776 + +PackagingOptionsModel + + + +node7->node776 + + + + + +node361 + +GradleProjectBuilder + + + +node361->node266 + + + + + +node361->node277 + + + + + +node361->node789 + + + + + +node477->node472 + + + + + +node477->node377 + + + + + +node477->node146 + + + + + +node477->node335 + + + + + +node477->node338 + + + + + +node383 + +DisableOfflineModeHyperlink + + + +node477->node383 + + + + + +node477->node410 + + + + + +node477->node404 + + + + + +node379 + +ShowDependencyInProjectStructureHyperlink + + + +node477->node379 + + + + + +node398 + +ShowSyncIssuesDetailsHyperlink + + + +node477->node398 + + + + + +node764->node247 + + + + + +node687->node669 + + + + + +node687->node664 + + + + + +node687->node660 + + + + + +node687->node671 + + + + + +node656->node651 + + + + + +node651->node669 + + + + + +node651->node660 + + + + + +node651->node320 + + + + + +node651->node487 + + + + + +node651->node666 + + + + + +node651->node674 + + + + + +node651->node322 + + + + + +node486 + +ModificationAware + + + +node651->node486 + + + + + +node718 + +JavaFacetType + + + +node718->node719 + + + + + +node717 + +JavaFacetConfiguration + + + +node718->node717 + + + + + +node288->node239 + + + + + +node287 + +NdkContentEntriesSetup + + + +node288->node287 + + + + + +node19->node794 + + + + + +node767 + +DependenciesInfoModel + + + +node19->node767 + + + + + +node789->node786 + + + + + +node789->node793 + + + + + +node789->node277 + + + + + +node789->node141 + + + + + +node790 + +GradleTasksExecutorFactory + + + +node789->node790 + + + + + +node789->node782 + + + + + +node792 + +NativeDebugSessionFinder + + + +node789->node792 + + + + + +node198 + +GoToApkLocationTask + + + +node198->node789 + + + + + +node45 + +JdkModuleSetupStep + + + +node45->node242 + + + + + +node781 + +GradleTasksExecutorImpl + + + +node783 + +GradleTasksExecutor + + + +node781->node783 + + + + + +node458->node353 + + + + + +node458->node221 + + + + + +node751 + +ModuleDependencyDetails + + + +node458->node751 + + + + + +node64 + +AbstractBaseExpandAllAction + + + +node458->node64 + + + + + +node676 + +AbstractDependenciesPanel + + + +node458->node676 + + + + + +node458->node173 + + + + + +node458->node65 + + + + + +node166 + +DependenciesTreeBuilder + + + +node458->node166 + + + + + +node756 + +MultipleLibraryDependenciesDetails + + + +node458->node756 + + + + + +node458->node62 + + + + + +node167 + +DependenciesTreeStructure + + + +node458->node167 + + + + + +node567 + +JavaHeapSpaceErrorHandler + + + +node567->node568 + + + + + +node567->node388 + + + + + +node74 + +BaseSplitOptionsModelImpl + + + +node74->node660 + + + + + +node74->node653 + + + + + +node74->node794 + + + + + +node74->node657 + + + + + +node155 + +BaseSplitOptionsModel + + + +node74->node155 + + + + + +node541 + +DaemonContextMismatchErrorHandler + + + +node541->node568 + + + + + +node390 + +OpenProjectStructureHyperlink + + + +node541->node390 + + + + + +node540 + +SdkBuildToolsTooLowErrorHandler + + + +node540->node300 + + + + + +node540->node377 + + + + + +node540->node551 + + + + + +node540->node369 + + + + + +node540->node400 + + + + + +node761 + +TypeNameValueElement + + + +node761->node247 + + + + + +node274 + +GradleProjectDependencyParser + + + +node274->node335 + + + + + +node274->node338 + + + + + +node274->node414 + + + + + +node610->node664 + + + + + +node610->node622 + + + + + +node306 + +AndroidModuleModelDataService + + + +node306->node346 + + + + + +node306->node244 + + + + + +node87 + +ModuleSetupContext + + + +node306->node87 + + + + + +node44 + +AndroidModuleCleanupStep + + + +node306->node44 + + + + + +node503 + +AndroidModuleValidator + + + +node306->node503 + + + + + +node341 + +MemorySettingsPostSyncChecker + + + +node306->node341 + + + + + +node80 + +SelectedVariants + + + +node91->node80 + + + + + +node50 + +AndroidContentEntriesSetup + + + +node50->node122 + + + + + +node50->node146 + + + + + +node50->node106 + + + + + +node150 + +GeneratedSourceFolders + + + +node50->node150 + + + + + +node564 + +Gradle4AndPlugin2Dot2ErrorHandler + + + +node564->node300 + + + + + +node564->node139 + + + + + +node564->node374 + + + + + +node564->node551 + + + + + +node589->node300 + + + + + +node589->node86 + + + + + +node589->node342 + + + + + +node740->node742 + + + + + +node740->node489 + + + + + +node129->node427 + + + + + +node129->node610 + + + + + +node126->node427 + + + + + +node126->node133 + + + + + +node629 + +ConfigurationsDslElement + + + +node629->node664 + + + + + +node629->node622 + + + + + +node629->node652 + + + + + +node24 + +AndroidProjectStub + + + +node24->node489 + + + + + +node24->node39 + + + + + +node27 + +BuildTypeContainerStub + + + +node24->node27 + + + + + +node36 + +ProductFlavorContainerStub + + + +node24->node36 + + + + + +node23 + +JavaCompileOptionsStub + + + +node24->node23 + + + + + +node20 + +SourceProviderStub + + + +node27->node20 + + + + + +node26 + +BuildTypeStub + + + +node27->node26 + + + + + +node291 + +NdkVariantChangeModuleSetup + + + +node291->node239 + + + + + +node291->node288 + + + + + +node556 + +GradleDistributionInstallErrorHandler + + + +node556->node300 + + + + + +node556->node551 + + + + + +node382 + +DeleteFileAndSyncHyperlink + + + +node556->node382 + + + + + +node779 + +BuildTypeModel + + + +node13->node779 + + + + + +node539 + +NdkIntegrationDeprecatedErrorHandler + + + +node539->node568 + + + + + +node542 + +NdkToolchainMissingABIHandler + + + +node542->node568 + + + + + +node542->node391 + + + + + +node542->node146 + + + + + +node542->node338 + + + + + +node542->node410 + + + + + +node633 + +LanguageDslElement + + + +node633->node669 + + + + + +node633->node664 + + + + + +node633->node622 + + + + + +node592 + +PreSyncProjectCleanUp + + + +node592->node590 + + + + + +node592->node595 + + + + + +node592->node596 + + + + + +node591 + +ProjectPreferencesCleanUpTask + + + +node592->node591 + + + + + +node594 + +SyncIssueCleanupTask + + + +node592->node594 + + + + + +node4->node794 + + + + + +node770 + +ViewBindingModel + + + +node4->node770 + + + + + +node53->node122 + + + + + +node53->node242 + + + + + +node53->node114 + + + + + +node423 + +DependenciesDslElement + + + +node423->node669 + + + + + +node423->node664 + + + + + +node423->node622 + + + + + +node497->node660 + + + + + +node497->node653 + + + + + +node497->node671 + + + + + +node497->node657 + + + + + +node497->node490 + + + + + +node497->node665 + + + + + +node713 + +Dependency + + + +node714->node713 + + + + + +node197 + +BuildBundleAction + + + +node197->node140 + + + + + +node197->node266 + + + + + +node197->node789 + + + + + +node665->node669 + + + + + +node665->node663 + + + + + +node665->node660 + + + + + +node665->node662 + + + + + +node574 + +AndroidGeneratedSourcesFilter + + + +node574->node122 + + + + + +node574->node266 + + + + + +node284 + +PreSyncCheckResult + + + +node284->node284 + + + + + +node591->node593 + + + + + +node493 + +FakeElementTransform + + + +node493->node669 + + + + + +node493->node490 + + + + + +node208 + +MissingPlatformsSetupStep + + + +node208->node300 + + + + + +node208->node368 + + + + + +node208->node345 + + + + + +node10->node653 + + + + + +node10->node794 + + + + + +node75 + +AbiModelImpl + + + +node10->node75 + + + + + +node77 + +LanguageModelImpl + + + +node10->node77 + + + + + +node765 + +SplitsModel + + + +node10->node765 + + + + + +node76 + +DensityModelImpl + + + +node10->node76 + + + + + +node307 + +NdkModuleModelDataService + + + +node307->node245 + + + + + +node307->node289 + + + + + +node307->node87 + + + + + +node409->node413 + + + + + +node174 + +GradleTestArtifactSearchScopeSetupStep + + + +node344 + +ModuleSetupStep + + + +node174->node344 + + + + + +node548 + +ErrorOpeningZipFileErrorHandler + + + +node548->node300 + + + + + +node548->node551 + + + + + +node386 + +SyncProjectWithExtraCommandLineOptionsHyperlink + + + +node548->node386 + + + + + +node809 + +GradleCompilerSettingsConfigurableProvider + + + +node810 + +GradleCompilerSettingsConfigurable + + + +node809->node810 + + + + + +node810->node811 + + + + + +node157 + +AbiModel + + + +node157->node155 + + + + + +node155->node247 + + + + + +node250->node100 + + + + + +node250->node249 + + + + + +node250->node433 + + + + + +node696 + +SourceSetDslElement + + + +node696->node664 + + + + + +node696->node622 + + + + + +node696->node650 + + + + + +node566 + +ConnectionPermissionDeniedErrorHandler + + + +node566->node568 + + + + + +node566->node388 + + + + + +node679->node669 + + + + + +node679->node671 + + + + + +node679->node482 + + + + + +node488->node320 + + + + + +node484 + +DependencyManager + + + +node488->node484 + + + + + +node317 + +GradleDslFileCache + + + +node488->node317 + + + + + +node615 + +TestProjects + + + +node615->node39 + + + + + +node615->node32 + + + + + +node615->node24 + + + + + +node285 + +PreSyncChecks + + + +node286 + +JdkPreSyncCheck + + + +node285->node286 + + + + + +node280 + +AndroidSdkPreSyncCheck + + + +node285->node280 + + + + + +node281 + +GradleWrapperPreSyncCheck + + + +node285->node281 + + + + + +node286->node300 + + + + + +node283 + +AndroidStudioSyncCheck + + + +node286->node283 + + + + + +node553 + +GenericErrorHandler + + + +node553->node300 + + + + + +node553->node377 + + + + + +node553->node551 + + + + + +node111 + +ProductFlavorsPanel + + + +node111->node221 + + + + + +node220 + +PsCheckBoxList + + + +node111->node220 + + + + + +node72 + +ConfigurationsModel + + + +node72->node247 + + + + + +node240 + +GradleModuleSetup + + + +node240->node151 + + + + + +node240->node139 + + + + + +node240->node114 + + + + + +node152 + +GradleFacetType + + + +node240->node152 + + + + + +node240->node79 + + + + + +node704 + +BuildFeaturesDslElement + + + +node704->node664 + + + + + +node704->node622 + + + + + +node754 + +ConfigurationDependencyDetails + + + +node751->node754 + + + + + +node754->node755 + + + + + +node8->node158 + + + + + +node8->node653 + + + + + +node8->node794 + + + + + +node339 + +ExternalNativeBuildModel + + + +node8->node339 + + + + + +node159 + +NdkBuildModelImpl + + + +node8->node159 + + + + + +node682->node669 + + + + + +node682->node660 + + + + + +node682->node653 + + + + + +node682->node671 + + + + + +node682->node487 + + + + + +node682->node666 + + + + + +node682->node665 + + + + + +node682->node655 + + + + + +node705 + +AndroidDslElement + + + +node705->node664 + + + + + +node705->node622 + + + + + +node107 + +ModuleDependenciesSetup + + + +node583->node107 + + + + + +node279 + +AdtModuleImporter + + + +node279->node523 + + + + + +node519 + +AdtImportProvider + + + +node279->node519 + + + + + +node268 + +ProjectImportUtil + + + +node279->node268 + + + + + +node254 + +ModuleImporter + + + +node279->node254 + + + + + +node259 + +ModuleToImport + + + +node279->node259 + + + + + +node627 + +ProjectStructureCleanupStep + + + +node627->node343 + + + + + +node686 + +AdbOptionsDslElement + + + +node686->node664 + + + + + +node686->node622 + + + + + +node544 + +UnexpectedErrorHandler + + + +node544->node568 + + + + + +node402 + +ShowLogHyperlink + + + +node544->node402 + + + + + +node376 + +FileBugHyperlink + + + +node544->node376 + + + + + +node179 + +GradleNewResourceCreationHandler + + + +node179->node266 + + + + + +node70 + +ConfigurationModelImpl + + + +node70->node653 + + + + + +node70->node794 + + + + + +node70->node73 + + + + + +node632 + +AbiDslElement + + + +node632->node622 + + + + + +node631 + +BaseSplitOptionsDslElement + + + +node632->node631 + + + + + +node631->node669 + + + + + +node631->node664 + + + + + +node492->node660 + + + + + +node492->node490 + + + + + +node802->node796 + + + + + +node802->node801 + + + + + +node802->node338 + + + + + +node802->node332 + + + + + +node802->node488 + + + + + +node519->node524 + + + + + +node519->node523 + + + + + +node519->node518 + + + + + +node527 + +AdtImportLocationStep + + + +node519->node527 + + + + + +node525 + +AdtImportWarningsStep + + + +node519->node525 + + + + + +node528 + +AdtWorkspaceForm + + + +node519->node528 + + + + + +node410->node413 + + + + + +node308 + +ProjectCleanupDataService + + + +node308->node349 + + + + + +node319 + +GradleBuildFile + + + +node319->node669 + + + + + +node319->node660 + + + + + +node319->node320 + + + + + +node251 + +JavaDslElement + + + +node319->node251 + + + + + +node319->node161 + + + + + +node251->node622 + + + + + +node667 + +BaseCompileOptionsDslElement + + + +node251->node667 + + + + + +node695->node622 + + + + + +node695->node5 + + + + + +node695->node668 + + + + + +node695->node652 + + + + + +node484->node669 + + + + + +node484->node320 + + + + + +node484->node662 + + + + + +node484->node487 + + + + + +node476 + +MissingSdkPackageSyncIssuesReporter + + + +node476->node472 + + + + + +node395 + +InstallSdkPackageHyperlink + + + +node476->node395 + + + + + +node709 + +SplitsDslElement + + + +node709->node664 + + + + + +node709->node622 + + + + + +node55 + +AndroidSyncIssueFileEvent + + + +node57 + +AndroidSyncIssueEvent + + + +node55->node57 + + + + + +node56 + +AndroidSyncIssueFileEventResult + + + +node55->node56 + + + + + +node54 + +AndroidSyncIssueEventResult + + + +node57->node54 + + + + + +node176 + +LinkExternalCppProjectAction + + + +node176->node122 + + + + + +node176->node335 + + + + + +node176->node186 + + + + + +node191 + +LinkExternalCppProjectDialog + + + +node176->node191 + + + + + +node20->node489 + + + + + +node222 + +ModulesComboBoxAction + + + +node222->node146 + + + + + +node97 + +LabeledComboBoxAction + + + +node222->node97 + + + + + +node69->node660 + + + + + +node69->node653 + + + + + +node69->node794 + + + + + +node69->node72 + + + + + +node69->node70 + + + + + +node69->node628 + + + + + +node628->node664 + + + + + +node628->node622 + + + + + +node628->node650 + + + + + +node237 + +CMakeOptionsDslElement + + + +node237->node622 + + + + + +node237->node236 + + + + + +node527->node519 + + + + + +node42 + +MainPanel + + + +node42->node43 + + + + + +node42->node634 + + + + + +node217 + +SelectionChangeListener + + + +node42->node217 + + + + + +node525->node519 + + + + + +node667->node664 + + + + + +node667->node660 + + + + + +node114->node115 + + + + + +node780 + +TasksPerProject + + + +node114->node780 + + + + + +node110 + +BuildTypesPanel + + + +node110->node221 + + + + + +node110->node220 + + + + + +node220->node217 + + + + + +node333->node247 + + + + + +node280->node283 + + + + + +node89 + +SdkSync + + + +node280->node89 + + + + + +node282 + +SyncCheck + + + +node283->node282 + + + + + +node147 + +BuildFileProcessor + + + +node147->node338 + + + + + +node655->node653 + + + + + +node135->node136 + + + + + +node712->node713 + + + + + +node405 + +RemoveSHA256FromGradleWrapperHyperlink + + + +node405->node139 + + + + + +node680->node669 + + + + + +node680->node663 + + + + + +node680->node671 + + + + + +node680->node662 + + + + + +node680->node657 + + + + + +node680->node665 + + + + + +node680->node679 + + + + + +node680->node655 + + + + + +node680->node485 + + + + + +node419->node99 + + + + + +node419->node799 + + + + + +node75->node74 + + + + + +node75->node157 + + + + + +node188 + +EditBuildTypesAction + + + +node188->node190 + + + + + +node188->node461 + + + + + +node210 + +ExpiredPreviewBuildSetupStep + + + +node210->node388 + + + + + +node210->node345 + + + + + +node317->node796 + + + + + +node317->node320 + + + + + +node698 + +BuildTypeDslElement + + + +node698->node622 + + + + + +node698->node687 + + + + + +node698->node650 + + + + + +node152->node151 + + + + + +node153 + +GradleFacetConfiguration + + + +node152->node153 + + + + + +node471 + +TargetSdkInManifestIssuesReporter + + + +node471->node474 + + + + + +node44->node241 + + + + + +node1->node427 + + + + + +node1->node794 + + + + + +node1->node512 + + + + + +node814 + +AndroidGradleTaskManager + + + +node814->node266 + + + + + +node814->node148 + + + + + +node814->node789 + + + + + +node729 + +DependencyConfigurationModelImpl + + + +node729->node427 + + + + + +node729->node666 + + + + + +node734 + +ExcludedDependencyModelImpl + + + +node729->node734 + + + + + +node411 + +DependencyConfigurationModel + + + +node729->node411 + + + + + +node734->node671 + + + + + +node734->node427 + + + + + +node406 + +ExcludedDependencyModel + + + +node734->node406 + + + + + +node730 + +Fetcher + + + +node730->node794 + + + + + +node730->node414 + + + + + +node255->node449 + + + + + +node452 + +NewProjectSetup + + + +node452->node451 + + + + + +node347 + +ProjectSetup + + + +node347->node239 + + + + + +node347->node345 + + + + + +node683 + +SourceDirectoryDslElement + + + +node683->node669 + + + + + +node683->node664 + + + + + +node683->node622 + + + + + +node337->node331 + + + + + +node313 + +GradleBuildTreeStructure + + + +node310 + +GradleBuildTreeViewConfiguration + + + +node313->node310 + + + + + +node178 + +RefreshLinkedCppProjectsAction + + + +node178->node148 + + + + + +node185 + +SyncProjectAction + + + +node178->node185 + + + + + +node185->node186 + + + + + +node378->node335 + + + + + +node378->node338 + + + + + +node378->node325 + + + + + +node378->node639 + + + + + +node784 + +GradleInvocationResult + + + +node363->node784 + + + + + +node232->node247 + + + + + +node309 + +GradleModuleModelDataService + + + +node309->node151 + + + + + +node309->node240 + + + + + +node469 + +SyncIssuesReporter + + + +node469->node470 + + + + + +node469->node479 + + + + + +node469->node480 + + + + + +node469->node476 + + + + + +node469->node471 + + + + + +node475 + +UnhandledIssuesReporter + + + +node469->node475 + + + + + +node481 + +MinSdkInManifestIssuesReporter + + + +node469->node481 + + + + + +node478 + +BuildToolsTooLowReporter + + + +node469->node478 + + + + + +node468 + +UnsupportedGradleReporter + + + +node469->node468 + + + + + +node132->node133 + + + + + +node305 + +JavaModuleModelDataService + + + +node305->node59 + + + + + +node305->node760 + + + + + +node305->node87 + + + + + +node609 + +RepositoriesDslElement + + + +node609->node664 + + + + + +node609->node622 + + + + + +node500 + +ExtraGeneratedFolderValidationStrategy + + + +node500->node300 + + + + + +node500->node122 + + + + + +node500->node150 + + + + + +node500->node502 + + + + + +node56->node54 + + + + + +node577 + +CompilerOutputModuleSetupStep + + + +node577->node60 + + + + + +node577->node119 + + + + + +node577->node104 + + + + + +node52->node107 + + + + + +node703 + +TestOptionsDslElement + + + +node703->node664 + + + + + +node703->node622 + + + + + +node522->node669 + + + + + +node522->node655 + + + + + +node520 + +EclipseImportModule + + + +node522->node520 + + + + + +node17->node772 + + + + + +node17->node794 + + + + + +node741->node489 + + + + + +node746 + +IdeaSourceDirectoryStub + + + +node741->node746 + + + + + +node18->node653 + + + + + +node18->node794 + + + + + +node513 + +UnitTestsModelImpl + + + +node18->node513 + + + + + +node769 + +TestOptionsModel + + + +node18->node769 + + + + + +node513->node794 + + + + + +node530 + +UnitTestsModel + + + +node513->node530 + + + + + +node611->node669 + + + + + +node611->node664 + + + + + +node611->node622 + + + + + +node776->node247 + + + + + +node109 + +Configuration + + + +node109->node109 + + + + + +node77->node794 + + + + + +node154 + +LanguageModel + + + +node77->node154 + + + + + +node261 + +AndroidGradleOrderEnumeratorHandlerFactory + + + +node261->node122 + + + + + +node261->node119 + + + + + +node88->node79 + + + + + +node691 + +ViewBindingDslElement + + + +node691->node664 + + + + + +node691->node622 + + + + + +node510 + +NdkBuildModel + + + +node510->node511 + + + + + +node183 + +EnableInstantAppsSupportDialog + + + +node183->node122 + + + + + +node520->node522 + + + + + +node520->node521 + + + + + +node805->node151 + + + + + +node805->node122 + + + + + +node805->node119 + + + + + +node805->node759 + + + + + +node805->node86 + + + + + +node805->node342 + + + + + +node805->node361 + + + + + +node805->node291 + + + + + +node805->node87 + + + + + +node83 + +VariantOnlySyncOptions + + + +node805->node83 + + + + + +node46 + +AndroidVariantChangeModuleSetup + + + +node805->node46 + + + + + +node235->node234 + + + + + +node795->node320 + + + + + +node795->node431 + + + + + +node795->node336 + + + + + +node380 + +UpgradeAppenginePluginVersionHyperlink + + + +node380->node335 + + + + + +node380->node410 + + + + + +node485->node482 + + + + + +node193 + +BuildApkAction + + + +node193->node140 + + + + + +node193->node266 + + + + + +node193->node789 + + + + + +node175 + +AndroidRunConfigurationSetupStep + + + +node175->node759 + + + + + +node175->node344 + + + + + +node563 + +MissingCMakeErrorHandler + + + +node563->node568 + + + + + +node563->node141 + + + + + +node397 + +InstallCMakeHyperlink + + + +node563->node397 + + + + + +node774->node247 + + + + + +node528->node523 + + + + + +node708 + +DependenciesInfoDslElement + + + +node708->node664 + + + + + +node708->node622 + + + + + +node534 + +GradleRenameModuleHandler + + + +node534->node335 + + + + + +node46->node49 + + + + + +node46->node51 + + + + + +node46->node47 + + + + + +node46->node242 + + + + + +node762->node247 + + + + + +node357 + +PostProjectBuildTasksExecutor + + + +node357->node277 + + + + + +node165 + +IdeaSyncCachesInvalidator + + + +node165->node164 + + + + + +node165->node266 + + + + + +node287->node120 + + + + + +node287->node106 + + + + + +node154->node247 + + + + + +node31->node489 + + + + + +node31->node33 + + + + + +node475->node472 + + + + + +node473 + +ConstraintLayoutFeature + + + +node473->node122 + + + + + +node2->node794 + + + + + +node766 + +DexOptionsModel + + + +node2->node766 + + + + + +node766->node247 + + + + + +node92 + +GradleSyncIntegrationTestCase + + + +node92->node257 + + + + + +node521->node529 + + + + + +node521->node523 + + + + + +node798->node795 + + + + + +node557 + +CachedDependencyNotFoundErrorHandler + + + +node557->node568 + + + + + +node557->node401 + + + + + +node209 + +ProjectJdkSetupStep + + + +node209->node300 + + + + + +node209->node345 + + + + + +node535->node247 + + + + + +node336->node247 + + + + + +node763->node775 + + + + + +node400->node327 + + + + + +node195 + +CleanProjectAction + + + +node195->node358 + + + + + +node195->node186 + + + + + +node195->node361 + + + + + +node594->node593 + + + + + +node676->node675 + + + + + +node676->node755 + + + + + +node676->node173 + + + + + +node215 + +EmptyPanel + + + +node676->node215 + + + + + +node604 + +GradleModuleTasksProvider + + + +node604->node793 + + + + + +node297 + +JarLibraryDependency + + + +node293 + +GradleModuleVersionImpl + + + +node297->node293 + + + + + +node387->node461 + + + + + +node750->node743 + + + + + +node182 + +GoToBundleLocationTask + + + +node182->node789 + + + + + +node48->node300 + + + + + +node48->node122 + + + + + +node48->node242 + + + + + +node189 + +AndroidShowStructureSettingsAction + + + +node189->node266 + + + + + +node173->node172 + + + + + +node213 + +IssuesViewerPanel + + + +node173->node213 + + + + + +node765->node247 + + + + + +node769->node247 + + + + + +node161->node669 + + + + + +node161->node660 + + + + + +node281->node300 + + + + + +node281->node396 + + + + + +node281->node139 + + + + + +node281->node377 + + + + + +node281->node283 + + + + + +node281->node405 + + + + + +node281->node144 + + + + + +node170->node168 + + + + + +node328->node657 + + + + + +node328->node656 + + + + + +node799->node794 + + + + + +node799->node775 + + + + + +node688 + +DataBindingDslElement + + + +node688->node664 + + + + + +node688->node622 + + + + + +node404->node326 + + + + + +node421 + +AndroidReRunBuildFilter + + + +node421->node789 + + + + + +node381 + +StopGradleDaemonsHyperlink + + + +node381->node388 + + + + + +node543 + +ObjectStreamErrorHandler + + + +node543->node300 + + + + + +node543->node551 + + + + + +node543->node368 + + + + + +node373 + +BuildProjectHyperlink + + + +node543->node373 + + + + + +node113 + +JavaModuleDependenciesConfigurable + + + +node113->node42 + + + + + +node408->node413 + + + + + +node481->node474 + + + + + +node737 + +ConflictResolution + + + +node737->node122 + + + + + +node737->node759 + + + + + +node118 + +NdkVariant + + + +node737->node118 + + + + + +node736 + +ConflictResolutionDialog + + + +node737->node736 + + + + + +node270->node149 + + + + + +node68 + +AbstractBaseTreeBuilder + + + +node166->node68 + + + + + +node351->node68 + + + + + +node352 + +ResolvedDependenciesTreeStructure + + + +node351->node352 + + + + + +node641->node639 + + + + + +node569 + +OldAndroidPluginErrorHandler + + + +node569->node568 + + + + + +node569->node391 + + + + + +node569->node377 + + + + + +node569->node146 + + + + + +node569->node385 + + + + + +node756->node755 + + + + + +node226 + +UiUtil + + + +node226->node68 + + + + + +node66 + +TreeBuilderSpeedSearch + + + +node226->node66 + + + + + +node721 + +NdkBuildDslElement + + + +node721->node622 + + + + + +node721->node722 + + + + + +node373->node266 + + + + + +node373->node789 + + + + + +node159->node160 + + + + + +node159->node510 + + + + + +node262 + +AndroidGradleProjectStartupActivity + + + +node262->node266 + + + + + +node478->node472 + + + + + +node478->node377 + + + + + +node478->node335 + + + + + +node478->node338 + + + + + +node478->node540 + + + + + +node468->node479 + + + + + +node37 + +AndroidLibraryStub + + + +node28 + +MavenCoordinatesStub + + + +node37->node28 + + + + + +node752 + +SingleDeclaredLibraryDependencyDetails + + + +node752->node415 + + + + + +node752->node754 + + + + + +node58 + +AndroidSyncFailure + + + +node54->node58 + + + + + +node212 + +GradleKtsBuildFilesWarningStep + + + +node212->node146 + + + + + +node212->node345 + + + + + +node545 + +ClassLoadingErrorHandler + + + +node545->node300 + + + + + +node545->node551 + + + + + +node516 + +IncompleteParsingNotification + + + +node334 + +BuildModelNotification + + + +node516->node334 + + + + + +node36->node20 + + + + + +node36->node30 + + + + + +node34 + +SourceProviderContainerStub + + + +node36->node34 + + + + + +node102 + +VariantCheckboxTreeCellRenderer + + + +node102->node146 + + + + + +node790->node358 + + + + + +node790->node781 + + + + + +node770->node247 + + + + + +node318 + +GradleSettingsFile + + + +node318->node669 + + + + + +node318->node660 + + + + + +node318->node320 + + + + + +node318->node648 + + + + + +node547 + +Jdk8RequiredErrorHandler + + + +node547->node568 + + + + + +node201 + +EditLibraryAndDependenciesAction + + + +node201->node190 + + + + + +node201->node461 + + + + + +node773->node247 + + + + + +node403 + +DownloadJdk8Hyperlink + + + +node403->node388 + + + + + +node296->node297 + + + + + +node112 + +ConfigurationsPanel + + + +node112->node221 + + + + + +node112->node220 + + + + + +node707 + +CompileOptionsDslElement + + + +node707->node622 + + + + + +node707->node667 + + + + + +node598 + +AndroidGradleTestTasksProvider + + + +node598->node151 + + + + + +node598->node122 + + + + + +node690 + +KotlinOptionsDslElement + + + +node690->node664 + + + + + +node690->node622 + + + + + +node630 + +DensityDslElement + + + +node630->node669 + + + + + +node630->node622 + + + + + +node630->node631 + + + + + +node815 + +UnitTestsDslElement + + + +node815->node664 + + + + + +node815->node622 + + + + + +node265->node603 + + + + + +node265->node388 + + + + + +node617->node122 + + + + + +node384 + +SyncIssueDetailsDialog + + + +node398->node384 + + + + + +node739 + +ConflictSet + + + +node739->node300 + + + + + +node739->node122 + + + + + +node455->node453 + + + + + +node549 + +Gradle2RequiredErrorHandler + + + +node549->node568 + + + + + +node549->node393 + + + + + +node196 + +BuildsToPathsMapper + + + +node196->node122 + + + + + +node600 + +PostBuildModel + + + +node196->node600 + + + + + +node785 + +BuildProcessController + + + +node785->node786 + + + + + +node171 + +IssuesByTypeAndTextComparator + + + +node171->node171 + + + + + +node76->node74 + + + + + +node156 + +DensityModel + + + +node76->node156 + + + + + +node156->node155 + + + + + +node370 + +InstallNdkHyperlink + + + +node370->node141 + + + + + +node63 + +AbstractBaseTreeStructure + + + +node352->node63 + + + + + +node199 + +MakeGradleModuleAction + + + +node199->node266 + + + + + +node199->node186 + + + + + +node199->node789 + + + + + +node788->node788 + + + + + +node202 + +SelectBuildVariantAction + + + +node202->node186 + + + + + +node142 + +ModuleTypeComparator + + + +node142->node122 + + + + + +node142->node142 + + + + + +node167->node63 + + + + + +node697 + +AaptOptionsDslElement + + + +node697->node664 + + + + + +node697->node622 + + + + + +node732 + +Maintainer + + + +node732->node413 + + + + + +node508 + +AndroidModuleDependenciesConfigurable + + + +node508->node42 + + + + + +node735 + +ArtifactDependencyModelImpl + + + +node735->node410 + + + + + +node130->node124 + + + + + +node316 + +GradlePropertiesFile + + + +node316->node320 + + + + + +node565 + +CorruptGradleDependencyErrorHandler + + + +node565->node568 + + + + + +node753 + +JarDependencyDetailsForm + + + +node753->node754 + + + + + +node302 + +SyncIssueDataService + + + +node302->node469 + + + + + +node254->node254 + + + + + +node514 + +NotificationTypeReference + + + +node514->node514 + + + + + +node456 + +ProjectDependenciesConfigurable + + + +node456->node457 + + + + + +node723->node247 + + + + + +node177 + +LibraryPropertiesAction + + + +node507 + +LibraryPropertiesDialog + + + +node177->node507 + + + + + +node645 + +BuildNodeDecorator + + + +node645->node146 + + + + + +node34->node20 + + + + + +node768->node247 + + + + + +node531 + +SyncIssuesModel + + + +node531->node531 + + + + + +node375 + +DownloadAndroidStudioHyperlink + + + +node375->node388 + + + + + +node515 + +PropertyPlacementNotification + + + +node515->node334 + + + + + +node807 + +ModuleVariantsInfoGraph + + + +node807->node122 + + + + + +node271 + +GradleModuleImporter + + + +node271->node254 + + + + + +node108 + +BaseSetup + + + +node108->node242 + + + + + +node84 + +IdeAndroidProjectIntegrationTestCase + + + +node84->node122 + + + + + +node84->node24 + + + + + +node517 + +InvalidExpressionNotification + + + +node517->node334 + + + + + +node533 + +GradleAwareSourceRootRenameValidator + + + +node71 + +ForcedPluginPreviewVersionUpgradeDialog + + + +node585 + +GradleModelVersionCheck + + + +node599 + +GradleTaskRunner + + + +node601 + +GradleEditTaskDialog + + + +node605 + +OutputBuildAction + + + +node614 + +ProjectLibraries + + + +node616 + +LibraryFilePaths + + + +node618 + +AndroidGradleImportTaskNotificationListener + + + +node619 + +ArityHelper + + + +node620 + +SemanticsDescription + + + +node621 + +ModelMapCollector + + + +node635 + +RawText + + + +node644 + +GradleDependencyManager + + + +node646 + +ChangeListener + + + +node647 + +ModuleNodeIconDecorator + + + +node649 + +CacheInvalidatorMetricCollector + + + +node677 + +DeclaredDependenciesTableView + + + +node678 + +AbstractDeclaredDependenciesTableModel + + + +node738 + +Conflict + + + +node747 + +IdeaSingleEntryLibraryDependencyStub + + + +node748 + +IdeaDependencyScopeStub + + + +node78 + +ModuleDependenciesSubject + + + +node81 + +GradleSyncInvoker + + + +node82 + +ExpectedModuleDependency + + + +node85 + +SimulatedSyncErrors + + + +node90 + +LibraryDependenciesSubject + + + +node93 + +Modules + + + +node94 + +SelectedVariantCollector + + + +node95 + +DependenciesSubject + + + +node791 + +TestBuildAction + + + +node804 + +ExternalRepository + + + +node808 + +BuildVariantToolWindowFactory + + + +node813 + +HideCompilerOptions + + + +node96 + +ToolWindowAlikePanel + + + +node98 + +ActivationListener + + + +node816 + +Facets + + + +node105 + +DependencySetupIssues + + + +node21 + +ModuleManagerStub + + + +node22 + +ClassFieldStub + + + +node117 + +NdkVariantName + + + +node121 + +NdkModelFeatures + + + +node138 + +ContentEntries + + + +node143 + +AndroidStudioPreferences + + + +node162 + +PsModuleCellRenderer + + + +node163 + +BaseNamedConfigurable + + + +node40 + +ExtractVariableForm + + + +node181 + +AndroidTemplateProjectStructureAction + + + +node187 + +AndroidTemplateProjectSettingsGroup + + + +node192 + +StopGradleDaemonsAction + + + +node200 + +BuildsToPathsMapperForApkTestCase + + + +node205 + +LibraryDependenciesFormUi + + + +node206 + +AbstractDependencyScopesPanel + + + +node207 + +AbstractAddDependenciesDialog + + + +node214 + +RestoreListener + + + +node216 + +AbstractPsModelTableCellRenderer + + + +node218 + +MinimizeListener + + + +node223 + +ArtifactRepositorySearchFormUi + + + +node224 + +CollapsiblePanel + + + +node225 + +ChangeListener + + + +node227 + +ChooseModuleDialog + + + +node229 + +GradleValue + + + +node230 + +GradleNullableValue + + + +node41 + +BuildAttributionOutputLinkFilter + + + +node243 + +ModuleSetupStep + + + +node246 + +ModuleFinder + + + +node253 + +AndroidStudioGradleSettings + + + +node256 + +AndroidStudioGradleInstallationManager + + + +node260 + +NonAndroidGradleProjectImportingTestSuite + + + +node264 + +GradleSiblingLookup + + + +node267 + +AndroidStudioGradleSettingsControlProvider + + + +node272 + +AndroidStudioGradleImportCustomizer + + + +node276 + +ProjectStructure + + + +node292 + +ConfigPanelUi + + + +node299 + +GroupNames + + + +node301 + +SyncMessageSubject + + + +node303 + +ModuleModelDataService + + + +node304 + +AndroidProjectKeys + + + +node311 + +MessageTreeRenderer + + + +node312 + +GradleBuildTreeViewPanel + + + +node314 + +CommonProjectValidationStrategy + + + +node348 + +ComposeInBetaChecker + + + +node350 + +AndroidSdkRepositories + + + +node360 + +GradleBuildListener + + + +node366 + +PsIssueType + + + +node367 + +TestModel + + + +node372 + +UseJavaHomeAsJdkHyperlink + + + +node394 + +UseEmbeddedJdkHyperlink + + + +node399 + +OpenHttpSettingsHyperlink + + + +node407 + +CommonConfigurationNames + + + +node420 + +AndroidGradleExecutionConsoleManager + + + +node434 + +CmakeOutputParser + + + +node435 + +GradleBuildOutputParser + + + +node436 + +AndroidGradlePluginOutputParser + + + +node437 + +BuildOutputParserUtils + + + +node438 + +GradleOutputParserProvider + + + +node439 + +GradleAndroidModuleTemplate + + + +node440 + +GradleBuildSettings + + + +node444 + +AndroidPluginInfo + + + +node445 + +AndroidPluginVersionUpdater + + + +node447 + +ProjectFolder + + + +node448 + +AndroidGradleProjectImportProvider + + + +node450 + +GradleProjectImporter + + + +node462 + +ProjectConfigurationError + + + +node463 + +SuggestionsFormUi + + + +node464 + +SuggestionsViewerUi + + + +node465 + +SuggestionGroupViewerUi + + + +node466 + +SuggestionViewerUi + + + +node467 + +AndroidDslContributor + + + +node61 + +SimpleNodeComparator + + + +node67 + +PsRootNode + + + +node504 + +ProjectSyncStatusNotificationProvider + + + +node505 + +GeneratedFileNotificationProvider + + + +node506 + +AutoImportNotificationProvider + + + diff --git a/showcases/android-studio-android-merge.svg b/showcases/android-studio-android-merge.svg new file mode 100644 index 0000000000000000000000000000000000000000..4f6a6d216d77568f2d97921945895801bdf0e5c7 --- /dev/null +++ b/showcases/android-studio-android-merge.svg @@ -0,0 +1,454 @@ + + + + + + +G + + +cluster1 + +com.android.tools.idea.gradle.dsl + + +cluster2 + +com.android.tools.idea.gradle.util + + +cluster3 + +com.android.tools.idea.gradle.npw + + +cluster4 + +com.android.tools.idea.gradle.stubs + + +cluster5 + +com.android.tools.idea.gradle.variant + + +cluster6 + +com.android.tools.idea.gradle.service + + +cluster7 + +com.android.tools.idea.gradle.project + + +cluster8 + +com.android.tools.idea.gradle.model + + +cluster9 + +com.android.tools.idea.gradle.structure + + + +node18 + +importing + + + +node13 + +facet + + + +node18->node13 + + + + + +node20 + +sync + + + +node18->node20 + + + + + +node3 + +parser + + + +node18->node3 + + + + + +node15 + +model + + + +node13->node15 + + + + + +node10 + +view + + + +node10->node13 + + + + + +node10->node15 + + + + + +node10->node20 + + + + + +node19 + +build + + + +node10->node19 + + + + + +node15->node13 + + + + + +node15->node19 + + + + + +node21 + +java + + + +node15->node21 + + + + + +node20->node13 + + + + + +node20->node15 + + + + + +node20->node3 + + + + + +node7 + +android + + + +node20->node7 + + + + + +node20->node19 + + + + + +node1 + +api + + + +node20->node1 + + + + + +node20->node21 + + + + + +node17 + +common + + + +node20->node17 + + + + + +node2 + +model + + + +node3->node2 + + + + + +node3->node1 + + + + + +node19->node13 + + + + + +node19->node15 + + + + + +node25 + +configurables + + + +node25->node20 + + + + + +node23 + +navigation + + + +node25->node23 + + + + + +node25->node1 + + + + + +node22 + +model + + + +node25->node22 + + + + + +node4 + +ui + + + +node25->node4 + + + + + +node2->node3 + + + + + +node2->node1 + + + + + +node1->node2 + + + + + +node8 + +conflict + + + +node8->node13 + + + + + +node8->node15 + + + + + +node8->node20 + + + + + +node22->node20 + + + + + +node22->node3 + + + + + +node24 + +services + + + +node24->node20 + + + + + +node24->node1 + + + + + +node26 + +dependencies + + + +node26->node25 + + + + + +node26->node22 + + + + + +node5 + +project + + + +node6 + +gradle + + + +node9 + +ui + + + +node11 + +resolve + + + +node12 + +repo + + + +node14 + +library + + + +node16 + +metrics + + + diff --git a/showcases/android-studio-call.svg b/showcases/android-studio-call.svg new file mode 100644 index 0000000000000000000000000000000000000000..b39316a7ab01d790d2c9d4ccdec7e748b2963f67 --- /dev/null +++ b/showcases/android-studio-call.svg @@ -0,0 +1,559 @@ + + + + + + +G + + + +project.GradleProjectInfo.isBuildWithGradle + +project.GradleProjectInfo.isBuildWithGradle + + + +com.intellij.openapi.application.ReadAction.compute + +com.intellij.openapi.application.ReadAction.compute + + + +project.GradleProjectInfo.isBuildWithGradle->com.intellij.openapi.application.ReadAction.compute + + + + + +com.intellij.openapi.project.Project.isDisposed + +com.intellij.openapi.project.Project.isDisposed + + + +project.GradleProjectInfo.isBuildWithGradle->com.intellij.openapi.project.Project.isDisposed + + + + + +java.util.Arrays.stream + +java.util.Arrays.stream + + + +project.GradleProjectInfo.isBuildWithGradle->java.util.Arrays.stream + + + + + +com.intellij.openapi.module.ModuleManager.getInstance + +com.intellij.openapi.module.ModuleManager.getInstance + + + +project.GradleProjectInfo.isBuildWithGradle->com.intellij.openapi.module.ModuleManager.getInstance + + + + + +com.intellij.openapi.module.ModuleManager.getModules + +com.intellij.openapi.module.ModuleManager.getModules + + + +project.GradleProjectInfo.isBuildWithGradle->com.intellij.openapi.module.ModuleManager.getModules + + + + + +java.util.Arrays.anyMatch + +java.util.Arrays.anyMatch + + + +project.GradleProjectInfo.isBuildWithGradle->java.util.Arrays.anyMatch + + + + + +com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.isExternalSystemAwareModule + +com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.isExternalSystemAwareModule + + + +project.GradleProjectInfo.isBuildWithGradle->com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.isExternalSystemAwareModule + + + + + +com.intellij.facet.ProjectFacetManager.hasFacets + +com.intellij.facet.ProjectFacetManager.hasFacets + + + +project.GradleProjectInfo.isBuildWithGradle->com.intellij.facet.ProjectFacetManager.hasFacets + + + + + +project.facet.gradle.GradleFacet.getFacetTypeId + +project.facet.gradle.GradleFacet.getFacetTypeId + + + +project.GradleProjectInfo.isBuildWithGradle->project.facet.gradle.GradleFacet.getFacetTypeId + + + + + +project.sync.GradleSyncState.getInstance + +project.sync.GradleSyncState.getInstance + + + +project.GradleProjectInfo.isBuildWithGradle->project.sync.GradleSyncState.getInstance + + + + + +project.sync.GradleSyncState.getLastSyncFinishedTimeStamp + +project.sync.GradleSyncState.getLastSyncFinishedTimeStamp + + + +project.GradleProjectInfo.isBuildWithGradle->project.sync.GradleSyncState.getLastSyncFinishedTimeStamp + + + + + +project.GradleProjectInfo.hasTopLevelGradleFile + +project.GradleProjectInfo.hasTopLevelGradleFile + + + +project.GradleProjectInfo.isBuildWithGradle->project.GradleProjectInfo.hasTopLevelGradleFile + + + + + +com.intellij.openapi.project.Project.isDefault + +com.intellij.openapi.project.Project.isDefault + + + +project.GradleProjectInfo.hasTopLevelGradleFile->com.intellij.openapi.project.Project.isDefault + + + + + +com.intellij.openapi.project.Project.getBaseDir + +com.intellij.openapi.project.Project.getBaseDir + + + +project.GradleProjectInfo.hasTopLevelGradleFile->com.intellij.openapi.project.Project.getBaseDir + + + + + +com.android.tools.idea.actions.AndroidInferNullityAnnotationAction.analyze + +com.android.tools.idea.actions.AndroidInferNullityAnnotationAction.analyze + + + +com.android.tools.idea.actions.AndroidInferNullityAnnotationAction.analyze->project.GradleProjectInfo.isBuildWithGradle + + + + + +com.android.tools.idea.actions.ExportProjectZip.actionPerformed + +com.android.tools.idea.actions.ExportProjectZip.actionPerformed + + + +com.android.tools.idea.actions.ExportProjectZip.save + +com.android.tools.idea.actions.ExportProjectZip.save + + + +com.android.tools.idea.actions.ExportProjectZip.actionPerformed->com.android.tools.idea.actions.ExportProjectZip.save + + + + + +com.android.tools.idea.actions.ExportProjectZip.save->project.GradleProjectInfo.isBuildWithGradle + + + + + +com.android.tools.idea.actions.annotations.InferSupportAnnotationsAction.update + +com.android.tools.idea.actions.annotations.InferSupportAnnotationsAction.update + + + +com.android.tools.idea.actions.annotations.InferSupportAnnotationsAction.update->project.GradleProjectInfo.isBuildWithGradle + + + + + +com.android.tools.idea.actions.annotations.InferSupportAnnotationsAction.analyze + +com.android.tools.idea.actions.annotations.InferSupportAnnotationsAction.analyze + + + +com.android.tools.idea.actions.annotations.InferSupportAnnotationsAction.analyze->project.GradleProjectInfo.isBuildWithGradle + + + + + +.AnnotateTask.getAdditionalActionSettings + +.AnnotateTask.getAdditionalActionSettings + + + +.AnnotateTask.getAdditionalActionSettings->project.GradleProjectInfo.isBuildWithGradle + + + + + +actions.AndroidShowStructureSettingsAction.update + +actions.AndroidShowStructureSettingsAction.update + + + +actions.AndroidShowStructureSettingsAction.update->project.GradleProjectInfo.isBuildWithGradle + + + + + +actions.AndroidShowStructureSettingsAction.actionPerformed + +actions.AndroidShowStructureSettingsAction.actionPerformed + + + +actions.AndroidShowStructureSettingsAction.actionPerformed->project.GradleProjectInfo.isBuildWithGradle + + + + + +actions.AndroidStudioGradleAction.actionPerformed + +actions.AndroidStudioGradleAction.actionPerformed + + + +actions.AndroidStudioGradleAction.isGradleProject + +actions.AndroidStudioGradleAction.isGradleProject + + + +actions.AndroidStudioGradleAction.actionPerformed->actions.AndroidStudioGradleAction.isGradleProject + + + + + +actions.AndroidStudioGradleAction.isGradleProject->project.GradleProjectInfo.isBuildWithGradle + + + + + +actions.AndroidStudioGradleAction.update + +actions.AndroidStudioGradleAction.update + + + +actions.AndroidStudioGradleAction.update->actions.AndroidStudioGradleAction.isGradleProject + + + + + +actions.BuildApkAction.update + +actions.BuildApkAction.update + + + +actions.BuildApkAction.update->project.GradleProjectInfo.isBuildWithGradle + + + + + +actions.BuildApkAction.actionPerformed + +actions.BuildApkAction.actionPerformed + + + +actions.BuildApkAction.actionPerformed->project.GradleProjectInfo.isBuildWithGradle + + + + + +actions.BuildBundleAction.update + +actions.BuildBundleAction.update + + + +actions.BuildBundleAction.isProjectBuildWithGradle + +actions.BuildBundleAction.isProjectBuildWithGradle + + + +actions.BuildBundleAction.update->actions.BuildBundleAction.isProjectBuildWithGradle + + + + + +actions.BuildBundleAction.isProjectBuildWithGradle->project.GradleProjectInfo.isBuildWithGradle + + + + + +actions.BuildBundleAction.actionPerformed + +actions.BuildBundleAction.actionPerformed + + + +actions.BuildBundleAction.actionPerformed->actions.BuildBundleAction.isProjectBuildWithGradle + + + + + +actions.GradleNewResourceCreationHandler.isApplicable + +actions.GradleNewResourceCreationHandler.isApplicable + + + +actions.GradleNewResourceCreationHandler.isApplicable->project.GradleProjectInfo.isBuildWithGradle + + + + + +project.AndroidGradleProjectComponent.projectOpened + +project.AndroidGradleProjectComponent.projectOpened + + + +project.AndroidGradleProjectComponent.projectOpened->project.GradleProjectInfo.isBuildWithGradle + + + + + +project.AndroidGradleProjectComponent.AndroidGradleProjectComponent + +project.AndroidGradleProjectComponent.AndroidGradleProjectComponent + + + +project.AndroidGradleProjectComponent.AndroidGradleProjectComponent->project.GradleProjectInfo.isBuildWithGradle + + + + + +project.AndroidGradleProjectStartupActivity.runActivity + +project.AndroidGradleProjectStartupActivity.runActivity + + + +project.AndroidGradleProjectStartupActivity.runActivity->project.GradleProjectInfo.isBuildWithGradle + + + + + +project.SupportedModuleChecker.checkForSupportedModules + +project.SupportedModuleChecker.checkForSupportedModules + + + +project.SupportedModuleChecker.checkForSupportedModules->project.GradleProjectInfo.isBuildWithGradle + + + + + +project.build.compiler.AndroidGradleBuildTargetScopeProvider.getBuildTargetScopes + +project.build.compiler.AndroidGradleBuildTargetScopeProvider.getBuildTargetScopes + + + +project.build.compiler.AndroidGradleBuildTargetScopeProvider.getBuildTargetScopes->project.GradleProjectInfo.isBuildWithGradle + + + + + +project.sync.idea.data.IdeaSyncCachesInvalidator.invalidateCaches + +project.sync.idea.data.IdeaSyncCachesInvalidator.invalidateCaches + + + +project.sync.idea.data.IdeaSyncCachesInvalidator.invalidateCaches->project.GradleProjectInfo.isBuildWithGradle + + + + + +.GradleProvider.isApplicable + +.GradleProvider.isApplicable + + + +.GradleProvider.isApplicable->project.GradleProjectInfo.isBuildWithGradle + + + + + +sdk.GradleAndroidSdkEventListener.afterSdkPathChange + +sdk.GradleAndroidSdkEventListener.afterSdkPathChange + + + +sdk.GradleAndroidSdkEventListener.afterSdkPathChange->project.GradleProjectInfo.isBuildWithGradle + + + + + +structure.services.GradleOperations.canHandle + +structure.services.GradleOperations.canHandle + + + +structure.services.GradleOperations.canHandle->project.GradleProjectInfo.isBuildWithGradle + + + + + +com.android.tools.idea.navigator.nodes.AndroidViewProjectNode.getChildren + +com.android.tools.idea.navigator.nodes.AndroidViewProjectNode.getChildren + + + +com.android.tools.idea.navigator.nodes.AndroidViewProjectNode.getChildren->project.GradleProjectInfo.isBuildWithGradle + + + + + +com.android.tools.idea.run.editor.TestRunParameters.TestRunParameters + +com.android.tools.idea.run.editor.TestRunParameters.TestRunParameters + + + +com.android.tools.idea.run.editor.TestRunParameters.TestRunParameters->project.GradleProjectInfo.isBuildWithGradle + + + + + +com.android.tools.idea.testartifacts.scopes.AndroidJunitPatcher.patchJavaParameters + +com.android.tools.idea.testartifacts.scopes.AndroidJunitPatcher.patchJavaParameters + + + +com.android.tools.idea.testartifacts.scopes.AndroidJunitPatcher.patchJavaParameters->project.GradleProjectInfo.isBuildWithGradle + + + + + +org.jetbrains.android.actions.GenerateSignedApkAction.update + +org.jetbrains.android.actions.GenerateSignedApkAction.update + + + +org.jetbrains.android.actions.GenerateSignedApkAction.update->project.GradleProjectInfo.isBuildWithGradle + + + + + +org.jetbrains.android.facet.AndroidFrameworkDetector.detect + +org.jetbrains.android.facet.AndroidFrameworkDetector.detect + + + +org.jetbrains.android.facet.AndroidFrameworkDetector.detect->project.GradleProjectInfo.isBuildWithGradle + + + + + diff --git a/static/.gitignore b/static/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c09f003d82a9760a1231674f1b14a47a6efb1b96 --- /dev/null +++ b/static/.gitignore @@ -0,0 +1,2 @@ +disk.tree.json +visual.json diff --git a/static/code-city.html b/static/code-city.html new file mode 100644 index 0000000000000000000000000000000000000000..b274aa0f0b418ecf67d9f075a94a26ea9be633eb --- /dev/null +++ b/static/code-city.html @@ -0,0 +1,293 @@ + + + + + Coca Code City + + + + + + +
+ + + \ No newline at end of file diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000000000000000000000000000000000000..34797a71303d0964b5555c676a2ba4349250f9d7 --- /dev/null +++ b/static/index.html @@ -0,0 +1,203 @@ + + + + + Coca Code City + + + + + +
+ + + \ No newline at end of file