We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa08a4b commit da789fcCopy full SHA for da789fc
labs/04/lex_examples/example3_linuxzoo.l
@@ -0,0 +1,21 @@
1
+%{
2
+#include <stdio.h>
3
+%}
4
+
5
+%option noyywrap
6
7
+%%
8
+[a-zA-Z][a-zA-Z0-9]* { printf("WORD "); }
9
+[a-zA-Z0-9\/.-]+ { printf("FILENAME "); }
10
+\" { printf("QUOTE "); }
11
+\{ { printf("OBRACE "); }
12
+\} { printf("EBRACE "); }
13
+; { printf("SEMICOLON "); }
14
+\n { printf("\n"); }
15
+[ \t]+ /* ignore whitespace */
16
17
18
+int main() {
19
+ yylex();
20
+ return 0;
21
+}
0 commit comments