init: remove unused parts of parser.cpp

Now that ueventd is using init's parser, we no longer need anything
other than the tokenizer from parser.cpp.

Test: Boot bullhead
Change-Id: I1f70f2c4479af576174bd74dd919d81817500216
diff --git a/init/init_parser.cpp b/init/init_parser.cpp
index c8ef8d9..620367a 100644
--- a/init/init_parser.cpp
+++ b/init/init_parser.cpp
@@ -48,7 +48,6 @@
     data_copy.push_back('\0');
 
     parse_state state;
-    state.filename = filename.c_str();
     state.line = 0;
     state.ptr = &data_copy[0];
     state.nexttoken = 0;
@@ -76,7 +75,7 @@
 
                     std::string ret_err;
                     if (!callback(std::move(args), &ret_err)) {
-                        parse_error(&state, "%s\n", ret_err.c_str());
+                        LOG(ERROR) << filename << ": " << state.line << ": " << ret_err;
                     }
                     section_parser = nullptr;
                     break;
@@ -88,15 +87,14 @@
                 }
                 section_parser = section_parsers_[args[0]].get();
                 std::string ret_err;
-                if (!section_parser->ParseSection(std::move(args), state.filename, state.line,
-                                                  &ret_err)) {
-                    parse_error(&state, "%s\n", ret_err.c_str());
+                if (!section_parser->ParseSection(std::move(args), filename, state.line, &ret_err)) {
+                    LOG(ERROR) << filename << ": " << state.line << ": " << ret_err;
                     section_parser = nullptr;
                 }
             } else if (section_parser) {
                 std::string ret_err;
                 if (!section_parser->ParseLineSection(std::move(args), state.line, &ret_err)) {
-                    parse_error(&state, "%s\n", ret_err.c_str());
+                    LOG(ERROR) << filename << ": " << state.line << ": " << ret_err;
                 }
             }
             args.clear();