Commit 3859fde
refactor(postgresql): remove non-standard builtin_function_name tokens
Align with PostgreSQL's official grammar and ANTLR community standard by
removing built-in function name tokens from the lexer. These function names
(exp, div, floor, mod, power, sqrt, log, etc.) are now properly treated as
regular identifiers, matching PostgreSQL's behavior.
Changes:
- Remove ~475 built-in function tokens from PostgreSQLLexer.g4
(ABS, CBRT, CEIL, EXP, DIV, FLOOR, MOD, POWER, SQRT, etc.)
- Remove builtin_function_name parser rule from PostgreSQLParser.g4
- Update parser rules: param_name, func_type, generictype, func_name
- Add LOG to plsql_unreserved_keyword (was missing, caused test failures)
- Add .vscode/ to .gitignore
Benefits:
- Matches PostgreSQL's official grammar behavior
- Aligns with ANTLR grammars-v4 community standard
- Simpler, more maintainable grammar
- Function names can naturally be used as identifiers
Test Results:
- All target tests pass: exp, div, floor, mod, power, sqrt, log
- No new regressions in full test suite
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent c6b602f commit 3859fde
File tree
10 files changed
+16630
-19020
lines changed- postgresql
10 files changed
+16630
-19020
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments