File: verbs.fcl

package info (click to toggle)
saods9 8.6%2Brepack-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,272 kB
  • sloc: tcl: 78,253; cpp: 71,015; ansic: 3,955; xml: 1,555; sh: 968; makefile: 183; perl: 68
file content (34 lines) | stat: -rw-r--r-- 623 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# $Id: verbs.fcl,v 1.1.1.1 2004/07/23 19:22:41 tang Exp $

# Recognizes various English verbs in sentences.

# This is based upon example 'ch1-02.l' from "lex & yacc" by John
# R. Levine, Tony Mason, and Doug Brown (by O'Reilly & Associates, ISBN
# 1-56592-000-7).  For more information on using lex and yacc, see
# http://www.oreilly.com/catalog/lex/.

%{
#!/usr/bin/tclsh
%}

%%
[\t ]+        # ignore whitespace
is |
am |
are |
were |
was |
be |
being |
been |
do |
does |
did |
will          puts "$yytext: is a verb"
[a-zA-Z]+     puts "$yytext: is not a verb"

.|\n          ECHO  ;# normal default anyway

%%

yylex