Skip to content

Commit

Permalink
json2xml bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lindenb committed Aug 3, 2010
1 parent 2d36517 commit 9b9e7a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bin/syntaxhighlighter:bin src/syntaxhighlighter.l
flex -o src/lex.yy.cc src/syntaxhighlighter.l
g++ -o $@ src/lex.yy.cc -lfl
bin:
mkdir -p bin
10 changes: 8 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
CFLAGS=-Wall -I../../cclindenb/src/core
CC=gcc
all:../bin/json2xml ../bin/fasta2term



../bin/json2xml:json2xml.l json2xml.y
flex -l json2xml.l
../bin/json2xml:json2xml.l json2xml.y Makefile
flex -l json2xml.l
bison -d json2xml.y
$(CC) $(CFLAGS) -o $@ json2xml.tab.c lex.yy.c

../bin/fasta2term:fasta2term.c
$(CC) $(CFLAGS) -o $@ fasta2term.c

test:curvi

curvi:curviligne.cpp
Expand Down
4 changes: 2 additions & 2 deletions src/json2xml.l
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ false return FALSE;
[\+|\-]?[0-9]+\.[0-9]+([e|E][0-9]+)? { yylval.s = copy(yytext,yyleng); return FLOATING;}
[\+|\-]?[0-9]+ { yylval.s = copy(yytext,yyleng); return INTEGER;}
[\[\]\:\{\},] return yytext[0];
\" {yylval.s=NULL; BEGIN(quot); }
\' {yylval.s=NULL; BEGIN(apos); }
\" {yylval.s=copy("",0); BEGIN(quot); }
\' {yylval.s=copy("",0); BEGIN(apos); }
[ \n\t\r]+ ;/* ignore */
. {
fprintf(stderr,"Bad input \"%s\".\n",yytext);
Expand Down

0 comments on commit 9b9e7a9

Please sign in to comment.