From aee3bfe71cba2c1cb7c5e768288281bf42b6baea Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 19 Oct 2023 11:50:08 +0300 Subject: (CI/PA1) Reworked certain comments --- .../coolc-spim/my-code/coursework/pa1/cool.flex | 36 +++++----------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/Year 3/Compilers, Introduction/coolc-spim/my-code/coursework/pa1/cool.flex b/Year 3/Compilers, Introduction/coolc-spim/my-code/coursework/pa1/cool.flex index acc81ba..9854f17 100644 --- a/Year 3/Compilers, Introduction/coolc-spim/my-code/coursework/pa1/cool.flex +++ b/Year 3/Compilers, Introduction/coolc-spim/my-code/coursework/pa1/cool.flex @@ -2,11 +2,6 @@ * The scanner definition for COOL. */ -/* - * Stuff enclosed in %{ %} in the first section is copied verbatim to the - * output, so headers and global definitions are placed here to be visible - * to the code in the file. Don't remove anything that was here initially - */ %{ #include #include @@ -71,31 +66,16 @@ unsigned openedComments = 0; %} -/* - * Define names for regular expressions here. +/* + * Info from /usr/class/cs143/cool/include/PA2/cool-parse.h + * Tokens: + * STR_CONST CLASS ELSE FI IF IN INHERITS ISVOID LET LOOP POOL THEN WHILE CASE ESAC NEW OF NOT DARROW TYPEID OBJECTID INT_CONST BOOL_CONST ASSIGN LE ERROR + * yylval types: + * Boolean boolean; + * Symbol symbol; + * char *error_msg; */ -/* -Info from /usr/class/cs143/cool/include/PA2/cool-parse.h -Token: -STR_CONST CLASS ELSE FI IF IN INHERITS ISVOID LET LOOP POOL THEN WHILE CASE ESAC NEW OF NOT DARROW TYPEID OBJECTID INT_CONST BOOL_CONST ASSIGN LE -ERROR -yylval types: - Boolean boolean; - Symbol symbol; - Program program; - Class_ class_; - Classes classes; - Feature feature; - Features features; - Formal formal; - Formals formals; - Case case_; - Cases cases; - Expression expression; - Expressions expressions; - char *error_msg; -*/ %x MULTILINE -- cgit v1.3.1-26-gb76a