- 博客(8)
- 收藏
- 关注
原创 开始写代码STEP_4
#ifndef _DECLARATION_H#define _DECLARATION_H#include "Vector.h"#include stdio.h>#include "Stmt.h"#include "Port.h"typedef struct Declaration_t CDeclaration;typedef struct Declaration_VMT...{
2007-09-29 11:24:00 860
原创 开始写代码STEP_3
#ifndef STMT__H_#define STMT__H_#include stdio.h>#include "Vector.h"#include "Expression.h"#include "CodeRepo.h"typedef struct Stmt_t CStmt;typedef struct Stmt_VMT...{ void(*generate)(CStmt*, FIL
2007-09-28 17:04:00 769
原创 开始写代码 STEP_2
#include "PrimaryExpression.h"static const CPrimaryExpression_VMT vmt = ...{ CPrimaryExpression_Generate };void CPrimaryExpression_Initialize(CPrimaryExpression* this)...{ CExpression_Initialize(
2007-09-27 13:55:00 835
原创 开始写代码,STEP_1
#include "Vector.h"void Vector_Initialize(Vector* this)...{ this->count = 0;}void add(Vector* this, void* obj)...{ this->obj[this->count] = obj; this->count++;}int size(Vector* this)...{
2007-09-21 15:11:00 892
转载 zheng zhe biao da shi
引言 正则表达式(regular expression)描述了一种字符串匹配的模式,可以用来:(1)检查一个串中是否含有符合某个规则的子串,并且可以得到这个子串;(2)根据匹配规则对字符串进行灵活的替换操作。 正则表达式学习起来其实是很简单的,不多的几个较为抽象的概念也很容易理解。之所以很多人感觉正则表达式比较复杂,一方面是因为大多数的文档没有做到由浅入深地讲解,概念上没有注意先
2007-09-19 16:28:00 985
原创 解释器的代码....
这个是书上的例子, %{#include #include #define STRSIZE 64#include "y.tab.h"#include "intall.h"extern void lexerror();int strcnt = 0;char string[STRSIZE + 1] ={0};%}%start STR1 COMM%%"+" {return(ADD
2007-09-19 14:38:00 983
原创 的功能扩张....
%{#include stdlib.h>#include "entint.tab.h"extern long yylval;%}D [0-9]N [1-9]O [0-7]H [0-9a-fA-F]%%"+" {return(ADDOP);}"-" {return(SUBOP);}"*"
2007-09-14 18:33:00 954
原创 ycaa的计算器,开始写ACTION
主函数 #include "memory.h"int yyparse();main()...{#if YYDEBUG extern int yydebug; yydebug = 1;#endif init_memory(); yyparse(); clean_memory(); } 控制内存 #include "memory.h"#include s
2007-09-12 11:13:00 1038
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人