RPA Toolkit
cleanup - 2
authorMartin Stoilov <martin@rpasearch.com>
Sun, 15 May 2011 23:26:12 +0000 (16:26 -0700)
committerMartin Stoilov <martin@rpasearch.com>
Sun, 15 May 2011 23:26:12 +0000 (16:26 -0700)
23 files changed:
build/linux/build.mk
rast/build/linux/rast.mk [deleted file]
rast/build/linux/x86_64/Makefile [deleted file]
rast/rastnode.c [deleted file]
rast/rastnode.h [deleted file]
rpatest/bestalt.in [deleted file]
rpatest/bestalt.out [deleted file]
rpatest/bestalt.rpa [deleted file]
rpatest/bestalt.sh [deleted file]
rpatest/cache.in [deleted file]
rpatest/cache.out [deleted file]
rpatest/cache.rpa [deleted file]
rpatest/cache.sh [deleted file]
rpatest/common.def [deleted file]
rpatest/loop.in [deleted file]
rpatest/loop.out [deleted file]
rpatest/loop.rpa [deleted file]
rpatest/loop.sh [deleted file]
rpatest/multiloop.in [deleted file]
rpatest/multiloop.out [deleted file]
rpatest/multiloop.rpa [deleted file]
rpatest/multiloop.sh [deleted file]
rpatest/template/newrpatest.sh [deleted file]

index b4ee40b..d974dc6 100644 (file)
@@ -1,6 +1,5 @@
 all:
        +make -C $(SRCDIR)/rlib/build/$(OS)/$(ARCHDIR) all
-       +make -C $(SRCDIR)/rast/build/$(OS)/$(ARCHDIR) all
        +make -C $(SRCDIR)/rpa2/build/$(OS)/$(ARCHDIR) all
        +make -C $(SRCDIR)/rvm/build/$(OS)/$(ARCHDIR) all
        +make -C $(SRCDIR)/rjs/build/$(OS)/$(ARCHDIR) all
@@ -11,7 +10,6 @@ all:
 
 distclean: clean
        +make -C $(SRCDIR)/rlib/build/$(OS)/$(ARCHDIR) distclean
-       +make -C $(SRCDIR)/rast/build/$(OS)/$(ARCHDIR) distclean
        +make -C $(SRCDIR)/rpa2/build/$(OS)/$(ARCHDIR) distclean
        +make -C $(SRCDIR)/rvm/build/$(OS)/$(ARCHDIR) distclean
        +make -C $(SRCDIR)/rjs/build/$(OS)/$(ARCHDIR) distclean
@@ -22,7 +20,6 @@ distclean: clean
 
 clean:
        +make -C $(SRCDIR)/rlib/build/$(OS)/$(ARCHDIR) clean
-       +make -C $(SRCDIR)/rast/build/$(OS)/$(ARCHDIR) clean
        +make -C $(SRCDIR)/rpa2/build/$(OS)/$(ARCHDIR) clean
        +make -C $(SRCDIR)/rvm/build/$(OS)/$(ARCHDIR) clean
        +make -C $(SRCDIR)/rjs/build/$(OS)/$(ARCHDIR) clean
