编译原理紫龙书(Compilers:Principles,Techniques and Tools Second Edition)部分答案
来源:互联网 发布:如何将程序导入单片机 编辑:程序博客网 时间:2024/04/19 02:11
3.3.2 : Describe the languages denoted by the following regular expressions:
2: 所有的由a和b组成的串。
3: This regular expression denotes the language that takes zero or many instances of “a” or “b” as the prefix, followed with an “a”, ended with a string in{aa,ab,ba,bb}.
3.3.5
6 All strings of a's and b's with an even number of a's and an odd number of b's.
even_a_even_b →(aa|bb)* ((ab|ba)(aa|bb)*(ab|ba)(aa|bb)*)*
even_a_odd_b→ b even_a_even_b | a (aa|bb)*(ab|ba) even_a_even_b
对于偶数个a和奇数个b构成的串,其第一个字符可能是a或b
(1)如果是b,那么剩下的部分一定是偶数个a和偶数个b
(2)如果是a,那么经过若干个aa或bb,一定会出现一个ab或ba,才能保证a的个数是偶数,b的个数是奇数。若串还没有结束,剩余部分一定是偶数个a和偶数个b
8 (b*a* | b* | a*)(aa*b)*a* | (b*a*|b*|a*)(ba*a)*(a*|b)
9: b*a* ba* | b* a*
3.5.2
%{
FILE * fp = fopen(“copyfile”,”w”);
%}
non_whitespace [ASCII or characters expect blank, tab and newline]
whitespace [ blank and /t/n]
%%
{whitespace}+ {fprint(fp,%c,’ ‘);}
{non_whitespace} {fprint(fp,%c,yytext[0]);}
3.6.5
1:
State
a
b
e
0
{0,1}
{0}
¢
1
{1,2}
{1}
¢
2
{2}
{2,3}
{0}
3
¢
¢
¢
- 编译原理紫龙书(Compilers:Principles,Techniques and Tools Second Edition)部分答案
- 编译原理->nice time to spend(Compilers: Principles, Techniques, and Tools (2nd Edition))
- Compilers:Principles,Techniques,Tools,The PurpleDragon
- Data Mining: Practical Machine Learning Tools and Techniques, Second Edition
- Principles of Network and System Administration , Second Edition
- 《Concurrent Programming in Java: Design Principles and Patterns》Second Edition
- The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming (2nd Edition)
- Web Engineering: Principles and Techniques
- The Ruby Way, Second Edition: Solutions and Techniques in Ruby, Programming (Paperback) 2nd.Edition.Oct.2006.eBook-BBL
- User Interface Design Tips, Techniques, and Principles
- Database Tuning: Principles, Experiments, and Troubleshooting Techniques
- Software Testing and Analysis: Process, Principles and Techniques
- Software Product Line Engineering: Foundations, Principles and Techniques
- Incident Response and Computer Forensics, Second Edition
- PHP Objects, Patterns, and Practice, Second Edition
- Sarbanes-Oxley IT Compliance Using Open Source Tools-Second Edition, Second Edition
- 程导微编MikroElektronika.Compilers.and.Software.Tools.2017.09 11CD
- Functional MRI (second edition) -- 3. Basic Principles of MR Signal Generation(II)
- 在oracle中临时表的种类
- 不要一辈子靠技术混饭吃
- Essential C++
- ACESS编程中判断空的sql语句
- KERNELRELEASE 的定义,Linux $(KERNELRELEASE)
- 编译原理紫龙书(Compilers:Principles,Techniques and Tools Second Edition)部分答案
- 2010-01-13
- IBM技术社区2009 Java 专区最受欢迎内容
- U-boot-13.0-rc3 cpu/pxa/start.S 分析
- Java 复习笔记_第3天
- Google is leaving...
- spring集成quartz,出现2次重复调用的问题
- 一个简单的串口过滤驱动及一点体会
- .net程序中资源文件的保护办法探讨