Question: please read carefully 1. Certain assemblers form their integer literals in the following way. Binary literals consist of one or more binary digits (0,1) followed

 please read carefully 1. Certain assemblers form their integer literals in

please read carefully

1. Certain assemblers form their integer literals in the following way. Binary literals consist of one or more binary digits (0,1) followed by the letter B; e.g., 10110B. Octal literals consist of one or more octal digits ( 0 through 7 ) followed by the letter Q (since 0 looks too much like 0); e.g., 1234567Q. Hexadecimal literals consist of at least one decimal digit (0 through 9 ), followed by zero or more hexadecimal digits ( 0 through 9 and A through F) followed by the letter H; e.g., OABCDEFH. Decimal literals consist of at least one decimal digit optionally followed by the letter D; e.g., 1234 . a. Draw the state diagram of an NFA (not a DFA) for these literal forms; you may use -transitions, you don't need to use Thompson's construction. b. Give a regular expression for the literals; you may use . c. Modula- 3 based literals have the form base_digits (e.g., 2_11111111, 8_377, 16_FF, 255 are equivalent integer literals). Why is the Modula3 form preferable to the assembler form introduced here, from the standpoint of a compiler (or assembler) writer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!