Finish configfile parsing with lexer, implement -l to use the lexer.

Every user is encouraged to use -l to switch to the new lexer and
see if there are any problems.
This commit is contained in:
Michael Stapelberg
2009-09-19 19:05:15 +02:00
parent 207ad0a7df
commit ca472559b9
5 changed files with 60 additions and 12 deletions

View File

@ -165,7 +165,7 @@ int main(int argc, char *argv[], char *env[]) {
start_argv = argv;
while ((opt = getopt_long(argc, argv, "c:vahp", long_options, &option_index)) != -1) {
while ((opt = getopt_long(argc, argv, "c:vahl", long_options, &option_index)) != -1) {
switch (opt) {
case 'a':
LOG("Autostart disabled using -a\n");
@ -177,12 +177,9 @@ int main(int argc, char *argv[], char *env[]) {
case 'v':
printf("i3 version " I3_VERSION " © 2009 Michael Stapelberg and contributors\n");
exit(EXIT_SUCCESS);
case 'p':
{
printf("parsing\n");
parse_file(override_configpath);
exit(0);
}
case 'l':
config_use_lexer = true;
break;
default:
fprintf(stderr, "Usage: %s [-c configfile] [-a] [-v]\n", argv[0]);
fprintf(stderr, "\n");