Polymorphic regular expressions
First Claim
Patent Images
1. A computer-implemented method of encapsulating regular expressions as polymorphic, virtual members of a programmer defined struct/class, the method comprising the steps of:
- defining a grammar for creating object-oriented style structs similar to the grammar of C++;
defining a grammar for the algebraic composition of regular expressions in the grammar;
defining a grammar for creating side-effects of regular expressions such as capture, called CapturePatterns, and the more general statement embedding side-effects, called DoPatterns;
defining a grammar for the encapsulation rules of regular expressions in such a way that they are reusable based on their rule names and parameters;
instantiating the encapsulation as a regular expression that binds to the struct instance; and
declaring the encapsulation as virtual members and therefore subclassable members of a struct such that the regular expression encapsulation has access to all of the data members and virtual members of the struct instance for both composition and side-effects.
0 Assignments
0 Petitions
Accused Products
Abstract
New polymorphic advantages by combining OO elements of the Java™ and C++ languages with built-in support for regular expressions (in terms of class definitions, inheritance, member functions) and by applying the principle of virtual class membership to production rules are presented. Virtual member production rules are incorporated into a ‘V-table’ concept. Instantiated production rules are type-compatible embodiments of regular expressions. Polymorphic regular expressions are leveraged through the ‘document design pattern’.
87 Citations
13 Claims
-
1. A computer-implemented method of encapsulating regular expressions as polymorphic, virtual members of a programmer defined struct/class, the method comprising the steps of:
-
defining a grammar for creating object-oriented style structs similar to the grammar of C++; defining a grammar for the algebraic composition of regular expressions in the grammar; defining a grammar for creating side-effects of regular expressions such as capture, called CapturePatterns, and the more general statement embedding side-effects, called DoPatterns; defining a grammar for the encapsulation rules of regular expressions in such a way that they are reusable based on their rule names and parameters; instantiating the encapsulation as a regular expression that binds to the struct instance; and declaring the encapsulation as virtual members and therefore subclassable members of a struct such that the regular expression encapsulation has access to all of the data members and virtual members of the struct instance for both composition and side-effects. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer system for interpreting or compiling and then executing a programming language with support for regular expression encapsulations defined as virtual members of a struct/class, the system comprising:
-
at least one computer processor; a programming language with means for a regular expression grammar, the grammar comprising means for
1) for creating object-oriented style structs similar to the grammar of C++,
2) for the algebraic composition of. regular expressions in the grammar,
3) for creating side-effects of regular expressions such as capture, called CapturePatterns, and the more general statement embedding side-effects, called DoPatterns;
4) for defining a grammar for the encapsulation rules of regular expressions in such a way that they are reusable based on their rule names and parameters,
5) for instantiating the encapsulation as a regular expression that binds to the struct instance; and
6) for declaring the encapsulations as virtual members and therefore subclassable members of a struct such that the regular expression encapsulation has access to all of the data members and virtual members of the struct instance for both composition and side-effects;means for executing computer program modules or scripts written in the programming language and, while the computer program is being hosted by the computer processor, the computer program is also the host for the computer program scripts which are its target executables; means for data input providing a user-defined program module or script written by user according to the grammatical rules of the programming language to the host computer programs; means for data input providing a source of data to be processed by the scripts; and a set of virtual machine instructions, into which instructions the scripts are translated, and which instructions include aspects for composing and executing virtual regular expression encapsulations. - View Dependent Claims (10, 11, 12)
-
-
13. A computer-implemented method of encapsulating regular expressions as polymorphic members of a struct, the method comprising the steps of:
-
defining a grammar for creating object-oriented style structs similar to the grammar of C++; defining a grammar for the composition of regular expressions in the grammar; defining a grammar for creating side-effects of regular expressions such as capture, called CapturePatterns, and more general statement embedding side-effects, called DoPatterns; defining a grammar for the encapsulation of regular expressions in such a way that they are reusable based on their names and parameters; declaring a regular expression encapsulation as a virtual member of the struct, such that all aspects of the regular expression encapsulation has access (once instantiated relative to a specific struct instance) to the data members of a struct instance as well as other virtual regular expression encapsulations defined in the struct; defining high-level matching regular expression(s) as a virtual regular expression encapsulation of a struct; decomposing the virtual regular expression encapsulation of the struct into, and based upon, other virtual regular expression encapsulations of the same struct, in such a way that subclasses of the struct can polymorphically give new derived behaviors, both matching and side-effect, to any of the decomposed regular expression encapsulations, whereby the high-level matching regular expression of the subclass both inherits the regular expression behaviors of superclass encapsulations and derives additional regular expression behaviors for the high-level matching expression in the subclass; and declaring the encapsulation as virtual members of a struct such that the regular expression encapsulation has access to all of the data members and virtual members of the struct instance for both composition and side-effects.
-
Specification