Commit 752e9735 authored by Lev Walkin's avatar Lev Walkin

ignore UTF-8 byte order mark

parent 691ea048
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -93,6 +93,8 @@ WSP [\t\r\v\f\n ] ...@@ -93,6 +93,8 @@ WSP [\t\r\v\f\n ]
%% %%
<INITIAL>"\xef\xbb\xbf" return UTF8_BOM;
-{3,}/[\r\n] /* Immediately terminated long comment */ -{3,}/[\r\n] /* Immediately terminated long comment */
-{3,}/[^-\r\n] yy_push_state(idash_comment); /* Incorrect, but acceptable */ -{3,}/[^-\r\n] yy_push_state(idash_comment); /* Incorrect, but acceptable */
<idash_comment>{ <idash_comment>{
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -139,11 +139,12 @@ ...@@ -139,11 +139,12 @@
TOK_VideotexString = 355, TOK_VideotexString = 355,
TOK_VisibleString = 356, TOK_VisibleString = 356,
TOK_WITH = 357, TOK_WITH = 357,
TOK_EXCEPT = 358, UTF8_BOM = 358,
TOK_INTERSECTION = 359, TOK_EXCEPT = 359,
TOK_UNION = 360, TOK_INTERSECTION = 360,
TOK_TwoDots = 361, TOK_UNION = 361,
TOK_ThreeDots = 362 TOK_TwoDots = 362,
TOK_ThreeDots = 363
}; };
#endif #endif
/* Tokens. */ /* Tokens. */
...@@ -247,11 +248,12 @@ ...@@ -247,11 +248,12 @@
#define TOK_VideotexString 355 #define TOK_VideotexString 355
#define TOK_VisibleString 356 #define TOK_VisibleString 356
#define TOK_WITH 357 #define TOK_WITH 357
#define TOK_EXCEPT 358 #define UTF8_BOM 358
#define TOK_INTERSECTION 359 #define TOK_EXCEPT 359
#define TOK_UNION 360 #define TOK_INTERSECTION 360
#define TOK_TwoDots 361 #define TOK_UNION 361
#define TOK_ThreeDots 362 #define TOK_TwoDots 362
#define TOK_ThreeDots 363
...@@ -294,7 +296,7 @@ typedef union YYSTYPE ...@@ -294,7 +296,7 @@ typedef union YYSTYPE
} tv_nametag; } tv_nametag;
} }
/* Line 1529 of yacc.c. */ /* Line 1529 of yacc.c. */
#line 298 "asn1p_y.h" #line 300 "asn1p_y.h"
YYSTYPE; YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
......
...@@ -226,6 +226,7 @@ static asn1p_module_t *currentModule; ...@@ -226,6 +226,7 @@ static asn1p_module_t *currentModule;
%token TOK_VideotexString %token TOK_VideotexString
%token TOK_VisibleString %token TOK_VisibleString
%token TOK_WITH %token TOK_WITH
%token UTF8_BOM "UTF-8 byte order mark"
%nonassoc TOK_EXCEPT %nonassoc TOK_EXCEPT
%left '^' TOK_INTERSECTION %left '^' TOK_INTERSECTION
...@@ -350,12 +351,14 @@ static asn1p_module_t *currentModule; ...@@ -350,12 +351,14 @@ static asn1p_module_t *currentModule;
%type <tv_str> ComponentIdList %type <tv_str> ComponentIdList
%type <a_int> NSTD_IndirectMarker %type <a_int> NSTD_IndirectMarker
%% %%
ParsedGrammar: ParsedGrammar:
ModuleList { UTF8_BOM ModuleList {
*(void **)param = $2;
}
| ModuleList {
*(void **)param = $1; *(void **)param = $1;
} }
; ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment