Changeset 654 for trunk/browsecif.tcl


Ignore:
Timestamp:
Dec 4, 2009 5:09:47 PM (13 years ago)
Author:
toby
Message:

# on 2002/09/24 20:49:58, toby did:
quote reserved "words" (DATA_ LOOP_ SAVE_ STOP_ GLOBAL_)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/browsecif.tcl

    • Property rcs:date changed from 2002/09/05 21:03:37 to 2002/09/24 20:49:58
    • Property rcs:lines changed from +313 -122 to +8 -1
    • Property rcs:rev changed from 1.3 to 1.4
    r650 r654  
    11861186    # if no, are there any square brackets? -- treat them as requiring quotes
    11871187    if {$spaces == -1} {set spaces [string first {[} $value]}
     1188    # are there any reserved strings inside $value? If so, it must be quoted
     1189    if {$spaces == -1} {
     1190        set tmp [string toupper $value]
     1191        foreach s {DATA_ LOOP_ SAVE_ STOP_ GLOBAL_} {
     1192            if {[set spaces [string first $s $tmp]] != -1} break
     1193        }
     1194    }
    11881195    # are there quotes inside the string?
    11891196    set doublequote [string first "\"" $value]
    11901197    set singlequote [string first {'} $value]
    1191     # if we have both types of quotes, use semicolon quoting
     1198    # if we have either type of quotes, use semicolon quoting
    11921199    if {$singlequote != -1 && $doublequote != -1} {set num $l}
    11931200
Note: See TracChangeset for help on using the changeset viewer.