Re: syncolor.e + tokenize.e = an absolute disaster

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...

Like Jim, I'm not sure what +200K refers to. The combination of tokenize.e and syncolor.e are about 1400 lines (including white space and comments) for a total of about 31K.

It's been a while, but IIRC (and I wasn't directly involved), the goal was to move some more old C code into easier to maintain euphoria code. Obviously, the transition has introduced some regressions.

Matt

I stand corrected - 31k, then... syncolor.e sans tokenize.e = 8.3k: 31k/8.3k = 3.74, nearly %375 of the original code size.

Here are some ed.ex routines to deal with syncolor.e's current problems:

-- ed.ex routines to automate insertion of matching closing tokens for 
-- multi-line comments, single quote marks, double quote marks,  
-- & multi-line quote (backtick) marks: 
 
-- Once you insert these routines in the list of elsif clauses  
-- found in the procedure "get_escape", 
-- you can execute them by typing ESC + / or ', ", or `. 
-- You will have to press the return/enter to complete execution of the command, 
-- unless you enter the token in the list of "hot-keys" found in the line: 
 command = key_gets("hcqswnedfrlm/`\'\"", {}) & ' ' 
-- which is located earlier in the procedure. 
 
        elsif command[1] = '/' then                                                            
            add_queue("/*  */" & repeat(ARROW_LEFT,3))                                         
                                                                                               
        elsif command[1] = '\'' then                                                           
            add_queue("\' \'" & repeat(ARROW_LEFT,2))                                          
                                                                                               
        elsif command[1] = '\"' then                                                           
            add_queue("\" \"" & repeat(ARROW_LEFT,2))                                          
                                                                                               
        elsif command[1] = '`' then                                                            
            add_queue("` `" & repeat(ARROW_LEFT,2))       
 

Kenneth Rhodes

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu