Author Topic: '~' BNOT doesn't work  (Read 1663 times)

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
'~' BNOT doesn't work
« on: July 04, 2005, 08:06:54 PM »
The '~' synonym for BNOT doesn't work (I like to say it ~works :-)). I think I've concluded that this happens iff more than one '~' is used for BNOT in a file (basically, it looks like WeiDU is interpreting everything between one BNOT and the following BNOT as a single string). This:
Code: [Select]
BACKUP "tempsave"
AUTHOR "devSin"

BEGIN "Test-o" INSTALL_BY_DEFAULT NO_LOG_RECORD

COPY_EXISTING "AATAQAH.CRE" "temp"
SET value = ~0x0
PATCH_PRINT "%value%"
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING "AATAQAH.CRE" "temp"
SET value = ~0x0
PATCH_PRINT "%value%"
BUT_ONLY_IF_IT_CHANGES
Gives us this:
Code: [Select]
Mainframe:/Applications/Baldur's Gate II akay$ weidu ~/Desktop/Setup.tp2
[weidu] WeiDU version 185
[./Chitin.key] 182 BIFFs, 41794 resources
[./dialog.tlk] 74274 string entries
[WeiDU.log] parsed

[/Users/akay/Desktop/Setup.tp2] PARSE ERROR at line 13 column 8-18
Near Text: PATCH_PRINT
        syntax error

[/Users/akay/Desktop/Setup.tp2]  ERROR at line 13 column 8-18
Near Text: PATCH_PRINT
        Parsing.Parse_error
ERROR: parsing [/Users/akay/Desktop/Setup.tp2]: Parsing.Parse_error
ERROR: problem parsing TP file [/Users/akay/Desktop/Setup.tp2]: Parsing.Parse_error

FATAL ERROR: Parsing.Parse_error

Press ENTER to exit.

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
Re: '~' BNOT doesn't work
« Reply #1 on: July 05, 2005, 01:49:37 AM »
Ah, of course. I should have remembered. Maximal munch lexing.

No solution. Give your second-favorite BNOT syntax and we'll change to that.


Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: '~' BNOT doesn't work
« Reply #2 on: July 05, 2005, 02:11:25 AM »
I'm thinking it should just be removed. I'm the only person who cares, so I don't think anybody is going to cry foul if it just gets a silent funeral.

I do want a simpler BNOT operator, but we're down to absolute garbage when it comes to unreserved characters and I'm not willing to pollute the syntax just to get it. The best course of action in this case really is NoAction().

Barring that, $ ' and ` are really the only characters left. The hope is to leave ' and ` open for bracketing (or the eventual other-other string delimiter), and using $ for BNOT doesn't feel right.
« Last Edit: July 05, 2005, 03:57:05 AM by devSin »

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
Re: '~' BNOT doesn't work
« Reply #3 on: July 05, 2005, 01:33:01 PM »
Done.

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: '~' BNOT doesn't work
« Reply #4 on: July 06, 2005, 11:27:08 AM »
OK, so I lied. The ` not-tilde is actually working out quite well with my current font. Unless you can think of a pressing reason to hold it open, I think ` is close enough to ~ (it's the same key, at least) that we can get away with using it for BNOT.

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: '~' BNOT doesn't work
« Reply #5 on: August 07, 2005, 11:36:22 PM »
Just to drive the point home, here's the -p0 patch to enable my BNOT synonym.

` for BNOT in TP2 (-p0)

It only really works with certain fonts at certain sizes. Whatever. It's better than nothing.
« Last Edit: October 07, 2005, 07:21:20 PM by devSin »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: