Author Topic: Inline commenting on *.list files  (Read 5861 times)

0 Members and 1 Guest are viewing this topic.

Offline SSOWorld

  • Full Member
  • ***
  • Posts: 222
  • Last Login:Yesterday at 09:35:08 pm
Inline commenting on *.list files
« on: December 01, 2016, 10:25:22 am »
I know this is a feature not many would use but does the parser handle inline commenting?

ex:
Code: [Select]
IL I-90 WI/IL I-294  #NW Tollway
Just putting my $.02 out there.
Completed:
* Systems: DC, WI
* by US State: AR: I&; AZ: I; DE: I; DC: I, US, DC; IL: I; IN: I*; IA: I, KS: I; MD: I, MA: I, MI: I; MN: I; MO: I*; NE: I; NJ, I; OH: I; RI: I; SD: I; WA: I; WV: I; WI: I,US,WI; (AR, IN pending expansions.)

*Previously completed

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2732
  • Last Login:Today at 10:27:44 am
Re: Inline commenting on *.list files
« Reply #1 on: December 01, 2016, 11:43:29 am »
I know this is a feature not many would use but does the parser handle inline commenting?

ex:
Code: [Select]
IL I-90 WI/IL I-294  #NW Tollway
Just putting my $.02 out there.

Not at this time.  Any line that doesn't split into 4 space-separated fields generates an "Incorrect format line" message in your log file and is otherwise ignored.  However, full-line comments are supported.  Any line in a .list that begins with # is silently ignored.

Offline SSOWorld

  • Full Member
  • ***
  • Posts: 222
  • Last Login:Yesterday at 09:35:08 pm
Re: Inline commenting on *.list files
« Reply #2 on: December 01, 2016, 11:50:00 am »
Understood. 

I won't stress over this one.  Would be a nice enhancement, but the full-line does the job. 8)
Completed:
* Systems: DC, WI
* by US State: AR: I&; AZ: I; DE: I; DC: I, US, DC; IL: I; IN: I*; IA: I, KS: I; MD: I, MA: I, MI: I; MN: I; MO: I*; NE: I; NJ, I; OH: I; RI: I; SD: I; WA: I; WV: I; WI: I,US,WI; (AR, IN pending expansions.)

*Previously completed

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2732
  • Last Login:Today at 10:27:44 am
Re: Inline commenting on *.list files
« Reply #3 on: December 01, 2016, 12:46:26 pm »
Understood. 

I won't stress over this one.  Would be a nice enhancement, but the full-line does the job. 8)

OK, good.  It would be trivial to add to the code, and my only reason not to do so is that I hesitate to add another operation to the processing of the 180,000 lines of list file entries.  Some time, I'll see how much longer that would take.  It might not be bad, especially if I stripped out comments as a preprocessing step.

Offline rschen7754

  • Jr. Member
  • **
  • Posts: 50
  • Gender: Male
  • Last Login:February 28, 2024, 12:49:09 am
    • Rschen7754
Re: Inline commenting on *.list files
« Reply #4 on: December 03, 2016, 01:10:03 am »
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4555
  • Last Login:Yesterday at 04:04:16 pm
Re: Inline commenting on *.list files
« Reply #5 on: December 03, 2016, 02:47:24 am »
I've submitted an issue on GitHub so that the wish won't get lost: https://github.com/TravelMapping/DataProcessing/issues/37.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4234
  • Last Login:February 13, 2024, 07:19:36 pm
  • I like C++
Re: Inline commenting on *.list files
« Reply #6 on: December 03, 2016, 03:04:53 pm »
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)
Just as easily done with full-line comments though. May not be in a preferred, inline, format, but still...
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1627
  • Last Login:Today at 10:09:32 am
Re: Inline commenting on *.list files
« Reply #7 on: December 03, 2016, 03:14:04 pm »
I would appreciate it too, so that I don't second-guess myself if I don't remember why a line is there.  :)
Just as easily done with full-line comments though. May not be in a preferred, inline, format, but still...
Not if you maintain your .list as a spreadsheet and want to be able to sort the data.
Clinched:

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4234
  • Last Login:February 13, 2024, 07:19:36 pm
  • I like C++
Re: Inline commenting on *.list files
« Reply #8 on: December 03, 2016, 04:28:00 pm »
Not if you maintain your .list as a spreadsheet and want to be able to sort the data.
Ooh. Valid point!
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2732
  • Last Login:Today at 10:27:44 am
Re: Inline commenting on *.list files
« Reply #9 on: July 08, 2018, 11:05:05 pm »
I thought of a simple and efficient way to support this, so it's in.

Valid comments are now full-line ones (whole line starts with '#') or lines with 4 fields followed by a space followed by one or more additional fields, the first of which (and 5th on the line) must start with '#'.