summaryrefslogtreecommitdiff
path: root/test/ragel.d/import1.rl
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2020-03-08 23:29:57 +0200
committerAdrian Thurston <thurston@colm.net>2020-03-08 23:53:25 +0200
commit78e7949ca590b273c2c152a0abe0d51e590a52fd (patch)
treec253c852aec77af8a04c24d921d8657ff29c4101 /test/ragel.d/import1.rl
parent5718c319424a21b64e1b50dbb6aae644715b9e85 (diff)
downloadcolm-78e7949ca590b273c2c152a0abe0d51e590a52fd.tar.gz
remove the ragel tests, export runtests for use by ragel
Diffstat (limited to 'test/ragel.d/import1.rl')
-rw-r--r--test/ragel.d/import1.rl73
1 files changed, 0 insertions, 73 deletions
diff --git a/test/ragel.d/import1.rl b/test/ragel.d/import1.rl
deleted file mode 100644
index 0c7769c3..00000000
--- a/test/ragel.d/import1.rl
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * @LANG: c
- */
-
-#include <stdio.h>
-
-char *foo = "foo";
-
-char b = 98;
-char a = 97;
-char r = 114;
-
-#define SP 32
-#define NL '\n'
-
-%%{
- machine tmp;
- import "import1.rl";
-
- foobar =
- foo @{printf("foo\n"); } |
- b a r @{printf("bar\n");};
-
- main := ( foobar SP foobar NL )*;
-}%%
-
-%% write data;
-
-int cs;
-
-void exec_str( char *p, int len )
-{
- char *pe = p + len;
- %% write exec;
-}
-
-void exec_c( char c )
-{
- exec_str( &c, 1 );
-}
-
-int main()
-{
- %% write init;
-
- exec_str( foo, 3 );
- exec_c( SP );
- exec_c( b );
- exec_c( a );
- exec_c( r );
- exec_c( NL );
-
- exec_c( b );
- exec_c( a );
- exec_c( r );
- exec_c( SP );
- exec_str( foo, 3 );
- exec_c( NL );
-
- if ( cs < tmp_first_final )
- printf("FAIL\n");
- else
- printf("ACCEPT\n");
-
- return 0;
-}
-
-##### OUTPUT #####
-foo
-bar
-bar
-foo
-ACCEPT