[Forensics-changes] [yara] 177/415: Include stdint.h in lex
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:43:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository yara.
commit 6d3642c9fc9f439a82e75e6089cfb92ff07ee2df
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Mon Jun 24 10:08:57 2013 +0000
Include stdint.h in lex
---
libyara/lex.c | 169 +++++++++++++++++++++++++++++-----------------------------
libyara/lex.l | 1 +
2 files changed, 86 insertions(+), 84 deletions(-)
diff --git a/libyara/lex.c b/libyara/lex.c
index ed92131..39069f1 100644
--- a/libyara/lex.c
+++ b/libyara/lex.c
@@ -639,6 +639,7 @@ limitations under the License.
#include <math.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include "grammar.h"
@@ -674,7 +675,7 @@ limitations under the License.
-#line 678 "lex.c"
+#line 679 "lex.c"
#define INITIAL 0
#define str 1
@@ -911,10 +912,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 72 "lex.l"
+#line 73 "lex.l"
-#line 918 "lex.c"
+#line 919 "lex.c"
yylval = yylval_param;
@@ -1013,253 +1014,253 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 74 "lex.l"
+#line 75 "lex.l"
{ return _LT_; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 75 "lex.l"
+#line 76 "lex.l"
{ return _GT_; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 76 "lex.l"
+#line 77 "lex.l"
{ return _LE_; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 77 "lex.l"
+#line 78 "lex.l"
{ return _GE_; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 78 "lex.l"
+#line 79 "lex.l"
{ return _EQ_; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 79 "lex.l"
+#line 80 "lex.l"
{ return _NEQ_; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 80 "lex.l"
+#line 81 "lex.l"
{ return _SHIFT_LEFT_; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 81 "lex.l"
+#line 82 "lex.l"
{ return _SHIFT_RIGHT_; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 82 "lex.l"
+#line 83 "lex.l"
{ return _PRIVATE_; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 83 "lex.l"
+#line 84 "lex.l"
{ return _GLOBAL_; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 84 "lex.l"
+#line 85 "lex.l"
{ return _RULE_; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 85 "lex.l"
+#line 86 "lex.l"
{ return _META_; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 86 "lex.l"
+#line 87 "lex.l"
{ return _STRINGS_; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 87 "lex.l"
+#line 88 "lex.l"
{ return _ASCII_; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 88 "lex.l"
+#line 89 "lex.l"
{ return _WIDE_; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 89 "lex.l"
+#line 90 "lex.l"
{ return _FULLWORD_; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 90 "lex.l"
+#line 91 "lex.l"
{ return _NOCASE_; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 91 "lex.l"
+#line 92 "lex.l"
{ return _CONDITION_; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 92 "lex.l"
+#line 93 "lex.l"
{ return _TRUE_; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 93 "lex.l"
+#line 94 "lex.l"
{ return _FALSE_; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 94 "lex.l"
+#line 95 "lex.l"
{ return _NOT_; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 95 "lex.l"
+#line 96 "lex.l"
{ return _AND_; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 96 "lex.l"
+#line 97 "lex.l"
{ return _OR_; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 97 "lex.l"
+#line 98 "lex.l"
{ return _AT_; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 98 "lex.l"
+#line 99 "lex.l"
{ return _IN_; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 99 "lex.l"
+#line 100 "lex.l"
{ return _OF_; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 100 "lex.l"
+#line 101 "lex.l"
{ return _THEM_; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 101 "lex.l"
+#line 102 "lex.l"
{ return _FOR_; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 102 "lex.l"
+#line 103 "lex.l"
{ return _ALL_; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 103 "lex.l"
+#line 104 "lex.l"
{ return _ANY_; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 104 "lex.l"
+#line 105 "lex.l"
{ return _ENTRYPOINT_; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 105 "lex.l"
+#line 106 "lex.l"
{ return _SIZE_; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 106 "lex.l"
+#line 107 "lex.l"
{ return _RVA_; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 107 "lex.l"
+#line 108 "lex.l"
{ return _OFFSET_; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 108 "lex.l"
+#line 109 "lex.l"
{ return _FILE_; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 109 "lex.l"
+#line 110 "lex.l"
{ return _SECTION_; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 110 "lex.l"
+#line 111 "lex.l"
{ return _UINT8_; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 111 "lex.l"
+#line 112 "lex.l"
{ return _UINT16_; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 112 "lex.l"
+#line 113 "lex.l"
{ return _UINT32_; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 113 "lex.l"
+#line 114 "lex.l"
{ return _INT8_; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 114 "lex.l"
+#line 115 "lex.l"
{ return _INT16_; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 115 "lex.l"
+#line 116 "lex.l"
{ return _INT32_; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 116 "lex.l"
+#line 117 "lex.l"
{ return _MATCHES_; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 117 "lex.l"
+#line 118 "lex.l"
{ return _CONTAINS_; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 118 "lex.l"
+#line 119 "lex.l"
{ return _INDEX_; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 121 "lex.l"
+#line 122 "lex.l"
{ BEGIN(comment); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 122 "lex.l"
+#line 123 "lex.l"
{ BEGIN(INITIAL); }
YY_BREAK
case 48:
/* rule 48 can match eol */
YY_RULE_SETUP
-#line 123 "lex.l"
+#line 124 "lex.l"
{ /* skip comments */ }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 126 "lex.l"
+#line 127 "lex.l"
{ /* skip single-line comments */ }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 129 "lex.l"
+#line 130 "lex.l"
{
yyextra->lex_buf_ptr = yyextra->lex_buf;
yyextra->lex_buf_len = 0;
@@ -1269,12 +1270,12 @@ YY_RULE_SETUP
case 51:
/* rule 51 can match eol */
YY_RULE_SETUP
-#line 136 "lex.l"
+#line 137 "lex.l"
{ YYTEXT_TO_BUFFER; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 139 "lex.l"
+#line 140 "lex.l"
{
char buffer[1024];
@@ -1376,7 +1377,7 @@ case YY_STATE_EOF(str):
case YY_STATE_EOF(regexp):
case YY_STATE_EOF(include):
case YY_STATE_EOF(comment):
-#line 237 "lex.l"
+#line 238 "lex.l"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
@@ -1398,7 +1399,7 @@ case YY_STATE_EOF(comment):
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 257 "lex.l"
+#line 258 "lex.l"
{
yylval->c_string = yr_strdup(yytext);
@@ -1407,7 +1408,7 @@ YY_RULE_SETUP
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 264 "lex.l"
+#line 265 "lex.l"
{
yylval->c_string = yr_strdup(yytext);
@@ -1416,7 +1417,7 @@ YY_RULE_SETUP
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 271 "lex.l"
+#line 272 "lex.l"
{
yylval->c_string = yr_strdup(yytext);
@@ -1426,7 +1427,7 @@ YY_RULE_SETUP
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 279 "lex.l"
+#line 280 "lex.l"
{
yylval->c_string = yr_strdup(yytext);
@@ -1436,7 +1437,7 @@ YY_RULE_SETUP
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 287 "lex.l"
+#line 288 "lex.l"
{
if (strlen(yytext) > 128)
@@ -1450,7 +1451,7 @@ YY_RULE_SETUP
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 299 "lex.l"
+#line 300 "lex.l"
{
yylval->integer = (size_t) atol(yytext);
@@ -1468,7 +1469,7 @@ YY_RULE_SETUP
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 315 "lex.l"
+#line 316 "lex.l"
{
yylval->integer = xtoi(yytext + 2);
@@ -1477,7 +1478,7 @@ YY_RULE_SETUP
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 322 "lex.l"
+#line 323 "lex.l"
{ /* saw closing quote - all done */
SIZED_STRING* s;
@@ -1501,7 +1502,7 @@ YY_RULE_SETUP
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 344 "lex.l"
+#line 345 "lex.l"
{
LEX_CHECK_SPACE_OK("\t", yyextra->lex_buf_len, LEX_BUF_SIZE);
@@ -1511,7 +1512,7 @@ YY_RULE_SETUP
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 352 "lex.l"
+#line 353 "lex.l"
{
LEX_CHECK_SPACE_OK("\"", yyextra->lex_buf_len, LEX_BUF_SIZE);
@@ -1521,7 +1522,7 @@ YY_RULE_SETUP
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 360 "lex.l"
+#line 361 "lex.l"
{
LEX_CHECK_SPACE_OK("\\", yyextra->lex_buf_len, LEX_BUF_SIZE);
@@ -1531,7 +1532,7 @@ YY_RULE_SETUP
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 368 "lex.l"
+#line 369 "lex.l"
{
int result;
@@ -1544,13 +1545,13 @@ YY_RULE_SETUP
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 379 "lex.l"
+#line 380 "lex.l"
{ YYTEXT_TO_BUFFER; }
YY_BREAK
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
-#line 382 "lex.l"
+#line 383 "lex.l"
{
yyerror(yyscanner, "unterminated string");
@@ -1560,7 +1561,7 @@ YY_RULE_SETUP
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
-#line 388 "lex.l"
+#line 389 "lex.l"
{
yyerror(yyscanner, "illegal escape sequence");
@@ -1568,7 +1569,7 @@ YY_RULE_SETUP
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 394 "lex.l"
+#line 395 "lex.l"
{
SIZED_STRING* s;
@@ -1594,7 +1595,7 @@ YY_RULE_SETUP
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 418 "lex.l"
+#line 419 "lex.l"
{
LEX_CHECK_SPACE_OK("/", yyextra->lex_buf_len, LEX_BUF_SIZE);
@@ -1604,7 +1605,7 @@ YY_RULE_SETUP
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 426 "lex.l"
+#line 427 "lex.l"
{
LEX_CHECK_SPACE_OK("\\.", yyextra->lex_buf_len, LEX_BUF_SIZE);
@@ -1615,13 +1616,13 @@ YY_RULE_SETUP
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 435 "lex.l"
+#line 436 "lex.l"
{ YYTEXT_TO_BUFFER; }
YY_BREAK
case 72:
/* rule 72 can match eol */
YY_RULE_SETUP
-#line 438 "lex.l"
+#line 439 "lex.l"
{
yyerror(yyscanner, "unterminated regular expression");
@@ -1630,7 +1631,7 @@ YY_RULE_SETUP
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 445 "lex.l"
+#line 446 "lex.l"
{
yyextra->lex_buf_ptr = yyextra->lex_buf;
@@ -1640,7 +1641,7 @@ YY_RULE_SETUP
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 453 "lex.l"
+#line 454 "lex.l"
{
yyextra->lex_buf_ptr = yyextra->lex_buf;
@@ -1651,7 +1652,7 @@ YY_RULE_SETUP
case 75:
/* rule 75 can match eol */
YY_RULE_SETUP
-#line 461 "lex.l"
+#line 462 "lex.l"
{
int len = strlen(yytext);
@@ -1667,12 +1668,12 @@ YY_RULE_SETUP
case 76:
/* rule 76 can match eol */
YY_RULE_SETUP
-#line 474 "lex.l"
+#line 475 "lex.l"
/* skip whitespace */
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 476 "lex.l"
+#line 477 "lex.l"
{
if (yytext[0] >= 32 && yytext[0] < 127)
@@ -1688,10 +1689,10 @@ YY_RULE_SETUP
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 489 "lex.l"
+#line 490 "lex.l"
ECHO;
YY_BREAK
-#line 1695 "lex.c"
+#line 1696 "lex.c"
case YY_END_OF_BUFFER:
{
@@ -2866,7 +2867,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 489 "lex.l"
+#line 490 "lex.l"
diff --git a/libyara/lex.l b/libyara/lex.l
index e6e0447..c42ffbb 100644
--- a/libyara/lex.l
+++ b/libyara/lex.l
@@ -20,6 +20,7 @@ limitations under the License.
#include <math.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include "grammar.h"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list