Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 1.28 KB

README.md

File metadata and controls

31 lines (18 loc) · 1.28 KB

CS251: Introduction to Language Processing

Building a Pascal Lexical Analyzer

Objective: Develop a lexical analyzer (token generator) for the "Pascal" programming language.

Instructions

Follow these steps to execute the Pascal Lexical Analyzer (Pascal.l file):

  1. Generate the lexer code: lex Pascal.l

  2. Compile the lexer code: gcc lex.yy.c -o lexer -ll

  3. Run the lexer: ./lexer

Now, you can analyze Pascal syntax by running the ./lexer executable and providing input through the terminal by running the syntax line by line and getting the desired output.

References

Here are the references used while creating the lexical analyzer for "Pascal":

Feel free to explore these references for more insights into lexical analysis and the Pascal programming language.