ECMAScript 5 parser, by Peter van der Zee

In which I have Opinions about parsing and grammars

Guido van Rossum, creator of #Python, also writes high-quality prose for programming enthusiasts.

I started reading his posts about #PEG #parsing, saw they were on Medium, and got annoyed by the paywall.

Thanks to Guido’s generous CC licensing, I’m republishing them on my blog:

https://ramalho.org/posts/peg-series/

PEG Parsing Series Overview | Blog do Ramalho.org

Guido van Rossum, criador do #Python, também escreve prosa de altíssima qualidade para quem curte programação.

Comecei a ler seus posts sobre análise sintática PEG (#PEG #parsing), vi que tavam no Medium, o paywall me irritou, então estou republicando no meu blog:

https://ramalho.org/posts/peg-series/

PEG Parsing Series Overview | Blog do Ramalho.org

I'm trying to write a formatter for a custom scripting language and left recrusion is really getting on my nerves. I'm using python's parsy library and I can't really solve how to parse the following example without causing the left recursion.

cells[col][row].clear(true);

#parsing #python #parsy #parser

Herb: Powerful and seamless HTML-aware ERB parsing and tooling

https://herb-tools.dev/

#HackerNews #Herb #HTML #ERB #parsing #tooling #seamless #development

Herb Tools

Powerful and seamless HTML-aware ERB parsing and tooling.

🚀 Behold the epic tale of Janet's #PEG #module, where the author heroically excludes regular expressions like they're yesterday's news. 💥 Marvel at the labyrinth of #parsing magic that claims to be more readable, but only if you have a PhD in arcane text processing. 📜✨
https://bakpakin.com/writing/how-janets-peg-works.html #Janet #readability #textprocessing #regex #HackerNews #ngated
How Janet's PEG module works

An in depth explanation of pegs and how they work.

Бинарный формат вместо текста

Как быстро, без боли и страданий организовать хранение структурированных данных в бинарном формате. А затем и их передачу при необходимости. А потом, немного подумав, ещё их обнаружение в «замусоренном» потоке.

https://habr.com/ru/articles/895902/

#rust #protocols #parsing #binary #communication #no_database #storage #binary_storage #filtering

Бинарный формат вместо текста

Как быстро, без боли и страданий организовать хранение структурированных данных в бинарном формате. А затем и их передачу при необходимости. А потом, немного подумав, ещё их обнаружение в...

Хабр
So it's either an element node, or a text node without a colon, or a text node with a colon but I'm before the colon, or a text node with a colon but I'm after the colon, but there's no newline, or an element node after a text node with a colon but without a newline, or a text node after a text node the first with a colon neither with a newline or a text node with a colon and a newline, or a text node with a newline after a text node with a colon but before making a new text node before and after the newline, or a text node after the newline which may or may not contain a comma.

Simple! 💩

#Programming #parsing #fail

A Perplexing JavaScript Parsing Puzzle, by @hillelwayne.com:

https://www.hillelwayne.com/post/javascript-puzzle/

#javascript #parsing #history

A Perplexing Javascript Parsing Puzzle

What does this print? x = 1 x --> 0 Think it through, then try it in a browser console! Answer and explanation in the dropdown. Show answer It prints 1. wait wtf At the beginning of a line (and only at the beginning of a line), --> starts a comment. The JavaScript is parsed as x=1; x; // 0 The browser then displays the value of the last expression, which of course is 1.

Hillel Wayne