Combined binaries (parser + alpha)

This commit is contained in:
Scarlett
2025-03-05 14:01:34 -05:00
parent 45940c0500
commit c2f28b6836
5 changed files with 47 additions and 37 deletions

View File

@ -6,7 +6,7 @@
%{
#include <stdbool.h>
#include "grammar.tab.h"
#include "../tmp/grammar.tab.h"
#ifndef DEBUG
#define DEBUG 0
#endif
@ -76,7 +76,7 @@ SCHAR \\n|\\t|\\\"|[^\"\n\\]
"false" {if(DEBUG) {printf( "C_FALSE: %s (%d)\n", yytext, C_FALSE);} else {return C_FALSE;}}
"null" {if(DEBUG) {printf( "C_NULL: %s (%d)\n", yytext, C_NULL);} else {return C_NULL;}}
{ID} {if(DEBUG) {printf( "ID: %s (%d)\n", yytext, ID);} else {/*yylval.words = strdup(yytext);*/ return ID;}}
{ID} {if(DEBUG) {printf( "ID: %s (%d)\n", yytext, ID);} else {yylval.words = strdup(yytext); return ID;}}
\n {line_number++; column_number = 1;}
\t {column_number++;}