[cig-commits] r6942 - in vendor/elsa: 2007-04-14 2007-04-14/ast 2007-04-14/elkhound 2007-04-14/elkhound/asfsdf 2007-04-14/elkhound/c 2007-04-14/elkhound/cc2 2007-04-14/elkhound/examples/arith 2007-04-14/elkhound/examples/cdecl 2007-04-14/elkhound/examples/cexp 2007-04-14/elkhound/examples/gcom 2007-04-14/elkhound/examples/gcom1 2007-04-14/elkhound/examples/gcom4 2007-04-14/elkhound/examples/gcom5 2007-04-14/elkhound/examples/gcom7 2007-04-14/elkhound/examples/scannerless 2007-04-14/elkhound/ocaml 2007-04-14/elkhound/ocaml/occ2 2007-04-14/elkhound/toplevel 2007-04-14/elsa 2007-04-14/elsa/in 2007-04-14/elsa/toplevel 2007-04-14/smbase current current/ast current/elkhound current/elkhound/asfsdf current/elkhound/c current/elkhound/cc2 current/elkhound/examples/arith current/elkhound/examples/cdecl current/elkhound/examples/cexp current/elkhound/examples/gcom current/elkhound/examples/gcom1 current/elkhound/examples/gcom4 current/elkhound/examples/gcom5 current/elkhound/examples/gcom7 current/elkhound/examples/scannerless current/elkhound/ocaml current/elkhound/ocaml/occ2 current/elkhound/toplevel current/elsa current/elsa/in current/elsa/toplevel current/smbase

leif at geodynamics.org leif at geodynamics.org
Tue May 22 17:32:54 PDT 2007


Author: leif
Date: 2007-05-22 17:32:53 -0700 (Tue, 22 May 2007)
New Revision: 6942

Added:
   vendor/elsa/2007-04-14/Makefile
   vendor/elsa/2007-04-14/ast/Makefile.in
   vendor/elsa/2007-04-14/ast/configure
   vendor/elsa/2007-04-14/configure
   vendor/elsa/2007-04-14/elkhound/Makefile.in
   vendor/elsa/2007-04-14/elkhound/asfsdf/Makefile
   vendor/elsa/2007-04-14/elkhound/c/Makefile.in
   vendor/elsa/2007-04-14/elkhound/c/configure
   vendor/elsa/2007-04-14/elkhound/cc2/Makefile
   vendor/elsa/2007-04-14/elkhound/configure
   vendor/elsa/2007-04-14/elkhound/examples/arith/Makefile.in
   vendor/elsa/2007-04-14/elkhound/examples/arith/configure
   vendor/elsa/2007-04-14/elkhound/examples/cdecl/Makefile
   vendor/elsa/2007-04-14/elkhound/examples/cexp/Makefile
   vendor/elsa/2007-04-14/elkhound/examples/gcom/Makefile
   vendor/elsa/2007-04-14/elkhound/examples/gcom1/Makefile
   vendor/elsa/2007-04-14/elkhound/examples/gcom4/Makefile
   vendor/elsa/2007-04-14/elkhound/examples/gcom5/Makefile
   vendor/elsa/2007-04-14/elkhound/examples/gcom7/Makefile
   vendor/elsa/2007-04-14/elkhound/examples/scannerless/Makefile
   vendor/elsa/2007-04-14/elkhound/ocaml/Makefile
   vendor/elsa/2007-04-14/elkhound/ocaml/occ2/Makefile
   vendor/elsa/2007-04-14/elkhound/toplevel/Makefile
   vendor/elsa/2007-04-14/elkhound/toplevel/configure
   vendor/elsa/2007-04-14/elsa/Makefile.in
   vendor/elsa/2007-04-14/elsa/configure
   vendor/elsa/2007-04-14/elsa/in/Makefile
   vendor/elsa/2007-04-14/elsa/toplevel/Makefile
   vendor/elsa/2007-04-14/elsa/toplevel/configure
   vendor/elsa/2007-04-14/smbase/Makefile.in
   vendor/elsa/2007-04-14/smbase/configure
   vendor/elsa/current/Makefile
   vendor/elsa/current/ast/Makefile.in
   vendor/elsa/current/ast/configure
   vendor/elsa/current/configure
   vendor/elsa/current/elkhound/Makefile.in
   vendor/elsa/current/elkhound/asfsdf/Makefile
   vendor/elsa/current/elkhound/c/Makefile.in
   vendor/elsa/current/elkhound/c/configure
   vendor/elsa/current/elkhound/cc2/Makefile
   vendor/elsa/current/elkhound/configure
   vendor/elsa/current/elkhound/examples/arith/Makefile.in
   vendor/elsa/current/elkhound/examples/arith/configure
   vendor/elsa/current/elkhound/examples/cdecl/Makefile
   vendor/elsa/current/elkhound/examples/cexp/Makefile
   vendor/elsa/current/elkhound/examples/gcom/Makefile
   vendor/elsa/current/elkhound/examples/gcom1/Makefile
   vendor/elsa/current/elkhound/examples/gcom4/Makefile
   vendor/elsa/current/elkhound/examples/gcom5/Makefile
   vendor/elsa/current/elkhound/examples/gcom7/Makefile
   vendor/elsa/current/elkhound/examples/scannerless/Makefile
   vendor/elsa/current/elkhound/ocaml/Makefile
   vendor/elsa/current/elkhound/ocaml/occ2/Makefile
   vendor/elsa/current/elkhound/toplevel/Makefile
   vendor/elsa/current/elkhound/toplevel/configure
   vendor/elsa/current/elsa/Makefile.in
   vendor/elsa/current/elsa/configure
   vendor/elsa/current/elsa/in/Makefile
   vendor/elsa/current/elsa/toplevel/Makefile
   vendor/elsa/current/elsa/toplevel/configure
   vendor/elsa/current/smbase/Makefile.in
   vendor/elsa/current/smbase/configure
Log:
Added configure scripts and Makefiles ignored by 'svn import'.


Added: vendor/elsa/2007-04-14/Makefile
===================================================================
--- vendor/elsa/2007-04-14/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,32 @@
+# Makefile for toplevel elsa distribution
+
+# just do the obvious recursive thing
+all:
+	$(MAKE) -C smbase
+	$(MAKE) -C ast
+	$(MAKE) -C elkhound
+	$(MAKE) -C elsa
+
+check:
+	$(MAKE) -C smbase check
+	$(MAKE) -C ast check
+	$(MAKE) -C elkhound check
+	$(MAKE) -C elsa check
+
+clean:
+	$(MAKE) -C smbase clean
+	$(MAKE) -C ast clean
+	$(MAKE) -C elkhound clean
+	$(MAKE) -C elsa clean
+
+distclean:
+	$(MAKE) -C smbase distclean
+	$(MAKE) -C ast distclean
+	$(MAKE) -C elkhound distclean
+	$(MAKE) -C elsa distclean
+
+doc:
+	$(MAKE) -C smbase doc
+	$(MAKE) -C ast doc
+	$(MAKE) -C elkhound doc
+	$(MAKE) -C elsa doc

Added: vendor/elsa/2007-04-14/ast/Makefile.in
===================================================================
--- vendor/elsa/2007-04-14/ast/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/ast/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,193 @@
+# Makefile.in for ast
+# see license.txt for copyright and terms of use
+
+# main targets
+all: ccsstr astgen libast.a example.o ext1.o
+
+
+# directories of other software
+SMBASE := @SMBASE@
+LIBSMBASE := $(SMBASE)/libsmbase.a
+
+# external tools
+PERL := @PERL@
+MYFLEX := $(PERL) $(SMBASE)/run-flex.pl
+
+# TODO: agramlex.yy.cc apparently has backing up, which should
+# ideally be removed; add -nobackup to the run-flex.pl command
+# line to see this
+
+
+# C++ compiler, etc.
+CXX := @CXX@
+
+# flags for the C and C++ compilers (and preprocessor)
+CCFLAGS := @CCFLAGS@ -I$(SMBASE)
+
+# flags for the linker
+LDFLAGS := -g -Wall $(LIBSMBASE)
+
+
+# some other tools
+AR     := ar
+RANLIB := ranlib
+
+
+# compile .cc to .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl $(SMBASE)/depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+
+# remake the generated Makefile if its inputs have changed
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl $(SMBASE)/sm_config.pm
+	./config.status -reconfigure
+
+
+# ---------------------- intermediate files -------------------
+# for bison-1.28:
+  # unfortunately, the way bison.simple declares YYSTYPE precludes a proper
+  # declaration of yylex(), unless I modify it as below; the 'grep' is so
+  # I have a .h file without the union, since the union refers to types
+  # whose declarations I'd like to avoid spreading everywhere
+# for bison-1.875:
+  # g++ doesn't like __attribute__((__unused__))
+agrampar.tab.cc agrampar.tab.h agrampar.codes.h: agrampar.y
+	bison -d -v agrampar.y
+	mv -f agrampar.tab.c tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  < tmp > agrampar.tab.cc
+	mv -f agrampar.tab.h tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' < tmp > agrampar.tab.h
+	rm tmp
+	grep '# *define' agrampar.tab.h > agrampar.codes.h
+
+agrampar.tab.o: ast.hand.h ast.ast.h agrampar.h
+
+# have to use sed to change the forward declaration of 'istream'
+# into an #include, so the std:: namespace doesn't cause a problem
+agramlex.yy.cc: gramlex.h agramlex.lex agrampar.codes.h
+	$(MYFLEX) -o$@ agramlex.lex
+
+
+# ------------------------- ccsstr ---------------------
+CCSSTR_OBJS := \
+  reporterr.o \
+  embedded.o
+
+ccsstr: ccsstr.cc ccsstr.h $(CCSSTR_OBJS)
+	$(CXX) -o $@ -DTEST_CCSSTR $(CCFLAGS) ccsstr.cc $(CCSSTR_OBJS) $(LDFLAGS)
+
+
+# ------------------------- astgen ---------------------
+ASTGEN_OBJS := \
+  gramlex.o \
+  agrampar.tab.o \
+  ccsstr.o \
+  agramlex.yy.o \
+  reporterr.o \
+  embedded.o \
+  ast.hand.o \
+  asthelp.o \
+  xmlhelp.o \
+  agrampar.o  \
+  astgen.o
+-include $(ASTGEN_OBJS:.o=.d)
+
+# ast.ast.cc is a dependency here but not explicitly in the command
+# line because ast.hand.cc #includes it
+astgen: $(ASTGEN_OBJS) ast.ast.cc $(LIBSMBASE) 
+	$(CXX) -o astgen $(ASTGEN_OBJS) $(LDFLAGS)
+
+
+# ---------------------- run astgen ----------------------
+# simple ast spec file
+example.cc: astgen example.ast
+	./astgen example.ast
+
+exampletest: exampletest.o example.o asthelp.o locstr.o $(LIBSMBASE)
+	$(CXX) -o $@ $^
+
+# simple extension
+ext1.cc: astgen example.ast ext1.ast
+	./astgen -oext1 example.ast ext1.ast
+
+# If you want to regenerate astgen's own ast file, you do
+#   ./astgen -oast.ast ast.ast
+#
+# This rule is *not* in the Makefile because if you do it
+# without thinking you can break the self-bootstrapping
+# (and be forced to restore your ast.ast.{cc,h} from the
+# distribution tarball or from CVS).
+
+
+# ------------------------ libast.a -------------------
+# this library is the set of support modules required for
+# using astgen-generated code, or are simply useful generally
+# but don't belong in smbase
+LIB_OBJS := \
+  gramlex.o \
+  ccsstr.o \
+  reporterr.o \
+  embedded.o \
+  asthelp.o \
+  xmlhelp.o \
+  locstr.o
+-include $(ASTGEN_OBJS:.o=.d)
+
+libast.a: $(LIB_OBJS)
+	$(AR) -r $@ $(LIB_OBJS)
+	-$(RANLIB) $@
+
+
+# ------------------ documentation ------------------
+gendoc:
+	mkdir gendoc
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+gendoc/demo.h gendoc/demo.cc: demo.ast astgen
+	./astgen -ogendoc/demo demo.ast
+
+.PHONY: doc
+doc: gendoc gendoc/configure.txt gendoc/demo.h
+	@echo "built documentation"
+
+
+# ------------------------ misc ---------------------
+
+# for now, check-full is just check
+.PHONY: check-full
+check-full: check
+
+check: ccsstr
+	./ccsstr
+
+# delete outputs of compiler, linker
+clean:
+	rm -f *.o tmp *.d gmon.out
+	rm -f agrampar astgen ccsstr towner exampletest libast.a
+	rm -f agrampar.output
+	rm -f example.{h.cc} ext1.{h,cc}
+	rm -f agramlex.yy.cc
+
+# return to pristine checked-out state
+distclean: clean
+	rm -f Makefile config.status config.summary
+	rm -rf gendoc
+
+# 'clean', plus remove distributed outputs of bison
+toolclean: clean
+	rm -f agrampar.tab.h
+	rm -f agrampar.tab.cc
+	rm -f agrampar.codes.h
+
+# test for owner
+towner: owner.h towner.o
+	$(CXX) -o towner towner.o $(LDFLAGS)

Added: vendor/elsa/2007-04-14/ast/configure
===================================================================
--- vendor/elsa/2007-04-14/ast/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/ast/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/2007-04-14/ast/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/configure
===================================================================
--- vendor/elsa/2007-04-14/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,11 @@
+#!/bin/sh
+# toplevel elsa distribution configure
+
+# for now, just fire off default configurations
+# in each of the subdirs; users can then go customize
+# as desired
+
+(cd smbase && ./configure "$@") || exit 1
+(cd ast && ./configure "$@") || exit 1
+(cd elkhound && ./configure "$@") || exit 1
+(cd elsa && ./configure "$@") || exit 1


