Skip to content

Releases: theodevelop/bison-flex-lang

v.1.5.3

20 Apr 20:43
3ffa7fa

Choose a tag to compare

🩹 Bison/Flex Language Support v1.5.3

Patch release — bug fixes and improvements to #line-based navigation.


🐛 Bug Fixes

  • Show in Source#line directives without quoted filenames (e.g. #line 42 parser.y) are now handled correctly, and the editor opens at the exact grammar line. (#44)
  • Show in Generated File${workspaceFolder} in bisonFlex.buildDirectory now resolves to the workspace folder that contains the source file. In multi-root workspaces, each source file resolves independently — one setting works across all roots. (#27)

🔧 Improvements

  • Show in Generated File — a dedicated Bison/Flex Navigation output channel now logs every directory and file path searched. It opens automatically when a search starts, making buildDirectory misconfigurations easy to diagnose. (#27)
  • Show in Generated File — automake-style generated file names (parser_tab.c, lex._.c, .cc/.cpp variants) are now recognized. Contributed by @GitMensch. (#45)

📖 Documentation

  • bisonFlex.buildDirectory is now documented in the README with supported formats (${workspaceFolder}, relative paths, absolute paths) and multi-root workspace behaviour. (#27)

⬆️ How to Update

The extension updates automatically via VS Code.
Manual install: search "Bison/Flex Language Support" in the Extensions panel (Ctrl+Shift+X).


📦 Assets

File Description
bison-flex-lang-1.5.3.vsix Manual install package

Full changelog: CHANGELOG.md

What's Changed

  • fix: correct Show in Source navigation (#line offset + unquoted filenames) by @theodevelop in #44
  • chore: consolidate CI workflows and add full test suite by @theodevelop in #47
  • lookup for generated files: support file names used by automake by @GitMensch in #45
  • feat: add Bison/Flex Navigation output channel for Show in Generated by @theodevelop in #48
  • Release v1.5.3 by @theodevelop in #49

New Contributors

Full Changelog: v1.5.2...v1.5.3

v1.5.2

05 Apr 17:19
8787f56

Choose a tag to compare

What's new in v1.5.2

✨ New

  • Code Lens for Flex abbreviations (#39) — abbreviation definitions now show a clickable "N references" lens, consistent with start conditions and Bison rules.

🐛 Fixed

  • SC refs in multi-line block headers (#38) — <SC_A,\nSC_B,\nSC_C>{ syntax now correctly counts references for all listed SCs, not just the last one.
  • Abbreviation refs on indented rule lines (#38) — {ABBR} inside indented <SC>{ } blocks is now properly counted as an abbreviation reference.
  • Transitive abbreviation references (#38) — abbreviations used only inside another abbreviation's definition (e.g. ALNUM {ALNUM_Q}|{ALNUM_A}) are no longer flagged as unused.
  • False flex/unreachable-rule for complex patterns (#38) — patterns like [A-Z]+(\.[A-Z]+)+ (which require a literal dot) no longer trigger shadowing warnings for keyword rules that follow them.

Full Changelog: v1.5.1...v1.5.2

What's Changed

  • fix: SC refs in multi-line headers, abbrev refs on indented lines, transitive refs, isWordPattern (#38) by @theodevelop in #41
  • feat: add Code Lens "N references" for Flex abbreviations (closes #39) by @theodevelop in #42
  • chore: release v1.5.2 by @theodevelop in #43

Full Changelog: v1.5.1...v1.5.2

v1.5.1

02 Apr 22:14
ebf39e7

Choose a tag to compare

What's Changed

Full Changelog: v1.4.1...v1.5.1

What's Changed

Full Changelog: v1.4.1...v1.5.1

v1.5.0

01 Apr 14:54
e0c6aa4

Choose a tag to compare

What's Changed

Full Changelog: v1.4.0...v1.5.0

What's Changed

Full Changelog: v1.4.0...v1.5.0

v1.4.1

31 Mar 21:45
e0c6aa4

Choose a tag to compare

Bug fixes

#21 — Mid-rule action blocks counted as $N symbols (Bison)

Action blocks { } embedded in the middle of a production are now counted as grammar symbols in Bison's $N numbering. Previously they were silently stripped, causing false-positive bison/out-of-bounds errors and missed real out-of-bounds accesses.

#22%token NAME NUMBER "alias" parsing (Bison)

%token declarations with both a numeric value and a string alias are now parsed in the correct order. Previously, words inside the alias string were misidentified as token names, generating spurious bison/undeclared-token and bison/unused-token diagnostics.

#23<SC>{ } block syntax (Flex)

Rules grouped inside a <SC1,SC2>{ ... } block now correctly inherit their start conditions. Previously the block header was misidentified as a rule pattern, generating false flex/unreachable-rule and flex/unused-sc diagnostics.

Assets

  • bison-flex-language-support-1.4.1.vsix — install manually via Extensions: Install from VSIX…
  • Available on VS Code Marketplace and Open VSX

What's Changed

Full Changelog: v1.4.0...v1.4.1

v1.4.0

29 Mar 23:08

Choose a tag to compare

What's new in 1.4.0

✨ Fix-it hints (22 quick fixes)

Lightbulb / Ctrl+. on any diagnostic now offers an automatic correction for the majority of Bison and Flex errors and warnings:

  • Bison: insert %%, declare %token, insert %empty, remove unused token/rule/directive, add rule stub, add %type <todo>, remove invalid %start, add %start, close %{ block, and 4 yacc-compat replacements (%error-verbose, %name-prefix, %pure-parser, %binary)
  • Flex: insert %%, define abbreviation stub, remove unused abbreviation/start condition/directive, declare %x SC_NAME, remove unused %option, remove duplicate <<EOF>>, add %option noyywrap, close %{ block, remove inaccessible rule

✨ Version-gated diagnostics

Three new settings to match your target toolchain:

  • bisonFlex.minVersionBison — e.g. "2.3" suppresses checks requiring Bison 3.x
  • bisonFlex.minVersionFlex — same for Flex
  • bisonFlex.disabledChecks — e.g. ["bison/shift-reduce", "flex/missing-yywrap"]

✨ Diagnostic codes & links

Every diagnostic now shows a clickable code (e.g. bison/unused-token) that opens the relevant GNU documentation page directly in your browser.

✨ Greyed-out unused symbols

Unused tokens, rules, start conditions, and abbreviations are now visually faded in the editor (DiagnosticTag.Unnecessary).

🐛 Fixed

  • Unused token grey underline started mid-token instead of at the first character (column offset bug in parseTokenNames)

⚙️ CI

  • Pipeline now runs on dev branch as well as main
  • VSIX artifact uploaded on every CI run (30-day retention)

Full changelog: CHANGELOG.md

v1.1.3

24 Mar 21:48
3d73a88

Choose a tag to compare

What's changed

Fixed

  • Bison — comments in rules: Tokens inside /* */ block comments (including multi-line) and // line comments are no longer falsely reported as undeclared
  • Bison — token names: Token names containing lowercase letters or digits (e.g. STANDARD_202x) are now correctly parsed — previously the regex stopped at the first non-uppercase character, producing false positives
  • Bison — identifiers in action blocks: Identifiers inside { } action blocks are no longer scanned for undeclared tokens

Full changelog: v1.1.2...v1.1.3

What's Changed

  • fix: support lowercase and digits in token names by @theodevelop in #12
  • fix: ignore comments and action blocks when parsing rule symbols by @theodevelop in #13
  • fix: token parsing robustness — lowercase names and comment stripping by @theodevelop in #14

Full Changelog: v1.1.2...v1.1.3

v1.1.2

22 Mar 23:57

Choose a tag to compare

What's Changed

Full Changelog: v1.1.1...v1.1.2

v1.1.1

19 Mar 19:29
4aaa465

Choose a tag to compare

What's Changed

Full Changelog: v1.1.0...v1.1.1

v1.1.0

18 Mar 22:06
5d79301

Choose a tag to compare

[1.1.0] - 2026-03-18

Added

  • Document Symbols — Outline view (Ctrl+Shift+O) with collapsible sections for declarations, rules, and epilogue (Bison) or definitions, rules, and user code (Flex)
  • Workspace Symbols — Fuzzy symbol search (Ctrl+T) across all open Bison and Flex files (up to 200 results)
  • Code Lens — "N reference(s)" above each Bison rule and Flex start condition; "⬪ entry point" badge above the start symbol
  • Inlay Hints — Inline type annotations for $$, $1, $2, etc. derived from %type/%token declarations
  • CMake Integration
    • Diagnostic warning when a .y/.l file is not referenced in a nearby BISON_TARGET/FLEX_TARGET
    • New command Bison/Flex: Add CMake Target — appends the correct BISON_TARGET or FLEX_TARGET snippet to CMakeLists.txt
  • Compile Commands
    • Bison: Compile — runs bison -d on the current file and surfaces errors as VS Code diagnostics
    • Flex: Compile — runs flex on the current file and surfaces errors as VS Code diagnostics
  • Grammar Tools
    • Bison: Show Parse Table — renders the .output parse table in a side panel
    • Bison: Show Grammar Graph — interactive D3.js force-directed graph; click a node to navigate to the rule; detects left/right recursion
    • Bison: Explain Conflict — detailed shift/reduce conflict analysis with fix suggestions and precedence recommendations
    • Bison: Generate AST Skeleton — generates a complete C++ AST with visitor pattern, forward declarations, and node classes
    • Flex: Test Rule — interactive regex tester for the pattern on the current line
  • Initialize tasks.json — auto-generates .vscode/tasks.json with Bison/Flex problem matchers; auto-detects CMake and Makefile projects
  • Yacc Legacy Hints — inlay hints for legacy %pure_parser, %union, and YYSTYPE patterns pointing to modern Bison equivalents
  • Smart IndentonEnterRules for Bison and Flex that indent correctly after rule openers and %{/%}

Changed

  • README updated with all new features, configuration settings, and screenshots
  • Status bar shows a "Grammar Graph" shortcut button when a Bison file is active

Configuration

Three new settings:

Setting Default Description
bisonFlex.showInlayHints true Show inlay hints for $$/$1/@$ semantic values
bisonFlex.enableCodeLens true Show Code Lens reference counts and entry-point badges
bisonFlex.enableCmakeDiagnostics true Warn when a .y/.l file is missing from CMakeLists.txt

What's Changed

  • Add grammar tools, CMake integration & UI enhancements by @theodevelop in #2

Full Changelog: v1.0.0...v1.1.0