#parser #vb6 #analyzer #resources

vb6parse

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

5 releases (3 breaking)

0.4.1 Sep 30, 2024
0.4.0 Sep 30, 2024
0.3.0 Sep 25, 2024
0.2.0 Sep 20, 2024
0.1.0 Sep 11, 2024

#1319 in Parser implementations


Used in aspen

Custom license

450KB
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
~125K SLoC