revusky

You say “Tomayto”, I say “Tomahto”. Exploring Syntax options in CongoCC.

What this article’s title alludes to is the fact that, once you have a complex language (or system) there are usually multiple equally valid ways to say something. Let’s consider the following typical case, a comma-separated list of some sort, something like: [1, 2, x, y, “Hello, World”] To describe the grammar for this in …

You say “Tomayto”, I say “Tomahto”. Exploring Syntax options in CongoCC. Read More »

Revisiting Assertions, introducing the ENSURE keyword

Assertions, implemented in late 2021, are certainly an important feature in CongoCC — actually pretty much essential when writing grammars for very gnarly languages. However, as currently implemented, they are admittedly a somewhat strange hybrid construct. The main reason for this is that ASSERT has completely different semantics depending on whether you hit the assertion …

Revisiting Assertions, introducing the ENSURE keyword Read More »

Announcement: CongoCC includes parsers for the latest Java and Python versions!

As the title says: as of this writing, the included grammars for Java and Python both support the latest versions of the respective languages, i.e. JDK 22 and Python 3.12. New Java Language Features Java language features that were not supported until quite recently were: Record patterns introduced as a stable feature in JDK 21. …

Announcement: CongoCC includes parsers for the latest Java and Python versions! Read More »

All sorts of things you always wanted to know about tokenization but were afraid to ask (Part I)

Let’s consider the multiline comment in Java (and C/C++/C#, among others) which, you surely know, looks like this: /* * Comment text. */ This is an interesting construct. Paradoxically, it is extremely simple — I mean to describe in natural, human language (English or whatever) — but shockingly difficult to express in CongoCC. Or, that …

All sorts of things you always wanted to know about tokenization but were afraid to ask (Part I) Read More »