diff --git a/rast/build/linux/rast.mk b/rast/build/linux/rast.mk
deleted file mode 100644 (file)
index e24f7d3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-RAST_SRCDIR = $(SRCDIR)/rast
-RAST_LIB = $(OUTDIR)/librast.a
-RAST_SO = $(OUTDIR)/librast.so.1.0
-
-RAST_OBJECTS = \
-       $(OUTDIR)/rastnode.o \
-
-
-ifeq ($(OS), linux)
-all: $(OUTDIR) $(RAST_LIB) $(RAST_SO)
-else
-all: $(OUTDIR) $(RAST_LIB)
-endif
-
-
-$(OUTDIR)/%.o: $(RAST_SRCDIR)/%.c
-       $(CC) $(CFLAGS) -o $(OUTDIR)/$*.o -c $(RAST_SRCDIR)/$*.c
-
-$(RAST_LIB): $(RAST_OBJECTS)
-       $(AR) -cr $@ $^
-
-$(RAST_SO): $(RAST_OBJECTS)
-       $(CC) $(LDFLAGS) -shared -Wl,-soname,librast.so -o $@ $^
-
-$(OUTDIR):
-       @mkdir $(OUTDIR)
-
-distclean: clean
-       @rm -f .depend
-       @rm -rf $(OUTDIR)
-
-clean:
-       @rm -f $(RAST_LIB)
-       @rm -f $(RAST_SO)
-       @rm -f $(RAST_OBJECTS)
-       @rm -f *~
-       @rm -f $(SRCDIR)/*~
-
diff --git a/rast/build/linux/x86_64/Makefile b/rast/build/linux/x86_64/Makefile
deleted file mode 100644 (file)
index 3883b39..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-SRCDIR = ../../../..
-ARCHDIR = $(shell basename $(shell pwd))
-OUTDIR = out
-OS = $(shell uname | tr "[:upper:]" "[:lower:]")
-INCLUDE = -I$(SRCDIR)/arch/$(OS)/$(ARCHDIR) -I$(SRCDIR)/rlib
-
-CC = gcc
-AR = ar
-LD = ld
-
-ifeq ($(BLDCFG), release)
-CFLAGS := -fPIC -O3
-else
-CFLAGS := -fPIC -O0 -g -Wall 
-endif
-
-ifeq ($(CCBLD), yes)
-CFLAGS += -fprofile-arcs -ftest-coverage
-endif
-
-CFLAGS += $(MACH) $(INCLUDE)
-LDFLAGS := $(MACH)
-
-
-include ../rast.mk
diff --git a/rast/rastnode.c b/rast/rastnode.c
deleted file mode 100644 (file)
index c305992..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "rastnode.h"
-#include "rgc.h"
-
-
-robject_t *r_astnode_init(robject_t *obj, ruint32 type, r_object_cleanupfun cleanup, r_object_copyfun copy)
-{
-       rastnode_t *node = (rastnode_t*)obj;
-       r_list_init(&node->lnk);
-       r_object_init(obj, type, cleanup, copy);
-       return obj;
-}
-
-
-rastnode_t *r_astnode_create()
-{
-       rastnode_t *node = (rastnode_t*)r_object_create(sizeof(*node));
-       r_astnode_init((robject_t*)node, R_OBJECT_ASTNODE, r_astnode_cleanup, r_astnode_copy);
-       return node;
-}
-
-
-void r_astnode_addchild(rastnode_t *node, rastnode_t *child)
-{
-       if (node->val.type != R_ASTVAL_HEAD) {
-               r_list_init(&node->val.v.h);
-               node->val.type = R_ASTVAL_HEAD;
-       }
-       r_list_addt(&node->val.v.h, &child->lnk);
-}
-
-
-void r_astnode_cleanup(robject_t *obj)
-{
-       r_object_cleanup(obj);
-}
-
-
-robject_t *r_astnode_copy(const robject_t *obj)
-{
-
-       return NULL;
-}
diff --git a/rast/rastnode.h b/rast/rastnode.h
deleted file mode 100644 (file)
index adcb50e..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef _RASTNODE_H_
-#define _RASTNODE_H_
-
-#include "robject.h"
-#include "rharray.h"
-#include "rcarray.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define R_OBJECT_ASTNODE (R_OBJECT_USER + 1)
-
-typedef struct rastnode_s rastnode_t;
-
-
-typedef struct rastsource_s {
-       rpointer ptr;
-       rulong size;
-} rastsource_t;
-
-#define R_ASTVAL_WORD 0
-#define R_ASTVAL_LONG 1
-#define R_ASTVAL_DOUBLE 2
-#define R_ASTVAL_HEAD 3
-#define R_ASTVAL_POINTER 4
-#define R_ASTVAL_STRING 5
-#define R_ASTVAL_ARRAY 6
-#define R_ASTVAL_NODE 7
-
-typedef struct rastval_s {
-       union {
-               rword w;
-               rlong l;
-               rdouble d;
-               rhead_t h;
-               rpointer ptr;
-               rstring_t *str;
-               rcarray_t *arr;
-               rastnode_t *node;
-       } v;
-       ruint type;
-} rastval_t;
-
-#define R_ASTVAL_SET_ARRAY(__p__, __v__) do { (__p__)->v.arr = __v__; (__p__)->type =  R_ASTVAL_ARRAY; } while (0)
-#define R_ASTVAL_SET_STRING(__p__, __v__) do { (__p__)->v.str = __v__; (__p__)->type =  R_ASTVAL_STRING; } while (0)
-
-struct rastnode_s {
-       robject_t obj;
-       rlink_t lnk;
-       rastnode_t *parent;
-       rastval_t val;
-       rastsource_t src;
-       const rchar *name;
-       rhash_t *props;
-//     rharray_t *props;
-};
-
-
-robject_t *r_astnode_init(robject_t *obj, ruint32 type, r_object_cleanupfun cleanup, r_object_copyfun copy);
-rastnode_t *r_astnode_create();
-void r_astnode_addchild(rastnode_t *node, rastnode_t *child);
-
-/*
- * Virtual methods implementation
- */
-void r_astnode_cleanup(robject_t *obj);
-robject_t *r_astnode_copy(const robject_t *obj);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/rpatest/bestalt.in b/rpatest/bestalt.in
deleted file mode 100644 (file)
index 34f7323..0000000
+++ /dev/null
@@ -1 +0,0 @@
-aaabcde
diff --git a/rpatest/bestalt.out b/rpatest/bestalt.out
deleted file mode 100644 (file)
index ec57046..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-a: a
-A: a
-AA: a
-AAA: a
-a: a
-A: a
-AA: a
-AAA: a
-a: a
-A: a
-AA: a
-AAA: a
-best: aaa
-bestalt.in:
-aaa
diff --git a/rpatest/bestalt.rpa b/rpatest/bestalt.rpa
deleted file mode 100644 (file)
index f00e81f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# RPA rules
-S                      ::= [#0x0009] | [#0x000B] | [#0x000C] | [#0x0020] | [#0x00A0] | [#0xFEFF]
-a                      ::=a
-A                      ::=<:a:>
-AA                     ::=<:A:>
-AAA                    ::=<:AA:>
-
-
-best                   ++= <:AAA:>
-best                   ++= <:AAA:> <:AAA:> <:AAA:>
-best                   ++= <:AAA:> <:AAA:> <:AAA:> <:AAA:>
-best                   ++= <:AAA:> <:AAA:>
-
-<:best:>
diff --git a/rpatest/bestalt.sh b/rpatest/bestalt.sh
deleted file mode 100755 (executable)
index be5a69d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-if [ -f common.def ]; then
-. common.def
-fi
-
-RPATEST=bestalt
-DIFF="diff -u"
-
-if [ "" = "" ]; then
-RPAGREP=../rgrep/unix/x86_64/rgrep
-fi
-
-
-$RPAGREP -p -f $RPATEST.rpa -c ".*" $RPATEST.in > $RPATEST.res
-$DIFF $RPATEST.res $RPATEST.out
-
-if [ $? != 0 ]; then
-    echo "$RPATEST : FAILED"
-else
-    echo "$RPATEST : PASSED"
-fi
-
diff --git a/rpatest/cache.in b/rpatest/cache.in
deleted file mode 100644 (file)
index 91f47f4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-abc
-
diff --git a/rpatest/cache.out b/rpatest/cache.out
deleted file mode 100644 (file)
index 5bdbc17..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-a: a
-A: a
-B: b
-C: c
-a: a
-B: b
-C: c
-cache.in:
-abc
diff --git a/rpatest/cache.rpa b/rpatest/cache.rpa
deleted file mode 100644 (file)
index 31984cc..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# RPA rules
-S                      ::= [#0x0009] | [#0x000B] | [#0x000C] | [#0x0020] | [#0x00A0] | [#0xFEFF]
-a                      ::= a
-A                      ::= <:a:>
-B                      ::= b
-C                      ::= c
-D                      ::= d
-
-<:A:><:B:><:C:> & <:a:><:B:><:C:>
diff --git a/rpatest/cache.sh b/rpatest/cache.sh
deleted file mode 100755 (executable)
index 0a96194..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-if [ -f common.def ]; then
-. common.def
-fi
-
-RPATEST=cache
-DIFF="diff -u"
-
-if [ "" = "" ]; then
-RPAGREP=../rgrep/unix/x86_64/rgrep
-fi
-
-
-$RPAGREP -p -f $RPATEST.rpa -c ".*" $RPATEST.in > $RPATEST.res
-$DIFF $RPATEST.res $RPATEST.out
-
-if [ 0 != 0 ]; then
-    echo "$RPATEST : FAILED"
-else
-    echo "$RPATEST : PASSED"
-fi
-
diff --git a/rpatest/common.def b/rpatest/common.def
deleted file mode 100644 (file)
index 96b21bf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RPAGREP=../rgrep/unix/x86_64/rgrep
diff --git a/rpatest/loop.in b/rpatest/loop.in
deleted file mode 100644 (file)
index b98e11e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-c[d=2]
diff --git a/rpatest/loop.out b/rpatest/loop.out
deleted file mode 100644 (file)
index ae00557..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Identifier: c
-MemberExpression: c
-Identifier: d
-MemberExpression: d
-AssignmentOperator: =
-Identifier: 2
-AssignmentExpression: 2
-AssignmentExpression: d=2
-MemberExpression: c[d=2]
-loop.in:
-c[d=2]
diff --git a/rpatest/loop.rpa b/rpatest/loop.rpa
deleted file mode 100644 (file)
index df99441..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-S                      ::= [#0x0009] | [#0x000B] | [#0x000C] | [#0x0020] | [#0x00A0] | [#0xFEFF]
-Identifier             ::= [a-zA-Z0-9]+
-AssignmentOperator     ::= '='
-MemberExpression       ::= <:MemberExpression:> '[' <:AssignmentExpression:> ']'  |
-                           <:Identifier:>
-AssignmentExpression   ::= <:MemberExpression:> <:AssignmentOperator:> <:AssignmentExpression:> | 
-                           <:Identifier:>
-<:MemberExpression:>                                   
diff --git a/rpatest/loop.sh b/rpatest/loop.sh
deleted file mode 100755 (executable)
index 41df661..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-if [ -f common.def ]; then
-. common.def
-fi
-
-RPATEST=loop
-DIFF="diff -u"
-
-if [ "" = "" ]; then
-RPAGREP=../rgrep/unix/x86_64/rgrep
-fi
-
-
-$RPAGREP -p -f $RPATEST.rpa -c ".*" $RPATEST.in > $RPATEST.res
-$DIFF $RPATEST.res $RPATEST.out
-
-if [ $? != 0 ]; then
-    echo "$RPATEST : FAILED"
-else
-    echo "$RPATEST : PASSED"
-fi
-
diff --git a/rpatest/multiloop.in b/rpatest/multiloop.in
deleted file mode 100644 (file)
index 0f52e66..0000000
+++ /dev/null
@@ -1 +0,0 @@
-hello()[][]()
diff --git a/rpatest/multiloop.out b/rpatest/multiloop.out
deleted file mode 100644 (file)
index aa89981..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Identifier: hello
-Expression: hello
-CallExpressionBase: hello
-CallExpression: hello()
-Expression: hello()
-MemberExpressionBase: hello()
-MemberExpression: hello()[]
-Expression: hello()[]
-MemberExpressionBase: hello()[]
-MemberExpression: hello()[][]
-Expression: hello()[][]
-CallExpressionBase: hello()[][]
-CallExpression: hello()[][]()
-Expression: hello()[][]()
-multiloop.in:
-hello()[][]()
diff --git a/rpatest/multiloop.rpa b/rpatest/multiloop.rpa
deleted file mode 100644 (file)
index 11ab200..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-S                      ::= ([#0x0009] | [#0x000B] | [#0x000C] | [#0x0020] | [#0x00A0] | [#0xFEFF])+
-Identifier             ::= [a-zA-Z0-9]+
-AssignmentOperator     ::= '='
-
-MemberExpressionBase   ::= <:Expression:>
-CallExpressionBase     ::= <:Expression:>
-MemberExpression       ::= <:MemberExpressionBase:> '[' <S>? ']'
-CallExpression         ::= <:CallExpressionBase:> '(' <S>? ')'
-
-Expression             ::= <:MemberExpression:> |
-                           <:CallExpression:> |
-                           <:Identifier:>
-
-
-
-all                    ::= <:Expression:>                                      
diff --git a/rpatest/multiloop.sh b/rpatest/multiloop.sh
deleted file mode 100755 (executable)
index 69d6179..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-if [ -f common.def ]; then
-. common.def
-fi
-
-RPATEST=multiloop
-DIFF="diff -u"
-
-if [ "" = "" ]; then
-RPAGREP=../rgrep/unix/x86_64/rgrep
-fi
-
-
-$RPAGREP -p -f $RPATEST.rpa -c ".*" $RPATEST.in > $RPATEST.res
-$DIFF $RPATEST.res $RPATEST.out
-
-if [ $? != 0 ]; then
-    echo "$RPATEST : FAILED"
-else
-    echo "$RPATEST : PASSED"
-fi
-
diff --git a/rpatest/template/newrpatest.sh b/rpatest/template/newrpatest.sh
deleted file mode 100755 (executable)
index 5721a9f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-NAME=$1
-DESTDIR=$2
-
-if [ "$NAME" = "" ] || [ "$DESTDIR" = "" ]; then
-    echo "$0 <testname> <destdir>"
-    exit 1
-fi
-
-DESTFILE="$DESTDIR/$NAME"
-
-echo "#!/bin/bash
-if [ -f common.def ]; then
-. common.def
-fi
-
-RPATEST=$NAME
-DIFF=\"diff -u\"
-
-if [ \"$RPAGREP\" = \"\" ]; then
-RPAGREP=../rgrep/unix/x86_64/rgrep
-fi
-
-
-\$RPAGREP -p -f \$RPATEST.rpa -c \".*\" \$RPATEST.in > \$RPATEST.res
-\$DIFF \$RPATEST.res \$RPATEST.out
-
-if [ \$? != 0 ]; then
-    echo \"\$RPATEST : FAILED\"
-else
-    echo \"\$RPATEST : PASSED\"
-fi
-" > $DESTFILE.sh
-
-chmod ugo+x $DESTFILE.sh
-if [ ! -f $DESTFILE.rpa ]; then
-    echo "# RPA rules" > $DESTFILE.rpa
-    echo "S                    ::= [#0x0009] | [#0x000B] | [#0x000C] | [#0x0020] | [#0x00A0] | [#0xFEFF]" >> $DESTFILE.rpa
-fi
-
-if [ ! -f $DESTFILE.in ]; then
-    echo "sample text goes here" > $DESTFILE.in
-fi