#parser #vb6 #analyzer #resources

vb6parse

vb6parse is a library for parsing and analyzing VB6 code, from projects, to controls, to modules, and forms

3 releases (breaking)

new 0.3.0 Sep 25, 2024
0.2.0 Sep 20, 2024
0.1.0 Sep 11, 2024

#1025 in Parser implementations

Download history 99/week @ 2024-09-05 56/week @ 2024-09-12 377/week @ 2024-09-19

532 downloads per month
Used in aspen

Custom license

445KB
10K SLoC

Goals:

VB6Parse aims to be a complete, end-to-end parser library for VB6. Including, but not limited to:

  • (*.vbp) VB6 project files.
  • (*.bas) VB6 module files.
  • (*.vbw) VB6 windows files for determining editor windows when they are opened.
  • (*.frm) VB6 Forms.
  • (*.frx) VB6 Form Resource files.
  • (*.dsx) VB6 Data Environment files.
  • (*.dsr) VB6 Data Environment Resource files.
  • (*.cls) VB6 Class files.
  • (*.ttx) Crystal Report files.
  • (*.ctl) User Control files.
  • (*.dob) User Document files.

Current support:

First work has focused on the (vbp) project files since is the method to discover all other files that should be linked/referenced within a project.

(*.vbp) VB6 Project file parser feature support:
  • Project Types
    • Exe
    • Control
    • OleExe
    • OleDll
  • References
  • Objects
  • Modules
  • Designers
  • Classes
  • Forms
  • UserControls
  • UserDocuments
  • ResFile32 - Partial support. Default value not correctly handled.
  • IconForm - Partial support. Default value not correctly handled.
  • Startup - Partial support. Default value not correctly handled.
  • HelpFile - Partial support. Default value not correctly handled.
  • Title - Partial support. Default value not correctly handled.
  • ExeName32 - Partial support. Default value not correctly handled.
  • Command32 - Partial support. Default value not correctly handled.
  • Name - Partial support. Default value not correctly handled.
  • HelpContextID - Partial support. Default value not correctly handled.
  • CompatibleMode - Partial support. Default value not correctly handled.
  • NoControlUpgrade - Full support for the 'ActiveX Control Upgrade' option, including the default or empty reverting to true.
  • MajorVer - Partial support. Default value not correctly handled.
  • MinorVer - Partial support. Default value not correctly handled.
  • RevisionVer - Partial support. Default value not correctly handled.
  • AutoIncrementVer - Partial support. Default value not correctly handled.
  • ServerSupportFiles
  • VersionCompanyName
  • VersionFileDescription
  • VersionLegalCopyright
  • VersionLegalTrademarks
  • VersionProductName
  • CondComp
  • CompilationType
  • OptimizationType
  • NoAliasing
  • CodeViewDebugInfo
  • FavorPentiumPro(tm) - Yes, this is exactly what this looks like inside the project file, '(tm)' and all.
  • BoundsCheck
  • OverflowCheck
  • FlPointCheck
  • FDIVCheck
  • UnroundedFP
  • StartMode
  • Unattended
  • Retained
  • ThreadPerObject
  • MaxNumberOfThreads
  • DebugStartOption
  • AutoRefresh
(*.cls) VB6 Class file parser feature support:
  • Header
  • VB6 Token stream lexed
(*.bas) VB6 module file parser feature support:
  • Header
  • VB6 Token stream lexed

VB6Project API:

  • Unit Testing (partial).
  • Integration/End-to-End Testing.
  • Benchmarking.
  • Top level API finalization.
  • Documentation.
  • Examples.

Test:

Be sure to use git submodule update --init --recursive to get all integration test submodule data.

Dependencies

~7MB
~123K SLoC