~ubuntu-branches/ubuntu/warty/filters/warty

« back to all changes in this revision

Viewing changes to nyc.l

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2003-04-15 15:06:25 UTC
  • Revision ID: james.westby@ubuntu.com-20030415150625-ief12q9sjtfe73dn
Tags: 2.33
Better flex fixups; make sure to link with -lfl even if building
indivitually, and move stuff that uses unput into %{ %} delimited blocks
in rules section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
SP [ \t]
13
13
EW [ \t.,;!\?$]
14
14
%%
 
15
%{
 
16
        void plastc() {
 
17
                yyunput(yytext[yyleng-1], yytext);
 
18
        }
 
19
%}
15
20
".so ".*$                       printf("%s", yytext);
16
21
[ao]ther                        printf("%cdder", yytext[0]=='a'?'a':'u');
17
22
[Nn]othing                      printf("%cuttin'", yytext[0]);
66
71
!                               printf("!  Okay?");
67
72
[a-z]"."                {       printf("%s", yytext);expletive();}
68
73
%%
69
 
plastc()
70
 
{
71
 
        unput(yytext[yyleng-1]);
72
 
}
73
74
 
74
75
caseify(c)
75
76
char c;
95
96
                        }
96
97
                }
97
98
}
 
99
 
 
100
main()
 
101
{
 
102
        yylex();
 
103
}
 
104
 
 
105
int yywrap()
 
106
{
 
107
        return 1;
 
108
}