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: 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. |
0 commit comments