Skip to content Skip to sidebar Skip to footer
Showing posts with the label Lexical Analysis

Ply - Return Multiple Tokens

AFAIK the technique for lexing Python source code is: When current line's indentation level is… Read more Ply - Return Multiple Tokens

Efficiently Match Multiple Regexes In Python

Lexical analyzers are quite easy to write when you have regexes. Today I wanted to write a simple g… Read more Efficiently Match Multiple Regexes In Python

Attribute Access On Int Literals

>>> 1 .__hash__() 1 >>> 1.__hash__() File ' ', line 1 1.__hash__() … Read more Attribute Access On Int Literals