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

Classes

class  Entry
 

Functions

 scan_target_h ()
 
 parse_argtypes (str typestr)
 
 write_function_header (TextIO f, bool decl, str name, str return_type, List[str] argtypes)
 
 write_declaration (TextIO f, str name, str return_type, List[str] argtypes)
 
 write_delegator (TextIO f, str name, str return_type, List[str] argtypes)
 
 write_tdefault (TextIO f, str content, str style, str name, str return_type, List[str] argtypes)
 
 munge_type (str typename)
 
 write_debugmethod (TextIO f, str content, str name, str return_type, List[str] argtypes)
 
 print_class (TextIO f, str class_name, List[str] delegators, Dict[str, Entry] entries)
 

Variables

 TRIGGER = re.compile(r"^struct target_ops$")
 
 ENDER = re.compile(r"^\s*};$")
 
str SYMBOL = "[a-zA-Z_][a-zA-Z0-9_]*"
 
str NAME_PART = r"(?P<name>" + SYMBOL + r")\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 + "$"
 
 METHOD
 
 ARGTYPES
 
str TARGET_DEBUG_PRINTER = r"\s*TARGET_DEBUG_PRINTER\s*\‍((?P<arg>[^)]*)\‍)\s*"
 
list delegators = []
 
dict entries = {}
 
 current_line = current_line.strip()
 
 m = METHOD.match(current_line)
 
 data = m.groupdict()
 
 name = data["name"]
 
 argtypes = parse_argtypes(data["args"])
 
 return_type = data["return_type"].strip()
 
 style = data["style"]
 
 default_arg = data["default_arg"]
 
 file
 
dict entry = entries[name]
 

Function Documentation

◆ munge_type()

make-target-delegates.munge_type ( str typename)

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

Referenced by write_debugmethod().

◆ parse_argtypes()

make-target-delegates.parse_argtypes ( str typestr)

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

◆ print_class()

make-target-delegates.print_class ( TextIO f,
str class_name,
List[str] delegators,
Dict[str, Entry] entries )

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

References write_declaration().

◆ scan_target_h()

make-target-delegates.scan_target_h ( )

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

◆ write_debugmethod()

make-target-delegates.write_debugmethod ( TextIO f,
str content,
str name,
str return_type,
List[str] argtypes )

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

References munge_type(), and write_function_header().

◆ write_declaration()

make-target-delegates.write_declaration ( TextIO f,
str name,
str return_type,
List[str] argtypes )

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

References write_function_header().

Referenced by print_class().

◆ write_delegator()

make-target-delegates.write_delegator ( TextIO f,
str name,
str return_type,
List[str] argtypes )

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

References write_function_header().

◆ write_function_header()

make-target-delegates.write_function_header ( TextIO f,
bool decl,
str name,
str return_type,
List[str] argtypes )

◆ write_tdefault()

make-target-delegates.write_tdefault ( TextIO f,
str content,
str style,
str name,
str return_type,
List[str] argtypes )

Definition at line 216 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 39 of file make-target-delegates.py.

◆ ARGTYPES

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 77 of file make-target-delegates.py.

◆ argtypes

make-target-delegates.argtypes = parse_argtypes(data["args"])

Definition at line 351 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 47 of file make-target-delegates.py.

◆ current_line

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

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

◆ data

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

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

◆ default_arg

make-target-delegates.default_arg = data["default_arg"]

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

◆ delegators

list make-target-delegates.delegators = []

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

◆ ENDER

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

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

◆ entries

dict make-target-delegates.entries = {}

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

◆ entry

dict make-target-delegates.entry = entries[name]

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

◆ file

make-target-delegates.file

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

◆ INTRO_PART

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

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

◆ m

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

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

◆ METHOD

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 65 of file make-target-delegates.py.

◆ METHOD_TRAILER

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

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

◆ name

make-target-delegates.name = data["name"]

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

◆ NAME_PART

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

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

◆ POINTER_PART

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

Definition at line 43 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 52 of file make-target-delegates.py.

◆ return_type

make-target-delegates.return_type = data["return_type"].strip()

Definition at line 352 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 49 of file make-target-delegates.py.

◆ style

make-target-delegates.style = data["style"]

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

◆ SYMBOL

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

Definition at line 35 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 93 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 58 of file make-target-delegates.py.

◆ TRIGGER

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

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

◆ VIRTUAL_PART

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

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