Commit 10883ed9 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

--- ChangeLog Thu, 15 Jan 2004 17:46:59 +0100 noe (mipsy/2_ChangeLog 1.64 604)
+++ ChangeLog Thu, 15 Jan 2004 20:46:42 +0100 noe (mipsy/2_ChangeLog 1.64 604)
@@ -1,5 +1,17 @@
 2004-01-15  Benoît Perrot  <benoit@lrde.epita.fr>
 	
+	* dev/doc-inst-set-gen.py,
+	* dev/inst-builder-gen.py,
+	* dev/inst-makefile-gen.py,
+	* dev/inst-nodes-gen.py,
+	* dev/parse-asm-parse-gen.py,
+	* dev/parse-asm-scan-gen.py,
+	* src/parse/Makefile.am,
+	* bootstrap:
+	Use lazy overwrite to limit file building.
+
+2004-01-15  Benoît Perrot  <benoit@lrde.epita.fr>
+	
 	* dev/mipsy.xml: Describe each instruction.
 	* dev/doc-inst-set-gen.py: New file.
 	* Makefile.am: Distribute it.
parent 03597188
2004-01-15 Benot Perrot <benoit@lrde.epita.fr>
* dev/doc-inst-set-gen.py,
* dev/inst-builder-gen.py,
* dev/inst-makefile-gen.py,
* dev/inst-nodes-gen.py,
* dev/parse-asm-parse-gen.py,
* dev/parse-asm-scan-gen.py,
* src/parse/Makefile.am,
* bootstrap:
Use lazy overwrite to limit file building.
2004-01-15 Benot Perrot <benoit@lrde.epita.fr>
* dev/mipsy.xml: Describe each instruction.
......
#!/bin/sh
./dev/inst-makefile-gen.py < ./dev/mipsy.xml > ./src/inst/Makefile.am
cd src/inst && ../../dev/inst-makefile-gen.py < ../../dev/mipsy.xml && cd -
autoreconf -f -v -i -m
......@@ -18,7 +18,7 @@
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
import sys, os
import string, re
import mipsy
......@@ -28,8 +28,7 @@ import mipsy
parser = mipsy.InstructionSetParser()
instructions = parser.parse(sys.stdin)
f = file("inst-set.texi.tmp", "w")
sys.stdout = f
sys.stdout = file("inst-set.texi.tmp", "w")
print """@comment Generated, do not edit by hand.
......@@ -61,7 +60,7 @@ for inst in instructions:
print desc
## Epilogue
f.flush()
f.close()
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("inst-set.texi", "inst-set.texi.tmp")
os.remove("inst-set.texi.tmp")
......@@ -18,16 +18,18 @@
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
import sys, os
import string, re
import mipsy
from mipsy import license, depth, class_id
#### Mipsy's program builder generator ---------------------
parser = mipsy.InstructionSetParser()
instructions = parser.parse(sys.stdin)
#### Mipsy Program builder generator -----------------------
sys.stdout = file("program_builder.hh.tmp", "w")
print license
print """#ifndef INST_PROGRAM_BUILDER_HH
......@@ -155,3 +157,9 @@ print """
} // namespace inst
#endif // !INST_PROGRAM_BUILDER_HH"""
## Epilogue
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("program_builder.hh", "program_builder.hh.tmp")
os.remove("program_builder.hh.tmp")
......@@ -18,19 +18,22 @@
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
import sys, os
import string, re
import mipsy
from mipsy import license, depth
#### Generate Makefile.am of inst --------------------------
#### Mipsy's inst/Makefile.am generator --------------------
parser = mipsy.InstructionSetParser()
instructions = parser.parse(sys.stdin)
sys.stdout = file("Makefile.am.tmp", "w")
print """INCLUDES = -I $(top_srcdir)/src -I $(top_builddir)/src
FROM_MIPSY_INST_GEN_PY = \\"""
FROM_INST_NODES_GEN_PY = \\"""
for i in range(0, len(instructions)):
if instructions[i].level == "native":
line = "\t"
......@@ -43,33 +46,40 @@ print """ decl.hh \\
print """
BUILT_SOURCES = \\
$(FROM_MIPSY_INST_GEN_PY) inst-nodes-gen.log \\
program_builder.hh
$(FROM_INST_NODES_GEN_PY) inst-nodes-gen.log \\
program_builder.hh inst-builder-gen.log
inst-nodes-gen.log: $(top_srcdir)/dev/inst-nodes-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/inst-nodes-gen.py < $(top_srcdir)/dev/mipsy.xml
touch $@
$(FROM_MIPSY_INST_GEN_PY): inst-nodes-gen.log
$(FROM_INST_NODES_GEN_PY): inst-nodes-gen.log
program_builder.hh: $(top_srcdir)/dev/inst-builder-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/inst-builder-gen.py < $(top_srcdir)/dev/mipsy.xml \
> $@
inst-builder-gen.log: $(top_srcdir)/dev/inst-builder-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/inst-builder-gen.py < $(top_srcdir)/dev/mipsy.xml
touch $@
program_builder.hh: inst-builder-gen.log
MAINTAINERCLEANFILES = $(FROM_MIPSY_INST_GEN_PY) program_builder.hh
MAINTAINERCLEANFILES = $(FROM_INST_NODES_GEN_PY) program_builder.hh
noinst_LIBRARIES = libinst.a
libinst_a_SOURCES = \\
$(FROM_MIPSY_INST_GEN_PY) inst-nodes-gen.log \\
register.hh \\
exp.hh \\
exp-visitor.hh \\
inst.hh \\
program.hh \\
label.hh label.cc \\
section.hh \\
text_section.hh \\
data_section.hh \\
program.hh \\
program_builder.hh program_builder.cc \\
program_solver.hh \\
libinst_a_SOURCES = \\
$(FROM_INST_NODES_GEN_PY) inst-nodes-gen.log \\
register.hh \\
exp.hh \\
exp-visitor.hh \\
inst.hh \\
program.hh \\
label.hh label.cc \\
section.hh \\
text_section.hh \\
data_section.hh \\
program.hh \\
program_builder.hh program_builder.cc inst-builder-gen.log \\
program_solver.hh \\
inst-tasks.hh inst-tasks.cc"""
## Epilogue
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("Makefile.am", "Makefile.am.tmp")
os.remove("Makefile.am.tmp")
......@@ -22,6 +22,7 @@ import sys, os
import string
import mipsy
#### Mipsy's instruction classes generator -----------------
## Generate the class corresponding to an instruction
......@@ -214,9 +215,8 @@ for inst in instructions:
if inst.level == "native":
class_generate(inst)
## Generate all-includer
sys.stdout = open("all.hh", "w")
sys.stdout = file("all.hh.tmp", "w")
print mipsy.license
print "#ifndef INST_ALL_HH"
print "# define INST_ALL_HH"
......@@ -224,10 +224,13 @@ for inst in instructions:
if inst.level == "native":
print "# include \"inst/" + inst.opcode + ".hh\""
print "#endif // !INST_ALL_HH"
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("all.hh", "all.hh.tmp")
os.remove("all.hh.tmp")
## Generate all-declarator
sys.stdout = open("decl.hh", "w")
sys.stdout = file("decl.hh.tmp", "w")
print mipsy.license
print "#ifndef INST_DECL_HH"
print "# define INST_DECL_HH"
......@@ -243,10 +246,13 @@ print """
#endif // !INST_DECL_HH
"""
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("decl.hh", "decl.hh.tmp")
os.remove("decl.hh.tmp")
## Generate visitor
sys.stdout = open("visitor.hh", "w")
sys.stdout = file("visitor.hh.tmp", "w")
print mipsy.license
print """#ifndef INST_VISITOR_HH
# define INST_VISITOR_HH
......@@ -281,3 +287,7 @@ print """
} // namespace inst
#endif // !INST_VISITOR_HH"""
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("visitor.hh", "visitor.hh.tmp")
os.remove("visitor.hh.tmp")
......@@ -18,16 +18,19 @@
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
import sys, os
import string, re
import mipsy
from mipsy import license, depth, define_id
#### Mipsy's Bison assembly parser generator ---------------
parser = mipsy.InstructionSetParser()
instructions = parser.parse(sys.stdin)
sys.stdout = file("asm-parse.yy.tmp", "w")
## Prologue --------------------------
print "%{ // -*- C++ -*-"
print license
......@@ -272,3 +275,8 @@ namespace yy
inst::ProgramBuilder program_builder;
}
"""
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("asm-parse.yy", "asm-parse.yy.tmp")
os.remove("asm-parse.yy.tmp")
......@@ -18,16 +18,18 @@
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import sys
import sys, os
import string, re
import mipsy
from mipsy import license, define_id
#### Mipsy's Flex scanner generator --------------------------
parser = mipsy.InstructionSetParser()
instructions = parser.parse(sys.stdin)
#### Mipsy Flex scanner generator --------------------------
sys.stdout = file("asm-scan.ll.tmp", "w")
## Prologue ----------------------------
print "%{ /* -*- C++ -*- */"
......@@ -268,3 +270,8 @@ namespace parse
}
}
"""
sys.stdout.close()
sys.stdout = sys.__stdout__
mipsy.lazy_overwrite("asm-scan.ll", "asm-scan.ll.tmp")
os.remove("asm-scan.ll.tmp")
......@@ -2,33 +2,36 @@
(Created-By-Prcs-Version 1 3 2)
(Project-Description "")
(Project-Version mipsy 0 70)
(Parent-Version mipsy 0 69)
(Project-Version mipsy 0 71)
(Parent-Version mipsy 0 70)
(Version-Log
"Index: ChangeLog
--- ChangeLog Tue, 13 Jan 2004 16:32:51 +0100 noe (mipsy/2_ChangeLog 1.63 604)
+++ ChangeLog Thu, 15 Jan 2004 17:46:19 +0100 noe (mipsy/2_ChangeLog 1.63 604)
@@ -1,3 +1,14 @@
--- ChangeLog Thu, 15 Jan 2004 17:46:59 +0100 noe (mipsy/2_ChangeLog 1.64 604)
+++ ChangeLog Thu, 15 Jan 2004 20:46:42 +0100 noe (mipsy/2_ChangeLog 1.64 604)
@@ -1,5 +1,17 @@
2004-01-15 Benot Perrot <benoit@lrde.epita.fr>
+ * dev/doc-inst-set-gen.py,
+ * dev/inst-builder-gen.py,
+ * dev/inst-makefile-gen.py,
+ * dev/inst-nodes-gen.py,
+ * dev/parse-asm-parse-gen.py,
+ * dev/parse-asm-scan-gen.py,
+ * src/parse/Makefile.am,
+ * bootstrap:
+ Use lazy overwrite to limit file building.
+
+2004-01-15 Benot Perrot <benoit@lrde.epita.fr>
+
+ * dev/mipsy.xml: Describe each instruction.
+ * dev/doc-inst-set-gen.py: New file.
+ * Makefile.am: Distribute it.
+ * doc/Makefile.am,
+ * doc/language.texi,
+ * doc/mipsy.texi:
+ Use doc-inst-set-gen.py and updated mipsy.xml to generate
+ instruction set documentation.
+
2004-01-13 Benot Perrot <benoit@lrde.epita.fr>
* doc/fdl.texi,
* dev/mipsy.xml: Describe each instruction.
* dev/doc-inst-set-gen.py: New file.
* Makefile.am: Distribute it.
")
(New-Version-Log
"")
(Checkin-Time "Thu, 15 Jan 2004 17:46:59 +0100")
(Checkin-Time "Fri, 16 Jan 2004 13:53:12 +0100")
(Checkin-Login noe)
(Files
......@@ -36,12 +39,12 @@
;; ./
(AUTHORS (mipsy/0_AUTHORS 1.1 604))
(COPYING (mipsy/1_COPYING 1.1 604))
(ChangeLog (mipsy/2_ChangeLog 1.64 604))
(ChangeLog (mipsy/2_ChangeLog 1.65 604))
(Makefile.am (mipsy/3_Makefile.a 1.8 604))
(NEWS (mipsy/b/25_NEWS 1.6 604))
(README (mipsy/4_README 1.2 604))
(TODO (mipsy/5_TODO 1.2 604))
(bootstrap (mipsy/b/14_bootstrap 1.2 705))
(bootstrap (mipsy/b/14_bootstrap 1.3 705))
(configure.ac (mipsy/6_configure. 1.7 604))
(prj (mipsy.prj) :symlink)
......@@ -49,14 +52,14 @@
(config/Makefile.am (mipsy/7_Makefile.a 1.1 604))
;; ./dev/
(dev/doc-inst-set-gen.py (mipsy/c/21_doc-inst-s 1.1 705))
(dev/inst-builder-gen.py (mipsy/15_mipsy-buil 1.8 705))
(dev/inst-makefile-gen.py (mipsy/b/15_mipsy-mk-i 1.5 705))
(dev/inst-nodes-gen.py (mipsy/12_mipsy-inst 1.5 705))
(dev/doc-inst-set-gen.py (mipsy/c/21_doc-inst-s 1.2 705))
(dev/inst-builder-gen.py (mipsy/15_mipsy-buil 1.9 705))
(dev/inst-makefile-gen.py (mipsy/b/15_mipsy-mk-i 1.6 705))
(dev/inst-nodes-gen.py (mipsy/12_mipsy-inst 1.6 705))
(dev/mipsy.py (mipsy/16_mipsy.py 1.7 705))
(dev/mipsy.xml (mipsy/17_mipsy.xml 1.14 604))
(dev/parse-asm-parse-gen.py (mipsy/13_mipsy-pars 1.7 705))
(dev/parse-asm-scan-gen.py (mipsy/14_mipsy-scan 1.9 705))
(dev/parse-asm-parse-gen.py (mipsy/13_mipsy-pars 1.8 705))
(dev/parse-asm-scan-gen.py (mipsy/14_mipsy-scan 1.10 705))
;; ./doc/
(doc/Makefile.am (mipsy/b/9_Makefile.a 1.3 604))
......@@ -101,7 +104,7 @@
(src/misc/select_const.hh (mipsy/38_select_con 1.1 604))
;; ./src/parse/
(src/parse/Makefile.am (mipsy/39_Makefile.a 1.3 604))
(src/parse/Makefile.am (mipsy/39_Makefile.a 1.4 604))
(src/parse/asm-scan.hh (mipsy/40_asm-scan.h 1.2 604))
(src/parse/libparse.cc (mipsy/41_libparse.c 1.4 604))
(src/parse/libparse.hh (mipsy/42_libparse.h 1.4 604))
......
......@@ -3,26 +3,33 @@ INCLUDES = -I $(top_srcdir)/src -I $(top_builddir)/src
FROM_ASM_PARSE_YY = \
stack.hh position.hh location.hh \
asm-parse.hh asm-parse.cc
BUILT_SOURCES = \
asm-scan.ll \
asm-parse.yy \
asm-scan.ll parse-asm-scan.log \
asm-parse.yy parse-asm-parse.log \
$(FROM_ASM_PARSE_YY)
MAINTAINERCLEANFILES = asm-scan.ll asm-scan.yy $(FROM_ASM_PARSE_YY)
asm-scan.ll: $(top_srcdir)/dev/parse-asm-scan-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/parse-asm-scan-gen.py < $(top_srcdir)/dev/mipsy.xml \
> $(srcdir)/$@
asm-parse.yy: $(top_srcdir)/dev/parse-asm-parse-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/parse-asm-parse-gen.py < $(top_srcdir)/dev/mipsy.xml \
> $(srcdir)/$@
parse-asm-scan.log: $(top_srcdir)/dev/parse-asm-scan-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/parse-asm-scan-gen.py < $(top_srcdir)/dev/mipsy.xml
touch $@
asm-scan.ll: parse-asm-scan.log
touch $@
parse-asm-parse.log: $(top_srcdir)/dev/parse-asm-parse-gen.py $(top_srcdir)/dev/mipsy.xml
$(top_srcdir)/dev/parse-asm-parse-gen.py < $(top_srcdir)/dev/mipsy.xml
touch $@
asm-parse.yy: parse-asm-parse.log
touch $@
$(FROM_ASM_PARSE_YY): $(srcdir)/asm-parse.yy
bison -S lalr1.cc -d -ra $(srcdir)/asm-parse.yy -o asm-parse.cc
bison -S lalr1.cc -d -ra $(srcdir)/asm-parse.yy -o asm-parse.cc
noinst_LIBRARIES = libparse.a
MAINTAINERCLEANFILES = asm-scan.ll asm-scan.yy $(FROM_ASM_PARSE_YY)
libparse_a_SOURCES = \
$(FROM_ASM_PARSE_YY) asm-parse.yy \
asm-scan.ll asm-scan.hh \
libparse.hh libparse.cc \
noinst_LIBRARIES = libparse.a
libparse_a_SOURCES = \
asm-parse.yy parse-asm-parse.log \
$(FROM_ASM_PARSE_YY) \
asm-scan.ll asm-scan.hh parse-asm-scan.log \
libparse.hh libparse.cc \
parse-tasks.hh parse-tasks.cc
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment