0% found this document useful (0 votes)
71 views

Lex and Yacc Program Index

This document outlines assignments for a Systems Programming Laboratory course. It includes 7 Lex assignments involving text analysis tasks like counting characters and identifiers. It also lists 7 Yacc assignments involving parsing expressions, control structures, and context-free grammars. Students will be randomly assigned one Lex and one Yacc problem of equal weight from this list for their exam.

Uploaded by

pavangc007
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Lex and Yacc Program Index

This document outlines assignments for a Systems Programming Laboratory course. It includes 7 Lex assignments involving text analysis tasks like counting characters and identifiers. It also lists 7 Yacc assignments involving parsing expressions, control structures, and context-free grammars. Students will be randomly assigned one Lex and one Yacc problem of equal weight from this list for their exam.

Uploaded by

pavangc007
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Systems Programming Laboratory

Subject Code: 10MCA 36 Exam Hours: 03 Exam Marks: 50

Lex Assignments:
1. Program to count the number of vowels and consonants in a given string. 2. Program to count the number of characters, words, spaces and lines in a given input

line.
3. 3. Program to count the number of :

a. Positive and negative integers b. b. Positive and negative fraction 4. Program to count the number of comments lines in a given c program. Also eliminate them and copy that program into separate file. 5. Program to count the number of 'scanf' and 'printf' statements in a c program. Replace them with 'readf' and 'writef' statements respectively. 6. Program to recognize a valid arithmetic expression and identify the identifiers and operators present and print them separately. 7. Program to recognize and count the number of identifiers in a given input file.

Yacc Assignments:
1. Program to test the validity of a simple expression involving operators +,-,* and /. 2. Program to recognize nested IF control statements and display the number of levels of nesting. 3. Program to recognize a valid arithmetic expression that uses operators +,-.* and/. 4. Program to recognize a valid variable, which starts with a letter, followed by any number of letters or digit. 5. Program to evaluate an arithmetic expression involving operators +,-,*and /. 6. Program to recognize strings aaab, ab, abbb and a using the grammar (anbn, where n>=0). 7. Program to recognize the grammar (anb where n>=10).

Instruction: 1. A combination of one LEX and one YACC problem will be asked based on lots. 2. Both will have equal weight age.

You might also like