[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/lib/classdefs lparser.l
From: |
Neil Tiffin |
Subject: |
gnue/geas/lib/classdefs lparser.l |
Date: |
Sat, 26 May 2001 08:47:07 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Neil Tiffin <address@hidden> 01/05/26 08:47:06
Modified files:
geas/lib/classdefs: lparser.l
Log message:
Final format changes.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/lib/classdefs/lparser.l.diff?cvsroot=OldCVS&tr1=1.21&tr2=1.22&r1=text&r2=text
Patches:
Index: gnue/geas/lib/classdefs/lparser.l
diff -u gnue/geas/lib/classdefs/lparser.l:1.21
gnue/geas/lib/classdefs/lparser.l:1.22
--- gnue/geas/lib/classdefs/lparser.l:1.21 Sat May 26 07:23:32 2001
+++ gnue/geas/lib/classdefs/lparser.l Sat May 26 08:47:06 2001
@@ -24,7 +24,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: lparser.l,v 1.21 2001/05/26 14:23:32 ntiffin Exp $
+ $Id: lparser.l,v 1.22 2001/05/26 15:47:06 ntiffin Exp $
*/
@@ -123,10 +123,11 @@
/* update token pos by the length of the last token */
token_pos += lastyyleng;
%}
-include { token_pos += yyleng; BEGIN(incl); }
-<*>\/\/.* { /* ignore rest of line */ }
+include { token_pos += yyleng; BEGIN(incl); }
+<*>\/\/.* { /* ignore rest of line */ }
+
<incl>{whitespace} { /* ignore */ token_pos += yyleng; }
<incl>{qstring} {
char *p,*q;
@@ -152,7 +153,7 @@
BEGIN(failinclude);
}
}
- }
+ }
<incl>{whitespace}{newline} {
yywarn("No filename given for include
directive");
@@ -169,28 +170,30 @@
<endincl>\n {
currentfile.line++;
- BEGIN(FULLLINE); /* return to normal processing */
+ /* return to normal processing */
+ BEGIN(FULLLINE);
}
<failinclude>.*\n {
currentfile.line++;
- BEGIN(FULLLINE); /* return to normal processing after
skipping failed include */
+ /* return to normal processing after skipping failed
include */
+ BEGIN(FULLLINE);
}
-<<EOF>> {
- if(pop_file() == 0 )
- {
- yy_delete_buffer(YY_CURRENT_BUFFER);
- YY_CURRENT_BUFFER = NULL;
- /*printf( "fclose : %08lx\n" , yyin );*/
- fclose(yyin);
- yyterminate();
- }
- else
- {
- BEGIN(endincl);
- }
- }
+<<EOF>> {
+ if(pop_file() == 0 )
+ {
+ yy_delete_buffer(YY_CURRENT_BUFFER);
+ YY_CURRENT_BUFFER = NULL;
+ /*printf( "fclose : %08lx\n" , yyin );*/
+ fclose(yyin);
+ yyterminate();
+ }
+ else
+ {
+ BEGIN(endincl);
+ }
+ }
<FULLLINE>\n |
<FULLLINE>[^\n]* { /* record the current line, truncating if necessary */
@@ -237,7 +240,8 @@
[+-]?[0-9]+.[0-9]+ { ST; yylval.floating = atof(yytext); return(DOUBLE); }
- /* this set can be followed by more datatype fields, and the parser
must reset expecting_datatype */
+ /* this set can be followed by more datatype fields, */
+ /* and the parser must reset expecting_datatype */
public { ST; if( expecting_datatype == 1 ) return(PUBLIC);
else return(SYMBOL); }
protected { ST; if( expecting_datatype == 1 ) return(PROTECTED);
else return(SYMBOL); }
private { ST; if( expecting_datatype == 1 ) return(PRIVATE);
else return(SYMBOL); }
@@ -251,8 +255,8 @@
not { ST; if( expecting_fieldprop == 1 ) return(NOT); else
return(SYMBOL); }
null { ST; if( expecting_fieldprop == 1 ) return(NUL); else
return(SYMBOL); }
- /* this set is the final entry in a datatype,
- so can reset expecting_datatype here */
+ /* this set is the final entry in a datatype, */
+ /* so can reset expecting_datatype here */
module {
ST;
if( expecting_datatype == 1 )
@@ -279,10 +283,10 @@
enum { ST; if( expecting_datatype == 1 ) { expecting_datatype =
0; return(ENUM); } else { yylval.string=g_strdup(yytext); return(SYMBOL);
} }
help { ST; if( expecting_datatype == 1 ) { expecting_datatype =
0; return(HELP); } else { yylval.string=g_strdup(yytext); return(SYMBOL);
} }
tooltip { ST; if( expecting_datatype == 1 ) { expecting_datatype =
0; return(TOOLTIP); } else { yylval.string=g_strdup(yytext); return(SYMBOL);
} }
-order { ST; if( expecting_datatype == 1 ) { expecting_datatype =
0; return(ORDER); } else { yylval.string=g_strdup(yytext);
return(SYMBOL); } }
+order { ST; if( expecting_datatype == 1 ) { expecting_datatype =
0; return(ORDER); } else { yylval.string=g_strdup(yytext); return(SYMBOL);
} }
by { ST; if( expecting_datatype == 1 ) { expecting_datatype =
0; return(BY); } else { yylval.string=g_strdup(yytext); return(SYMBOL);
} }
-[a-zA-Z][a-zA-Z0-9]* { enum odl_datatype tmp;
+[a-zA-Z][a-zA-Z0-9]* { enum odl_datatype tmp;
ST;
if( expecting_datatype == 1 )
{
@@ -300,7 +304,7 @@
/* not expecting a datatype or trigger type, or
didn't get one */
yylval.string = g_strdup( yytext );
return(SYMBOL);
- }
+ }
[_a-zA-Z][_a-zA-Z0-9]* { enum odl_datatype tmp;
ST;