New grammar formatting rules applied.

This commit is contained in:
Scarlett
2025-04-03 16:37:53 -04:00
parent 3186d363ed
commit 3d06352510
4 changed files with 535 additions and 297 deletions

View File

@ -5,25 +5,25 @@
%option header-file="flex.h"
%option yylineno
%{
#include <stdbool.h>
#include "../tmp/grammar.tab.h"
#include "../src/symbol_table.h"
#ifndef DEBUG
#define DEBUG 0
#endif
extern SymbolTable * cur;
extern FILE* tok_flag;
extern void incr(int lnum,int cnum, int tok);
extern void print_tok(int tok);
int line_number = 1, column_number = 1;
int yycolumn = 1;
#define YY_USER_ACTION { \
yylloc.first_line = yylineno; \
yylloc.last_line = yylineno; \
yylloc.first_column = yycolumn; \
yylloc.last_column = yycolumn + yyleng - 1; \
yycolumn += yyleng; }
#include <stdbool.h>
#include "../tmp/grammar.tab.h"
#include "../src/symbol_table.h"
#ifndef DEBUG
#define DEBUG 0
#endif
extern SymbolTable * cur;
extern FILE* tok_flag;
extern void incr(int lnum,int cnum, int tok);
extern void print_tok(int tok);
int line_number = 1, column_number = 1;
int yycolumn = 1;
#define YY_USER_ACTION { \
yylloc.first_line = yylineno; \
yylloc.last_line = yylineno; \
yylloc.first_column = yycolumn; \
yylloc.last_column = yycolumn + yyleng - 1; \
yycolumn += yyleng; }
%}
STARCOM [^\*]|\*+[^\)\*]+