Commit 7dea817e authored by david_v's avatar david_v
Browse files

2003-06-02 Valentin David <valentin.david@lrde.epita.fr>

	* src/boxedsdf-merge: new directory.
	* src/boxedsdf-merge/Makefile.am: new file.
	* src/boxedsdf-merge/boxedsdf-merge.str: new file.

	* src/Makefile.am,
	* configure.ac: src/boxedsdf-merge directory added.
parent 34350893
2003-06-02 Valentin David <valentin.david@lrde.epita.fr>
* src/boxedsdf-merge: new directory.
* src/boxedsdf-merge/Makefile.am: new file.
* src/boxedsdf-merge/boxedsdf-merge.str: new file.
* src/Makefile.am,
* configure.ac: src/boxedsdf-merge directory added.
2003-06-02 Valentin David <valentin.david@lrde.epita.fr> 2003-06-02 Valentin David <valentin.david@lrde.epita.fr>
* src/pp: new directory. * src/pp: new directory.
......
...@@ -25,6 +25,7 @@ AC_CONFIG_FILES([Makefile ...@@ -25,6 +25,7 @@ AC_CONFIG_FILES([Makefile
src/pack-boxed2sdf/Makefile src/pack-boxed2sdf/Makefile
src/pack-boxed2pp-table/Makefile src/pack-boxed2pp-table/Makefile
src/pp/Makefile src/pp/Makefile
src/boxedsdf-merge/Makefile
test/Makefile test/Makefile
test/defs]) test/defs])
AC_OUTPUT AC_OUTPUT
...@@ -6,6 +6,7 @@ SUBDIRS = syn \ ...@@ -6,6 +6,7 @@ SUBDIRS = syn \
pack-boxedsdf \ pack-boxedsdf \
pack-boxed2sdf \ pack-boxed2sdf \
pack-boxed2pp-table \ pack-boxed2pp-table \
pp pp \
boxedsdf-merge
BOOTCLEAN_SUBDIRS = $(SUBDIRS) BOOTCLEAN_SUBDIRS = $(SUBDIRS)
include $(top_srcdir)/config/Makefile.xt
bin_PROGRAMS = boxedsdf-merge
SCFLAGS = --main $*
STRINCLUDES = -I $(top_builddir)/src/syn \
-I $(XTC)/share/xtc
CLEANFILES = boxedsdf-merge.o boxedsdf-merge \
*.tmp *.dep *.atree *.mtree *.txt *.af *.abox
EXTRA_DIST = boxedsdf-merge.str
module sdf-boxed-merge
imports lib BoxedSdf2 xtc-lib stratego-xt-xtc-tools
signature
constructors
Pptable : String -> Option
rules
readtxtpp : infile -> tree
where xtc-temp-files(<xtc-transform(!"sglr",
!["-2", "-p", <xtc-find> "pp-table.tbl"])> FILE(infile)
; xtc-implode-asfix
; read-from => tree)
strategies
pptable-option =
ArgOption("-p" + "--pptable"
, where(<set-config> ("-p",<id>)); !Pptable(<id>)
, !"-p f|--pptable f Read pptable input from f"
)
my-iowrap(s) =
iowrap(
(
(option-defined(?Pptable(pp)), id)
; (id, \ i -> (i,<readtxtpp> pp) \)
<+ !"bad -p option, try --help."; debug; giving-up)
; (id, s)
, pptable-option)
boxedsdf-merge = my-iowrap(
?(i, p)
; !i
; tag(!p)
)
strategies
at-cons(s) = oncetd(cons(s))
tagprod(l) = ?p
; prod(id,id,at-cons(un-double-quote; ?cons))
; l
; collect(?PP-Entry(Path1(cons), _)
<+ ?PP-Entry(Path(cons, _), _))
; map(\ PP-Entry(Path1(_), x) -> Pathed(None, x) \
<+ \ PP-Entry(Path(_, p), x) -> Pathed(Some(Path2(p)), x) \)
; ?pps
; !p
; (prod(id,id, attrs(\ x -> [BoxedAttr(pplist(pps))|x] \))
<+ prod(id,id, !attrs(BoxedAttr(pplist(pps)))))
tag(l) = alltd(
priorities(id);
context-free-priorities(id)
<+
prod(id,id,id);
tagprod(l)
)
Supports Markdown
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