Analysis Software
Documentation for sPHENIX simulation software
|
Classes | |
class | Cursor |
class | Token |
class | CodeNode |
class | VarNode |
class | RangeNode |
class | ForNode |
class | ElseNode |
class | IfNode |
class | RawCodeNode |
class | LiteralDollarNode |
class | ExpNode |
class | Env |
class | Output |
Functions | |
def | Eof |
def | StartsWith |
def | FindFirstInLine |
def | FindFirst |
def | SubString |
def | StripMetaComments |
def | MakeToken |
def | ParseToken |
def | Skip |
def | SkipUntil |
def | ParseExpTokenInParens |
def | RStripNewLineFromToken |
def | TokenizeLines |
def | Tokenize |
def | PopFront |
def | PushFront |
def | PopToken |
def | PeekToken |
def | ParseExpNode |
def | ParseElseNode |
def | ParseAtomicCodeNode |
def | ParseCodeNode |
def | ParseToAST |
def | RunAtomicCode |
def | RunCode |
def | IsSingleLineComment |
def | IsInPreprocessorDirective |
def | WrapComment |
def | WrapCode |
def | WrapPreprocessorDirective |
def | WrapPlainCode |
def | IsMultiLineIWYUPragma |
def | IsHeaderGuardIncludeOrOneLineIWYUPragma |
def | WrapLongLine |
def | BeautifyCode |
def | ConvertFromPumpSource |
def | main |
Variables | |
string | __author__ 'wan@google.com (Zhanyong Wan)' |
list | TOKEN_TABLE |
tuple | ID_REGEX re.compile(r'[_A-Za-z]\w*') |
tuple | EQ_REGEX re.compile(r'=') |
tuple | REST_OF_LINE_REGEX re.compile(r'.*?(?=$|\$\$)') |
tuple | OPTIONAL_WHITE_SPACES_REGEX re.compile(r'\s*') |
tuple | WHITE_SPACE_REGEX re.compile(r'\s') |
tuple | DOT_DOT_REGEX re.compile(r'\.\.') |
def pump.BeautifyCode | ( | string | ) |
Definition at line 814 of file pump.py.
View newest version in sPHENIX GitHub at line 814 of file pump.py
References join(), and WrapLongLine().
Referenced by ConvertFromPumpSource().
def pump.ConvertFromPumpSource | ( | src_text | ) |
Return the text generated from the given Pump source text.
Definition at line 823 of file pump.py.
View newest version in sPHENIX GitHub at line 823 of file pump.py
References BeautifyCode(), ParseToAST(), RunCode(), and StripMetaComments().
Referenced by main().
def pump.Eof | ( | ) |
Returns the special cursor to denote the end-of-file.
Definition at line 132 of file pump.py.
View newest version in sPHENIX GitHub at line 132 of file pump.py
Referenced by pump.Cursor.__str__(), SubString(), and TokenizeLines().
def pump.FindFirst | ( | lines, | |
token_table, | |||
cursor | |||
) |
Finds the first occurrence of any string in strings in lines.
Definition at line 186 of file pump.py.
View newest version in sPHENIX GitHub at line 186 of file pump.py
References FindFirstInLine(), and MakeToken().
Referenced by TokenizeLines().
def pump.FindFirstInLine | ( | line, | |
token_table | |||
) |
Definition at line 169 of file pump.py.
View newest version in sPHENIX GitHub at line 169 of file pump.py
Referenced by FindFirst().
def pump.IsHeaderGuardIncludeOrOneLineIWYUPragma | ( | line | ) |
Definition at line 783 of file pump.py.
View newest version in sPHENIX GitHub at line 783 of file pump.py
Referenced by WrapLongLine().
def pump.IsInPreprocessorDirective | ( | prev_lines, | |
cur_line | |||
) |
Definition at line 711 of file pump.py.
View newest version in sPHENIX GitHub at line 711 of file pump.py
Referenced by WrapLongLine().
def pump.IsMultiLineIWYUPragma | ( | line | ) |
Definition at line 779 of file pump.py.
View newest version in sPHENIX GitHub at line 779 of file pump.py
Referenced by WrapLongLine().
def pump.IsSingleLineComment | ( | cur_line | ) |
Definition at line 707 of file pump.py.
View newest version in sPHENIX GitHub at line 707 of file pump.py
Referenced by WrapLongLine().
def pump.main | ( | argv | ) |
def pump.MakeToken | ( | lines, | |
start, | |||
end, | |||
token_type | |||
) |
Creates a new instance of Token.
Definition at line 237 of file pump.py.
View newest version in sPHENIX GitHub at line 237 of file pump.py
References SubString().
Referenced by FindFirst(), ParseExpTokenInParens(), ParseToken(), and TokenizeLines().
def pump.ParseAtomicCodeNode | ( | tokens | ) |
Definition at line 503 of file pump.py.
View newest version in sPHENIX GitHub at line 503 of file pump.py
References ParseCodeNode(), ParseElseNode(), ParseExpNode(), PeekToken(), PopFront(), PopToken(), and PushFront().
Referenced by ParseCodeNode().
def pump.ParseCodeNode | ( | tokens | ) |
Definition at line 564 of file pump.py.
View newest version in sPHENIX GitHub at line 564 of file pump.py
References ParseAtomicCodeNode().
Referenced by ParseAtomicCodeNode(), ParseElseNode(), and ParseToAST().
def pump.ParseElseNode | ( | tokens | ) |
Definition at line 475 of file pump.py.
View newest version in sPHENIX GitHub at line 475 of file pump.py
References ParseCodeNode(), ParseExpNode(), PeekToken(), and PopToken().
Referenced by ParseAtomicCodeNode().
def pump.ParseExpNode | ( | token | ) |
Definition at line 470 of file pump.py.
View newest version in sPHENIX GitHub at line 470 of file pump.py
Referenced by ParseAtomicCodeNode(), and ParseElseNode().
def pump.ParseExpTokenInParens | ( | lines, | |
pos | |||
) |
Definition at line 281 of file pump.py.
View newest version in sPHENIX GitHub at line 281 of file pump.py
References MakeToken(), Skip(), SkipUntil(), and SubString().
Referenced by TokenizeLines().
def pump.ParseToAST | ( | pump_src_text | ) |
Convert the given Pump source text into an AST.
Definition at line 577 of file pump.py.
View newest version in sPHENIX GitHub at line 577 of file pump.py
References ParseCodeNode(), and Tokenize().
Referenced by ConvertFromPumpSource().
def pump.ParseToken | ( | lines, | |
pos, | |||
regex, | |||
token_type | |||
) |
Definition at line 243 of file pump.py.
View newest version in sPHENIX GitHub at line 243 of file pump.py
References MakeToken().
Referenced by TokenizeLines().
def pump.PeekToken | ( | a_list | ) |
Definition at line 463 of file pump.py.
View newest version in sPHENIX GitHub at line 463 of file pump.py
Referenced by ParseAtomicCodeNode(), and ParseElseNode().
def pump.PopFront | ( | a_list | ) |
Definition at line 443 of file pump.py.
View newest version in sPHENIX GitHub at line 443 of file pump.py
Referenced by ParseAtomicCodeNode(), and PopToken().
def pump.PopToken | ( | a_list, | |
token_type = None |
|||
) |
Definition at line 453 of file pump.py.
View newest version in sPHENIX GitHub at line 453 of file pump.py
References PopFront().
Referenced by ParseAtomicCodeNode(), and ParseElseNode().
def pump.PushFront | ( | a_list, | |
elem | |||
) |
Definition at line 449 of file pump.py.
View newest version in sPHENIX GitHub at line 449 of file pump.py
Referenced by ParseAtomicCodeNode().
def pump.RStripNewLineFromToken | ( | token | ) |
Definition at line 303 of file pump.py.
View newest version in sPHENIX GitHub at line 303 of file pump.py
Referenced by TokenizeLines().
def pump.RunAtomicCode | ( | env, | |
node, | |||
output | |||
) |
def pump.RunCode | ( | env, | |
code_node, | |||
output | |||
) |
Definition at line 702 of file pump.py.
View newest version in sPHENIX GitHub at line 702 of file pump.py
References RunAtomicCode().
Referenced by ConvertFromPumpSource(), and RunAtomicCode().
def pump.Skip | ( | lines, | |
pos, | |||
regex | |||
) |
Definition at line 261 of file pump.py.
View newest version in sPHENIX GitHub at line 261 of file pump.py
Referenced by ParseExpTokenInParens(), and TokenizeLines().
def pump.SkipUntil | ( | lines, | |
pos, | |||
regex, | |||
token_type | |||
) |
Definition at line 270 of file pump.py.
View newest version in sPHENIX GitHub at line 270 of file pump.py
Referenced by ParseExpTokenInParens(), and TokenizeLines().
def pump.StartsWith | ( | lines, | |
pos, | |||
string | |||
) |
def pump.StripMetaComments | ( | str | ) |
Strip meta comments from each line in the given string.
Definition at line 226 of file pump.py.
View newest version in sPHENIX GitHub at line 226 of file pump.py
Referenced by ConvertFromPumpSource().
def pump.SubString | ( | lines, | |
start, | |||
end | |||
) |
Returns a substring in lines.
Definition at line 208 of file pump.py.
View newest version in sPHENIX GitHub at line 208 of file pump.py
Referenced by MakeToken(), ParseExpTokenInParens(), and TokenizeLines().
def pump.Tokenize | ( | s | ) |
A generator that yields the tokens in the given string.
Definition at line 382 of file pump.py.
View newest version in sPHENIX GitHub at line 382 of file pump.py
References TokenizeLines().
Referenced by ParseToAST().
def pump.TokenizeLines | ( | lines, | |
pos | |||
) |
Definition at line 310 of file pump.py.
View newest version in sPHENIX GitHub at line 310 of file pump.py
References Eof(), FindFirst(), MakeToken(), ParseExpTokenInParens(), ParseToken(), RStripNewLineFromToken(), Skip(), SkipUntil(), and SubString().
Referenced by Tokenize().
def pump.WrapCode | ( | line, | |
line_concat, | |||
output | |||
) |
Definition at line 741 of file pump.py.
View newest version in sPHENIX GitHub at line 741 of file pump.py
Referenced by WrapPlainCode(), and WrapPreprocessorDirective().
def pump.WrapComment | ( | line, | |
output | |||
) |
Definition at line 717 of file pump.py.
View newest version in sPHENIX GitHub at line 717 of file pump.py
Referenced by WrapLongLine().
def pump.WrapLongLine | ( | line, | |
output | |||
) |
Definition at line 790 of file pump.py.
View newest version in sPHENIX GitHub at line 790 of file pump.py
References IsHeaderGuardIncludeOrOneLineIWYUPragma(), IsInPreprocessorDirective(), IsMultiLineIWYUPragma(), IsSingleLineComment(), WrapComment(), WrapPlainCode(), and WrapPreprocessorDirective().
Referenced by BeautifyCode().
def pump.WrapPlainCode | ( | line, | |
output | |||
) |
Definition at line 775 of file pump.py.
View newest version in sPHENIX GitHub at line 775 of file pump.py
References WrapCode().
Referenced by WrapLongLine().
def pump.WrapPreprocessorDirective | ( | line, | |
output | |||
) |
Definition at line 771 of file pump.py.
View newest version in sPHENIX GitHub at line 771 of file pump.py
References WrapCode().
Referenced by WrapLongLine().
string pump.__author__ 'wan@google.com (Zhanyong Wan)' |
list pump.TOKEN_TABLE |