diff options
author | Akshay <[email protected]> | 2021-04-09 07:42:26 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-04-09 07:42:26 +0100 |
commit | 5ea5a4b62486e2c1c06c7483dfa83581837581b2 (patch) | |
tree | cbe54c5cbb5babc80d54c45ce1e0c42317ed07a2 /1 |
init
Diffstat (limited to '1')
-rw-r--r-- | 1/input | 1 | ||||
-rw-r--r-- | 1/main.l | 20 |
2 files changed, 21 insertions, 0 deletions
@@ -0,0 +1 @@ | |||
alskjdfa;dsfja;kdsjfa;klsdjfa;lkjsdfkaljdsf;lakjsdf | |||
diff --git a/1/main.l b/1/main.l new file mode 100644 index 0000000..24f78ca --- /dev/null +++ b/1/main.l | |||
@@ -0,0 +1,20 @@ | |||
1 | %{ | ||
2 | int v = 0; | ||
3 | int c = 0; | ||
4 | %} | ||
5 | |||
6 | %% | ||
7 | [aeiouAEIOU] v++; | ||
8 | [a-zA-Z] c++; | ||
9 | . ; | ||
10 | %% | ||
11 | |||
12 | int main(void) { | ||
13 | yylex(); | ||
14 | printf("%d vowels\n", v); | ||
15 | printf("%d consonants\n", c); | ||
16 | } | ||
17 | |||
18 | int yywrap() { | ||
19 | return(1); | ||
20 | } | ||