Property changes on: vendor/elsa/2007-04-14/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/elkhound/Makefile.in
===================================================================
--- vendor/elsa/2007-04-14/elkhound/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,598 @@
+# Makefile.in for elkhound
+# see license.txt for copyright and terms of use
+
+# I uncomment this temporarily to just build certain modules
+#tmp: mlsstr
+
+# main targets: elkhound, and some examples
+all: elkhound libelkhound.a forbid.gr.gen.out arith c cc2/cc2.exe
+	@echo BUILD FINISHED
+
+
+# directories of other software
+SMBASE    := @SMBASE@
+AST       := @AST@
+
+# stuff inside those other directories
+LIBSMBASE := $(SMBASE)/libsmbase.a
+LIBAST    := $(AST)/libast.a
+ASTGEN    := $(AST)/astgen
+
+# external tools
+PERL := @PERL@
+MYFLEX := $(PERL) $(SMBASE)/run-flex.pl
+
+
+# remake the generated Makefile if its inputs have changed
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl $(SMBASE)/sm_config.pm
+	./config.status -reconfigure
+
+
+# This variable is a parameter that can be passed on the 'make' command
+# line.  It becomes part of the -tr argument to 'elkhound'.  By default,
+# it's set to the flag to generate a debug dump of the LR parse tables.
+TRGRAMANL := ,lrtable
+
+
+# -------------------- compiler configuration -------------------
+# C++ compiler, etc.
+CXX := @CXX@
+
+# flags for the C and C++ compilers (and preprocessor)
+# "-Ic" is needed for binaries that use $(support-set)
+CCFLAGS := @CCFLAGS@ -I$(SMBASE) -I$(AST) -Ic
+
+# flags for the linker
+libraries := $(LIBAST) $(LIBSMBASE)
+LDFLAGS := -g -Wall $(libraries)
+
+
+# some other tools
+AR     := ar
+RANLIB := ranlib
+
+
+# compile .cc to .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl $(SMBASE)/depend.pl -o $@ $< $(CCFLAGS) >$*.d
+
+
+# ----------------- sets of related object files ---------------------
+# files needed to represent a grammar in memory
+grammar-set := \
+  asockind.o \
+  grammar.o
+-include $(grammar-set:.o=.d)
+
+# in addition to grammar-set, files needed to parse a grammar description
+# and emit action code
+grampar-set := \
+  emitcode.o \
+  mlsstr.o \
+  genml.o \
+  gramast.ast.gen.o \
+  gramlex.yy.o \
+  grampar.o \
+  grampar.tab.o
+-include $(grampar-set:.o=.d)
+
+# minimal runtime files needed to do GLR parsing; these get
+# combined to form libelkhound.a, the Elkhound runtime library
+glr-set := \
+  cyctimer.o \
+  glr.o \
+  parsetables.o \
+  useract.o
+-include $(glr-set:.o=.d)
+
+# utility modules useful with elkhound, though not necessary
+util-set := \
+  ptreenode.o \
+  ptreeact.o
+-include $(util-set:.o=.d)
+
+# additional modules borrowed from the C parser for the trivial grammars,
+# and the C++ parser based on the Standard grammar
+support-set := \
+  c/cc_lang.o \
+  c/parssppt.o \
+  c/lexer1.o \
+  c/lexer1yy.o \
+  c/lexer2.o
+
+#-include $(support-set:.o=.d)
+#
+# The above include is deliberately missing.  There is a problem with
+# the generated .d files when the source lives in a directory other
+# than the current one, and I have not tracked down precisely when and
+# why this occurs.  Unfortunately, it means that some changes
+# (especially in smbase) require a 'make clean'...
+
+
+# ---------------------- generic rules ----------------------
+# intermediate files for an ast spec
+# (this have been commented-out and instantiated with the specific
+# rules for gramast.ast, because I only need once instance, and
+# because the cygwin version of make-3.80 fails to recognize the
+# applicability of this pattern for some reason)
+# .PRECIOUS: %.ast.gen.cc %.ast.gen.h
+# %.ast.gen.cc %.ast.gen.h: %.ast $(AST)/astgen
+# 	rm -f $*.ast.gen.*
+# 	$(AST)/astgen -o$*.ast.gen $*.ast
+# 	chmod a-w $*.ast.gen.h $*.ast.gen.cc
+
+# intermediate files for a grammar
+# TRGRAMANL: extra trace flags specified by user; starts with "," if defined
+# ('chmod a-w' is so I don't accidentally edit it)
+.PRECIOUS: %.gr.gen.cc %.gr.gen.h
+%.gr.gen.cc %.gr.gen.h %.gr.gen.y: %.gr elkhound
+	rm -f $*.gr.gen.*
+	./elkhound -v -tr bison,NOconflict$(TRGRAMANL) -o $*.gr.gen $*.gr
+	chmod a-w $*.gr.gen.h $*.gr.gen.cc
+
+# bison parser from the a given grammar; the 'sed' is because Bison
+# already interpretes 0 as EOF, and if my rule names it explicitly
+# then it gets mad
+%.y: %.gr.gen.y
+	echo '%{' >$@
+	echo '#include "trivbison.h"' >>$@
+	echo '%}' >>$@
+	sed -e 's/"EOF" {/{/' <$*.gr.gen.y >>$@
+
+# run Bison; the 'sed' command is to silence a spurious warning about
+# 'yyval' being used uninitialized; I also compile here (instead of
+# relying on another pattern rule) because I want to control exactly
+# how the compilation happens (to ensure the Bison-parser is compiled
+# with flags to make it a fair performance test with my own stuff)
+%.tab.c %.tab.o %.tab.h: %.y
+	bison -d -v $*.y
+	mv $*.tab.c $*.tab.c.orig
+	sed -e 's/YYSTYPE yyval;/YYSTYPE yyval = 0;/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  <$*.tab.c.orig >$*.tab.c
+	rm $*.tab.c.orig
+	$(CXX) -c -g -o $*.tab.o -O2 -DNDEBUG -Wall $(YYDEBUG) $*.tab.c
+
+# run the trivial-grammar helper
+.PRECIOUS: %.gr %.tree.gr
+%.gr: %.gr.in make-trivparser.pl
+	rm -f $@
+	perl ./make-trivparser.pl $(notdir $*) <$*.gr.in >$@
+	chmod a-w $@
+
+%.tree.gr: %.gr.in make-trivparser.pl
+	rm -f $@
+	perl ./make-trivparser.pl -ptree $(notdir $*) <$*.gr.in >$@
+	chmod a-w $@
+
+# make a parser for testing some grammar, using trivial lexer
+trivparse-deps := trivmain.cc trivlex.o libelkhound.a
+%.gr.exe: %.gr.gen.o $(trivparse-deps) $(libraries)
+	$(CXX) -o $@ -DGRAMMAR_NAME=\"$*.bin\" $(CCFLAGS) $*.gr.gen.o $(support-set) $(trivparse-deps) $(LDFLAGS)
+
+# similar, for Bison as the parser-generator
+trivbison-deps := trivbison.o trivlex.o lexer2.o libelkhound.a
+%.bison.exe: %.tab.o $(trivbison-deps)
+	$(CXX) -o $@ $*.tab.o $(trivbison-deps) $(LDFLAGS)
+
+
+# ------------------- intermediate files --------------------
+# grammar lexer
+# like in ast/, need to replace forward decl with proper #include
+gramlex.yy.cc: gramlex.lex
+	$(MYFLEX) -o$@ gramlex.lex
+
+# grammar description AST (manual instantiation of above
+# commented-out pattern rule)
+.PRECIOUS: gramast.ast.gen.cc gramast.ast.gen.h
+gramast.ast.gen.cc gramast.ast.gen.h: gramast.ast $(AST)/astgen
+	rm -f gramast.ast.gen.*
+	$(AST)/astgen -ogramast.ast.gen gramast.ast
+	chmod a-w gramast.ast.gen.h gramast.ast.gen.cc
+
+# bison implementation of grammar parser.
+# I have to make some changes to the generated output so it will compile
+# with a C++ compiler, and want to extract the codes so they're available
+# separately without having to know about all of the types in YYSTYPE.
+grampar.tab.cc grampar.tab.h grampar.codes.h: grampar.y
+	bison -d -v grampar.y
+	mv -f grampar.tab.c tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  <tmp >grampar.tab.cc
+	mv -f grampar.tab.h tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' <tmp >grampar.tab.h
+	rm tmp
+	grep '# *define' grampar.tab.h >grampar.codes.h
+
+
+# new C++ grammar with treebuilding actions
+cc2/cc2t.gr.gen.cc cc2/cc2t.gr.gen.h cc2/cc2t.gr.gen.y: cc2/cc2.gr c/c.tok elkhound
+	rm -f cc2/cc2t*
+	sed -e 's/cc2\.gr\.gen\.h/cc2t.gr.gen.h/' <cc2/cc2.gr >cc2/cc2t.gr
+	./elkhound -v -tr treebuild$(TRGRAMANL) -o cc2/cc2t.gr.gen cc2/cc2t.gr
+	chmod a-w cc2/cc2t.gr*
+
+
+# ----------------- extra dependencies -----------------
+# These dependencies ensure that automatically-generated code is
+# created in time to be used by other build processes which need it.
+# I had been maintaining the list by hand, but now I've got a script
+# to build it.  The list may need to be rebuilt from time to time; if
+# you get compile errors after 'make clean' because of missing files
+# that are automatically generated, rebuild extradep.mk after a full
+# compilation succeeds.
+
+extradep.mk:
+	perl ./find-extra-deps *.d cc2/*.d >$@
+
+-include extradep.mk
+
+
+# --------------------- test programs ----------------------
+# grammar lexer test program
+gramlex-dep := gramlex.yy.cc $(AST)/gramlex.cc
+gramlex: ../ast/gramlex.h $(gramlex-dep) $(libraries)
+	$(CXX) -o $@ -DTEST_GRAMLEX $(CCFLAGS) $(gramlex-dep) $(LDFLAGS)
+
+# cycle timer test
+cyctimer: cyctimer.cc cyctimer.h
+	$(CXX) -o $@ -DTEST_CYCTIMER $(CCFLAGS) cyctimer.cc $(LDFLAGS)
+
+# ML lexical parser
+mlsstr: mlsstr.cc mlsstr.h
+	$(CXX) -o $@ -DTEST_MLSSTR $(CCFLAGS) mlsstr.cc $(LDFLAGS)
+
+# test grammar for 'forbid' (there is no executable for this, I just look
+# at the Elkhound output)
+forbid.gr.gen.out: forbid.gr
+	./elkhound -tr requireExactStats -o forbid.gr.gen forbid.gr
+
+
+# -------------------- exported library ----------------
+# glr parsing engine
+libelkhound.a: $(glr-set) $(util-set)
+	rm -f $@
+	$(AR) -r $@ $(glr-set) $(util-set)
+	-$(RANLIB) $@
+
+
+# --------------------- executables ---------------------
+# reads the grammar and emits C++ code for semantic functions;
+# this is the main parser generator binary
+elkhound-dep := gramanl.cc gramexpl.o $(grammar-set) $(grampar-set) parsetables.o
+elkhound: $(elkhound-dep) grammar.h gramanl.h $(libraries)
+	$(CXX) -o $@ -DGRAMANL_MAIN $(CCFLAGS) $(elkhound-dep) $(LDFLAGS)
+
+# C++ parser based on Standard grammar
+cc2-deps := cc2/cc2main.o cc2/cc2.gr.gen.o libelkhound.a
+cc2/cc2.exe: $(cc2-deps) $(libraries)
+	$(CXX) -o $@ $(support-set) $(cc2-deps) $(LDFLAGS)
+
+# new C++ parser with treebuilding
+cc2t-deps := cc2/cc2main.o cc2/cc2t.gr.gen.o libelkhound.a
+cc2/cc2t.exe: $(cc2t-deps) $(libraries)
+	$(CXX) -o $@ $(support-set) $(cc2t-deps) $(LDFLAGS)
+
+
+# ---------------------- Elkhound examples ------------------
+.PHONY: c
+c: elkhound libelkhound.a
+	$(MAKE) -C c
+
+c.in/c.in4c: c.in/c.in4b
+	rm -f $@
+	for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do \
+	  cat $< >>$@; \
+	done
+
+c.in/c.in4d: c.in/c.in4c
+	rm -f $@
+	for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do \
+	  cat $< >>$@; \
+	done
+
+# stuff in examples directory
+.PHONY: examples arith
+arith: elkhound libelkhound.a
+	$(MAKE) -C examples/arith
+
+examples: all glrmain.o arith gcom
+	$(MAKE) -C examples/cexp
+	$(MAKE) -C examples/cdecl
+	$(MAKE) -C examples/scannerless
+
+.PHONY: ocaml
+ocaml:
+	$(MAKE) -C ocaml
+
+
+# ---------------------------- gcom -----------------------
+# guarded command example from tutorial
+.PHONY: gcom gcom-clean
+gcom:
+	$(MAKE) -C examples/gcom1 all check
+	$(MAKE) -C examples/gcom4 all check
+	$(MAKE) -C examples/gcom5 all check
+	$(MAKE) -C examples/gcom all check
+	$(MAKE) -C examples/gcom7 all check
+
+gcom-clean:
+	$(MAKE) -C examples/gcom1 clean
+	$(MAKE) -C examples/gcom4 clean
+	$(MAKE) -C examples/gcom5 clean
+	$(MAKE) -C examples/gcom clean
+	$(MAKE) -C examples/gcom7 clean
+	$(MAKE) -C examples/scannerless clean
+
+
+# ----------------------------- EFa -----------------------
+# input for EFa
+triv/efa.in:
+	mkdir $@
+	perl -e 'foreach $$n (500, 1000, 1500, 2000, 2500, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000) {  \
+	           $$name = sprintf("%07d", $$n);            \
+	           open(OUT, ">$@/$$name.in") or die $!; \
+	           print OUT "A";                            \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("PA");                       \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+EFA_TESTS := triv/efa.perf.txt triv/efa.notree.perf.txt triv/efa.bison.tree.perf.txt triv/efa.bison.notree.perf.txt
+
+#.PHONY: $(EFA_TESTS) all-efa
+
+# run all the EFa tests; the whole batch runs in less than a minute
+# (well, they did before I put in the loop from 1 to 5 ...)
+all-efa: $(EFA_TESTS)
+
+# performance test for EFa
+triv/efa.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.tree.gr.exe -tr progress -count $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+triv/efa.notree.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.tree.gr.exe -tr progress,trivialActions $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+triv/efa.bison.tree.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.tree.bison.exe $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+triv/efa.bison.notree.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.bison.exe $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+%.csv: %.txt
+	cat $^ | grep cycles | \
+	  perl -p -e 's/^[^:]*\D(\d+)\D.*:.*\D(\d+)_(\d+) cycles.*$$/$$1, $$2$$3/' >$@
+
+all-efa-csv: $(EFA_TESTS:.txt=.csv)
+
+
+# --------------------------- EEb -----------------------
+# input for EEb
+triv/eeb.in:
+	mkdir $@
+	perl -e 'foreach $$n (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 50, 100, 200, 300, 400, 500) {  \
+	           open(OUT, ">$@/$$n.in") or die $!;    \
+	           print OUT "B";                            \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("PB");                       \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+# performance test for EEb
+triv/eeb.perf.txt:
+	rm -f $@
+	for n in 10 20 50 100 200 300 400 500; do \
+	  triv/EEb.tree.gr.exe -tr progress -count triv/eeb.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+triv/eeb.notree.perf.txt:
+	rm -f $@
+	for n in 10 20 50 100 200 300 400 500; do \
+	  triv/EEb.tree.gr.exe -tr progress,trivialActions triv/eeb.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+# --------------------------- SSx ----------------------
+# input for SSx
+triv/ssx.in:
+	mkdir $@
+	perl -e 'for($$n=1; $$n <= 99; $$n += 2) {           \
+	           open(OUT, ">$@/$$n.in") or die $!;        \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("X");                        \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+# performance test for SSx
+triv/ssx.perf.txt:
+	rm -f $@
+	for n in 15 25 35 45 55 65 75 85 99; do \
+	  triv/SSx.tree.gr.exe -tr progress -count triv/ssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+triv/ssx.notree.perf.txt:
+	rm -f $@
+	for n in 15 25 35 45 55 65 75 85 99; do \
+	  triv/SSx.tree.gr.exe -tr progress,trivialActions triv/ssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+
+# --------------------------- SSSx ----------------------
+# input for SSSx
+triv/sssx.in:
+	mkdir $@
+	perl -e 'for($$n=1; $$n <= 99; $$n += 1) {           \
+	           open(OUT, ">$@/$$n.in") or die $!;        \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("X");                        \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+triv/sssx.perf.txt:
+	rm -f $@
+	for n in 5 10 15 20 25 30 35 40 45 50; do \
+	  triv/SSSx.tree.gr.exe -tr progress -count triv/sssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+triv/sssx.notree.perf.txt:
+	rm -f $@
+	for n in 5 10 15 20 25 30 35 40 45 50; do \
+	  triv/SSSx.tree.gr.exe -tr progress,trivialActions triv/sssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+# ------------------------ DeclExpr ----------------------
+triv/DeclExpr.perf.txt:
+	rm -f $@
+	for n in 1 10 100 1000 10000; do \
+	  triv/DeclExpr.gr.exe -tr progress,trivialActions triv/DeclExpr.in$$n 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+# ------------------------ documentation -----------------------
+# directory of generated documentation
+gendoc:
+	mkdir gendoc
+
+# dependencies for 'elkhound', the parser generator executable
+gendoc/elkhound_dep.dot:
+	perl $(SMBASE)/scan-depends.pl -r -I$(AST) gramanl.cc >$@
+
+# dependencies for 'glr.h', the entry point to the runtime library
+gendoc/glr.dot:
+	perl $(SMBASE)/scan-depends.pl -r -I$(AST) glr.h >$@
+
+# check to see if they have dot
+.PHONY: dot
+dot:
+	@if ! which dot >/dev/null; then \
+	  echo "You don't have the 'dot' tool.  You can get it at:"; \
+	  echo "http://www.research.att.com/sw/tools/graphviz/"; \
+	  exit 2; \
+	fi
+
+# use 'dot' to lay out the graph
+%.ps: %.dot dot
+	dot -Tps <$*.dot >$@
+
+# use 'convert' to make a PNG image with resolution not to exceed
+# 1000 in X or 700 in Y ('convert' will preserve aspect ratio); this
+# also antialiases, so it looks very nice (it's hard to reproduce
+# this using 'gs' alone)
+%.png: %.ps
+	convert -geometry 1000x700 $^ $@
+
+# glr is much smaller
+gendoc/glr.png: gendoc/glr.ps
+	convert -geometry 500x400 $^ $@
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+# "make doc" should build whatever we have that needs building
+.PHONY: doc
+doc: gendoc gendoc/elkhound_dep.png gendoc/glr.png gendoc/configure.txt
+	@echo "built documentation"
+
+# some other random phony targets (I hate this clutter..)
+.PHONY: clean distclean check
+
+
+# -------------------- clean, check, etc. ------------------
+# things to remove from all directories
+CLEAN_PATTERNS := \
+  *.o  \
+  *~ \
+  *.d \
+  *.exe \
+  *.gen.* \
+  *.bin \
+  *.output \
+  a.out \
+  core
+
+clean: gcom-clean
+	rm -f $(CLEAN_PATTERNS)
+	rm -f elkhound glr gramlex cyctimer
+	rm -f grampar.output grampar tlexer
+	rm -f gramlex.yy.cc
+	rm -f libelkhound.a
+	rm -f gdb.log gprof.out gmon.out test-bad-tmp.c
+	rm -f examples/crash1.{cc,h}
+	cd cc2; rm -f $(CLEAN_PATTERNS)
+	cd triv; rm -f $(CLEAN_PATTERNS) *.y *.gr
+	for dir in arith cdecl cexp; do \
+	  (cd examples/$$dir; $(MAKE) clean); \
+	done
+	$(MAKE) -C c clean
+
+distclean: clean
+	rm -f Makefile config.status config.summary glrconfig.h *.tmp
+	cd triv; rm -rf sssx.in ssx.in eeb.in
+	$(MAKE) -C c distclean
+	rm -rf gendoc
+	rm -f c.in/c.in4{c,d}
+
+# 'clean', plus remove distributed output files from bison
+toolclean: clean
+	rm -f grampar.tab.cc grampar.tab.h grampar.codes.h
+	$(MAKE) -C examples/arith toolclean
+	$(MAKE) -C c toolclean
+
+# for now, check-full is just check
+.PHONY: check-full
+check-full: check
+
+check: all mlsstr
+	./mlsstr
+	MAKE=$(MAKE) ./regrtest
+	@echo ""
+	@echo "Regression tests passed."
+
+
+# --------------- random other stuff --------------------
+# test for rcptr
+trcptr: rcptr.h trcptr.cc
+	$(CXX) -o $@ trcptr.cc

Added: vendor/elsa/2007-04-14/elkhound/asfsdf/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/asfsdf/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/asfsdf/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,57 @@
+# Makefile for parsgen/asfsdf
+
+ssx.perf.txt:
+	for n in 5 7 9 11 13 15 17 19 21; do \
+	  echo -n "$$n: "; \
+	  sglr -p SSx.trm.tbl -i ../ssx.in/$$n.in >/dev/null; \
+	done &>$@
+
+ssx.notree.perf.txt:
+	for n in 5 15 25 35 45 55 65 75 85 99; do \
+	  echo -n "$$n: "; \
+	  sglr -n -p SSx.trm.tbl -i ../ssx.in/$$n.in; \
+	done &>$@
+
+eeb.perf.txt:
+	for n in 5 6 7 8 9 10; do \
+	  echo -n "$$n: "; \
+	  sglr -p EEb.trm.tbl -i ../eeb.in/$$n.in >/dev/null; \
+	done &>$@
+
+eeb.notree.perf.txt:
+	for n in 10 20 50 100 200 300 400 500; do \
+	  echo -n "$$n: "; \
+	  sglr -n -p EEb.trm.tbl -i ../eeb.in/$$n.in; \
+	done &>$@
+
+sssx.perf.txt:
+	for n in 5 7 10 12 14; do \
+	  echo -n "$$n: "; \
+	  sglr -p SSSx.trm.tbl -i ../sssx.in/$$n.in >/dev/null; \
+	done &>$@
+
+sssx.notree.perf.txt:
+	for n in 5 10 15 20 25 30 35 40 45 50; do \
+	  echo -n "$$n: "; \
+	  sglr -n -p SSSx.trm.tbl -i ../sssx.in/$$n.in; \
+	done &>$@
+
+efa.perf.txt:
+	for fn in ../efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    echo -n "$$fn: "; \
+	    sglr -p EFa.trm.tbl -i $$fn >/dev/null || echo "failed"; \
+	  done; \
+	done &>$@
+
+efa.notree.perf.txt:
+	for fn in ../efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    echo -n "$$fn: "; \
+	    sglr -n -p EFa.trm.tbl -i $$fn; \
+	  done; \
+	done &>$@
+
+%.csv: %.txt
+	cat $^ | grep cycles | \
+	perl -p -e 's/^[^:]*\D(\d+)\D.*: cycles: (\d+)$$/$$1, $$2/' >$@

Added: vendor/elsa/2007-04-14/elkhound/c/Makefile.in
===================================================================
--- vendor/elsa/2007-04-14/elkhound/c/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/c/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,149 @@
+# Makefile.in
+# this is the Makefile for the Elkhound-based C Parser
+
+# main target: an Elkhound-based C parser
+all: cparse
+
+# directories of other software
+SMBASE   := @SMBASE@
+AST      := @AST@
+ELKHOUND := @ELKHOUND@
+
+# stuff inside those other directories
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+LIBAST      := $(AST)/libast.a
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# re-create the Makefile if Makefile.in has changed
+Makefile: Makefile.in
+	./config.status
+
+
+# ----------------------- compiler configuration -------------------
+# C++ preprocessor, compiler and linker
+CXX := @CXX@
+
+# flags for the C++ compiler (and preprocessor)
+CCFLAGS := @CCFLAGS@ -I$(SMBASE) -I$(AST) -I$(ELKHOUND)
+
+# flags for the linker
+libraries := $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+LDFLAGS := -g -Wall $(libraries)
+
+
+# compile .cc in this directory to a .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl $(SMBASE)/depend.pl -o $@ $< $(CCFLAGS) >$*.d
+
+
+# ----------------------- lexer2 -------------------
+# run flex on the lexer description
+lexer1yy.cc: lexer1.lex lexer1.h
+	flex lexer1.lex
+
+
+# modules needed for lexer2 stand-alone
+LEXER2_OBJS := \
+  lexer1.o \
+  lexer1yy.o \
+  cc_lang.o
+
+# lexer2 stand-alone binary
+lexer2: lexer2.cc lexer2.h $(LEXER2_OBJS)
+	$(CXX) -o $@ -DTEST_LEXER2 $(CCFLAGS) lexer2.cc $(LEXER2_OBJS) $(LDFLAGS)
+
+
+# ------------------------- cparse ---------------------
+# run lexer2 stand-alone to generate token list
+c.tok: lexer2
+	./lexer2 -myparser >$@
+
+# run astgen to generate the AST implementation
+c.ast.gen.h c.ast.gen.cc: c.ast
+	$(AST)/astgen -oc.ast.gen c.ast
+
+
+# run elkhound to generate the parser
+c.gr.gen.h c.gr.gen.cc c.gr.gen.y: c.gr c.tok
+	$(ELKHOUND)/elkhound -tr bison -v -o c.gr.gen c.gr
+
+
+# list of modules needed for the parser
+CPARSE_OBJS := \
+  lexer1.o \
+  lexer1yy.o \
+  cc_lang.o \
+  lexer2.o \
+  parssppt.o \
+  c.ast.gen.o \
+  c_env.o \
+  cc_flags.o \
+  c_type.o \
+  cparse.o \
+  exprequal.o \
+  exprvisit.o \
+  paths.o \
+  postorder.o \
+  stubs.o \
+  tcheck.o \
+  treeout.o \
+  c_variable.o \
+  c.gr.gen.o \
+  main.o
+
+# parser binary
+cparse: $(CPARSE_OBJS)
+	$(CXX) -o $@ $(CPARSE_OBJS) $(LDFLAGS)
+	./$@ $(ELKHOUND)/c.in/c.in1
+
+
+# ----------------------- bcparse ---------------------
+# NOTE: This target ('bcparse') is not built by default because
+# I don't want the default build to require Bison.
+
+# bison parser from the same grammar; the 'sed' is because Bison
+# already interpretes 0 as EOF, and if my rule names it explicitly
+# then it gets mad
+bcparse.y: c.gr.gen.y
+	echo '%{' >$@
+	echo '#include "bcparse.h"' >>$@
+	echo '%}' >>$@
+	sed -e 's/File L2_EOF/File/' <c.gr.gen.y >>$@
+
+# run Bison; the 'sed' command is to silence a spurious warning about
+# 'yyval' being used uninitialized; I also compile here (instead of
+# relying on another pattern rule) because I want to control exactly
+# how the compilation happens (to ensure the Bison-parser is compiled
+# with flags to make it a fair performance test with my own stuff)
+%.tab.c %.tab.o %.tab.h: %.y
+	bison -d -v $*.y
+	mv $*.tab.c $*.tab.c.orig
+	sed -e 's/YYSTYPE yyval;/YYSTYPE yyval = 0;/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  <$*.tab.c.orig >$*.tab.c
+	rm $*.tab.c.orig
+	$(CXX) -c -g -o $*.tab.o -O2 -DNDEBUG -Wall $(YYDEBUG) $*.tab.c
+
+# C-without-typedefs parser, using Bison
+bcparse-deps := bcparse.cc bcparse.tab.o lexer1.o lexer1yy.o lexer2.o cc_lang.o
+bcparse: $(bcparse-deps) $(libraries)
+	$(CXX) -o $@ $(CCFLAGS) $(bcparse-deps) $(LDFLAGS)
+	./$@ $(ELKHOUND)/c.in/c.in1
+
+
+# -------------------- clean, etc. -------------------
+clean:
+	rm -f *.o *.d *.gen.* *.tab.* *.output a.out core
+	rm -f bcparse.y c.tok
+	rm -f lexer2 cparse bcparse
+
+distclean: clean
+	rm -f Makefile config.status config.summary
+
+toolclean: clean
+	rm -f lexer1yy.cc
+
+check:
+	@echo "The C parser doesn't have an independent 'make check'."

Added: vendor/elsa/2007-04-14/elkhound/c/configure
===================================================================
--- vendor/elsa/2007-04-14/elkhound/c/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/c/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/2007-04-14/elkhound/c/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/elkhound/cc2/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/cc2/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/cc2/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+# dummy redirection Makefile
+
+all:
+	cd ..; $(MAKE)

Added: vendor/elsa/2007-04-14/elkhound/configure
===================================================================
--- vendor/elsa/2007-04-14/elkhound/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/2007-04-14/elkhound/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/elkhound/examples/arith/Makefile.in
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/arith/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/arith/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,58 @@
+# Makefile for arith example
+
+
+# -------- external tools and libraries --------
+# paths to the relevant subsystems
+SMBASE        := @SMBASE@
+AST           := @AST@
+ELKHOUND      := @ELKHOUND@
+
+CXX := @CXX@
+
+# Elkhound runtime support library
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# -------- compiler and linker configuration --------
+# preprocessing flags
+CPPFLAGS := -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+
+CCFLAGS := @CCFLAGS@ -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+
+# linking flags
+LDFLAGS := $(LIBELKHOUND) $(SMBASE)/libsmbase.a
+
+
+# -------- targets --------
+# main target
+all: arith
+
+# tell 'make' that it cannot compile arith.cc until after
+# it has generated arith.gr.gen.h
+arith.o: arith.gr.gen.h
+
+# invoke the parser generator
+arith.gr.gen.cc arith.gr.gen.h: arith.gr
+	$(ELKHOUND)/elkhound -v -o arith.gr.gen arith.gr
+
+# invoke the lexer generator
+arithyy.cc: arith.lex
+	flex -o$@ arith.lex
+
+# compile a C++ source file
+%.o: %.cc
+	$(CXX) -c $(CCFLAGS) $(CPPFLAGS) $*.cc
+
+# link the driver code with the generated parser and lexer;
+# also run it with a test input
+arith: arith.o arithyy.o arith.gr.gen.o
+	$(CXX) -o $@ -g $^ $(LDFLAGS)
+	echo "3 + 4 * 5" | ./arith 
+	echo "3 + 4 * 5" | ./arith printTree
+
+
+clean:
+	rm -f arith *.bin *.gen.* *.o
+
+toolclean: clean
+	rm -f arithyy.cc

Added: vendor/elsa/2007-04-14/elkhound/examples/arith/configure
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/arith/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/arith/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/2007-04-14/elkhound/examples/arith/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/elkhound/examples/cdecl/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/cdecl/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/cdecl/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,53 @@
+# Makefile for cdecl example
+
+
+# -------- external tools and libraries --------
+# paths to the relevant subsystems
+SMBASE        := ../../../smbase
+AST           := ../../../ast
+ELKHOUND      := ../..
+
+# Elkhound runtime support library
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# -------- compiler and linker configuration --------
+# preprocessing flags
+CPPFLAGS := -I$(ELKHOUND) -I$(ELKHOUND)/c -I$(AST) -I$(SMBASE)
+
+# C++ compilation flags
+#CCFLAGS := -g -Wall -Wno-deprecated
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+
+# linking flags
+LDFLAGS := $(LIBELKHOUND) $(AST)/libast.a $(SMBASE)/libsmbase.a
+
+
+# -------- targets --------
+# main target
+all: cdecl
+
+# extra object files
+extras := \
+  $(ELKHOUND)/c/parssppt.o \
+  $(ELKHOUND)/c/lexer2.o \
+  $(ELKHOUND)/c/lexer1.o \
+  $(ELKHOUND)/c/lexer1yy.o \
+  $(ELKHOUND)/c/cc_lang.o
+
+# invoke the parser generator
+cdecl.gr.gen.cc cdecl.gr.gen.h: cdecl.gr
+	$(ELKHOUND)/elkhound -v -o cdecl.gr.gen cdecl.gr
+
+# compile a C++ source file
+%.o: %.cc
+	g++ -c $(CCFLAGS) $(CPPFLAGS) $*.cc
+
+# link the driver code with the generated parser and lexer;
+# also run it with a test input
+cdecl: $(ELKHOUND)/glrmain.o cdecl.gr.gen.o
+	g++ -g -o $@ $^ $(extras) $(LDFLAGS)
+	./cdecl $(ELKHOUND)/in/cdecl.in1
+
+clean:
+	rm -f cdecl *.bin *.gen.* *.o gdb.log

Added: vendor/elsa/2007-04-14/elkhound/examples/cexp/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/cexp/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/cexp/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,72 @@
+# Makefile for cexp examples
+
+
+# -------- external tools and libraries --------
+# paths to the relevant subsystems
+SMBASE        := ../../../smbase
+AST           := ../../../ast
+ELKHOUND      := ../..
+
+# Elkhound runtime support library
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# -------- compiler and linker configuration --------
+# preprocessing flags
+CPPFLAGS := -I$(ELKHOUND) -I$(ELKHOUND)/c -I$(AST) -I$(SMBASE)
+
+# C++ compilation flags
+#CCFLAGS := -g -Wall -Wno-deprecated
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+
+# linking flags
+LDFLAGS := $(LIBELKHOUND) $(AST)/libast.a $(SMBASE)/libsmbase.a
+
+
+# -------- generic rules --------
+# invoke the parser generator
+%.gr.gen.cc %.gr.gen.h: %.gr
+	$(ELKHOUND)/elkhound -v -o $*.gr.gen $*.gr
+
+# invoke the AST generator
+%.ast.gen.cc %.ast.gen.h: %.ast
+	$(AST)/astgen -b$*.ast.gen $*.ast
+
+# compile a C++ source file
+%.o: %.cc
+	g++ -c $(CCFLAGS) $(CPPFLAGS) $*.cc
+
+
+# -------- targets --------
+# main target
+all: cexp3ast.ast.gen.h cexp3 cexp3b
+
+# extra object files
+extras := \
+  $(ELKHOUND)/c/parssppt.o \
+  $(ELKHOUND)/c/lexer2.o \
+  $(ELKHOUND)/c/lexer1.o \
+  $(ELKHOUND)/c/lexer1yy.o \
+  $(ELKHOUND)/c/cc_lang.o
+
+# cexp3b: disambiguation using 'merge'
+cexp3b.gr: cexp3.gr
+	rm -f $@
+	grep -v PREC cexp3.gr >$@
+	chmod a-w $@
+
+cexp3: $(ELKHOUND)/glrmain.o cexp3.gr.gen.o cexp3mrg.o cexp3ast.ast.gen.o 
+	g++ -g -o $@ $^ $(extras) $(LDFLAGS)
+	./$@ $(ELKHOUND)/in/cexp3.in1 | tee tmp.out
+	grep 'result: 7' tmp.out
+	rm tmp.out
+
+cexp3b: $(ELKHOUND)/glrmain.o cexp3b.gr.gen.o cexp3mrg.o cexp3ast.ast.gen.o
+	g++ -g -o $@ $^ $(extras) $(LDFLAGS)
+	./$@ $(ELKHOUND)/in/cexp3.in1 | tee tmp.out
+	grep 'result: 7' tmp.out
+	rm tmp.out
+
+
+clean:
+	rm -f cexp3 cexp3b cexp3b.gr *.bin *.gen.* *.o

Added: vendor/elsa/2007-04-14/elkhound/examples/gcom/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/gcom/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/gcom/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,50 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+AST      := ../../../ast
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBAST      := $(AST)/libast.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+ast.h ast.cc: gcom.ast
+	$(AST)/astgen -o ast gcom.ast
+
+parser.o: gcom.h ast.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o ast.o eval.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "x := 2 + 3 + 4; print x" | ./lexer
+	echo "x := 2 + 3 + 4; print x" | ./parser -ast
+	echo "x := 2 + 3 + 4; print x" | ./parser -tree
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc ast.h ast.cc gmon.out
+

Added: vendor/elsa/2007-04-14/elkhound/examples/gcom1/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/gcom1/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/gcom1/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,44 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+parser.o: gcom.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "2 + 3" | ./lexer
+	echo "2 + 3" | ./parser
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc gmon.out
+

Added: vendor/elsa/2007-04-14/elkhound/examples/gcom4/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/gcom4/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/gcom4/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,44 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+parser.o: gcom.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "2 + 3" | ./lexer
+	echo "2 + 3" | ./parser
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc gmon.out
+

Added: vendor/elsa/2007-04-14/elkhound/examples/gcom5/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/gcom5/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/gcom5/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,45 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+parser.o: gcom.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "x := 2 + 3 + 4; print x" | ./lexer
+	echo "x := 2 + 3 + 4; print x" | ./parser
+	echo "x := 2 + 3 + 4; print x" | ./parser -tree
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc gmon.out
+

Added: vendor/elsa/2007-04-14/elkhound/examples/gcom7/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/gcom7/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/gcom7/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,50 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+AST      := ../../../ast
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBAST      := $(AST)/libast.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+ast.h ast.cc: gcom.ast
+	$(AST)/astgen -o ast gcom.ast
+
+parser.o: gcom.h ast.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o ast.o eval.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "x := 2 + 3 + 4; print x" | ./lexer
+	echo "x := 2 + 3 + 4; print x" | ./parser -ast
+	echo "x := 2 + 3 + 4; print x" | ./parser -tree
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc ast.h ast.cc gmon.out
+

Added: vendor/elsa/2007-04-14/elkhound/examples/scannerless/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/examples/scannerless/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/examples/scannerless/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,37 @@
+# Makefile for scannerless example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: sless
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+sless.h sless.cc: sless.gr
+	$(ELKHOUND)/elkhound sless.gr
+
+main.o: sless.h
+
+SLESS_OBJS := main.o sless.o
+sless: $(SLESS_OBJS)
+	g++ -o $@ $(SLESS_OBJS) $(LDFLAGS)
+
+check:
+	echo "a aa a aaa" | ./sless
+
+clean:
+	rm -f sless *.o sless.h sless.cc
+

Added: vendor/elsa/2007-04-14/elkhound/ocaml/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/ocaml/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/ocaml/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,107 @@
+# Makefile
+
+#tmp: lexer.cmo
+
+all: tobjpool main main.opt
+
+# directories
+ELKHOUND := ..
+
+# compiler options
+OCAMLCFLAGS := -noassert
+#OCAMLCFLAGS :=
+
+#OCAMLOPTFLAGS := $(OCAMLCFLAGS) -p
+OCAMLOPTFLAGS := $(OCAMLCFLAGS)
+
+# using dependency strategy from 
+# http://www.cs.berkeley.edu/~smcpeak/autodepend/autodepend.html
+%.cmo: %.ml
+	ocamlc -c -g $(OCAMLCFLAGS) $*.ml
+	@ocamldep $*.ml > $*.d
+
+# I'll try maintaining separate dependency info for .cmo and .cmx
+%.cmx: %.ml
+	ocamlopt -c $(OCAMLOPTFLAGS) $*.ml
+	@ocamldep $*.ml > $*.dx
+
+# run elkhound on a grammar spec
+# (for now I don't want to use the interface stuff)
+# 
+# cygwin bug...
+#%.ml: %.gr $(ELKHOUND)/elkhound
+%.ml: %.gr
+	$(ELKHOUND)/elkhound -ocaml -v $*.gr
+	rm -f $*.mli
+
+# run ocamllex on a lex spec
+%.ml: %.mll
+	ocamllex $*.mll
+
+# run ocamlyacc on a parser spec
+%.ml: %.mly
+	ocamlyacc $*.mly
+	rm -f $*.mli
+
+# NOTE: Module order is important!  OCaml module dependencies cannot
+# be cyclic, and the order presented must respect the dependency order.
+
+# test program for objpool module
+TOBJPOOL_MODULES = \
+  arraystack.cmo \
+  objpool.cmo \
+  tobjpool.cmo
+tobjpool: $(TOBJPOOL_MODULES)
+	ocamlc -o $@ -g $^
+
+tobjpool.opt: $(TOBJPOOL_MODULES:.cmo=.cmx)
+	ocamlopt $(OCAMLOPTFLAGS) -o $@ $^
+
+# these are the minimal set of modules needed for an elkhound parser
+MINIMAL_MODULES = \
+  smutil.cmo \
+  useract.cmo \
+  lexerint.cmo \
+  parsetables.cmo \
+  arraystack.cmo \
+  objpool.cmo \
+  glr.cmo
+
+# these are modules for the test program; they include some specific 
+# grammar tables/actions, a lexer, a deterministic LR parser, the
+# parse-tree-printing stuff (ptreenode, ptreeact), and a main() function
+MAIN_MODULES = \
+  $(MINIMAL_MODULES) \
+  arith.cmo \
+  een.cmo \
+  lrparse.cmo \
+  ptreenode.cmo \
+  ptreeact.cmo \
+  lexer.cmo \
+  oc_arith.cmo \
+  main.cmo
+main: $(MAIN_MODULES)
+	ocamlc -o $@ -g $^
+
+main.opt: $(MAIN_MODULES:.cmo=.cmx)
+	ocamlopt $(OCAMLOPTFLAGS) -o $@ $^
+
+# dependencies
+ALL_MODULES = \
+  $(MAIN_MODULES) \
+  tobjpool.cmo
+-include $(ALL_MODULES:.cmo=.d)
+-include $(ALL_MODULES:.cmo=.dx)
+
+# run it a bunch of ways
+check:
+	echo "2+3" | ./main arith lr
+	echo "2+3" | ./main arith glr
+	echo "2+3" | ./main een glr
+	echo "2+3+4" | ./main een glr ptree
+	@echo ""
+	@echo Tests PASSED
+
+clean:
+	rm -f *.cmo *.cmi *.d *.cmx *.dx
+	rm -f arith.ml* een.ml* lexer.ml main tobjpool

Added: vendor/elsa/2007-04-14/elkhound/ocaml/occ2/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/ocaml/occ2/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/ocaml/occ2/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,16 @@
+# Makefile
+
+ELKHOUND := ../..
+
+all: tokens.tok occ2.ml
+
+# generate token codes for Elkhound
+tokens.tok: tokens.h
+	$(ELKHOUND)/make-tok Token <tokens.h >tokens.tok
+
+# run elkhound on a grammar spec
+%.ml: %.gr tokens.tok
+	$(ELKHOUND)/elkhound -v $*.gr
+	rm -f $*.mli
+
+

Added: vendor/elsa/2007-04-14/elkhound/toplevel/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elkhound/toplevel/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/toplevel/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,10 @@
+# Makefile for toplevel of Elkhound
+# just ties these things together
+
+all:
+	cd smbase; $(MAKE)
+	cd ast; $(MAKE)
+	cd parsgen; $(MAKE)
+	@echo ""
+	@echo "Done building Elkhound.  The main files of interest are"
+	@echo "in the parsgen/ directory; see its readme.txt."

Added: vendor/elsa/2007-04-14/elkhound/toplevel/configure
===================================================================
--- vendor/elsa/2007-04-14/elkhound/toplevel/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elkhound/toplevel/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,5 @@
+#!/bin/sh
+# configure script for toplevel of Elkhound
+
+cd parsgen
+./configure


Property changes on: vendor/elsa/2007-04-14/elkhound/toplevel/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/elsa/Makefile.in
===================================================================
--- vendor/elsa/2007-04-14/elsa/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elsa/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,528 @@
+# Makefile.in
+# this is the Makefile for Elsa, the Elkhound-based C++ Parser
+
+#temporary: iptree iptparse cipart smin
+
+# main target: a C++ parser
+all: cc.ast.gen.h tlexer ccparse quicktest packedword_test
+
+# work in progress..
+#iptree smin cipart
+
+# directories of other software
+SMBASE   := @SMBASE@
+AST      := @AST@
+ELKHOUND := @ELKHOUND@
+
+# stuff inside those other directories
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+LIBAST      := $(AST)/libast.a
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+# external tools
+PERL := @PERL@
+MYFLEX := $(PERL) $(SMBASE)/run-flex.pl -nobackup -copies
+DEP := $(PERL) $(SMBASE)/depend.pl
+
+# list of files to clean in 'clean' (etc.) targets
+# (these get added to below)
+TOCLEAN =
+TOTOOLCLEAN =
+TODISTCLEAN =
+
+# re-create the Makefile if Makefile.in has changed
+TODISTCLEAN += Makefile
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl $(SMBASE)/sm_config.pm
+	./config.status -reconfigure
+
+# dependencies upon automatically-generated files
+extradep.mk:
+	$(PERL) $(ELKHOUND)/find-extra-deps *.d >$@
+
+-include extradep.mk
+
+# modules to compile with coverage info; I do not build them
+# all with coverage info because it takes about 25% longer to
+# compile for each module with coverage info
+GCOV_MODS := @GCOV_MODS@
+TOCLEAN += *.bb *.bbg *.da
+
+
+# --------------------- extension modules ----------------------
+# base modules
+LEXER_MODS  := cc.lex
+TOK_MODS    := cc_tokens.tok
+CC_AST_MODS := cc.ast
+CC_GR_MODS  := cc.gr
+EXT_OBJS    :=
+
+# type checker
+CC_AST_MODS += cc_tcheck.ast
+
+# pretty printer
+CC_AST_MODS += cc_print.ast
+
+# control flow graph
+CC_AST_MODS += cfg.ast
+
+# elaboration pass
+CC_AST_MODS += cc_elaborate.ast
+
+
+# optional: GNU language extension
+USE_GNU := @USE_GNU@
+ifeq ($(USE_GNU),1)
+  LEXER_MODS  += gnu.lex
+  TOK_MODS    += gnu_ext.tok
+  CC_AST_MODS += gnu.ast
+  CC_GR_MODS  += gnu.gr
+  EXT_OBJS    += gnu.o
+endif
+
+
+# optional: K&R language extension
+USE_KANDR := @USE_KANDR@
+ifeq ($(USE_KANDR),1)
+  CC_AST_MODS += kandr.ast
+  CC_GR_MODS  += kandr.gr
+  EXT_OBJS    += kandr.o
+endif
+
+
+# ----------------------- compiler configuration -------------------
+# C++ preprocessor, compiler and linker
+CXX := @CXX@
+
+# flags for the C++ compiler (and preprocessor)
+CCFLAGS := @CCFLAGS@ -Woverloaded-virtual -I$(SMBASE) -I$(AST) -I$(ELKHOUND)
+
+# how to enable coverage
+GCOV_OPTS := -fprofile-arcs -ftest-coverage
+
+# flags for the linker
+libraries := $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+LDFLAGS := @LDFLAGS@ $(libraries)
+
+
+# compile .cc in this directory to a .o
+TOCLEAN += *.o *.d
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(if $(findstring $*,$(GCOV_MODS)),$(GCOV_OPTS) )$(CCFLAGS)
+	@$(DEP)   -o $@ $< $(if $(findstring $*,$(GCOV_MODS)),$(GCOV_OPTS) )$(CCFLAGS) >$*.d
+
+# compile a special module; -O0 will override any earlier setting
+notopt.o: notopt.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS) -O0
+	@$(DEP)   -o $@ $< $(CCFLAGS) -O0 >$*.d
+
+
+# ------------------------ tlexer -------------------
+LEXER_OBJS := \
+  cc_lang.o \
+  baselexer.o \
+  lexer.o \
+  lexer.yy.o \
+  cc_tokens.o
+-include $(LEXER_OBJS:.o=.d)
+-include tlexer.d
+
+# program to test the lexer alone
+TOCLEAN += tlexer
+tlexer: tlexer.o $(LEXER_OBJS) $(libraries)
+	$(CXX) -o $@ tlexer.o $(LEXER_OBJS) $(LDFLAGS)
+
+
+# ------------------------ packedword_test -------------------
+# program to test packedword
+TOCLEAN += packedword_test
+packedword_test: packedword_test.o $(libraries)
+	$(CXX) -o $@ packedword_test.o $(LDFLAGS)
+
+
+# ------------------------- xml serialization / de-serialization ---------------------
+
+#### single-source of lexing token definitions:
+
+# basic, file, and typesystem xml lexer files generated by token.pl;
+# the ast tokens are generated by astgen elsewhere
+
+TOKENS_FILES :=
+TOKENS_FILES += xml_basic.tokens
+TOKENS_FILES += xml_file.tokens
+TOKENS_FILES += xml_type.tokens
+TOKENS_FILES += xml_ast.gen.tokens
+
+XML_TYPE_LEXER :=
+XML_TYPE_LEXER += xml_enum_1.gen.h
+XML_TYPE_LEXER += xml_lex_1.gen.lex
+XML_TYPE_LEXER += xml_name_1.gen.cc
+
+TOCLEAN += $(XML_TYPE_LEXER)
+$(XML_TYPE_LEXER): $(TOKENS_FILES)
+	rm -f $@
+	$(PERL) token.pl $^
+
+
+#### LEX: flex-generated lexer
+
+# ast xml lexer/parser files generated by astgen
+XML_ASTGEN :=
+XML_ASTGEN += xml_ast.gen.tokens
+XML_ASTGEN += xml_ast_reader_0decl.gen.h
+XML_ASTGEN += xml_ast_reader_1defn.gen.cc
+XML_ASTGEN += xml_ast_reader_2ctrc.gen.cc
+XML_ASTGEN += xml_ast_reader_3regc.gen.cc
+
+TOCLEAN += $(XML_ASTGEN)
+$(XML_ASTGEN): $(CC_AST_MODS) $(AST)/astgen
+	rm -f $(XML_ASTGEN)
+	$(AST)/astgen -tr no_ast.gen,xmlParser $(CC_AST_MODS)
+	chmod a-w $(XML_ASTGEN)
+
+# generate .lex file
+TOCLEAN += xml_lex.gen.lex
+xml_lex.gen.lex: xml_lex_0top.lex xml_lex_1.gen.lex xml_lex_2bot.lex
+	rm -f $@
+	cat $^ > $@
+	chmod a-w $@
+
+# run flex on the lexer description for ast xml parser
+TOCLEAN += xml_lex.gen.yy.cc
+xml_lex.gen.yy.cc: xml_lex.gen.lex xml_lexer.h
+	$(MYFLEX) -o$@ xml_lex.gen.lex
+
+# when building the ast xml lexer, delete the methods that would
+# otherwise conflict with methods in lexer.yy.cc; they have identical
+# implementations
+xml_lexer.yy.o: xml_lex.gen.yy.cc
+	$(CXX) -c -o $@ $< -DNO_YYFLEXLEXER_METHODS $(CCFLAGS)
+	@$(DEP)   -o $@ $< -DNO_YYFLEXLEXER_METHODS $(CCFLAGS) >$*.d
+# We do not need this now but we will if we end up re-arranging the
+# build process like I had to in oink so I put it here as a reminder.
+# -include xml_lexer.yy.d
+
+
+#### CC client code
+
+# all the xml-related .o files
+XML_OBJS :=
+# lex
+XML_OBJS += xml_lexer.yy.o
+XML_OBJS += xml_lexer.o
+# generic parse
+XML_OBJS += xml_reader.o
+XML_OBJS += xml_writer.o
+# specific parse
+XML_OBJS += xml_file_reader.o
+XML_OBJS += xml_file_writer.o
+XML_OBJS += xml_type_reader.o
+XML_OBJS += xml_type_writer.o
+XML_OBJS += xml_ast_reader.o
+XML_OBJS += id_obj_dict.o
+# final client
+XML_OBJS += xml_do_read.o
+
+# I don't think I need this line:
+# -include $(CCPARSE_OBJS:.o=.d) main.d
+# because of this line:
+# -include $(XML_OBJS:.o=.d)
+
+
+# ------------------------- ccparse ---------------------
+# combine base lexer description and extensions
+TOCLEAN += lexer.lex
+lexer.lex: $(LEXER_MODS) merge-lexer-exts.pl
+	rm -f $@
+	$(PERL) merge-lexer-exts.pl $(LEXER_MODS) >$@
+	chmod a-w $@
+
+
+# run flex on the lexer description
+TOCLEAN += lexer.yy.cc
+lexer.yy.cc: lexer.lex lexer.h
+	$(MYFLEX) -o$@ lexer.lex
+
+
+# generate token lists
+TOK_FILES := cc_tokens.h cc_tokens.cc cc_tokens.ids
+TOCLEAN += $(TOK_FILES)
+$(TOK_FILES): $(TOK_MODS) make-token-files
+	rm -f $(TOK_FILES)
+	$(PERL) make-token-files $(TOK_MODS)
+	chmod a-w $(TOK_FILES)
+
+
+# run astgen to generate the AST implementation
+CC_AST_GEN_FILES := cc.ast.gen.h cc.ast.gen.cc
+TOCLEAN += $(CC_AST_GEN_FILES)
+$(CC_AST_GEN_FILES): $(CC_AST_MODS) $(AST)/astgen
+	rm -f $(CC_AST_GEN_FILES)
+	$(AST)/astgen -occ.ast.gen $(CC_AST_MODS)
+	chmod a-w $(CC_AST_GEN_FILES)
+
+
+# run elkhound to generate the parser
+CC_GR_GEN_FILES := cc.gr.gen.h cc.gr.gen.cc cc.gr.gen.out
+TOCLEAN += $(CC_GR_GEN_FILES)
+$(CC_GR_GEN_FILES): $(CC_GR_MODS) cc_tokens.ids $(ELKHOUND)/elkhound
+	rm -f $(CC_GR_GEN_FILES)
+	$(ELKHOUND)/elkhound -v -tr lrtable -o cc.gr.gen $(CC_GR_MODS)
+	chmod a-w $(CC_GR_GEN_FILES)
+
+# list of modules needed for the parser; ideally they're in an order
+# that finds serious compilation problems earliest (it's ok to
+# rearrange as different parts of the code are in flux)
+CCPARSE_OBJS := \
+  mtype.o \
+  integrity.o \
+  astvisit.o \
+  template.o \
+  notopt.o \
+  cc_env.o \
+  cc_tcheck.o \
+  const_eval.o \
+  implint.o \
+  serialno.o \
+  cc_scope.o \
+  cc_elaborate.o \
+  ast_build.o \
+  $(LEXER_OBJS) \
+  $(XML_OBJS) \
+  $(EXT_OBJS) \
+  builtinops.o \
+  cfg.o \
+  sprint.o \
+  mangle.o \
+  cc_err.o \
+  cc_type.o \
+  stdconv.o \
+  implconv.o \
+  overload.o \
+  typelistiter.o \
+  cc.ast.gen.o \
+  cc.gr.gen.o \
+  parssppt.o \
+  cc_flags.o \
+  cc_print.o \
+  cc_ast_aux.o \
+  variable.o \
+  lookupset.o \
+  ccparse.o
+-include $(CCPARSE_OBJS:.o=.d) main.d
+
+
+# parser binary
+TOCLEAN += ccparse
+ccparse: $(CCPARSE_OBJS) main.o $(libraries)
+	$(CXX) -o $@ $(CCPARSE_OBJS) main.o $(LDFLAGS)
+
+
+# run the binary; the 'quicktest' file is so we don't run it if
+# 'ccparse' hasn't recently changed
+TOCLEAN += quicktest
+quicktest: ccparse
+	./ccparse in/t0001.cc
+	@touch quicktest
+	@echo BUILD FINISHED
+
+
+# -------------------- semgrep --------------------
+TOCLEAN += semgrep
+semgrep: $(CCPARSE_OBJS) semgrep.o $(libraries) $(LIBSMBASE)
+	$(CXX) -o $@ $(CCPARSE_OBJS) semgrep.o $(LDFLAGS)
+
+
+# --------------------- iptree --------------------
+TOCLEAN += iptree
+iptree: iptree.cc $(LIBSMBASE)
+	$(CXX) -o $@ $(CCFLAGS) -DTEST_IPTREE iptree.cc $(LDFLAGS)
+
+
+# -------------------- iptparse -------------------
+TOCLEAN += iptparse
+iptparse: iptparse.cc iptree.o iptparse.yy.o $(LIBSMBASE)
+	$(CXX) -o $@ $(CCFLAGS) -DTEST_IPTPARSE iptparse.cc iptree.o iptparse.yy.o $(LDFLAGS)
+
+
+# ---------------------- smin ---------------------
+# lexer for interval partition tree specs
+TOCLEAN += iptparse.yy.cc
+iptparse.yy.cc: iptparse.lex
+	flex -o$@ iptparse.lex
+
+iptparse.yy.o: iptparse.h
+
+SMIN_OBJS := \
+  iptparse.o \
+  iptparse.yy.o \
+  iptree.o \
+  smin.o
+-include $(SMIN_OBJS:.o=.d)
+
+TOCLEAN += smin
+smin: $(SMIN_OBJS) $(LIBSMBASE)
+	$(CXX) -o $@ $(SMIN_OBJS) $(LDFLAGS)
+
+
+# --------------------- cipart --------------------
+TOCLEAN += cipart.yy.cc
+cipart.yy.cc: cipart.lex
+	flex -o$@ cipart.lex
+
+-include cipart.yy.d
+
+cipart: cipart.yy.o $(LIBSMBASE)
+	$(CXX) -o $@ cipart.yy.o $(LDFLAGS)
+
+
+# ---------------------- misc ---------------------
+# rule to decompress one of the big examples
+TODISTCLEAN += in/big/*.i
+in/big/%.i: in/big/gz/%.i.gz
+	gunzip -c <$^ >$@
+# comment out line directives
+	$(PERL) -i -lpe 's|^\W*(#.*)$$|//$$1|' $@
+# this line is illegal C++ and for now we just comment it out
+	$(PERL) -i -lpe 's|^(\W*)(char ip_opts\[40\];)\W*$$|$$1//$$2|' $@
+# change "((void *)0)" to "0" to compensate for a bad NULL macro somewhere...
+	$(PERL) -i -lpe 's|\(\(void \*\)0\)|0|' $@
+# define bad_alloc, don't just declare it
+	$(PERL) -i -lpe 's|class bad_alloc;|class bad_alloc {};|' $@
+
+# decompress all of them which haven't already been decompressed
+.PHONY: in/big
+in/big: $(patsubst in/big/gz/%.i.gz,in/big/%.i,$(wildcard in/big/gz/*.gz))
+	@echo made $@
+
+
+# ------------------ documentation ------------------
+gendoc:
+	mkdir gendoc
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+# The list of excluded header files is somewhat arbitrary.  Basically,
+# I look at the generated .ps file, and if it is too cluttered, I pick
+# some header that is uninteresting or ubiquitous and exclude it.  The
+# intent is to see the forest by excluding some of the trees, but
+# there's some judgment involved in picking the trees to see.
+#
+# Also, I say the target is .PHONY because I don't want to actually
+# list all the dependencies (essentially, every source file is a
+# dependency), but if no dependencies are listed then 'make' won't
+# build it if it exists.
+.PHONY: gendoc/dependencies.dot
+gendoc/dependencies.dot:
+	$(PERL) $(SMBASE)/scan-depends.pl -r \
+	  -Xcc_env.h=1 -Xcc_type.h=1 -Xcc_flags.h=1 -Xcc_ast.h=1 -Xvariable.h=1 \
+          -Xcc_print.h -Xsprint.h -Xxml_type_reader.h -Xxml_type_writer.h -Xxml_ast_reader.h \
+          -Xxml_do_read.h \
+	  -Xgeneric_aux.h -Xcc_ast_aux.h -Xcc_lang.h=1 \
+	  main.cc cc_tcheck.cc >$@
+
+gendoc/3.4.5.dot: ccparse in/std/3.4.5.cc
+	./ccparse -tr printHierarchies in/std/3.4.5.cc | \
+	$(PERL) chop_out "--- E ---" "--- F ---" >$@
+
+# because of the above dependency on ccparse, if someone does 'make doc'
+# without first building Elsa, they get an error about libsmbase.a; so
+# this is an attempt to deal with that more gracefully
+$(SMBASE)/libsmbase.a:
+	@echo "You have to build smbase, ast and elkhound first."
+	@exit 2
+
+# check to see if they have dot
+.PHONY: dot
+dot:
+	@if ! which dot >/dev/null; then \
+	  echo "You don't have the 'dot' tool.  It is part of graphviz, available at:"; \
+	  echo "http://www.research.att.com/sw/tools/graphviz/"; \
+	  exit 2; \
+	fi
+
+# use 'dot' to lay out the graph
+%.ps: %.dot dot
+	dot -Tps <$*.dot >$@
+
+# use 'convert' to make a PNG image with resolution not to exceed
+# 1200 in X or 1000 in Y ('convert' will preserve aspect ratio); this
+# also antialiases, so it looks very nice (it's hard to reproduce
+# this using 'gs' alone)
+%.png: %.ps
+	convert -geometry 1200x1000 $^ $@
+
+# 3.4.5 is smaller
+gendoc/3.4.5.png: gendoc/3.4.5.ps
+	convert -geometry 300x400 $^ $@
+
+.PHONY: doc
+doc: gendoc gendoc/configure.txt gendoc/dependencies.png gendoc/3.4.5.png
+	@echo "built documentation"
+
+#TOCLEAN += TAGS
+#TAGS:
+#	@ETAGS@ *.cc *.h
+
+
+# -------------------- count source lines -------------------
+# dsw: This should give the right answer even after a "make all",
+# since we filter the generated files.
+#
+# sm: I haven't carefully inspected the set of files counted,
+# and it appears to not count cc_tokens.tok (which it should).
+# I don't care about fixing right now it though.
+
+GENREGEX := '\.gen\.\|lexer\.yy\|cc_tokens'
+.PHONY: count-loc
+count-loc:
+	@echo
+	@echo "Count of lines of source code in this directory by file type."
+	@echo "C++, C, and headers:"
+# 	@ls *.cc *.c *.h | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@ls *.cc *.h | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@echo "tok, lex, gr, and ast:"
+# 	@ls *_ext.tok *_ext.lex *.gr *.ast | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@ls *_ext.tok *.gr *.ast | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@echo "sum of those:"
+# 	@ls *.cc *.c *.h *_ext.tok *_ext.lex *.gr *.ast
+	@ls *.cc *.h *_ext.tok *.gr *.ast \
+          | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@echo
+	@echo "Makefiles:"
+	@ls Makefile.in *.mk | xargs wc -l | grep total
+
+
+# -------------------- clean, etc. -------------------
+clean:
+	rm -f $(TOCLEAN) gmon.out
+	cd outdir && ls | grep -v CVS | xargs rm -f
+
+distclean: clean
+	rm -f $(TODISTCLEAN)
+	rm -f config.status config.summary
+	rm -rf gendoc
+
+toolclean: clean
+	rm -f $(TOTOOLCLEAN)
+
+check: semgrep all
+	./packedword_test
+	MAKE=$(MAKE) ./regrtest
+	@echo ""
+	@echo "Regression tests passed."
+
+# run the xml commutative diagram tests
+.PHONY: checkxml
+checkxml:
+	$(MAKE) -f xml_test.mk
+	@echo ""
+	@echo "XML tests passed."
+
+# run all the tests
+.PHONY: check-full
+check-full: check checkxml

Added: vendor/elsa/2007-04-14/elsa/configure
===================================================================
--- vendor/elsa/2007-04-14/elsa/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elsa/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/2007-04-14/elsa/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/elsa/in/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elsa/in/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elsa/in/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,26 @@
+# Makefile for in/
+# produces some autogenerated tests
+
+all: t0539
+
+
+T0539 :=
+T0539 += t0539_1.cc
+T0539 += t0539_2.cc
+T0539 += t0539_3.cc
+T0539 += t0539_4.cc
+T0539 += t0539_5.cc
+T0539 += t0539_6.cc
+T0539 += t0539_7.cc
+T0539 += t0539_8.cc
+T0539 += t0539_9.cc
+T0539 += t0539_10.cc
+T0539 += t0539_11.cc
+
+.PHONY: t0539
+t0539: $(T0539)
+
+t0539_%.cc: t0539.cc
+	rm -f $@
+	cpp -C $^ -DSEL=$* >$@
+	chmod a-w $@

Added: vendor/elsa/2007-04-14/elsa/toplevel/Makefile
===================================================================
--- vendor/elsa/2007-04-14/elsa/toplevel/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elsa/toplevel/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,32 @@
+# Makefile for toplevel elsa distribution
+
+# just do the obvious recursive thing
+all:
+	$(MAKE) -C smbase
+	$(MAKE) -C ast
+	$(MAKE) -C elkhound
+	$(MAKE) -C elsa
+
+check:
+	$(MAKE) -C smbase check
+	$(MAKE) -C ast check
+	$(MAKE) -C elkhound check
+	$(MAKE) -C elsa check
+
+clean:
+	$(MAKE) -C smbase clean
+	$(MAKE) -C ast clean
+	$(MAKE) -C elkhound clean
+	$(MAKE) -C elsa clean
+
+distclean:
+	$(MAKE) -C smbase distclean
+	$(MAKE) -C ast distclean
+	$(MAKE) -C elkhound distclean
+	$(MAKE) -C elsa distclean
+
+doc:
+	$(MAKE) -C smbase doc
+	$(MAKE) -C ast doc
+	$(MAKE) -C elkhound doc
+	$(MAKE) -C elsa doc

Added: vendor/elsa/2007-04-14/elsa/toplevel/configure
===================================================================
--- vendor/elsa/2007-04-14/elsa/toplevel/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/elsa/toplevel/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,11 @@
+#!/bin/sh
+# toplevel elsa distribution configure
+
+# for now, just fire off default configurations
+# in each of the subdirs; users can then go customize
+# as desired
+
+(cd smbase && ./configure "$@") || exit
+(cd ast && ./configure "$@") || exit
+(cd elkhound && ./configure "$@") || exit
+(cd elsa && ./configure "$@") || exit


Property changes on: vendor/elsa/2007-04-14/elsa/toplevel/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/2007-04-14/smbase/Makefile.in
===================================================================
--- vendor/elsa/2007-04-14/smbase/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/smbase/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,424 @@
+# Makefile.in for libsmbase
+# see license.txt for copyright and terms of use
+
+# main target
+THIS := libsmbase.a
+all: gensrc $(THIS)
+
+
+# C preprocessor, compiler and linker
+CC := @CC@
+
+# C++ compiler, etc.
+CXX := @CXX@
+
+# flags for the C and C++ compilers (and preprocessor)
+CFLAGS  := @CFLAGS@
+CCFLAGS := @CCFLAGS@
+
+# cross-compile info
+CROSSTARGET   := @CROSSTARGET@
+EXE           := @EXE@
+
+# flags for the linker
+LDFLAGS := -g -Wall libsmbase.a
+
+
+# some other tools
+AR     := ar
+RANLIB := ranlib
+
+
+# compile .cc to .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl ./depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+%.o: %.cpp
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl ./depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+%.o: %.c
+	$(CC) -c -o $@ $< $(CFLAGS)
+	@perl ./depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+
+# remake the generated Makefile if its inputs have changed
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl sm_config.pm
+	./config.status -reconfigure
+
+
+# -------- experimenting with m4 for related files -------
+# I don't delete these during make clean because I don't want
+# to force people to have m4 installed
+gensrc: sobjlist.h objlist.h
+
+sobjlist.h: xobjlist.h
+	rm -f sobjlist.h
+	m4 -Dm4_output=sobjlist.h --prefix-builtins xobjlist.h > sobjlist.h
+	chmod a-w sobjlist.h
+
+objlist.h: xobjlist.h
+	rm -f objlist.h
+	m4 -Dm4_output=objlist.h --prefix-builtins xobjlist.h > objlist.h
+	chmod a-w objlist.h
+
+strobjdict.h strsobjdict.h strintdict.h: xstrobjdict.h
+	rm -f $@
+	m4 -Dm4_output=$@ --prefix-builtins $< > $@
+	chmod a-w $@
+
+
+# ----------------------- malloc ------------------------
+# Doug Lea's malloc:
+#   add the -DDEBUG flag to turn on doug lea's additional checks
+#   add the -DDEBUG_HEAP flag to turn on my zone-based protection
+#   add the -DTRACE_MALLOC_CALLS flag to print on every alloc/dealloc
+#   normally -O3 is specified
+MALLOC_CCFLAGS := -O3
+
+# By default, compile+link a stub module that does nothing, so that
+# we will just use the normal system malloc.  Only if the user wants
+# special malloc features will we switch to Doug Lea's.  The reason
+# is I've only tested my extra features on Linux, and on some other
+# systems (cygwin, OSX) they don't work and I don't have the inclination
+# to fix all my hacks.
+MALLOC_MODULE := malloc_stub
+
+# debug version (much slower, but *great* for finding memory errors)
+ifeq (@DEBUG_HEAP@,1)
+  MALLOC_CCFLAGS := -DDEBUG -DDEBUG_HEAP
+  MALLOC_MODULE := malloc
+endif
+
+# tracing messages
+ifeq (@TRACE_HEAP@,1)
+  MALLOC_CCFLAGS += -DTRACE_MALLOC_CALLS
+  MALLOC_MODULE := malloc
+endif
+
+$(MALLOC_MODULE).o: $(MALLOC_MODULE).c
+	$(CC) -c -g $(MALLOC_CCFLAGS) $(MALLOC_MODULE).c
+
+
+# --------------------- main target ---------------------
+
+# mysig needs some flags to *not* be set ....
+mysig.o: mysig.cc mysig.h
+	$(CXX) -c -g mysig.cc
+
+# library itself
+OBJS := \
+  autofile.o \
+  bflatten.o \
+  bit2d.o \
+  bitarray.o \
+  boxprint.o \
+  breaker.o \
+  crc.o \
+  cycles.o \
+  datablok.o \
+  d2vector.o \
+  exc.o \
+  flatten.o \
+  gprintf.o \
+  growbuf.o \
+  hashline.o \
+  hashtbl.o \
+  $(MALLOC_MODULE).o \
+  missing.o \
+  mypopen.o \
+  mysig.o \
+  nonport.o \
+  ofstreamts.o \
+  point.o \
+  pprint.o \
+  smregexp.o \
+  srcloc.o \
+  str.o \
+  strdict.o \
+  strhash.o \
+  stringset.o \
+  strtable.o \
+  strtokp.o \
+  strutil.o \
+  svdict.o \
+  syserr.o \
+  trace.o \
+  trdelete.o \
+  unixutil.o \
+  vdtllist.o \
+  vptrmap.o \
+  voidlist.o \
+  warn.o
+-include $(OBJS:.o=.d)
+
+# some modules do not build on mingw32; for the moment I do not need them
+ifeq ($(strip $(CROSSTARGET)),i386-mingw32msvc)
+  OBJS := $(filter-out mypopen.o mysig.o smregexp.o,$(OBJS))
+endif
+
+$(THIS): $(OBJS)
+	rm -f $(THIS)
+	$(AR) -r $(THIS) $(OBJS)
+	-$(RANLIB) $(THIS)
+
+
+# ---------- module tests ----------------
+# test program targets
+TESTS := nonport voidlist tobjlist bit2d growbuf testmalloc mypopen \
+         strdict svdict str strutil trdelete bflatten mysig \
+         testmalloc mypopen tobjpool strhash cycles tsobjlist crc \
+         srcloc hashline gprintf smregexp vptrmap vdtllist pprint \
+         boxprint tarrayqueue testarray taillist_test autofile \
+         bitarray d2vector
+
+# some programs do not build on mingw32
+ifeq ($(strip $(CROSSTARGET)),i386-mingw32msvc)
+  TESTS := $(filter-out testmalloc mypopen mysig smregexp,$(TESTS))
+endif
+
+TESTS := $(addsuffix $(EXE),$(TESTS))
+
+tests: $(TESTS)
+
+
+# command to compile and link
+TESTCC  := $(CC) -g -Wall
+TESTCXX := $(CXX) -g -Wall
+
+# this goes at the end of most commands that build a test binary
+TESTFLAGS := $(CCFLAGS) $(LDFLAGS)
+
+# this one is explicitly *not* linked against $(THIS)
+nonport$(EXE): nonport.cpp nonport.h gprintf.o
+	$(TESTCXX) -o $@ -DTEST_NONPORT nonport.cpp gprintf.o $(CCFLAGS)
+
+voidlist$(EXE): voidlist.cc voidlist.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_VOIDLIST voidlist.cc $(TESTFLAGS)
+
+vdtllist$(EXE): vdtllist.cc vdtllist.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_VDTLLIST vdtllist.cc $(TESTFLAGS)
+
+taillist_test$(EXE): taillist_test.cc taillist.h $(THIS)
+	$(TESTCXX) -o $@ taillist_test.cc $(TESTFLAGS)
+
+tobjlist$(EXE): tobjlist.cc objlist.h voidlist.o $(THIS)
+	$(TESTCXX) -o $@ tobjlist.cc voidlist.o $(TESTFLAGS)
+
+tsobjlist$(EXE): tsobjlist.cc sobjlist.h voidlist.o $(THIS)
+	$(TESTCXX) -o $@ tsobjlist.cc voidlist.o $(TESTFLAGS)
+
+bit2d$(EXE): bit2d.cc bit2d.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BIT2D bit2d.cc $(TESTFLAGS)
+
+growbuf$(EXE): growbuf.cc growbuf.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_GROWBUF growbuf.cc $(TESTFLAGS)
+
+strdict$(EXE): strdict.cc strdict.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STRDICT strdict.cc $(TESTFLAGS)
+
+svdict$(EXE): svdict.cc svdict.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_SVDICT svdict.cc $(TESTFLAGS)
+
+str$(EXE): str.cpp str.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STR str.cpp $(TESTFLAGS)
+
+strutil$(EXE): strutil.cc strutil.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STRUTIL strutil.cc $(TESTFLAGS)
+
+strhash$(EXE): strhash.cc strhash.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STRHASH strhash.cc $(TESTFLAGS)
+
+trdelete$(EXE): trdelete.cc trdelete.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_TRDELETE trdelete.cc $(TESTFLAGS)
+
+bflatten$(EXE): bflatten.cc bflatten.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BFLATTEN bflatten.cc $(TESTFLAGS)
+
+mysig$(EXE): mysig.cc mysig.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_MYSIG mysig.cc $(TESTFLAGS)
+
+testmalloc$(EXE): testmalloc.cc $(THIS)
+	echo TESTS is $(TESTS)
+	$(TESTCXX) -o $@ testmalloc.cc $(TESTFLAGS)
+
+mypopen$(EXE): mypopen.c mypopen.h
+	$(TESTCC) -o $@ -DTEST_MYPOPEN mypopen.c
+
+# this test is only useful when malloc is compiled with DEBUG_HEAP
+tmalloc$(EXE): tmalloc.c libsmbase.a
+	$(TESTCC) -o $@ tmalloc.c $(TESTFLAGS)
+
+tobjpool$(EXE): tobjpool.cc objpool.h
+	$(TESTCXX) -o $@ tobjpool.cc $(TESTFLAGS)
+
+cycles$(EXE): cycles.h cycles.c
+	$(TESTCC) -o $@ -DTEST_CYCLES cycles.c
+
+crc$(EXE): crc.cpp
+	$(TESTCXX) -o $@ $(CCFLAGS) -DTEST_CRC crc.cpp
+
+srcloc$(EXE): srcloc.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_SRCLOC srcloc.cc $(TESTFLAGS)
+
+hashline$(EXE): hashline.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_HASHLINE hashline.cc $(TESTFLAGS)
+
+gprintf$(EXE): gprintf.c gprintf.h
+	$(TESTCC) -o $@ -DTEST_GPRINTF gprintf.c $(CFLAGS)
+
+smregexp$(EXE): smregexp.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_SMREGEXP smregexp.cc $(TESTFLAGS)
+
+vptrmap$(EXE): vptrmap.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_VPTRMAP vptrmap.cc $(TESTFLAGS)
+
+pprint$(EXE): pprint.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_PPRINT pprint.cc $(TESTFLAGS)
+
+boxprint$(EXE): boxprint.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BOXPRINT boxprint.cc $(TESTFLAGS)
+
+tarrayqueue$(EXE): tarrayqueue.cc $(THIS)
+	$(TESTCXX) -o $@ tarrayqueue.cc $(TESTFLAGS)
+
+testarray$(EXE): testarray.cc $(THIS)
+	$(TESTCXX) -o $@ testarray.cc $(TESTFLAGS)
+
+autofile$(EXE): autofile.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_AUTOFILE autofile.cc $(TESTFLAGS)
+
+bitarray$(EXE): bitarray.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BITARRAY bitarray.cc $(TESTFLAGS)
+
+d2vector$(EXE): d2vector.c $(THIS)
+	$(TESTCXX) -o $@ -DTEST_D2VECTOR d2vector.c $(TESTFLAGS)
+
+
+ifeq ($(CROSSTARGET),0)
+  RUN :=
+else
+  # there is a necessary space at the end of the next line ...
+  RUN := true 
+endif
+
+# for now, check-full is just check
+.PHONY: check-full
+check-full: check
+
+check: $(TESTS)
+	$(RUN)./nonport$(EXE)
+	$(RUN)./voidlist$(EXE)
+	$(RUN)./vdtllist$(EXE)
+	$(RUN)./tobjlist$(EXE)
+	$(RUN)./bit2d$(EXE)
+	$(RUN)./growbuf$(EXE)
+	$(RUN)./strdict$(EXE)
+	$(RUN)./svdict$(EXE)
+	$(RUN)./str$(EXE)
+	$(RUN)./strutil$(EXE)
+	$(RUN)./strhash$(EXE)
+	$(RUN)./trdelete$(EXE)
+	$(RUN)./bflatten$(EXE)
+	$(RUN)./mysig$(EXE)
+	$(RUN)./testmalloc$(EXE) >/dev/null 2>&1
+	$(RUN)./mypopen$(EXE)
+	$(RUN)./tobjpool$(EXE)
+	$(RUN)./cycles$(EXE)
+	$(RUN)./tsobjlist$(EXE)
+	$(RUN)./hashline$(EXE)
+	$(RUN)./srcloc$(EXE)
+	$(RUN)./gprintf$(EXE)
+	$(RUN)./smregexp$(EXE)
+	$(RUN)./vptrmap$(EXE)
+	$(RUN)./pprint$(EXE)
+	$(RUN)./boxprint$(EXE)
+	$(RUN)./tarrayqueue$(EXE)
+	$(RUN)./testarray$(EXE)
+	$(RUN)./taillist_test$(EXE)
+	$(RUN)./autofile$(EXE) autofile.cc
+	$(RUN)./bitarray$(EXE)
+	$(RUN)./d2vector$(EXE)
+ifeq ($(CROSSTARGET),0)
+	@echo
+	@echo "make check: all the tests PASSED"
+else
+	@echo
+	@echo "make check: all the test programs were built, but I did not"
+	@echo "try to run any of them because of cross-compile mode; you"
+	@echo "may want to try running the above commands yourself on the target"
+	@echo "(remove the 'true' prefixes)"
+endif
+
+
+# ------------------- documentation -------------------------
+# directory of generated documentation
+gendoc:
+	mkdir gendoc
+
+# main dependencies for the library; some ubiquitous dependencies
+# are omitted to avoid too much clutter; the files listed below are
+# the roots of the dependency exploration; I don't include any of
+# the stand-alone programs since those are just clutter to someone
+# trying to understand the library's structure
+.PHONY: gendoc/dependencies.dot
+gendoc/dependencies.dot:
+	perl ./scan-depends.pl -r -Xxassert.h -Xtest.h -Xtyp.h -Xmacros.h -Xstr.h \
+		-Xbreaker.h \
+		growbuf.h objpool.h strhash.h voidlist.h svdict.h str.h \
+		warn.cpp mysig.h srcloc.cc hashline.cc astlist.h taillist.h \
+		objstack.h ohashtbl.h okhasharr.h okhashtbl.h sobjlist.h \
+		exc.h >$@
+
+# check to see if they have dot
+.PHONY: dot
+dot:
+	@if ! which dot >/dev/null; then \
+	  echo "You don't have the 'dot' tool.  You can get it at:"; \
+	  echo "http://www.research.att.com/sw/tools/graphviz/"; \
+	  exit 2; \
+	fi
+
+# use 'dot' to lay out the graph
+%.ps: %.dot dot
+	dot -Tps <$*.dot >$@
+
+# use 'convert' to make a PNG image with resolution not to exceed
+# 1000 in X or 700 in Y ('convert' will preserve aspect ratio); this
+# also antialiases, so it looks very nice (it's hard to reproduce
+# this using 'gs' alone)
+%.png: %.ps
+	convert -geometry 1000x700 $^ $@
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+# build auto-generated documentation
+.PHONY: doc
+doc: gendoc gendoc/dependencies.png gendoc/configure.txt
+	@echo "built documentation"
+
+
+# --------------------- clean --------------------
+# delete compiling/editing byproducts
+clean:
+	rm -f *.o *~ *.d gmon.out srcloc.tmp testcout
+	rm -f $(TESTS)
+	rm -f *.a
+	rm -rf test.dir
+
+distclean: clean
+	rm -f Makefile config.status config.summary
+	rm -rf gendoc
+
+# remove crap that vc makes
+vc-clean:
+	rm -f *.plg *.[ip]db *.pch
+
+
+# end of Makefile

Added: vendor/elsa/2007-04-14/smbase/configure
===================================================================
--- vendor/elsa/2007-04-14/smbase/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/2007-04-14/smbase/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/2007-04-14/smbase/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/Makefile
===================================================================
--- vendor/elsa/current/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,32 @@
+# Makefile for toplevel elsa distribution
+
+# just do the obvious recursive thing
+all:
+	$(MAKE) -C smbase
+	$(MAKE) -C ast
+	$(MAKE) -C elkhound
+	$(MAKE) -C elsa
+
+check:
+	$(MAKE) -C smbase check
+	$(MAKE) -C ast check
+	$(MAKE) -C elkhound check
+	$(MAKE) -C elsa check
+
+clean:
+	$(MAKE) -C smbase clean
+	$(MAKE) -C ast clean
+	$(MAKE) -C elkhound clean
+	$(MAKE) -C elsa clean
+
+distclean:
+	$(MAKE) -C smbase distclean
+	$(MAKE) -C ast distclean
+	$(MAKE) -C elkhound distclean
+	$(MAKE) -C elsa distclean
+
+doc:
+	$(MAKE) -C smbase doc
+	$(MAKE) -C ast doc
+	$(MAKE) -C elkhound doc
+	$(MAKE) -C elsa doc

Added: vendor/elsa/current/ast/Makefile.in
===================================================================
--- vendor/elsa/current/ast/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/ast/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,193 @@
+# Makefile.in for ast
+# see license.txt for copyright and terms of use
+
+# main targets
+all: ccsstr astgen libast.a example.o ext1.o
+
+
+# directories of other software
+SMBASE := @SMBASE@
+LIBSMBASE := $(SMBASE)/libsmbase.a
+
+# external tools
+PERL := @PERL@
+MYFLEX := $(PERL) $(SMBASE)/run-flex.pl
+
+# TODO: agramlex.yy.cc apparently has backing up, which should
+# ideally be removed; add -nobackup to the run-flex.pl command
+# line to see this
+
+
+# C++ compiler, etc.
+CXX := @CXX@
+
+# flags for the C and C++ compilers (and preprocessor)
+CCFLAGS := @CCFLAGS@ -I$(SMBASE)
+
+# flags for the linker
+LDFLAGS := -g -Wall $(LIBSMBASE)
+
+
+# some other tools
+AR     := ar
+RANLIB := ranlib
+
+
+# compile .cc to .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl $(SMBASE)/depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+
+# remake the generated Makefile if its inputs have changed
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl $(SMBASE)/sm_config.pm
+	./config.status -reconfigure
+
+
+# ---------------------- intermediate files -------------------
+# for bison-1.28:
+  # unfortunately, the way bison.simple declares YYSTYPE precludes a proper
+  # declaration of yylex(), unless I modify it as below; the 'grep' is so
+  # I have a .h file without the union, since the union refers to types
+  # whose declarations I'd like to avoid spreading everywhere
+# for bison-1.875:
+  # g++ doesn't like __attribute__((__unused__))
+agrampar.tab.cc agrampar.tab.h agrampar.codes.h: agrampar.y
+	bison -d -v agrampar.y
+	mv -f agrampar.tab.c tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  < tmp > agrampar.tab.cc
+	mv -f agrampar.tab.h tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' < tmp > agrampar.tab.h
+	rm tmp
+	grep '# *define' agrampar.tab.h > agrampar.codes.h
+
+agrampar.tab.o: ast.hand.h ast.ast.h agrampar.h
+
+# have to use sed to change the forward declaration of 'istream'
+# into an #include, so the std:: namespace doesn't cause a problem
+agramlex.yy.cc: gramlex.h agramlex.lex agrampar.codes.h
+	$(MYFLEX) -o$@ agramlex.lex
+
+
+# ------------------------- ccsstr ---------------------
+CCSSTR_OBJS := \
+  reporterr.o \
+  embedded.o
+
+ccsstr: ccsstr.cc ccsstr.h $(CCSSTR_OBJS)
+	$(CXX) -o $@ -DTEST_CCSSTR $(CCFLAGS) ccsstr.cc $(CCSSTR_OBJS) $(LDFLAGS)
+
+
+# ------------------------- astgen ---------------------
+ASTGEN_OBJS := \
+  gramlex.o \
+  agrampar.tab.o \
+  ccsstr.o \
+  agramlex.yy.o \
+  reporterr.o \
+  embedded.o \
+  ast.hand.o \
+  asthelp.o \
+  xmlhelp.o \
+  agrampar.o  \
+  astgen.o
+-include $(ASTGEN_OBJS:.o=.d)
+
+# ast.ast.cc is a dependency here but not explicitly in the command
+# line because ast.hand.cc #includes it
+astgen: $(ASTGEN_OBJS) ast.ast.cc $(LIBSMBASE) 
+	$(CXX) -o astgen $(ASTGEN_OBJS) $(LDFLAGS)
+
+
+# ---------------------- run astgen ----------------------
+# simple ast spec file
+example.cc: astgen example.ast
+	./astgen example.ast
+
+exampletest: exampletest.o example.o asthelp.o locstr.o $(LIBSMBASE)
+	$(CXX) -o $@ $^
+
+# simple extension
+ext1.cc: astgen example.ast ext1.ast
+	./astgen -oext1 example.ast ext1.ast
+
+# If you want to regenerate astgen's own ast file, you do
+#   ./astgen -oast.ast ast.ast
+#
+# This rule is *not* in the Makefile because if you do it
+# without thinking you can break the self-bootstrapping
+# (and be forced to restore your ast.ast.{cc,h} from the
+# distribution tarball or from CVS).
+
+
+# ------------------------ libast.a -------------------
+# this library is the set of support modules required for
+# using astgen-generated code, or are simply useful generally
+# but don't belong in smbase
+LIB_OBJS := \
+  gramlex.o \
+  ccsstr.o \
+  reporterr.o \
+  embedded.o \
+  asthelp.o \
+  xmlhelp.o \
+  locstr.o
+-include $(ASTGEN_OBJS:.o=.d)
+
+libast.a: $(LIB_OBJS)
+	$(AR) -r $@ $(LIB_OBJS)
+	-$(RANLIB) $@
+
+
+# ------------------ documentation ------------------
+gendoc:
+	mkdir gendoc
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+gendoc/demo.h gendoc/demo.cc: demo.ast astgen
+	./astgen -ogendoc/demo demo.ast
+
+.PHONY: doc
+doc: gendoc gendoc/configure.txt gendoc/demo.h
+	@echo "built documentation"
+
+
+# ------------------------ misc ---------------------
+
+# for now, check-full is just check
+.PHONY: check-full
+check-full: check
+
+check: ccsstr
+	./ccsstr
+
+# delete outputs of compiler, linker
+clean:
+	rm -f *.o tmp *.d gmon.out
+	rm -f agrampar astgen ccsstr towner exampletest libast.a
+	rm -f agrampar.output
+	rm -f example.{h.cc} ext1.{h,cc}
+	rm -f agramlex.yy.cc
+
+# return to pristine checked-out state
+distclean: clean
+	rm -f Makefile config.status config.summary
+	rm -rf gendoc
+
+# 'clean', plus remove distributed outputs of bison
+toolclean: clean
+	rm -f agrampar.tab.h
+	rm -f agrampar.tab.cc
+	rm -f agrampar.codes.h
+
+# test for owner
+towner: owner.h towner.o
+	$(CXX) -o towner towner.o $(LDFLAGS)

Added: vendor/elsa/current/ast/configure
===================================================================
--- vendor/elsa/current/ast/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/ast/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/current/ast/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/configure
===================================================================
--- vendor/elsa/current/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,11 @@
+#!/bin/sh
+# toplevel elsa distribution configure
+
+# for now, just fire off default configurations
+# in each of the subdirs; users can then go customize
+# as desired
+
+(cd smbase && ./configure "$@") || exit 1
+(cd ast && ./configure "$@") || exit 1
+(cd elkhound && ./configure "$@") || exit 1
+(cd elsa && ./configure "$@") || exit 1


Property changes on: vendor/elsa/current/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/elkhound/Makefile.in
===================================================================
--- vendor/elsa/current/elkhound/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,598 @@
+# Makefile.in for elkhound
+# see license.txt for copyright and terms of use
+
+# I uncomment this temporarily to just build certain modules
+#tmp: mlsstr
+
+# main targets: elkhound, and some examples
+all: elkhound libelkhound.a forbid.gr.gen.out arith c cc2/cc2.exe
+	@echo BUILD FINISHED
+
+
+# directories of other software
+SMBASE    := @SMBASE@
+AST       := @AST@
+
+# stuff inside those other directories
+LIBSMBASE := $(SMBASE)/libsmbase.a
+LIBAST    := $(AST)/libast.a
+ASTGEN    := $(AST)/astgen
+
+# external tools
+PERL := @PERL@
+MYFLEX := $(PERL) $(SMBASE)/run-flex.pl
+
+
+# remake the generated Makefile if its inputs have changed
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl $(SMBASE)/sm_config.pm
+	./config.status -reconfigure
+
+
+# This variable is a parameter that can be passed on the 'make' command
+# line.  It becomes part of the -tr argument to 'elkhound'.  By default,
+# it's set to the flag to generate a debug dump of the LR parse tables.
+TRGRAMANL := ,lrtable
+
+
+# -------------------- compiler configuration -------------------
+# C++ compiler, etc.
+CXX := @CXX@
+
+# flags for the C and C++ compilers (and preprocessor)
+# "-Ic" is needed for binaries that use $(support-set)
+CCFLAGS := @CCFLAGS@ -I$(SMBASE) -I$(AST) -Ic
+
+# flags for the linker
+libraries := $(LIBAST) $(LIBSMBASE)
+LDFLAGS := -g -Wall $(libraries)
+
+
+# some other tools
+AR     := ar
+RANLIB := ranlib
+
+
+# compile .cc to .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl $(SMBASE)/depend.pl -o $@ $< $(CCFLAGS) >$*.d
+
+
+# ----------------- sets of related object files ---------------------
+# files needed to represent a grammar in memory
+grammar-set := \
+  asockind.o \
+  grammar.o
+-include $(grammar-set:.o=.d)
+
+# in addition to grammar-set, files needed to parse a grammar description
+# and emit action code
+grampar-set := \
+  emitcode.o \
+  mlsstr.o \
+  genml.o \
+  gramast.ast.gen.o \
+  gramlex.yy.o \
+  grampar.o \
+  grampar.tab.o
+-include $(grampar-set:.o=.d)
+
+# minimal runtime files needed to do GLR parsing; these get
+# combined to form libelkhound.a, the Elkhound runtime library
+glr-set := \
+  cyctimer.o \
+  glr.o \
+  parsetables.o \
+  useract.o
+-include $(glr-set:.o=.d)
+
+# utility modules useful with elkhound, though not necessary
+util-set := \
+  ptreenode.o \
+  ptreeact.o
+-include $(util-set:.o=.d)
+
+# additional modules borrowed from the C parser for the trivial grammars,
+# and the C++ parser based on the Standard grammar
+support-set := \
+  c/cc_lang.o \
+  c/parssppt.o \
+  c/lexer1.o \
+  c/lexer1yy.o \
+  c/lexer2.o
+
+#-include $(support-set:.o=.d)
+#
+# The above include is deliberately missing.  There is a problem with
+# the generated .d files when the source lives in a directory other
+# than the current one, and I have not tracked down precisely when and
+# why this occurs.  Unfortunately, it means that some changes
+# (especially in smbase) require a 'make clean'...
+
+
+# ---------------------- generic rules ----------------------
+# intermediate files for an ast spec
+# (this have been commented-out and instantiated with the specific
+# rules for gramast.ast, because I only need once instance, and
+# because the cygwin version of make-3.80 fails to recognize the
+# applicability of this pattern for some reason)
+# .PRECIOUS: %.ast.gen.cc %.ast.gen.h
+# %.ast.gen.cc %.ast.gen.h: %.ast $(AST)/astgen
+# 	rm -f $*.ast.gen.*
+# 	$(AST)/astgen -o$*.ast.gen $*.ast
+# 	chmod a-w $*.ast.gen.h $*.ast.gen.cc
+
+# intermediate files for a grammar
+# TRGRAMANL: extra trace flags specified by user; starts with "," if defined
+# ('chmod a-w' is so I don't accidentally edit it)
+.PRECIOUS: %.gr.gen.cc %.gr.gen.h
+%.gr.gen.cc %.gr.gen.h %.gr.gen.y: %.gr elkhound
+	rm -f $*.gr.gen.*
+	./elkhound -v -tr bison,NOconflict$(TRGRAMANL) -o $*.gr.gen $*.gr
+	chmod a-w $*.gr.gen.h $*.gr.gen.cc
+
+# bison parser from the a given grammar; the 'sed' is because Bison
+# already interpretes 0 as EOF, and if my rule names it explicitly
+# then it gets mad
+%.y: %.gr.gen.y
+	echo '%{' >$@
+	echo '#include "trivbison.h"' >>$@
+	echo '%}' >>$@
+	sed -e 's/"EOF" {/{/' <$*.gr.gen.y >>$@
+
+# run Bison; the 'sed' command is to silence a spurious warning about
+# 'yyval' being used uninitialized; I also compile here (instead of
+# relying on another pattern rule) because I want to control exactly
+# how the compilation happens (to ensure the Bison-parser is compiled
+# with flags to make it a fair performance test with my own stuff)
+%.tab.c %.tab.o %.tab.h: %.y
+	bison -d -v $*.y
+	mv $*.tab.c $*.tab.c.orig
+	sed -e 's/YYSTYPE yyval;/YYSTYPE yyval = 0;/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  <$*.tab.c.orig >$*.tab.c
+	rm $*.tab.c.orig
+	$(CXX) -c -g -o $*.tab.o -O2 -DNDEBUG -Wall $(YYDEBUG) $*.tab.c
+
+# run the trivial-grammar helper
+.PRECIOUS: %.gr %.tree.gr
+%.gr: %.gr.in make-trivparser.pl
+	rm -f $@
+	perl ./make-trivparser.pl $(notdir $*) <$*.gr.in >$@
+	chmod a-w $@
+
+%.tree.gr: %.gr.in make-trivparser.pl
+	rm -f $@
+	perl ./make-trivparser.pl -ptree $(notdir $*) <$*.gr.in >$@
+	chmod a-w $@
+
+# make a parser for testing some grammar, using trivial lexer
+trivparse-deps := trivmain.cc trivlex.o libelkhound.a
+%.gr.exe: %.gr.gen.o $(trivparse-deps) $(libraries)
+	$(CXX) -o $@ -DGRAMMAR_NAME=\"$*.bin\" $(CCFLAGS) $*.gr.gen.o $(support-set) $(trivparse-deps) $(LDFLAGS)
+
+# similar, for Bison as the parser-generator
+trivbison-deps := trivbison.o trivlex.o lexer2.o libelkhound.a
+%.bison.exe: %.tab.o $(trivbison-deps)
+	$(CXX) -o $@ $*.tab.o $(trivbison-deps) $(LDFLAGS)
+
+
+# ------------------- intermediate files --------------------
+# grammar lexer
+# like in ast/, need to replace forward decl with proper #include
+gramlex.yy.cc: gramlex.lex
+	$(MYFLEX) -o$@ gramlex.lex
+
+# grammar description AST (manual instantiation of above
+# commented-out pattern rule)
+.PRECIOUS: gramast.ast.gen.cc gramast.ast.gen.h
+gramast.ast.gen.cc gramast.ast.gen.h: gramast.ast $(AST)/astgen
+	rm -f gramast.ast.gen.*
+	$(AST)/astgen -ogramast.ast.gen gramast.ast
+	chmod a-w gramast.ast.gen.h gramast.ast.gen.cc
+
+# bison implementation of grammar parser.
+# I have to make some changes to the generated output so it will compile
+# with a C++ compiler, and want to extract the codes so they're available
+# separately without having to know about all of the types in YYSTYPE.
+grampar.tab.cc grampar.tab.h grampar.codes.h: grampar.y
+	bison -d -v grampar.y
+	mv -f grampar.tab.c tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  <tmp >grampar.tab.cc
+	mv -f grampar.tab.h tmp
+	sed -e 's/typedef union {/typedef union YYSTYPE {/' <tmp >grampar.tab.h
+	rm tmp
+	grep '# *define' grampar.tab.h >grampar.codes.h
+
+
+# new C++ grammar with treebuilding actions
+cc2/cc2t.gr.gen.cc cc2/cc2t.gr.gen.h cc2/cc2t.gr.gen.y: cc2/cc2.gr c/c.tok elkhound
+	rm -f cc2/cc2t*
+	sed -e 's/cc2\.gr\.gen\.h/cc2t.gr.gen.h/' <cc2/cc2.gr >cc2/cc2t.gr
+	./elkhound -v -tr treebuild$(TRGRAMANL) -o cc2/cc2t.gr.gen cc2/cc2t.gr
+	chmod a-w cc2/cc2t.gr*
+
+
+# ----------------- extra dependencies -----------------
+# These dependencies ensure that automatically-generated code is
+# created in time to be used by other build processes which need it.
+# I had been maintaining the list by hand, but now I've got a script
+# to build it.  The list may need to be rebuilt from time to time; if
+# you get compile errors after 'make clean' because of missing files
+# that are automatically generated, rebuild extradep.mk after a full
+# compilation succeeds.
+
+extradep.mk:
+	perl ./find-extra-deps *.d cc2/*.d >$@
+
+-include extradep.mk
+
+
+# --------------------- test programs ----------------------
+# grammar lexer test program
+gramlex-dep := gramlex.yy.cc $(AST)/gramlex.cc
+gramlex: ../ast/gramlex.h $(gramlex-dep) $(libraries)
+	$(CXX) -o $@ -DTEST_GRAMLEX $(CCFLAGS) $(gramlex-dep) $(LDFLAGS)
+
+# cycle timer test
+cyctimer: cyctimer.cc cyctimer.h
+	$(CXX) -o $@ -DTEST_CYCTIMER $(CCFLAGS) cyctimer.cc $(LDFLAGS)
+
+# ML lexical parser
+mlsstr: mlsstr.cc mlsstr.h
+	$(CXX) -o $@ -DTEST_MLSSTR $(CCFLAGS) mlsstr.cc $(LDFLAGS)
+
+# test grammar for 'forbid' (there is no executable for this, I just look
+# at the Elkhound output)
+forbid.gr.gen.out: forbid.gr
+	./elkhound -tr requireExactStats -o forbid.gr.gen forbid.gr
+
+
+# -------------------- exported library ----------------
+# glr parsing engine
+libelkhound.a: $(glr-set) $(util-set)
+	rm -f $@
+	$(AR) -r $@ $(glr-set) $(util-set)
+	-$(RANLIB) $@
+
+
+# --------------------- executables ---------------------
+# reads the grammar and emits C++ code for semantic functions;
+# this is the main parser generator binary
+elkhound-dep := gramanl.cc gramexpl.o $(grammar-set) $(grampar-set) parsetables.o
+elkhound: $(elkhound-dep) grammar.h gramanl.h $(libraries)
+	$(CXX) -o $@ -DGRAMANL_MAIN $(CCFLAGS) $(elkhound-dep) $(LDFLAGS)
+
+# C++ parser based on Standard grammar
+cc2-deps := cc2/cc2main.o cc2/cc2.gr.gen.o libelkhound.a
+cc2/cc2.exe: $(cc2-deps) $(libraries)
+	$(CXX) -o $@ $(support-set) $(cc2-deps) $(LDFLAGS)
+
+# new C++ parser with treebuilding
+cc2t-deps := cc2/cc2main.o cc2/cc2t.gr.gen.o libelkhound.a
+cc2/cc2t.exe: $(cc2t-deps) $(libraries)
+	$(CXX) -o $@ $(support-set) $(cc2t-deps) $(LDFLAGS)
+
+
+# ---------------------- Elkhound examples ------------------
+.PHONY: c
+c: elkhound libelkhound.a
+	$(MAKE) -C c
+
+c.in/c.in4c: c.in/c.in4b
+	rm -f $@
+	for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do \
+	  cat $< >>$@; \
+	done
+
+c.in/c.in4d: c.in/c.in4c
+	rm -f $@
+	for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do \
+	  cat $< >>$@; \
+	done
+
+# stuff in examples directory
+.PHONY: examples arith
+arith: elkhound libelkhound.a
+	$(MAKE) -C examples/arith
+
+examples: all glrmain.o arith gcom
+	$(MAKE) -C examples/cexp
+	$(MAKE) -C examples/cdecl
+	$(MAKE) -C examples/scannerless
+
+.PHONY: ocaml
+ocaml:
+	$(MAKE) -C ocaml
+
+
+# ---------------------------- gcom -----------------------
+# guarded command example from tutorial
+.PHONY: gcom gcom-clean
+gcom:
+	$(MAKE) -C examples/gcom1 all check
+	$(MAKE) -C examples/gcom4 all check
+	$(MAKE) -C examples/gcom5 all check
+	$(MAKE) -C examples/gcom all check
+	$(MAKE) -C examples/gcom7 all check
+
+gcom-clean:
+	$(MAKE) -C examples/gcom1 clean
+	$(MAKE) -C examples/gcom4 clean
+	$(MAKE) -C examples/gcom5 clean
+	$(MAKE) -C examples/gcom clean
+	$(MAKE) -C examples/gcom7 clean
+	$(MAKE) -C examples/scannerless clean
+
+
+# ----------------------------- EFa -----------------------
+# input for EFa
+triv/efa.in:
+	mkdir $@
+	perl -e 'foreach $$n (500, 1000, 1500, 2000, 2500, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000) {  \
+	           $$name = sprintf("%07d", $$n);            \
+	           open(OUT, ">$@/$$name.in") or die $!; \
+	           print OUT "A";                            \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("PA");                       \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+EFA_TESTS := triv/efa.perf.txt triv/efa.notree.perf.txt triv/efa.bison.tree.perf.txt triv/efa.bison.notree.perf.txt
+
+#.PHONY: $(EFA_TESTS) all-efa
+
+# run all the EFa tests; the whole batch runs in less than a minute
+# (well, they did before I put in the loop from 1 to 5 ...)
+all-efa: $(EFA_TESTS)
+
+# performance test for EFa
+triv/efa.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.tree.gr.exe -tr progress -count $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+triv/efa.notree.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.tree.gr.exe -tr progress,trivialActions $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+triv/efa.bison.tree.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.tree.bison.exe $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+triv/efa.bison.notree.perf.txt:
+	rm -f $@
+	for fn in triv/efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    triv/EFa.bison.exe $$fn 2>&1 | \
+	      sed "s,^,$$fn: ," >> $@ ; \
+	  done; \
+	done
+
+%.csv: %.txt
+	cat $^ | grep cycles | \
+	  perl -p -e 's/^[^:]*\D(\d+)\D.*:.*\D(\d+)_(\d+) cycles.*$$/$$1, $$2$$3/' >$@
+
+all-efa-csv: $(EFA_TESTS:.txt=.csv)
+
+
+# --------------------------- EEb -----------------------
+# input for EEb
+triv/eeb.in:
+	mkdir $@
+	perl -e 'foreach $$n (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 50, 100, 200, 300, 400, 500) {  \
+	           open(OUT, ">$@/$$n.in") or die $!;    \
+	           print OUT "B";                            \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("PB");                       \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+# performance test for EEb
+triv/eeb.perf.txt:
+	rm -f $@
+	for n in 10 20 50 100 200 300 400 500; do \
+	  triv/EEb.tree.gr.exe -tr progress -count triv/eeb.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+triv/eeb.notree.perf.txt:
+	rm -f $@
+	for n in 10 20 50 100 200 300 400 500; do \
+	  triv/EEb.tree.gr.exe -tr progress,trivialActions triv/eeb.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+# --------------------------- SSx ----------------------
+# input for SSx
+triv/ssx.in:
+	mkdir $@
+	perl -e 'for($$n=1; $$n <= 99; $$n += 2) {           \
+	           open(OUT, ">$@/$$n.in") or die $!;        \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("X");                        \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+# performance test for SSx
+triv/ssx.perf.txt:
+	rm -f $@
+	for n in 15 25 35 45 55 65 75 85 99; do \
+	  triv/SSx.tree.gr.exe -tr progress -count triv/ssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+triv/ssx.notree.perf.txt:
+	rm -f $@
+	for n in 15 25 35 45 55 65 75 85 99; do \
+	  triv/SSx.tree.gr.exe -tr progress,trivialActions triv/ssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+
+# --------------------------- SSSx ----------------------
+# input for SSSx
+triv/sssx.in:
+	mkdir $@
+	perl -e 'for($$n=1; $$n <= 99; $$n += 1) {           \
+	           open(OUT, ">$@/$$n.in") or die $!;        \
+	           for($$i=0; $$i < $$n; $$i++) {            \
+	             print OUT ("X");                        \
+	           }                                         \
+	           close(OUT);                               \
+	         }'
+
+triv/sssx.perf.txt:
+	rm -f $@
+	for n in 5 10 15 20 25 30 35 40 45 50; do \
+	  triv/SSSx.tree.gr.exe -tr progress -count triv/sssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+triv/sssx.notree.perf.txt:
+	rm -f $@
+	for n in 5 10 15 20 25 30 35 40 45 50; do \
+	  triv/SSSx.tree.gr.exe -tr progress,trivialActions triv/sssx.in/$$n.in 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+# ------------------------ DeclExpr ----------------------
+triv/DeclExpr.perf.txt:
+	rm -f $@
+	for n in 1 10 100 1000 10000; do \
+	  triv/DeclExpr.gr.exe -tr progress,trivialActions triv/DeclExpr.in$$n 2>&1 | \
+	    sed "s/^/$$n: /" >> $@ ; \
+	done
+
+
+# ------------------------ documentation -----------------------
+# directory of generated documentation
+gendoc:
+	mkdir gendoc
+
+# dependencies for 'elkhound', the parser generator executable
+gendoc/elkhound_dep.dot:
+	perl $(SMBASE)/scan-depends.pl -r -I$(AST) gramanl.cc >$@
+
+# dependencies for 'glr.h', the entry point to the runtime library
+gendoc/glr.dot:
+	perl $(SMBASE)/scan-depends.pl -r -I$(AST) glr.h >$@
+
+# check to see if they have dot
+.PHONY: dot
+dot:
+	@if ! which dot >/dev/null; then \
+	  echo "You don't have the 'dot' tool.  You can get it at:"; \
+	  echo "http://www.research.att.com/sw/tools/graphviz/"; \
+	  exit 2; \
+	fi
+
+# use 'dot' to lay out the graph
+%.ps: %.dot dot
+	dot -Tps <$*.dot >$@
+
+# use 'convert' to make a PNG image with resolution not to exceed
+# 1000 in X or 700 in Y ('convert' will preserve aspect ratio); this
+# also antialiases, so it looks very nice (it's hard to reproduce
+# this using 'gs' alone)
+%.png: %.ps
+	convert -geometry 1000x700 $^ $@
+
+# glr is much smaller
+gendoc/glr.png: gendoc/glr.ps
+	convert -geometry 500x400 $^ $@
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+# "make doc" should build whatever we have that needs building
+.PHONY: doc
+doc: gendoc gendoc/elkhound_dep.png gendoc/glr.png gendoc/configure.txt
+	@echo "built documentation"
+
+# some other random phony targets (I hate this clutter..)
+.PHONY: clean distclean check
+
+
+# -------------------- clean, check, etc. ------------------
+# things to remove from all directories
+CLEAN_PATTERNS := \
+  *.o  \
+  *~ \
+  *.d \
+  *.exe \
+  *.gen.* \
+  *.bin \
+  *.output \
+  a.out \
+  core
+
+clean: gcom-clean
+	rm -f $(CLEAN_PATTERNS)
+	rm -f elkhound glr gramlex cyctimer
+	rm -f grampar.output grampar tlexer
+	rm -f gramlex.yy.cc
+	rm -f libelkhound.a
+	rm -f gdb.log gprof.out gmon.out test-bad-tmp.c
+	rm -f examples/crash1.{cc,h}
+	cd cc2; rm -f $(CLEAN_PATTERNS)
+	cd triv; rm -f $(CLEAN_PATTERNS) *.y *.gr
+	for dir in arith cdecl cexp; do \
+	  (cd examples/$$dir; $(MAKE) clean); \
+	done
+	$(MAKE) -C c clean
+
+distclean: clean
+	rm -f Makefile config.status config.summary glrconfig.h *.tmp
+	cd triv; rm -rf sssx.in ssx.in eeb.in
+	$(MAKE) -C c distclean
+	rm -rf gendoc
+	rm -f c.in/c.in4{c,d}
+
+# 'clean', plus remove distributed output files from bison
+toolclean: clean
+	rm -f grampar.tab.cc grampar.tab.h grampar.codes.h
+	$(MAKE) -C examples/arith toolclean
+	$(MAKE) -C c toolclean
+
+# for now, check-full is just check
+.PHONY: check-full
+check-full: check
+
+check: all mlsstr
+	./mlsstr
+	MAKE=$(MAKE) ./regrtest
+	@echo ""
+	@echo "Regression tests passed."
+
+
+# --------------- random other stuff --------------------
+# test for rcptr
+trcptr: rcptr.h trcptr.cc
+	$(CXX) -o $@ trcptr.cc

Added: vendor/elsa/current/elkhound/asfsdf/Makefile
===================================================================
--- vendor/elsa/current/elkhound/asfsdf/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/asfsdf/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,57 @@
+# Makefile for parsgen/asfsdf
+
+ssx.perf.txt:
+	for n in 5 7 9 11 13 15 17 19 21; do \
+	  echo -n "$$n: "; \
+	  sglr -p SSx.trm.tbl -i ../ssx.in/$$n.in >/dev/null; \
+	done &>$@
+
+ssx.notree.perf.txt:
+	for n in 5 15 25 35 45 55 65 75 85 99; do \
+	  echo -n "$$n: "; \
+	  sglr -n -p SSx.trm.tbl -i ../ssx.in/$$n.in; \
+	done &>$@
+
+eeb.perf.txt:
+	for n in 5 6 7 8 9 10; do \
+	  echo -n "$$n: "; \
+	  sglr -p EEb.trm.tbl -i ../eeb.in/$$n.in >/dev/null; \
+	done &>$@
+
+eeb.notree.perf.txt:
+	for n in 10 20 50 100 200 300 400 500; do \
+	  echo -n "$$n: "; \
+	  sglr -n -p EEb.trm.tbl -i ../eeb.in/$$n.in; \
+	done &>$@
+
+sssx.perf.txt:
+	for n in 5 7 10 12 14; do \
+	  echo -n "$$n: "; \
+	  sglr -p SSSx.trm.tbl -i ../sssx.in/$$n.in >/dev/null; \
+	done &>$@
+
+sssx.notree.perf.txt:
+	for n in 5 10 15 20 25 30 35 40 45 50; do \
+	  echo -n "$$n: "; \
+	  sglr -n -p SSSx.trm.tbl -i ../sssx.in/$$n.in; \
+	done &>$@
+
+efa.perf.txt:
+	for fn in ../efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    echo -n "$$fn: "; \
+	    sglr -p EFa.trm.tbl -i $$fn >/dev/null || echo "failed"; \
+	  done; \
+	done &>$@
+
+efa.notree.perf.txt:
+	for fn in ../efa.in/*; do \
+	  for count in 1 2 3 4 5; do \
+	    echo -n "$$fn: "; \
+	    sglr -n -p EFa.trm.tbl -i $$fn; \
+	  done; \
+	done &>$@
+
+%.csv: %.txt
+	cat $^ | grep cycles | \
+	perl -p -e 's/^[^:]*\D(\d+)\D.*: cycles: (\d+)$$/$$1, $$2/' >$@

Added: vendor/elsa/current/elkhound/c/Makefile.in
===================================================================
--- vendor/elsa/current/elkhound/c/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/c/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,149 @@
+# Makefile.in
+# this is the Makefile for the Elkhound-based C Parser
+
+# main target: an Elkhound-based C parser
+all: cparse
+
+# directories of other software
+SMBASE   := @SMBASE@
+AST      := @AST@
+ELKHOUND := @ELKHOUND@
+
+# stuff inside those other directories
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+LIBAST      := $(AST)/libast.a
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# re-create the Makefile if Makefile.in has changed
+Makefile: Makefile.in
+	./config.status
+
+
+# ----------------------- compiler configuration -------------------
+# C++ preprocessor, compiler and linker
+CXX := @CXX@
+
+# flags for the C++ compiler (and preprocessor)
+CCFLAGS := @CCFLAGS@ -I$(SMBASE) -I$(AST) -I$(ELKHOUND)
+
+# flags for the linker
+libraries := $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+LDFLAGS := -g -Wall $(libraries)
+
+
+# compile .cc in this directory to a .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl $(SMBASE)/depend.pl -o $@ $< $(CCFLAGS) >$*.d
+
+
+# ----------------------- lexer2 -------------------
+# run flex on the lexer description
+lexer1yy.cc: lexer1.lex lexer1.h
+	flex lexer1.lex
+
+
+# modules needed for lexer2 stand-alone
+LEXER2_OBJS := \
+  lexer1.o \
+  lexer1yy.o \
+  cc_lang.o
+
+# lexer2 stand-alone binary
+lexer2: lexer2.cc lexer2.h $(LEXER2_OBJS)
+	$(CXX) -o $@ -DTEST_LEXER2 $(CCFLAGS) lexer2.cc $(LEXER2_OBJS) $(LDFLAGS)
+
+
+# ------------------------- cparse ---------------------
+# run lexer2 stand-alone to generate token list
+c.tok: lexer2
+	./lexer2 -myparser >$@
+
+# run astgen to generate the AST implementation
+c.ast.gen.h c.ast.gen.cc: c.ast
+	$(AST)/astgen -oc.ast.gen c.ast
+
+
+# run elkhound to generate the parser
+c.gr.gen.h c.gr.gen.cc c.gr.gen.y: c.gr c.tok
+	$(ELKHOUND)/elkhound -tr bison -v -o c.gr.gen c.gr
+
+
+# list of modules needed for the parser
+CPARSE_OBJS := \
+  lexer1.o \
+  lexer1yy.o \
+  cc_lang.o \
+  lexer2.o \
+  parssppt.o \
+  c.ast.gen.o \
+  c_env.o \
+  cc_flags.o \
+  c_type.o \
+  cparse.o \
+  exprequal.o \
+  exprvisit.o \
+  paths.o \
+  postorder.o \
+  stubs.o \
+  tcheck.o \
+  treeout.o \
+  c_variable.o \
+  c.gr.gen.o \
+  main.o
+
+# parser binary
+cparse: $(CPARSE_OBJS)
+	$(CXX) -o $@ $(CPARSE_OBJS) $(LDFLAGS)
+	./$@ $(ELKHOUND)/c.in/c.in1
+
+
+# ----------------------- bcparse ---------------------
+# NOTE: This target ('bcparse') is not built by default because
+# I don't want the default build to require Bison.
+
+# bison parser from the same grammar; the 'sed' is because Bison
+# already interpretes 0 as EOF, and if my rule names it explicitly
+# then it gets mad
+bcparse.y: c.gr.gen.y
+	echo '%{' >$@
+	echo '#include "bcparse.h"' >>$@
+	echo '%}' >>$@
+	sed -e 's/File L2_EOF/File/' <c.gr.gen.y >>$@
+
+# run Bison; the 'sed' command is to silence a spurious warning about
+# 'yyval' being used uninitialized; I also compile here (instead of
+# relying on another pattern rule) because I want to control exactly
+# how the compilation happens (to ensure the Bison-parser is compiled
+# with flags to make it a fair performance test with my own stuff)
+%.tab.c %.tab.o %.tab.h: %.y
+	bison -d -v $*.y
+	mv $*.tab.c $*.tab.c.orig
+	sed -e 's/YYSTYPE yyval;/YYSTYPE yyval = 0;/' \
+	    -e 's/__attribute__ ((__unused__))//' \
+	  <$*.tab.c.orig >$*.tab.c
+	rm $*.tab.c.orig
+	$(CXX) -c -g -o $*.tab.o -O2 -DNDEBUG -Wall $(YYDEBUG) $*.tab.c
+
+# C-without-typedefs parser, using Bison
+bcparse-deps := bcparse.cc bcparse.tab.o lexer1.o lexer1yy.o lexer2.o cc_lang.o
+bcparse: $(bcparse-deps) $(libraries)
+	$(CXX) -o $@ $(CCFLAGS) $(bcparse-deps) $(LDFLAGS)
+	./$@ $(ELKHOUND)/c.in/c.in1
+
+
+# -------------------- clean, etc. -------------------
+clean:
+	rm -f *.o *.d *.gen.* *.tab.* *.output a.out core
+	rm -f bcparse.y c.tok
+	rm -f lexer2 cparse bcparse
+
+distclean: clean
+	rm -f Makefile config.status config.summary
+
+toolclean: clean
+	rm -f lexer1yy.cc
+
+check:
+	@echo "The C parser doesn't have an independent 'make check'."

Added: vendor/elsa/current/elkhound/c/configure
===================================================================
--- vendor/elsa/current/elkhound/c/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/c/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/current/elkhound/c/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/elkhound/cc2/Makefile
===================================================================
--- vendor/elsa/current/elkhound/cc2/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/cc2/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+# dummy redirection Makefile
+
+all:
+	cd ..; $(MAKE)

Added: vendor/elsa/current/elkhound/configure
===================================================================
--- vendor/elsa/current/elkhound/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/current/elkhound/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/elkhound/examples/arith/Makefile.in
===================================================================
--- vendor/elsa/current/elkhound/examples/arith/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/arith/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,58 @@
+# Makefile for arith example
+
+
+# -------- external tools and libraries --------
+# paths to the relevant subsystems
+SMBASE        := @SMBASE@
+AST           := @AST@
+ELKHOUND      := @ELKHOUND@
+
+CXX := @CXX@
+
+# Elkhound runtime support library
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# -------- compiler and linker configuration --------
+# preprocessing flags
+CPPFLAGS := -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+
+CCFLAGS := @CCFLAGS@ -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+
+# linking flags
+LDFLAGS := $(LIBELKHOUND) $(SMBASE)/libsmbase.a
+
+
+# -------- targets --------
+# main target
+all: arith
+
+# tell 'make' that it cannot compile arith.cc until after
+# it has generated arith.gr.gen.h
+arith.o: arith.gr.gen.h
+
+# invoke the parser generator
+arith.gr.gen.cc arith.gr.gen.h: arith.gr
+	$(ELKHOUND)/elkhound -v -o arith.gr.gen arith.gr
+
+# invoke the lexer generator
+arithyy.cc: arith.lex
+	flex -o$@ arith.lex
+
+# compile a C++ source file
+%.o: %.cc
+	$(CXX) -c $(CCFLAGS) $(CPPFLAGS) $*.cc
+
+# link the driver code with the generated parser and lexer;
+# also run it with a test input
+arith: arith.o arithyy.o arith.gr.gen.o
+	$(CXX) -o $@ -g $^ $(LDFLAGS)
+	echo "3 + 4 * 5" | ./arith 
+	echo "3 + 4 * 5" | ./arith printTree
+
+
+clean:
+	rm -f arith *.bin *.gen.* *.o
+
+toolclean: clean
+	rm -f arithyy.cc

Added: vendor/elsa/current/elkhound/examples/arith/configure
===================================================================
--- vendor/elsa/current/elkhound/examples/arith/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/arith/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/current/elkhound/examples/arith/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/elkhound/examples/cdecl/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/cdecl/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/cdecl/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,53 @@
+# Makefile for cdecl example
+
+
+# -------- external tools and libraries --------
+# paths to the relevant subsystems
+SMBASE        := ../../../smbase
+AST           := ../../../ast
+ELKHOUND      := ../..
+
+# Elkhound runtime support library
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# -------- compiler and linker configuration --------
+# preprocessing flags
+CPPFLAGS := -I$(ELKHOUND) -I$(ELKHOUND)/c -I$(AST) -I$(SMBASE)
+
+# C++ compilation flags
+#CCFLAGS := -g -Wall -Wno-deprecated
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+
+# linking flags
+LDFLAGS := $(LIBELKHOUND) $(AST)/libast.a $(SMBASE)/libsmbase.a
+
+
+# -------- targets --------
+# main target
+all: cdecl
+
+# extra object files
+extras := \
+  $(ELKHOUND)/c/parssppt.o \
+  $(ELKHOUND)/c/lexer2.o \
+  $(ELKHOUND)/c/lexer1.o \
+  $(ELKHOUND)/c/lexer1yy.o \
+  $(ELKHOUND)/c/cc_lang.o
+
+# invoke the parser generator
+cdecl.gr.gen.cc cdecl.gr.gen.h: cdecl.gr
+	$(ELKHOUND)/elkhound -v -o cdecl.gr.gen cdecl.gr
+
+# compile a C++ source file
+%.o: %.cc
+	g++ -c $(CCFLAGS) $(CPPFLAGS) $*.cc
+
+# link the driver code with the generated parser and lexer;
+# also run it with a test input
+cdecl: $(ELKHOUND)/glrmain.o cdecl.gr.gen.o
+	g++ -g -o $@ $^ $(extras) $(LDFLAGS)
+	./cdecl $(ELKHOUND)/in/cdecl.in1
+
+clean:
+	rm -f cdecl *.bin *.gen.* *.o gdb.log

Added: vendor/elsa/current/elkhound/examples/cexp/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/cexp/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/cexp/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,72 @@
+# Makefile for cexp examples
+
+
+# -------- external tools and libraries --------
+# paths to the relevant subsystems
+SMBASE        := ../../../smbase
+AST           := ../../../ast
+ELKHOUND      := ../..
+
+# Elkhound runtime support library
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+
+# -------- compiler and linker configuration --------
+# preprocessing flags
+CPPFLAGS := -I$(ELKHOUND) -I$(ELKHOUND)/c -I$(AST) -I$(SMBASE)
+
+# C++ compilation flags
+#CCFLAGS := -g -Wall -Wno-deprecated
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+
+# linking flags
+LDFLAGS := $(LIBELKHOUND) $(AST)/libast.a $(SMBASE)/libsmbase.a
+
+
+# -------- generic rules --------
+# invoke the parser generator
+%.gr.gen.cc %.gr.gen.h: %.gr
+	$(ELKHOUND)/elkhound -v -o $*.gr.gen $*.gr
+
+# invoke the AST generator
+%.ast.gen.cc %.ast.gen.h: %.ast
+	$(AST)/astgen -b$*.ast.gen $*.ast
+
+# compile a C++ source file
+%.o: %.cc
+	g++ -c $(CCFLAGS) $(CPPFLAGS) $*.cc
+
+
+# -------- targets --------
+# main target
+all: cexp3ast.ast.gen.h cexp3 cexp3b
+
+# extra object files
+extras := \
+  $(ELKHOUND)/c/parssppt.o \
+  $(ELKHOUND)/c/lexer2.o \
+  $(ELKHOUND)/c/lexer1.o \
+  $(ELKHOUND)/c/lexer1yy.o \
+  $(ELKHOUND)/c/cc_lang.o
+
+# cexp3b: disambiguation using 'merge'
+cexp3b.gr: cexp3.gr
+	rm -f $@
+	grep -v PREC cexp3.gr >$@
+	chmod a-w $@
+
+cexp3: $(ELKHOUND)/glrmain.o cexp3.gr.gen.o cexp3mrg.o cexp3ast.ast.gen.o 
+	g++ -g -o $@ $^ $(extras) $(LDFLAGS)
+	./$@ $(ELKHOUND)/in/cexp3.in1 | tee tmp.out
+	grep 'result: 7' tmp.out
+	rm tmp.out
+
+cexp3b: $(ELKHOUND)/glrmain.o cexp3b.gr.gen.o cexp3mrg.o cexp3ast.ast.gen.o
+	g++ -g -o $@ $^ $(extras) $(LDFLAGS)
+	./$@ $(ELKHOUND)/in/cexp3.in1 | tee tmp.out
+	grep 'result: 7' tmp.out
+	rm tmp.out
+
+
+clean:
+	rm -f cexp3 cexp3b cexp3b.gr *.bin *.gen.* *.o

Added: vendor/elsa/current/elkhound/examples/gcom/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/gcom/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/gcom/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,50 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+AST      := ../../../ast
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBAST      := $(AST)/libast.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+ast.h ast.cc: gcom.ast
+	$(AST)/astgen -o ast gcom.ast
+
+parser.o: gcom.h ast.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o ast.o eval.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "x := 2 + 3 + 4; print x" | ./lexer
+	echo "x := 2 + 3 + 4; print x" | ./parser -ast
+	echo "x := 2 + 3 + 4; print x" | ./parser -tree
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc ast.h ast.cc gmon.out
+

Added: vendor/elsa/current/elkhound/examples/gcom1/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/gcom1/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/gcom1/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,44 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+parser.o: gcom.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "2 + 3" | ./lexer
+	echo "2 + 3" | ./parser
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc gmon.out
+

Added: vendor/elsa/current/elkhound/examples/gcom4/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/gcom4/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/gcom4/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,44 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+parser.o: gcom.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "2 + 3" | ./lexer
+	echo "2 + 3" | ./parser
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc gmon.out
+

Added: vendor/elsa/current/elkhound/examples/gcom5/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/gcom5/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/gcom5/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,45 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+parser.o: gcom.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "x := 2 + 3 + 4; print x" | ./lexer
+	echo "x := 2 + 3 + 4; print x" | ./parser
+	echo "x := 2 + 3 + 4; print x" | ./parser -tree
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc gmon.out
+

Added: vendor/elsa/current/elkhound/examples/gcom7/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/gcom7/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/gcom7/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,50 @@
+# Makefile for guarded-command example grammar
+
+# directories
+ELKHOUND := ../..
+AST      := ../../../ast
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBAST      := $(AST)/libast.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(AST) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+
+# default make targets
+all: lexer parser
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+tokens.tok: lexer.h $(ELKHOUND)/make-tok
+	perl $(ELKHOUND)/make-tok TokenCode <lexer.h >$@
+
+lexer: lexer.cc
+	g++ -o $@ $(CCFLAGS) -DTEST_LEXER lexer.cc $(LDFLAGS)
+
+gcom.h gcom.cc: gcom.gr tokens.tok
+	$(ELKHOUND)/elkhound gcom.gr
+
+ast.h ast.cc: gcom.ast
+	$(AST)/astgen -o ast gcom.ast
+
+parser.o: gcom.h ast.h
+
+PARSER_OBJS := lexer.o parser.o gcom.o ast.o eval.o
+parser: $(PARSER_OBJS)
+	g++ -o $@ $(PARSER_OBJS) $(LDFLAGS)
+
+check:
+	echo "x := 2 + 3 + 4; print x" | ./lexer
+	echo "x := 2 + 3 + 4; print x" | ./parser -ast
+	echo "x := 2 + 3 + 4; print x" | ./parser -tree
+
+clean:
+	rm -f lexer parser *.o tokens.tok gcom.h gcom.cc ast.h ast.cc gmon.out
+

Added: vendor/elsa/current/elkhound/examples/scannerless/Makefile
===================================================================
--- vendor/elsa/current/elkhound/examples/scannerless/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/examples/scannerless/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,37 @@
+# Makefile for scannerless example grammar
+
+# directories
+ELKHOUND := ../..
+SMBASE   := ../../../smbase
+
+# libraries
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+
+# compilation flags
+CCFLAGS := $(shell $(SMBASE)/config.summary | grep CCFLAGS | sed 's/^.*: *//')
+CCFLAGS += -I$(ELKHOUND) -I$(SMBASE)
+LDFLAGS := -g -Wall $(LIBELKHOUND) $(LIBSMBASE)
+
+# default make targets
+all: sless
+
+
+%.o: %.cc
+	g++ -c -o $@ $(CCFLAGS) $*.cc
+
+sless.h sless.cc: sless.gr
+	$(ELKHOUND)/elkhound sless.gr
+
+main.o: sless.h
+
+SLESS_OBJS := main.o sless.o
+sless: $(SLESS_OBJS)
+	g++ -o $@ $(SLESS_OBJS) $(LDFLAGS)
+
+check:
+	echo "a aa a aaa" | ./sless
+
+clean:
+	rm -f sless *.o sless.h sless.cc
+

