/* Lexical Analysis with Flex (2.6.0) We used some of the code from this manual */ /* so we placed the citation here. */ /* definitions */ %option noyywrap %{ #include "typedefs.h" %} int line_number = 1, column_number = 1; %% \n line_number++ column_number = 1; . column_number++; "integer" {return T_INTEGER} "address" {return T_ADDRESS} "Boolean" {return T_BOOLEAN} "character" {return T_CHARACTER} "string" {return T_STRING} /* KEYWARDS */ "while" {return WHILE} "if" {return IF} "then" {return THEN} "else" {return ELSE} "type" {return TYPE} "function" {return FUNCTION} "return" {return RETURN} "external" {return EXTERNAL} "as" {return AS} %%