DConf 2013 Day 1 Talk 3: Distributed Caching Compiler for D by Robert Schadek

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Tue May 14 13:12:54 PDT 2013


On Tue, 14 May 2013 17:43:46 +0400
Dmitry Olshansky <dmitry.olsh at gmail.com> wrote:

> 13-May-2013 16:01, Andrei Alexandrescu пишет:
> > Watch, discuss, vote up!
> >
> > http://reddit.com/r/programming/comments/1e8mwq/dconf_2013_day_1_talk_3_distributed_caching/
> >
> >
> 
> Nice one! Reminds me the gory days of our "compiler technologies"
> course :)
> 

Yea, I found it to be a fascinating talk, too.

> Our professor seemed obsessed with tabulated methods as well (Dragon 
> book etc.)

I'm quite partial to "Crafting a Compiler"
<http://www.pearsonhighered.com/educator/product/Crafting-A-Compiler/9780136067054.page>.

I'm not sure it's quite as complete as the dragon book, but it's
somewhat more programmer-friendly and much easier to understand,
whereas the dragon book (as well as all CS theory books that I've seen)
is geared specifically to CS researchers and mathemeticians.


> 
> So e.g. leaf node of int would be:
> 0, int
> No offsets nor sub-trees, content/type tag etc. is marked as int
> 
> Then whole tree (tried to align for reading):
> 
> 1, 0, S | 1, 0, DeclDefs |
>    3, 0, <x>, <y>, Declarator |
>      1, 0, BasicType | 0, int
>      1, 0, Identifier | 0, main
>      1, 0, DeclDefs | 1, 0, DeclDef | 1, 0 ReturnStatement | 0, "1"
> 

Interesting.

> 
> Will comment on the DFA & Unicode some time later, it's a neat topic
> in its own right.
> 

Somewhat of a naive approach, but transitioning on character ranges
instead of characters will drastically reduce the storage requirements
for generalized unicode lexer, at least for any remotely typical lexer
(there can be some pretty bad worst-case-scenarios, but nobody ever
defines a token like [acegikmoq...]+).

Although I imagine it's not nearly as fast as a pure table since you
have those extra conditionals for each character of input. FWIW.




More information about the Digitalmars-d-announce mailing list