Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(7)  |  Derive(0)  |  Import(7)

src/d/c/dc-compilers-HEAD/spark-comp07/compiler.py   dc-compilers(Download)
from token import Token
 
from AST import (CompositeExpr, NumberExpr, Program, Variable,
                 VariableExpr, VarDecList)
 
    def p_vardec(self, args):
        ' vardec ::= letter = number '
        name = str(args[0])
        return Variable(name, args[2].attr)
 

src/d/c/dc-compilers-HEAD/spark-comp06/compiler.py   dc-compilers(Download)
from token import Token
 
from AST import CompositeExpr, NumberExpr, Program, Variable, VariableExpr
 
class ProgramScanner(GenericScanner):
    def p_vardec(self, args):
        ' vardec ::= letter = number '
        return Variable(args[0], args[2])
 
    def p_expr_1(self, args):

src/d/c/dc-compilers-HEAD/comp07/compiler.py   dc-compilers(Download)
import sys
 
from AST import (Expr, CompositeExpr, NumberExpr,
                 Variable, VariableExpr, Program)
 
            else:
                self.error("Variable " + name + " has already been declared")
            return Variable(name, n.getValue())
 
    def letter(self):

src/d/c/dc-compilers-HEAD/comp06/compiler.py   dc-compilers(Download)
import sys
 
from AST import (Expr, CompositeExpr, NumberExpr,
                 Variable, VariableExpr, Program)
 
            self.nextToken()
            n = self.number()
            return Variable(name, n.getValue())
 
    def letter(self):

src/d/c/dc-compilers-HEAD/comp09/compiler.py   dc-compilers(Download)
import sys
 
from AST import (Expr, CompositeExpr, NumberExpr, Variable, VariableExpr,
                 Program, AssignmentStatement, ReadStatement, WriteStatement,
                 StatementList, IfStatement)
            # an object of class Variable is the value. Dicts store a pair
            # (key,value) retrieved by the key
            self.symbolTable[name] = Variable(name)
        else:
            self.error("Variable " + name + " has already been declared")

src/d/c/dc-compilers-HEAD/comp08/compiler.py   dc-compilers(Download)
import sys
 
from AST import (Expr, CompositeExpr, NumberExpr, Variable, VariableExpr,
                 Program, AssignmentStatement, ReadStatement, WriteStatement,
                 StatementList, IfStatement)
            # an object of class Variable is the value. Dicts store a pair
            # (key,value) retrieved by the key
            self.symbolTable[name] = Variable(name)
        else:
            self.error("Variable " + name + " has already been declared")

src/d/c/dc-compilers-HEAD/spark-comp08/compiler.py   dc-compilers(Download)
from token import Token, Id
 
from AST import (CompositeExpr, NumberExpr, Program, Variable,
                 VariableExpr, VarDecList)