summaryrefslogtreecommitdiff
path: root/test/include2.rl
blob: 68ab0079e88cdb17f942ba03f60094124aa6ff0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
 * @LANG: c
 */

#include <stdio.h>
#include <string.h>

%%{
	machine include_test_4;

	action NonRef3 {printf(" nr3");}

	a3 = 'a'@{printf(" a3");};
	b3 = 'b'@{printf(" b3");};

}%%

%%{
	machine include_test_1;

	include "include1.rl";

	include include_test_2 "include1.rl";

	include include_test_4;

	main := 
		a1 b1 @NonRef1 
		a2 b2 @NonRef2 
		a3 b3 @NonRef3
		0 @{fbreak;};
}%%

%% write data;

void test( char *p )
{
	int cs;
	%% write init;
	%% write exec noend;
	printf("\n");
}

int main()
{
	test( "ababab" );
	return 0;
}

#ifdef _____OUTPUT_____
 a1 b1 nr1 a2 b2 nr2 a3 b3 nr3
#endif