--- loncom/homework/CAPA-converter/capaLexerDef.flex 2000/04/12 20:06:16 1.1 +++ loncom/homework/CAPA-converter/capaLexerDef.flex 2000/05/03 15:35:11 1.2 @@ -140,6 +140,7 @@ 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() */ @@ -378,17 +379,19 @@ EndLine ([\r][\n]|[\n]) } { -^{Spaces}"//"[^\n]*$ { LLDBUG_PRL2("[COMMENT<%s>]\n",yytext); - send(&yytext[2]); - send("\n"); - BEGIN S_COMMENT; - } -. { send("\n"); BEGIN S_TEXT; } +{EndLine}{Spaces}"//"[^\n]*$ {LLDBUG_PRL2("[COMMENT<%s>]\n",yytext); + remove_delayed(); + send("%s",yytext); + send_delayed("\n\n"); + } +[^\n]*{EndLine} BEGIN S_TEXT; } + { ^{Spaces}"/LET" | -^{Spaces}"/BEG" { LLDBUG_PRL1("[LET]"); Pcount = 0; init_funcstack(); BEGIN S_LET; RETURN(CAPA_LET); } + ^{Spaces}"/BEG" { LLDBUG_PRL1("[LET]"); Pcount = 0; BEGIN S_LET; if (!scriptopen){send(""); } } {