91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5KB
    文件類型: .zip
    金幣: 2
    下載: 1 次
    發布日期: 2021-06-28
  • 語言: C/C++
  • 標簽: YACC??lex??

資源簡介

安裝Parser Generator軟件,熟悉其使用,對講義中簡單表達式計算的Yacc程序進行修改 1.將所有的詞法分析功能均放在yygettoken函數內實現,為+、-、*、\、(、)每個運算符及整數分別定義一個單詞類別,在yygettoken內實現代碼,能識別這些單詞,并將單詞類別返回給詞法分析程序。 2.實現功能更強的詞法分析程序,可識別并忽略空格、制表符、回車等空白符,能識別多位十進制整數。 3.修改Yacc程序,不進行表達式的計算,而是實現中綴表達式到后綴表達式的轉換。 C語言版,包含.y和對應的兩個.h,.c文件,在VS2013上編譯成功。

資源截圖

代碼片段和文件信息

/****************************************************************************
*?????????????????????U?N?R?E?G?I?S?T?E?R?E?D???C?O?P?Y
*?
*?You?are?on?day?8?of?your?30?day?trial?period.
*?
*?This?file?was?produced?by?an?UNREGISTERED?COPY?of?Parser?Generator.?It?is
*?for?evaluation?purposes?only.?If?you?continue?to?use?Parser?Generator?30
*?days?after?installation?then?you?are?required?to?purchase?a?license.?For
*?more?information?see?the?online?help?or?go?to?the?Bumble-Bee?Software
*?homepage?at:
*?
*?http://www.bumblebeesoftware.com
*?
*?This?notice?must?remain?present?in?the?file.?It?cannot?be?removed.
****************************************************************************/

/****************************************************************************
*?myparser.c
*?C?source?file?generated?from?myparser.y.
*?
*?Date:?10/25/16
*?Time:?11:32:28
*?
*?AYACC?Version:?2.07
****************************************************************************/

#include?

/*?namespaces?*/
#if?defined(__cplusplus)?&&?defined(YYSTDCPPLIB)
using?namespace?std;
#endif
#if?defined(__cplusplus)?&&?defined(YYNAMESPACE)
using?namespace?yl;
#endif

#define?YYFASTPARSER

#line?1?“.\\myparser.y“
??
#include?
#include??
#include???

#line?46?“myparser.c“
/*?repeated?because?of?possible?precompiled?header?*/
#include?

/*?namespaces?*/
#if?defined(__cplusplus)?&&?defined(YYSTDCPPLIB)
using?namespace?std;
#endif
#if?defined(__cplusplus)?&&?defined(YYNAMESPACE)
using?namespace?yl;
#endif

#define?YYFASTPARSER

#include?“.\myparser.h“

#ifndef?YYSTYPE
#define?YYSTYPE?int
#endif
#ifndef?YYSTACK_SIZE
#define?YYSTACK_SIZE?100
#endif
#ifndef?YYSTACK_MAX
#define?YYSTACK_MAX?0
#endif

/*?(state)?stack?*/
#if?(YYSTACK_SIZE)?!=?0
static?yystack_t?YYNEAR?yystack[(YYSTACK_SIZE)];
yystack_t?YYFAR?*YYNEAR?YYDCDECL?yysstackptr?=?yystack;
yystack_t?YYFAR?*YYNEAR?YYDCDECL?yystackptr?=?yystack;
#else
yystack_t?YYFAR?*YYNEAR?YYDCDECL?yysstackptr?=?NULL;
yystack_t?YYFAR?*YYNEAR?YYDCDECL?yystackptr?=?NULL;
#endif

/*?attribute?stack?*/
#if?(YYSTACK_SIZE)?!=?0
static?YYSTYPE?YYNEAR?yyattributestack[(YYSTACK_SIZE)];
#ifdef?YYPROTOTYPE
void?YYFAR?*YYNEAR?YYDCDECL?yysattributestackptr?=?yyattributestack;
void?YYFAR?*YYNEAR?YYDCDECL?yyattributestackptr?=?yyattributestack;
#else
char?YYFAR?*YYNEAR?YYDCDECL?yysattributestackptr?=?(char?YYFAR?*)?yyattributestack;
char?YYFAR?*YYNEAR?YYDCDECL?yyattributestackptr?=?(char?YYFAR?*)?yyattributestack;
#endif
#else
#ifdef?YYPROTOTYPE
void?YYFAR?*YYNEAR?YYDCDECL?yysattributestackptr?=?NULL;
void?YYFAR?*YYNEAR?YYDCDECL?yyattributestackptr?=?NULL;
#else
char?YYFAR?*YYNEAR?YYDCDECL?yysattributestackptr?=?NULL;
char?YYFAR?*YYNEAR?YYDCDECL?yyattributestackptr?=?NULL;
#endif
#endif

int?YYNEAR?YYDCDECL?yysstack_size?=?(YYSTACK_SIZE);
int?YYNEAR?YYDCDECL?yystack_size?=?(YYSTACK_SIZE);
int?YYNEAR?YYDCDECL?yystack_max?=?(

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-10-31?21:34??中綴轉后綴\
?????文件?????????726??2016-10-21?12:02??中綴轉后綴\b.pgp
?????文件??????????65??2016-10-31?21:34??中綴轉后綴\b.pgw
?????文件???????14018??2016-10-25?11:32??中綴轉后綴\myparser.c
?????文件????????1205??2016-10-25?11:32??中綴轉后綴\myparser.h
?????文件????????4177??2016-10-25?11:32??中綴轉后綴\myparser.v
?????文件?????????988??2016-10-25?11:32??中綴轉后綴\myparser.y

評論

共有 條評論