antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
16.95k stars 3.26k forks source link

Antlr4 target JavaScript ';' disappearing #2736

Open paolopiano1997 opened 4 years ago

paolopiano1997 commented 4 years ago

Hello, when generating a Parser with antlr4(target JavaScript), i noticed a statement like this "{ $associativity = Associativity.YFX ; $bottom = $op.priority + 1; }" is created like: "associativity=Associativity.YFX bottom=op,priority +1" in the same line and WITHOUT ';' character. This broke my runtime test, I think it'is a bug or something else. I also noticed if I put double ';' one of them appears.

ericvergnaud commented 4 years ago

Hi,

Probably a bug, but please provide a reproducible example.

Eric

Le 28 janv. 2020 à 01:21, paolopiano1997 notifications@github.com a écrit :

Hello, when generating a Parser with antlr4(target JavaScript), i noticed a statement like this "{ $associativity = Associativity.YFX ; $bottom = $op.priority + 1; }" is created like: "associativity=Associativity.YFX bottom=op,priority +1" in the same line and WITHOUT ';' character. This broke my runtime test, I think it'is a bug or something else. I also noticed if I put double ';' one of them appears.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/antlr/antlr4/issues/2736?email_source=notifications&email_token=AAZNQJBZJGSQUYORFJNBNE3Q74J3HA5CNFSM4KMFA5Q2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4II7TKAA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZNQJABTPVJAOB65QL7CZDQ74J3HANCNFSM4KMFA5QQ.