Author Archives: kay

Python26 expressions

When you look at the following listing you might think it’s just a sequence of nonsense statements in Python 26,maybe created for testing purposes: raise a, b, c import d from e import* import f from .g import(a) from b … Continue reading

Posted in Grammars, Langscape, Python | Leave a comment

Open source saturation

Reading the following post of Jimmy Schementi who explained his exit at Microsoft with the loss of MS’s interest in IronRuby I start to wonder if this isn’t a sign of the times? Open source projects get started by a … Continue reading

Posted in General, Programming Culture | 7 Comments

Langscape

Trails in a Langscape Welcome to Trails in a Langscape which is the new title of this blog. It is a minor change since URLs are not affected and the character of the blog will also remain the same. Langscape … Continue reading

Posted in General | Leave a comment

Token Tracers

When I started programming EasyExtend in 2006 one of the major problems was the correct grammar -> NFA translation. I used big grammars and testing for correctness required lots of source code. The first heuristics I used was ugly and … Continue reading

Posted in EasyExtend, Parsing, TBP | Leave a comment

Shaky Python future

Mark Pilgrim says: Anyway, I’m really proud of how well DiP3 [Dive into Python 3, ks] came out. The only problem is that no one is using Python 3. I took a gamble last year that large libraries would port … Continue reading

Posted in Python | 10 Comments

Inheritance and the C preprocessor

Defining n-ary trees using the C preprocessor In this article I introduce a compile time C technique used to define inheritance. Instead of giving a lengthy motivation I’ll jump directly to the algorithm and discuss it later. I hope lovers … Continue reading

Posted in Algorithms, C | 3 Comments

Restricted backmatching

In practice we often encounter situations when our preferred approach to problem solving breaks down. Just look at the recent Google implementation of  a regexp engine RE2, created by Russ Cox who has written a revival paper for Thompson NFAs  … Continue reading

Posted in TBP | Leave a comment

reverb – a revival

Sometimes software is given up by people and you realize it only a few years later.  Large packages or libraries will inevitably be flagged as legacy and die but tiny modules might have a chance to survive and find a … Continue reading

Posted in General | 3 Comments

Syntax algebra – first steps

Principle of relativity I started to revisit syntactic mappings defined in EasyExtend 3 which are closely tied to the Python grammar being  in use. Those are functions like `varargs2arglist`, `normalize`, `split_file_input` or `exprlist2testlist` defined in the `csttools.py` module. One of … Continue reading

Posted in Algorithms, Grammars | Leave a comment

About CST interpolation

Eli Bendersky has written a short overview article about Pythons _ast module which is supposed to make working with parse trees simpler by transforming them into other trees i.e. abstract syntax trees. In this article I want to talk a … Continue reading

Posted in Algorithms, Parsing, TBP | 3 Comments