Commit 00ac0eb8 authored by canterburym's avatar canterburym
Browse files

Adding separate parse script

parent de7813aa
Pipeline #2578 passed with stage
in 1 minute and 20 seconds
import logging
from asn1tools import parse_files, ParseError
from pathlib import Path
from pprint import pprint
if __name__ == '__main__':
fileList = list(Path(".").rglob("*.asn1")) + list(Path(".").rglob("*.asn"))
if len(fileList) == 0:
logging.warning ("No files specified")
print ("ASN.1 Parser checks:")
print ("-----------------------------")"Parsing files...")
errorCount = 0
for f in fileList:
except ParseError as ex: (f" {f}: Failed - {ex!r}")
print (f" {f}: Failed - {ex!r}")
errorCount += 1
print (f" {f}: OK")
print ("-----------------------------")
print (f"Parse errors: {errorCount}")
print ("-----------------------------")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment