--- loncom/homework/CAPA-converter/capaLexerDef.flex 2000/07/06 21:06:22 1.4 +++ loncom/homework/CAPA-converter/capaLexerDef.flex 2001/07/09 04:01:53 1.8 @@ -382,7 +382,7 @@ EndLine ([\r][\n]|[\n]) { {EndLine}{Spaces}"//"[^\n]*$ {LLDBUG_PRL2("[COMMENT<%s>]\n",yytext); - send("# %s",&yytext[2]); + send("# %s\n",&yytext[2]); } [^\n]*{EndLine} { send("\n"); BEGIN S_TEXT; @@ -699,7 +699,7 @@ EndLine ([\r][\n]|[\n]) } { -{FileName}{Space}* { end_mode();send("%s\n",yytext); BEGIN S_SKIP; } +{FileName}{Space}* { end_mode();send("/res/capa/%s\n",yytext); BEGIN S_SKIP; } {Identifier}{Space}* { end_mode();send("$%s\n",yytext); BEGIN S_SKIP; } } @@ -738,23 +738,23 @@ EndLine ([\r][\n]|[\n]) } [Pp][Cc][Rr] | -[Hh][Gg][Rr] { if (firstparam) firstparam=0; else add_delayed("\">\n\t"); - add_delayed("\n\t"); + add_delayed("\n\t"); - add_delayed("\n\t"); + add_delayed("\n\t"); - add_delayed("\n\t"); + add_delayed("[:]{Number}+[EeFf] { if (dosend) send("\" format=\"%s",yytext+1); @@ -931,7 +931,7 @@ EndLine ([\r][\n]|[\n]) [\\][\"] { /**Current_char_p++ = '"';*/ send("\\\""); } [\\]{Space}*[\n] { LLDBUG_PR2("[\\CR continue in S_STRING](%s)",yytext); /* continuation on next line */ } [\"] { /* end of a string constant -- */ - send("\""); + send("'"); yy_pop_state(); } {EndLine} { /* check for termination of string constant */ @@ -996,12 +996,12 @@ EndLine ([\r][\n]|[\n]) } { -[;,] { LLDBUG_PR2("[%c]",yytext[0]); return(yytext[0]); } +[;,] { LLDBUG_PR2("[%c]",yytext[0]); send("%c",yytext[0]); } [\)] { LLDBUG_PR1("[) in MAP]"); Pcount--; if(Pcount==0) { BEGIN S_SKIP; } - return(yytext[0]); + send("%c",yytext[0]); } }