let yyact = [|
  (fun _ -> failwith "parser")
; (fun __caml_parser_env ->
    let _3 = (Parsing.peek_val __caml_parser_env 2 : 'states) in
    Obj.repr(
# 70 "src/aorai/promelaparser.mly"
                                                                 ( 
            let states=
              Hashtbl.fold (fun _ st l -> 
                if st.acceptation=Undefined or st.init=Undefined then
                  begin
                    Aorai_option.abort 
                      "Error: the state %s is used but never defined" st.name;
                  end;
                st::l
              ) observed_states []
            in
            (states , _3)
        )
# 187 "src/aorai/promelaparser.ml"
               : Promelaast.parsed_automaton))
; (fun __caml_parser_env ->
    let _3 = (Parsing.peek_val __caml_parser_env 3 : 'states) in
    Obj.repr(
# 84 "src/aorai/promelaparser.mly"
                               (
              let states=
                Hashtbl.fold (fun _ st l -> 
                  if st.acceptation=Undefined or st.init=Undefined then
                    begin
                      Aorai_option.abort 
                        "Error: the state %s is used but never defined" st.name;
                    end;
                  st::l
                ) observed_states []
              in
              (states , _3) )
# 205 "src/aorai/promelaparser.ml"
               : Promelaast.parsed_automaton))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'states) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'state) in
    Obj.repr(
# 99 "src/aorai/promelaparser.mly"
                                         ( 
            _1@_3
          )
# 215 "src/aorai/promelaparser.ml"
               : 'states))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : 'state) in
    Obj.repr(
# 102 "src/aorai/promelaparser.mly"
         ( _1 )
# 222 "src/aorai/promelaparser.ml"
               : 'states))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'state_labels) in
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'state_body) in
    Obj.repr(
# 106 "src/aorai/promelaparser.mly"
                                  (
          let (stl,trans)=_1 in
          let (trl,force_final)=_2 in
            if force_final then
              begin
                List.iter (fun s -> 
                  try 
                    (Hashtbl.find observed_states s.name).acceptation <- True
                  with
                    | Not_found -> assert false 
                (* This state has to be in the hashtable -- by construction *)
                ) stl
              end;
            if trl=[] then
              trans 
            else
              let tr_list=
                List.fold_left (fun l1 (cr,stop_st)  -> 
                  List.fold_left (fun l2 st -> 
                    {start=st;stop=stop_st;cross=Seq (to_seq cr);numt=(-1)}::l2
                  ) l1 stl
                ) [] trl 
              in
                (List.rev tr_list)@trans
        )
# 254 "src/aorai/promelaparser.ml"
               : 'state))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'label) in
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'state_labels) in
    Obj.repr(
# 134 "src/aorai/promelaparser.mly"
                             ( 
            let (stl1,trl1)=_1 in
            let (stl2,trl2)=_2 in
              (stl1@stl2,trl1@trl2) 
        )
# 266 "src/aorai/promelaparser.ml"
               : 'state_labels))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label) in
    Obj.repr(
# 139 "src/aorai/promelaparser.mly"
         ( _1 )
# 273 "src/aorai/promelaparser.ml"
               : 'state_labels))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in
    Obj.repr(
# 143 "src/aorai/promelaparser.mly"
                                      (
          begin
    (* Step 0 : trans is the set of new transitions and old is the description of the current state *)
            let trans = ref [] in
            (* Promela Label is a state. According to its name, we will try to give him its properties (init / accept) *)
            (* Firstly, if this state is still referenced, then we get it back. Else, we make a new "empty" state *)
            let old= 
              try  
                Hashtbl.find observed_states _1
              with
                | Not_found -> 
                    let s = Data_for_aorai.new_state _1 in
                    Hashtbl.add observed_states _1 s;
                    s
            in
            (* Step 1 : setting up the acceptance status *)
            (* Default status : Non acceptation state *)
             old.acceptation <- False;
            
            (* Accept_all state means acceptance state with a 
               reflexive transition without cross condition *)

            (* This case is not exclusive with the following. 
               Acceptation status is set in this last. *)

            if (String.length _1>=10) && 
              (String.compare (String.sub _1 0 10) "accept_all")=0 
            then 
              trans:=
                {start=old;stop=old;cross=Seq (to_seq PTrue);numt=(-1)} ::
                !trans;
            (* If the name includes accept then 
               this state is an acceptation one. *)

            if (String.length _1>=7) && 
              (String.compare (String.sub _1 0 7) "accept_")=0 
            then
              old.acceptation <- True;

            (* Step 2 : setting up the init status *)
            (* If the state name ended with "_init" then 
               it is an initial state. Else, it is not. *)

            if (String.length _1>=5) && 
              (String.compare (String.sub _1 ((String.length _1)-5) 5) 
                 "_init" ) = 0
            then
              old.init <- True
            else
              old.init <- False;
            ([old],!trans)
          end
        )
# 328 "src/aorai/promelaparser.ml"
               : 'label))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'transitions) in
    Obj.repr(
# 196 "src/aorai/promelaparser.mly"
                                            ( (_2,false) )
# 335 "src/aorai/promelaparser.ml"
               : 'state_body))
; (fun __caml_parser_env ->
    Obj.repr(
# 197 "src/aorai/promelaparser.mly"
                ( ([],false) )
# 341 "src/aorai/promelaparser.ml"
               : 'state_body))
; (fun __caml_parser_env ->
    Obj.repr(
# 198 "src/aorai/promelaparser.mly"
                 ( ([],true) )
# 347 "src/aorai/promelaparser.ml"
               : 'state_body))
; (fun __caml_parser_env ->
    Obj.repr(
# 199 "src/aorai/promelaparser.mly"
                                                            ( ([],true) )
# 353 "src/aorai/promelaparser.ml"
               : 'state_body))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'transitions) in
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'transition) in
    Obj.repr(
# 204 "src/aorai/promelaparser.mly"
                                 ( _1@[_2] )
# 361 "src/aorai/promelaparser.ml"
               : 'transitions))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : 'transition) in
    Obj.repr(
# 205 "src/aorai/promelaparser.mly"
              ( [_1] )
# 368 "src/aorai/promelaparser.ml"
               : 'transitions))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 3 : 'guard) in
    let _5 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 209 "src/aorai/promelaparser.mly"
                                                                                    (
          let s=
            try
              Hashtbl.find observed_states _5
            with
                Not_found -> 
                  let r = Data_for_aorai.new_state _5 in
                  Hashtbl.add observed_states _5 r;
                  r
          in
          (_2,s)
        )
# 387 "src/aorai/promelaparser.ml"
               : 'transition))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 224 "src/aorai/promelaparser.mly"
                          ( POr(PCall (_1,None), PReturn _1) )
# 394 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 225 "src/aorai/promelaparser.mly"
                         ( PCall (_1,None) )
# 401 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 226 "src/aorai/promelaparser.mly"
                           ( PReturn _1 )
# 408 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    Obj.repr(
# 227 "src/aorai/promelaparser.mly"
                ( PTrue )
# 414 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    Obj.repr(
# 228 "src/aorai/promelaparser.mly"
                 ( PFalse )
# 420 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'guard) in
    Obj.repr(
# 229 "src/aorai/promelaparser.mly"
                     ( PNot _2 )
# 427 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'guard) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'guard) in
    Obj.repr(
# 230 "src/aorai/promelaparser.mly"
                           ( PAnd (_1,_3) )
# 435 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'guard) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'guard) in
    Obj.repr(
# 231 "src/aorai/promelaparser.mly"
                          ( POr (_1,_3) )
# 443 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'guard) in
    Obj.repr(
# 232 "src/aorai/promelaparser.mly"
                                       ( _2 )
# 450 "src/aorai/promelaparser.ml"
               : 'guard))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 234 "src/aorai/promelaparser.mly"
            ( PRel (Logic_ptree.Neq,PVar _1,PCst(Logic_ptree.IntConstant "0")) )
# 457 "src/aorai/promelaparser.ml"
               : 'guard))
(* Entry promela *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
|]