Overview | 2.1 | 2.2 | 2.3 | 2.4 | 2.5 | 2.6

 

2.2 Generating with a statistical grammar

The grammar can also be used for generating arithmetical expressions.

   0.20  EXP -> F LSQ EXP ]
   0.20  EXP -> E BIN E
   0.35  EXP -> x 
   0.15  EXP -> f
   0.10  EXP -> UN EXP
   0.20    E -> ( EXP )
   0.20    E -> F LSQ EXP ]
   0.20    E -> f
   0.40    E -> x
   0.90    F -> f
   0.10    F -> x
   0.25  BIN -> +
   0.25  BIN -> -
   0.25  BIN -> *
   0.25  BIN -> /
   1.00   UN -> -
   1.00  LSQ -> [

Enter the number of expressions you want to generate:

Then press the generate button or return.


Last update: November 20, 2003. erikt@uia.ua.ac.be