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

All Samples(17)  |  Call(8)  |  Derive(0)  |  Import(9)

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_expr_2(self, args):
        ' expr ::= number '
        return NumberExpr(args[0].attr)
 
    def p_expr_3(self, args):

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_expr_2(self, args):
        ' expr ::= number '
        return NumberExpr(args[0].attr)
 
    def p_expr_3(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)
 
    def number(self):
        if self.token >= '0' and self.token <= '9':
            e = NumberExpr(self.token)
            self.nextToken()
            return e

src/d/c/dc-compilers-HEAD/comp06/compiler.py   dc-compilers(Download)
import sys
 
from AST import (Expr, CompositeExpr, NumberExpr,
                 Variable, VariableExpr, Program)
 
    def number(self):
        if self.token >= '0' and self.token <= '9':
            e = NumberExpr(self.token)
            self.nextToken()
            return e

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)
        value = self.numberValue
        self.nextToken()
        return NumberExpr(value)
 
    def nextToken(self):

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)
        value = self.numberValue
        self.nextToken()
        return NumberExpr(value)
 
    def nextToken(self):

src/d/c/dc-compilers-HEAD/comp05/compiler.py   dc-compilers(Download)
import sys
 
from AST import Expr, CompositeExpr, NumberExpr
 
class Compiler:
    def number(self):
        if self.token >= '0' and self.token <= '9':
            e = NumberExpr(self.token)
            self.nextToken()
        else:

src/d/c/dc-compilers-HEAD/spark-comp05/compiler.py   dc-compilers(Download)
from token import Token
 
from AST import CompositeExpr, NumberExpr
 
class ExprScanner(GenericScanner):
    def p_expr_2(self, args):
        ' expr ::= number '
        return NumberExpr(args[0].attr)
 
    def p_expr_3(self, args):

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)