Mercurial > lcfOS
annotate python/ppci/common.py @ 191:6b2bec5653f1
Added assembler testset
author | Windel Bouwman |
---|---|
date | Sun, 26 May 2013 15:28:07 +0200 |
parents | 8104fc8b5e90 |
children | b01429a5d695 |
rev | line source |
---|---|
153 | 1 from collections import namedtuple |
2 | |
191 | 3 # Token is used in the lexical analyzer: |
4 Token = namedtuple('Token', 'typ val loc') | |
5 | |
163 | 6 class SourceLocation: |
7 def __init__(self, row, col, ln): | |
8 self.row = row | |
9 self.col = col | |
10 self.length = ln | |
11 | |
153 | 12 SourceRange = namedtuple('SourceRange', ['p1', 'p2']) |
13 |