/* --- END LICENSE --- */
#include <dataworks.h>
+
#include <dw_database.h>
#include <dw_util.h>
+#include <dw_parser.h>
#include <stdbool.h>
#include <stdio.h>
} else {
printf("Unknown dot-command.\n");
}
+ }else if(strlen(buf) > 0){
+ struct __dw_token* token = __dw_parser_parse(buf);
+ if(token != NULL){
+ }else{
+ printf("Parser returned NULL. Help!\n");
+ }
}
printf("%c ", prompt);
fflush(stdout);
#include <stdint.h>
#include <stdio.h>
-#ifdef __WATCOMC__
-#define PACKED _Packed
-#else
-#define PACKED __attribute__((__packed__))
-#endif
-
#define __dw_buffer_to_db_v1_indexentry(buf, index) \
memcpy(&index.flag, buf, 1); \
uint64_t be_count; \
/**
* @~english
- * @brief indexentry for v1 database.
+ * @brief `indexentry` for v1 database.
* @note See \ref FORMATv1 for more info.
*
*/
-PACKED
struct dataworks_db_v1_indexentry {
uint8_t flag;
uint64_t count;
/**
* @~english
- * @brief infoentry for database.
+ * @brief `infoentry` for database.
* @note See \ref FORMATv1 for more info.
*
*/
-PACKED
struct dataworks_db_infoentry {
uint16_t version;
uint64_t mtime;
/* OF SUCH DAMAGE. */
/* -------------------------------------------------------------------------- */
/* --- END LICENSE --- */
+
+#include "dw_parser.h"
+
+#include <stddef.h>
+
+struct __dw_token* __dw_parser_parse(const char* str){
+ return NULL;
+}