begin work on new lexer

This commit is contained in:
Lobo 2026-01-26 08:09:00 -03:00
parent 30ff72b3ae
commit 35bad08a0d
33 changed files with 2464 additions and 3 deletions

View file

@ -0,0 +1,28 @@
/*
* compiler directive on Plan 9
*/
#ifndef USED
#define USED(x) if(x);else
#endif
/*
* easiest way to make sure these are defined
*/
#define uchar _utfuchar
#define ushort _utfushort
#define uint _utfuint
#define ulong _utfulong
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
/*
* nil cannot be ((void*)0) on ANSI C,
* because it is used for function pointers
*/
#undef nil
#define nil 0
#undef nelem
#define nelem(x) (sizeof (x)/sizeof (x)[0])