GDB (xrefs)
Loading...
Searching...
No Matches
Functions | Variables
make-target-delegates Namespace Reference

Functions

def scan_target_h ()
 
def parse_argtypes (typestr)
 
def write_function_header (f, decl, name, return_type, argtypes)
 
def write_declaration (f, name, return_type, argtypes)
 
def write_delegator (f, name, return_type, argtypes)
 
def write_tdefault (f, content, style, name, return_type, argtypes)
 
def munge_type (typename)
 
def write_debugmethod (f, content, name, return_type, argtypes)
 
def print_class (f, class_name, delegators, entries)
 

Variables

re TRIGGER = re.compile(r"^struct target_ops$")
 
re ENDER = re.compile(r"^\s*};$")
 
str SYMBOL = "[a-zA-Z_][a-zA-Z0-9_]*"
 
str NAME_PART = r"(?P<name>" + SYMBOL + ")\s"
 
str ARGS_PART = r"(?P<args>\‍(.*\‍))"
 
str INTRO_PART = r"^"
 
str POINTER_PART = r"\s*(\*)?\s*"
 
str CP_SYMBOL = r"[a-zA-Z_][a-zA-Z0-9_<>:]*"
 
str SIMPLE_RETURN_PART = r"((struct|class|enum|union)\s+)?" + CP_SYMBOL
 
str RETURN_PART = r"((const|volatile)\s+)?(" + SIMPLE_RETURN_PART + ")" + POINTER_PART
 
str VIRTUAL_PART = r"virtual\s"
 
str TARGET_DEFAULT_PART = r"TARGET_DEFAULT_(?P<style>[A-Z_]+)\s*\‍((?P<default_arg>.*)\‍)"
 
str METHOD_TRAILER = r"\s*" + TARGET_DEFAULT_PART + "$"
 
re METHOD
 
re ARGTYPES
 
str TARGET_DEBUG_PRINTER = r"\s*TARGET_DEBUG_PRINTER\s*\‍((?P<arg>[^)]*)\‍)\s*"
 
list delegators = []
 
dict entries = {}
 
current_line current_line = current_line.strip()
 
re m = METHOD.match(current_line)
 
re data = m.groupdict()
 
 file
 
dict tdefault = entries[name]["default_arg"]
 
dict return_type = entries[name]["return_type"]
 
dict style = entries[name]["style"]
 
dict argtypes = entries[name]["argtypes"]
 

Function Documentation

◆ munge_type()

def make-target-delegates.munge_type (   typename)

Definition at line 224 of file make-target-delegates.py.

Referenced by write_debugmethod().

◆ parse_argtypes()

def make-target-delegates.parse_argtypes (   typestr)

Definition at line 135 of file make-target-delegates.py.

◆ print_class()

def make-target-delegates.print_class (   f,
  class_name,
  delegators,
  entries 
)

Definition at line 289 of file make-target-delegates.py.

References write_declaration().

◆ scan_target_h()

def make-target-delegates.scan_target_h ( )

Definition at line 95 of file make-target-delegates.py.

◆ write_debugmethod()

def make-target-delegates.write_debugmethod (   f,
  content,
  name,
  return_type,
  argtypes 
)

Definition at line 243 of file make-target-delegates.py.

References munge_type(), and write_function_header().

◆ write_declaration()

def make-target-delegates.write_declaration (   f,
  name,
  return_type,
  argtypes 
)

Definition at line 183 of file make-target-delegates.py.

References write_function_header().

Referenced by print_class().

◆ write_delegator()

def make-target-delegates.write_delegator (   f,
  name,
  return_type,
  argtypes 
)

Definition at line 188 of file make-target-delegates.py.

References write_function_header().

◆ write_function_header()

def make-target-delegates.write_function_header (   f,
  decl,
  name,
  return_type,
  argtypes 
)

◆ write_tdefault()

def make-target-delegates.write_tdefault (   f,
  content,
  style,
  name,
  return_type,
  argtypes 
)

Definition at line 202 of file make-target-delegates.py.

References write_function_header().

Variable Documentation

◆ ARGS_PART

str make-target-delegates.ARGS_PART = r"(?P<args>\‍(.*\‍))"

Definition at line 38 of file make-target-delegates.py.

◆ ARGTYPES

