cleaned up repo and code in prep to push to dev

This commit is contained in:
Partho Bhattacharya
2025-02-12 12:41:23 -05:00
parent 0e3c0543d7
commit 76cc3754c2
8 changed files with 17 additions and 1827 deletions

View File

@ -471,7 +471,7 @@ char *yytext;
/* definitions */
#include "typedefs.h"
#line 474 "lex.yy.c"
#line 11 "lexicalStructure.lex"
#line 13 "lexicalStructure.lex"
/* char can be a newline, tab, an escaped quote, or anything but a single quote, an actual line break, an actual tab, or a backslash by itself (to prevent confusion from escaped quote */
/*similar to above, a string Char (SCHAR) is the same as a CHAR except we cannot have double quotes instead of single quotes. Double quotes need to be escaped in Flex unlike single quotes based on documentation */
/*Making the contents of a comment anything that is either not a * or not a * followed by ) to terminate comments at the first ENDCOM */
@ -692,10 +692,11 @@ YY_DECL
}
{
#line 18 "lexicalStructure.lex"
#line 20 "lexicalStructure.lex"
/* rules */
#line 699 "lex.yy.c"
#line 700 "lex.yy.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@ -754,52 +755,52 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 20 "lexicalStructure.lex"
#line 23 "lexicalStructure.lex"
{printf( "C_INTEGER: %s (%d)\n", yytext, atoi( yytext ) );}
YY_BREAK
case 2:
YY_RULE_SETUP
#line 22 "lexicalStructure.lex"
#line 25 "lexicalStructure.lex"
{printf( "C_NULL: %s (%d)\n", yytext, atoi( yytext ) );}
YY_BREAK
case 3:
YY_RULE_SETUP
#line 24 "lexicalStructure.lex"
#line 27 "lexicalStructure.lex"
{printf( "C_CHARACTER: %s (%d)\n", yytext, atoi( yytext ) );} /*using double \ per documentation to show escaped chars*/
YY_BREAK
case 4:
YY_RULE_SETUP
#line 26 "lexicalStructure.lex"
#line 29 "lexicalStructure.lex"
{printf( "C_TRUE: %s (%d)\n", yytext, atoi( yytext ) );}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 28 "lexicalStructure.lex"
#line 31 "lexicalStructure.lex"
{printf( "C_FALSE: %s (%d)\n", yytext, atoi( yytext ) );}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 30 "lexicalStructure.lex"
#line 33 "lexicalStructure.lex"
{printf( "C_STRING: %s (%d)\n", yytext, atoi( yytext ) );}
YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
#line 32 "lexicalStructure.lex"
#line 35 "lexicalStructure.lex"
{printf( "COMMENT: %s (%d)\n", yytext, atoi( yytext ) );}
YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 34 "lexicalStructure.lex"
#line 37 "lexicalStructure.lex"
YY_BREAK
case 9:
YY_RULE_SETUP
#line 36 "lexicalStructure.lex"
#line 39 "lexicalStructure.lex"
ECHO;
YY_BREAK
#line 803 "lex.yy.c"
#line 804 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@ -1804,7 +1805,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
#line 36 "lexicalStructure.lex"
#line 39 "lexicalStructure.lex"
/* user code */
@ -1816,5 +1817,6 @@ int main( int argc, char **argv )
else
yyin = stdin;
yylex();
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -31,7 +31,7 @@ COMMENTCHAR [^\*]|\*[^\)]
\"{SCHAR}*\" {printf( "C_STRING: %s (%d)\n", yytext, atoi( yytext ) );}
{STARTCOM}{COMMENTCHAR}*{ENDCOM} {printf( "COMMENT: %s (%d)\n", yytext, atoi( yytext ) );}
\(\*{COMMENTCHAR}*\*\) {printf( "COMMENT: %s (%d)\n", yytext, atoi( yytext ) );}
.|\n