Aide:Chanson de Roland/Manuscrit de Venise 4
De Wicri Chanson de Roland
< Aide:Chanson de Roland
Révision datée du 4 février 2024 à 18:20 par Jacques Ducloy (discussion | contributions) (→Transcription RialFri)
Transcription RialFri
cat <<... > RialFri2V4.lex
%START NUM
%START LAISSE
%START L2
%%
<NUM>^[IVL]+ {printf("|\n| \n!%s\n|-\n", yytext); BEGIN LAISSE;}
<LAISSE>^[0-9]+ {printf("|\n|%s\n", yytext);BEGIN L2;}
<L2>[^ ].+\n {printf("|%s\n|-\n", yytext); BEGIN LAISSE;}
%%
int main()
{
printf("{|\n|-\n");
BEGIN NUM;
yylex();
printf("|}\n");
}
...
lex RialFri2V4.lex
gcc lex.yy.c -ll -o RialFri2V4
./RialFri2V4 <testRialLIII
...