summaryrefslogtreecommitdiffstats
path: root/yql/essentials/parser/common
Commit message (Collapse)AuthorAgeFilesLines
* YQL-20095: Apply lost Clang Tidy fixesvitya-smirnov2026-03-052-4/+8
| | | | | | | I do not known why, but these Clang Tidy fixes was lost. Maybe this is because of conditional preprocessing. Maybe Clang Tidy is ran only on changed sources. commit_hash:718e5487699b21b643ed90729ce8347c84cbd6ee
* YQL-20095: Enable google-explicit-constructorvitya-smirnov2026-01-231-1/+1
| | | | commit_hash:4d77ad10fd4db303459ec4e45e139967c7fc8196
* YQL-20095: Enable modernize-use-overridevitya-smirnov2026-01-132-2/+2
| | | | | | | | | | | | | | | | | | | The check `modernize-use-override` is useful as it: 1. Removes redundant `override` when it is used with a `final`. 2. Removes redundant `virtual` or replace it with a `override`. So it is more clean for a reader, that overriding happens. It is enabled not out of order, as it is just an alias to `cppcoreguidelines-explicit-virtual-functions`. I also decided to switch a strategy of enabling checks. Now I will enable only a single rule with a single PR and prefer rules with a non-breaking autofix. In the new year with new linter checks! 🎄 commit_hash:e6e233baa90b31e5f65e11837546690c47f71ab5
* YQL-20086 invert flagvvvv2025-10-102-4/+0
| | | | commit_hash:a6b640bc576263b62884a0b4187ba79c893e13d9
* YQL-20086 parservvvv2025-10-088-189/+193
| | | | commit_hash:dd605e5cde39ff07fdadf62f0c2364a8b12c8405
* YQL-20116: Introduce ANTLR4 ambiguity detectionvitya-smirnov2025-10-066-36/+109
| | | | | | - Ignored 2 known ambiguities. - Tested tools. commit_hash:9e29bb2f876dabc68293b3e5c26a470d373506ae
* YQL-20086 parser (w/o pg)vvvv2025-06-204-15/+15
| | | | commit_hash:f4bddb30981abde1a951149fff272d86a22dd726
* YQL-19747 Detect a token at the caret positionvityaman2025-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I tried to implement a folder and object names completion at `ID_QUOTED` I faced with a problem, that I actually can't detect, that cursor is at `ID_QUOTED` token because `TCompletionInput::Text` it was cut until the `TCompletionInput::CursorPosition`, therefore at input ``` SELECT * FROM `#` ``` prefix was ``` SELECT * FROM `# ``` and then lexer failed. While we actually want tokenize the whole current statement, `C3` still needs to receive a prefix as input. I tried to tokenize the whole statement and then on input `SELECT Optional<#>` got nothing because `<>` is solid token in the `SQL`. The only way to fix it I found is to cut a query to prefix until the cursor position. BTW, current implementation is not so efficient as we tokenize the input multiple times. Especially `SplitQueryToStatemnts` seems heavy. In future we anyway will parse the whole input so will need to design APIs to receive ready token streams to do statements splitting, for example, just not to do the work twice. ![image](https://github.com/user-attachments/assets/114804d3-f311-4a46-be84-8ed4650bc9dd) So I introduce you the following changes - [x] Select the whole current statement, not just prefix. - [x] Find the token at caret and output no candidates when caret is at `STRING_VALUE`, `DIGIGTS` and so on. - [x] Change `C3` wrapper interface to take `TCompletionInput` to hide an implementation detail that it runs on cut prefix. - [x] `#` annotated queries in unit tests. - [x] Detect `CaretTokenPosition` -- if is it enclosed with a token or between two. - [x] Ensure that `maxErrors` in `ILexer::Tokenize` is positive. Just a tiny bugfix. --- - Related to https://github.com/ytsaurus/ytsaurus/pull/1209 - Related to https://github.com/ydb-platform/ydb/issues/9056 - Related to https://github.com/vityaman/ydb/issues/14 --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1225 commit_hash:a434b9888ec8a7356247d63d9f1420e256ae4fca
* Intermediate changesrobot-piglet2025-04-071-0/+4
| | | | commit_hash:6768768ea3a3962231d3fabdffb2ce0db44e9347
* YQL-19616 Implement ILexer via antlr_astVictor Smirnov2025-03-198-0/+246
- [x] Added `antlr_ast/antlr4` module and moved `TLexerTokensCollector4` there from `proto_ast/antlr4`. - [x] Moved stuff around back and forth. Ready for a review. --- Co-authored-by: vityaman [[email protected]] Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1128 commit_hash:e08785c3408ef813505bdc7511560e9536f4ab79