I created a set of parsing rules for verilog (by editing the XML file, see below if you want it) but I'm having a problem with functionlist recognizing the language. When NP++ correctly identifies the language as Verilog, FL indicates "No Rule Defined"… BUT if I tell NP++ that the file is really a Matlab file functionlist happily parses it as Verilog! Of course all the syntax highlighting and code folding are broken in NP++ however. Has anybody a solution for this? I tried the compact menu/ not compact menu approach listed in the "Adding new language to function list" without any success.
I created a set of parsing rules for verilog (by editing the XML file, see below if you want it) but I'm having a problem with functionlist recognizing the language. When NP++ correctly identifies the language as Verilog, FL indicates "No Rule Defined"… BUT if I tell NP++ that the file is really a Matlab file functionlist happily parses it as Verilog! Of course all the syntax highlighting and code folding are broken in NP++ however. Has anybody a solution for this? I tried the compact menu/ not compact menu approach listed in the "Adding new language to function list" without any success.
Thanks,
DWK
Here are my FL rules for Verilog:
<Language name="Verilog" imagelistpath="C:\Program Files (x86)\Notepad++\plugins\Config\Verilog.bmp">
<CommList param1="//" param2="" />
<Group name="MODULE" subgroup="TASKS" icon="4" child="18" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="*module+" regexfunc="+" regexend="" bodybegin="" bodyend="endmodule" sep="" />
</Group>
<Group name="input" subgroup="" icon="10" child="13" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="*XXXX+" regexfunc="+" regexend="" bodybegin="" bodyend="endmodule" sep="" />
</Group>
<Group name="Section" subgroup="" icon="2" child="9" autoexp="4" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="//\s*\t\t*" regexfunc="*" regexend="" bodybegin="" bodyend="" sep="" />
</Group>
<Group name="PORT-INPUT" subgroup="" icon="10" child="0" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="input[\s\0-9\:]+" regexfunc="+" regexend="" bodybegin="" bodyend="" sep="" />
</Group>
<Group name="PORT-OUTPUT" subgroup="" icon="13" child="1" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="output[reg\s\0-9\:]+" regexfunc="+" regexend="" bodybegin="" bodyend="" sep="" />
</Group>
<Group name="PARAMETER" subgroup="" icon="14" child="5" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="parameter\s+" regexfunc="*" regexend="" bodybegin="" bodyend="" sep="" />
<Rules regexbeg="localparam+" regexfunc="*" regexend="" bodybegin="" bodyend="" sep="" />
</Group>
<Group name="TASKS" subgroup="" icon="19" child="7" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="task\s+" regexfunc="*" regexend="" bodybegin="" bodyend="endtask" sep="" />
</Group>
<Group name="ALWAYS" subgroup="" icon="2" child="18" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="always" regexfunc=".*" regexend="begin" bodybegin="" bodyend="" sep="" />
</Group>
<Group name="Net" subgroup="" icon="3" child="9" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="wire[\s\0-9\:]+" regexfunc="*" regexend="" bodybegin="" bodyend="" sep="" />
</Group>
<Group name="Register" subgroup="" icon="17" child="9" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="" keywords="">
<Rules regexbeg="reg\s+[\s\0-9\:]+" regexfunc="*" regexend="[\s\0-9\:,;]+" bodybegin="" bodyend="" sep="" />
</Group>
</Language>
the regular expressions that has only * or + are incorrect. There should be an atomic before them for example: .* or .+