LexiTAC

Symbol Table · Lexical Analysis · TAC Generation

Flex + Bison Simulator

Source Input

// enter expression
Quick Examples

Lexical Tokens

Run to see tokens

Symbol Table

Run to see symbols

Three-Address Code

Run to see TAC

Compiler Pipeline

1

Source Input

Raw expression entered by the user. Passed to the Flex lexer as a character stream.

2

Lexical Analysis (Flex)

Flex scans the input, matches regex patterns, and produces a stream of typed tokens.

3

Symbol Table

Every identifier is registered. Each gets a unique ID (id1, id2…) and a type.

4

Syntax Analysis (Bison)

Recursive-descent / LALR(1) parser checks grammar rules. Builds the parse tree.

5

TAC Generation

Semantic actions in Bison rules emit three-address instructions with temporaries t1, t2