
(* lexical analyzer template (TP Lex V3.0), V1.0 3-2-91 AG *)

(* global definitions: *)
        uses lexlib ;
        (*
        PRESQUE RIEN DANS LE PREMIER SECTEUR
        SINON uses lexlib ; ET CE COMMENTAIRE :
        CE SERA RECOPIE DANS TP2.PAS
        *)

function yylex : Integer;

procedure yyaction ( yyruleno : Integer );
  (* local definitions: *)
begin
  (* actions: *)
  case yyruleno of
  1:
       ; (* instruction vide *)
  2,
  3:
  begin writeln('fin du programme TP2') ; halt end;
  4,
  5,
  6,
  7,
  8,
  9:
     writeln(yytext, ' : present du verbe ETRE');
  10,
  11,
  12,
  13,
  14,
  15:
     writeln(yytext, ' : present du verbe AVOIR');
  16:
          writeln(yytext, ' n''est pas dans votre liste');
  17:
     writeln(yytext) ;
  end;
end(*yyaction*);

(* DFA table: *)

type YYTRec = record
                cc : set of Char;
                s  : Integer;
              end;

const

yynmarks   = 58;
yynmatches = 58;
yyntrans   = 78;
yynstates  = 38;

yyk : array [1..yynmarks] of Integer = (
  { 0: }
  { 1: }
  { 2: }
  1,
  17,
  { 3: }
  2,
  16,
  17,
  { 4: }
  3,
  16,
  17,
  { 5: }
  16,
  17,
  { 6: }
  16,
  17,
  { 7: }
  12,
  16,
  17,
  { 8: }
  16,
  17,
  { 9: }
  16,
  17,
  { 10: }
  17,
  { 11: }
  1,
  { 12: }
  16,
  { 13: }
  16,
  { 14: }
  16,
  { 15: }
  5,
  16,
  { 16: }
  16,
  { 17: }
  10,
  16,
  { 18: }
  11,
  16,
  { 19: }
  16,
  { 20: }
  16,
  { 21: }
  16,
  { 22: }
  16,
  { 23: }
  16,
  { 24: }
  6,
  16,
  { 25: }
  16,
  { 26: }
  16,
  { 27: }
  16,
  { 28: }
  15,
  16,
  { 29: }
  4,
  16,
  { 30: }
  16,
  { 31: }
  9,
  16,
  { 32: }
  8,
  16,
  { 33: }
  16,
  { 34: }
  14,
  16,
  { 35: }
  16,
  { 36: }
  13,
  16,
  { 37: }
  7,
  16
);

yym : array [1..yynmatches] of Integer = (
{ 0: }
{ 1: }
{ 2: }
  1,
  17,
{ 3: }
  2,
  16,
  17,
{ 4: }
  3,
  16,
  17,
{ 5: }
  16,
  17,
{ 6: }
  16,
  17,
{ 7: }
  12,
  16,
  17,
{ 8: }
  16,
  17,
{ 9: }
  16,
  17,
{ 10: }
  17,
{ 11: }
  1,
{ 12: }
  16,
{ 13: }
  16,
{ 14: }
  16,
{ 15: }
  5,
  16,
{ 16: }
  16,
{ 17: }
  10,
  16,
{ 18: }
  11,
  16,
{ 19: }
  16,
{ 20: }
  16,
{ 21: }
  16,
{ 22: }
  16,
{ 23: }
  16,
{ 24: }
  6,
  16,
{ 25: }
  16,
{ 26: }
  16,
{ 27: }
  16,
{ 28: }
  15,
  16,
{ 29: }
  4,
  16,
{ 30: }
  16,
{ 31: }
  9,
  16,
{ 32: }
  8,
  16,
{ 33: }
  16,
{ 34: }
  14,
  16,
{ 35: }
  16,
{ 36: }
  13,
  16,
{ 37: }
  7,
  16
);

