4 Ann Hell Ex Machina - Music Software
5 Copyright (C) 2003/2006 Angel Ortega <angel@triptico.com>
7 compiler.y - Scripting language YACC parser
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 http://www.triptico.com
41 void yyerror(char * s
);
43 /* injecting code functions (defined in compiler.l) */
44 int push_code
(char * code
);
45 int push_code_from_file
(char * file
);
57 static double staccato
;
61 /* parser debugging */
63 #define DEBUGF if(verbose >= 2)printf
74 static struct block
* blocks
= NULL
;
75 static int n_blocks
= 0;
85 static struct group
* groups
= NULL
;
86 static int n_groups
= 0;
87 static int groups_size
= 0;
96 static struct mark
* marks
= NULL
;
97 static int n_marks
= 0;
108 static struct arp
* arps
= NULL
;
109 static int n_arps
= 0;
110 static int arps_size
= 0;
112 static double arp_delay
;
113 static int arp_transpose
;
114 static float arp_volume
;
115 static int arp_track_off
;
117 int compiler_error
= 0;
122 int tonality
= 0; /* C Major */
124 int tonalities
[12][12] = {
125 /* C C# D D# E F F# G G# A A# B */
126 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* CM / Am */
127 { 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 }, /* C#M / A#m */
128 { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, /* DM / Bm */
129 { 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, -1 }, /* E&M / Cm */
130 { 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, /* EM / C#m */
131 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 }, /* FM / Dm */
132 { 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0 }, /* F#M / D#m */
133 { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, /* GM / Em */
134 { 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1 }, /* A&M / Fm */
135 { 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, /* AM / F#m */
136 { 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1 }, /* B&M / Gm */
137 { 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0 } /* BM / G#m */
139 #endif /* TONALITIES */
141 /* alterations for each note */
145 unsigned long block_seed
= 0;
149 ********************/
151 unsigned long ah_rnd
(unsigned long * seed
)
152 /* special randomizer */
154 *seed
= (*seed
* 58321) + 11113;
160 void c_err
(char * e1
, char * e2
, char * e3
)
161 /* reports an error from the compiler */
164 if
(e1
!= NULL
) printf
(" %s", e1
);
165 if
(e2
!= NULL
) printf
(" %s", e2
);
166 if
(e3
!= NULL
) printf
(" %s", e3
);
167 printf
(" in line %d\n", yyline
);
173 static void forward
(double step
)
174 /* moves forward current time */
179 /* quantizations could be done here */
185 static int find_block
(char * name
)
190 for
(n
= 0;n
< n_blocks
;n
++)
192 if
(strcmp
(name
, blocks
[n
].name
) == 0)
200 static int set_block
(char * name
, char * block
)
201 /* defines a block */
208 /* if block already exists, free it */
209 if
((n
= find_block
(name
)) >= 0)
213 /* free all subblocks */
214 for
(n
= 0;n
< b
->n_sblocks
;n
++)
217 /* free the subblock array */
222 GROW
(blocks
, n_blocks
, struct block
);
223 b
= &blocks
[n_blocks
++];
225 b
->name
= strdup
(name
);
232 /* now split in subblocks (delimited by : ) */
235 while
((stop
= strchr
(start
, ':')) != NULL
)
240 /* add the subblock */
241 GROW
(b
->sblocks
, b
->n_sblocks
, char *);
242 b
->sblocks
[b
->n_sblocks
++] = strdup
(start
);
247 /* no more separators? store the rest */
248 GROW
(b
->sblocks
, b
->n_sblocks
, char *);
249 b
->sblocks
[b
->n_sblocks
++] = strdup
(start
);
251 /* the original block is no longer needed */
258 static void insert_block
(char * name
)
259 /* inserts a block */
263 if
((n
= find_block
(name
)) >= 0)
269 /* get one of them, randomly */
270 n
= ah_rnd
(&block_seed
) % b
->n_sblocks
;
272 push_code
(strdup
(b
->sblocks
[n
]));
275 c_err
("block-not-found", name
, NULL
);
279 static int insert_file
(char * filename
)
281 if
(!push_code_from_file
(filename
))
283 c_err
("script-not-found", filename
, NULL
);
293 static int push_group
(void)
294 /* starts a new group of notes */
298 if
(n_groups
== groups_size
)
300 GROW
(groups
, groups_size
, struct group
);
304 g
= &groups
[n_groups
++];
314 static int next_group_part
(void)
321 c_err
("missing-start-of-group", NULL
, NULL
);
325 g
= &groups
[n_groups
- 1];
327 /* store maximum frame */
328 if
(g
->max
< cur_time
)
331 /* add glissando delay */
335 cur_time
= g
->start
+ g
->gliss
;
341 static int pop_group
(void)
342 /* finishes a group, moving the frame to the end of the longer part */
346 c_err
("missing-start-of-group", NULL
, NULL
);
352 /* if other parts of group were longer than the last one,
353 move pointer there */
354 if
(groups
[n_groups
].max
> cur_time
)
355 cur_time
= groups
[n_groups
].max
;
363 static void add_mark
(char * name
)
364 /* creates a new mark */
366 GROW
(marks
, n_marks
, struct mark
);
368 marks
[n_marks
].name
= strdup
(name
);
369 marks
[n_marks
].time
= cur_time
;
375 static void find_mark
(char * name
, int set
)
376 /* finds a mark by name, optionally moving time cursor there */
380 for
(n
= 0;n
< n_marks
;n
++)
382 if
(strcmp
(marks
[n
].name
, name
) == 0)
386 if
(cur_time
> marks
[n
].time
)
387 c_err
("mark-overpassed", name
, NULL
);
389 cur_time
= marks
[n
].time
;
392 if
(cur_time
!= marks
[n
].time
)
393 c_err
("mark-mismatch", name
, NULL
);
399 c_err
("mark-not-found", name
, NULL
);
405 static void arp_default
(void)
406 /* resets arpeggiator values to the default ones */
415 static void add_arp
(void)
416 /* adds an arpeggiator note */
420 /* if the note is exactly the same, do nothing */
421 if
(arp_delay
== 0.0 && arp_transpose
== 0 &&
422 arp_volume
== 1.0 && arp_track_off
== 0)
425 if
(n_arps
== arps_size
)
427 GROW
(arps
, arps_size
, struct arp
);
433 a
->delay
= arp_delay
;
434 a
->transpose
= arp_transpose
;
435 a
->volume
= arp_volume
;
436 a
->track_off
= arp_track_off
;
443 static void set_alteration
(char * altstr
)
444 /* sets the alterations from altstr */
446 int n
, steps
[] = { 2, 0, 2, 0, 1, 2, 0, 2, 0, 2, 0, 1 };
448 /* reset alterations */
449 for
(n
= 0;n
< 12;n
++) alterations
[n
] = 0;
451 /* changed according the altstr spec */
452 for
(n
= 0;*altstr
!= '\0' && n
< 12;altstr
++)
456 case
'&': alterations
[n
] = -1; break
;
457 case
'#': alterations
[n
] = 1; break
;
460 /* move to next natural note */
468 static void add_note_event
(int note
)
469 /* adds a note event */
475 /* sum the tonality alteration */
476 /* note += tonalities[tonality][((unsigned) note) % 12];*/
478 /* sum the alteration */
479 note
+= alterations
[((unsigned) note
) %
12];
481 /* calculate the note */
482 np
= note
+ transpose
+ (octave
* 12);
484 /* is note out of range? */
485 if
(np
< 0 || np
> 127)
487 c_err
("note-out-of-range", NULL
, NULL
);
491 e.note.trk_id
= track
;
493 e.note.len
= length
* staccato
;
496 add_song_ev
(SONG_EV_NOTE
, cur_time
, &e
);
498 /* add arpeggiator repetitions */
499 for
(n
= 0;n
< n_arps
;n
++)
501 e.note.trk_id
= track
+ arps
[n
].track_off
;
502 e.note.note
= np
+ arps
[n
].transpose
;
503 e.note.vol
= volume
* arps
[n
].volume
;
505 add_song_ev
(SONG_EV_NOTE
, cur_time
+ arps
[n
].delay
, &e
);
510 static void add_back_event
(void)
514 e.back.trk_id
= track
;
516 add_song_ev
(SONG_EV_BACK
, cur_time
, &e
);
520 static void add_tempo_event
(int trk_id
, double tempo
)
524 e.tempo.trk_id
= trk_id
;
525 e.tempo.tempo
= tempo
;
526 add_song_ev
(SONG_EV_TEMPO
, cur_time
, &e
);
530 static void add_meter_event
(int trk_id
, int num
, int den
)
534 e.meter.trk_id
= trk_id
;
537 add_song_ev
(SONG_EV_METER
, cur_time
, &e
);
540 static void add_measure_event
(void)
544 e.measure.trk_id
= -1;
545 e.measure.line
= yyline
;
547 add_song_ev
(SONG_EV_MEASURE
, cur_time
, &e
);
551 static void add_ss_sustain_event
(double sustain
)
555 e.ss_sustain.trk_id
= track
;
556 e.ss_sustain.sustain
= sustain
;
558 add_song_ev
(SONG_EV_SS_SUSTAIN
, cur_time
, &e
);
562 static void add_ss_vibrato_event
(double depth
, double freq
)
566 e.ss_vibrato.trk_id
= track
;
567 e.ss_vibrato.vib_depth
= depth
;
568 e.ss_vibrato.vib_freq
= freq
;
570 add_song_ev
(SONG_EV_SS_VIBRATO
, cur_time
, &e
);
574 static void add_ss_portamento_event
(double portamento
)
578 e.ss_portamento.trk_id
= track
;
579 e.ss_portamento.portamento
= portamento
;
581 add_song_ev
(SONG_EV_SS_PORTAMENTO
, cur_time
, &e
);
585 static void add_ss_channel_event
(int channel
, float vol
)
589 e.ss_channel.trk_id
= track
;
590 e.ss_channel.channel
= channel
;
591 e.ss_channel.vol
= vol
;
593 add_song_ev
(SONG_EV_SS_CHANNEL
, cur_time
, &e
);
597 static void add_ss_wav_event
(char * wav_file
, int base
, int min
, int max
,
598 double loop_start
, double loop_end
, int first_channel
, int skip_channels
)
602 e.ss_wav.trk_id
= track
;
603 e.ss_wav.file
= wav_file
;
604 e.ss_wav.base
= base
;
607 e.ss_wav.loop_start
= loop_start
;
608 e.ss_wav.loop_end
= loop_end
;
609 e.ss_wav.first_channel
= first_channel
;
610 e.ss_wav.skip_channels
= skip_channels
;
612 add_song_ev
(SONG_EV_SS_WAV
, cur_time
, &e
);
616 static void add_ss_pat_event
(char * pat_file
)
620 e.ss_pat.trk_id
= track
;
621 e.ss_pat.file
= pat_file
;
623 add_song_ev
(SONG_EV_SS_PAT
, cur_time
, &e
);
627 static void add_ss_eff_event
(int type
, int channel
, double size
, float gain
,
628 double depth
, double freq
, double phase
, float initial
, float final
)
632 e.ss_eff.trk_id
= track
;
633 e.ss_eff.channel
= channel
;
634 e.ss_eff.size
= size
;
635 e.ss_eff.gain
= gain
;
636 e.ss_eff.depth
= depth
;
637 e.ss_eff.freq
= freq
;
638 e.ss_eff.phase
= phase
;
639 e.ss_eff.initial
= initial
;
640 e.ss_eff.final
= final
;
642 add_song_ev
(type
, cur_time
, &e
);
646 static void add_ss_pitch_stretch
(int note
, double len
, float vol
)
650 e.ss_pitch_stretch.trk_id
= track
;
651 e.ss_pitch_stretch.note
= note
;
652 e.ss_pitch_stretch.len
= len
;
653 e.ss_pitch_stretch.vol
= vol
;
655 add_song_ev
(SONG_EV_SS_PITCH_STRETCH
, cur_time
, &e
);
659 static void add_ss_print_wave_tempo
(int note
, double len
)
663 e.ss_print_wave_tempo.trk_id
= track
;
664 e.ss_print_wave_tempo.note
= note
;
665 e.ss_print_wave_tempo.len
= len
;
667 add_song_ev
(SONG_EV_SS_PRINT_WAVE_TEMPO
, cur_time
, &e
);
671 static void add_midi_channel_event
(int channel
)
675 e.midi_channel.trk_id
= track
;
676 e.midi_channel.channel
= channel
- 1;
678 add_song_ev
(SONG_EV_MIDI_CHANNEL
, cur_time
, &e
);
682 static void add_midi_program_event
(int program
)
686 e.midi_program.trk_id
= track
;
687 e.midi_program.program
= program
;
689 add_song_ev
(SONG_EV_MIDI_PROGRAM
, cur_time
, &e
);
693 static void add_song_info_event
(char * author
, char * name
)
697 e.song_info.trk_id
= track
;
698 e.song_info.author
= author
;
699 e.song_info.name
= name
;
701 add_song_ev
(SONG_EV_SONG_INFO
, cur_time
, &e
);
705 static void init_track
(void)
706 /* sets the default values for a new track */
718 /* groups should not cross track boundaries */
721 /* reset arpeggiator */
725 /* reset alterations */
726 for
(n
= 0;n
< 12;n
++)
739 %token
<i
> P_INTEGER S_INTEGER
740 %token
<d
> P_REAL S_REAL
741 %token
<i
> NOTE_P NOTE_T3 NOTE_T5
742 %token
<p
> NEW_MARK GOTO_MARK ASSERT_MARK
744 %token
<p
> BLOCK BLK_ASSIGN BLK_INSERT FILE_INSERT
749 %token
<i
> XC_ABSNOTE
752 %token SS_SEP SS_WAV SS_LOOP_WAV SS_PAT
753 %token SS_SUSTAIN SS_VIBRATO SS_PORTAMENTO SS_CHANNEL SS_VOL
755 %token SS_EFF_DELAY SS_EFF_ECHO SS_EFF_COMB SS_EFF_ALLPASS SS_EFF_FLANGER
756 %token SS_EFF_WOBBLE SS_EFF_SQWOBBLE SS_EFF_HFWOBBLE
757 %token SS_EFF_FADER SS_EFF_REVERB SS_EFF_FOLDBACK SS_EFF_OFF
759 %token SS_PITCH_STRETCH SS_TIME_STRETCH SS_PRINT_WAVE_TEMPO
763 %token MIDI_CHANNEL MIDI_PROGRAM MIDI_GENERIC
765 %type
<i
> integer note note_pitch rest back
766 %type
<d
> real p_number number note_length
768 %type
<d
> arp_list arp_note
797 /* absolute octave */
801 /* relative octave */
805 /* absolute volume */
809 /* absolute volume */
813 /* relative volume */
830 /* group delimiter */
843 /* measure mark event */
868 add_tempo_event
(-1, $2);
870 |
'M' P_INTEGER
'/' P_INTEGER
{
871 /* meter (time signature) setting */
872 add_meter_event
(-1, $2, $4);
875 /* alteration string */
879 | BLOCK
'*' P_INTEGER
{
883 /* store the block as <TMP> */
884 set_block
("<TMP>", $1);
886 for
(n
= 0;n
< $3;n
++)
887 insert_block
("<TMP>");
909 P_INTEGER
{ $$
= $1; }
910 | S_INTEGER
{ $$
= $1; }
915 | S_REAL
{ $$
= $1; }
919 P_INTEGER
{ $$
= (double) $1; }
920 | P_REAL
{ $$
= $1; }
924 integer
{ $$
= (double) $1; }
929 note_pitch
{ $$
= $1; }
930 | note note_length
{ $$
= $1; length
=$2; }
931 | note
'~' number
{ $$
= $1; DEBUGF
("imm volume: %lf\n", $3); }
936 | note_pitch
'&' { $$
= $1 - 1; }
937 | note_pitch
'#' { $$
= $1 + 1; }
938 | note_pitch
'\'' { $$
= $1 + 12; }
939 | note_pitch
',' { $$
= $1 - 12; }
943 P_INTEGER
{ $$
= 1 / (double) $1; }
944 | note_length NOTE_T3
{ $$
= $1 * 2.0 / 3.0; }
945 | note_length NOTE_T5
{ $$
= $1 * 4.0 / 5.0; }
946 | note_length
'*' p_number
{ $$
= $1 * $3; }
947 | note_length
'.' { $$
= $1 * 1.5; }
953 /* rest with length */
961 /* back with length */
968 /* empty arpeggiator */
977 /* first arpeggiator note */
981 | arp_list
',' arp_note
{
982 /* rest of arpeggiator notes */
989 /* arpeggiator delay */
992 | arp_note
'~' number
{
993 /* arpeggiator volume */
994 arp_volume
= (float)$3;
996 | arp_note S_INTEGER
{
997 /* arpeggiator transpose */
1000 | arp_note
'/' P_INTEGER
{
1001 /* arpeggiator track offset */
1004 | arp_note NOTE_T3
{
1008 | arp_note NOTE_T5
{
1015 P_INTEGER
{ $$
= $1; }
1016 | XC_ABSNOTE
{ $$
= $1; }
1020 SS_WAV XC_STR xc_absnote
{
1021 /* load .wav file with just one note */
1022 add_ss_wav_event
($2, $3, $3, $3, -1.0, -1.0, 0, 0);
1024 | SS_WAV XC_STR xc_absnote xc_absnote xc_absnote
{
1025 /* load .wav file */
1026 add_ss_wav_event
($2, $3, $4, $5, -1.0, -1.0, 0, 0);
1028 | SS_WAV XC_STR xc_absnote xc_absnote xc_absnote number number
{
1029 /* load .wav file, with loop boundaries */
1030 add_ss_wav_event
($2, $3, $4, $5, $6, $7, 0, 0);
1032 | SS_WAV XC_STR xc_absnote xc_absnote xc_absnote number number number number
{
1033 /* load .wav file, with loop boundaries,
1034 first channel and skip channels */
1035 add_ss_wav_event
($2, $3, $4, $5, $6, $7, $8, $9);
1038 /* load .pat file */
1039 add_ss_pat_event
($2);
1041 | SS_SUSTAIN XC_MSECS
{
1043 add_ss_sustain_event
($2);
1045 | SS_VIBRATO XC_MSECS number
{
1047 add_ss_vibrato_event
($2, $3);
1049 | SS_PORTAMENTO number
{
1050 /* sets portamento */
1051 add_ss_portamento_event
($2);
1053 | SS_CHANNEL integer number
{
1054 /* sets volume for a channel */
1055 add_ss_channel_event
($2, $3);
1057 | SS_VOL number number
{
1058 /* set vol for 2 channels */
1059 add_ss_channel_event
(0, $2);
1060 add_ss_channel_event
(1, $3);
1062 | SS_VOL number number number
{
1063 /* set vol for 3 channels */
1064 add_ss_channel_event
(0, $2);
1065 add_ss_channel_event
(1, $3);
1066 add_ss_channel_event
(2, $4);
1068 | SS_VOL number number number number
{
1069 /* set vol for 4 channels */
1070 add_ss_channel_event
(0, $2);
1071 add_ss_channel_event
(1, $3);
1072 add_ss_channel_event
(2, $4);
1073 add_ss_channel_event
(3, $5);
1075 | SS_VOL number number number number number number
{
1076 /* set vol for 6 channels */
1077 add_ss_channel_event
(0, $2);
1078 add_ss_channel_event
(1, $3);
1079 add_ss_channel_event
(2, $4);
1080 add_ss_channel_event
(3, $5);
1081 add_ss_channel_event
(4, $6);
1082 add_ss_channel_event
(5, $7);
1084 | SS_EFF_DELAY integer XC_MSECS
{
1086 add_ss_eff_event
(SONG_EV_SS_EFF_DELAY
,
1087 $2, $3, 0, 0, 0, 0, 0, 0);
1090 | SS_EFF_ECHO integer XC_MSECS number
{
1092 add_ss_eff_event
(SONG_EV_SS_EFF_ECHO
,
1093 $2, $3, $4, 0, 0, 0, 0, 0);
1096 | SS_EFF_COMB integer XC_MSECS number
{
1098 add_ss_eff_event
(SONG_EV_SS_EFF_COMB
,
1099 $2, $3, $4, 0, 0, 0, 0, 0);
1102 | SS_EFF_ALLPASS integer XC_MSECS number
{
1103 /* allpass effect */
1104 add_ss_eff_event
(SONG_EV_SS_EFF_ALLPASS
,
1105 $2, $3, $4, 0, 0, 0, 0, 0);
1108 | SS_EFF_FLANGER integer XC_MSECS number XC_MSECS number number
{
1109 /* flanger effect */
1110 add_ss_eff_event
(SONG_EV_SS_EFF_FLANGER
,
1111 $2, $3, $4, $5, $6, $7, 0, 0);
1114 | SS_EFF_WOBBLE integer number number
{
1116 add_ss_eff_event
(SONG_EV_SS_EFF_WOBBLE
,
1117 $2, 0, 0, 0, $3, $4, 0, 0);
1120 | SS_EFF_SQWOBBLE integer number number
{
1121 /* square wobble effect */
1122 add_ss_eff_event
(SONG_EV_SS_EFF_SQWOBBLE
,
1123 $2, 0, 0, 0, $3, $4, 0, 0);
1126 | SS_EFF_HFWOBBLE integer number number
{
1127 /* half wobble effect */
1128 add_ss_eff_event
(SONG_EV_SS_EFF_HFWOBBLE
,
1129 $2, 0, 0, 0, $3, $4, 0, 0);
1132 | SS_EFF_FADER integer XC_MSECS number number
{
1134 add_ss_eff_event
(SONG_EV_SS_EFF_FADER
,
1135 $2, $3, 0, 0, 0, 0, $4, $5);
1138 | SS_EFF_REVERB integer
{
1140 add_ss_eff_event
(SONG_EV_SS_EFF_REVERB
,
1141 $2, 0, 0, 0, 0, 0, 0, 0);
1144 | SS_EFF_FOLDBACK integer number
{
1145 /* foldback distortion effect */
1146 add_ss_eff_event
(SONG_EV_SS_EFF_FOLDBACK
,
1147 $2, 0, $3, 0, 0, 0, 0, 0);
1149 | SS_EFF_OFF integer
{
1151 add_ss_eff_event
(SONG_EV_SS_EFF_OFF
,
1152 $2, 0, 0, 0, 0, 0, 0, 0);
1155 | SS_PITCH_STRETCH xc_absnote number number
{
1156 /* pitch stretch note */
1157 add_ss_pitch_stretch
($2, $3, $4);
1162 | SS_PRINT_WAVE_TEMPO xc_absnote number
{
1163 /* print tempo from wave */
1164 add_ss_print_wave_tempo
($2, $3);
1167 | SONG_INFO XC_STR XC_STR
{
1169 add_song_info_event
($2, $3);
1172 | MIDI_CHANNEL integer
{
1174 add_midi_channel_event
($2);
1177 | MIDI_PROGRAM integer
{
1179 add_midi_program_event
($2);
1185 void yyerror(char * s
)
1187 c_err
(s
, NULL
, NULL
);
1191 static void compile_startup
(void)
1197 /* default settings */
1198 add_tempo_event
(-2, 120.0);
1199 add_meter_event
(-2, 4, 4);
1204 int compile_ahs_string
(char * code
)
1208 push_code
(strdup
(code
));
1210 return
(yyparse() + compiler_error
);
1214 int compile_ahs
(char * file
)
1218 if
(insert_file
(file
))
1221 return
(yyparse() + compiler_error
);