Skip to content

Commit

Permalink
Adding ruleworks grammar. (#4097)
Browse files Browse the repository at this point in the history
* Added comment to ruleworks.g4 file.

* Fixng grammar to add EOF to fix test failures.

* Altered action to action_ to avoid conflict on some targets
  • Loading branch information
whcox603 committed May 19, 2024
1 parent 5208de4 commit 1632e26
Show file tree
Hide file tree
Showing 7 changed files with 3,737 additions and 0 deletions.
72 changes: 72 additions & 0 deletions ruleworks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
This is the grammar for RuleWorks, which was intended as a follow on to OPS5.
OPS5 was originally developed at Carnegie Melon University and then adopted
by Digital Equipment Corporation (DEC). The source code contains copyrights from
DEC.

The late 1980's into the early 1990's were the age of expert systems. Digital
Equipment rewrote OPS5 in Bliss (it was originally written in Lisp) and then
wrote an expert system name XCON (for Expert Configurator.) If you ever saw a
copy of the VMS hardware sales book you know why such an expert system was needed.


*****************************************************************************
* MODIFIED BY:
* DEC Digital Equipment Corporation
* CPQ Compaq Computer Corporation
*
* MODIFICATION HISTORY:
*
* 22-Dec-1992 DEC Initial version.
* .
* .
* .
* 01-Dec-1999 CPQ Releasew ith GPL
****************************************************************************

The software was obtained from VMS Software, Inc (VSI) freeware site.

https://vmssoftware.com/community/freeware/

Below is the opening paragraph from the freeware_readme.txt file included with
the software.

***************************************************************************
RuleWorks is a language, compiler (with debugger), and Run-Time Library for
constructing high performance, modular, object-oriented, forward-chaining,
rules-based applications. (RuleWorks is an evolutionary step past OPS5.)
It provides portability by producing ANSI C sources which can then be
compiled with any of the leading C or C++ compilers. There is a Run-Time
Library for each supported platform and C compiler.
**************************************************************************

And the following is lifted from one of the source code files:

**************************************************************************
RuleWorks - Rules based application development tool.

Copyright (C) 1999 Compaq Computer Corporation

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or any later
version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Email: info@ruleworks.co.uk
**************************************************************************

The email bounces back with "the domain ruleworks.co.uk couldn't be found."

Not too surprising given that the source code files are 25 years old.

The examples directory contains 3 sample programs. The one of interest (advent) is
an incomplete port of the Adventure program that made the rounds in the early
1980's. All 3 programs parse cleanly.
6 changes: 6 additions & 0 deletions ruleworks/desc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<desc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../_scripts/desc.xsd">
<antlr-version>^4.10</antlr-version>
<targets>Antlr4ng;CSharp;Cpp;Dart;Go;Java;JavaScript;PHP;Python3;TypeScript</targets>
<inputs>examples</inputs>
</desc>

0 comments on commit 1632e26

Please sign in to comment.