DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 5523 (0x1593) Types: TextFile Names: »B«
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04 └─ ⟦d65440be7⟧ »DATA« └─⟦this⟧
with Lex, Token, Traite_Erreur; with Text_Io; package body Syntaxe_1 is Error : exception; function Parse_Liste_Acteur return Boolean is separate; function Parse_Liste_Groupe return Boolean is separate; function Parse_Operande return Boolean is separate; function Parse_Operation return Boolean is separate; function Parse_Condition return Boolean is separate; function Parse_Liste_Parametre return Boolean is separate; procedure Parse_Action (Validation_Bloc : in out Boolean; Ok : out Boolean) is separate; function Parse_Liste_Instruction return Boolean is separate; function Parse_Liste_Scene return Boolean is separate; function Parse_Scene return Boolean is separate; function Parse_Experience return Boolean is separate; function Parse_Variable return Boolean is separate; function Parse_Liste_Materiel return Boolean is separate; -- ********************************************************************** function Parse_Spectacle return Boolean is Ok : Boolean; begin if Token.Object'Pos (Lex.Lex_Get_Token) = Token.Object'Pos (Token.L_Spectacle) then Lex.Lex_Next; Ok := Parse_Liste_Scene; else Traite_Erreur.Parse_Erreur (Traite_Erreur.Err_Liste_Scene, Traite_Erreur.Follow_Liste_Scene); Ok := False; end if; if Token.Object'Pos (Lex.Lex_Get_Token) = Token.Object'Pos (Token.L_Fin) then Lex.Lex_Next; Ok := Ok and True; else Ok := False; end if; if Token.Object'Pos (Lex.Lex_Get_Token) = Token.Object'Pos (Token.L_Spectacle) then Ok := Ok and True; else Ok := False; end if; return Ok; end Parse_Spectacle; function Parse_Dec_Scene return Boolean is begin return Parse_Scene; end Parse_Dec_Scene; function Parse_Dec_Experience return Boolean is begin return Parse_Experience; end Parse_Dec_Experience; function Parse_Dec_Global return Boolean is begin return Parse_Variable; end Parse_Dec_Global; function Parse_Dec_Materiel return Boolean is begin if Token.Object'Pos (Lex.Lex_Get_Token) = Token.Object'Pos (Token.L_Materiel) then Lex.Lex_Next; if Token.Object'Pos (Lex.Lex_Get_Token) = Token.Object'Pos (Token.L_Est) then if not Parse_Liste_Materiel then Traite_Erreur.Parse_Erreur (Traite_Erreur.Err_Liste_Mat, Traite_Erreur.Follow_Liste_Mat); end if; if Token.Object'Pos (Lex.Lex_Get_Token) = Token.Object'Pos (Token.L_Fin) then Lex.Lex_Next; if Token.Object'Pos (Lex.Lex_Get_Token) = Token.Object'Pos (Token.L_Materiel) then Lex.Lex_Next; return True; else return False; end if; else return False; end if; else return False; end if; else return False; end if; end Parse_Dec_Materiel; -- ********************************************************************** function Parse_Programme return Boolean is Ok : Boolean; begin if Parse_Dec_Materiel then Text_Io.Put_Line ("dec materiel OK "); Ok := True; else Traite_Erreur.Parse_Erreur (Traite_Erreur.Err_Dec_Mat, Traite_Erreur.Follow_Dec_Mat); Ok := False; end if; if Parse_Dec_Global then Text_Io.Put_Line ("dec globales OK"); Ok := Ok and True; else Traite_Erreur.Parse_Erreur (Traite_Erreur.Err_Dec_Glob, Traite_Erreur.Follow_Dec_Glob); Ok := False; end if; if Parse_Dec_Experience then Text_Io.Put_Line ("dec experience OK"); Ok := Ok and True; else Traite_Erreur.Parse_Erreur (Traite_Erreur.Err_Dec_Exp, Traite_Erreur.Follow_Dec_Exp); Ok := False; end if; if Parse_Dec_Scene then Text_Io.Put_Line ("dec scene OK"); Ok := Ok and True; else Traite_Erreur.Parse_Erreur (Traite_Erreur.Err_Dec_Scene, Traite_Erreur.Follow_Dec_Scene); Ok := False; end if; if Parse_Spectacle then Text_Io.Put_Line ("spectacle OK"); Ok := Ok and True; else Text_Io.Put_Line ("Erreur dans le spectacle"); Ok := False; end if; return Ok; end Parse_Programme; -- ********************************************************************** function Parse return Boolean is begin Lex.Lex_Open ("fich_lex"); Lex.Lex_Next; if Parse_Programme then Lex.Lex_Close; return True; else raise Error; end if; exception when Error => Lex.Lex_Close; return False; end Parse; end Syntaxe_1;