File: parser.h

package info (click to toggle)
kanshi 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: ansic: 1,713; xml: 493; makefile: 6
file content (27 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef KANSHI_PARSER_H
#define KANSHI_PARSER_H

#include <stdio.h>

struct kanshi_config;

enum kanshi_token_type {
	KANSHI_TOKEN_LBRACKET,
	KANSHI_TOKEN_RBRACKET,
	KANSHI_TOKEN_STR,
	KANSHI_TOKEN_NEWLINE,
};

struct kanshi_parser {
	FILE *f;
	int next;
	int line, col;

	enum kanshi_token_type tok_type;
	char tok_str[1024];
	size_t tok_str_len;
};

struct kanshi_config *parse_config(const char *path);

#endif