forked from mCRL2org/mCRL2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'a981be8de45cb30643a06d04b52b483f8982e06f' into parallel
- Loading branch information
Showing
101 changed files
with
8,658 additions
and
6,665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
1.32 Fixed bugs with priorities. | ||
|
||
1.29 Fixed bug with handling of priorities and associativity (thanx Sjoerd Cranen) | ||
Fixed a bug in error recovery. | ||
Fixed a slash escapes in string literals (thanx Sjoerd Cranen) | ||
|
||
1.28 Fixed bug with actions containing commments containing ' | ||
Python 2.6+ support, thanx to [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 1994-2020, John Bradley Plevyak | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# DParser | ||
###### (you know... 'da parser) | ||
|
||
|
||
## Introduction | ||
|
||
`DParser` is a simple but powerful tool for parsing. You | ||
can specify the form of the text to be parsed using a combination of | ||
regular expressions and grammar productions. Because of the | ||
parsing technique (technically a scannerless GLR parser based on the | ||
Tomita algorithm) there are no restrictions. The grammar can be | ||
ambiguous, right or left recursive, have any number of null | ||
productions, | ||
and because there is no separate tokenizer, can include whitespace in | ||
terminals and have terminals which are prefixes of other terminals. | ||
`DParser` handles not just well formed computer languages and data | ||
files, but just about any wacky situation that occurs in the real world. | ||
The result is natural grammars and powerful parsing. | ||
|
||
|
||
## Features | ||
|
||
* Powerful GLR parsing | ||
* Simple EBNF-style grammars and regular expression terminals | ||
* State-specific symbol table | ||
* Priorities and associativities for token and rules | ||
* Built-in error recovery | ||
* Can be compiled to work with or without the Boehm garbage collector | ||
* Speculative actions (for semantic disambiguation) | ||
* Auto-building of parse tree (optionally) | ||
* Final actions as you go, or on the complete parse tree | ||
* Tree walkers and default actions (multi-pass compilation support) | ||
* Symbol table built for ambiguous parsing | ||
* Partial parses, recursive parsing, parsing starting with any non-terminal | ||
* Whitespace can be specified as a subgrammar | ||
* External (C call interface) tokenizers and terminal scanners | ||
* Good asymptotic efficiency | ||
* Comes with ANSI-C, Python and Verilog grammars | ||
* Comes with full source | ||
* Portable C for easy compilation and linking | ||
* BSD licence, so you can include it in your application without worrying about licensing | ||
|
||
|
||
## Example Grammars | ||
|
||
* [ANSI-C](ansic/ansic.g) | ||
* [Python](tests/python.test.g) | ||
* [Verilog](verilog/verilog.g) | ||
|
||
|
||
## Documentation | ||
* [Man page for parser generator](make_dparser.cat) | ||
* [Manual](docs/manual.md) | ||
* [FAQ](docs/faq.md) | ||
|
||
|
||
## Public Headers | ||
|
||
* [dparse.h](dparse.h) - main parser data structures and functions | ||
* [dparse_tables.h](dparse_tables.h) - parse tables data structures | ||
* [dsymtab.h](dsymtab.h) - optional symbol table | ||
|
||
|
||
## Building | ||
|
||
* To build: `gmake` -- only available with source code package | ||
* To test: `gmake test` -- only available with source code package | ||
* To install: `gmake install` -- binary or source code packages | ||
|
||
For python support: `cd python; gmake install` | ||
|
||
|
||
## Makefile Options | ||
|
||
* `D_USE_GC`: set to 1 to use the Boehm garbage collector | ||
* `D_DEBUG`: set to 1 to compile with debugging support (`-g`) | ||
* `D_OPTIMIZE`: set to 1 to compile with optimizations (`-O3`) | ||
* `D_PROFILE`: set to 1 to compile with profiling support (`-pg`) | ||
* `D_LEAK_DETECT`: set to 1 to compile with memory leak detection (`-lleak`) | ||
* `D_USE_FREELISTS`: set to 1 to use free lists instead of straign free/malloc (defaults to 1) | ||
|
||
|
||
## Contact | ||
Contact the author: `jplevyak` `at` `gmail` |
Oops, something went wrong.