Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
c1bad631
...
c1bad6318639c310c32fad192d6d7894d2bde9bc
authored
2002-12-24 10:19:32 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Documented the grammar.
1 parent
851a3597
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
libsieve/sieve.l
libsieve/sieve.l
View file @
c1bad63
...
...
@@ -341,12 +341,14 @@ else return ELSE;
anyof return ANYOF;
allof return ALLOF;
not return NOT;
/*
Other token
s */
/*
Identifier
s */
{IDENT} { ident (yytext); return IDENT; }
:{IDENT} { ident (yytext + 1); return TAG; }
/* Numbers */
0[0-7]*{SIZESUF}* { return number (); }
0x[0-9a-fA-F][0-9a-fA-F]+{SIZESUF}* { return number (); }
[1-9][0-9]*{SIZESUF}* { return number (); }
/* Quoted strings */
\"[^\\"\n]*\" { return string (); }
\"[^\\"\n]*\\. { BEGIN(STR);
multiline_begin ();
...
...
@@ -356,12 +358,18 @@ not return NOT;
multiline_add (NULL);
multiline_finish ();
return STRING; }
text:-?[ \t]*#.*\n { BEGIN(ML); multiline_begin (); }
text:-?[ \t]*\n { BEGIN(ML); multiline_begin (); }
text:-?\\?{IDENT}[ \t]*#.*\n { BEGIN(ML); multiline_begin (); }
text:-?\\?{IDENT}[ \t]*\n { BEGIN(ML); multiline_begin (); }
/* Multiline strings */
text:-?[ \t]*#.*\n { BEGIN(ML); multiline_begin (); sieve_line_num++; }
text:-?[ \t]*\n { BEGIN(ML); multiline_begin (); sieve_line_num++; }
text:-?\\?{IDENT}[ \t]*#.*\n { BEGIN(ML); multiline_begin ();
sieve_line_num++; }
text:-?\\?{IDENT}[ \t]*\n { BEGIN(ML); multiline_begin ();
sieve_line_num++; }
<ML>#[ \t]*include.*\n { if (multiline_delimiter[0] == '\\')
{
sieve_line_num++;
multiline_add (NULL);
}
else
sieve_include (); }
<ML>.*\n { char *p = multiline_strip_tabs (yytext);
...
...
@@ -379,6 +387,7 @@ text:-?\\?{IDENT}[ \t]*\n { BEGIN(ML); multiline_begin (); }
}
multiline_add (NULL); }
{WS} ;
/* Other tokens */
\n { sieve_line_num++; }
. return yytext[0];
...
...
Please
register
or
sign in
to post a comment