|
![](/i/fill.gif) |
Nieminen Juha wrote:
>
> PoD <pod### [at] merlin net au> wrote:
> : I'm beginning to think that #static as a type of #declare would be more
> : feasible, after all it is only usefull for things which take a long time
> : to parse such as complex unions and meshes.
>
> You forget that you can make #while-loops which take hours to parse although
> it creates only some simple objects.
You could make a #while loop which takes days to parse and creates no
objects at all
>
> : When parsing a #static declaration, check if the name is already in the
> : symbol table. If it is then skip to the end of the declaration.
>
> : How do you know what's the end of the declaration?
> : Firstly all declarations should end with a semi colon. Then each
> : [#declare|#local|#static] would match up with a semi colon.
>
> You still have to parse the entire code to see where is the matching
> semicolon.
If a #while loop is inside a #static declaration, you'd only have to
look for the matching #end which would not take long at all.
#include would be totally ignored.
> There's no way to avoid parsing other than copying the whole source code
> to memory without the static parts of it and then parse this copy.
What difference does reading it into memory make?
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |