Anyway to catch module with comments in module header?
Posted: 25.12.2015 07:17
How can I catch modules having the following 2 structures :
I setup the block header rule conditions like this:
This catches the first case (m1), but not m2.
I also tried adding a skip <comment> but it doesn't work:
I also tried using Grammar (don't know if that's possible), but examples on Grammar is hard to find (I searched all lexers and found only C# and Pascal have very limited examples).
.
Code: Select all
module m1(a,b){
......
}
module m2(a,b) // comment
{
......
}
Code: Select all
0 = <symbol> = {
1 = <symbol> = )
2 Skip all other tokens
3 = <symbol> = (
4 = <identifier>
5 = <identifier> = module
I also tried adding a skip <comment> but it doesn't work:
Code: Select all
0 = <symbol> = {
1 Skip <comment> // <==== added
2 = <symbol> = )
3 Skip all other tokens
4 = <symbol> = (
5 = <identifier>
6 = <identifier> = module
.