re make-target-delegates.ARGTYPES
Initial value:
1= re.compile(
2 "^("
3 + r"(?P<E>enum\s+"
4 + SYMBOL
5 + r"\s*)("
6 + SYMBOL
7 + ")?"
8 + r"|(?P<T>.*(enum\s+)?"
9 + SYMBOL
10 + r".*(\s|\*|&))"
11 + SYMBOL
12 + ")$"
13)

Definition at line 76 of file make-target-delegates.py.

◆ argtypes

dict make-target-delegates.argtypes = entries[name]["argtypes"]

Definition at line 336 of file make-target-delegates.py.

◆ CP_SYMBOL

str make-target-delegates.CP_SYMBOL = r"[a-zA-Z_][a-zA-Z0-9_<>:]*"

Definition at line 46 of file make-target-delegates.py.

◆ current_line

current_line make-target-delegates.current_line = current_line.strip()

Definition at line 311 of file make-target-delegates.py.

◆ data

re make-target-delegates.data = m.groupdict()

Definition at line 315 of file make-target-delegates.py.

◆ delegators

list make-target-delegates.delegators = []

Definition at line 306 of file make-target-delegates.py.

◆ ENDER

re make-target-delegates.ENDER = re.compile(r"^\s*};$")

Definition at line 31 of file make-target-delegates.py.

◆ entries

dict make-target-delegates.entries = {}

Definition at line 307 of file make-target-delegates.py.

◆ file

make-target-delegates.file

Definition at line 327 of file make-target-delegates.py.

◆ INTRO_PART

str make-target-delegates.INTRO_PART = r"^"

Definition at line 40 of file make-target-delegates.py.

◆ m

re make-target-delegates.m = METHOD.match(current_line)

Definition at line 312 of file make-target-delegates.py.

◆ METHOD

re make-target-delegates.METHOD
Initial value:
1= re.compile(
2 INTRO_PART
3 + VIRTUAL_PART
4 + "(?P<return_type>"
5 + RETURN_PART
6 + ")"
7 + NAME_PART
8 + ARGS_PART
9 + METHOD_TRAILER
10)

Definition at line 64 of file make-target-delegates.py.

◆ METHOD_TRAILER

str make-target-delegates.METHOD_TRAILER = r"\s*" + TARGET_DEFAULT_PART + "$"

Definition at line 61 of file make-target-delegates.py.

◆ NAME_PART

str make-target-delegates.NAME_PART = r"(?P<name>" + SYMBOL + ")\s"

Definition at line 36 of file make-target-delegates.py.

◆ POINTER_PART

str make-target-delegates.POINTER_PART = r"\s*(\*)?\s*"

Definition at line 42 of file make-target-delegates.py.

◆ RETURN_PART

str make-target-delegates.RETURN_PART = r"((const|volatile)\s+)?(" + SIMPLE_RETURN_PART + ")" + POINTER_PART

Definition at line 51 of file make-target-delegates.py.

◆ return_type

dict make-target-delegates.return_type = entries[name]["return_type"]

Definition at line 334 of file make-target-delegates.py.

◆ SIMPLE_RETURN_PART

str make-target-delegates.SIMPLE_RETURN_PART = r"((struct|class|enum|union)\s+)?" + CP_SYMBOL

Definition at line 48 of file make-target-delegates.py.

◆ style

dict make-target-delegates.style = entries[name]["style"]

Definition at line 335 of file make-target-delegates.py.

◆ SYMBOL

str make-target-delegates.SYMBOL = "[a-zA-Z_][a-zA-Z0-9_]*"

Definition at line 34 of file make-target-delegates.py.

◆ TARGET_DEBUG_PRINTER

str make-target-delegates.TARGET_DEBUG_PRINTER = r"\s*TARGET_DEBUG_PRINTER\s*\‍((?P<arg>[^)]*)\‍)\s*"

Definition at line 92 of file make-target-delegates.py.

◆ TARGET_DEFAULT_PART

str make-target-delegates.TARGET_DEFAULT_PART = r"TARGET_DEFAULT_(?P<style>[A-Z_]+)\s*\‍((?P<default_arg>.*)\‍)"

Definition at line 57 of file make-target-delegates.py.

◆ tdefault

dict make-target-delegates.tdefault = entries[name]["default_arg"]

Definition at line 333 of file make-target-delegates.py.

◆ TRIGGER

re make-target-delegates.TRIGGER = re.compile(r"^struct target_ops$")

Definition at line 29 of file make-target-delegates.py.

◆ VIRTUAL_PART

str make-target-delegates.VIRTUAL_PART = r"virtual\s"

Definition at line 54 of file make-target-delegates.py.