You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,22 @@
2
2
3
3
All notable changes to the **Bison/Flex Language Support** extension will be documented in this file.
4
4
5
+
## [1.5.1] - 2026-04-02
6
+
7
+
### Fixed
8
+
9
+
-**Flex — escaped quotes in quoted string patterns** (#30): patterns like `X"\'"` and `Y"\""` no longer trigger false `flex/invalid-pattern` errors. The validator now correctly handles `\"` and `\'` escape sequences inside Flex quoted strings.
10
+
-**Flex — abbreviation refs on rule lines with no inline action** (#31): `{ABBR}` used after a `^` BOL anchor or on a rule line whose action block appears on the following line was not recorded as an abbreviation reference, causing false `flex/unused-abbrev` warnings.
11
+
-**Flex — quoted strings with spaces in `rawPattern`** (audit-A): patterns like `"hello world"` were truncated at the space inside the quoted literal, causing false `flex/unreachable-rule` duplicates for distinct patterns sharing a common word prefix. `rawPattern()` now tracks quoted-string depth.
12
+
-**Flex — standalone `{` as multi-line action opener** (audit-B): a `{` appearing alone on the line after a rule pattern (valid Flex multi-line action syntax) was pushed as a spurious rule entry with pattern `{`, producing false `flex/unreachable-rule` diagnostics for every subsequent multi-line-action rule.
13
+
-**Flex — lowercase start condition names** (audit-C): all start-condition regex patterns used `[A-Z_][A-Z0-9_]*` (uppercase only). SC names that are valid C identifiers but lowercase (e.g. `%x comment`) were silently ignored, skipping `flex/undefined-sc` and `flex/unused-sc` diagnostics for them entirely.
14
+
-**Flex — single-tab action separator in abbreviation ref scan** (audit-D): the heuristic that separates the pattern from the action used `\s{2,}`, which did not match a single-tab separator. `{identifier}` tokens inside the C action body (e.g. compound literals) were falsely counted as abbreviation references, suppressing `flex/unused-abbrev`.
15
+
-**Cleanup**: removed two dead entries in the catch-all pattern set that contained a literal newline character and could never match a rule line.
16
+
-**Bison — lowercase/mixed-case tokens in precedence declarations** (audit-E): `%left`/`%right`/`%nonassoc` used an uppercase-only regex `[A-Z_][A-Z0-9_]*`, silently dropping tokens like `kPLUS` or `tTOKEN` from the precedence table. This caused false `bison/undeclared-token` warnings and incorrect shift/reduce heuristic results for such tokens.
17
+
-**Bison — `$N` references after nested sub-blocks in inline actions** (audit-F): the `extractDollarRefs` scanner used `/\{([^}]*)\}/` which stops at the first `}`, missing `$N` references that appear after a nested `{ … }` block inside the same action (e.g. `{ if (cond) { log(); } $$ = $5; }`). Replaced with a brace-depth scanner; the same fix was applied to `extractSymbols`, `getFirstSymbol`, and `extractRuleReferences` for consistency.
18
+
19
+
---
20
+
5
21
## [1.5.0] - 2026-04-01
6
22
7
23
### Added
@@ -11,7 +27,7 @@ All notable changes to the **Bison/Flex Language Support** extension will be doc
11
27
-**`Bison/Flex: Show in Generated File`** — from a `.y` / `.l` source, locates the generated file (using `bisonFlex.buildDirectory` setting, CMake detection, Makefile detection, same-directory fallback, then workspace-wide search) and navigates to the matching line. A QuickPick is shown when multiple candidates are found.
12
28
- New setting `bisonFlex.buildDirectory`: optional path to the build output directory, used by **Show in Generated File** to locate generated files when they are not in the same directory as the source.
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,44 @@ Real-time error detection as you type:
39
39
| Shift/reduce conflict heuristic ||
40
40
| Unknown/invalid directive ||
41
41
42
+
Every diagnostic carries a **source** field (`bison` / `flex`), a **code slug** (e.g. `bison/unused-token`), and where available a **link** to the GNU documentation — rendered as a clickable `[bison/unused-token]` link in the Problems panel. Unused symbols are rendered greyed-out via `DiagnosticTag.Unnecessary`.
43
+
44
+
### Fix-it Hints (Quick Fixes)
45
+
46
+
22 code actions available via the lightbulb (`Ctrl+.`) or directly from the Problems panel:
- Declare `%x SC_NAME` for undefined start condition
67
+
- Remove unused `%option`
68
+
- Remove duplicate `<<EOF>>` rule
69
+
- Add `%option noyywrap`
70
+
- Close unclosed `%{` block
71
+
- Remove inaccessible rule
72
+
73
+
### Source ↔ Generated File Navigation
74
+
75
+
Jump between Bison/Flex grammar sources and their generated C files using `#line` directives:
76
+
77
+
-**Bison/Flex: Show in Source** — from a generated `.tab.c` / `lex.yy.c` file, reads the nearest `#line N "file.y"` directive above the cursor and opens the grammar source at the correct line. Appears in the context menu only when a generated file is detected.
78
+
-**Bison/Flex: Show in Generated File** — from a `.y` / `.l` source, locates the generated file and navigates to the matching line. Searches `bisonFlex.buildDirectory`, then CMake/Makefile detection, then the same directory, then a workspace-wide scan. A QuickPick is shown when multiple candidates are found.
79
+
42
80
### Autocompletion
43
81
44
82
Context-aware suggestions triggered as you type:
@@ -185,6 +223,10 @@ Then press `F5` in VS Code to launch the Extension Development Host.
185
223
|`bisonFlex.showInlayHints`|`boolean`|`true`| Show inline type hints for `$$`/`$1`/`@$` semantic values |
186
224
|`bisonFlex.enableCodeLens`|`boolean`|`true`| Show reference counts and entry-point badges above rules |
187
225
|`bisonFlex.enableCmakeDiagnostics`|`boolean`|`true`| Warn when a `.y`/`.l` file is not referenced in `CMakeLists.txt`|
226
+
|`bisonFlex.minVersionBison`|`string`|`""`| Suppress checks that require a newer Bison version (e.g. `"3.0"`). Fires `bison/feature-requires-version` when a `%define` feature exceeds this version. |
227
+
|`bisonFlex.minVersionFlex`|`string`|`""`| Same as above for Flex. |
|`bisonFlex.buildDirectory`|`string`|`""`| Path to the build output directory. Used by **Show in Generated File** to locate `.tab.c` / `lex.yy.c` when they are not next to the source. |
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"name": "bison-flex-lang",
3
3
"displayName": "Bison/Flex Language Support",
4
4
"description": "Full-featured language support for GNU Bison (.y, .yy) and Flex/RE-flex (.l, .ll) — syntax highlighting with embedded C/C++, real-time diagnostics, intelligent autocompletion, and hover documentation for all directives.",
0 commit comments