%{
/*
* Copyright (c) 2020 NVI, Inc.
*
* This file is part of VLBI Field System
* (see http://github.com/nvi-inc/fs).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#include
#include
#include
#include "vex.h"
#define YYDEBUG 1
/* globals */
struct vex *vex_ptr=NULL;
extern int lines;
int yylex();
void yyerror(char const* s);
%}
%union
{
int ival;
char *sval;
struct llist *llptr;
struct qref *qrptr;
struct def *dfptr;
struct block *blptr;
struct lowl *lwptr;
struct dvalue *dvptr;
struct external *exptr;
struct chan_def *cdptr;
struct switching_cycle *scptr;
struct station *snptr;
struct source *soptr;
struct intent *inptr;
struct data_transfer *dtptr;
struct pointing_offset *ptptr;
struct axis_type *atptr;
struct antenna_motion *amptr;
struct pointing_sector *psptr;
struct nasmyth *nsptr;
struct bbc_assign *baptr;
struct stream_def *sdptr;
struct stream_sample_rate *ssptr;
struct stream_label *slptr;
struct headstack *hsptr;
struct clock_early *ceptr;
struct tape_length *tlptr;
struct tape_motion *tmptr;
struct equip *eqptr;
struct composite_equip *cqptr;
struct equip_set *esptr;
struct equip_info *eiptr;
struct connection *coptr;
struct record_method *rmptr;
struct datastream *daptr;
struct thread *thptr;
struct channel *chptr;
struct merged_datastream *mdptr;
struct eop_origin *eoptr;
struct nut_origin *noptr;
struct exper_name *enptr;
struct scheduling_software *schsptr;
struct vex_file_writer *vfwptr;
struct extension *etptr;
struct headstack_pos *hpptr;
struct if_def *ifptr;
struct receiver_name *rnptr;
struct sub_lo_frequencies *sfptr;
struct sub_lo_sidebands *sbptr;
struct switched_power *swptr;
struct phase_cal_detect *pdptr;
struct setup_always *saptr;
struct parity_check *pcptr;
struct tape_prepass *tpptr;
struct preob_cal *prptr;
struct midob_cal *miptr;
struct postob_cal *poptr;
struct sefd *septr;
struct site_id *siptr;
struct site_position *spptr;
struct site_velocity *svptr;
struct ocean_load_vert *ovptr;
struct ocean_load_horiz *ohptr;
struct source_type *stptr;
struct source_model *smptr;
struct datum *dmptr;
struct c_vector *vrptr;
struct vsn *vsptr;
struct fanin_def *fiptr;
struct fanout_def *foptr;
struct vlba_frmtr_sys_trk *fsptr;
struct s2_data_source *dsptr;
struct format_def *fmptr;
struct thread_def *thdptr;
struct channel_def *chdptr;
}
%token T_VEX_REV T_REF T_DEF T_ENDDEF T_SCAN T_ENDSCAN
%token T_CHAN_DEF T_SAMPLE_RATE T_BITS_PER_SAMPLE T_SWITCHING_CYCLE
%token T_START T_SOURCE T_MODE T_STATION T_DATA_TRANSFER T_INTENT
%token T_POINTING_OFFSET
%token T_ANTENNA_DIAM T_AXIS_OFFSET T_ANTENNA_MOTION T_POINTING_SECTOR
%token T_AXIS_TYPE T_NASMYTH
%token T_BBC_ASSIGN
%token T_STREAM_DEF T_STREAM_SAMPLE_RATE T_STREAM_LABEL
%token T_CLOCK_EARLY
%token T_RECORD_TRANSPORT_TYPE T_ELECTRONICS_RACK_TYPE T_NUMBER_DRIVES
%token T_HEADSTACK T_RECORD_DENSITY T_TAPE_LENGTH
%token T_RECORDING_SYSTEM_ID T_TAPE_MOTION T_TAPE_CONTROL
%token T_EQUIP T_COMPOSITE_EQUIP T_EQUIP_SET T_EQUIP_INFO T_CONNECTION
%token T_RECORD_METHOD T_RECORD_CONTROL
%token T_DATASTREAM T_THREAD T_CHANNEL T_MERGED_DATASTREAM
%token T_TAI_UTC T_A1_TAI T_EOP_REF_EPOCH T_NUM_EOP_POINTS
%token T_EOP_INTERVAL T_UT1_UTC T_X_WOBBLE T_Y_WOBBLE
%token T_NUT_REF_EPOCH T_NUM_NUT_POINTS T_NUT_INTERVAL T_DELTA_PSI
%token T_DELTA_EPS T_NUT_MODEL
%token T_EOP_ORIGIN T_DELTA_X_NUT T_DELTA_Y_NUT T_NUT_ORIGIN
%token T_EXPER_NUM T_EXPER_NAME T_EXPER_NOMINAL_START
%token T_EXPER_NOMINAL_STOP T_PI_NAME T_PI_EMAIL T_CONTACT_NAME
%token T_CONTACT_EMAIL T_SCHEDULER_NAME T_SCHEDULER_EMAIL
%token T_TARGET_CORRELATOR T_EXPER_DESCRIPTION T_SCHEDULING_SOFTWARE
%token T_VEX_FILE_WRITER
%token T_EXTENSION
%token T_HEADSTACK_POS
%token T_IF_DEF T_RECEIVER_NAME T_SUB_LO_FREQUENCIES
%token T_SUB_LO_SIDEBANDS T_SWITCHED_POWER
%token T_PASS_ORDER
%token T_S2_GROUP_ORDER
%token T_PHASE_CAL_DETECT
%token T_TAPE_CHANGE T_NEW_SOURCE_COMMAND T_NEW_TAPE_SETUP
%token T_SETUP_ALWAYS T_PARITY_CHECK T_TAPE_PREPASS T_PREOB_CAL
%token T_MIDOB_CAL T_POSTOB_CAL T_HEADSTACK_MOTION
%token T_PROCEDURE_NAME_PREFIX
%token T_ROLL_REINIT_PERIOD T_ROLL_INC_PERIOD T_ROLL T_ROLL_DEF
%token T_SEFD_MODEL T_SEFD
%token T_SITE_TYPE T_SITE_NAME T_SITE_ID T_SITE_POSITION
%token T_SITE_POSITION_EPOCH T_SITE_POSITION_REF T_SITE_VELOCITY
%token T_HORIZON_MAP_AZ T_HORIZON_MAP_EL T_ZEN_ATMOS
%token T_OCEAN_LOAD_VERT T_OCEAN_LOAD_HORIZ T_OCCUPATION_CODE
%token T_INCLINATION T_ECCENTRICITY T_ARG_PERIGEE T_ASCENDING_NODE
%token T_MEAN_ANOMALY T_SEMI_MAJOR_AXIS T_MEAN_MOTION T_ORBIT_EPOCH
%token T_SOURCE_TYPE T_SOURCE_NAME T_IAU_NAME T_RA T_DEC
%token T_SOURCE_POSITION_REF T_RA_RATE T_DEC_RATE
%token T_SOURCE_POSITION_EPOCH T_REF_COORD_FRAME
%token T_VELOCITY_WRT_LSR T_SOURCE_MODEL
%token T_BSP_FILE_NAME T_BSP_OBJECT_ID
%token T_TLE0 T_TLE1 T_TLE2 T_DATUM T_VECTOR
%token T_VSN
%token T_FANIN_DEF T_FANOUT_DEF T_TRACK_FRAME_FORMAT T_DATA_MODULATION
%token T_VLBA_FRMTR_SYS_TRK T_VLBA_TRNSPRT_SYS_TRK
%token T_S2_RECORDING_MODE T_S2_DATA_SOURCE
%token T_FORMAT_DEF T_THREAD_DEF T_CHANNEL_DEF
%token B_GLOBAL B_STATION B_MODE B_SCHED
%token B_EXPER B_SCHEDULING_PARAMS B_PROCEDURES B_EOP B_FREQ B_CLOCK
%token B_ANTENNA B_BBC B_CORR B_DAS B_HEAD_POS B_PASS_ORDER
%token B_PHASE_CAL_DETECT B_ROLL B_IF B_SEFD B_SITE B_SOURCE B_TRACKS
%token B_TAPELOG_OBS B_BITSTREAMS B_THREADS B_DATASTREAMS B_EXTENSIONS
%token T_LITERAL
%token T_NAME T_LINK T_ANGLE
%token T_COMMENT T_COMMENT_TRAILING
%type version
%type version_lowls
%type version_lowl
%type block
%type blocks
%type global_block
%type station_block station_defs
%type station_def
%type station_defx
%type mode_block mode_defs
%type mode_def
%type mode_defx
%type qrefs refs qualifiers
%type primitive
%type qref ref
%type refx qrefx
%type sched_block sched_defs sched_lowls
%type sched_def
%type sched_lowl sched_defx
%type start mode
%type source
%type source_stations
%type source_station
%type start_position
%type station
%type drives
%type pass sector
%type data_transfer
%type intent
%type pointing_offset
%type scan_id method destination options
%type unit_value2
%type antenna_block antenna_defs antenna_lowls
%type antenna_def
%type antenna_lowl antenna_defx
%type antenna_diam axis_offset
%type axis_type
%type antenna_motion
%type pointing_sector
%type nasmyth
%type bbc_block bbc_defs bbc_lowls
%type bbc_def
%type bbc_lowl bbc_defx
%type bbc_assign
%type bitstreams_block bitstreams_defs bitstreams_lowls
%type bitstreams_def
%type bitstreams_lowl bitstreams_defx
%type stream_def
%type stream_sample_rate
%type stream_label
%type clock_block clock_defs clock_lowls
%type clock_def
%type clock_lowl clock_defx
%type clock_early
%type das_block das_defs das_lowls
%type das_def
%type das_lowl das_defx
%type record_transport_type electronics_rack_type tape_control
%type number_drives
%type record_density recording_system_id
%type headstack
%type tape_length
%type tape_motion
%type equip
%type composite_equip
%type link_list
%type equip_set
%type equip_info
%type connection
%type record_method
%type record_control
%type datastreams_block datastreams_defs datastreams_lowls
%type datastreams_def
%type datastreams_lowl datastreams_defx
%type datastream
%type thread
%type channel
%type merged_datastream
%type eop_block eop_defs eop_lowls
%type eop_def
%type eop_lowl eop_defx
%type tai_utc a1_tai num_eop_points eop_interval
%type eop_ref_epoch
%type ut1_utc x_wobble y_wobble
%type nut_ref_epoch
%type num_nut_points nut_interval
%type delta_psi delta_eps
%type nut_model
%type eop_origin
%type delta_x_nut delta_y_nut
%type nut_origin
%type exper_block exper_defs exper_lowls
%type exper_def
%type exper_lowl exper_defx
%type exper_num
%type exper_name
%type exper_nominal_start exper_description
%type exper_nominal_stop pi_name pi_email contact_name
%type contact_email scheduler_name scheduler_email
%type target_correlator
%type scheduling_software
%type vex_file_writer
%type extensions_block extensions_defs extensions_lowls
%type extensions_def
%type extensions_lowl extensions_defx
%type extension
%type freq_block freq_defs freq_lowls
%type freq_def
%type freq_lowl freq_defx
%type chan_def
%type sample_rate bits_per_sample switch_state
%type switch_states
%type switching_cycle
%type head_pos_block head_pos_defs head_pos_lowls
%type head_pos_def
%type head_pos_lowl head_pos_defx
%type headstack_pos
%type if_block if_defs if_lowls
%type if_def
%type if_lowl if_defx
%type if_def_st
%type receiver_name
%type sub_lo_frequencies
%type sub_lo_sidebands
%type switched_power
%type pass_order_block pass_order_defs pass_order_lowls
%type pass_order_def
%type pass_order_lowl pass_order_defx
%type pass_order s2_group_order
%type phase_cal_detect_block phase_cal_detect_defs
%type phase_cal_detect_lowls
%type phase_cal_detect_def
%type phase_cal_detect_lowl phase_cal_detect_defx
%type phase_cal_detect
%type procedures_block procedures_defs procedures_lowls
%type procedures_def
%type procedures_lowl procedures_defx
%type tape_change headstack_motion new_source_command new_tape_setup
%type setup_always
%type parity_check
%type tape_prepass
%type preob_cal
%type midob_cal
%type postob_cal
%type procedure_name_prefix
%type roll_block roll_defs roll_lowls
%type roll_def
%type roll_lowl roll_defx
%type roll_reinit_period roll_inc_period
%type roll
%type roll_def_st
%type scheduling_params_block scheduling_params_defs
%type scheduling_params_lowls
%type scheduling_params_def
%type scheduling_params_lowl scheduling_params_defx
%type sefd_block sefd_defs sefd_lowls
%type sefd_def
%type sefd_lowl sefd_defx
%type sefd_model
%type sefd
%type site_block site_defs site_lowls
%type site_def
%type site_lowl site_defx
%type site_type site_name occupation_code orbit_epoch
%type site_position_epoch site_position_ref
%type site_id
%type site_position
%type site_velocity
%type horizon_map_az horizon_map_el
%type ocean_load_vert
%type ocean_load_horiz
%type zen_atmos inclination eccentricity arg_perigee ascending_node
%type mean_anomaly semi_major_axis mean_motion
%type source_block source_defs source_lowls
%type source_def
%type source_lowl source_defx
%type source_name iau_name ra dec source_position_ref ref_coord_frame
%type source_position_epoch bsp_file_name bsp_object_id
%type tle0 tle1 tle2
%type ra_rate dec_rate velocity_wrt_lsr
%type source_type
%type source_model
%type datum
%type vector
%type tapelog_obs_block tapelog_obs_defs tapelog_obs_lowls
%type tapelog_obs_def
%type tapelog_obs_lowl tapelog_obs_defx
%type vsn
%type