Consider this regular expression:
Which of the following regular expressions is/are equivalent to it?
Provide the DFA (deterministic finite automaton) for the regular
expression (same as in question #1):
You do not have to use the method of converting to an NFA first,though of course you may.
Consider the following deterministic finite automaton:
Which of the following strings is/are not accepted by this automaton?
Why aren’t regular expressions used in the parsing stage of language translation to determine that tokens follow a grammatically correct pattern?
Because parsing is concerned with type and scope analysis, and regular expressions cannot express these context-sensitive issues. Because regular expressions cannot express balanced characters, such as balanced parentheses.
Because the implementations of regular expressions (finite automata) are less efficient than the implementations of context free grammars.
Because regular expressions cannot express languages that are infinitely large.
本网站支持 Alipay WeChatPay PayPal等支付方式
E-mail: firstname.lastname@example.org 微信号:vipnxx