antlr / antlr/codebuff

Grammer failed to recognize single quote inside string literal

Open
#47 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
477
Forks
84
PR merge metrics
No merged PRs in 30d

Description

Hi,

Grammer failed to recognize single quote inside string literal.

I am getting error message: no viable alternative at input 'Select * from table_name where (Directory_name FileServer='BL006-FS1' and Directory = 'C:\\D'Intrusion'."

What is the change required to STRING_LITERAL ?

STRING_LITERAL
: '\'' ( ~'\'' | '\'\'' )* '\''
;

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue identifies the STRING_LITERAL rule; start by locating that rule in the grammar and reproducing the supplied SQL-like input. Confirm the intended escaping for the embedded quote, then verify that the input parses without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.