summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Spranger <b.spranger@pengutronix.de>2004-09-30 20:22:47 +0000
committerBenedikt Spranger <b.spranger@pengutronix.de>2004-09-30 20:22:47 +0000
commitc8a9db69f974cbb52fac20c57cb8b00d9af40c17 (patch)
treec72e9fd901b8344cabde1be74827d8f242ea69a2
parentd2f4d8bac53d8e5bb9818f32132c58ea403743b7 (diff)
downloadmemedit-c8a9db69f974cbb52fac20c57cb8b00d9af40c17.tar.gz
memedit-c8a9db69f974cbb52fac20c57cb8b00d9af40c17.tar.xz
BSP: typo in dir fixed / yet another trip by train...
-rw-r--r--Makefile.am11
-rwxr-xr-xbootstrap2
-rw-r--r--config.h.in59
-rw-r--r--configure.ac2
-rw-r--r--fpgaedit.l91
-rw-r--r--fpgaedit.y106
-rw-r--r--y.output712
-rw-r--r--y.tab.h90
8 files changed, 177 insertions, 896 deletions
diff --git a/Makefile.am b/Makefile.am
index 756e4f3..67fbe4a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,8 @@
bin_PROGRAMS = fpgaedit
-fpgaedit_SOURCES = fpgaedit.c fpgaedit_parser.c fpgaedit_parser.h \
- y.tab.c y.tab.h lex.yy.c
+fpgaedit_SOURCES = fpgaedit_parser.c fpgaedit_parser.h \
+ y.tab.c y.tab.h lex.yy.c fpgaedit.c
+
+fpgaedit_CFLAGS = -W -Wall
# only needed to recompile the commandlineparser
fpgaedit_parser.c fpgaedit_parser.h: fpgaedit_parser.gp
@@ -12,10 +14,11 @@ y.tab.c y.tab.h: fpgaedit.y
lex.yy.c: fpgaedit.l
$(LEX) $<
+DISTCLEANFILES = *~ y.output y.tab.c y.tab.h lex.yy.c
+
MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub \
configure depcomp install-sh ltmain.sh \
Makefile.in missing fpgaedit_parser.c \
- fpgaedit_parser.h fpgaedit.tab.c fpgaedit.tab.h \
- lex.yy.c
+ fpgaedit_parser.h fpgaedit*.tar.gz config.h.in
EXTRA_DIST = bootstrap fpgaedit_parser.gp fpgaedit.l fpgaedit.y
diff --git a/bootstrap b/bootstrap
index 0bde4c6..ef0ed84 100755
--- a/bootstrap
+++ b/bootstrap
@@ -18,7 +18,7 @@ $AUTOMAKE --version | \
'{if ($1 == PROG) {gsub ("-.*","",$4); if ($4 < VERS) print PROG" < version "VERS"\nThis may result in errors\n"}}'
libtoolize --copy && \
-$ACLOCAL -I /usr/share/autoconf-archive && \
+$ACLOCAL && \
$AUTOHEADER && \
$AUTOMAKE --gnu --add-missing && \
$AUTOCONF
diff --git a/config.h.in b/config.h.in
deleted file mode 100644
index aaad02c..0000000
--- a/config.h.in
+++ /dev/null
@@ -1,59 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
- `char[]'. */
-#undef YYTEXT_POINTER
diff --git a/configure.ac b/configure.ac
index 63d3d09..466a57e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)
+AC_PREREQ(2.57)
AC_INIT(fpgaedit, 0.1, b.spranger@pengutronix.de)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([fpgaedit.c])
diff --git a/fpgaedit.l b/fpgaedit.l
index ba7054f..5006ac3 100644
--- a/fpgaedit.l
+++ b/fpgaedit.l
@@ -5,11 +5,14 @@
%option noyywrap
%option pointer
%option nodefault
+%option case-insensitive
%{
/* need this for the call to atol() below */
#include <math.h>
#include "y.tab.h"
+
+extern int debug;
%}
DIGIT [0-9]
@@ -23,6 +26,7 @@ q |
x |
exit |
quit {
+ if (debug > 4) printf ("EXIT\n");
return EXIT;
}
@@ -34,69 +38,126 @@ m[dm](\.[biw])* {
case 'w': yylval.val = 2; break;
}
- if (*(yytext + 1) == 'd') return MD;
- else return MM;
+ if (*(yytext + 1) == 'd') {
+ if (debug > 4) printf ("MD %ld-bit\n",yylval.val*8);
+ return MD;
+ }
+ else {
+ if (debug > 4) printf ("MM %ld-bit\n",yylval.val*8);
+ return MM;
+ }
}
\+ |
-add return ADD;
+add {
+ if (debug > 4) printf ("ADD\n");
+ return ADD;
+}
\- |
-sub return SUB;
+sub {
+ if (debug > 4) printf ("SUB\n");
+ return SUB;
+}
\* |
-mul return MUL;
+mul {
+ if (debug > 4) printf ("MUL\n");
+ return MUL;
+}
\/ |
-div return DIV;
+div {
+ if (debug > 4) printf ("DIV\n");
+ return DIV;
+}
\>\> |
-rshift return RSHIFT;
+rshift {
+ if (debug > 4) printf ("RSHIFT\n");
+ return RSHIFT;
+}
\<\< |
shift |
-lshift return LSHIFT;
+lshift {
+ if (debug > 4) printf ("LSHIFT\n");
+ return LSHIFT;
+}
-\( return OBRA;
+\( {
+ if (debug > 4) printf ("OBRA\n");
+ return OBRA;
+}
-\) return CBRA;
+\) {
+ if (debug > 4) printf ("CBRA\n");
+ return CBRA;
+}
\% |
-mod return MOD;
+mod {
+ if (debug > 4) printf ("MOD\n");
+ return MOD;
+}
+
+\= |
+eq {
+ if (debug > 4) printf ("EQ\n");
+ return EQ;
+}
o |
-open return OPEN;
+open {
+ if (debug > 4) printf ("\n");
+ return OPEN;
+}
+
c |
-close return CLOSE;
+close {
+ if (debug > 4) printf ("\n");
+ return CLOSE;
+}
{ID} {
- yylval.tptr = yytext;
+ yylval.tptr = malloc(sizeof(yytext));
+ if (yylval.tptr) strcpy(yylval.tptr, yytext);
+ else printf ("no mem in %s", __FUNCTION__);
+ if (debug > 4) printf ("ID: >%s<\n", yytext);
return NAME;
}
{DIGIT}+ {
yylval.val = atol(yytext);
+ if (debug > 4) printf ("DIGIT: %s (%ld)\n", yytext, yylval.val);
return NUM;
}
0x{HEX}+ {
yylval.val = strtol(yytext + 2, (char **)NULL, 16);
+ if (debug > 4) printf ("HEX: %s (%ld)\n", yytext, yylval.val);
return NUM;
}
0o{OCT}+ {
yylval.val = strtol(yytext + 2, (char **)NULL, 8);
+ if (debug > 4) printf ("OCT: %s (%ld)\n", yytext, yylval.val);
return NUM;
}
0b{BIN}+ {
yylval.val = strtol(yytext + 2, (char **)NULL, 2);
+ if (debug > 4) printf ("BIN: %s (%ld)\n", yytext, yylval.val);
return NUM;
}
\n {
+ if (debug > 4) printf ("CR\n");
return CR;
}
-. /* eat up any unmatched character */
+. {
+ /* eat up any unmatched character */
+ if (debug > 4) printf ("unmatched: 0x%02x\n", *yytext);
+}
%%
diff --git a/fpgaedit.y b/fpgaedit.y
index c4b98d5..704fc31 100644
--- a/fpgaedit.y
+++ b/fpgaedit.y
@@ -9,9 +9,22 @@
extern int errno;
FILE *fhan = NULL;
+typedef struct variable {
+ struct variable *next;
+ char *name;
+ int val;
+} variable;
+
int linelen = 16;
int write_len;
+int debug = 0;
+variable *vlist;
+
+void set_variable (char *param, int val);
+int get_variable (char *param);
void hex_output (int offset, int len, int count);
+extern void yyerror (const char *s);
+extern int yylex (void);
%}
%union {
@@ -35,6 +48,7 @@ char *tptr;
%left <val> CLOSE
%left <val> MD
%left <val> MM
+%left <val> EQ
%left <val> EXIT
%left <val> CR
@@ -50,8 +64,9 @@ line: CR
| open CR
| close CR
| EXIT CR { exit(EXIT_SUCCESS); }
- | NAME CR { printf ("falsche Eingabe: >%s<\n", $1); }
+ | NAME CR { printf ("%s = %d\n", $1, get_variable($1)); free($1); }
| mem CR
+ | NAME EQ num CR { set_variable ($1, $3); free($1); }
| error
;
@@ -61,6 +76,7 @@ open: OPEN { printf ("open <filename>\n"); }
fhan = fopen($2, "r+");
if (!fhan)
printf ("open >%s< failed\n%s\n", $2, strerror(errno));
+ free ($2);
}
;
@@ -81,7 +97,8 @@ mem: MD {
| mm exp
;
-mm: MM { write_len = $1; }
+mm: MM { write_len = $1; if (debug > 3) printf ("write_len = %d\n", write_len);}
+;
exp: num {
if (fhan) {
@@ -89,12 +106,14 @@ exp: num {
printf ("set offset %ld failed\n", $1);
}
else printf ("please open file\n");
+ if (debug > 3) printf ("offset = 0x%0lx\n", $1);
}
| exp num {
unsigned int c;
c = $2;
- c %= 1 << write_len*8;
+ c %= 1 << (write_len*8);
+ if (debug > 3) printf ("c = 0x%0x\n", c);
if (fhan) {
switch (write_len) {
@@ -104,27 +123,84 @@ exp: num {
}
fflush (fhan);
}
+ else if (debug > 3) printf ("fhan == NULL\n");
}
;
num: NUM
- | num ADD num { $$ = $1 + $3; }
- | num SUB num { $$ = $1 - $3; }
- | num MUL num { $$ = $1 * $3; }
- | num DIV num { $$ = $1 / $3; }
- | num MOD num { $$ = $1 % $3; }
- | num RSHIFT num { $$ = $1 >> $3; }
- | num LSHIFT num { $$ = $1 << $3; }
- | OBRA num CBRA { $$ = $2; }
- | SUB num %prec NEG { $$ = - $2; }
+ | num ADD num { $$ = $1 + $3; if (debug > 3) printf ("ADD: %ld\n", $$); }
+ | num SUB num { $$ = $1 - $3; if (debug > 3) printf ("SUB: %ld\n", $$); }
+ | num MUL num { $$ = $1 * $3; if (debug > 3) printf ("MUL: %ld\n", $$); }
+ | num DIV num { $$ = $1 / $3; if (debug > 3) printf ("DIV: %ld\n", $$); }
+ | num MOD num { $$ = $1 % $3; if (debug > 3) printf ("MOD: %ld\n", $$); }
+ | num RSHIFT num { $$ = $1 >> $3; if (debug > 3) printf ("RSHIFT: %ld\n", $$); }
+ | num LSHIFT num { $$ = $1 << $3; if (debug > 3) printf ("LSHIFT: %ld\n", $$); }
+ | OBRA num CBRA { $$ = $2; if (debug > 3) printf ("BRA: %ld\n", $$); }
+ | NAME { $$ = get_variable ($1); if (debug > 3) printf ("VAR: %ld\n", $$); free($1); }
+;
%%
+void set_variable (char *param, int val) {
+ variable *l, *tmp;
+
+ if (strncmp (param, "debug", 5) == 0) {
+ debug = val;
+ printf ("debug = %d\n", debug);
+ return;
+ }
+
+ if (debug > 3) printf ("param = >%s<\n", param);
+
+ for (l = vlist; l; l = l->next) {
+ if (debug > 3) printf ("l->name = >%s<\n", l->name);
+ if (strcmp (l->name, param) == 0) {
+ l->val = val;
+ return;
+ }
+ }
+
+ tmp = calloc (1, sizeof(variable));
+ if (!tmp) {
+ printf ("no mem for variable %s!\n", param);
+ return;
+ }
+
+ tmp->name = calloc(1 + strlen(param), sizeof(char));
+ if (!tmp->name) {
+ printf ("no mem for variable %s!\n", param);
+ free(tmp);
+ return;
+ }
+ strcpy(tmp->name, param);
+ tmp->val = val;
+ tmp->next = vlist;
+
+ vlist = tmp;
+}
+
+int get_variable (char *param) {
+ int v = 0;
+ variable *l;
+
+ if (debug > 3) printf ("param = >%s<\n", param);
+
+ for (l = vlist; l; l = l->next) {
+ if (debug > 3) printf ("l->name = >%s<\n", l->name);
+ if (strcmp (l->name, param) == 0) {
+ v = l->val;
+ break;
+ }
+ }
+ return v;
+}
+
void hex_output (int offset, int len, int count) {
if (fhan) {
if (fseek (fhan, offset, SEEK_SET) == -1)
- printf ("set offset %ld failed\n", offset);
+ printf ("set offset %d failed\n", offset);
else {
- unsigned int c, i, t;
+ unsigned int c;
+ int i, t;
for (t = 0; t <= count; t++) {
printf ("0x%08x ", offset + t*linelen);
@@ -160,4 +236,6 @@ void hex_output (int offset, int len, int count) {
}
}
else printf ("please open file\n");
+
+ return;
} \ No newline at end of file
diff --git a/y.output b/y.output
deleted file mode 100644
index bf59bf4..0000000
--- a/y.output
+++ /dev/null
@@ -1,712 +0,0 @@
-Zustand 27 Konflikte: 1 Schiebe/Reduziere
-Zustand 38 Konflikte: 1 Schiebe/Reduziere
-Zustand 42 Konflikte: 5 Schiebe/Reduziere, 3 Reduziere/Reduziere
-
-
-Grammatik
-
- 0 $accept: input $end
-
- 1 input: /* leer */
- 2 | input line
-
- 3 line: CR
- 4 | open CR
- 5 | close CR
- 6 | EXIT CR
- 7 | NAME CR
- 8 | mem CR
- 9 | error
-
- 10 open: OPEN
- 11 | OPEN NAME
-
- 12 close: CLOSE
-
- 13 mem: MD
- 14 | MD num
- 15 | MD num num
- 16 | MM
- 17 | mm exp
-
- 18 mm: MM
-
- 19 exp: num
- 20 | exp num
-
- 21 num: NUM
- 22 | num ADD num
- 23 | num SUB num
- 24 | num MUL num
- 25 | num DIV num
- 26 | num MOD num
- 27 | num RSHIFT num
- 28 | num LSHIFT num
- 29 | OBRA num CBRA
- 30 | SUB num
-
-
-Terminale und die Regeln, in denen sie verwendet werden
-
-$end (0) 0
-error (256) 9
-NUM (258) 21
-ADD (259) 22
-SUB (260) 23 30
-MUL (261) 24
-DIV (262) 25
-NEG (263)
-MOD (264) 26
-RSHIFT (265) 27
-LSHIFT (266) 28
-OBRA (267) 29
-CBRA (268) 29
-NAME (269) 7 11
-OPEN (270) 10 11
-CLOSE (271) 12
-MD (272) 13 14 15
-MM (273) 16 18
-EXIT (274) 6
-CR (275) 3 4 5 6 7 8
-
-
-Nicht-Terminal und die Regeln, in denen sie verwendet werden
-
-$accept (21)
- auf der linken Seite: 0
-input (22)
- auf der linken Seite: 1 2, auf der rechten Seite: 0 2
-line (23)
- auf der linken Seite: 3 4 5 6 7 8 9, auf der rechten Seite: 2
-open (24)
- auf der linken Seite: 10 11, auf der rechten Seite: 4
-close (25)
- auf der linken Seite: 12, auf der rechten Seite: 5
-mem (26)
- auf der linken Seite: 13 14 15 16 17, auf der rechten Seite: 8
-mm (27)
- auf der linken Seite: 18, auf der rechten Seite: 17
-exp (28)
- auf der linken Seite: 19 20, auf der rechten Seite: 17 20
-num (29)
- auf der linken Seite: 21 22 23 24 25 26 27 28 29 30,
- auf der rechten Seite: 14 15 19 20 22 23 24 25 26 27 28 29 30
-
-
-Zustand 0
-
- 0 $accept: . input $end
-
- $default reduziere mit Regel 1 (input)
-
- input gehe zu Zustand 1 über
-
-
-Zustand 1
-
- 0 $accept: input . $end
- 2 input: input . line
-
- $end schiebe und gehe zu Zustand 2 über
- error schiebe und gehe zu Zustand 3 über
- NAME schiebe und gehe zu Zustand 4 über
- OPEN schiebe und gehe zu Zustand 5 über
- CLOSE schiebe und gehe zu Zustand 6 über
- MD schiebe und gehe zu Zustand 7 über
- MM schiebe und gehe zu Zustand 8 über
- EXIT schiebe und gehe zu Zustand 9 über
- CR schiebe und gehe zu Zustand 10 über
-
- line gehe zu Zustand 11 über
- open gehe zu Zustand 12 über
- close gehe zu Zustand 13 über
- mem gehe zu Zustand 14 über
- mm gehe zu Zustand 15 über
-
-
-Zustand 2
-
- 0 $accept: input $end .
-
- $default annehmen
-
-
-Zustand 3
-
- 9 line: error .
-
- $default reduziere mit Regel 9 (line)
-
-
-Zustand 4
-
- 7 line: NAME . CR
-
- CR schiebe und gehe zu Zustand 16 über
-
-
-Zustand 5
-
- 10 open: OPEN .
- 11 | OPEN . NAME
-
- NAME schiebe und gehe zu Zustand 17 über
-
- $default reduziere mit Regel 10 (open)
-
-
-Zustand 6
-
- 12 close: CLOSE .
-
- $default reduziere mit Regel 12 (close)
-
-
-Zustand 7
-
- 13 mem: MD .
- 14 | MD . num
- 15 | MD . num num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- $default reduziere mit Regel 13 (mem)
-
- num gehe zu Zustand 21 über
-
-
-Zustand 8
-
- 16 mem: MM .
- 18 mm: MM .
-
- CR reduziere mit Regel 16 (mem)
- $default reduziere mit Regel 18 (mm)
-
-
-Zustand 9
-
- 6 line: EXIT . CR
-
- CR schiebe und gehe zu Zustand 22 über
-
-
-Zustand 10
-
- 3 line: CR .
-
- $default reduziere mit Regel 3 (line)
-
-
-Zustand 11
-
- 2 input: input line .
-
- $default reduziere mit Regel 2 (input)
-
-
-Zustand 12
-
- 4 line: open . CR
-
- CR schiebe und gehe zu Zustand 23 über
-
-
-Zustand 13
-
- 5 line: close . CR
-
- CR schiebe und gehe zu Zustand 24 über
-
-
-Zustand 14
-
- 8 line: mem . CR
-
- CR schiebe und gehe zu Zustand 25 über
-
-
-Zustand 15
-
- 17 mem: mm . exp
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- exp gehe zu Zustand 26 über
- num gehe zu Zustand 27 über
-
-
-Zustand 16
-
- 7 line: NAME CR .
-
- $default reduziere mit Regel 7 (line)
-
-
-Zustand 17
-
- 11 open: OPEN NAME .
-
- $default reduziere mit Regel 11 (open)
-
-
-Zustand 18
-
- 21 num: NUM .
-
- $default reduziere mit Regel 21 (num)
-
-
-Zustand 19
-
- 30 num: SUB . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 28 über
-
-
-Zustand 20
-
- 29 num: OBRA . num CBRA
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 29 über
-
-
-Zustand 21
-
- 14 mem: MD num .
- 15 | MD num . num
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- NUM schiebe und gehe zu Zustand 18 über
- ADD schiebe und gehe zu Zustand 30 über
- SUB schiebe und gehe zu Zustand 31 über
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- $default reduziere mit Regel 14 (mem)
-
- num gehe zu Zustand 37 über
-
-
-Zustand 22
-
- 6 line: EXIT CR .
-
- $default reduziere mit Regel 6 (line)
-
-
-Zustand 23
-
- 4 line: open CR .
-
- $default reduziere mit Regel 4 (line)
-
-
-Zustand 24
-
- 5 line: close CR .
-
- $default reduziere mit Regel 5 (line)
-
-
-Zustand 25
-
- 8 line: mem CR .
-
- $default reduziere mit Regel 8 (line)
-
-
-Zustand 26
-
- 17 mem: mm exp .
- 20 exp: exp . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- $default reduziere mit Regel 17 (mem)
-
- num gehe zu Zustand 38 über
-
-
-Zustand 27
-
- 19 exp: num .
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- ADD schiebe und gehe zu Zustand 30 über
- SUB schiebe und gehe zu Zustand 39 über
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- SUB [reduziere mit Regel 19 (exp)]
- $default reduziere mit Regel 19 (exp)
-
-
-Zustand 28
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
- 30 | SUB num .
-
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 30 (num)
-
-
-Zustand 29
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
- 29 | OBRA num . CBRA
-
- ADD schiebe und gehe zu Zustand 30 über
- SUB schiebe und gehe zu Zustand 39 über
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
- CBRA schiebe und gehe zu Zustand 40 über
-
-
-Zustand 30
-
- 22 num: num ADD . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 41 über
-
-
-Zustand 31
-
- 23 num: num SUB . num
- 30 | SUB . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 42 über
-
-
-Zustand 32
-
- 24 num: num MUL . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 43 über
-
-
-Zustand 33
-
- 25 num: num DIV . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 44 über
-
-
-Zustand 34
-
- 26 num: num MOD . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 45 über
-
-
-Zustand 35
-
- 27 num: num RSHIFT . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 46 über
-
-
-Zustand 36
-
- 28 num: num LSHIFT . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 47 über
-
-
-Zustand 37
-
- 15 mem: MD num num .
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- ADD schiebe und gehe zu Zustand 30 über
- SUB schiebe und gehe zu Zustand 39 über
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 15 (mem)
-
-
-Zustand 38
-
- 20 exp: exp num .
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- ADD schiebe und gehe zu Zustand 30 über
- SUB schiebe und gehe zu Zustand 39 über
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- SUB [reduziere mit Regel 20 (exp)]
- $default reduziere mit Regel 20 (exp)
-
-
-Zustand 39
-
- 23 num: num SUB . num
-
- NUM schiebe und gehe zu Zustand 18 über
- SUB schiebe und gehe zu Zustand 19 über
- OBRA schiebe und gehe zu Zustand 20 über
-
- num gehe zu Zustand 48 über
-
-
-Zustand 40
-
- 29 num: OBRA num CBRA .
-
- $default reduziere mit Regel 29 (num)
-
-
-Zustand 41
-
- 22 num: num . ADD num
- 22 | num ADD num .
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- SUB schiebe und gehe zu Zustand 39 über
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 22 (num)
-
-
-Zustand 42
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 23 | num SUB num .
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
- 30 | SUB num .
-
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- ADD reduziere mit Regel 23 (num)
- ADD [reduziere mit Regel 30 (num)]
- SUB reduziere mit Regel 23 (num)
- SUB [reduziere mit Regel 30 (num)]
- MUL [reduziere mit Regel 30 (num)]
- DIV [reduziere mit Regel 30 (num)]
- MOD [reduziere mit Regel 30 (num)]
- RSHIFT [reduziere mit Regel 30 (num)]
- LSHIFT [reduziere mit Regel 30 (num)]
- CR reduziere mit Regel 23 (num)
- CR [reduziere mit Regel 30 (num)]
- $default reduziere mit Regel 23 (num)
-
-
-Zustand 43
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 24 | num MUL num .
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 24 (num)
-
-
-Zustand 44
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 25 | num DIV num .
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 25 (num)
-
-
-Zustand 45
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 26 | num MOD num .
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 26 (num)
-
-
-Zustand 46
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 27 | num RSHIFT num .
- 28 | num . LSHIFT num
-
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 27 (num)
-
-
-Zustand 47
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
- 28 | num LSHIFT num .
-
- $default reduziere mit Regel 28 (num)
-
-
-Zustand 48
-
- 22 num: num . ADD num
- 23 | num . SUB num
- 23 | num SUB num .
- 24 | num . MUL num
- 25 | num . DIV num
- 26 | num . MOD num
- 27 | num . RSHIFT num
- 28 | num . LSHIFT num
-
- MUL schiebe und gehe zu Zustand 32 über
- DIV schiebe und gehe zu Zustand 33 über
- MOD schiebe und gehe zu Zustand 34 über
- RSHIFT schiebe und gehe zu Zustand 35 über
- LSHIFT schiebe und gehe zu Zustand 36 über
-
- $default reduziere mit Regel 23 (num)
diff --git a/y.tab.h b/y.tab.h
deleted file mode 100644
index f40adae..0000000
--- a/y.tab.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* A Bison parser, made by GNU Bison 1.875a. */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- NUM = 258,
- ADD = 259,
- SUB = 260,
- MUL = 261,
- DIV = 262,
- NEG = 263,
- MOD = 264,
- RSHIFT = 265,
- LSHIFT = 266,
- OBRA = 267,
- CBRA = 268,
- NAME = 269,
- OPEN = 270,
- CLOSE = 271,
- MD = 272,
- MM = 273,
- EXIT = 274,
- CR = 275
- };
-#endif
-#define NUM 258
-#define ADD 259
-#define SUB 260
-#define MUL 261
-#define DIV 262
-#define NEG 263
-#define MOD 264
-#define RSHIFT 265
-#define LSHIFT 266
-#define OBRA 267
-#define CBRA 268
-#define NAME 269
-#define OPEN 270
-#define CLOSE 271
-#define MD 272
-#define MM 273
-#define EXIT 274
-#define CR 275
-
-
-
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 17 "fpgaedit.y"
-typedef union YYSTYPE {
-long val;
-char *tptr;
-} YYSTYPE;
-/* Line 1240 of yacc.c. */
-#line 82 "y.tab.h"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE yylval;
-
-
-