Home | History | Annotate | Download | only in tools

Lines Matching refs:def

72     def __init__(self):
78 def set(self,id,val=None):
86 def copyFrom(self,src):
92 def __repr__(self):
109 def __str__(self):
127 def __init__(self,msg):
140 def __init__(self,tokens):
145 def set(self,n):
153 def peekId(self):
159 def peek(self):
165 def skip(self):
170 def skipSpaces(self):
178 def skipIfId(self,id):
183 def expectId(self,id):
191 def remain(self):
213 def __init__(self):
222 def setLineText(self,line):
229 def fillLineText(self):
234 def markPos(self,tok):
243 def peekChar(self):
260 def peekNChar(self,n):
266 def skipChar(self):
271 def skipNChars(self,n):
279 def nextChar(self):
285 def getEscape(self):
327 def nextRealToken(self,tok):
449 def nextToken(self,tok):
455 def getToken(self):
462 def toTokenList(self):
476 def __init__(self,line,lineno=1):
485 def __init__(self,lines=[],lineno=1):
498 def addLine(self,line):
508 def
517 def __init__(self,file,lineno=1):
522 def fillLineText(self):
537 def __init__(self,tokenizer=None):
541 def setTokenizer(self,tokenizer):
544 def expect(self,id):
553 def expectToken(self,id,line,col):
560 def expectTokenVal(self,id,value,line,col):
565 def expectList(self,list):
569 def test_CppTokenizer():
672 def __init__(self,op):
675 def __repr__(self):
678 def __str__(self):
681 def precedence(self):
685 def isUnary(self):
688 def isBinary(self):
691 def isDefined(self):
694 def toInt(self):
700 def __init__(self,value):
704 def __repr__(self):
707 def __str__(self):
710 def toInt(self):
718 def __init__(self,name):
722 def __repr__(self):
725 def __str__(self):
729 def __init__(self,funcname,params):
734 def __repr__(self):
743 def __str__(self):
754 def __init__(self,cond,iftrue,iffalse):
760 def __repr__(self):
763 def __str__(self):
767 def __init__(self,op,arg):
771 def __repr__(self):
775 def __init__(self,op,macroname):
778 def __str__(self):
783 def __init__(self,op,arg,opstr=None):
789 def __str__(self):
799 def __init__(self,op,arg1,arg2):
804 def __repr__(self):
808 def __init__(self,op,arg1,arg2,opstr=None):
814 def __str__(self):
852 def __init__(self,tokens):
857 def mark(self):
860 def release(self,pos):
863 def peekId(self):
868 def peek(self):
873 def skip(self):
877 def skipOptional(self,id):
881 def skipSpaces(self):
892 def is_integer(self):
912 def is_defined(self):
938 def is_call_or_ident(self):
941 def parse(self, i):
976 def __init__(self, tokens):
989 def throw(self,exception,i,msg):
997 def skip_spaces(self,i):
1006 def expectId(self,i,id):
1013 def expectIdent(self,i):
1024 def is_decimal(self,i):
1037 def is_hexadecimal(self,i):
1053 def is_integer(self,i):
1065 def is_number(self,i):
1080 def is_alnum(self,i):
1093 def is_defined(self,i):
1119 def is_call_or_ident(self,i):
1162 def is_token(self,i,token):
1169 def is_value(self,i):
1214 def is_unary(self,i):
1229 def is_binary(self,i):
1253 def is_expr(self,i):
1256 def dump_node(self,e):
1287 def __repr__(self):
1290 def source_node(self,e):
1326 def __str__(self):
1329 def int_node(self,e):
1337 def toInt(self):
1340 def optimize_node(self,e,macros={}):
1392 def optimize(self,macros={}):
1395 def removePrefixedNode(self,e,prefix,names):
1423 def removePrefixed(self,prefix,names={}):
1426 def is_equal_node(self,e1,e2):
1436 def is_equal(self,other):
1439 def test_cpp_expr(expr, expected):
1449 def test_cpp_expr_optim(expr, expected, macros={}):
1460 def test_cpp_expr_source(expr, expected):
1469 def test_CppExpr():
1538 def __init__(self,tokens,directive=None,lineno=0):
1566 def isDirective(self):
1570 def isConditional(self):
1574 def isDefine(self):
1581 def isIf(self):
1585 def isInclude(self):
1612 def removeWhiteSpace(self):
1669 def writeWithWarning(self,out,warning,left_count,repeat_count):
1697 def __repr__(self):
1713 def __str__(self):
1742 def __init__(self,blocks):
1745 def __len__(self):
1748 def __getitem__(self,n):
1751 def __repr__(self):
1754 def __str__(self):
1762 def optimizeIf01(self):
1766 def optimizeMacros(self, macros):
1772 def removeMacroDefines(self,macros):
1776 def removePrefixed(self,prefix,names):
1781 def removeWhiteSpace(self):
1785 def optimizeAll(self,macros):
1790 def findIncludes(self):
1801 def write(self,out):
1804 def writeWithWarning(self,out,warning,repeat_count):
1809 def removeComments(self):
1815 def removeVarsAndFuncs(self,knownStatics=set()):
1944 def insertDisclaimer(self,disclaimer="/* auto-generated file, DO NOT EDIT */"):
1951 def replaceTokens(self,replacements=dict()):
1964 def __init__(self,tokzer=None):
1969 def reset(self,tokzer):
1973 def getBlocks(self,tokzer=None):
2059 def parse(self,tokzer):
2062 def parseLines(self,lines):
2066 def parseFile(self,path):
2074 def test_block_parsing(lines,expected):
2086 def test_BlockParser():
2103 def remove_macro_defines( blocks, excludedMacros=set() ):
2113 def find_matching_endif( blocks, i ):
2130 def optimize_if01( blocks ):
2202 def test_optimizeAll():
2265 def runUnitTests():