Page 6 of 6
Re: Analyzer 2.0b for V4
Posted: Mon Dec 31, 2018 9:10 pm
by #NULL
changes.txt wrote:2018-12-31, analyzer version 3.2
- fixed false detection of line concatenation via colon in !asm lines
- EnumerationBinary now recognized as a keyword
- files 'common.pb' and 'mergeTool.pb' now UTF-8 with BOM like the other files
Download:
http://www.wannabephoenix.de/PB/analyze ... alyzer.zip
I can now run that code with analyzer. But the asm lines are ignored and not measured individually. I guess that's reasonable

But of course the calls of the functions containing asm are being measured as usual. Or you could measure asm as a block.
Re: Analyzer 2.0b for V4
Posted: Tue Jan 01, 2019 2:30 pm
by Little John
#NULL wrote:I can now run that code with analyzer.
Same here. Thank you for the update!
Unfortunately, now I'm encountering another issue.
When running this small demo program (with PB 5.70 beta 4 on Windows 10)
Code: Select all
XIncludeFile #PB_Compiler_Home + "..\libs\string.pbi"
x = 3
then I get this result
Analyzer 3.2 For PB570
loading preferences : C:\Users\LJ\Desktop\Analyzer\analyzer.ini
file : C:\Users\LJ\AppData\Local\Temp\PB_EditorOutput.pb
compile/run with analyzer?
[Continue]
mainfile : C:\Users\LJ\Desktop\analyzer_test.pb
base include path : C:\Users\LJ\Desktop\
merging include files..
mergeTool
------------
mainfile : C:\Users\LJ\AppData\Local\Temp\PB_EditorOutput.pb
orig. file : C:\Users\LJ\Desktop\analyzer_test.pb
baseIncPath : C:\Users\LJ\Desktop\
------------
fileName : C:\Users\LJ\Desktop\PB_Compiler_Home + "..\libs\string.pbi
baseIncPath : C:\Users\LJ\Desktop\PB_Compiler_Home + "..\libs\
can't read file : C:\Users\LJ\Desktop\PB_Compiler_Home + "..\libs\string.pbi
failed to include file : C:\Users\LJ\Desktop\PB_Compiler_Home + "..\libs\string.pbi
------------
------------
merge failed.
merge failed. program will compile/run without analyzer.
The red paths are wrong, the compiler is located elsewhere. Additionally, the red paths contain only one (i.e. unbalanced) quote.
I also stumbled across another small issue.
Normally, I don't use
Code: Select all
XIncludeFile #PB_Compiler_Home + "..\libs\string.pbi"
as above, but
Code: Select all
XIncludeFile #PB_Compiler_Home + "../libs/string.pbi"
Using forward slashs, the code runs without modifications on Windows and Linux.
It seems that Analyzer doesn't like that on Windows. After changing the above code to
Code: Select all
XIncludeFile #PB_Compiler_Home + "../libs/string.pbi"
x = 3
I get this result
baseIncPath : C:\Users\LJ\Desktop\PB_Compiler_Home + "../libs/\
I don't know whether this causes a problem, or whether this is only a cosmetic issue in the output.
Re: Analyzer 2.0b for V4
Posted: Fri Jan 18, 2019 8:20 pm
by #NULL
changes.txt wrote:2019-01-18, analyzer version 3.3
- include statements with basic string concatenation are supported by the merge tool
- constant #PB_Compiler_Home in include statements is being resolved by the merge tool
- new preferences setting 'lastPbToolCompiler'
Download:
http://www.wannabephoenix.de/PB/analyze ... alyzer.zip
#PB_Compiler_Home and string concatenation should work now in include statements.
The closing of the path (the
../libs/\ issue) should now detect if the path is already closed with a forward slash on Windows. Not sure if that would have been a problem (repeated path separators might just be ignored by Windows), it didn't get that far with the unresolved compiler home.
Re: Analyzer 2.0b for V4
Posted: Sat Jan 19, 2019 7:07 pm
by m4u
Great job. Thank you.
Re: Analyzer 2.0b for V4
Posted: Sun Jan 20, 2019 9:56 am
by Little John
#NULL, many thanks for all your work!
Unfortunately, this new version still does not work for me.
The following snippet shows the problem.
Code: Select all
DeclareModule Math
#Epsilon = 0.000001
Macro AreSame (_a_, _b_, _eps_=Math::#Epsilon)
; for comparing floating point numbers
Bool(Abs((_a_)-(_b_)) < _eps_)
EndMacro
EndDeclareModule
Module Math
EndModule
Debug Math::AreSame(0.0001000, 0.0001001)
Analyzer wrote:Zeile 794: Syntax-Fehler.
Lines 794 and 795 in "PB_EditorOutput.pb" read:
Code: Select all
Macro AreSame (_a_, _b_, _eps_=Math
#Epsilon)
Re: Analyzer 2.0b for V4
Posted: Sun Jan 20, 2019 11:49 am
by #NULL
I forgot
mod::#const
changes wrote:2019-01-20, analyzer version 3.4
- detect module operator (instead of spitting the line) if followed by '#' (i.e. 'mod::#const')
Should work now.
BTW, fun fact, valid PB (or lets say it works, also with module):
Code: Select all
# con1 = 111
Debug # con1
Debug Defined(con1, #PB_Constant)
Debug ""
Re: Analyzer 2.0b for V4
Posted: Sun Jan 20, 2019 1:03 pm
by Little John
Runs fine now here ... very cool!
Thanks a lot!
Re: Analyzer 2.0b for V4
Posted: Sun Jan 27, 2019 10:07 pm
by Little John
Hi,
I'm sorry for reporting an issue again.
#NULL wrote:- detect module operator (instead of spitting the line) if followed by '#' (i.e. 'mod::#const')
There still seems to be a problem when the module operator is followed by '*'.
Here is a small test code, extracted from my ListSort module:
Code: Select all
DeclareModule CS
NewList *ptr()
Macro SortListAny (_list_)
ForEach _list_
AddElement(CS::*ptr())
CS::*ptr() = @ _list_
Next
EndMacro
EndDeclareModule
Module CS
EndModule
NewList Foo()
CS::SortListAny(Foo())
Re: Analyzer 2.0b for V4
Posted: Mon Jan 28, 2019 11:33 am
by #NULL
No need to be sorry

. I'm happy to improve it. Thanks for testing and reporting!
changes wrote:2019-01-28, analyzer version 3.5
- detect module operator if followed by '*' (i.e. 'mod::*ptr')
Re: Analyzer 2.0b for V4
Posted: Tue Jan 29, 2019 8:00 am
by Little John
Thank you for the new version 3.5!

Re: Analyzer 2.0b for V4
Posted: Mon Nov 25, 2019 1:56 pm
by Fredi
I using v3.5 with PB5.71 but when run any code get this error message in Analyzer:
Code: Select all
no utf-8 bom found in template.
program will compile/run without analyzer.
Tested at PB both file format encoding "Plain Text" and "Utf8" and result is same
what's the problem?
Re: Analyzer 2.0b for V4
Posted: Mon Nov 25, 2019 5:19 pm
by #NULL
I just tried with the download from above (analyzer 3.5) on Linux and Windows. I tried both the binary/executable that comes with the download as well as recompiling analyzerTool.pb to a new binary/executable to use as a tool. Everything seems to work.
Is it possible you opened analyzerRuntime.pb and accidentally saved it in another format? Does the precompiled binary/executable work?