+output_msg (const struct msg *m_, void *lexer_)
+{
+ struct lexer *lexer = lexer_;
+ struct msg m = {
+ .category = m_->category,
+ .severity = m_->severity,
+ .stack = m_->stack,
+ .n_stack = m_->n_stack,
+ .location = (m_->location ? m_->location
+ : lexer ? lex_get_lines (lexer, 0, 0)
+ : NULL),
+ .command_name = output_get_uppercase_command_name (),
+ .text = m_->text,
+ };
+
+ output_item_submit (message_item_create (&m));
+
+ free (m.command_name);
+ if (m.location != m_->location)
+ msg_location_destroy (m.location);
+}
+
+static void
+add_syntax_reader (struct lexer *lexer, const char *file_name,
+ const char *encoding, enum segmenter_mode syntax_mode)