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.97k stars 3.26k forks source link

Forward slashes in grammar do not have any effect. #1201

Open SimonStPeter opened 8 years ago

SimonStPeter commented 8 years ago

Low priority as apparently harmless. Code with slashes in, below, still works.

grammar MSSQL;

/

start_parse :
        'Lorem'
        'ipsum'
/       'dolor'
        'sit'
        'amet'
        EOF
    ;

/ SKIPWS : [ \t\r\n]+ -> skip ; 

Input: Lorem ipsum dolor sit amet Antlr version 4.5.3, running on windows

vivekpinto07 commented 6 years ago

Hi Simon , is there any problem with forward slash '/'.. because the few grammar i am writting,for few cases the input is not at all read after the slash inputUris =hello/in.arxml/ outputHdr = “Output/inc/vivek.arxml” outputSrc = output.h

above code lines,it reads only till end of first line / further what is more interesting is that if i give any other symbol other than '/' it says token recognition error at that symbol,but not for /'' Any idea,if you need more details i can share.