--- loncom/homework/CAPA-converter/capaLexerDef.flex 2000/05/03 15:35:11 1.2 +++ loncom/homework/CAPA-converter/capaLexerDef.flex 2000/05/15 20:33:33 1.3 @@ -140,7 +140,6 @@ extern Problem_t *LexiPro extern Problem_t *LastProblem_p; int first_run=1; int Stop_Parser; -int scriptopen=0; #define FLEX #define YY_STACK_USED 1 /* for yy_push_state(), yy_pop_state() */ @@ -337,6 +336,7 @@ void newyy_input (char *buf,int *result, #endif int capa_eof(); + %} Alpha [a-zA-Z_] @@ -379,18 +379,18 @@ EndLine ([\r][\n]|[\n]) } { -{EndLine}{Spaces}"//"[^\n]*$ {LLDBUG_PRL2("[COMMENT<%s>]\n",yytext); - remove_delayed(); +{EndLine}{Spaces}"//"[^\n]*$ {LLDBUG_PRL2("[COMMENT<%s>]\n",yytext); send("%s",yytext); - send_delayed("\n\n"); } -[^\n]*{EndLine} BEGIN S_TEXT; +[^\n]*{EndLine} { + send("\n"); BEGIN S_TEXT; + } } { ^{Spaces}"/LET" | - ^{Spaces}"/BEG" { LLDBUG_PRL1("[LET]"); Pcount = 0; BEGIN S_LET; if (!scriptopen){send(""); } +{EndLine} { LLDBUG_PR1("[EoL END let ans map]\n"); if(Pcount == 0) BEGIN S_TEXT; send(yytext); } } {