Null regex not allowed Missing block

Viewed 94

Got this simple grammar:

grammar H1 {
    token TOP { <h1> }
    token h1 { \#  }
}

Results in: Null regex not allowed Missing block

Google turns up next to nothing on it.

1 Answers

Still not sure why escaping doesn't work, but this does:

grammar H1 {
    token TOP { <h1> }
    token h1 { '#'  }
}
Related