资源简介
利用flex和bison语言实现科学计算器,可以进行加减乘除、模运算、幂运算、对数运算、阶乘、绝对值、三角函数运算,支持十进制,支持一些清屏、帮助的命令,支持变量储存,可罗列、删除。
可以用的啦!
代码片段和文件信息
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /home/daffy/u0/vern/flex/RCS/flex.sklv 2.91 96/09/10 16:58:48 vern Exp $
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include
/* cfront 1.2 defines “c_plusplus“ instead of “__cplusplus“ */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include
#include
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The “const“ storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include
#include
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative
* we want to instead treat it as an 8-bit unsigned char hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning “start processing a new file“. */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* “else“ because it interpreted the “if“ statement as being all
* done when it reached the ‘;‘ after the yyless() call.
*/
/* Return all but the first ‘n‘ matched characters back to the input stream. */
#defin
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 41076 2014-01-25 17:46 calculator\lex.yy.c
文件 722 2014-01-25 17:07 calculator\test.l
文件 53852 2014-01-25 17:46 calculator\test.tab.c
文件 2544 2014-01-25 17:46 calculator\test.tab.h
文件 3967 2014-01-25 17:46 calculator\test.y
目录 0 2014-01-25 18:29 calculator
----------- --------- ---------- ----- ----
102161 6
- 上一篇:破碎银河PAK文件提取
- 下一篇:利用PWM定时器实现蜂鸣器控制
相关资源
- Qt版科学计算器
- 算术表达式翻译成对应的后缀表达式
- vsflexgrid官方 帮助文档chm
- 标准计算器及科学计算器源代码
- flex bison 简单c结构体解析
- 百度文库 flexpaper_flash.js
- Flexnet_Licesing_Service 服务修复安装文件
- labview科学计算器
- asdoc.zip
- FlexAnalysis软件,可打开MALDI-TOF-MS基质
- 科学计算器声音文件(超全)
- flex导入excel2007版本以上并支持日期格
- flexsim排队系统仿真模型
- wincc flexible用户登录、注销及显示
- wincc_flexible创建脚本的技巧
- 分拣传送带
- flex 注册机 flex注册机
- flex破解教程
- AMF抓取flex页面数据
- flexitimer2库
- flexsim仿真模型
- Flexsim快餐店仿真案列
- 在VS2010上用FluorineFX和Flex4开发项目(
- Flex 写的一个combox多选控件
- flexgrid最新版+
- 自动化立体仓库仿真
- Flex利用as3xls导入excel数据表
- flex与Bison小手册包含一个编译器的实
- bison官方文档
- flexslider轮播实现源码
评论
共有 条评论