aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/parser.c b/src/parser.c
index ed99a7a..94ec0d9 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1,4 +1,4 @@
-/* grecs - Gray's Extensible Configuration System
+/* argot - Gray's Extensible Configuration System
Copyright (C) 2007-2016 Sergey Poznyakoff
Grecs is free software; you can redistribute it and/or modify it
@@ -20,62 +20,62 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "grecs.h"
+#include "argot.h"
-int grecs_error_count = 0;
-int grecs_default_port = 0;
+int argot_error_count = 0;
+int argot_default_port = 0;
-int grecs_trace_flags = 0;
-int grecs_parser_options = 0;
+int argot_trace_flags = 0;
+int argot_parser_options = 0;
-#ifndef GRECS_DEFAULT_PARSER
-# define GRECS_DEFAULT_PARSER grecs_grecs_parser
+#ifndef ARGOT_DEFAULT_PARSER
+# define ARGOT_DEFAULT_PARSER argot_argot_parser
#endif
-struct grecs_node *(*grecs_parser_fun)(const char *name, int trace) =
- GRECS_DEFAULT_PARSER;
+struct argot_node *(*argot_parser_fun)(const char *name, int trace) =
+ ARGOT_DEFAULT_PARSER;
void
-grecs_gram_trace(int n)
+argot_gram_trace(int n)
{
if (n)
- grecs_trace_flags |= GRECS_TRACE_GRAM;
+ argot_trace_flags |= ARGOT_TRACE_GRAM;
else
- grecs_trace_flags &= ~GRECS_TRACE_GRAM;
+ argot_trace_flags &= ~ARGOT_TRACE_GRAM;
}
void
-grecs_lex_trace(int n)
+argot_lex_trace(int n)
{
if (n)
- grecs_trace_flags |= GRECS_TRACE_LEX;
+ argot_trace_flags |= ARGOT_TRACE_LEX;
else
- grecs_trace_flags &= ~GRECS_TRACE_LEX;
+ argot_trace_flags &= ~ARGOT_TRACE_LEX;
}
-struct grecs_node *
-grecs_parse(const char *name)
+struct argot_node *
+argot_parse(const char *name)
{
- if (!grecs_trace_flags) {
- char *p = getenv("GRECS_DEBUG");
+ if (!argot_trace_flags) {
+ char *p = getenv("ARGOT_DEBUG");
if (p) {
while (*p) {
switch (*p++) {
case 'g':
case 'G':
- grecs_trace_flags |= GRECS_TRACE_GRAM;
+ argot_trace_flags |= ARGOT_TRACE_GRAM;
break;
case 'l':
case 'L':
- grecs_trace_flags |= GRECS_TRACE_LEX;
+ argot_trace_flags |= ARGOT_TRACE_LEX;
break;
}
}
}
}
- grecs_error_count = 0;
- grecs_current_locus_point.file = grecs_install_text(name);
- grecs_current_locus_point.line = 1;
- grecs_current_locus_point.col = 0;
- return grecs_parser_fun(name, grecs_trace_flags);
+ argot_error_count = 0;
+ argot_current_locus_point.file = argot_install_text(name);
+ argot_current_locus_point.line = 1;
+ argot_current_locus_point.col = 0;
+ return argot_parser_fun(name, argot_trace_flags);
}

Return to:

Send suggestions and report system problems to the System administrator.