PEG rule to identify function protoype
问题 I am trying to create a parser that can parse C code. My use case to parse a buffer that may contain a function prototype. I want to push this function name into a symbol table. I am new to Spirit and PEG and I am trying to figure out how I can write a rule that can identify function prototypes. This is my current implementation: auto nameRule = x3::alpha >> *x3::alnum; auto fcnPrototypeRule = nameRule >> *nameRule; auto fcnRule = fcnPrototypeRule >> space >> x3::char_('(') >> -(nameRule % ',