/* Lexer variables. */
unsigned int gram_max_allowed_errors = 20;
-static bool pass_comments = false;
/* Prepare lexical analysis. */
to pass comments, generate a COMMENT token, otherwise
discard it. */
ps->signal_eilseq = false;
- if (pass_comments)
+ if (ps->catr->pass_comments)
{
bufpos = 0;
for (;;)
return JUNK;
}
}
-
-
-/* po_gram_lex() can return comments as COMMENT. Switch this on or off. */
-void
-po_lex_pass_comments (bool flag)
-{
- pass_comments = flag;
-}
union PO_GRAM_STYPE;
extern int po_gram_lex (union PO_GRAM_STYPE *lval, struct po_parser_state *ps);
-/* po_gram_lex() can return comments as COMMENT. Switch this on or off. */
-extern void po_lex_pass_comments (bool flag);
-
extern void po_gram_error (struct po_parser_state *ps, const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern void po_gram_error_at_line (const lex_pos_ty *pos, const char *fmt, ...)
catr = (abstract_catalog_reader_ty *) xmalloc (method_table->size);
catr->methods = method_table;
+ catr->pass_comments = false;
catr->pass_obsolete_entries = false;
catr->po_lex_isolate_start = NULL;
catr->po_lex_isolate_end = NULL;
#define ABSTRACT_CATALOG_READER_TY \
abstract_catalog_reader_class_ty *methods; \
\
+ /* True if comments shall be handled, false if they shall be \
+ ignored. */ \
+ bool pass_comments; \
+ \
/* True if obsolete entries shall be considered as valid. */ \
bool pass_obsolete_entries; \
\
{
/* We need to parse comments, because even if dcatr->handle_comments
is false, we need to know which messages are fuzzy. */
- po_lex_pass_comments (true);
+ catr->pass_comments = true;
}