Class FunctionSignatureParser

java.lang.Object
ghidra.app.util.parser.FunctionSignatureParser

public class FunctionSignatureParser extends Object
Class for parsing function signatures. This class attempts to be much more flexible than a full parser that requires correct C or C++ syntax. To achieve this, it scans the original function signature (if present) for names that would cause parse problems (parens, brackets, asterisk, commas, and spaces). If it finds any problem names, it looks for those strings in the text to be parsed and if it finds them, it replaces them with substitutes that parse easily. Then, after parsing, those replacement strings are then restored to their original values.

Some examples of valid c++ that would fail due to the current limitations:

void foo(myclass<int, float> x) - fails due to comma in x's data type name int operator()(int x) - fails due to parens in function name unsigned int bar(float y) - fails due to space in return type name

Note: you can edit signatures that already have these features as long as your modifications don't affect the pieces containing parens, commas or spaces in their name.