Category Archives: Grammars

Trace Based Parsing ( Part III ) – NFALexer

The NFALexer gives me an uneasy feeling. It is the most questionable of Trails components – one that cannot decide whether it wants to be a lexer that produces a token stream or a parser that produces parse trees. Continue reading

Posted in EasyExtend, Grammars, TBP | Leave a comment

Trace Based Parsing ( Part II ) – NFA Expansion

In the previous article about trace based parsing (TBP) I explained the basic concepts of TBP. I motivated TBP by parse tree validators that check the correctness of parse trees against grammars and I derived a trace based LL(1) parser. … Continue reading

Posted in EasyExtend, Grammars | Leave a comment

Trace Based Parsing (Part I) – Introduction

This is the first in a series of articles about Trace Based Parsing ( TBP ). Trace based parsing is a powerful top down, table driven parsing style. TBP is the technique underlying Trail which is the parser generator of … Continue reading

Posted in EasyExtend, Grammars | Leave a comment

Contextual Keywords

Keywords and Contextual Keywords A language keyword is a reserved word that cannot be used as an identifier for variables, constants, classes etc. Often it is an element of language syntax. Syntactical structure is simplified by means of keywords. A … Continue reading

Posted in csharp, EasyExtend, Grammars, Python | Leave a comment

The thunk_stmt and programmable semantics In Python

Seems as if there was just a single direction of syntactical improvement of Python these days which is the introduction of Ruby style blocks. Tav suggests to reuse Pythons with-statement: with_stmt: "with" expression (["as" target] | ["do" [parameter_list]]) ":" suitewith_stmt: … Continue reading

Posted in DSL, Grammars, Python | 4 Comments

Lonely Python is Intelligent Design and how to liberate from it

Python is doomed. Well, of course it is not yet doomed. Python is an evolutionary dead end living lonely on its own fitness plateau. It is clear that Python won’t have offspring because of significant whitespace aka indentation sensitivity. No … Continue reading

Posted in DSL, Grammars, Python | 2 Comments

Refactoring the ANSI C grammar

A nice blog article by Eli Bendersky about the distinction between ASTs and CSTs. After having clarified the concepts Eli tried to make the case for ASTs. He presents the C grammar or more precisely the part of the C … Continue reading

Posted in C, Grammars | Leave a comment