Write a program in your favorite scripting language to remove comments from programs in the calculator language (Example 2.9).  Build a nested-case-statements finite automaton that converts all...


Write a program in your favorite scripting language to remove comments


from programs in the calculator language (Example 2.9).


 Build a nested-case-statements finite automaton that converts all letters in


its input to lower case, except within Pascal-style comments and strings. A


Pascal comment is delimited by { and }, or by (* and *). Comments do


not nest. A Pascal string is delimited by single quotes (‚ ... ‚). A quote


character can be placed in a string by doubling it (‚


Madam, I‚‚m Adam.‚).


This upper-to-lower mapping can be useful if feeding a program written


in standard Pascal (which ignores case) to a compiler that considers upperand lowercase letters to be distinct.

Nov 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here