mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.2K
active users

#parser

2 posts1 participant0 posts today
Jason Weatherly<p>Okay, added a few more features and I'm really liking the results. I added the `-` operator for `dice_groups` which was a bit more tricky than I thought it'd be. I also added the ability to roll a dice group multiple times via a `x`|`*` operator. I removed the requirement that a dice group has to have a damage type associated with it since the only way you can roll something like `1d4-1` is in a dice group since there is a minimum value of 1 associated with it.</p><p>The code lives here: <a href="https://codeberg.org/JamesTheBard/dice-roller" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/JamesTheBard/dice</span><span class="invisible">-roller</span></a></p><p><a href="https://social.linux.pizza/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://social.linux.pizza/tags/lark" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lark</span></a> <a href="https://social.linux.pizza/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> <a href="https://social.linux.pizza/tags/ttrpg" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ttrpg</span></a> <a href="https://social.linux.pizza/tags/diceroller" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>diceroller</span></a> <a href="https://social.linux.pizza/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a></p>
Jason Weatherly<p>Okay, _now_ I'm done. Fixed a few parser errors and implemented a skew option (the `^` value) that will push the average value towards either 1 or the maximum of the dice. I like that once you get the parser up and running that it's easy to add stuff to it. I now am the official owner of a completely overkill dice running program.</p><p>For the example below, the skew is `2.0`. The random value is raised to the `1/skew` power before being multiplied by the number of sides of the die. If skew goes up, so do the results. If skew goes down, well, so do the results.</p><p>```<br>$ python main.py "^2 (2d6+2d8+12)[fire]+1d8[piercing]" | jq .<br>{<br> "results": {<br> "fire": 37,<br> "piercing": 7<br> }<br>}<br>```</p><p><a href="https://social.linux.pizza/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://social.linux.pizza/tags/statistics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>statistics</span></a> <a href="https://social.linux.pizza/tags/ttrpgs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ttrpgs</span></a> <a href="https://social.linux.pizza/tags/dice" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dice</span></a> <a href="https://social.linux.pizza/tags/lark" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lark</span></a> <a href="https://social.linux.pizza/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a></p>
claude<p>Before starting the big work of porting my experimental <a href="https://post.lurk.org/tags/LiveCoding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LiveCoding</span></a> <a href="https://post.lurk.org/tags/uzulang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>uzulang</span></a> <a href="https://post.lurk.org/tags/godwit" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>godwit</span></a> 's <a href="https://post.lurk.org/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> from <a href="https://post.lurk.org/tags/Alex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Alex</span></a> and <a href="https://post.lurk.org/tags/Happy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Happy</span></a> to <a href="https://post.lurk.org/tags/Parsec" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parsec</span></a>, I finally managed to get a snapshot working in <a href="https://post.lurk.org/tags/Termux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Termux</span></a> on my phone by making a tarball including the generated <a href="https://post.lurk.org/tags/Haskell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Haskell</span></a> files on a machine where Alex and Happy were available and transferring it over network.</p><p>This isn't ideal as I can't edit the parser on my phone (no Alex/Happy there; at least not recent enough versions, old ones got via cjacker's Hugs 2019 improvement), so I still want to switch to Parsec which is not so horribly <a href="https://post.lurk.org/tags/GHC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GHC</span></a> -only (Parsec has a version that works with <a href="https://post.lurk.org/tags/MicroHs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MicroHs</span></a> and probably <a href="https://post.lurk.org/tags/Hugs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Hugs</span></a> <a href="https://post.lurk.org/tags/HaskellHugs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HaskellHugs</span></a> too).</p><p>I put the snapshot at<br><a href="https://mathr.co.uk/web/godwit.html#Download" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mathr.co.uk/web/godwit.html#Do</span><span class="invisible">wnload</span></a> and meanwhile updated the bootstrap script as patching MicroHs isn't necessary any more.</p>
Jan :rust: :ferris:<p>mdq - by yshavit</p><p><a href="https://github.com/yshavit/mdq" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/yshavit/mdq</span><span class="invisible"></span></a></p><p>like <a href="https://floss.social/tags/jq" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>jq</span></a> but for <a href="https://floss.social/tags/Markdown" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Markdown</span></a>: find specific elements in an md doc</p><p>Also available as a crate:<br><a href="https://docs.rs/mdq/latest/mdq/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">docs.rs/mdq/latest/mdq/</span><span class="invisible"></span></a></p><p>Tagging <span class="h-card" translate="no"><a href="https://fosstodon.org/@wader" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>wader</span></a></span> 😉 </p><p><a href="https://floss.social/tags/CLI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CLI</span></a> <a href="https://floss.social/tags/Parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parser</span></a> <a href="https://floss.social/tags/Rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rust</span></a> <a href="https://floss.social/tags/RustLang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RustLang</span></a></p>
Henrik Jernevad<p>Any <a href="https://mastodon.social/tags/TOML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TOML</span></a> nerds? Would you say this is valid TOML? (I'm building a parser.)</p><p>```<br>inline = { array = [ 1,<br>2 ] }<br>```</p><p>The spec says "No newlines are allowed between the curly braces unless they are valid within a value."</p><p>This includes multi-line strings, but do you interpret it to permit newlines in an array? The array itself is technically a single value inside which newlines are valid. It is obviously not "in the spirit" of inline tables but the ABNF grammar allows it.</p><p><a href="https://mastodon.social/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <a href="https://mastodon.social/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a></p>
Hacker News<p>Optimizing a Math Expression Parser in Rust</p><p><a href="https://rpallas.xyz/math-parser/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">rpallas.xyz/math-parser/</span><span class="invisible"></span></a></p><p><a href="https://mastodon.social/tags/HackerNews" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HackerNews</span></a> <a href="https://mastodon.social/tags/Optimizing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Optimizing</span></a> <a href="https://mastodon.social/tags/Math" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Math</span></a> <a href="https://mastodon.social/tags/Expression" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Expression</span></a> <a href="https://mastodon.social/tags/Parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parser</span></a> <a href="https://mastodon.social/tags/Rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rust</span></a> <a href="https://mastodon.social/tags/Programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Programming</span></a> <a href="https://mastodon.social/tags/RustLang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RustLang</span></a> <a href="https://mastodon.social/tags/Coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Coding</span></a> <a href="https://mastodon.social/tags/Efficiency" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Efficiency</span></a></p>
Habr<p>QapGen: Создаём мощные парсеры на C++</p><p>QapDSLv2 — это язык который транслируется в обычный C++ код. Он позволяет удобно и компактно задавать грамматики/правила разбора кода программ, значительно упрощая разработку компиляторов/анализаторов/трансляторов. QapGen — это генератор дерева_лексеров /парсеров описанных на QapDSLv2. Сама грамматика QapDSLv2 описана на QapDSLv2 на 100%. Поэтому QapGen как основной читатель этой грамматики сам генерирует часть своего кода(весь парсер QapDSLv2). Основные фишки QapDSLv2 + QapGen — это: 1) Отсутствие этапа токенизации — дерево лексеров разбивает входной поток на лексемы и сохраняет их в строго типизированных древовидных С++ структурах пропуская этап токенизации. 2) Генерация оптимизированного кода полиморфных лексеров . 3) Полное сохранение всех лексем(даже разделители сохраняются, такие как пробелы/переходы на новую строку и комментарии) в результирующем дереве. 4) Возможность сохранить как оригинальное дерево , так и модифицированное обратно в код/текст без потери разделителей/комментариев . 5) Автоматическая генерация кода посетителей (это такой паттерн проектирования). А теперь пример самой сочной части(рекурсивно самоописывающийся код): struct t_target_struct:i_target_item{ struct t_keyword{ string kw=any_str_from_vec(split("struct,class",",")); " "? // optional separator }; struct t_body_semicolon:i_struct_impl{";"}; struct t_body_impl:i_struct_impl{ "{" // жрём скобочку vector&lt;TAutoPtr&lt;i_target_item&gt;&gt; nested?; // рекурсия! " "? vector&lt;TAutoPtr&lt;i_struct_field&gt;&gt; arr?; // парсим поля " "? TAutoPtr&lt;t_cpp_code&gt; c?; // остальной С++ код " "? "}" }; struct t_parent{ string a_or_c=any_str_from_vec(split("=&gt;,:",",")); " "? t_name name; }; //точка входа в парсер: TAutoPtr&lt;t_keyword&gt; kw?; //парсим struct/class t_name name; //парсим имя " "? TAutoPtr&lt;t_parent&gt; parent?; " "? TAutoPtr&lt;i_struct_impl&gt; body; };</p><p><a href="https://habr.com/ru/articles/925420/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/925420/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> <a href="https://zhub.link/tags/parsergenerator" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parsergenerator</span></a> <a href="https://zhub.link/tags/lexers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lexers</span></a> <a href="https://zhub.link/tags/c" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>c</span></a>++ <a href="https://zhub.link/tags/tree" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tree</span></a> <a href="https://zhub.link/tags/ast" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ast</span></a> <a href="https://zhub.link/tags/gamedev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>gamedev</span></a> <a href="https://zhub.link/tags/dsl" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dsl</span></a> <a href="https://zhub.link/tags/compiler" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>compiler</span></a></p>
Habr<p>Как создать свой парсер и AST-генератор на C++ с минимальными усилиями: знакомьтесь с QapDSLv2</p><p>QapDSLv2: Новый стандарт AST-heavy парсинга QapDSLv2 обеспечивает: Молниеносное построение AST Полное сохранение структуры исходного кода Простоту интерпретации и модификации грамматик Забудьте о любы других парсерах! С помощью QapDSLv2 можно создавать компиляторы/анализаторы/форматировщики кода за минуты/часы. // почти наглая лож Парсеры и генерация абстрактных синтаксических деревьев ( AST ) — это обычно долго, сложно и требует тонны шаблонного кода. Но что если я скажу, что теперь можно описывать грамматики и структуры данных одновременно и получать готовый, оптимизированный C++ код автоматически? QapDSLv2 — новый стандарт эффективности и удобства в парсинге . Это язык описания парсеров, который избавляет от синтаксического шума, упрощает интеграцию с C++ и позволяет создавать сложные анализаторы без боли и ошибок . Забудьте о бесконечных циклах отладки и непонятных генераторах — теперь всё просто, понятно и эффективно. В этой статье вы узнаете, как QapDSL v2 меняет правила игры в мире парсинга и компиляторов, увидите реальные примеры и поймёте, почему это важно для каждого, кто работает с языками программирования и обработкой текста . Готовы ускорить разработку и вывести свои проекты на новый уровень? QapGen — мощный генератор парсеров, построенный на основе QapDSLv2, который из грамматик QapDSLv2 сразу создаёт высокопроизводительный C++ парсер с типизированным AST , описанным прямо в грамматике. t_sep { string body = any (" \t\r\n"); } using " " as t_sep; t_value{ TAutoPtr&lt;i_value&gt; body; " "? } t_comma_value{ "," t_value body; " "? } t_array=&gt;i_value{ "[" " "? t_value first?; vector&lt;t_comma_value&gt; arr?; "]" " "? }</p><p><a href="https://habr.com/ru/articles/922128/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/922128/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/QapDSL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>QapDSL</span></a> <a href="https://zhub.link/tags/Lexers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Lexers</span></a> <a href="https://zhub.link/tags/AST" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AST</span></a> <a href="https://zhub.link/tags/Compilers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Compilers</span></a> <a href="https://zhub.link/tags/Parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parser</span></a> <a href="https://zhub.link/tags/parsergenerator" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parsergenerator</span></a> <a href="https://zhub.link/tags/Parsers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parsers</span></a> <a href="https://zhub.link/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a>++ <a href="https://zhub.link/tags/dsl" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dsl</span></a></p>
Dzokero<p><span class="h-card" translate="no"><a href="https://pol.social/@siwa" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>siwa</span></a></span> </p><p>Polska warcząca <br><a href="https://mastodon.social/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> </p><p>Sorki, ale mi się jakoś skojarzyło ;)</p>
Habr<p>Система аналитики и презентации данных с учётом ограничений системы F</p><p>Система аналитики и презентации данных — мой проект, который я выполнял в рамках курсовых работ во время обучения в институте. Описал основные шаги, идеи и поделился своими успехами.</p><p><a href="https://habr.com/ru/articles/916854/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/916854/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/%D0%B0%D0%BD%D0%B0%D0%BB%D0%B8%D1%82%D0%B8%D0%BA%D0%B0" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>аналитика</span></a> <a href="https://zhub.link/tags/%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>разработка</span></a> <a href="https://zhub.link/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://zhub.link/tags/streamlit" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>streamlit</span></a> <a href="https://zhub.link/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a></p>
Jan :rust: :ferris:<p>In which I have Opinions about parsing and grammars - by Simon Tatham</p><p><a href="https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/parsing/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">chiark.greenend.org.uk/~sgtath</span><span class="invisible">am/quasiblog/parsing/</span></a></p><p><a href="https://floss.social/tags/ProgrammingLanguage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ProgrammingLanguage</span></a> <a href="https://floss.social/tags/PLT" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PLT</span></a> <a href="https://floss.social/tags/Parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parser</span></a> <a href="https://floss.social/tags/Parsing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parsing</span></a> <a href="https://floss.social/tags/Grammar" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Grammar</span></a></p>
Abhinav 🌏<p>The tiny but complete <a href="https://fantastic.earth/tags/JSON" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>JSON</span></a> <a href="https://fantastic.earth/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> that I wrote in <a href="https://fantastic.earth/tags/Haskell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Haskell</span></a> years ago is now featured in the 200-and-change collection of programs by <span class="h-card" translate="no"><a href="https://hachyderm.io/@dubroy" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>dubroy</span></a></span>: <a href="https://pdubroy.github.io/200andchange" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">pdubroy.github.io/200andchange</span><span class="invisible"></span></a></p><p><a href="https://fantastic.earth/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a></p>
sumanthvepa<p>Had an enjoyable afternoon building a custom <a href="https://mastodon.social/tags/cli" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cli</span></a> <a href="https://mastodon.social/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> to replace <a href="https://mastodon.social/tags/argparse" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>argparse</span></a> in our internal tooling. I like its ease of use. But it is a custom parser and works only for my specific use case, but for use case it does more than argparse can and is simpler to use. <a href="https://mastodon.social/tags/comandline" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>comandline</span></a> <a href="https://mastodon.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Inautilo<p><a href="https://mastodon.social/tags/Development" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Development</span></a> <a href="https://mastodon.social/tags/Launches" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Launches</span></a><br>ESLint can now lint HTML · The code linter delivers a new language plugin <a href="https://ilo.im/163v4b" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">ilo.im/163v4b</span><span class="invisible"></span></a></p><p>_____<br><a href="https://mastodon.social/tags/ESLint" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ESLint</span></a> <a href="https://mastodon.social/tags/OpenSource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenSource</span></a> <a href="https://mastodon.social/tags/Coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Coding</span></a> <a href="https://mastodon.social/tags/Linter" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linter</span></a> <a href="https://mastodon.social/tags/Parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parser</span></a> <a href="https://mastodon.social/tags/HTML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.social/tags/Npm" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Npm</span></a> <a href="https://mastodon.social/tags/WebDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WebDev</span></a> <a href="https://mastodon.social/tags/Frontend" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Frontend</span></a></p>
golangTree-Sitter: From Code to Syntax-Tree I’m Shailendra, and in this article, I’m going to talk ...<br><br><a href="https://dev.to/shailendra_kumargupta_bd/tree-sitter-from-code-to-syntax-tree-45op" rel="nofollow noopener" target="_blank">https://dev.to/shailendra_kumargupta_bd/tree-sitter-from-code-to-syntax-tree-45op</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/treesitter" target="_blank">#treesitter</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/go" target="_blank">#go</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/syntaxtree" target="_blank">#syntaxtree</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/parser" target="_blank">#parser</a><br><br><a href="https://awakari.com/pub-msg.html?id=51pshLx0gZ9JKbLhmISr9SYbmjY&amp;interestId=golang" rel="nofollow noopener" target="_blank">Result Details</a>
HoldMyType<p>P : yml -&gt; nix &amp; yml -&gt; python<br>T : yml -&gt; python<br><a href="https://mathstodon.xyz/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a></p>
GNU/Linux.ch<p>PDF parsen</p><p>Manchmal muss man PDF-Dateien auslesen. Dieser Artikel zeigt, wie man das mit einem Python-Skript macht. </p><p><a href="https://social.anoxinon.de/tags/PDF" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PDF</span></a> <a href="https://social.anoxinon.de/tags/Parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parser</span></a> <a href="https://social.anoxinon.de/tags/parsen" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parsen</span></a> <a href="https://social.anoxinon.de/tags/Auslesen" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Auslesen</span></a> <a href="https://social.anoxinon.de/tags/pypdf" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pypdf</span></a> <a href="https://social.anoxinon.de/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a></p><p><a href="https://gnulinux.ch/pdf-parsen" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">gnulinux.ch/pdf-parsen</span><span class="invisible"></span></a></p>
Hacker News<p>Parcom: CL Parser Combinators</p><p><a href="https://github.com/fosskers/parcom" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/fosskers/parcom</span><span class="invisible"></span></a></p><p><a href="https://mastodon.social/tags/HackerNews" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HackerNews</span></a> <a href="https://mastodon.social/tags/Parcom" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parcom</span></a> <a href="https://mastodon.social/tags/CL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CL</span></a> <a href="https://mastodon.social/tags/Parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Parser</span></a> <a href="https://mastodon.social/tags/Combinators" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Combinators</span></a> <a href="https://mastodon.social/tags/HackerNews" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HackerNews</span></a> <a href="https://mastodon.social/tags/Programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Programming</span></a> <a href="https://mastodon.social/tags/Languages" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Languages</span></a> <a href="https://mastodon.social/tags/GitHub" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GitHub</span></a></p>
Xavier<p>I finally got around to wrapping up and publishing a first version of my <a href="https://sunny.garden/tags/Rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rust</span></a> crate ts-typed-ast. It's a crate inspired by Rowan that automatically generates a typed AST from a tree-sitter grammar. You can find it here: <a href="https://crates.io/crates/ts-typed-ast" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">crates.io/crates/ts-typed-ast</span><span class="invisible"></span></a></p><p>It works similarly to Rowan and Swift's libsyntax. tree-sitter provides the green nodes, while this crate generates the red nodes.</p><p>I've used it a few times already, to prototype various toy programming languages. You write a grammar in tree-sitter, and then either evaluate the ts-typed-ast tree directly, or convert it to some other IR.</p><p>Using tree-sitter as the parser generator for a toy project is pretty nice. You get a powerful, declarative way to create a parser, and at the same time you benefit from the whole tree-sitter ecosystem. Things like incremental parsing, syntax highlighting, structural editing, and formatting with Topiary.</p><p>Main downside is that tree-sitter does not (yet) offer good error reporting and recovery, so when parsing fails it's often in dramatic, unhelpful ways. Not a big issue for experimenting, which is what this crate is for. Production-ready languages probably need bespoke parsers anyway.</p><p><a href="https://sunny.garden/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> <a href="https://sunny.garden/tags/treesitter" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>treesitter</span></a> <a href="https://sunny.garden/tags/pl" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pl</span></a> <a href="https://sunny.garden/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a></p>
Hacker News<p>A high-throughput parser for the Zig programming language</p><p><a href="https://github.com/Validark/Accelerated-Zig-Parser" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Validark/Accelerate</span><span class="invisible">d-Zig-Parser</span></a></p><p><a href="https://mastodon.social/tags/HackerNews" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HackerNews</span></a> <a href="https://mastodon.social/tags/highthroughput" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>highthroughput</span></a> <a href="https://mastodon.social/tags/parser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>parser</span></a> <a href="https://mastodon.social/tags/Zig" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Zig</span></a> <a href="https://mastodon.social/tags/programminglanguage" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programminglanguage</span></a> <a href="https://mastodon.social/tags/GitHub" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GitHub</span></a> <a href="https://mastodon.social/tags/Validark" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Validark</span></a></p>