Commit 5fe2019f authored by POTTIER Francois's avatar POTTIER Francois

Add a new test, exercising intensive inlining.

parent ae7ea4b7
Grammar has 1 nonterminal symbols, among which 1 start symbols.
Grammar has 1 terminal symbols.
Grammar has 1 productions.
nullable(fib) = false
first(fib) = A
minimal(fib) = (* 55 *) A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
follow(fib) = #
Built an LR(0) automaton with 57 states.
The grammar is SLR(1).
Built an LR(1) automaton with 57 states.
2 out of 57 states have a default reduction.
0 out of 57 states are represented.
0 out of 5 symbols keep track of their start position.
0 out of 5 symbols keep track of their end position.
2 out of 2 productions exploit shiftreduce optimization.
0 out of 57 states can peek at an error.
123 functions before inlining, 2 functions after inlining.
%token A
%start<unit> fib
%%
(* An intensive inlining test.
The size of the grammar after inlining is exponential.
For efficiency, inlining must be performed bottom-up,
beginning by inlining [fib0] and [fib1] into [fib2],
then inlining [fib2] at its use site, and so on.
A top-down strategy, without memoization, would cause
repeated work. *)
let fib0 == A
let fib1 == A
let fib2 == fib0; fib1
let fib3 == fib1; fib2
let fib4 == fib2; fib3
let fib5 == fib3; fib4
let fib6 == fib4; fib5
let fib7 == fib5; fib6
let fib8 == fib6; fib7
let fib9 == fib7; fib8
let fib := fib9
%start fib
%token A
%type <unit> fib
%%
fib:
_1 = A _1_inlined1 = A _1_inlined2 = A _1_inlined3 = A _1_inlined4 = A _1_inlined5 = A _1_inlined6 = A _1_inlined7 = A _1_inlined8 = A _1_inlined9 = A _1_inlined10 = A _1_inlined11 = A _1_inlined12 = A _1_inlined13 = A _1_inlined14 = A _1_inlined15 = A _1_inlined16 = A _1_inlined17 = A _1_inlined18 = A _1_inlined19 = A _1_inlined20 = A _1_inlined21 = A _1_inlined22 = A _1_inlined23 = A _1_inlined24 = A _1_inlined25 = A _1_inlined26 = A _1_inlined27 = A _1_inlined28 = A _1_inlined29 = A _1_inlined30 = A _1_inlined31 = A _1_inlined32 = A _1_inlined33 = A _1_inlined34 = A _1_inlined35 = A _1_inlined36 = A _1_inlined37 = A _1_inlined38 = A _1_inlined39 = A _1_inlined40 = A _1_inlined41 = A _1_inlined42 = A _1_inlined43 = A _1_inlined44 = A _1_inlined45 = A _1_inlined46 = A _1_inlined47 = A _1_inlined48 = A _1_inlined49 = A _1_inlined50 = A _1_inlined51 = A _1_inlined52 = A _1_inlined53 = A _1_inlined54 = A
{let _2 =
let (_1_inlined33, _1_inlined32, _1_inlined31, _1_inlined30, _1_inlined29, _1_inlined28, _1_inlined27, _1_inlined26, _1_inlined25, _1_inlined24, _1_inlined23, _1_inlined22, _1_inlined21, _1_inlined20, _1_inlined19, _1_inlined18, _1_inlined17, _1_inlined16, _1_inlined15, _1_inlined14, _1_inlined13, _1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8, _1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined54, _1_inlined53, _1_inlined52, _1_inlined51, _1_inlined50, _1_inlined49, _1_inlined48, _1_inlined47, _1_inlined46, _1_inlined45, _1_inlined44, _1_inlined43, _1_inlined42, _1_inlined41, _1_inlined40, _1_inlined39, _1_inlined38, _1_inlined37, _1_inlined36, _1_inlined35, _1_inlined34, _1_inlined33, _1_inlined32, _1_inlined31, _1_inlined30, _1_inlined29, _1_inlined28, _1_inlined27, _1_inlined26, _1_inlined25, _1_inlined24, _1_inlined23, _1_inlined22, _1_inlined21) in
let _2 =
let (_1_inlined20, _1_inlined19, _1_inlined18, _1_inlined17, _1_inlined16, _1_inlined15, _1_inlined14, _1_inlined13, _1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8, _1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined33, _1_inlined32, _1_inlined31, _1_inlined30, _1_inlined29, _1_inlined28, _1_inlined27, _1_inlined26, _1_inlined25, _1_inlined24, _1_inlined23, _1_inlined22, _1_inlined21, _1_inlined20, _1_inlined19, _1_inlined18, _1_inlined17, _1_inlined16, _1_inlined15, _1_inlined14, _1_inlined13) in
let _2 =
let (_1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8, _1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined20, _1_inlined19, _1_inlined18, _1_inlined17, _1_inlined16, _1_inlined15, _1_inlined14, _1_inlined13, _1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8) in
let _2 =
let (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8, _1_inlined7, _1_inlined6, _1_inlined5) in
let _2 =
let (_1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3) in
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
let _1 =
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
_2
in
let _1 =
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
_2
in
let _1 =
let _2 =
let (_1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3) in
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
let _1 =
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
_2
in
_2
in
let _1 =
let _2 =
let (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8, _1_inlined7, _1_inlined6, _1_inlined5) in
let _2 =
let (_1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3) in
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
let _1 =
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
_2
in
let _1 =
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
_2
in
_2
in
let _1 =
let _2 =
let (_1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8, _1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined20, _1_inlined19, _1_inlined18, _1_inlined17, _1_inlined16, _1_inlined15, _1_inlined14, _1_inlined13, _1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8) in
let _2 =
let (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined12, _1_inlined11, _1_inlined10, _1_inlined9, _1_inlined8, _1_inlined7, _1_inlined6, _1_inlined5) in
let _2 =
let (_1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3) in
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
let _1 =
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
_2
in
let _1 =
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
_2
in
let _1 =
let _2 =
let (_1_inlined4, _1_inlined3, _1_inlined2, _1_inlined1, _1) = (_1_inlined7, _1_inlined6, _1_inlined5, _1_inlined4, _1_inlined3) in
let _2 =
let (_1_inlined2, _1_inlined1, _1) = (_1_inlined4, _1_inlined3, _1_inlined2) in
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
let _1 = _1_inlined1 in
_2
in
let _1 =
let (_1_inlined1, _1) = (_1_inlined2, _1_inlined1) in
_1_inlined1
in
_2
in
_2
in
_2}
%%
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment