webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Functions | Variables
KeywordLookupGenerator Namespace Reference

Classes

class  Trie
 

Functions

def allWhitespace (str)
 
def parseKeywords (keywordsText)
 
def makePadding (size)
 

Variables

 keywordsText = open(sys.argv[1]).read()
 
int redirect_to_file = len(sys.argv) > 2
 
 file_output = open(sys.argv[-1], "w")
 
 stdout
 
dictionary keyWordWeights
 
def keywords = parseKeywords(keywordsText)
 
 trie = Trie("")
 

Function Documentation

◆ allWhitespace()

def KeywordLookupGenerator.allWhitespace (   str)

◆ makePadding()

def KeywordLookupGenerator.makePadding (   size)

◆ parseKeywords()

def KeywordLookupGenerator.parseKeywords (   keywordsText)

Variable Documentation

◆ file_output

KeywordLookupGenerator.file_output = open(sys.argv[-1], "w")

◆ keywords

def KeywordLookupGenerator.keywords = parseKeywords(keywordsText)

◆ keywordsText

KeywordLookupGenerator.keywordsText = open(sys.argv[1]).read()

◆ keyWordWeights

dictionary KeywordLookupGenerator.keyWordWeights
Initial value:
1 = {
2  "catch": 0.01,
3  "try": 0.01,
4  "while": 0.01,
5  "case": 0.01,
6  "break": 0.01,
7  "new": 0.01,
8  "in": 0.01,
9  "typeof": 0.02,
10  "true": 0.02,
11  "false": 0.02,
12  "for": 0.03,
13  "null": 0.03,
14  "else": 0.03,
15  "return": 0.13,
16  "var": 0.13,
17  "if": 0.16,
18  "function": 0.18,
19  "this": 0.18,
20 }

◆ redirect_to_file

int KeywordLookupGenerator.redirect_to_file = len(sys.argv) > 2

◆ stdout

KeywordLookupGenerator.stdout

◆ trie

KeywordLookupGenerator.trie = Trie("")