Author Topic: Is there a way to get a crossref list of qb64?  (Read 2742 times)

0 Members and 1 Guest are viewing this topic.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Is there a way to get a crossref list of qb64?
« on: May 06, 2021, 07:29:23 pm »
Since someone, mentioned "lint" for QB64.  Got me to thinking about "Crossref" lists.  Back when I played with assembler.  It was possible to specify Crossref list generation at the end of the listing.  The crossref would list all variables used and what line numbers contained them.  As well as all labels and locations.  It was convenient to find all references and impacts to code.  Things like changing byte to word, became a snap.  You could look at all the cross refs, and figure out things.

Anyway to get this from listing/compiles ?
Or am I barking up an old dead tree ?

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Is there a way to get a crossref list of qb64?
« Reply #1 on: May 06, 2021, 08:27:30 pm »
This sounds like a job for NOVARSEG
Shuwatch!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Is there a way to get a crossref list of qb64?
« Reply #2 on: May 06, 2021, 09:13:25 pm »
I remember doing something like this for variables as an exercise in JB when I first joined and of course oh (one handed interpreter) does this because it is an interpreter though it does not track every variable on every line (and it has only one type variable unless you count multi-value a-strings).
« Last Edit: May 06, 2021, 09:18:20 pm by bplus »

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: Is there a way to get a crossref list of qb64?
« Reply #3 on: May 07, 2021, 05:56:50 am »
I really thought this was a possibility.  The first job of ALL compilers is to identify all variables and labels.  During the pre-compiler phase crossref is generated.  I would not want to do this on my own.  I would be looking at hundreds of hours of coding.  I don't play with C, so I am not sure if crossref is a thing, you can specify.