diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-10-13 19:14:30 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-10-13 19:14:30 +0000 |
commit | eafd7a3974e8605fd02794269db6114a3446e016 (patch) | |
tree | 064737b35dbe10f2995753ead92f95bac30ba048 /test/include2.rl | |
download | ragel-tarball-eafd7a3974e8605fd02794269db6114a3446e016.tar.gz |
ragel-6.9ragel-6.9
Diffstat (limited to 'test/include2.rl')
-rw-r--r-- | test/include2.rl | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/include2.rl b/test/include2.rl new file mode 100644 index 0000000..68ab007 --- /dev/null +++ b/test/include2.rl @@ -0,0 +1,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 |