123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990(*
* This file is part of the Watson Conversation Service OCaml API project.
*
* Copyright 2016-2017 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*)typelocation=Lexing.position*Lexing.position(** {6 } atomic types *)typespel_type=|T_string|T_int|T_real|T_boolean|T_object(** {6 literals} *)typeliteral=|L_stringofstring|L_intofint|L_realoffloat|L_booleanofbool|L_null(** {6 operators} *)typeop=|Op_eq|Op_ne|Op_lt|Op_le|Op_gt|Op_ge|Op_not|Op_and|Op_or|Op_plus|Op_minus|Op_uminus|Op_mult|Op_div|Op_mod|Op_concat|Op_toString(** {6 expressions} *)typeexpression={expr_desc:expression_desc;expr_loc:location;mutableexpr_text:stringoption}andexpression_desc=(* Spel expressions *)|E_litofliteral|E_propofexpression*string(** e.x *)|E_prop_catchofexpression*string(** e?.x *)|E_getofexpression*expression(** e1\[e2\] *)|E_listofexpressionlist(** { e1, e2 .. } *)|E_new_arrayofspel_type*intoptionlist*expressionlistoption(** new T[]{ e1, e2 ... } *)|E_newofstring*expressionlist(** new T(e1,e2...) *)|E_callofexpressionoption*string*expressionlist(** e.m(e1,e2...) *)|E_call_catchofexpressionoption*string*expressionlist(** e?.m(e1,e2...) *)|E_opofop*expressionlist|E_conditionalofexpression*expression*expression(** e1?e2:e3 *)|E_identofstring(** v *)(* WCS extensions *)|E_anything_else(** anything_else *)|E_context(** context *)|E_conversation_start(** conversation_start *)|E_entities(** entities *)|E_input(** output *)|E_intents(** entities *)|E_output(** output *)|E_variableof(string*stringoption)(** $v or $v:(w) *)|E_intentofstring(** #intent *)|E_entityof(string*stringoption)(** @a or @a:(b) *)(* Fallback *)|E_errorofstringtypespel=expression