Hi Brendan,
Thanks for looking at this.
On 19/12/2018 01:52, Brendan McGrath wrote:
Currently, a vbscript using an identifier that is also a keyword fails with a parser error. For example: Set oLocator = CreateObject("Wbemscripting.SWbemLocator") Set oReg = oLocator.ConnectServer("", "root\default", "", "").Get("StdRegProv")
results in: 0009:fixme:vbscript:parse_script parser failed around L"efault", "", "").Get("StdRegProv")\n"
The 'Get' method here causes the parser error as it is also a vbscript keyword.
This patch treats any token after a '.' as an identifier.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46318 Signed-off-by: Brendan McGrath brendan@redmandi.com
I _think_ this patch is OK - but I don't have a lot of experience with vbscript. There may be a scenario where a keyword can immediately follow a '.'.
I think the issue is more general than an identifier after '.' token. We already have code for similar problem with 'property' keyword (see Identifier rule in parser.y), we probably could extend that. Also jscript has a more complete solution for similar problem (see ReservedAsIdentifier) that you could use as an example.
Also please include some tests in the patch.
Thanks, Jacek