Added: vendor/elsa/current/elkhound/ocaml/Makefile
===================================================================
--- vendor/elsa/current/elkhound/ocaml/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/ocaml/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,107 @@
+# Makefile
+
+#tmp: lexer.cmo
+
+all: tobjpool main main.opt
+
+# directories
+ELKHOUND := ..
+
+# compiler options
+OCAMLCFLAGS := -noassert
+#OCAMLCFLAGS :=
+
+#OCAMLOPTFLAGS := $(OCAMLCFLAGS) -p
+OCAMLOPTFLAGS := $(OCAMLCFLAGS)
+
+# using dependency strategy from 
+# http://www.cs.berkeley.edu/~smcpeak/autodepend/autodepend.html
+%.cmo: %.ml
+	ocamlc -c -g $(OCAMLCFLAGS) $*.ml
+	@ocamldep $*.ml > $*.d
+
+# I'll try maintaining separate dependency info for .cmo and .cmx
+%.cmx: %.ml
+	ocamlopt -c $(OCAMLOPTFLAGS) $*.ml
+	@ocamldep $*.ml > $*.dx
+
+# run elkhound on a grammar spec
+# (for now I don't want to use the interface stuff)
+# 
+# cygwin bug...
+#%.ml: %.gr $(ELKHOUND)/elkhound
+%.ml: %.gr
+	$(ELKHOUND)/elkhound -ocaml -v $*.gr
+	rm -f $*.mli
+
+# run ocamllex on a lex spec
+%.ml: %.mll
+	ocamllex $*.mll
+
+# run ocamlyacc on a parser spec
+%.ml: %.mly
+	ocamlyacc $*.mly
+	rm -f $*.mli
+
+# NOTE: Module order is important!  OCaml module dependencies cannot
+# be cyclic, and the order presented must respect the dependency order.
+
+# test program for objpool module
+TOBJPOOL_MODULES = \
+  arraystack.cmo \
+  objpool.cmo \
+  tobjpool.cmo
+tobjpool: $(TOBJPOOL_MODULES)
+	ocamlc -o $@ -g $^
+
+tobjpool.opt: $(TOBJPOOL_MODULES:.cmo=.cmx)
+	ocamlopt $(OCAMLOPTFLAGS) -o $@ $^
+
+# these are the minimal set of modules needed for an elkhound parser
+MINIMAL_MODULES = \
+  smutil.cmo \
+  useract.cmo \
+  lexerint.cmo \
+  parsetables.cmo \
+  arraystack.cmo \
+  objpool.cmo \
+  glr.cmo
+
+# these are modules for the test program; they include some specific 
+# grammar tables/actions, a lexer, a deterministic LR parser, the
+# parse-tree-printing stuff (ptreenode, ptreeact), and a main() function
+MAIN_MODULES = \
+  $(MINIMAL_MODULES) \
+  arith.cmo \
+  een.cmo \
+  lrparse.cmo \
+  ptreenode.cmo \
+  ptreeact.cmo \
+  lexer.cmo \
+  oc_arith.cmo \
+  main.cmo
+main: $(MAIN_MODULES)
+	ocamlc -o $@ -g $^
+
+main.opt: $(MAIN_MODULES:.cmo=.cmx)
+	ocamlopt $(OCAMLOPTFLAGS) -o $@ $^
+
+# dependencies
+ALL_MODULES = \
+  $(MAIN_MODULES) \
+  tobjpool.cmo
+-include $(ALL_MODULES:.cmo=.d)
+-include $(ALL_MODULES:.cmo=.dx)
+
+# run it a bunch of ways
+check:
+	echo "2+3" | ./main arith lr
+	echo "2+3" | ./main arith glr
+	echo "2+3" | ./main een glr
+	echo "2+3+4" | ./main een glr ptree
+	@echo ""
+	@echo Tests PASSED
+
+clean:
+	rm -f *.cmo *.cmi *.d *.cmx *.dx
+	rm -f arith.ml* een.ml* lexer.ml main tobjpool

