-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpda.h
More file actions
33 lines (26 loc) · 752 Bytes
/
pda.h
File metadata and controls
33 lines (26 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* Louis Cahyadi
Version : 14 - 11 -2018
*/
#ifndef pda_H
#define pda_H
#include <stdio.h>
#include <string.h>
#include "stackchar.h"
#include "boolean.h"
typedef char masukan[100];
//tipe data inputan (string)
typedef struct {
int Posisi;
Stack S;
} State;
//Tipe data bentukan state pada PushDown Automata
//Terdiri dari nomor state dan stack
//Manipulasi stack dapat dilihat di stackt.h dan stackt.c
//Selektor
#define Posisi(Q) (Q).Posisi
#define Stack(Q) (Q).S
void transisi (State *Q, char input);
//Merubah kondisi state Q (nomor dan stack) jika menerima masukan input
boolean validasi (masukan s);
//Mengembalikan true jika input dari user valid dan false jika input dari user tidak valid
#endif