The R Project SVN R-packages

Rev

Rev 5713 | Rev 6231 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5713 Rev 5741
Line 47... Line 47...
47
%option noyywrap
47
%option noyywrap
48
%option nounput
48
%option nounput
49
%option case-sensitive
49
%option case-sensitive
50
 
50
 
51
s			[ \t\n\r]+
51
s			[ \t\n\r]+
-
 
52
numeric		((0(x|X)[0-9a-fA-F]*)|([+-]?(([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)|([0-9]+))(e[+-]?[0-9]+)?(i|L)?))
52
alpha		[a-zA-Z_\.À-゚]
53
alpha		[a-zA-Z_\.À-゚]
53
numeric		([+-]?(([0-9]+\.[0-9]+)|([0-9]*\.[0-9]+)|([0-9]+))(e[+-]?[0-9]+)?)
-
 
54
ops			"+"|"-"|"*"|"/"|^|>|>=|<|<=|==|!=|!|&|\||\|\||~|$|:|@
54
ops			"+"|"-"|"*"|"/"|^|>|>=|<|<=|==|!=|!|&|\||\|\||~|$|:|@
55
fun			[ \t\n\r]*\(
55
fun			[ \t\n\r]*\(
56
decl		=|<-|<<-|->|-->
56
decl		=|<-|<<-|->|-->
57
word		[a-zA-Z_\.0-9À-゚@]
57
word		[a-zA-Z_\.0-9À-゚@]
58
variable	[a-zA-ZÀ-゚\.][a-zA-Z_\.0-9À-゚]*
58
variable	[a-zA-ZÀ-゚\.][a-zA-Z_\.0-9À-゚]*
Line 81... Line 81...
81
<varequation>{ops}			{ BEGIN(INITIAL); return RPT_OTHER; }       		
81
<varequation>{ops}			{ BEGIN(INITIAL); return RPT_OTHER; }       		
82
{variable}					{ return RPT_VARIABLE; }							/* R variables */
82
{variable}					{ return RPT_VARIABLE; }							/* R variables */
83
 
83
 
84
{numeric}/{ops}				{ BEGIN(equation); return RPT_NUMERIC; }			/* numeric before operator        */
84
{numeric}/{ops}				{ BEGIN(equation); return RPT_NUMERIC; }			/* numeric before operator        */
85
<equation>{ops}				{ BEGIN(INITIAL); return RPT_OTHER; }				/* set operator after a numeric   */
85
<equation>{ops}				{ BEGIN(INITIAL); return RPT_OTHER; }				/* set operator after a numeric   */
-
 
86
{numeric}					{ return RPT_NUMERIC; }								/* single numeric value           */
86
{numeric}/{alpha}			{ return RPT_WORD; }								/* catch numeric followed by char */
87
{numeric}/{alpha}			{ return RPT_WORD; }								/* catch numeric followed by char */
87
 
88
 
88
{ops}						{ return RPT_OPERATOR; }							/* all operators                  */
89
{ops}						{ return RPT_OPERATOR; }							/* all operators                  */
89
{decl}						{ return RPT_DECLARATION; }							/* all declarations               */
90
{decl}						{ return RPT_DECLARATION; }							/* all declarations               */
90
{s}+						{ return RPT_WHITESPACE; }							/* ignore spaces                  */
91
{s}+						{ return RPT_WHITESPACE; }							/* ignore spaces                  */
91
 
92
 
92
{numeric}					{ return RPT_NUMERIC; }								/* single numeric value           */
-
 
93
 
-
 
94
{word}+						{ return RPT_WORD; }								/* return any word                */
93
{word}+						{ return RPT_WORD; }								/* return any word                */
95
 
94
 
96
{nonword}					{ return RPT_OTHER; }								/* return anything else           */
95
{nonword}					{ return RPT_OTHER; }								/* return anything else           */
97
 
96
 
98
 
97