I'm writing a parser, one of it's parts should match and retrieve double-quoted string content It yields only quotation mark, but not whole string. For unquoted ones everything works well
Here is the corresponding rule:
def doubleQuoted: Rule1[StringWrapper] = rule { //same for singlequoted
"\"" ~ zeroOrMore( noneOf("\"\\") | ("\\" ~ "\"") ) ~ "\"" ~> StringWrapper
}
The problem is:
- input -> "directive"
- expected output -> StringWrapper("\"directive\"")
- real output -> StringWrapper("\"")