#include "cdefs.h"
cint bnf2slm_globals = 0;
extern cint boolean_True;
extern cint boolean_False;
extern cint object_Undefined;
extern cptr scope_curr;
extern cint scope_global;
extern cptr scope_methods[meth_max];
extern cint boolean_True;
extern cint object_Undefined;
extern cptr identifier_methods[meth_max];
extern cptr idstring_methods[meth_max];
extern cptr integer_methods[meth_max];
extern cptr slist_methods[meth_max];
cint bnf2slm_g1;
cint bnf2slm_g2;
cint bnf2slm_g3;
cint bnf2slm_g4;
cint bnf2slm_g5;
cint bnf2slm_g6;
cint bnf2slm_g7;
cint bnf2slm_g8;
cint bnf2slm_g9;
cint bnf2slm_g10;
cint bnf2slm_g11;
cint bnf2slm_g12;
cint bnf2slm_g13;
cint bnf2slm_g14;
cint bnf2slm_g15;
cint bnf2slm_g16;
cint bnf2slm_g17;
cint bnf2slm_g18;
cint bnf2slm_g19;
cint bnf2slm_g20;
cint bnf2slm_g21;
cint bnf2slm_g22;
cint bnf2slm_g23;
cint bnf2slm_g24;

void import_bnf2slm(){
cint saved_curr;
cint t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33, t34, t35, t36, t37, t38, t39, t40, t41, t42, t43, t44, t45, t46, t47, t48, t49, t50, t51, t52, t53, t54, t55, t56, t57, t58, t59, t60, t61, t62, t63, t64, t65, t66, t67, t68, t69, t70, t71, t72, t73, t74, t75, t76, t77, t78, t79, t80, t81, t82, t83, t84, t85, t86, t87, t88, t89, t90, t91, t92, t93, t94, t95, t96, t97, t98, t99, t100, t101, t102, t103, t104, t105, t106, t107, t108, t109, t110, t111, t112, t113, t114, t115, t116, t117, t118, t119, t120, t121, t122, t123, t124, t125, t126, t127, t128, t129, t130, t131, t132, t133, t134, t135, t136, t137, t138, t139, t140, t141, t142, t143, t144, t145, t146, t147, t148, t149, t150, t151, t152, t153, t154, t155, t156, t157, t158, t159, t160, t161, t162, t163, t164, t165, t166, t167, t168;
if (!bnf2slm_globals){
debug_set_module("bnf2slm");
saved_curr = scope_curr;scope_curr = mem_malloc(scope_methods[0]); scope_curr[0] = scope_methods;
scope_curr = scope_alloc(scope_curr, scope_global);
{
bnf2slm_g1=(t1 = (t3 = mem_malloc(idstring_methods[0]), ((cptr)t3)[0] = idstring_methods, t3), t2 = ((cptr)(((cptr)t1)[0]))[3], ((f0)t2)((cint)t1, (cint)"!opsys"));
bnf2slm_g2=(t4 = (t6 = mem_malloc(idstring_methods[0]), ((cptr)t6)[0] = idstring_methods, t6), t5 = ((cptr)(((cptr)t4)[0]))[3], ((f0)t5)((cint)t4, (cint)"!scanner"));
bnf2slm_g3=(t7 = (t9 = mem_malloc(idstring_methods[0]), ((cptr)t9)[0] = idstring_methods, t9), t8 = ((cptr)(((cptr)t7)[0]))[3], ((f0)t8)((cint)t7, (cint)"!parser"));
bnf2slm_g4=(t10 = (t12 = mem_malloc(idstring_methods[0]), ((cptr)t12)[0] = idstring_methods, t12), t11 = ((cptr)(((cptr)t10)[0]))[3], ((f0)t11)((cint)t10, (cint)"!builder"));
bnf2slm_g5=(t13 = (t15 = mem_malloc(idstring_methods[0]), ((cptr)t15)[0] = idstring_methods, t15), t14 = ((cptr)(((cptr)t13)[0]))[3], ((f0)t14)((cint)t13, (cint)"!custbld"));
bnf2slm_g6=(t16 = (t18 = mem_malloc(idstring_methods[0]), ((cptr)t18)[0] = idstring_methods, t18), t17 = ((cptr)(((cptr)t16)[0]))[3], ((f0)t17)((cint)t16, (cint)"!printscn"));
bnf2slm_g7=(t19 = (t21 = mem_malloc(idstring_methods[0]), ((cptr)t21)[0] = idstring_methods, t21), t20 = ((cptr)(((cptr)t19)[0]))[3], ((f0)t20)((cint)t19, (cint)"!printpar"));
bnf2slm_g8=(t22 = (t24 = mem_malloc(idstring_methods[0]), ((cptr)t24)[0] = idstring_methods, t24), t23 = ((cptr)(((cptr)t22)[0]))[3], ((f0)t23)((cint)t22, (cint)"!printbld"));
bnf2slm_g9=(t25 = (t27 = mem_malloc(identifier_methods[0]), ((cptr)t27)[0] = identifier_methods, t27), t26 = ((cptr)(((cptr)t25)[0]))[3], ((f0)t26)((cint)t25, (cint)"File_name"));
bnf2slm_g10=(t28 = (t30 = mem_malloc(identifier_methods[0]), ((cptr)t30)[0] = identifier_methods, t30), t29 = ((cptr)(((cptr)t28)[0]))[3], ((f0)t29)((cint)t28, (cint)"Extension"));
bnf2slm_g12=(t31 = (t33 = mem_malloc(identifier_methods[0]), ((cptr)t33)[0] = identifier_methods, t33), t32 = ((cptr)(((cptr)t31)[0]))[3], ((f0)t32)((cint)t31, (cint)"split"));
bnf2slm_g13=(t34 = (t36 = mem_malloc(idstring_methods[0]), ((cptr)t36)[0] = idstring_methods, t36), t35 = ((cptr)(((cptr)t34)[0]))[3], ((f0)t35)((cint)t34, (cint)"."));
bnf2slm_g14=(t37 = (t39 = mem_malloc(identifier_methods[0]), ((cptr)t39)[0] = identifier_methods, t39), t38 = ((cptr)(((cptr)t37)[0]))[3], ((f0)t38)((cint)t37, (cint)"locase"));
bnf2slm_g15=(t40 = (t42 = mem_malloc(identifier_methods[0]), ((cptr)t42)[0] = identifier_methods, t42), t41 = ((cptr)(((cptr)t40)[0]))[3], ((f0)t41)((cint)t40, (cint)"Command_line"));
bnf2slm_g16=(t43 = (t45 = mem_malloc(integer_methods[0]), ((cptr)t45)[0] = integer_methods, t45), t44 = ((cptr)(((cptr)t43)[0]))[3], ((f0)t44)((cint)t43, (cint)"2"));
bnf2slm_g17=(t46 = (t48 = mem_malloc(idstring_methods[0]), ((cptr)t48)[0] = idstring_methods, t48), t47 = ((cptr)(((cptr)t46)[0]))[3], ((f0)t47)((cint)t46, (cint)"bnf"));
bnf2slm_g18=(t49 = (t51 = mem_malloc(idstring_methods[0]), ((cptr)t51)[0] = idstring_methods, t51), t50 = ((cptr)(((cptr)t49)[0]))[3], ((f0)t50)((cint)t49, (cint)"Source file should be called: "));
bnf2slm_g19=(t52 = (t54 = mem_malloc(idstring_methods[0]), ((cptr)t54)[0] = idstring_methods, t54), t53 = ((cptr)(((cptr)t52)[0]))[3], ((f0)t53)((cint)t52, (cint)".slm"));
bnf2slm_g20=(t55 = (t57 = mem_malloc(idstring_methods[0]), ((cptr)t57)[0] = idstring_methods, t57), t56 = ((cptr)(((cptr)t55)[0]))[3], ((f0)t56)((cint)t55, (cint)".bnf"));
bnf2slm_g21=(t58 = (t60 = mem_malloc(idstring_methods[0]), ((cptr)t60)[0] = idstring_methods, t60), t59 = ((cptr)(((cptr)t58)[0]))[3], ((f0)t59)((cint)t58, (cint)"r"));
bnf2slm_g22=(t61 = (t63 = mem_malloc(identifier_methods[0]), ((cptr)t63)[0] = identifier_methods, t63), t62 = ((cptr)(((cptr)t61)[0]))[3], ((f0)t62)((cint)t61, (cint)"Print_scanner"));
bnf2slm_g23=(t64 = (t66 = mem_malloc(identifier_methods[0]), ((cptr)t66)[0] = identifier_methods, t66), t65 = ((cptr)(((cptr)t64)[0]))[3], ((f0)t65)((cint)t64, (cint)"Print_parser"));
bnf2slm_g24=(t67 = (t69 = mem_malloc(identifier_methods[0]), ((cptr)t69)[0] = identifier_methods, t69), t68 = ((cptr)(((cptr)t67)[0]))[3], ((f0)t68)((cint)t67, (cint)"Print_builder"));
};
{
{
(t70 = (t72 = bnf2slm_g1, ((cptr)t72)[1] += 1, t72), t71 = ((cptr)(((cptr)t70)[0]))[49], ((f0)t71)((cint)t70));
(t73 = (t75 = bnf2slm_g2, ((cptr)t75)[1] += 1, t75), t74 = ((cptr)(((cptr)t73)[0]))[49], ((f0)t74)((cint)t73));
(t76 = (t78 = bnf2slm_g3, ((cptr)t78)[1] += 1, t78), t77 = ((cptr)(((cptr)t76)[0]))[49], ((f0)t77)((cint)t76));
(t79 = (t81 = bnf2slm_g4, ((cptr)t81)[1] += 1, t81), t80 = ((cptr)(((cptr)t79)[0]))[49], ((f0)t80)((cint)t79));
(t82 = (t84 = bnf2slm_g5, ((cptr)t84)[1] += 1, t84), t83 = ((cptr)(((cptr)t82)[0]))[49], ((f0)t83)((cint)t82));
(t85 = (t87 = bnf2slm_g6, ((cptr)t87)[1] += 1, t87), t86 = ((cptr)(((cptr)t85)[0]))[49], ((f0)t86)((cint)t85));
(t88 = (t90 = bnf2slm_g7, ((cptr)t90)[1] += 1, t90), t89 = ((cptr)(((cptr)t88)[0]))[49], ((f0)t89)((cint)t88));
(t91 = (t93 = bnf2slm_g8, ((cptr)t93)[1] += 1, t93), t92 = ((cptr)(((cptr)t91)[0]))[49], ((f0)t92)((cint)t91));
};
debug_set_line_num_and_col((cint)3, (cint)1);
{
(t94 = (t96 = (t98 = bnf2slm_g9, ((cptr)t98)[1] += 1, t98), t97 = ((cptr)(((cptr)t96)[0]))[69], ((f0)t97)((cint)t96, (cint)(t99 = bnf2slm_g10, ((cptr)t99)[1] += 1, t99))), t95 = ((cptr)(((cptr)t94)[0]))[13], ((f0)t95)((cint)t94, (cint)(((bnf2slm_g11=(t100 = (t102 = (t104 = (t106 = bnf2slm_g12, ((cptr)t106)[1] += 1, t106), t105 = ((cptr)(((cptr)t104)[0]))[77], ((f0)t105)((cint)t104, (cint)(t107 = bnf2slm_g13, ((cptr)t107)[1] += 1, t107))), t103 = ((cptr)(((cptr)t102)[0]))[77], ((f0)t103)((cint)t102, (cint)(t108 = (t110 = (t112 = bnf2slm_g14, ((cptr)t112)[1] += 1, t112), t111 = ((cptr)(((cptr)t110)[0]))[77], ((f0)t111)((cint)t110, (cint)(t113 = (t115 = (t117 = bnf2slm_g15, ((cptr)t117)[1] += 1, t117), t116 = ((cptr)(((cptr)t115)[0]))[77], ((f0)t116)((cint)t115, (cint)(t118 = bnf2slm_g16, ((cptr)t118)[1] += 1, t118))), t114 = ((cptr)(((cptr)t113)[0]))[38], ((f0)t114)((cint)t113)))), t109 = ((cptr)(((cptr)t108)[0]))[38], ((f0)t109)((cint)t108)))), t101 = ((cptr)(((cptr)t100)[0]))[38], ((f0)t101)((cint)t100)))!=object_Undefined)?bnf2slm_g11:(t119 = (t121 = (t123 = (t125 = (t127 = mem_malloc(slist_methods[0]), ((cptr)t127)[0] = slist_methods, t127), t126 = ((cptr)(((cptr)t125)[0]))[3], ((f0)t126)((cint)t125, (cint)2)), t124 = ((cptr)(((cptr)t123)[0]))[7], ((f0)t124)((cint)t123, (cint)(t128 = (t130 = (t132 = bnf2slm_g14, ((cptr)t132)[1] += 1, t132), t131 = ((cptr)(((cptr)t130)[0]))[77], ((f0)t131)((cint)t130, (cint)(t133 = (t135 = (t137 = bnf2slm_g15, ((cptr)t137)[1] += 1, t137), t136 = ((cptr)(((cptr)t135)[0]))[77], ((f0)t136)((cint)t135, (cint)(t138 = bnf2slm_g16, ((cptr)t138)[1] += 1, t138))), t134 = ((cptr)(((cptr)t133)[0]))[38], ((f0)t134)((cint)t133)))), t129 = ((cptr)(((cptr)t128)[0]))[38], ((f0)t129)((cint)t128)))), t122 = ((cptr)(((cptr)t121)[0]))[7], ((f0)t122)((cint)t121, (cint)(t139 = bnf2slm_g17, ((cptr)t139)[1] += 1, t139))), t120 = ((cptr)(((cptr)t119)[0]))[107], ((f0)t120)((cint)t119)))));
debug_set_line_num_and_col((cint)6, (cint)1);
};
debug_set_line_num_and_col((cint)6, (cint)1);
if (((t140 = (t142 = (t144 = (t146 = bnf2slm_g10, ((cptr)t146)[1] += 1, t146), t145 = ((cptr)(((cptr)t144)[0]))[38], ((f0)t145)((cint)t144)), t143 = ((cptr)(((cptr)t142)[0]))[36], ((f0)t143)((cint)t142, (cint)(t147 = bnf2slm_g17, ((cptr)t147)[1] += 1, t147))), t141 = ((cptr)(((cptr)t140)[0]))[95], ((f0)t141)((cint)t140))==boolean_True)){
{
debug_set_line_num_and_col((cint)7, (cint)6);
debug_set_line_num_and_col((cint)7, (cint)7);
stdout_Put((cint)(t148 = bnf2slm_g18, ((cptr)t148)[1] += 1, t148));
debug_set_line_num_and_col((cint)7, (cint)39);
stdout_Put((cint)(t149 = (t151 = bnf2slm_g9, ((cptr)t151)[1] += 1, t151), t150 = ((cptr)(((cptr)t149)[0]))[38], ((f0)t150)((cint)t149)));
debug_set_line_num_and_col((cint)7, (cint)48);
stdout_Put((cint)(t152 = bnf2slm_g19, ((cptr)t152)[1] += 1, t152));
debug_set_line_num_and_col((cint)8, (cint)1);
stdout_Put_eol();
debug_set_line_num_and_col((cint)8, (cint)1);
};
debug_set_line_num_and_col((cint)8, (cint)1);
}
else
{
clib_Parse((cint)(t153 = (t155 = (t157 = bnf2slm_g9, ((cptr)t157)[1] += 1, t157), t156 = ((cptr)(((cptr)t155)[0]))[38], ((f0)t156)((cint)t155)), t154 = ((cptr)(((cptr)t153)[0]))[97], ((f0)t154)((cint)t153, (cint)(t158 = bnf2slm_g20, ((cptr)t158)[1] += 1, t158))), (cint)(t159 = bnf2slm_g21, ((cptr)t159)[1] += 1, t159));
debug_set_line_num_and_col((cint)10, (cint)1);
{
(t160 = (t162 = bnf2slm_g22, ((cptr)t162)[1] += 1, t162), t161 = ((cptr)(((cptr)t160)[0]))[16], ((f0)t161)((cint)t160));
debug_set_line_num_and_col((cint)11, (cint)3);
};
debug_set_line_num_and_col((cint)11, (cint)3);
{
(t163 = (t165 = bnf2slm_g23, ((cptr)t165)[1] += 1, t165), t164 = ((cptr)(((cptr)t163)[0]))[16], ((f0)t164)((cint)t163));
debug_set_line_num_and_col((cint)12, (cint)3);
};
debug_set_line_num_and_col((cint)12, (cint)3);
{
(t166 = (t168 = bnf2slm_g24, ((cptr)t168)[1] += 1, t168), t167 = ((cptr)(((cptr)t166)[0]))[16], ((f0)t167)((cint)t166));
debug_set_line_num_and_col((cint)13, (cint)1);
};
debug_set_line_num_and_col((cint)13, (cint)1);
}
;
debug_set_line_num_and_col((cint)14, (cint)1);
};
bnf2slm_globals = scope_curr;
scope_curr = saved_curr;
};
scope_import_exports(scope_curr, bnf2slm_globals);
}