Added: vendor/elsa/current/elkhound/ocaml/occ2/Makefile
===================================================================
--- vendor/elsa/current/elkhound/ocaml/occ2/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/ocaml/occ2/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,16 @@
+# Makefile
+
+ELKHOUND := ../..
+
+all: tokens.tok occ2.ml
+
+# generate token codes for Elkhound
+tokens.tok: tokens.h
+	$(ELKHOUND)/make-tok Token <tokens.h >tokens.tok
+
+# run elkhound on a grammar spec
+%.ml: %.gr tokens.tok
+	$(ELKHOUND)/elkhound -v $*.gr
+	rm -f $*.mli
+
+

Added: vendor/elsa/current/elkhound/toplevel/Makefile
===================================================================
--- vendor/elsa/current/elkhound/toplevel/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/toplevel/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,10 @@
+# Makefile for toplevel of Elkhound
+# just ties these things together
+
+all:
+	cd smbase; $(MAKE)
+	cd ast; $(MAKE)
+	cd parsgen; $(MAKE)
+	@echo ""
+	@echo "Done building Elkhound.  The main files of interest are"
+	@echo "in the parsgen/ directory; see its readme.txt."

Added: vendor/elsa/current/elkhound/toplevel/configure
===================================================================
--- vendor/elsa/current/elkhound/toplevel/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elkhound/toplevel/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,5 @@
+#!/bin/sh
+# configure script for toplevel of Elkhound
+
+cd parsgen
+./configure


