From: Brendan McGrath Subject: Re: [PATCH v2 1/2] vbscript/tests: Test 'Get' keyword used as id Message-Id: <31549ede-6c3c-def8-4078-0654ad7de72b@redmandi.com> Date: Wed, 13 Feb 2019 11:33:12 +1100 In-Reply-To: <55a2b4a6-a818-d5d4-04b9-846080d5824f@codeweavers.com> References: <288c0b2d-0ac0-c953-b5d8-34559711b08b@codeweavers.com> <20190210004524.21594-1-brendan@redmandi.com> <55a2b4a6-a818-d5d4-04b9-846080d5824f@codeweavers.com> I tried 'Dim Get' and 'Get = "xx"' in Windows, but they both create a "compilation error". So I think 'Get' can be used as a Function on an external object - but maybe can not be used as a declaration in vbscript. I'm not really familiar with the grammatical notation of vbscript - but I did find this: https://rosettacode.org/wiki/BNF_Grammar#VBScript It looks like after a 'dot', all the Keywords can be used (referred to as a QualifiedIDTail in the link above), but after a 'Dim', only an ExtendedID can be used (which only includes a subset of Keywords referred to as 'SafeKeywordID' - which includes 'Property'). So I think I should only be including the SafeKeywordIDs as an Identifier (which does not include 'Get', 'Set' or 'Let'). For items after a dot, I guess I should introduce a new token (maybe called DotIdentifier) which will include all the Keywords? I believe I would therefore need to use an external object to test those. On 12/2/19 10:45 pm, Jacek Caban wrote: > Hi Brendan, > > On 2/10/19 1:45 AM, Brendan McGrath wrote: >> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46318 >> Signed-off-by: Brendan McGrath >> --- >>   dlls/vbscript/tests/run.c | 4 ++++ >>   1 file changed, 4 insertions(+) >> >> diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c >> index 191f5a79a0..bc3e0742df 100644 >> --- a/dlls/vbscript/tests/run.c >> +++ b/dlls/vbscript/tests/run.c >> @@ -2406,6 +2406,10 @@ static void run_tests(void) >>       CHECK_CALLED(global_success_d); >>       CHECK_CALLED(global_success_i); >>   +    hres = parse_script_ar("Set oLocator = >> CreateObject(\"Wbemscripting.SWbemLocator\")\r" >> +                           "Set oReg = oLocator.ConnectServer(\"\", >> \"root\\default\", \"\", \"\").Get(\"StdRegProv\")"); >> +    todo_wine ok(hres == S_OK, "parse_script failed: %08x\n", hres); > > > Please integrate the test into existing lang.vbs. Note that you don't > really need to create external objects to test that. You could, for > example, try declare a variable called 'get'. > > > Thanks, > > Jacek >