ACSE 2.0.2
Advanced Compiler System for Education (basic documentation)
Loading...
Searching...
No Matches
Syntatic and Lexical Analysis

Functions used for syntactic and lexical analysis. More...

Functions

t_programparseProgram (char *fn)
 
int yylex (void)
 

Variables

t_fileLocation curFileLoc
 
FILE * yyin
 

Detailed Description

Functions used for syntactic and lexical analysis.

Function Documentation

◆ parseProgram()

t_program * parseProgram ( char * fn)

Performs the initial syntactic-driven translation of the source code. This function is mostly a wrapper around yyparse().

Parameters
fnThe path to the source code file to be compiled.
Returns
The program object produced.

◆ yylex()

int yylex ( void )

Scans the input up to the next token.

Note
This function is defined in Flex-generated code.
Returns
The next token identifier.

Definition at line 31 of file scanner.l.

Variable Documentation

◆ curFileLoc

t_fileLocation curFileLoc
extern

The current location in the file being read by the scanner.

Definition at line 11 of file scanner.l.

◆ yyin

FILE* yyin
extern

The file currently being read by the scanner.

Note
This global variable is used by Flex-generated code.