bison-patches
[Top][All Lists]
Advanced

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

Optimisations


From: Nils Hasler
Subject: Optimisations
Date: Wed, 27 Oct 2004 23:34:25 +0200

Hi.  
  
I just finished a patch that optimises the grammar 
as mentioned in the TODO. Namely  
grammars of the form  
rule: nonterminal  
    ;  
nonterminal: some stuff  
           | or other  
           ;  
get reduced to  
rule: some stuff  
    | or other  
    ; 
so long as there  are no actions at nonterminal. 
The resulting tables are always smaller and thus 
faster than the unoptimised ones. 
Unfortunately some of the warnings and errors get 
rather unintuitive as the corresponding rule 
cannot be identified exactly any more. 
The feature is thus only enabled if the new 
command line option -O or --optimise is passed. 
5 of the regression tests fail if optimisation is  
enabled but I believe that these failures are  
benign. The tables are different or the conflicts 
appear at different places... 
 
I hope I diffed in the right direction... 
 
I would be glad if someone could have a look at 
it. 
 
Cheers, 
Nils 

Attachment: opt.diff
Description: Text Data


reply via email to

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