Portál AbcLinuxu, 12. června 2026 10:10
Vývojář Alexandre Gomes Gaigalas na GitHubu zveřejnil c89cc.sh, parser a kompilátor jazyka C89 napsaný v pouhém jediném skriptu o přibližně 8000 řádcích čistého bashe (bez dalších externích závislostí), který generuje ELF64 binárky pro x86-64. Jedná se o velmi jednoduchý kompilátor, který nepodporuje direktivy #include a dokonce ani funkci printf (lze použít puts), všechny dostupné deklarace lze nalézt v proměnné _BUILTIN_LIBC na konci skriptu. Skript je volně dostupný pod ISC licencí.
Tiskni
Sdílej:
C106) STATE=C104; ast_C21; continue;; C107) STATE=C108; ast_C9; continue;; C9) STATE=C109; ast_C48; continue;; C10) STATE=C110; ast_C9; continue;; C12) STATE=C112; ast_C48; continue;; C13) STATE=C113; ast_C48; continue;; C14) STATE=C114; ast_C48; continue;; C15) STATE=C115; ast_C48; continue;; C115) STATE=C116; ast_Cw; continue;; C16) STATE=C118; ast_C48; continue;; C118) STATE=C119; ast_C17; continue;; C121) STATE=C122; ast_C18; continue;; C17) STATE=C124; ast_C19; continue;; C125) STATE=C126; ast_C18; continue;; C18) ast_Cy; continue;; C19) STATE=C127; ast_C20; continue;; C128) STATE=C127; ast_C20; continue;; C20) STATE=C129; ast_C48; continue;; C130) STATE=C129; ast_C39; continue;; C21) STATE=C131; ast_C39; continue;; C22) STATE=C132; ast_C21; continue;; C133) STATE=C132; ast_C21; continue;;
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.