If you want to use or fork this Parserator tool, go ahead.
No license is needed, no warranties are provided. Do whatever you want.
But there is no support. (I don't even remember Perl anymore.)
Real talk, guys: I'm super-shocked that people still ask me about this.
For context, here's a timeline:
I haven't used this since 2007. I haven't updated it since 2009. I don't even remember Perl anymore, and will never re-learn it.
But someone asked nicely, so I'm returning it to the internet.
But I cannot help you. This project is so far in my past that I barely remember it. I wish you the best of luck.
-Grant Birchmeier, Jan 7 2020
You want the tgz archive. (This README is also in the archive.)
ContentsHow to useFile list Revision history Implementation details Stuff that should be done |
It's real simple:
$> parserate.pl <html_outputfilename> <asn1_inputfilename>
README.html | This file |
parserate.pl | Parserator's launcher script |
ASN1tokenizer.pm | Component that transforms ASN1 input into tokens |
ASN1Token.pm | Data class |
IEreader.pm | Component that transforms the token list into an internal representation of the ASN1 structures |
DefinitionContent.pm | Data class - one is created for every ASN1 defintion |
ASN1Struct.pm | Data class - every ASN1 structure becomes one of these |
SequenceContent.pm | Data class - for ASN1 SEQUENCE structure data |
ChoiceContent.pm | Data class - for ASN1 CHOICE structure data |
HTMLprinter.pm | Component that generates HTML from the internal ASN1 structural representation |
asn1-style.css | HTML style sheet (HTMLprinter copies this directly into the HTML output) |
BooleanTF.pm | defines TRUE/FALSE constants |
testfiles/ | directory containing sample inputs and drivers for testing |
Parserator consists of three main components as follows. Each component feeds its output into the next:
1. ASN1tokenizer - reads in the ASN1 text and converts it to a list of tokens
2. IEreader - processes the list of tokens from ASN1tokenizer to create an internal representation of all ASN1 structures
3. HTMLprinter - processes the result of IEreader to print out the HTML file
The above process might seem over-elaborate. It might be simpler to create the HTML without first converting to an internal representation, but Parserator's design allows it to be adapted to other purposes in the future. The internal representation created by the IEreader component can be used for other things. For instance, we could easily create a C-code printer to take the place of the HTMLprinter. Or we could create a tool that could traverse the internal representation to find all paths to a given IE.
This section used to be called "Todo list", but I no longer work in telecom and have no intention of going back and doing these. Anyone who wants to take over this project is welcome to.
The current output of the script is quite good. Most TODOs are under-the-hood improvements, or cosmetic fixes to HTML output in the special cases where the spec is... "funny".