[C로 쓴 자료구조론] Evaluation of Expression - 7주차
본 자료는 미리보기를 지원하지 않습니다.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
해당 자료는 1페이지 까지만 미리보기를 제공합니다.
1페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

[C로 쓴 자료구조론] Evaluation of Expression - 7주차에 대한 보고서 자료입니다.

목차

7주 - Evaluation of Expression

본문내용

#include
#include
#define MAX_STACK_SIZE 100 // stack의최대크기
#define MAX_EXPR_SIZE 100 // 수식의최대크기

/* 사용될operation */
typedef enum {
lparen, rparen, uplus, uminus, power, times, divide, mod, plus, minus, eos, operand
}precedence;

/* Token(연산자)들이저장될stack */
precedence operatorStack[MAX_STACK_SIZE];
/* precedence 지정*/
int InStackPrecedence[11] = {0,19,18,18,14,13,13,13,12,12,0};
int InComingPrecedence[11] = {20,19,18,18,15,13,13,13,12,12,0};

void getInfix(char infixExpr[]);
void infixToPostfix(char infixExpr[], char postfixExpr[]);
void printPostfix(char postfixExpr[]);
precedence getToken(char *symbol, int *n, char Expr[]);
char printToken(precedence token);
void pushToken(int *top, precedence item);
precedence popToken(int *top);

int evalPostExpression(char Expr[]);
void stackPush(int *top, int item, int stack[]);
int stackPop(int *top, int stack[]);

키워드

infix,   postfix,   Unary operator,   자료구조,   수식,   Evaluation,   C,   stack
  • 가격1,500
  • 페이지수5페이지
  • 등록일2010.05.28
  • 저작시기2008.6
  • 파일형식압축파일(zip)
  • 자료번호#615161
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니