Click here to Skip to main content
15,917,953 members

Comments by lbesteban (Top 1 by date)

lbesteban 2-Dec-16 12:59pm View    
Yep, you're right, my mistake reading it
"Given a text string, convert the tabs to spaces. "

Proper solution is to print only one space. which reduces 3 bytes.

My bad, too anxious to see that actually something i had not used since left university in late 90's could be so quick to solve this.

******************** File a.lex ********************
%%
\t printf(" ");
%%
******************** end of a.lex ********************

And format is correct, this does not have comments

Yes, in flex you can have comments but a parser is defined as

[block of definitions]
%%
[block of token recognition]
%%
[a program logic]

Comments are like in any C language when enclosed in between %{ [...code lines... ]%}