You can use the ParserWizard command from the Project menu to help you create initial YACC and Lex skeleton source files.
如果需要生成初始的YACC & Lex骨架源文件,可以在系统菜单中,选取Project->ParserWizard。

Use the Parser Generator Registration command from the Tools menu to register your copy of Parser Generator at the appropriate time.
如果需要注册软件,可以在系统菜单中,选取Tools->Parser Generator Registration。

AYACC and ALex are suited for integration into the Visual C++ development environment.  In particular the error messages generated by the two tools are compatible with those recognised by Visual C++.  This means that error mapping from the Output window to the relevant YACC or Lex source file can take place.
AYACC和ALex适合集成到VC++开发环境里面。这两个工具生成的错误信息(error message)是VC++兼容的。
这意味着可以根据VC的输出窗口(output window)里面的错误信息追溯到对应的YACC或Lex源文件。

AYACC and ALex both generate verbose files (.v extension).  These show exactly how the generated parser and lexical analyser will behave in any given circumstances.  If you not sure that your parser or lexical analyser is working correctly, then it is a good idea to look at these at some point.
AYACC和Alex都生成.v文件(verbose)。 这些verbose文件精确地显示了parser和lexical analyser在特定环境中的行为。
如果你无法确定一个语法分析器(parser)或词法分析器(lexical analyser)能否正常工作,有个好主意是先检查verbose文件。

If you are generating multiple model C or C++ and Java parsers and lexical analysers then you will need to give the parser or lexical analyser a name.  This can be done with a Name declaration.  This is introduced with the %name keyword and has a trailing identifier.  For example, %name myparser.
如果生成了多个C/C++/Java语法分析器(Parser)和词法分析器(lexical analyser),那么必须要给它们起个名字。
声明一个变量即可:关键字是%name,后面跟一个标识符。例如:%name myparser。

You can place code in AYACC and ALex generated include files by using an Include Declaration.  These are introduced with the %include keyword and have a trailing declaration code block {...}.  For example, %include { /* a comment */ }.
你可以将需要的代码放入AYACC和ALex生成的include文件中。
关键字是%include,后面跟一个代码块。
例如:%include { /* a comment */ }.

You can now associate destructor actions with symbols in YACC source files.  These will be called whenever the symbol is popped off of the stack, or the lookahead token is discarded, during error recovery.  This is particular handy if the symbol contains allocated memory which would otherwise be lost.
你可以在YACC源文件中将符号(symbol)与析构动作(destructor action)关联起来。
当错误恢复时,这个symbol会被弹出栈顶,或前瞻令牌(lookahead token)被抛弃;此时会执行对应的destructor action。
当某个symbol包含分配内存(new byte[])的动作时,关联析构动作至为方便(这样可以在析构时delete[]内存)。
否则那部分内存就被丢失了。

It is possible for the lexical analyser to get input from elsewhere other than the yyin stream. In order to do this you need to redefine the yygetchar function in your Lex source file.  Note that this applies to single model C lexical analysers, although it is similar for other types as well (yygetchar member for C++ etc).
对一个词法分析器(lexical analyser)而言,除了yyin流,还可以有其它方式获得输入(input)。
如何做到?只需要在lex源文件中,重定义yygetchar函数。

You can change characters in a regular expression to equivalent characters in another code page by using the Code Page Statement.  This has a number of different forms such as: %codepage_ansi, %codepage_oem, %codepage_ascii and %codepage n, where n specifies the code page i.e. 932.
用Code Page语句,可以将某个正则表达式中的字符,改变为另一个代码页(codepage)的同等字符。
这包括一系列语句,比如
%codepage_ansi,
%codepage_oem,
%codepage_ascii,
%codepage n(n代表特定的代码页,比如932)

You can disable and enable trailing break statement generation in Lex actions by using an Action Terminator Statement.  The %break keyword specifies that break statements will be generated and the %return statement specifies that they wont.  This is particularly useful when generating Java code.
使用Action Terminator Statement,可以enable或disable 尾部break语句。关键字%break规定,一定会生成break语句,而%return规定一定不会。 这在生成Java代码的时候特别有用。
(这里翻译得很难懂,原因是我不懂这一块的技术。等我了解多一些知识再来修改)

转载于:https://www.cnblogs.com/presbyter/p/10358166.html

