beanit / asn1bean

ASN1bean (formerly known as jASN1) is a Java ASN.1 BER and DER encoding/decoding library
https://www.beanit.com/asn1/
Apache License 2.0
110 stars 45 forks source link

Comment line error #26

Open Visne opened 5 years ago

Visne commented 5 years ago

Comment lines currently break the parser. This snippet for example

-----------------------------------------------------------------
-- Detail Output Record
-----------------------------------------------------------------

will give an error like this:

Exception in thread "main" line 8:65: unexpected char: '-'
    at com.beanit.jasn1.compiler.parser.ASNLexer.nextToken(ASNLexer.java:342)
    at antlr.TokenBuffer.fill(TokenBuffer.java:69)
    at antlr.TokenBuffer.LA(TokenBuffer.java:80)
    at antlr.LLkParser.LA(LLkParser.java:52)
    at com.beanit.jasn1.compiler.parser.ASNParser.module_body(ASNParser.java:279)
    at com.beanit.jasn1.compiler.parser.ASNParser.module_definition(ASNParser.java:187)
    at com.beanit.jasn1.compiler.parser.ASNParser.module_definitions(ASNParser.java:63)
    at com.beanit.jasn1.compiler.Compiler.getJavaModelFromAsn1File(Compiler.java:182)
    at com.beanit.jasn1.compiler.Compiler.main(Compiler.java:122)

at line 1 and 3.