extern void import_scanner();
extern void import_parser();
extern void import_builder();
extern void import_cbuilder();
extern void import_custbld();
extern void import_walker();
extern void import_custwalk();
extern void import_bnfdef();
extern void import_printbld();
extern void import_printscn();
extern void import_printpar();
extern void import_bnftoscn();
extern void import_strtoscn();
extern void import_compstar();
extern void import_bnftopar();
extern void import_opsys();
extern cint clib_ArgC;
extern cptr clib_ArgV;
extern cptr identifier_methods[meth_max];
extern cptr procedure_methods[meth_max];

void main(cint argc, cptr argv){
  cptr f, m;
  cptr Iscanner, Pscanner;
  cptr Iparser, Pparser;
  cptr Ibuilder, Pbuilder;
  cptr Icbuilder, Pcbuilder;
  cptr Icustbld, Pcustbld;
  cptr Iwalker, Pwalker;
  cptr Icustwalk, Pcustwalk;
  cptr Ibnfdef, Pbnfdef;
  cptr Iprintbld, Pprintbld;
  cptr Iprintscn, Pprintscn;
  cptr Iprintpar, Pprintpar;
  cptr Ibnftoscn, Pbnftoscn;
  cptr Istrtoscn, Pstrtoscn;
  cptr Icompstar, Pcompstar;
  cptr Ibnftopar, Pbnftopar;
  cptr Ibnf2slm, Pbnf2slm;
  cptr Iopsys, Popsys;
  clib_ArgC = argc; clib_ArgV = argv;
  interp_init();
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Iscanner = identifier_alloc((cint)m, (cint)"!scanner");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pscanner = procedure_alloc((cint)m, (cint)import_scanner, (cint)Iscanner);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Iparser = identifier_alloc((cint)m, (cint)"!parser");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pparser = procedure_alloc((cint)m, (cint)import_parser, (cint)Iparser);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Ibuilder = identifier_alloc((cint)m, (cint)"!builder");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pbuilder = procedure_alloc((cint)m, (cint)import_builder, (cint)Ibuilder);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Icbuilder = identifier_alloc((cint)m, (cint)"!cbuilder");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pcbuilder = procedure_alloc((cint)m, (cint)import_cbuilder, (cint)Icbuilder);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Icustbld = identifier_alloc((cint)m, (cint)"!custbld");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pcustbld = procedure_alloc((cint)m, (cint)import_custbld, (cint)Icustbld);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Iwalker = identifier_alloc((cint)m, (cint)"!walker");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pwalker = procedure_alloc((cint)m, (cint)import_walker, (cint)Iwalker);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Icustwalk = identifier_alloc((cint)m, (cint)"!custwalk");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pcustwalk = procedure_alloc((cint)m, (cint)import_custwalk, (cint)Icustwalk);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Ibnfdef = identifier_alloc((cint)m, (cint)"!bnfdef");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pbnfdef = procedure_alloc((cint)m, (cint)import_bnfdef, (cint)Ibnfdef);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Iprintbld = identifier_alloc((cint)m, (cint)"!printbld");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pprintbld = procedure_alloc((cint)m, (cint)import_printbld, (cint)Iprintbld);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Iprintscn = identifier_alloc((cint)m, (cint)"!printscn");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pprintscn = procedure_alloc((cint)m, (cint)import_printscn, (cint)Iprintscn);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Iprintpar = identifier_alloc((cint)m, (cint)"!printpar");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pprintpar = procedure_alloc((cint)m, (cint)import_printpar, (cint)Iprintpar);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Ibnftoscn = identifier_alloc((cint)m, (cint)"!bnftoscn");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pbnftoscn = procedure_alloc((cint)m, (cint)import_bnftoscn, (cint)Ibnftoscn);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Istrtoscn = identifier_alloc((cint)m, (cint)"!strtoscn");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pstrtoscn = procedure_alloc((cint)m, (cint)import_strtoscn, (cint)Istrtoscn);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Icompstar = identifier_alloc((cint)m, (cint)"!compstar");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pcompstar = procedure_alloc((cint)m, (cint)import_compstar, (cint)Icompstar);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Ibnftopar = identifier_alloc((cint)m, (cint)"!bnftopar");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pbnftopar = procedure_alloc((cint)m, (cint)import_bnftopar, (cint)Ibnftopar);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Ibnf2slm = identifier_alloc((cint)m, (cint)"!bnf2slm");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Pbnf2slm = procedure_alloc((cint)m, (cint)import_bnf2slm, (cint)Ibnf2slm);
  m = mem_malloc(identifier_methods[0]); m[0] = identifier_methods;
  Iopsys = identifier_alloc((cint)m, (cint)"!opsys");
  m = mem_malloc(procedure_methods[0]); m[0] = procedure_methods;
  Popsys = procedure_alloc((cint)m, (cint)import_opsys, (cint)Iopsys);
  import_bnf2slm();
  interp_fini();
  exit(0);
};