yyt : array [1..yyntrans] of YYTrec = (
{ 0: }
  ( cc: [ #1..#8,#10..#31,'!'..'@','['..'`','{'..#255 ]; s: 10),
  ( cc: [ #9,' ' ]; s: 2),
  ( cc: [ 'A'..'P','R'..'Z','b'..'d','f'..'n','p','r',
            't'..'z' ]; s: 9),
  ( cc: [ 'Q' ]; s: 3),
  ( cc: [ 'a' ]; s: 7),
  ( cc: [ 'e' ]; s: 6),
  ( cc: [ 'o' ]; s: 8),
  ( cc: [ 'q' ]; s: 4),
  ( cc: [ 's' ]; s: 5),
{ 1: }
  ( cc: [ #1..#8,#10..#31,'!'..'@','['..'`','{'..#255 ]; s: 10),
  ( cc: [ #9,' ' ]; s: 2),
  ( cc: [ 'A'..'P','R'..'Z','b'..'d','f'..'n','p','r',
            't'..'z' ]; s: 9),
  ( cc: [ 'Q' ]; s: 3),
  ( cc: [ 'a' ]; s: 7),
  ( cc: [ 'e' ]; s: 6),
  ( cc: [ 'o' ]; s: 8),
  ( cc: [ 'q' ]; s: 4),
  ( cc: [ 's' ]; s: 5),
{ 2: }
  ( cc: [ #9,' ' ]; s: 11),
{ 3: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 4: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 5: }
  ( cc: [ 'A'..'Z','a'..'n','p'..'t','v'..'z' ]; s: 12),
  ( cc: [ 'o' ]; s: 14),
  ( cc: [ 'u' ]; s: 13),
{ 6: }
  ( cc: [ 'A'..'Z','a'..'r','u'..'z' ]; s: 12),
  ( cc: [ 's' ]; s: 15),
  ( cc: [ 't' ]; s: 16),
{ 7: }
  ( cc: [ 'A'..'Z','a'..'h','j'..'r','t','u','w'..'z' ]; s: 12),
  ( cc: [ 'i' ]; s: 17),
  ( cc: [ 's' ]; s: 18),
  ( cc: [ 'v' ]; s: 19),
{ 8: }
  ( cc: [ 'A'..'Z','a'..'m','o'..'z' ]; s: 12),
  ( cc: [ 'n' ]; s: 20),
{ 9: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 10: }
{ 11: }
  ( cc: [ #9,' ' ]; s: 11),
{ 12: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 13: }
  ( cc: [ 'A'..'Z','a'..'h','j'..'z' ]; s: 12),
  ( cc: [ 'i' ]; s: 21),
{ 14: }
  ( cc: [ 'A'..'Z','a'..'l','o'..'z' ]; s: 12),
  ( cc: [ 'm' ]; s: 22),
  ( cc: [ 'n' ]; s: 23),
{ 15: }
  ( cc: [ 'A'..'Z','a'..'s','u'..'z' ]; s: 12),
  ( cc: [ 't' ]; s: 24),
{ 16: }
  ( cc: [ 'A'..'Z','a'..'d','f'..'z' ]; s: 12),
  ( cc: [ 'e' ]; s: 25),
{ 17: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 18: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 19: }
  ( cc: [ 'A'..'Z','a'..'d','f'..'n','p'..'z' ]; s: 12),
  ( cc: [ 'e' ]; s: 27),
  ( cc: [ 'o' ]; s: 26),
{ 20: }
  ( cc: [ 'A'..'Z','a'..'s','u'..'z' ]; s: 12),
  ( cc: [ 't' ]; s: 28),
{ 21: }
  ( cc: [ 'A'..'Z','a'..'r','t'..'z' ]; s: 12),
  ( cc: [ 's' ]; s: 29),
{ 22: }
  ( cc: [ 'A'..'Z','a'..'l','n'..'z' ]; s: 12),
  ( cc: [ 'm' ]; s: 30),
{ 23: }
  ( cc: [ 'A'..'Z','a'..'s','u'..'z' ]; s: 12),
  ( cc: [ 't' ]; s: 31),
{ 24: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 25: }
  ( cc: [ 'A'..'Z','a'..'r','t'..'z' ]; s: 12),
  ( cc: [ 's' ]; s: 32),
{ 26: }
  ( cc: [ 'A'..'Z','a'..'m','o'..'z' ]; s: 12),
  ( cc: [ 'n' ]; s: 33),
{ 27: }
  ( cc: [ 'A'..'Z','a'..'y' ]; s: 12),
  ( cc: [ 'z' ]; s: 34),
{ 28: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 29: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 30: }
  ( cc: [ 'A'..'Z','a'..'d','f'..'z' ]; s: 12),
  ( cc: [ 'e' ]; s: 35),
{ 31: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 32: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 33: }
  ( cc: [ 'A'..'Z','a'..'r','t'..'z' ]; s: 12),
  ( cc: [ 's' ]; s: 36),
{ 34: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 35: }
  ( cc: [ 'A'..'Z','a'..'r','t'..'z' ]; s: 12),
  ( cc: [ 's' ]; s: 37),
{ 36: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12),
{ 37: }
  ( cc: [ 'A'..'Z','a'..'z' ]; s: 12)
);

yykl : array [0..yynstates-1] of Integer = (
{ 0: } 1,
{ 1: } 1,
{ 2: } 1,
{ 3: } 3,
{ 4: } 6,
{ 5: } 9,
{ 6: } 11,
{ 7: } 13,
{ 8: } 16,
{ 9: } 18,
{ 10: } 20,
{ 11: } 21,
{ 12: } 22,
{ 13: } 23,
{ 14: } 24,
{ 15: } 25,
{ 16: } 27,
{ 17: } 28,
{ 18: } 30,
{ 19: } 32,
{ 20: } 33,
{ 21: } 34,
{ 22: } 35,
{ 23: } 36,
{ 24: } 37,
{ 25: } 39,
{ 26: } 40,
{ 27: } 41,
{ 28: } 42,
{ 29: } 44,
{ 30: } 46,
{ 31: } 47,
{ 32: } 49,
{ 33: } 51,
{ 34: } 52,
{ 35: } 54,
{ 36: } 55,
{ 37: } 57
);

yykh : array [0..yynstates-1] of Integer = (
{ 0: } 0,
{ 1: } 0,
{ 2: } 2,
{ 3: } 5,
{ 4: } 8,
{ 5: } 10,
{ 6: } 12,
{ 7: } 15,
{ 8: } 17,
{ 9: } 19,
{ 10: } 20,
{ 11: } 21,
{ 12: } 22,
{ 13: } 23,
{ 14: } 24,
{ 15: } 26,
{ 16: } 27,
{ 17: } 29,
{ 18: } 31,
{ 19: } 32,
{ 20: } 33,
{ 21: } 34,
{ 22: } 35,
{ 23: } 36,
{ 24: } 38,
{ 25: } 39,
{ 26: } 40,
{ 27: } 41,
{ 28: } 43,
{ 29: } 45,
{ 30: } 46,
{ 31: } 48,
{ 32: } 50,
{ 33: } 51,
{ 34: } 53,
{ 35: } 54,
{ 36: } 56,
{ 37: } 58
);

yyml : array [0..yynstates-1] of Integer = (
{ 0: } 1,
{ 1: } 1,
{ 2: } 1,
{ 3: } 3,
{ 4: } 6,
{ 5: } 9,
{ 6: } 11,
{ 7: } 13,
{ 8: } 16,
{ 9: } 18,
{ 10: } 20,
{ 11: } 21,
{ 12: } 22,
{ 13: } 23,
{ 14: } 24,
{ 15: } 25,
{ 16: } 27,
{ 17: } 28,
{ 18: } 30,
{ 19: } 32,
{ 20: } 33,
{ 21: } 34,
{ 22: } 35,
{ 23: } 36,
{ 24: } 37,
{ 25: } 39,
{ 26: } 40,
{ 27: } 41,
{ 28: } 42,
{ 29: } 44,
{ 30: } 46,
{ 31: } 47,
{ 32: } 49,
{ 33: } 51,
{ 34: } 52,
{ 35: } 54,
{ 36: } 55,
{ 37: } 57
);

yymh : array [0..yynstates-1] of Integer = (
{ 0: } 0,
{ 1: } 0,
{ 2: } 2,
{ 3: } 5,
{ 4: } 8,
{ 5: } 10,
{ 6: } 12,
{ 7: } 15,
{ 8: } 17,
{ 9: } 19,
{ 10: } 20,
{ 11: } 21,
{ 12: } 22,
{ 13: } 23,
{ 14: } 24,
{ 15: } 26,
{ 16: } 27,
{ 17: } 29,
{ 18: } 31,
{ 19: } 32,
{ 20: } 33,
{ 21: } 34,
{ 22: } 35,
{ 23: } 36,
{ 24: } 38,
{ 25: } 39,
{ 26: } 40,
{ 27: } 41,
{ 28: } 43,
{ 29: } 45,
{ 30: } 46,
{ 31: } 48,
{ 32: } 50,
{ 33: } 51,
{ 34: } 53,
{ 35: } 54,
{ 36: } 56,
{ 37: } 58
);

yytl : array [0..yynstates-1] of Integer = (
{ 0: } 1,
{ 1: } 10,
{ 2: } 19,
{ 3: } 20,
{ 4: } 21,
{ 5: } 22,
{ 6: } 25,
{ 7: } 28,
{ 8: } 32,
{ 9: } 34,
{ 10: } 35,
{ 11: } 35,
{ 12: } 36,
{ 13: } 37,
{ 14: } 39,
{ 15: } 42,
{ 16: } 44,
{ 17: } 46,
{ 18: } 47,
{ 19: } 48,
{ 20: } 51,
{ 21: } 53,
{ 22: } 55,
{ 23: } 57,
{ 24: } 59,
{ 25: } 60,
{ 26: } 62,
{ 27: } 64,
{ 28: } 66,
{ 29: } 67,
{ 30: } 68,
{ 31: } 70,
{ 32: } 71,
{ 33: } 72,
{ 34: } 74,
{ 35: } 75,
{ 36: } 77,
{ 37: } 78
);

yyth : array [0..yynstates-1] of Integer = (
{ 0: } 9,
{ 1: } 18,
{ 2: } 19,
{ 3: } 20,
{ 4: } 21,
{ 5: } 24,
{ 6: } 27,
{ 7: } 31,
{ 8: } 33,
{ 9: } 34,
{ 10: } 34,
{ 11: } 35,
{ 12: } 36,
{ 13: } 38,
{ 14: } 41,
{ 15: } 43,
{ 16: } 45,
{ 17: } 46,
{ 18: } 47,
{ 19: } 50,
{ 20: } 52,
{ 21: } 54,
{ 22: } 56,
{ 23: } 58,
{ 24: } 59,
{ 25: } 61,
{ 26: } 63,
{ 27: } 65,
{ 28: } 66,
{ 29: } 67,
{ 30: } 69,
{ 31: } 70,
{ 32: } 71,
{ 33: } 73,
{ 34: } 74,
{ 35: } 76,
{ 36: } 77,
{ 37: } 78
);


var yyn : Integer;

label start, scan, action;

begin

start:

  (* initialize: *)

  yynew;

scan:

  (* mark positions and matches: *)

  for yyn := yykl[yystate] to     yykh[yystate] do yymark(yyk[yyn]);
  for yyn := yymh[yystate] downto yyml[yystate] do yymatch(yym[yyn]);

  if yytl[yystate]>yyth[yystate] then goto action; (* dead state *)

  (* get next character: *)

  yyscan;

  (* determine action: *)

  yyn := yytl[yystate];
  while (yyn<=yyth[yystate]) and not (yyactchar in yyt[yyn].cc) do inc(yyn);
  if yyn>yyth[yystate] then goto action;
    (* no transition on yyactchar in this state *)

  (* switch to new state: *)

  yystate := yyt[yyn].s;

  goto scan;

action:

  (* execute action: *)

  if yyfind(yyrule) then
    begin
      yyaction(yyrule);
      if yyreject then goto action;
    end
  else if not yydefault and yywrap then
    begin
      yyclear;
      return(0);
    end;

  if not yydone then goto start;

  yylex := yyretval;

end(*yylex*);


begin
  yylex
end.
