Menu

#129 tokenise() is too lax for TOK_PREPROC_ID

open-works-for-me
nobody
None
1
2003-10-06
2003-10-06
No

The preprocessor's tokenise() function is too
lax when it comes to TOK_PREPROC_ID. Namely it
allows %, %!, %%, or %$ to be followed by an
isidchar(), instead of an isidstart(), and it
doesn't perform a tight check for references
to outer contexts, i.e. %$$id, %$$$id, etc.

Discussion

  • nasm64developer

    nasm64developer - 2003-10-06

    Logged In: YES
    user_id=804543

    Attached find a list of testcases.

    Note that they target a version of NASM which
    supports the "?:" conditional operator, i.e. a
    version in which "?" is not a valid isidstart()
    character, but is a valid isidchar() character.

     
  • nasm64developer

    nasm64developer - 2003-10-06

    testcases

     
  • nasm64developer

    nasm64developer - 2003-10-06

    Logged In: YES
    user_id=804543

    Attached find a diff -u (against 0.98.38) for a fix.

    It shows the required changes in their context.

     
  • nasm64developer

    nasm64developer - 2003-10-06

    fix (here: diff -u)

     
  • nasm64developer

    nasm64developer - 2003-10-06

    Logged In: YES
    user_id=804543

    Attached find a diff -w (against 0.98.38) for a fix.

    It is identical to the diff -u version.

    It merely shows that the required changes are, sans
    whitespace differences, rather minimal.

     
  • nasm64developer

    nasm64developer - 2003-10-06

    fix (here: diff -w)

     
  • nasm64developer

    nasm64developer - 2003-10-06
    • status: open --> open-works-for-me
     
  • nasm64developer

    nasm64developer - 2003-10-06
    • priority: 5 --> 1
     
  • nasm64developer

    nasm64developer - 2003-10-06

    Logged In: YES
    user_id=804543

    The attached fix works for the attached testcases.

    Note that one can always return to the old behavior
    by using %{...}, as demonstrated in those testcases.

     
  • nasm64developer

    nasm64developer - 2005-07-17

    Logged In: YES
    user_id=804543

    SF RFE #1239930 is related

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.