Parser Generator Tips翻译(中英对译) by Joshua Xu相关推荐

  1. IntelliJ IDEA/Android Studio 翻译插件,可中英互译。

    TranslationPlugin 项目地址:YiiGuxing/TranslationPlugin 简介:IntelliJ IDEA/Android Studio 翻译插件,可中英互译.    In ...

  2. 中英互译在线翻译官方版

    中英互译在线翻译 v6.2.5 官方版 软件大小:26.9MB 软件语言:简体中文 软件类别:转换翻译 软件授权:官方版 更新时间:2015-01-05 应用平台:/Win8/Win7/WinXP 中 ...

  3. 非常简单的中英互译在线翻译操作方法

    非常简单的中英互译在线翻译操作方法?无论在工作中还是生活中,我们总能遇到各种翻译问题,尤其是中英文翻译,但是很多人的英文都不好,比如小编.那么如何快捷而又专业的完成中英互译呢?如果你不知道这个问题该如 ...

  4. 产品说明书翻译,中英互译的翻译机构

    我们知道,产品说明书是用户快速了解产品性能的一个直接途径,也是帮助用户初次使用产品的指导书.在进出口贸易中,几乎所有产品涉及说明书翻译的问题.那么,如何做好产品说明书翻译,产品说明书中英互译,北京哪个 ...

  5. 剪映PC版英文字幕翻译最新方法(中英互译)

    原文地址 剪映PC版英文字幕翻译最新方法(中英互译) – 方包博客 – java|python|前端开发|运维|电商|ui设计剪映PC版英文字幕翻译最新方法(中英互译)https://www.fang ...

  6. woocommerce产品选项描述修改_简历修改服务:中文修改、英文修改、中英互译、简历定制,名师一对一指导修改!...

    简历,是你接触 HR 的第一步 如果你无法通过简历敲开大门 你面试能力再强,综合素质再高,都无用! 做了那么多网申,投了那么多简历.都是是石沉大海,渺无音讯.你就不想想,是简历有问题吗? 简历是找实习 ...

  7. 中英互译软件测试计划

    中英互译软件测试计划 1.引言 1.1   编写目的 测试软件的中英互译能力,通过给出中文单独的字,句,英文的单独单词,句子以及中英混合,查看翻译结果来确定软件的实用性和准确度. 1.2   项目背景 ...

  8. 中英互译软件工程设计

    中英互译软件工程设计 引言部分 1.1 目的 该文档的目的是描述中英互译软件工程系统的概要设计,主要内容包括系统功能简介.系统结构设计.系统接口设计.模块设计和界面设计等. 本文档预期的读者包括设计人 ...

  9. 中英互译软件工程初步设计

    中英互译软件工程初步设计 引言部分 1.1 目的 该文档的目的是描述中英互译软件工程系统的概要设计,主要内容包括系统功能简介.系统结构设计.系统接口设计.模块设计和界面设计等. 本文档预期的读者包括设 ...

最新文章

  1. 【 FPGA 】Xilinx FPGA器件命名意义?
  2. 实战项目---模拟商品采购中心信息平台
  3. logstash 利用drop 丢弃过滤日志
  4. spyder matlab,将pycharm配置为matlab或者spyder的用法说明
  5. VS2008非托管c++访问webservice服务(以WeatherWS 天气服务 为例)
  6. [转帖]Mootools源码分析-02 -- Utils
  7. http://www.cnoug.org/viewthread.php?tid=9292
  8. 练习1.account表 添加一条记录
  9. CentOS 7部署nfsen监控netflow
  10. Cocos2d-x 3.0 开发(四)使用CocoStudio创建UI并载入到程序中
  11. opencv学习之------在算法设计中使用策略模式
  12. 模板方法 (宝,我输液了,输的想你的夜)
  13. 图·思·腾·想·宗教符号
  14. win10计算机属性管理打不开,win10系统此电脑属性打不开怎么办
  15. 【第七章】 C语言之牛客网力扣刷题笔记 【点进来保证让知识充实你一整天】
  16. 2018年淘宝新店开业怎么引流量
  17. android红外遥控器按键键值,红外遥控实验键值设置
  18. blender绑定骨骼法 2 rig
  19. 导数的四则运算法则_高考考纲与考向分析——导数的概念与计算
  20. TSF(Text Service Framework)简介

热门文章

  1. Java 正则表达式验证小结
  2. 小蚂蚁学习mysql性能优化(4)--SQL以及索引优化--具体一些优化方法
  3. 《Effective Java》读书笔记--创建和销毁对象
  4. UML2.0工具比較
  5. 在Google Cloud Platform上持续部署Node.js
  6. rails 添加外键_如何在Rails后端中添加功能强大的搜索引擎
  7. zabbix简介及基本安装(一)
  8. powershell连接数据库_PowerShell 连接SQL Server 数据库
  9. 1021 Deepest Root
  10. JavaScript面向对象怎样删除标签页?