tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] GAS symbols


From: Sergey Korshunoff
Subject: Re: [Tinycc-devel] GAS symbols
Date: Tue, 5 Apr 2016 14:31:16 +0300

> but I don't see where do you restore its prev value for the rest of the input?
No need to do this.  There is additional explicit check for '.'

    parse_num:
        for(;;) {
            t = c;
            cstr_ccat(&tokcstr, c);
            PEEKC(c, p);
            if (!((isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
                  || c == '.'
                  || ((c == '+' || c == '-')
                      && (t == 'e' || t == 'E' || t == 'p' || t == 'P')
                      )))
                break;
        }

All other places check for IS_SPC.

PS: There is much cleaner solution (but it is a bit slower): change
isidnum_table when we change parse_flags (in #define)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]