Property changes on: vendor/elsa/current/elkhound/toplevel/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/elsa/Makefile.in
===================================================================
--- vendor/elsa/current/elsa/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elsa/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,528 @@
+# Makefile.in
+# this is the Makefile for Elsa, the Elkhound-based C++ Parser
+
+#temporary: iptree iptparse cipart smin
+
+# main target: a C++ parser
+all: cc.ast.gen.h tlexer ccparse quicktest packedword_test
+
+# work in progress..
+#iptree smin cipart
+
+# directories of other software
+SMBASE   := @SMBASE@
+AST      := @AST@
+ELKHOUND := @ELKHOUND@
+
+# stuff inside those other directories
+LIBSMBASE   := $(SMBASE)/libsmbase.a
+LIBAST      := $(AST)/libast.a
+LIBELKHOUND := $(ELKHOUND)/libelkhound.a
+
+# external tools
+PERL := @PERL@
+MYFLEX := $(PERL) $(SMBASE)/run-flex.pl -nobackup -copies
+DEP := $(PERL) $(SMBASE)/depend.pl
+
+# list of files to clean in 'clean' (etc.) targets
+# (these get added to below)
+TOCLEAN =
+TOTOOLCLEAN =
+TODISTCLEAN =
+
+# re-create the Makefile if Makefile.in has changed
+TODISTCLEAN += Makefile
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl $(SMBASE)/sm_config.pm
+	./config.status -reconfigure
+
+# dependencies upon automatically-generated files
+extradep.mk:
+	$(PERL) $(ELKHOUND)/find-extra-deps *.d >$@
+
+-include extradep.mk
+
+# modules to compile with coverage info; I do not build them
+# all with coverage info because it takes about 25% longer to
+# compile for each module with coverage info
+GCOV_MODS := @GCOV_MODS@
+TOCLEAN += *.bb *.bbg *.da
+
+
+# --------------------- extension modules ----------------------
+# base modules
+LEXER_MODS  := cc.lex
+TOK_MODS    := cc_tokens.tok
+CC_AST_MODS := cc.ast
+CC_GR_MODS  := cc.gr
+EXT_OBJS    :=
+
+# type checker
+CC_AST_MODS += cc_tcheck.ast
+
+# pretty printer
+CC_AST_MODS += cc_print.ast
+
+# control flow graph
+CC_AST_MODS += cfg.ast
+
+# elaboration pass
+CC_AST_MODS += cc_elaborate.ast
+
+
+# optional: GNU language extension
+USE_GNU := @USE_GNU@
+ifeq ($(USE_GNU),1)
+  LEXER_MODS  += gnu.lex
+  TOK_MODS    += gnu_ext.tok
+  CC_AST_MODS += gnu.ast
+  CC_GR_MODS  += gnu.gr
+  EXT_OBJS    += gnu.o
+endif
+
+
+# optional: K&R language extension
+USE_KANDR := @USE_KANDR@
+ifeq ($(USE_KANDR),1)
+  CC_AST_MODS += kandr.ast
+  CC_GR_MODS  += kandr.gr
+  EXT_OBJS    += kandr.o
+endif
+
+
+# ----------------------- compiler configuration -------------------
+# C++ preprocessor, compiler and linker
+CXX := @CXX@
+
+# flags for the C++ compiler (and preprocessor)
+CCFLAGS := @CCFLAGS@ -Woverloaded-virtual -I$(SMBASE) -I$(AST) -I$(ELKHOUND)
+
+# how to enable coverage
+GCOV_OPTS := -fprofile-arcs -ftest-coverage
+
+# flags for the linker
+libraries := $(LIBELKHOUND) $(LIBAST) $(LIBSMBASE)
+LDFLAGS := @LDFLAGS@ $(libraries)
+
+
+# compile .cc in this directory to a .o
+TOCLEAN += *.o *.d
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(if $(findstring $*,$(GCOV_MODS)),$(GCOV_OPTS) )$(CCFLAGS)
+	@$(DEP)   -o $@ $< $(if $(findstring $*,$(GCOV_MODS)),$(GCOV_OPTS) )$(CCFLAGS) >$*.d
+
+# compile a special module; -O0 will override any earlier setting
+notopt.o: notopt.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS) -O0
+	@$(DEP)   -o $@ $< $(CCFLAGS) -O0 >$*.d
+
+
+# ------------------------ tlexer -------------------
+LEXER_OBJS := \
+  cc_lang.o \
+  baselexer.o \
+  lexer.o \
+  lexer.yy.o \
+  cc_tokens.o
+-include $(LEXER_OBJS:.o=.d)
+-include tlexer.d
+
+# program to test the lexer alone
+TOCLEAN += tlexer
+tlexer: tlexer.o $(LEXER_OBJS) $(libraries)
+	$(CXX) -o $@ tlexer.o $(LEXER_OBJS) $(LDFLAGS)
+
+
+# ------------------------ packedword_test -------------------
+# program to test packedword
+TOCLEAN += packedword_test
+packedword_test: packedword_test.o $(libraries)
+	$(CXX) -o $@ packedword_test.o $(LDFLAGS)
+
+
+# ------------------------- xml serialization / de-serialization ---------------------
+
+#### single-source of lexing token definitions:
+
+# basic, file, and typesystem xml lexer files generated by token.pl;
+# the ast tokens are generated by astgen elsewhere
+
+TOKENS_FILES :=
+TOKENS_FILES += xml_basic.tokens
+TOKENS_FILES += xml_file.tokens
+TOKENS_FILES += xml_type.tokens
+TOKENS_FILES += xml_ast.gen.tokens
+
+XML_TYPE_LEXER :=
+XML_TYPE_LEXER += xml_enum_1.gen.h
+XML_TYPE_LEXER += xml_lex_1.gen.lex
+XML_TYPE_LEXER += xml_name_1.gen.cc
+
+TOCLEAN += $(XML_TYPE_LEXER)
+$(XML_TYPE_LEXER): $(TOKENS_FILES)
+	rm -f $@
+	$(PERL) token.pl $^
+
+
+#### LEX: flex-generated lexer
+
+# ast xml lexer/parser files generated by astgen
+XML_ASTGEN :=
+XML_ASTGEN += xml_ast.gen.tokens
+XML_ASTGEN += xml_ast_reader_0decl.gen.h
+XML_ASTGEN += xml_ast_reader_1defn.gen.cc
+XML_ASTGEN += xml_ast_reader_2ctrc.gen.cc
+XML_ASTGEN += xml_ast_reader_3regc.gen.cc
+
+TOCLEAN += $(XML_ASTGEN)
+$(XML_ASTGEN): $(CC_AST_MODS) $(AST)/astgen
+	rm -f $(XML_ASTGEN)
+	$(AST)/astgen -tr no_ast.gen,xmlParser $(CC_AST_MODS)
+	chmod a-w $(XML_ASTGEN)
+
+# generate .lex file
+TOCLEAN += xml_lex.gen.lex
+xml_lex.gen.lex: xml_lex_0top.lex xml_lex_1.gen.lex xml_lex_2bot.lex
+	rm -f $@
+	cat $^ > $@
+	chmod a-w $@
+
+# run flex on the lexer description for ast xml parser
+TOCLEAN += xml_lex.gen.yy.cc
+xml_lex.gen.yy.cc: xml_lex.gen.lex xml_lexer.h
+	$(MYFLEX) -o$@ xml_lex.gen.lex
+
+# when building the ast xml lexer, delete the methods that would
+# otherwise conflict with methods in lexer.yy.cc; they have identical
+# implementations
+xml_lexer.yy.o: xml_lex.gen.yy.cc
+	$(CXX) -c -o $@ $< -DNO_YYFLEXLEXER_METHODS $(CCFLAGS)
+	@$(DEP)   -o $@ $< -DNO_YYFLEXLEXER_METHODS $(CCFLAGS) >$*.d
+# We do not need this now but we will if we end up re-arranging the
+# build process like I had to in oink so I put it here as a reminder.
+# -include xml_lexer.yy.d
+
+
+#### CC client code
+
+# all the xml-related .o files
+XML_OBJS :=
+# lex
+XML_OBJS += xml_lexer.yy.o
+XML_OBJS += xml_lexer.o
+# generic parse
+XML_OBJS += xml_reader.o
+XML_OBJS += xml_writer.o
+# specific parse
+XML_OBJS += xml_file_reader.o
+XML_OBJS += xml_file_writer.o
+XML_OBJS += xml_type_reader.o
+XML_OBJS += xml_type_writer.o
+XML_OBJS += xml_ast_reader.o
+XML_OBJS += id_obj_dict.o
+# final client
+XML_OBJS += xml_do_read.o
+
+# I don't think I need this line:
+# -include $(CCPARSE_OBJS:.o=.d) main.d
+# because of this line:
+# -include $(XML_OBJS:.o=.d)
+
+
+# ------------------------- ccparse ---------------------
+# combine base lexer description and extensions
+TOCLEAN += lexer.lex
+lexer.lex: $(LEXER_MODS) merge-lexer-exts.pl
+	rm -f $@
+	$(PERL) merge-lexer-exts.pl $(LEXER_MODS) >$@
+	chmod a-w $@
+
+
+# run flex on the lexer description
+TOCLEAN += lexer.yy.cc
+lexer.yy.cc: lexer.lex lexer.h
+	$(MYFLEX) -o$@ lexer.lex
+
+
+# generate token lists
+TOK_FILES := cc_tokens.h cc_tokens.cc cc_tokens.ids
+TOCLEAN += $(TOK_FILES)
+$(TOK_FILES): $(TOK_MODS) make-token-files
+	rm -f $(TOK_FILES)
+	$(PERL) make-token-files $(TOK_MODS)
+	chmod a-w $(TOK_FILES)
+
+
+# run astgen to generate the AST implementation
+CC_AST_GEN_FILES := cc.ast.gen.h cc.ast.gen.cc
+TOCLEAN += $(CC_AST_GEN_FILES)
+$(CC_AST_GEN_FILES): $(CC_AST_MODS) $(AST)/astgen
+	rm -f $(CC_AST_GEN_FILES)
+	$(AST)/astgen -occ.ast.gen $(CC_AST_MODS)
+	chmod a-w $(CC_AST_GEN_FILES)
+
+
+# run elkhound to generate the parser
+CC_GR_GEN_FILES := cc.gr.gen.h cc.gr.gen.cc cc.gr.gen.out
+TOCLEAN += $(CC_GR_GEN_FILES)
+$(CC_GR_GEN_FILES): $(CC_GR_MODS) cc_tokens.ids $(ELKHOUND)/elkhound
+	rm -f $(CC_GR_GEN_FILES)
+	$(ELKHOUND)/elkhound -v -tr lrtable -o cc.gr.gen $(CC_GR_MODS)
+	chmod a-w $(CC_GR_GEN_FILES)
+
+# list of modules needed for the parser; ideally they're in an order
+# that finds serious compilation problems earliest (it's ok to
+# rearrange as different parts of the code are in flux)
+CCPARSE_OBJS := \
+  mtype.o \
+  integrity.o \
+  astvisit.o \
+  template.o \
+  notopt.o \
+  cc_env.o \
+  cc_tcheck.o \
+  const_eval.o \
+  implint.o \
+  serialno.o \
+  cc_scope.o \
+  cc_elaborate.o \
+  ast_build.o \
+  $(LEXER_OBJS) \
+  $(XML_OBJS) \
+  $(EXT_OBJS) \
+  builtinops.o \
+  cfg.o \
+  sprint.o \
+  mangle.o \
+  cc_err.o \
+  cc_type.o \
+  stdconv.o \
+  implconv.o \
+  overload.o \
+  typelistiter.o \
+  cc.ast.gen.o \
+  cc.gr.gen.o \
+  parssppt.o \
+  cc_flags.o \
+  cc_print.o \
+  cc_ast_aux.o \
+  variable.o \
+  lookupset.o \
+  ccparse.o
+-include $(CCPARSE_OBJS:.o=.d) main.d
+
+
+# parser binary
+TOCLEAN += ccparse
+ccparse: $(CCPARSE_OBJS) main.o $(libraries)
+	$(CXX) -o $@ $(CCPARSE_OBJS) main.o $(LDFLAGS)
+
+
+# run the binary; the 'quicktest' file is so we don't run it if
+# 'ccparse' hasn't recently changed
+TOCLEAN += quicktest
+quicktest: ccparse
+	./ccparse in/t0001.cc
+	@touch quicktest
+	@echo BUILD FINISHED
+
+
+# -------------------- semgrep --------------------
+TOCLEAN += semgrep
+semgrep: $(CCPARSE_OBJS) semgrep.o $(libraries) $(LIBSMBASE)
+	$(CXX) -o $@ $(CCPARSE_OBJS) semgrep.o $(LDFLAGS)
+
+
+# --------------------- iptree --------------------
+TOCLEAN += iptree
+iptree: iptree.cc $(LIBSMBASE)
+	$(CXX) -o $@ $(CCFLAGS) -DTEST_IPTREE iptree.cc $(LDFLAGS)
+
+
+# -------------------- iptparse -------------------
+TOCLEAN += iptparse
+iptparse: iptparse.cc iptree.o iptparse.yy.o $(LIBSMBASE)
+	$(CXX) -o $@ $(CCFLAGS) -DTEST_IPTPARSE iptparse.cc iptree.o iptparse.yy.o $(LDFLAGS)
+
+
+# ---------------------- smin ---------------------
+# lexer for interval partition tree specs
+TOCLEAN += iptparse.yy.cc
+iptparse.yy.cc: iptparse.lex
+	flex -o$@ iptparse.lex
+
+iptparse.yy.o: iptparse.h
+
+SMIN_OBJS := \
+  iptparse.o \
+  iptparse.yy.o \
+  iptree.o \
+  smin.o
+-include $(SMIN_OBJS:.o=.d)
+
+TOCLEAN += smin
+smin: $(SMIN_OBJS) $(LIBSMBASE)
+	$(CXX) -o $@ $(SMIN_OBJS) $(LDFLAGS)
+
+
+# --------------------- cipart --------------------
+TOCLEAN += cipart.yy.cc
+cipart.yy.cc: cipart.lex
+	flex -o$@ cipart.lex
+
+-include cipart.yy.d
+
+cipart: cipart.yy.o $(LIBSMBASE)
+	$(CXX) -o $@ cipart.yy.o $(LDFLAGS)
+
+
+# ---------------------- misc ---------------------
+# rule to decompress one of the big examples
+TODISTCLEAN += in/big/*.i
+in/big/%.i: in/big/gz/%.i.gz
+	gunzip -c <$^ >$@
+# comment out line directives
+	$(PERL) -i -lpe 's|^\W*(#.*)$$|//$$1|' $@
+# this line is illegal C++ and for now we just comment it out
+	$(PERL) -i -lpe 's|^(\W*)(char ip_opts\[40\];)\W*$$|$$1//$$2|' $@
+# change "((void *)0)" to "0" to compensate for a bad NULL macro somewhere...
+	$(PERL) -i -lpe 's|\(\(void \*\)0\)|0|' $@
+# define bad_alloc, don't just declare it
+	$(PERL) -i -lpe 's|class bad_alloc;|class bad_alloc {};|' $@
+
+# decompress all of them which haven't already been decompressed
+.PHONY: in/big
+in/big: $(patsubst in/big/gz/%.i.gz,in/big/%.i,$(wildcard in/big/gz/*.gz))
+	@echo made $@
+
+
+# ------------------ documentation ------------------
+gendoc:
+	mkdir gendoc
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+# The list of excluded header files is somewhat arbitrary.  Basically,
+# I look at the generated .ps file, and if it is too cluttered, I pick
+# some header that is uninteresting or ubiquitous and exclude it.  The
+# intent is to see the forest by excluding some of the trees, but
+# there's some judgment involved in picking the trees to see.
+#
+# Also, I say the target is .PHONY because I don't want to actually
+# list all the dependencies (essentially, every source file is a
+# dependency), but if no dependencies are listed then 'make' won't
+# build it if it exists.
+.PHONY: gendoc/dependencies.dot
+gendoc/dependencies.dot:
+	$(PERL) $(SMBASE)/scan-depends.pl -r \
+	  -Xcc_env.h=1 -Xcc_type.h=1 -Xcc_flags.h=1 -Xcc_ast.h=1 -Xvariable.h=1 \
+          -Xcc_print.h -Xsprint.h -Xxml_type_reader.h -Xxml_type_writer.h -Xxml_ast_reader.h \
+          -Xxml_do_read.h \
+	  -Xgeneric_aux.h -Xcc_ast_aux.h -Xcc_lang.h=1 \
+	  main.cc cc_tcheck.cc >$@
+
+gendoc/3.4.5.dot: ccparse in/std/3.4.5.cc
+	./ccparse -tr printHierarchies in/std/3.4.5.cc | \
+	$(PERL) chop_out "--- E ---" "--- F ---" >$@
+
+# because of the above dependency on ccparse, if someone does 'make doc'
+# without first building Elsa, they get an error about libsmbase.a; so
+# this is an attempt to deal with that more gracefully
+$(SMBASE)/libsmbase.a:
+	@echo "You have to build smbase, ast and elkhound first."
+	@exit 2
+
+# check to see if they have dot
+.PHONY: dot
+dot:
+	@if ! which dot >/dev/null; then \
+	  echo "You don't have the 'dot' tool.  It is part of graphviz, available at:"; \
+	  echo "http://www.research.att.com/sw/tools/graphviz/"; \
+	  exit 2; \
+	fi
+
+# use 'dot' to lay out the graph
+%.ps: %.dot dot
+	dot -Tps <$*.dot >$@
+
+# use 'convert' to make a PNG image with resolution not to exceed
+# 1200 in X or 1000 in Y ('convert' will preserve aspect ratio); this
+# also antialiases, so it looks very nice (it's hard to reproduce
+# this using 'gs' alone)
+%.png: %.ps
+	convert -geometry 1200x1000 $^ $@
+
+# 3.4.5 is smaller
+gendoc/3.4.5.png: gendoc/3.4.5.ps
+	convert -geometry 300x400 $^ $@
+
+.PHONY: doc
+doc: gendoc gendoc/configure.txt gendoc/dependencies.png gendoc/3.4.5.png
+	@echo "built documentation"
+
+#TOCLEAN += TAGS
+#TAGS:
+#	@ETAGS@ *.cc *.h
+
+
+# -------------------- count source lines -------------------
+# dsw: This should give the right answer even after a "make all",
+# since we filter the generated files.
+#
+# sm: I haven't carefully inspected the set of files counted,
+# and it appears to not count cc_tokens.tok (which it should).
+# I don't care about fixing right now it though.
+
+GENREGEX := '\.gen\.\|lexer\.yy\|cc_tokens'
+.PHONY: count-loc
+count-loc:
+	@echo
+	@echo "Count of lines of source code in this directory by file type."
+	@echo "C++, C, and headers:"
+# 	@ls *.cc *.c *.h | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@ls *.cc *.h | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@echo "tok, lex, gr, and ast:"
+# 	@ls *_ext.tok *_ext.lex *.gr *.ast | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@ls *_ext.tok *.gr *.ast | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@echo "sum of those:"
+# 	@ls *.cc *.c *.h *_ext.tok *_ext.lex *.gr *.ast
+	@ls *.cc *.h *_ext.tok *.gr *.ast \
+          | grep -v $(GENREGEX) | xargs wc -l | grep total
+	@echo
+	@echo "Makefiles:"
+	@ls Makefile.in *.mk | xargs wc -l | grep total
+
+
+# -------------------- clean, etc. -------------------
+clean:
+	rm -f $(TOCLEAN) gmon.out
+	cd outdir && ls | grep -v CVS | xargs rm -f
+
+distclean: clean
+	rm -f $(TODISTCLEAN)
+	rm -f config.status config.summary
+	rm -rf gendoc
+
+toolclean: clean
+	rm -f $(TOTOOLCLEAN)
+
+check: semgrep all
+	./packedword_test
+	MAKE=$(MAKE) ./regrtest
+	@echo ""
+	@echo "Regression tests passed."
+
+# run the xml commutative diagram tests
+.PHONY: checkxml
+checkxml:
+	$(MAKE) -f xml_test.mk
+	@echo ""
+	@echo "XML tests passed."
+
+# run all the tests
+.PHONY: check-full
+check-full: check checkxml

Added: vendor/elsa/current/elsa/configure
===================================================================
--- vendor/elsa/current/elsa/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elsa/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/current/elsa/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/elsa/in/Makefile
===================================================================
--- vendor/elsa/current/elsa/in/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elsa/in/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,26 @@
+# Makefile for in/
+# produces some autogenerated tests
+
+all: t0539
+
+
+T0539 :=
+T0539 += t0539_1.cc
+T0539 += t0539_2.cc
+T0539 += t0539_3.cc
+T0539 += t0539_4.cc
+T0539 += t0539_5.cc
+T0539 += t0539_6.cc
+T0539 += t0539_7.cc
+T0539 += t0539_8.cc
+T0539 += t0539_9.cc
+T0539 += t0539_10.cc
+T0539 += t0539_11.cc
+
+.PHONY: t0539
+t0539: $(T0539)
+
+t0539_%.cc: t0539.cc
+	rm -f $@
+	cpp -C $^ -DSEL=$* >$@
+	chmod a-w $@

Added: vendor/elsa/current/elsa/toplevel/Makefile
===================================================================
--- vendor/elsa/current/elsa/toplevel/Makefile	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elsa/toplevel/Makefile	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,32 @@
+# Makefile for toplevel elsa distribution
+
+# just do the obvious recursive thing
+all:
+	$(MAKE) -C smbase
+	$(MAKE) -C ast
+	$(MAKE) -C elkhound
+	$(MAKE) -C elsa
+
+check:
+	$(MAKE) -C smbase check
+	$(MAKE) -C ast check
+	$(MAKE) -C elkhound check
+	$(MAKE) -C elsa check
+
+clean:
+	$(MAKE) -C smbase clean
+	$(MAKE) -C ast clean
+	$(MAKE) -C elkhound clean
+	$(MAKE) -C elsa clean
+
+distclean:
+	$(MAKE) -C smbase distclean
+	$(MAKE) -C ast distclean
+	$(MAKE) -C elkhound distclean
+	$(MAKE) -C elsa distclean
+
+doc:
+	$(MAKE) -C smbase doc
+	$(MAKE) -C ast doc
+	$(MAKE) -C elkhound doc
+	$(MAKE) -C elsa doc

Added: vendor/elsa/current/elsa/toplevel/configure
===================================================================
--- vendor/elsa/current/elsa/toplevel/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/elsa/toplevel/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,11 @@
+#!/bin/sh
+# toplevel elsa distribution configure
+
+# for now, just fire off default configurations
+# in each of the subdirs; users can then go customize
+# as desired
+
+(cd smbase && ./configure "$@") || exit
+(cd ast && ./configure "$@") || exit
+(cd elkhound && ./configure "$@") || exit
+(cd elsa && ./configure "$@") || exit


Property changes on: vendor/elsa/current/elsa/toplevel/configure
___________________________________________________________________
Name: svn:executable
   + *

Added: vendor/elsa/current/smbase/Makefile.in
===================================================================
--- vendor/elsa/current/smbase/Makefile.in	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/smbase/Makefile.in	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,424 @@
+# Makefile.in for libsmbase
+# see license.txt for copyright and terms of use
+
+# main target
+THIS := libsmbase.a
+all: gensrc $(THIS)
+
+
+# C preprocessor, compiler and linker
+CC := @CC@
+
+# C++ compiler, etc.
+CXX := @CXX@
+
+# flags for the C and C++ compilers (and preprocessor)
+CFLAGS  := @CFLAGS@
+CCFLAGS := @CCFLAGS@
+
+# cross-compile info
+CROSSTARGET   := @CROSSTARGET@
+EXE           := @EXE@
+
+# flags for the linker
+LDFLAGS := -g -Wall libsmbase.a
+
+
+# some other tools
+AR     := ar
+RANLIB := ranlib
+
+
+# compile .cc to .o
+%.o: %.cc
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl ./depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+%.o: %.cpp
+	$(CXX) -c -o $@ $< $(CCFLAGS)
+	@perl ./depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+%.o: %.c
+	$(CC) -c -o $@ $< $(CFLAGS)
+	@perl ./depend.pl -o $@ $< $(CCFLAGS) > $*.d
+
+
+# remake the generated Makefile if its inputs have changed
+Makefile: Makefile.in config.status
+	./config.status
+
+# reconfigure if the configure script has changed
+config.status: configure.pl sm_config.pm
+	./config.status -reconfigure
+
+
+# -------- experimenting with m4 for related files -------
+# I don't delete these during make clean because I don't want
+# to force people to have m4 installed
+gensrc: sobjlist.h objlist.h
+
+sobjlist.h: xobjlist.h
+	rm -f sobjlist.h
+	m4 -Dm4_output=sobjlist.h --prefix-builtins xobjlist.h > sobjlist.h
+	chmod a-w sobjlist.h
+
+objlist.h: xobjlist.h
+	rm -f objlist.h
+	m4 -Dm4_output=objlist.h --prefix-builtins xobjlist.h > objlist.h
+	chmod a-w objlist.h
+
+strobjdict.h strsobjdict.h strintdict.h: xstrobjdict.h
+	rm -f $@
+	m4 -Dm4_output=$@ --prefix-builtins $< > $@
+	chmod a-w $@
+
+
+# ----------------------- malloc ------------------------
+# Doug Lea's malloc:
+#   add the -DDEBUG flag to turn on doug lea's additional checks
+#   add the -DDEBUG_HEAP flag to turn on my zone-based protection
+#   add the -DTRACE_MALLOC_CALLS flag to print on every alloc/dealloc
+#   normally -O3 is specified
+MALLOC_CCFLAGS := -O3
+
+# By default, compile+link a stub module that does nothing, so that
+# we will just use the normal system malloc.  Only if the user wants
+# special malloc features will we switch to Doug Lea's.  The reason
+# is I've only tested my extra features on Linux, and on some other
+# systems (cygwin, OSX) they don't work and I don't have the inclination
+# to fix all my hacks.
+MALLOC_MODULE := malloc_stub
+
+# debug version (much slower, but *great* for finding memory errors)
+ifeq (@DEBUG_HEAP@,1)
+  MALLOC_CCFLAGS := -DDEBUG -DDEBUG_HEAP
+  MALLOC_MODULE := malloc
+endif
+
+# tracing messages
+ifeq (@TRACE_HEAP@,1)
+  MALLOC_CCFLAGS += -DTRACE_MALLOC_CALLS
+  MALLOC_MODULE := malloc
+endif
+
+$(MALLOC_MODULE).o: $(MALLOC_MODULE).c
+	$(CC) -c -g $(MALLOC_CCFLAGS) $(MALLOC_MODULE).c
+
+
+# --------------------- main target ---------------------
+
+# mysig needs some flags to *not* be set ....
+mysig.o: mysig.cc mysig.h
+	$(CXX) -c -g mysig.cc
+
+# library itself
+OBJS := \
+  autofile.o \
+  bflatten.o \
+  bit2d.o \
+  bitarray.o \
+  boxprint.o \
+  breaker.o \
+  crc.o \
+  cycles.o \
+  datablok.o \
+  d2vector.o \
+  exc.o \
+  flatten.o \
+  gprintf.o \
+  growbuf.o \
+  hashline.o \
+  hashtbl.o \
+  $(MALLOC_MODULE).o \
+  missing.o \
+  mypopen.o \
+  mysig.o \
+  nonport.o \
+  ofstreamts.o \
+  point.o \
+  pprint.o \
+  smregexp.o \
+  srcloc.o \
+  str.o \
+  strdict.o \
+  strhash.o \
+  stringset.o \
+  strtable.o \
+  strtokp.o \
+  strutil.o \
+  svdict.o \
+  syserr.o \
+  trace.o \
+  trdelete.o \
+  unixutil.o \
+  vdtllist.o \
+  vptrmap.o \
+  voidlist.o \
+  warn.o
+-include $(OBJS:.o=.d)
+
+# some modules do not build on mingw32; for the moment I do not need them
+ifeq ($(strip $(CROSSTARGET)),i386-mingw32msvc)
+  OBJS := $(filter-out mypopen.o mysig.o smregexp.o,$(OBJS))
+endif
+
+$(THIS): $(OBJS)
+	rm -f $(THIS)
+	$(AR) -r $(THIS) $(OBJS)
+	-$(RANLIB) $(THIS)
+
+
+# ---------- module tests ----------------
+# test program targets
+TESTS := nonport voidlist tobjlist bit2d growbuf testmalloc mypopen \
+         strdict svdict str strutil trdelete bflatten mysig \
+         testmalloc mypopen tobjpool strhash cycles tsobjlist crc \
+         srcloc hashline gprintf smregexp vptrmap vdtllist pprint \
+         boxprint tarrayqueue testarray taillist_test autofile \
+         bitarray d2vector
+
+# some programs do not build on mingw32
+ifeq ($(strip $(CROSSTARGET)),i386-mingw32msvc)
+  TESTS := $(filter-out testmalloc mypopen mysig smregexp,$(TESTS))
+endif
+
+TESTS := $(addsuffix $(EXE),$(TESTS))
+
+tests: $(TESTS)
+
+
+# command to compile and link
+TESTCC  := $(CC) -g -Wall
+TESTCXX := $(CXX) -g -Wall
+
+# this goes at the end of most commands that build a test binary
+TESTFLAGS := $(CCFLAGS) $(LDFLAGS)
+
+# this one is explicitly *not* linked against $(THIS)
+nonport$(EXE): nonport.cpp nonport.h gprintf.o
+	$(TESTCXX) -o $@ -DTEST_NONPORT nonport.cpp gprintf.o $(CCFLAGS)
+
+voidlist$(EXE): voidlist.cc voidlist.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_VOIDLIST voidlist.cc $(TESTFLAGS)
+
+vdtllist$(EXE): vdtllist.cc vdtllist.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_VDTLLIST vdtllist.cc $(TESTFLAGS)
+
+taillist_test$(EXE): taillist_test.cc taillist.h $(THIS)
+	$(TESTCXX) -o $@ taillist_test.cc $(TESTFLAGS)
+
+tobjlist$(EXE): tobjlist.cc objlist.h voidlist.o $(THIS)
+	$(TESTCXX) -o $@ tobjlist.cc voidlist.o $(TESTFLAGS)
+
+tsobjlist$(EXE): tsobjlist.cc sobjlist.h voidlist.o $(THIS)
+	$(TESTCXX) -o $@ tsobjlist.cc voidlist.o $(TESTFLAGS)
+
+bit2d$(EXE): bit2d.cc bit2d.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BIT2D bit2d.cc $(TESTFLAGS)
+
+growbuf$(EXE): growbuf.cc growbuf.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_GROWBUF growbuf.cc $(TESTFLAGS)
+
+strdict$(EXE): strdict.cc strdict.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STRDICT strdict.cc $(TESTFLAGS)
+
+svdict$(EXE): svdict.cc svdict.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_SVDICT svdict.cc $(TESTFLAGS)
+
+str$(EXE): str.cpp str.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STR str.cpp $(TESTFLAGS)
+
+strutil$(EXE): strutil.cc strutil.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STRUTIL strutil.cc $(TESTFLAGS)
+
+strhash$(EXE): strhash.cc strhash.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_STRHASH strhash.cc $(TESTFLAGS)
+
+trdelete$(EXE): trdelete.cc trdelete.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_TRDELETE trdelete.cc $(TESTFLAGS)
+
+bflatten$(EXE): bflatten.cc bflatten.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BFLATTEN bflatten.cc $(TESTFLAGS)
+
+mysig$(EXE): mysig.cc mysig.h $(THIS)
+	$(TESTCXX) -o $@ -DTEST_MYSIG mysig.cc $(TESTFLAGS)
+
+testmalloc$(EXE): testmalloc.cc $(THIS)
+	echo TESTS is $(TESTS)
+	$(TESTCXX) -o $@ testmalloc.cc $(TESTFLAGS)
+
+mypopen$(EXE): mypopen.c mypopen.h
+	$(TESTCC) -o $@ -DTEST_MYPOPEN mypopen.c
+
+# this test is only useful when malloc is compiled with DEBUG_HEAP
+tmalloc$(EXE): tmalloc.c libsmbase.a
+	$(TESTCC) -o $@ tmalloc.c $(TESTFLAGS)
+
+tobjpool$(EXE): tobjpool.cc objpool.h
+	$(TESTCXX) -o $@ tobjpool.cc $(TESTFLAGS)
+
+cycles$(EXE): cycles.h cycles.c
+	$(TESTCC) -o $@ -DTEST_CYCLES cycles.c
+
+crc$(EXE): crc.cpp
+	$(TESTCXX) -o $@ $(CCFLAGS) -DTEST_CRC crc.cpp
+
+srcloc$(EXE): srcloc.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_SRCLOC srcloc.cc $(TESTFLAGS)
+
+hashline$(EXE): hashline.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_HASHLINE hashline.cc $(TESTFLAGS)
+
+gprintf$(EXE): gprintf.c gprintf.h
+	$(TESTCC) -o $@ -DTEST_GPRINTF gprintf.c $(CFLAGS)
+
+smregexp$(EXE): smregexp.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_SMREGEXP smregexp.cc $(TESTFLAGS)
+
+vptrmap$(EXE): vptrmap.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_VPTRMAP vptrmap.cc $(TESTFLAGS)
+
+pprint$(EXE): pprint.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_PPRINT pprint.cc $(TESTFLAGS)
+
+boxprint$(EXE): boxprint.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BOXPRINT boxprint.cc $(TESTFLAGS)
+
+tarrayqueue$(EXE): tarrayqueue.cc $(THIS)
+	$(TESTCXX) -o $@ tarrayqueue.cc $(TESTFLAGS)
+
+testarray$(EXE): testarray.cc $(THIS)
+	$(TESTCXX) -o $@ testarray.cc $(TESTFLAGS)
+
+autofile$(EXE): autofile.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_AUTOFILE autofile.cc $(TESTFLAGS)
+
+bitarray$(EXE): bitarray.cc $(THIS)
+	$(TESTCXX) -o $@ -DTEST_BITARRAY bitarray.cc $(TESTFLAGS)
+
+d2vector$(EXE): d2vector.c $(THIS)
+	$(TESTCXX) -o $@ -DTEST_D2VECTOR d2vector.c $(TESTFLAGS)
+
+
+ifeq ($(CROSSTARGET),0)
+  RUN :=
+else
+  # there is a necessary space at the end of the next line ...
+  RUN := true 
+endif
+
+# for now, check-full is just check
+.PHONY: check-full
+check-full: check
+
+check: $(TESTS)
+	$(RUN)./nonport$(EXE)
+	$(RUN)./voidlist$(EXE)
+	$(RUN)./vdtllist$(EXE)
+	$(RUN)./tobjlist$(EXE)
+	$(RUN)./bit2d$(EXE)
+	$(RUN)./growbuf$(EXE)
+	$(RUN)./strdict$(EXE)
+	$(RUN)./svdict$(EXE)
+	$(RUN)./str$(EXE)
+	$(RUN)./strutil$(EXE)
+	$(RUN)./strhash$(EXE)
+	$(RUN)./trdelete$(EXE)
+	$(RUN)./bflatten$(EXE)
+	$(RUN)./mysig$(EXE)
+	$(RUN)./testmalloc$(EXE) >/dev/null 2>&1
+	$(RUN)./mypopen$(EXE)
+	$(RUN)./tobjpool$(EXE)
+	$(RUN)./cycles$(EXE)
+	$(RUN)./tsobjlist$(EXE)
+	$(RUN)./hashline$(EXE)
+	$(RUN)./srcloc$(EXE)
+	$(RUN)./gprintf$(EXE)
+	$(RUN)./smregexp$(EXE)
+	$(RUN)./vptrmap$(EXE)
+	$(RUN)./pprint$(EXE)
+	$(RUN)./boxprint$(EXE)
+	$(RUN)./tarrayqueue$(EXE)
+	$(RUN)./testarray$(EXE)
+	$(RUN)./taillist_test$(EXE)
+	$(RUN)./autofile$(EXE) autofile.cc
+	$(RUN)./bitarray$(EXE)
+	$(RUN)./d2vector$(EXE)
+ifeq ($(CROSSTARGET),0)
+	@echo
+	@echo "make check: all the tests PASSED"
+else
+	@echo
+	@echo "make check: all the test programs were built, but I did not"
+	@echo "try to run any of them because of cross-compile mode; you"
+	@echo "may want to try running the above commands yourself on the target"
+	@echo "(remove the 'true' prefixes)"
+endif
+
+
+# ------------------- documentation -------------------------
+# directory of generated documentation
+gendoc:
+	mkdir gendoc
+
+# main dependencies for the library; some ubiquitous dependencies
+# are omitted to avoid too much clutter; the files listed below are
+# the roots of the dependency exploration; I don't include any of
+# the stand-alone programs since those are just clutter to someone
+# trying to understand the library's structure
+.PHONY: gendoc/dependencies.dot
+gendoc/dependencies.dot:
+	perl ./scan-depends.pl -r -Xxassert.h -Xtest.h -Xtyp.h -Xmacros.h -Xstr.h \
+		-Xbreaker.h \
+		growbuf.h objpool.h strhash.h voidlist.h svdict.h str.h \
+		warn.cpp mysig.h srcloc.cc hashline.cc astlist.h taillist.h \
+		objstack.h ohashtbl.h okhasharr.h okhashtbl.h sobjlist.h \
+		exc.h >$@
+
+# check to see if they have dot
+.PHONY: dot
+dot:
+	@if ! which dot >/dev/null; then \
+	  echo "You don't have the 'dot' tool.  You can get it at:"; \
+	  echo "http://www.research.att.com/sw/tools/graphviz/"; \
+	  exit 2; \
+	fi
+
+# use 'dot' to lay out the graph
+%.ps: %.dot dot
+	dot -Tps <$*.dot >$@
+
+# use 'convert' to make a PNG image with resolution not to exceed
+# 1000 in X or 700 in Y ('convert' will preserve aspect ratio); this
+# also antialiases, so it looks very nice (it's hard to reproduce
+# this using 'gs' alone)
+%.png: %.ps
+	convert -geometry 1000x700 $^ $@
+
+gendoc/configure.txt: configure
+	./configure --help >$@
+
+# build auto-generated documentation
+.PHONY: doc
+doc: gendoc gendoc/dependencies.png gendoc/configure.txt
+	@echo "built documentation"
+
+
+# --------------------- clean --------------------
+# delete compiling/editing byproducts
+clean:
+	rm -f *.o *~ *.d gmon.out srcloc.tmp testcout
+	rm -f $(TESTS)
+	rm -f *.a
+	rm -rf test.dir
+
+distclean: clean
+	rm -f Makefile config.status config.summary
+	rm -rf gendoc
+
+# remove crap that vc makes
+vc-clean:
+	rm -f *.plg *.[ip]db *.pch
+
+
+# end of Makefile

Added: vendor/elsa/current/smbase/configure
===================================================================
--- vendor/elsa/current/smbase/configure	2007-05-22 22:28:42 UTC (rev 6941)
+++ vendor/elsa/current/smbase/configure	2007-05-23 00:32:53 UTC (rev 6942)
@@ -0,0 +1,4 @@
+#! /bin/sh
+# thunk
+
+exec perl -wS ./configure.pl ${1+"$@"}


Property changes on: vendor/elsa/current/smbase/configure
___________________________________________________________________
Name: svn:executable
   + *



More information about the cig-commits mailing list