
I'm having trouble getting my Lua grammar to recognize assignment of the empty string to a variable as syntactically valid, e.g.:
resultString = ""
It successfully enters and exits the DoubleQuoteString lexical scope, but there's no token to match between the start pattern group explicit pattern " and end pattern group explicit pattern ".
I've tried using regex pattern groups in the DoubleQuoteString state to catch the empty string, but neither ^$ nor ^.{0}$ nor [^"]* work.
I also tried adding an explicit empty string pattern match to the default lexical scope as "" with the usual look-ahead of {NonWord}|\z, but instead of matching the two characters and consuming them as an empty string token, it just enters the DoubleQuoteString state.
How can I match the empty string as a token so that I can recognize its inclusion as valid inside an assignment statement?