All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
programming language pragmatics
Questions and Answers of
Programming Language Pragmatics
Consider the following grammar:G → S $$S → A MM → S | ∈A → a E | b A AE → a B | b A | ∈B → b E | a B B(a) Describe in English the language that the grammar generates.(b) Show a parse
Give an example of a grammar that captures right associativity for an exponentiation operator (e.g., ** in Fortran).
(a) Describe in English the language defined by the regular expression a* ( b a* b a* )*. Your description should be a high-level characterization— one that would still make sense if we were using
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
Write a program in your favorite scripting language to remove comments from programs in the calculator language.
Build an ad hoc scanner for the calculator language. As output, have it print a list, in order, of the input tokens. For simplicity, feel free to simply halt in the event of a lexical error.
Starting with the regular expressions for integer and decimal, construct an equivalent NFA, the set-of-subsets DFA, and the minimal equivalent DFA. Be sure to keep separate the final states for the
(a) Show the NFA that results from applying the construction of Figure 2.7 to the regular expression letter ( letter | digit )*.(b) Apply the transformation illustrated to create an equivalent
Build a regular expression that captures all nonempty sequences of letters other than file, for, and from. For notational convenience, you may assume the existence of a not operator that takes a set
Show (as “circles-and-arrows” diagrams) the finite automata for Exercise 2.1.Data from Exercise 2.1:Write regular expressions to capture the following.(a) Strings in C. These are delimited by
Write regular expressions to capture the following.(a) Strings in C. These are delimited by double quotes ("), and may not contain newline characters. They may contain double-quote or backslash
The Unix make utility allows the programmer to specify dependences among the separately compiled pieces of a program. If file A depends on file B and file B is modified, make deduces that A must be
In your local implementation of C, what is the limit on the size of integers? What happens in the event of arithmetic overflow? What are the implications of size limits on the portability of programs
Both interpretation and code generation can be performed by traversal of a syntax tree. Compare these two kinds of traversals. In what ways are they similar/different?
The gcd program of Example 1.20 might also be writtenint main() { int i = getint(), j = getint(); while (i != j) { if (i > j) i = i % j;
Imperative languages like Fortran and C are typically compiled, while scripting languages, in which many issues cannot be settled until run time, are typically interpreted. Is interpretation simply
Consider again the Pascal tool set distributed by Niklaus Wirth. After successfully building a machine language version of the Pascal compiler, one could in principle discard the P-code interpreter
Errors in a computer program can be classified according to when they are detected and, if they are detected at compile time, what part of the compiler detects them. Using your favorite imperative
Showing 800 - 900
of 818
1
2
3
4
5
6
7
8
9