Dear tiky,
I am not sure what you mean by "Rule_*", as that does not appear in
the DLL source code. If you have the DLL and a compiled CGT file, you
should be able to
1) Make a new VB project
2) Add a reference to GOLD Parser dll
3) paste in the following code, changing the CGT and text file to ones
that match your CGT and source text
4) run the sub (i.e. add a button or something that calls it from VB,
or F5 if VBA)
Sub testCGT()
Dim gpt As GOLDParserEngine.GOLDParser
Set gpt = New GOLDParserEngine.GOLDParser
gpt.LoadCompiledGrammar "test.cgt"
Debug.Print "toks: " & gpt.TokenCount
Debug.Print "rules " & gpt.RuleTableCount
Debug.Print "symbols " & gpt.SymbolTableCount
gpt.OpenFile "C:\tmp.txt"
Dim RES As GPMessageConstants
RES = gpt.Parse
Do While RES <> gpMsgNotLoadedError And RES <> gpMsgAccept And RES
<> gpMsgSyntaxError And RES <> gpMsgLexicalError
RES = gpt.Parse
If Not gpt.CurrentToken Is Nothing Then
Debug.Print "tok: " &
gpt.CurrentToken.Name
Else
Debug.Print "tok: Nothing"
End If
Loop
End Sub