Mercurial > lcfOS
diff python/ppci/frontends/ks/parser.py @ 106:f2d980eef509
improved code generation
author | Windel Bouwman |
---|---|
date | Mon, 31 Dec 2012 18:26:56 +0100 |
parents | 63937c8d1478 |
children | 9e552d34bd60 |
line wrap: on
line diff
--- a/python/ppci/frontends/ks/parser.py Mon Dec 31 17:35:17 2012 +0100 +++ b/python/ppci/frontends/ks/parser.py Mon Dec 31 18:26:56 2012 +0100 @@ -1,7 +1,3 @@ -""" - This module parses source code into an abstract syntax tree (AST) -""" - from .symboltable import SymbolTable from .nodes import * from ...core.errors import CompilerException, Error @@ -10,6 +6,7 @@ from .lexer import tokenize class KsParser: + """ This module parses source code into an abstract syntax tree (AST) """ def __init__(self, source): """ provide the parser with the tokens iterator from the lexer. """ self.tokens = tokenize(source) # Lexical stage