1. a. Consider the following Context Free Grammar (CFG), where strings written in italics (clauses, clause, literal_list, literal, op, posneg) denote nonterminals:
i. Give two strings which can be derived from the CFG above.
ii. Show a parse tree for the following string derived from the above Context Free Grammar:
“(a ∨ ?d)”
iii. Rewrite the CFG to an alternative form so that it is not left-recursive.
b. What is the difference between a compiler and an interpreter?
2. a. Rewrite the following infix expression to postfix form:
b. Give two examples of runtime/dynamic semantic checks that may be performed by a compiler for a typical programming language and explain why they cannot be performed statically.
c. What does it mean for a programming language to be Turing-complete?
d. A particular language contains a floating point numeric type. The following list is of some floating point values in this language (where each float contains a sign, + or -, as well as an ‘f’ character at the end):
Give a regular expression to denote floating point numbers in this language so that all of the values above would be accepted by your regular expression. If you make any additional assumptions on values permissible as floats, state them after your answer.
e. Compare the advantages and disadvantages of using a Nondeterministic Finite Automaton (an NFA) or a Deterministic Finite Automaton (a DFA) for recognizing strings of a particular language.
3. a. Consider the following Syntax Directed Translation Scheme (with nonterminals denoted in italics – S, A, B, C, X, pntr, id, digit):
i. Identify the semantic actions of this syntax directed translation scheme.
ii. Write down a parse tree for the following string (where test is an id) and explain what the output would be of the semantic actions when parsing this string:
b. Consider the following Nondeterministic Finite Automaton (NFA):
Figure 1 – an NFA
i. Identify the start and final states of the NFA in Figure 1.
ii.For each of the following strings, state whether it would be accepted (recognised) by the NFA of Figure 1:
iii. Rewrite the NFA of Figure 1 as a Deterministic Finite Automaton (DFA) which accepts the same language (set of strings)
To export a reference to this article please select a referencing stye below:
My Assignment Help. (2020). Programming Language Theory. Retrieved from https://myassignmenthelp.com/free-samples/5129comp-programming-language-theory/nondeterministic-finite-automaton-nfa.html.
"Programming Language Theory." My Assignment Help, 2020, https://myassignmenthelp.com/free-samples/5129comp-programming-language-theory/nondeterministic-finite-automaton-nfa.html.
My Assignment Help (2020) Programming Language Theory [Online]. Available from: https://myassignmenthelp.com/free-samples/5129comp-programming-language-theory/nondeterministic-finite-automaton-nfa.html
[Accessed 24 November 2020].
My Assignment Help. 'Programming Language Theory' (My Assignment Help, 2020) <https://myassignmenthelp.com/free-samples/5129comp-programming-language-theory/nondeterministic-finite-automaton-nfa.html> accessed 24 November 2020.
My Assignment Help. Programming Language Theory [Internet]. My Assignment Help. 2020 [cited 24 November 2020]. Available from: https://myassignmenthelp.com/free-samples/5129comp-programming-language-theory/nondeterministic-finite-automaton-nfa.html.
MyAssignmenthelp.com delivers high-quality law assignment help to all students in New Zealand at best possible deal. We have an in-house team of 5000+ native writers who are highly skilled and experts in a wide range of legal topics and subjects. They are thorough with the academic criteria of different law subjects and take a distinct approach to help students understand various complex laws and their applications.
Answer: Introduction The report talks about a business case study, of a company called AB Pty. Ltd. It manages a product delivery business for the area Austin downtown, Texas, USA. This company looks like a small scale business as it contains only three trucks for making the delivery of the products. The products are delivered to the customers of the specified zone. The company is facing a problem in the delivery service which is supposed to ...Read More
Answer: It is undeniable that the technological revolution has made itself an essential aspect of our daily lives. It has changed our views of healthcare system, workplace, sports, art, creativity and what not. The rate, in which everyone is using smartphones, tabs and laptops, that it has become difficult to understand whether the person can talk verbally or not. I persoally am a decent user of technology and not always depend upon technologi...Read More
Answer: Introduction Digital diplomacy is the use of internet resources for the fulfillment of foreign relations on trade issues, communication, media, negotiation, culture and functions (Manor, 2012). ICT as a diplomacy tool supports embassy functions, activities and strategies. A comparative analysis of the Swedish, Maldives, US and Israel embassy modes reveals the use of benefits and risks. The cyberspace has a purpose of promoting meaning...Read More
Answer: Background: The data analysis of this study finds the “Skills and Credibility” of the students about the fact how they are capable of using the online visualisation tools- “IBM Weston Analytics” (Zhu et al., 2014). Also, their ability to execute the decision analysis and predictive analysis are verified in this research report. The research report is structured on the basis of “Solar city project data&rdq...Read More
Answer: Task 1 Scrambled bits using WinHex The WinHex is the tool that is used to change the text content values in hexadecimal format, making some of the strong encryption which can only be decrypted if the right order to reverse operations are being followed. For the current text file, the contents operations are as follows: Select Modify Data->in the new pop up window select the “left shift by 1-bit option” Output: ...Read More
Just share requirement and get customized Solution.
Our writers make sure that all orders are submitted, prior to the deadline.
Using reliable plagiarism detection software, Turnitin.com.We only provide customized 100 percent original papers.
Feel free to contact our assignment writing services any time via phone, email or live chat. If you are unable to calculate word count online, ask our customer executives.
Our writers can provide you professional writing assistance on any subject at any level.
Our best price guarantee ensures that the features we offer cannot be matched by any of the competitors.
Get all your documents checked for plagiarism or duplicacy with us.
Get different kinds of essays typed in minutes with clicks.
Calculate your semester grades and cumulative GPa with our GPA Calculator.
Balance any chemical equation in minutes just by entering the formula.
Calculate the number of words and number of pages of all your academic documents.
Our Mission Client Satisfaction
it was really helpful. i got my asssignment on time even before the deadline.it was written really well i am glad that I came to Myassignmenthelp.
very professional i got it before the due time i set, the sheet that was sent to me was very neat and very well done.
Great work! Really appreciate the help and efficiency. Very well organized. Thank you for your help.
given on time. well presented. and very helpful, trust these guys for all your work