39 lines
760 B
C
39 lines
760 B
C
/*
|
|
* Copyright (c) 2026, Mirocom Laboratories
|
|
* Provided under the BSD-3 clause
|
|
*
|
|
* Abstract:
|
|
* This is the main file implementing early and core logic.
|
|
* Author:
|
|
* Ian M. Moffett <ian@mirocom.org>
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include "common/knobs.h"
|
|
#include "common/state.h"
|
|
#include "frontend/parser.h"
|
|
|
|
int
|
|
main(int argc, char **argv)
|
|
{
|
|
struct quip_state state;
|
|
|
|
if (access(QUIP_FILEPATH, F_OK) != 0) {
|
|
printf("fatal: No %s file found\n", QUIP_FILEPATH);
|
|
return -1;
|
|
}
|
|
|
|
if (quip_state_init(QUIP_FILEPATH, &state) < 0) {
|
|
perror("quip_state_init");
|
|
return -1;
|
|
}
|
|
|
|
if (parser_parse(&state) < 0) {
|
|
return -1;
|
|
}
|
|
|
|
quip_state_destroy(&state);
|
|
return 0;
|
|
}
|