Mercurial > lcfOS
comparison 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 |
comparison
equal
deleted
inserted
replaced
190:65dda7e7e8bd | 191:6b2bec5653f1 |
---|---|
1 | |
2 from collections import namedtuple | 1 from collections import namedtuple |
3 | 2 |
4 #SourceLocation = namedtuple('SourceLocation', ['row', 'col']) | 3 # Token is used in the lexical analyzer: |
4 Token = namedtuple('Token', 'typ val loc') | |
5 | |
5 class SourceLocation: | 6 class SourceLocation: |
6 def __init__(self, row, col, ln): | 7 def __init__(self, row, col, ln): |
7 self.row = row | 8 self.row = row |
8 self.col = col | 9 self.col = col |
9 self.length = ln | 10 self.length = ln |