Classes | Functions | Variables
pump Namespace Reference

Classes

class  CodeNode
class  Cursor
class  ElseNode
class  Env
class  ExpNode
class  ForNode
class  IfNode
class  LiteralDollarNode
class  Output
class  RangeNode
class  RawCodeNode
class  Token
class  VarNode

Functions

def BeautifyCode
def ConvertFromPumpSource
def Eof
def FindFirst
def FindFirstInLine
def IsHeaderGuardIncludeOrOneLineIWYUPragma
def IsInPreprocessorDirective
def IsMultiLineIWYUPragma
def IsSingleLineComment
def main
def MakeToken
def ParseAtomicCodeNode
def ParseCodeNode
def ParseElseNode
def ParseExpNode
def ParseExpTokenInParens
def ParseToAST
def ParseToken
def PeekToken
def PopFront
def PopToken
def PushFront
def RStripNewLineFromToken
def RunAtomicCode
def RunCode
def Skip
def SkipUntil
def StartsWith
def StripMetaComments
def SubString
def Tokenize
def TokenizeLines
def WrapCode
def WrapComment
def WrapLongLine
def WrapPlainCode
def WrapPreprocessorDirective

Variables

string __author__ = 'wan@google.com (Zhanyong Wan)'
tuple DOT_DOT_REGEX = re.compile(r'\.\.')
tuple EQ_REGEX = re.compile(r'=')
tuple ID_REGEX = re.compile(r'[_A-Za-z]\w*')
tuple OPTIONAL_WHITE_SPACES_REGEX = re.compile(r'\s*')
tuple REST_OF_LINE_REGEX = re.compile(r'.*?(?=$|\$\$)')
list TOKEN_TABLE
tuple WHITE_SPACE_REGEX = re.compile(r'\s')

Function Documentation

def pump.BeautifyCode (   string)

Definition at line 814 of file pump.py.

def pump.ConvertFromPumpSource (   src_text)
Return the text generated from the given Pump source text.

Definition at line 823 of file pump.py.

def pump.Eof ( )
Returns the special cursor to denote the end-of-file.

Definition at line 132 of file pump.py.

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.

def pump.FindFirstInLine (   line,
  token_table 
)

Definition at line 169 of file pump.py.

Definition at line 783 of file pump.py.

def pump.IsInPreprocessorDirective (   prev_lines,
  cur_line 
)

Definition at line 711 of file pump.py.

Definition at line 779 of file pump.py.

def pump.IsSingleLineComment (   cur_line)

Definition at line 707 of file pump.py.

def pump.main (   argv)

Definition at line 831 of file pump.py.

def pump.MakeToken (   lines,
  start,
  end,
  token_type 
)
Creates a new instance of Token.

Definition at line 237 of file pump.py.

def pump.ParseAtomicCodeNode (   tokens)

Definition at line 503 of file pump.py.

def pump.ParseCodeNode (   tokens)

Definition at line 564 of file pump.py.

def pump.ParseElseNode (   tokens)

Definition at line 475 of file pump.py.

def pump.ParseExpNode (   token)

Definition at line 470 of file pump.py.

def pump.ParseExpTokenInParens (   lines,
  pos 
)

Definition at line 281 of file pump.py.

def pump.ParseToAST (   pump_src_text)
Convert the given Pump source text into an AST.

Definition at line 577 of file pump.py.

def pump.ParseToken (   lines,
  pos,
  regex,
  token_type 
)

Definition at line 243 of file pump.py.

def pump.PeekToken (   a_list)

Definition at line 463 of file pump.py.

def pump.PopFront (   a_list)

Definition at line 443 of file pump.py.

def pump.PopToken (   a_list,
  token_type = None 
)

Definition at line 453 of file pump.py.

def pump.PushFront (   a_list,
  elem 
)

Definition at line 449 of file pump.py.

def pump.RStripNewLineFromToken (   token)

Definition at line 303 of file pump.py.

def pump.RunAtomicCode (   env,
  node,
  output 
)

Definition at line 656 of file pump.py.

def pump.RunCode (   env,
  code_node,
  output 
)

Definition at line 702 of file pump.py.

def pump.Skip (   lines,
  pos,
  regex 
)

Definition at line 261 of file pump.py.

def pump.SkipUntil (   lines,
  pos,
  regex,
  token_type 
)

Definition at line 270 of file pump.py.

def pump.StartsWith (   lines,
  pos,
  string 
)
Returns True iff the given position in lines starts with 'string'.

Definition at line 163 of file pump.py.

def pump.StripMetaComments (   str)
Strip meta comments from each line in the given string.

Definition at line 226 of file pump.py.

def pump.SubString (   lines,
  start,
  end 
)
Returns a substring in lines.

Definition at line 208 of file pump.py.

def pump.Tokenize (   s)
A generator that yields the tokens in the given string.

Definition at line 382 of file pump.py.

def pump.TokenizeLines (   lines,
  pos 
)

Definition at line 310 of file pump.py.

def pump.WrapCode (   line,
  line_concat,
  output 
)

Definition at line 741 of file pump.py.

def pump.WrapComment (   line,
  output 
)

Definition at line 717 of file pump.py.

def pump.WrapLongLine (   line,
  output 
)

Definition at line 790 of file pump.py.

def pump.WrapPlainCode (   line,
  output 
)

Definition at line 775 of file pump.py.

def pump.WrapPreprocessorDirective (   line,
  output 
)

Definition at line 771 of file pump.py.


Variable Documentation

string pump::__author__ = 'wan@google.com (Zhanyong Wan)'

Definition at line 65 of file pump.py.

tuple pump::DOT_DOT_REGEX = re.compile(r'\.\.')

Definition at line 258 of file pump.py.

tuple pump::EQ_REGEX = re.compile(r'=')

Definition at line 254 of file pump.py.

tuple pump::ID_REGEX = re.compile(r'[_A-Za-z]\w*')

Definition at line 253 of file pump.py.

tuple pump::OPTIONAL_WHITE_SPACES_REGEX = re.compile(r'\s*')

Definition at line 256 of file pump.py.

tuple pump::REST_OF_LINE_REGEX = re.compile(r'.*?(?=$|\$\$)')

Definition at line 255 of file pump.py.

Initial value:
00001 [
00002     (re.compile(r'\$var\s+'), '$var'),
00003     (re.compile(r'\$elif\s+'), '$elif'),
00004     (re.compile(r'\$else\s+'), '$else'),
00005     (re.compile(r'\$for\s+'), '$for'),
00006     (re.compile(r'\$if\s+'), '$if'),
00007     (re.compile(r'\$range\s+'), '$range'),
00008     (re.compile(r'\$[_A-Za-z]\w*'), '$id'),
00009     (re.compile(r'\$\(\$\)'), '$($)'),
00010     (re.compile(r'\$'), '$'),
00011     (re.compile(r'\[\[\n?'), '[['),
00012     (re.compile(r'\]\]\n?'), ']]'),
00013     ]

Definition at line 72 of file pump.py.

tuple pump::WHITE_SPACE_REGEX = re.compile(r'\s')

Definition at line 257 of file pump.py.



rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:12