aboutsummaryrefslogtreecommitdiff
path: root/tests/test-debug-nr/scanner.l
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-05-22 12:38:19 -0700
committerDan Willemsen <dwillemsen@google.com>2018-05-22 12:41:20 -0700
commit144b09c2e779ebe798042d09bb0a82331f4b8ed1 (patch)
tree0474226b557bd93098b910a58cabe412a7f442f6 /tests/test-debug-nr/scanner.l
parentca77438667cd22b1bad7f3a28a834196a96f1ce0 (diff)
parent6a94e8a360776f0ef69eaed7bc85286f697ca3a9 (diff)
downloadflex-144b09c2e779ebe798042d09bb0a82331f4b8ed1.tar.gz
Merge commit 'flex-2.5.39^^'
This merges the same version of flex as we're using in prebuilts/misc currently (but without the tiny branch that switched the version to 2.5.39 that weren't in the upstream master branch). Also adds the METADATA, LICENSE, NOTICE, and MODULE_LICENSE_* files as required. Test: No Android.* files Change-Id: If69488a1d78d5c7d4c1cc8955d55788bd5a639f2
Diffstat (limited to 'tests/test-debug-nr/scanner.l')
-rw-r--r--tests/test-debug-nr/scanner.l52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/test-debug-nr/scanner.l b/tests/test-debug-nr/scanner.l
new file mode 100644
index 0000000..13d11d6
--- /dev/null
+++ b/tests/test-debug-nr/scanner.l
@@ -0,0 +1,52 @@
+/*
+ * This file is part of flex.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+%{
+/* A template scanner file to build "scanner.c". */
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+
+%}
+
+%option 8bit outfile="scanner.c" prefix="test"
+%option nounput nomain noyywrap
+%option warn debug
+
+%%
+.+ { }
+\n { }
+%%
+
+int main(void);
+
+int
+main ()
+{
+ yyin = stdin;
+ yyout = stdout;
+ yy_flex_debug = 1;
+ yylex();
+ printf("TEST RETURNING OK.\n");
+ return 0;
+}