You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
161 lines
7.2 KiB
161 lines
7.2 KiB
%{ |
|
#include "libc/str/str.h" |
|
#include "tool/tags/tags.h" |
|
#include "o/tool/tags/tags.h.inc" |
|
%} |
|
%compare-strncmp |
|
%language=ANSI-C |
|
%readonly-tables |
|
%struct-type |
|
%define lookup-function-name LookupKeyword |
|
struct KeywordSlot { char *name; int code; }; |
|
%% |
|
auto, TK_AUTO |
|
break, TK_BREAK |
|
case, TK_CASE |
|
char, TK_CHAR |
|
const, TK_CONST |
|
continue, TK_CONTINUE |
|
default, TK_DEFAULT |
|
do, TK_DO |
|
double, TK_DOUBLE |
|
else, TK_ELSE |
|
enum, TK_ENUM |
|
extern, TK_EXTERN |
|
float, TK_FLOAT |
|
for, TK_FOR |
|
goto, TK_GOTO |
|
if, TK_IF |
|
inline, TK_INLINE |
|
int, TK_INT |
|
long, TK_LONG |
|
register, TK_REGISTER |
|
restrict, TK_RESTRICT |
|
return, TK_RETURN |
|
short, TK_SHORT |
|
signed, TK_SIGNED |
|
sizeof, TK_SIZEOF |
|
static, TK_STATIC |
|
struct, TK_STRUCT |
|
switch, TK_SWITCH |
|
typedef, TK_TYPEDEF |
|
union, TK_UNION |
|
unsigned, TK_UNSIGNED |
|
void, TK_VOID |
|
volatile, TK_VOLATILE |
|
while, TK_WHILE |
|
_Alignas, TK_ALIGNAS |
|
_Alignof, TK_ALIGNOF |
|
_Atomic, TK_ATOMIC |
|
_Bool, TK_BOOL |
|
_Complex, TK_COMPLEX |
|
_Generic, TK_GENERIC |
|
_Imaginary, TK_IMAGINARY |
|
_Noreturn, TK_NORETURN |
|
_Static_assert, TK_STATIC_ASSERT |
|
_Thread_local, TK_THREAD_LOCAL |
|
elif, TK_ELIF |
|
endif, TK_ENDIF |
|
ifdef, TK_IFDEF |
|
ifndef, TK_IFNDEF |
|
define, TK_DEFINE |
|
undef, TK_UNDEF |
|
include, TK_INCLUDE |
|
line, TK_LINE |
|
error, TK_ERROR |
|
pragma, TK_PRAGMA |
|
asm, TK_ASM |
|
__attribute__, TK_ATTRIBUTE |
|
__restrict__, TK_RESTRICT |
|
__typeof__, TK_TYPEOF |
|
__typeof, TK_TYPEOF |
|
__inline, TK_INLINE |
|
__const__, TK_CONST |
|
__label__, TK_LABEL |
|
__noinline__, TK_LABEL |
|
__force_align_arg_pointer__, TK_FORCE_ALIGN_ARG_POINTER |
|
__always_inline__, TK_ALWAYS_INLINE |
|
__gnu_inline__, TK_GNU_INLINE |
|
__alignof__, TK_ALIGNOF |
|
__asm__, TK_ASM |
|
__auto_type, TK_AUTO_TYPE |
|
__byte__, TK_BYTE |
|
__complex__, TK_COMPLEX |
|
__imag__, TK_IMAG |
|
__may_alias__, TK_MAY_ALIAS |
|
__noreturn__, TK_NORETURN |
|
__packed__, TK_PACKED |
|
__pointer__, TK_POINTER |
|
__printf__, TK_PRINTF |
|
__real__, TK_REAL |
|
__scanf__, TK_SCANF |
|
__strfmon__, TK_STRFMON |
|
__strftime__, TK_STRFTIME |
|
__strong__, TK_STRONG |
|
__target__, TK_TARGET |
|
__transparent_union__, TK_TRANSPARENT_UNION |
|
__volatile__, TK_VOLATILE |
|
__word__, TK_WORD |
|
__alias__, TK_ALIAS |
|
__aligned__, TK_ALIGNED |
|
__alloc_align__, TK_ALLOC_ALIGN |
|
__alloc_size__, TK_ALLOC_SIZE |
|
__artificial__, TK_ARTIFICIAL |
|
__assume_aligned__, TK_ASSUME_ALIGNED |
|
__cold__, TK_COLD |
|
__constructor__, TK_CONSTRUCTOR |
|
__destructor__, TK_DESTRUCTOR |
|
__copy__, TK_COPY |
|
__deprecated__, TK_DEPRECATED |
|
__error__, TK_ERROR |
|
__warning__, TK_WARNING |
|
__externally_visible__, TK_EXTERNALLY_VISIBLE |
|
__flatten__, TK_FLATTEN |
|
__format__, TK_FORMAT |
|
__gnu_format__, TK_GNU_FORMAT |
|
__gnu_printf__, TK_GNU_PRINTF |
|
__gnu_scanf__, TK_GNU_SCANF |
|
__format_arg__, TK_FORMAT_ARG |
|
__hot__, TK_HOT |
|
__ifunc__, TK_IFUNC |
|
__interrupt__, TK_INTERRUPT |
|
__interrupt_handler__, TK_INTERRUPT_HANDLER |
|
__no_caller_saved_registers__, TK_NO_CALLER_SAVED_REGISTERS |
|
__leaf__, TK_LEAF |
|
__malloc__, TK_MALLOC |
|
__no_icf__, TK_NO_ICF |
|
__no_instrument_function__, TK_NO_INSTRUMENT_FUNCTION |
|
__no_profile_instrument_function__, TK_NO_PROFILE_INSTRUMENT_FUNCTION |
|
__no_reorder__, TK_NO_REORDER |
|
__no_sanitize__, TK_NO_SANITIZE |
|
__no_sanitize_address__, TK_NO_SANITIZE_ADDRESS |
|
__no_address_safety_analysis__, TK_NO_ADDRESS_SAFETY_ANALYSIS |
|
__no_sanitize_thread__, TK_NO_SANITIZE_THREAD |
|
__no_sanitize_undefined__, TK_NO_SANITIZE_UNDEFINED |
|
__no_split_stack__, TK_NO_SPLIT_STACK |
|
__no_stack_limit__, TK_NO_STACK_LIMIT |
|
__noclone__, TK_NOCLONE |
|
__noipa__, TK_NOIPA |
|
__nonnull__, TK_NONNULL |
|
__noplt__, TK_NOPLT |
|
__nothrow__, TK_NOTHROW |
|
__optimize__, TK_OPTIMIZE |
|
__pure__, TK_PURE |
|
__patchable_function_entry__, TK_PATCHABLE_FUNCTION_ENTRY |
|
__returns_nonnull__, TK_RETURNS_NONNULL |
|
__returns_twice__, TK_RETURNS_TWICE |
|
__section__, TK_SECTION |
|
__sentinel__, TK_SENTINEL |
|
__simd__, TK_SIMD |
|
__target_clones__, TK_TARGET_CLONES |
|
__unused__, TK_UNUSED |
|
__used__, TK_USED |
|
__visibility__, TK_VISIBILITY |
|
__warn_unused_result__, TK_WARN_UNUSED_RESULT |
|
__params_nonnull__, TK_PARAMS_NONNULL |
|
__weak__, TK_WEAK |
|
__vector_size__, TK_VECTOR_SIZE |
|
__ms_abi__, TK_MS_ABI |
|
__mode__, TK_MODE |
|
__optnone__, TK_OPTNONE |
|
__nodebug__, TK_NODEBUG
|
|
|