Q.1. Write a Lex input file that will produce a scanner that capitalizes all comments in a C program. Moreover after replicating its input program in the terminal (or in a file), the scanner should append the total number of comments to its output. Your scanner should be able to accept optional command line arguments to indicate the input and output filenames. Please consider using toupper(char c) from to convert to uppercase. Q.2. Write a rule in Lex to print integer numbers that are multiple of five. The numbers are allowed to have an optional sign (+/-). You are not neither allowed to convert the matched strings into integers, nor to use the modulus operator (%) in your rule. And Give only the rule section of a Lex input file for a scanner that prints only all the letters in its input on screen, and ignores everything else.
Looking for a solution written from scratch with No plagiarism and No AI?
WHY CHOOSE US?
We deliver quality original papers |
Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected |
Free revisions |
We offer our clients multiple free revisions just to ensure you get what you want. |
Discounted prices |
All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount |
100% originality |
We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI |
On-time delivery |
We will deliver your paper on time even on short notice or short deadline, overnight essay or even an urgent essay |