From 52e94bbea7bf66eebdc23873e8a1768306c7443e Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Mon, 22 Feb 2016 16:46:13 +0100 Subject: [PATCH] Fixed bug with the parser and n's --- libfasta/fasta_header_parser.c | 50 +++++++++++++++++----------------- libfasta/fasta_header_parser.l | 4 +-- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/libfasta/fasta_header_parser.c b/libfasta/fasta_header_parser.c index 9af575c..ad18723 100644 --- a/libfasta/fasta_header_parser.c +++ b/libfasta/fasta_header_parser.c @@ -406,9 +406,9 @@ static yyconst flex_int32_t yy_ec[256] = 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -427,41 +427,41 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[7] = +static yyconst flex_int32_t yy_meta[6] = { 0, - 1, 2, 3, 3, 4, 4 + 1, 2, 3, 3, 4 } ; -static yyconst flex_int16_t yy_base[35] = +static yyconst flex_int16_t yy_base[36] = { 0, - 0, 0, 23, 22, 6, 0, 12, 0, 26, 0, + 0, 4, 23, 0, 9, 0, 14, 0, 27, 0, 0, 29, 29, 0, 0, 29, 29, 0, 0, 29, - 29, 0, 0, 0, 0, 0, 0, 29, 18, 23, - 23, 21, 21, 18 + 29, 0, 0, 0, 0, 0, 0, 29, 19, 23, + 23, 7, 5, 3, 1 } ; -static yyconst flex_int16_t yy_def[35] = +static yyconst flex_int16_t yy_def[36] = { 0, - 28, 1, 1, 1, 28, 5, 28, 7, 28, 29, - 30, 28, 28, 31, 32, 28, 28, 33, 34, 28, - 28, 29, 30, 31, 32, 33, 34, 0, 28, 28, + 29, 29, 2, 3, 28, 5, 28, 7, 28, 30, + 31, 28, 28, 32, 33, 28, 28, 34, 35, 28, + 28, 30, 31, 32, 33, 34, 35, 0, 28, 28, + 28, 28, 28, 28, 28 + } ; + +static yyconst flex_int16_t yy_nxt[35] = + { 0, + 28, 11, 27, 26, 12, 11, 25, 24, 12, 14, + 15, 16, 17, 13, 18, 19, 20, 21, 13, 10, + 10, 10, 10, 22, 23, 22, 28, 13, 9, 28, 28, 28, 28, 28 } ; -static yyconst flex_int16_t yy_nxt[36] = +static yyconst flex_int16_t yy_chk[35] = { 0, - 10, 11, 10, 10, 12, 13, 14, 15, 16, 17, - 13, 13, 18, 19, 20, 21, 13, 13, 22, 27, - 22, 26, 25, 24, 23, 28, 13, 13, 9, 28, - 28, 28, 28, 28, 28 - } ; - -static yyconst flex_int16_t yy_chk[36] = - { 0, - 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, - 5, 5, 7, 7, 7, 7, 7, 7, 29, 34, - 29, 33, 32, 31, 30, 9, 4, 3, 28, 28, - 28, 28, 28, 28, 28 + 0, 1, 35, 34, 1, 2, 33, 32, 2, 5, + 5, 5, 5, 5, 7, 7, 7, 7, 7, 29, + 29, 29, 29, 30, 31, 30, 9, 3, 28, 28, + 28, 28, 28, 28 } ; static yy_state_type yy_last_accepting_state; diff --git a/libfasta/fasta_header_parser.l b/libfasta/fasta_header_parser.l index 12ba444..c270c64 100644 --- a/libfasta/fasta_header_parser.l +++ b/libfasta/fasta_header_parser.l @@ -21,8 +21,8 @@ %} -WORD [^>\\n[:blank:]=;]+ -WORDID [^>\\n[:blank:]]+ +WORD [^>[:blank:]=;]+ +WORDID [^>[:blank:]]+ SUP > EOL \n SEP ;