<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Boris Barbulovski</title>
    <description>The latest articles on DEV Community by Boris Barbulovski (@boris_barbulovski).</description>
    <link>https://dev.to/boris_barbulovski</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4014122%2F802c68c3-782f-443a-bc62-ac0a9c6ebcc2.jpg</url>
      <title>DEV Community: Boris Barbulovski</title>
      <link>https://dev.to/boris_barbulovski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/boris_barbulovski"/>
    <language>en</language>
    <item>
      <title>Textparser – High-performance C parsing engine using Python-compiled grammars</title>
      <dc:creator>Boris Barbulovski</dc:creator>
      <pubDate>Fri, 03 Jul 2026 21:20:35 +0000</pubDate>
      <link>https://dev.to/boris_barbulovski/textparser-high-performance-c-parsing-engine-using-python-compiled-grammars-5e4k</link>
      <guid>https://dev.to/boris_barbulovski/textparser-high-performance-c-parsing-engine-using-python-compiled-grammars-5e4k</guid>
      <description>&lt;p&gt;Hi everyone,&lt;br&gt;
I want to share textparser, a high-performance, lightweight text parsing and AST generation library written in pure C.&lt;/p&gt;

&lt;p&gt;💡 The Core Idea &amp;amp; Why It's DifferentTraditional parser generators (like Flex/Bison) come with a steep learning curve and rigid code generation. On the other end, hand-writing recursive descent parsers or state machines becomes an unmaintainable mess as your language grows.textparser bridges this gap using a hybrid JSON + Python + C workflow:You define your tokens, syntax patterns, and color styles in a clean, human-readable JSON grammar file.&lt;br&gt;
A lightweight Python compiler tool processes the JSON, runs optimizations, and emits a dense, static C header array.The C runtime engine loads these pre-compiled arrays instantly. It processes raw text strings into an abstract token tree (textparser_token_item) using a highly optimized regular expression engine (crpe2).By offloading the grammar overhead and heavy state-machine parsing logic to the Python build step, the actual runtime C library stays incredibly lean, memory-efficient, and fast.&lt;/p&gt;

&lt;p&gt;🚀 Features At A Glance30+ Languages Out-of-the-Box: Includes ready-to-use JSON grammars for C, C++, Rust, Python, JavaScript, HTML, SQL, and dozens more.Rich Token Metadata: Every parsed token tracks exact code coordinates, structural flags, and custom syntax styling options.Zero Bloat: Ideal for terminal text editors, syntax highlighters, custom linters, and lightweight static analysis tools where bringing in a massive compiler front-end is overkill.&lt;/p&gt;

</description>
      <category>c</category>
      <category>parser</category>
      <category>json</category>
    </item>
  </channel>
</rss>
