Help needed for creating a new parser in functionList.xml
-
Hi
I am trying to write a parser in functionList.xml for a CORBA idf file.
The test file is (test.idl) contains:
module Test { interface EntityRoot { }; /* comment 1 interface Test1 { */ interface Entity1 : EntityRoot { void setName1 ( in string value // comment 2 setName3 ( ) raises(ServerError); void changePosition1 ( in long value ) raises(ServerError); }; interface Entity2 : EntityRoot { void setName2 ( in string value // comment 2 ) raises(ServerError); void changePosition2 ( in long value ) raises(ServerError); }; };I added this line within <associationMap>:
<association id=“corba_syntax” userDefinedLangName=“CORBA” />The following parser is working, giving me a list of interface, struct and enum:
<parser displayName="CORBA" id="corba_syntax" commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"> <function mainExpr="(interface|struct|enum)\s+\w+\s*(:\s+\w+\s*)?\{" > <functionName> <nameExpr expr="(interface|struct|enum)\s+\w+" /> </functionName> </function> </parser>But this on is giving nothing but the name of the file:
<parser displayName="CORBA" id="corba_syntax" commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)" > <classRange mainExpr="(interface|struct|enum)\s+\w+\s*(:\s+\w+\s*)?\{" openSymbole ="\{" closeSymbole="\}" > <className> <nameExpr expr="(interface|struct|enum)\s+\w+" /> </className> <function mainExpr="\s+\w+\s*\(" > <functionName> <funcNameExpr expr="\w+" /> </functionName> </function> </classRange> </parser>What am I doing wrong?
Thanks
Andre -
I found a solution.
<parser displayName="CORBA" id="corba_syntax" commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)" > <classRange mainExpr="interface\s+\w+\s*(:\s+\w+\s*)?\{" openSymbole ="\{" closeSymbole="\}" > <className> <nameExpr expr="interface\s+\w+" /> </className> <function mainExpr="\w+\s+\w+\s*\(" > <functionName> <funcNameExpr expr="\w+\s*\(" /> <funcNameExpr expr="\w+" /> </functionName> </function> </classRange> <function mainExpr="(struct|enum)\s+\w+\s*(:\s+\w+\s*)?\{" > <functionName> <nameExpr expr="(struct|enum)\s+\w+" /> </functionName> </function>> </parser>
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login