/* * Copyright (c) 2003, The Tendra Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice unmodified, this list of conditions, and the following * disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * Crown Copyright (c) 1997 * * This TenDRA(r) Computer Program is subject to Copyright * owned by the United Kingdom Secretary of State for Defence * acting through the Defence Evaluation and Research Agency * (DERA). It is made available to Recipients with a * royalty-free licence for its use, reproduction, transfer * to other parties and amendment for any purpose not excluding * product development provided that any such use et cetera * shall be deemed to be acceptance of the following conditions:- * * (1) Its Recipients shall ensure that this Notice is * reproduced upon any copies or amended versions of it; * * (2) Any amended version of it shall be clearly marked to * show both the nature of and the organisation responsible * for the relevant amendment or amendments; * * (3) Its onward transfer from a recipient to another * party shall be deemed to be that party's acceptance of * these conditions; * * (4) DERA gives no warranty or assurance as to its * quality or suitability for any purpose and DERA accepts * no liability whatsoever in relation to any use to which * it may be put. * * $TenDRA: tendra/src/tools/pl/syntax.sid,v 1.2 2004/03/08 14:47:47 bp Exp $ */ %types% AL_TAGDEC ; INT ; LABDEC ; NAME ; PTR_TDF ; STRING ; SORT ; TAGDEC ; TDF ; TOKDEC ; TOKPAR ; ULONG ; %terminals% access_cons ; access_sort ; access_tok ; addrop ; al_tag_sort ; al_tag_tok ; al_tagdef ; alignment_cons ; alignment_sort ; alignment_tok ; arithop ; bar ; !base ; bitfield_variety_cons ; bitfield_variety_sort ; bitfield_variety_tok ; bool_cons ; bool_sort ; bool_tok ; case_term ; ccurl ; char_term ; character ; check_stack ; colon ; comma ; common_term ; commondec_term ; cons ; crd ; csq ; dotdotdot ; double_term ; dynamic ; e_term ; eof ; equals ; error_code_cons ; error_treatment_cons ; error_treatment_sort ; error_treatment_tok ; exp_cons ; exp_sort ; exp_tok ; float_den ; float_query ; float_term ; floating_variety_cons ; floating_variety_sort ; floating_variety_tok ; general ; goesto ; hash ; iddec ; ident ; int_den ; int_term ; keep ; lab ; label_sort ; label_tok ; let ; line_term ; logop ; long_term ; !mantissa ; !maxexp ; !minexp ; minus_term ; nat_cons ; nat_sort ; nat_tok ; !notaterminal ; !ntest_cons ; ntest_sort ; ntest_tok ; ocurl ; offset_query ; ord ; osq ; !point ; proc ; proc_query ; ptr ; ptr_query ; qstring ; query ; relop ; rep ; rounding_mode_cons ; rounding_mode_sort ; rounding_mode_tok ; same ; semi ; shape_cons ; shape_sort ; shape_tok ; short_term ; signed_nat_cons ; signed_nat_sort ; signed_nat_tok ; signed_term ; size_term ; star ; string_cons ; string_sort ; string_term ; string_tok ; struct_term ; tag_cons ; tag_sort ; tag_tok ; tail_call_term ; tokdec ; tokdef ; !token_cons ; token_sort ; !token_tok ; transfer_mode_cons ; transfer_mode_sort ; transfer_mode_tok ; unsigned_term ; untidy ; use ; var ; vardec ; variety_cons ; variety_sort ; variety_tok ; varpar ; %productions% /* ACTION DECLARATIONS */ : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : ( :INT ) -> () ; : () -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : ( :AL_TAGDEC, :TDF, :PTR_TDF, :INT ) -> () ; : () -> ( :AL_TAGDEC, :TDF, :PTR_TDF, :INT ) ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :TDF, :TDF ) ; : ( :TDF ) -> () ; : ( :TDF ) -> () ; : ( :TDF, :TDF, :TDF, :TDF ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :INT ) -> () ; : () -> ( :PTR_TDF ) ; : ( :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF, :STRING ) ; : ( :TDF, :TDF, :PTR_TDF, :STRING ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :STRING ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :STRING ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :STRING ) -> () ; : () -> ( :TDF, :TDF, :TDF, :PTR_TDF, :INT, :LABDEC ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :INT, :LABDEC ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TAGDEC ) ; : ( :TAGDEC ) -> () ; : () -> () ; : () -> ( :TDF, :PTR_TDF, :INT, :ULONG, :INT ) ; : ( :TDF, :PTR_TDF, :INT, :ULONG, :INT ) -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :TDF, :TDF, :PTR_TDF, :LABDEC ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF, :LABDEC ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :TDF, :TDF, :PTR_TDF, :TAGDEC, :LABDEC ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :TDF, :TDF, :PTR_TDF, :TAGDEC, :LABDEC ) -> () ; : () -> ( :TDF, :TDF, :TDF, :PTR_TDF, :LABDEC, :INT ) ; : ( :INT ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF, :LABDEC, :INT ) -> () ; : () -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> ( :TDF, :TDF, :TDF, :PTR_TDF, :INT ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF, :INT ) -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> ( :TDF, :TDF, :TDF, :TDF, :PTR_TDF, :INT, :ULONG ) ; : () -> ( :TDF, :TDF, :TDF, :TDF, :PTR_TDF, :INT, :ULONG ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :TDF, :TDF, :PTR_TDF, :INT, :ULONG ) -> () ; : () -> ( :PTR_TDF, :TOKDEC, :TOKDEC ) ; : ( :PTR_TDF, :TOKDEC, :TOKDEC ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :TDF, :TDF, :INT, :INT, :TAGDEC, :TAGDEC, :TAGDEC ) ; : ( :TDF, :INT, :TAGDEC, :TAGDEC ) -> () ; : ( :TDF, :INT, :TAGDEC ) -> () ; : ( :TDF, :TDF, :TDF, :TDF, :TDF, :INT, :INT, :TAGDEC ) -> () ; : () -> ( :TDF, :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> ( :INT ) ; : ( :INT ) -> () ; : () -> ( :TDF, :PTR_TDF, :INT ) ; : ( :TDF, :PTR_TDF, :INT ) -> () ; : () -> ( :TOKDEC ) ; : ( :TOKDEC ) -> () ; : () -> ( :TDF, :TDF, :TDF, :TDF, :PTR_TDF, :INT, :INT, :INT, :TAGDEC, :LABDEC ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF, :INT ) -> () ; : ( :TDF, :PTR_TDF, :INT ) -> () ; : ( :INT ) -> () ; : ( :TDF, :TDF, :TDF, :TDF, :PTR_TDF, :INT, :INT, :INT, :TAGDEC, :LABDEC ) -> () ; : () -> ( :TDF, :TDF, :TDF, :PTR_TDF, :NAME, :INT ) ; : () -> () ; : () -> () ; : () -> ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :INT ) ; : ( :TDF, :PTR_TDF, :INT ) -> () ; : ( :PTR_TDF, :TAGDEC ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :INT ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :INT ) -> () ; : ( :TAGDEC ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF, :NAME, :INT ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF ) -> () ; : () -> () ; : () -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> ( :PTR_TDF ) ; : ( :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF ) ; : ( :TDF, :TDF ) -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : () -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> () ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :STRING, :INT ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> ( :PTR_TDF ) ; : ( :PTR_TDF ) -> () ; : ( :PTR_TDF ) -> () ; : ( :PTR_TDF ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> () ; : ( :PTR_TDF, :TDF, :PTR_TDF, :INT ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :PTR_TDF ) ; : () -> ( :PTR_TDF, :TDF, :PTR_TDF, :INT ) ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> ( :SORT, :TOKPAR, :TOKPAR ) ; : ( :TOKPAR ) -> () ; : ( :SORT, :TOKPAR, :TOKPAR ) -> () ; : () -> () ; : () -> ( :SORT ) ; : ( :SORT ) -> () ; : () -> () ; : () -> ( :TOKDEC ) ; : ( :TOKDEC ) -> () ; : () -> ( :TDF, :PTR_TDF ) ; : () -> () ; : () -> ( :TDF, :PTR_TDF, :TAGDEC, :INT ) ; : ( :PTR_TDF, :TAGDEC, :INT ) -> () ; : ( :TDF, :PTR_TDF, :TAGDEC, :INT ) -> () ; : () -> () ; : () -> () ; : () -> ( :TDF, :TDF, :PTR_TDF, :TAGDEC ) ; : ( :TAGDEC ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :STRING, :INT ) ; : ( :TDF, :PTR_TDF, :TAGDEC, :STRING ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC ) -> () ; : ( :PTR_TDF, :TAGDEC, :STRING ) -> () ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :INT ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :STRING, :INT ) ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC ) -> () ; : ( :TDF, :TDF, :PTR_TDF, :TAGDEC, :INT ) -> () ; : ( :TAGDEC ) -> () ; : ( :TDF, :PTR_TDF, :TAGDEC, :INT, :TDF, :STRING ) -> () ; : () -> ( :TDF ) ; : ( :TDF ) -> () ; : ( :PTR_TDF ) -> ( :TDF ) ; : ( :TDF, :PTR_TDF, :TAGDEC, :STRING, :TDF ) -> ( :STRING ) ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> ( :TDF ) ; : ( :TDF ) -> () ; : () -> ( :TDF, :PTR_TDF, :TOKDEC ) ; : ( :TDF, :PTR_TDF, :TOKDEC ) -> () ; : () -> () ; : () -> ( :TDF, :TDF, :PTR_TDF, :TOKDEC, :INT ) ; : ( :TDF, :TDF, :PTR_TDF, :TOKDEC, :INT ) -> () ; : () -> ( :TOKDEC ) ; : ( :TOKDEC ) -> () ; : () -> ( :TOKDEC ) ; : ( :TOKDEC ) -> () ; : ( :TOKDEC ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : ( :TDF, :TDF, :TDF, :PTR_TDF ) -> () ; : () -> ( :TDF, :TDF, :PTR_TDF ) ; : ( :TDF, :PTR_TDF ) -> () ; : ( :TDF, :TDF, :PTR_TDF ) -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; : () -> () ; /* PRODUCTION DECLARATIONS */ access_opt ; alignment ; bitfield_variety ; bool ; closed_exp ; exp ; label ; unary_exp ; nat ; proc_def_body ; proc_exp ; shape ; sortname_list_opt ; string ; variety_opt ; /* SORT NAMES */ sortname = { access_sort ; || al_tag_sort ; || alignment_sort ; || bitfield_variety_sort ; || bool_sort ; || error_treatment_sort ; || exp_sort ; || floating_variety_sort ; || label_sort ; || nat_sort ; || ntest_sort ; || rounding_mode_sort ; || shape_sort ; || signed_nat_sort ; || string_sort ; || tag_sort ; || token_sort ; || transfer_mode_sort ; || variety_sort ; } ; full_sortname = { ; sortname ; ; || ; sortname ; ( a, b, c ) = ; osq ; sortname_list_opt ; csq ; ( b ) ; full_sortname ; ( a, b, c ) ; } ; sortname_list = { full_sortname ; ; || full_sortname ; a = ; comma ; sortname_list ; ( a ) ; } ; sortname_list_opt = { ; || sortname_list ; } ; /* TOKEN DECLARATIONS */ signature_opt = { string ; ; || $ ; } ; tok_dec = { tokdec ; ( a, b, c ) = ; ident ; signature_opt ; colon ; osq ; sortname_list_opt ; csq ; full_sortname ; ( a, b, c ) ; } ; /* TOKEN DEFINITIONS */ tok_formal_list = { a = ; ident ; colon ; full_sortname ; ( a ) ; || tok_formal_list ; comma ; a = ; ident ; colon ; full_sortname ; ( a ) ; } ; tok_formal_list_opt = { tok_formal_list ; || ; } ; tok_def_body = { a = ; osq ; tok_formal_list_opt ; csq ; full_sortname ; ( a ) ; } ; tok_def = { ; tokdef ; ( a, b, c, d, e ) = ; ident ; equals ; tok_def_body ; ( a, b, c, d, e ) ; } ; /* STRUCTURE DEFINITIONS */ field_list = { ( a, b, c ) = ; ident ; colon ; shape ; ( a, b, c ) ; || ( a, b, c ) = ; ident ; colon ; shape ; ( a, b, c ) ; comma ; field_list ; } ; struct_def = { struct_term ; a = ; ident ; ord ; field_list ; ( a ) ; crd ; } ; /* TAG SHAPES */ nonst_shape_body = { shape_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; shape ; ( c, d ) ; comma ; shape ; ( a, b, c, d ) ; crd ; || shape_sort ; colon ; shape ; || a = ; shape_tok ; ( a ) ; || a = ; shape_cons ; ( a ) ; || ptr ; ( a, b ) = ; shape ; ( a, b ) ; } ; nonst_shape = { ( a, b, c ) = ; nonst_shape_body ; ( a, b, c ) ; } ; variety_sign = { ; || signed_term ; ; || unsigned_term ; ; } ; shapetok = { ( a, b, c, d ) = ; nonst_shape ; ( a, b, c, d ) ; || float_term ; ; || double_term ; ; || variety_sign ; int_term ; ; || variety_sign ; long_term ; ; || variety_sign ; short_term ; ; || variety_sign ; char_term ; ; } ; /* STRINGS */ string = { ; qstring ; || string_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; string ; comma ; ( c, d ) ; string ; ( a, b, c, d ) ; crd ; || string_sort ; colon ; string ; || a = ; string_tok ; ( a ) ; || a = ; string_cons ; ( a ) ; ## ; } ; /* TAG DECLARATIONS */ tag_dec = { vardec ; ( a, b, c, d ) = ; ident ; access_opt ; ( b, c ) ; signature_opt ; ( d ) ; colon ; shapetok ; ( a, b, c, d ) ; || iddec ; ( a, b, c, d ) = ; ident ; access_opt ; ( b, c ) ; signature_opt ; ( d ) ; colon ; shapetok ; ( a, b, c, d ) ; || commondec_term ; ( a, b, c, d ) = ; ident ; access_opt ; ( b, c ) ; signature_opt ; ( d ) ; colon ; shapetok ; ( a, b, c, d ) ; } ; /* TAG DEFINITIONS */ tag_def = { var ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; ( a, c, d, e ) ; equals ; exp ; ( a, b, c, d ) ; || var ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; ( c, d, e ) ; colon ; shapetok ; ( a, c ) ; equals ; exp ; ( a, b, c, d, f ) ; || var ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; ( c, d, e ) ; colon ; shapetok ; ( a, c ) ; ( d ) ; ( a, b, c, d, f ) ; || common_term ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; ( a, c, d, e ) ; equals ; exp ; ( a, b, c, d ) ; || common_term ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; ( c, d, e ) ; colon ; shapetok ; ( a, c ) ; equals ; exp ; ( a, b, c, d, f ) ; || common_term ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; ( c, d, e ) ; colon ; shapetok ; ( a, c ) ; ( d ) ; ( a, b, c, d, f ) ; || let ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; equals ; ( a, c, d, e ) ; exp ; ( a, b, c, d ) ; || let ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; ( c, d, e ) ; colon ; shapetok ; ( a, c ) ; equals ; exp ; ( a, b, c, d, f ) ; || string_term ; ( a, b, c, d, e, f ) = ; ident ; signature_opt ; g = ( c ) ; variety_opt ; equals ; h = ( a, c, d, e, g ) ; qstring ; ( a, c, d, f, g, h ) ; } ; /* PROCEDURE DEFINITIONS */ proc_def = { proc ; ( a, b, c, d, e, f ) = ; ident ; equals ; ( a, c ) ; proc_def_body ; ( a, b, c, d, e, f ) ; } ; /* ALIGNMENT TAG DEFINITIONS */ al_tag_def = { al_tagdef ; ( a, b, c, d ) = ; ident ; equals ; alignment ; ( a, b, c, d ) ; } ; /* ACCESSES */ access = { access_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; access ; comma ; ( c, d ) ; access ; ( a, b, c, d ) ; crd ; || access_sort ; colon ; access ; || a = ; access_tok ; ( a ) ; || a = ; access_cons ; ( a ) ; ( a ) ; ## ; } ; access_list = { access ; ; || access_list ; ( a, b, c ) = ; comma ; access ; ( a, b, c ) ; } ; access_opt = { osq ; access_list ; csq ; || $ ; } ; /* ALIGNMENT TAGS */ al_tag = { al_tag_sort ; colon ; al_tag ; || a = ; al_tag_tok ; ( a ) ; || ; ident ; ## ; } ; /* ALIGNMENTS */ alignment_list = { alignment ; || alignment_list ; ( a, b ) = ; comma ; alignment ; ( a, b ) ; } ; alignment_list_opt = { ; || ( a, b, c ) = ; alignment_list ; ( a, b, c ) ; } ; alignment = { alignment_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; comma ; ( b, d ) ; alignment ; comma ; ( c, d ) ; alignment ; ( a, b, c, d ) ; crd ; || alignment_sort ; colon ; alignment ; || a = ; alignment_tok ; ( a ) ; || ( a, b ) = ; al_tag ; ( a, b ) ; || a = ; alignment_cons ; ( a ) ; || ord ; alignment_list_opt ; crd ; ## ; } ; /* BITFIELD VARIETIES */ after_bv_sort = { ( a, b, c, d ) = ; query ; ord ; exp ; comma ; ( b, d ) ; bitfield_variety ; comma ; ( c, d ) ; bitfield_variety ; ( a, b, c, d ) ; crd ; || colon ; bitfield_variety ; } ; bitfield_sign = { bool ; || variety_sign ; ; } ; bitfield_variety = { bitfield_variety_sort ; after_bv_sort ; || a = ; bitfield_variety_tok ; ( a ) ; || a = ; bitfield_variety_cons ; ( a ) ; || ( a, b, c ) = ; bitfield_sign ; ( a, b, c ) ; nat ; ( a, b, c ) ; ## ; } ; /* BOOLS */ after_bool_sort = { ( a, b, c, d ) = ; query ; ord ; exp ; comma ; ( b, d ) ; bool ; comma ; ( c, d ) ; bool ; ( a, b, c, d ) ; crd ; || colon ; bool ; } ; bool = { bool_sort ; after_bool_sort ; || a = ; bool_tok ; ( a ) ; || a = ; bool_cons ; ( a ) ; ## ; } ; /* ERROR CODES */ error_code = { a = ; error_code_cons ; ( a ) ; ## ; } ; error_code_list = { error_code ; ; || error_code_list ; comma ; error_code ; ; ## ; } ; /* ERROR TREATMENTS */ error_treatment = { error_treatment_sort ; ( a, b, c, d ) = ; query ; ord ; exp ; comma ; ( b, d ) ; error_treatment ; comma ; ( c, d ) ; error_treatment ; ( a, b, c, d ) ; crd ; || error_treatment_sort ; colon ; error_treatment ; || a = ; error_treatment_tok ; ( a ) ; || a = ; error_treatment_cons ; ( a ) ; || ( a, b ) = ; label ; ( a, b ) ; || osq ; ( a, b ) = ; error_code_list ; ( a, b ) ; csq ; ## ; } ; /* FLOATING VARIETIES */ floating_variety = { floating_variety_sort ; ( a, b, c, d ) = ; query ; ord ; exp ; comma ; ( b, d ) ; floating_variety ; comma ; ( c, d ) ; floating_variety ; ( a, b, c, d ) ; crd ; || floating_variety_sort ; colon ; floating_variety ; || a = ; floating_variety_tok ; ( a ) ; || a = ; floating_variety_cons ; ( a ) ; || double_term ; ; || float_term ; ; ## ; } ; /* LABELS */ label = { label_sort ; colon ; label ; || a = ; label_tok ; ( a ) ; || ; ident ; ## ; } ; /* NATS */ integer = { ; int_den ; || ; character ; } ; nat_not_int = { nat_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; nat ; ( c, d ) ; comma ; nat ; ( a, b, c, d ) ; crd ; || nat_sort ; colon ; nat ; || a = ; nat_tok ; ( a ) ; || a = ; nat_cons ; ( a ) ; } ; nat = { integer ; ; || nat_not_int ; ## ; } ; nat_option = { ( a, b ) = ; nat ; ( a, b ) ; || $ ; ## ; } ; /* NTESTS */ ntest = { ntest_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; ntest ; ( c, d ) ; comma ; ntest ; ( a, b, c, d ) ; crd ; || ntest_sort ; colon ; ntest ; || a = ; ntest_tok ; ( a ) ; || ; relop ; ## ; } ; /* ROUNDING MODES */ rounding_mode = { rounding_mode_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; comma ; ( b, d ) ; rounding_mode ; comma ; ( c, d ) ; rounding_mode ; ( a, b, c, d ) ; crd ; || rounding_mode_sort ; colon ; rounding_mode ; || a = ; rounding_mode_tok ; ( a ) ; || a = ; rounding_mode_cons ; ( a ) ; ## ; } ; rounding_mode_opt = { rounding_mode ; || ; } ; /* SHAPES */ shape_body = { shape_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; shape ; ( c, d ) ; comma ; shape ; ( a, b, c, d ) ; crd ; || shape_sort ; colon ; shape ; || a = ; shape_tok ; ( a ) ; || a = ; shape_cons ; ( a ) ; || float_term ; ; || double_term ; ; || variety_sign ; int_term ; ; || variety_sign ; long_term ; ; || variety_sign ; short_term ; ; || variety_sign ; char_term ; ; || ptr ; ( a, b ) = ; shape ; ( a, b ) ; } ; shape = { ( a, b, c ) = ; shape_body ; ( a, b, c ) ; ## ; } ; /* SIGNED NATS */ signed_nat_body = { signed_nat_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; signed_nat_body ; ( c, d ) ; comma ; signed_nat_body ; ( a, b, c, d ) ; crd ; || signed_nat_sort ; colon ; signed_nat_body ; || a = ; signed_nat_tok ; ( a ) ; || a = ; signed_nat_cons ; ( a ) ; || integer ; ; || minus_term ; integer ; ; || minus_term ; ( a, b ) = ; nat_not_int ; ( a, b ) ; || ( a, b ) = ; arithop ; nat_not_int ; ( a, b ) ; || ; line_term ; } ; signed_nat = { signed_nat_body ; ## ; } ; /* TAGS */ tag = { tag_sort ; colon ; tag ; || a = ; tag_tok ; ( a ) ; || a = ; tag_cons ; ( a ) ; || ; ident ; ## ; } ; /* TOKENS */ tok_item = { access_tok ; || al_tag_tok ; || alignment_tok ; || bitfield_variety_tok ; || bool_tok ; || error_treatment_tok ; || exp_tok ; || floating_variety_tok ; || label_tok ; || nat_tok ; || ntest_tok ; || rounding_mode_tok ; || shape_tok ; || signed_nat_tok ; || tag_tok ; || transfer_mode_tok ; || variety_tok ; } ; token = { token_sort ; colon ; token ; || ; tok_item ; || use ; a = ; tok_def_body ; ( a ) ; ## ; } ; /* TRANSFER MODES */ transfer_mode = { transfer_mode_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; transfer_mode ; ( c, d ) ; comma ; transfer_mode ; ( a, b, c, d ) ; crd ; || transfer_mode_sort ; colon ; transfer_mode ; || a = ; transfer_mode_tok ; ( a ) ; || a = ; transfer_mode_cons ; ( a ) ; ## ; } ; /* VARIETIES */ variety = { variety_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; variety ; ( c, d ) ; comma ; variety ; ( a, b, c, d ) ; crd ; || variety_sort ; colon ; variety ; || a = ; variety_tok ; ( a ) ; || a = ; variety_cons ; ( a ) ; || ( a, b, c ) = ; signed_nat_body ; ( b, c ) ; colon ; signed_nat_body ; ( a, b, c ) ; || variety_sign ; int_term ; ; || variety_sign ; long_term ; ; || variety_sign ; short_term ; ; || variety_sign ; char_term ; ; ## ; } ; variety_opt = { ord ; variety ; crd ; || ; } ; /* EXPRESSIONS */ binop = { arithop ; || star ; || minus_term ; } ; exp_body = { unary_exp ; || unary_exp ; ( a, b, c, d ) = ; addrop ; unary_exp ; ( a, b, c, d ) ; || unary_exp ; ( a, b, c, d ) = ; logop ; unary_exp ; ( a, b, c, d ) ; || unary_exp ; ( a, b, c, d ) = ; binop ; unary_exp ; ( a, b, c, d ) ; || unary_exp ; ( a, b, c, d ) = ; equals ; unary_exp ; ( a, b, c, d ) ; } ; exp = { ( a, b, c, d, e ) = ; exp_body ; ( a, b, c, d, e ) ; ## ; } ; exp_sequence = { ; || exp ; ; || exp_sequence ; ( a, b ) = ; semi ; exp ; ( a, b ) ; || exp_sequence ; ( a, b ) = ; semi ; ; ( a, b ) ; } ; labset_opt = { a = ; colon ; label ; colon ; ( a ) ; || ; } ; labelled_list = { colon ; ( a, b ) = ; label ; ( a ) ; colon ; exp_sequence ; ( a, b ) ; ; || colon ; ( a, b ) = ; label ; ( a ) ; colon ; exp_sequence ; ( a, b ) ; bar ; labelled_list ; ; } ; labdest_opt = { bar ; a = ; label ; ( a ) ; || ; } ; query_type = { query ; ; || float_query ; ; || ptr_query ; ; || proc_query ; ; || offset_query ; ; } ; range = { a = ; signed_nat_body ; ( a ) ; || a = ; signed_nat_body ; colon ; ( a ) ; signed_nat_body ; ( a ) ; } ; range_label_list = { ( a, b ) = ; range ; goesto ; label ; ( a, b ) ; || ( a, b ) = ; range ; goesto ; label ; ( a, b ) ; comma ; range_label_list ; ; } ; offset_exp_list = { exp ; colon ; exp ; ; || exp ; colon ; exp ; comma ; offset_exp_list ; ; } ; exponent_opt = { e_term ; signed_nat_body ; || ; } ; exp_comma_list = { exp ; ; || exp_comma_list ; comma ; exp ; ; } ; exp_list = { ; exp_comma_list ; || ; ## ; } ; varpar_opt = { varpar ; exp ; ; || ; } ; tagshacc = { ( a, b, c, d ) = ; ident ; access_opt ; ( b, c, d ) ; colon ; shape ; ( a, b, c, d ) ; } ; tagshacc_list = { tagshacc ; ; || tagshacc_list ; comma ; tagshacc ; ; } ; tagshacc_list_opt = { ; tagshacc_list ; || ; } ; varintro_opt = { varpar ; tag ; colon ; alignment ; || $ ; } ; tag_intro = { var ; ( a, b, c, d, e ) = ; ident ; access_opt ; ( b, c, e ) ; equals ; exp ; ( a, b, c, d, e ) ; || var ; ( a, b, c, d, e ) = ; ident ; access_opt ; ( c, d ) ; colon ; shape ; ( b, c, e ) ; equals ; exp ; ( a, b, c, d, e ) ; || var ; ( a, b, c, d, e ) = ; ident ; access_opt ; ( c, d ) ; colon ; shape ; ( b, c, e ) ; ( d ) ; ( a, b, c, d, e ) ; || let ; ( a, b, c, d, e ) = ; ident ; access_opt ; ( b, c, e ) ; equals ; exp ; ( a, b, c, d, e ) ; } ; repeat_starter_opt = { ord ; exp_sequence ; crd ; || ; } ; untidy_opt = { ; || untidy ; ; || untidy ; check_stack ; ; || check_stack ; ; } ; postlude_opt = { semi ; exp ; || ; } ; caller_var_opt = { dotdotdot ; ; || ; } ; callee_var_opt = { dotdotdot ; ; || ; } ; otagexp = { ( a, b ) = ; exp ; ( a, b ) ; || ( a, b ) = ; exp ; colon ; ( a, b ) ; ident ; } ; otagexp_list = { otagexp ; ; || otagexp_list ; ; comma ; otagexp ; } ; otagexp_list_opt = { otagexp_list ; || ; } ; callee = { ( a, b ) = ; exp_list ; ( a, b ) ; || dynamic ; ( a, b, c ) = ; ord ; exp ; ( a, b, c ) ; comma ; exp ; ( a, b, c ) ; crd ; || same ; ; } ; unary_exp = { exp_sort ; query ; ( a, b, c, d ) = ; ord ; exp ; ( b, d ) ; comma ; exp ; ( c, d ) ; comma ; exp ; ( a, b, c, d ) ; crd ; || exp_sort ; colon ; unary_exp ; || a = ; exp_tok ; ( a ) ; || a = ; exp_cons ; ( a ) ; || closed_exp ; || ord ; exp ; crd ; || minus_term ; ord ; ( a, b ) = ; exp ; ( a, b ) ; crd ; || size_term ; ord ; ( a, b ) = ; shape ; ( a, b ) ; crd ; || tag ; ; || star ; ; ident ; || star ; ( a, b, c ) = ; ord ; shape ; crd ; ( b, c ) ; unary_exp ; ( a, b, c ) ; || query_type ; ord ; ( a, b, c, d, e ) = ; exp ; ( b, d ) ; ntest ; ( c, d ) ; exp ; labdest_opt ; ( a, b, c, d, e ) ; crd ; || case_term ; ( a, b, c ) = ; exp ; ord ; ( a, b, c ) ; range_label_list ; ( a, b, c ) ; crd ; || cons ; osq ; ( a, b, c ) = ; exp ; ( a, b, c ) ; csq ; ord ; offset_exp_list ; ( a, b, c ) ; crd ; || osq ; ( a, b, c ) = ; variety ; ( a, b, c ) ; csq ; unary_exp ; ( a, b, c ) ; || signed_nat_body ; ( a, b ) = ; ord ; variety ; ( a, b ) ; crd ; || ( a, b, c, d, e, f, g ) = ; float_den ; exponent_opt ; ord ; ( c, e ) ; floating_variety ; ( d, e ) ; rounding_mode_opt ; ( a, b, c, d, e, f, g ) ; crd ; || minus_term ; ( a, b, c, d, e, f, g ) = ; float_den ; exponent_opt ; ord ; ( c, e ) ; floating_variety ; ( d, e ) ; rounding_mode_opt ; ( a, b, c, d, e, f, g ) ; crd ; || proc_exp ; ( a, b, c, d ) = ; osq ; shape ; ( b ) ; csq ; ord ; exp_list ; ( c ) ; varpar_opt ; ( a, b, c, d ) ; crd ; || proc_exp ; ( a, b, c, d ) = ; osq ; shape ; ( b ) ; csq ; osq ; ( e, f, g, h, i, j, k, l ) = ; otagexp_list_opt ; caller_var_opt ; ( e, h, j, k ) ; semi ; callee ; callee_var_opt ; ( f, i, k ) ; postlude_opt ; csq ; untidy_opt ; ( a, b, e, f, g, h, i, l ) ; || proc_exp ; a = ; tail_call_term ; osq ; callee ; callee_var_opt ; ( a ) ; csq ; || proc ; proc_def_body ; || ( a, b, c ) = ; string ; ( b, c ) ; ord ; variety ; crd ; ( a, b, c ) ; || hash ; ; } ; closed_exp = { ocurl ; exp_sequence ; ccurl ; || query ; ( a, b, c, d, e, f ) = ; ocurl ; exp_sequence ; ( b, d ) ; bar ; labset_opt ; ( c, e, f ) ; exp_sequence ; ( a, b, c, d ) ; ccurl ; || lab ; ( a, b, c, d, e ) = ; ocurl ; exp_sequence ; ( b, d ) ; bar ; labelled_list ; ccurl ; ( a, b, c, d, e ) ; || rep ; ( a, b, c, d, e, f ) = ; repeat_starter_opt ; ( f ) ; ocurl ; labset_opt ; ( b, c, d ) ; exp_sequence ; ( a, b, c, d, e, f ) ; ccurl ; || a = ; tag_intro ; ( b, c, d, e, f, g ) = ; closed_exp ; ( b, c, d, e, f, g ) ; ( a ) ; } ; proc_def_body = { ( a, b, c, d, e, f, g ) = ; shape ; ( a, e ) ; ord ; tagshacc_list_opt ; ( b, e ) ; varintro_opt ; ( c, e ) ; crd ; closed_exp ; ( a, b, c, d, e, f, g ) ; || general ; ( a, b, c, d, e, f, g, h, i, j ) = ; shape ; ( b, e ) ; ord ; tagshacc_list_opt ; caller_var_opt ; ( c, e, f ) ; semi ; tagshacc_list_opt ; callee_var_opt ; ( d, e, g ) ; crd ; untidy_opt ; ( h ) ; closed_exp ; ( a, b, c, d, e, f, g, h, i, j ) ; } ; proc_exp = { ord ; exp ; crd ; || tag ; ; } ; /* COMPILATION UNIT */ element = { tok_dec ; || tok_def ; || tag_dec ; || tag_def ; || al_tag_def ; || struct_def ; || proc_def ; } ; element_list_opt = { element ; semi ; element_list_opt ; || $ ; } ; keep_item = { ; tok_item ; || ; ident ; } ; keep_list = { keep_item ; || keep_item ; comma ; keep_list ; } ; keep_list_opt = { keep_list ; || $ ; } ; program = { element_list_opt ; keep ; ord ; ; keep_list_opt ; crd ; eof ; ; || element_list_opt ; eof ; ; ; ## ; } ; %entry% program, access, alignment, al_tag, bitfield_variety, bool, error_code, error_code_list, error_treatment, exp, exp_list, floating_variety, label, nat, nat_option, ntest, rounding_mode, shape, signed_nat, string, tag, token, transfer_mode, variety ;