summaryrefslogtreecommitdiff
path: root/web/yacco2/o2linker/o2linker_externs.cpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /web/yacco2/o2linker/o2linker_externs.cpp
Initial commit
Diffstat (limited to 'web/yacco2/o2linker/o2linker_externs.cpp')
-rw-r--r--web/yacco2/o2linker/o2linker_externs.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/web/yacco2/o2linker/o2linker_externs.cpp b/web/yacco2/o2linker/o2linker_externs.cpp
new file mode 100644
index 0000000000..f9767979ba
--- /dev/null
+++ b/web/yacco2/o2linker/o2linker_externs.cpp
@@ -0,0 +1,54 @@
+/*7:*/
+//line 83 "./o2linker_externs.w"
+
+/*6:*/
+//line 80 "./o2linker_externs.w"
+
+#include "o2linker_externs.h"
+/*:6*/
+//line 84 "./o2linker_externs.w"
+
+/*8:*/
+//line 89 "./o2linker_externs.w"
+
+
+yacco2::AST*CWEB_MARKER(0);
+
+/*:8*//*10:*/
+//line 112 "./o2linker_externs.w"
+
+extern
+void
+LINKER_PARSE_CMD_LINE
+(const char*Cmd_file,std::string&Ctrl_file,yacco2::TOKEN_GAGGLE&Errors)
+{
+using namespace NS_yacco2_err_symbols;
+using namespace yacco2;
+tok_can<std::ifstream> Cmd1_tokens(Cmd_file);
+if(Cmd1_tokens.file_ok()==NO){
+yacco2::Delete_tokens(Cmd1_tokens.container());
+CAbs_lr1_sym*sym= new Err_bad_filename(Cmd_file);
+sym->set_external_file_id(1);
+sym->set_line_no(1);
+sym->set_pos_in_line(1);
+Errors.push_back(*sym);
+return;
+}
+
+using namespace NS_o2_linker_opts;
+TOKEN_GAGGLE linker_options_tokens;
+Co2_linker_opts opts_fsm;
+Parser options(opts_fsm,&Cmd1_tokens,&linker_options_tokens,0,&Errors,0,0);
+options.parse();
+yacco2::Delete_tokens(Cmd1_tokens.container());
+if(Errors.empty()!=YES)return;
+Ctrl_file+= opts_fsm.file_to_compile_;
+return;
+}
+
+/*:10*/
+//line 85 "./o2linker_externs.w"
+
+
+
+/*:7*/