repository
stringclasses
156 values
issue title
stringlengths
1
1.01k
labels
stringclasses
8 values
body
stringlengths
1
270k
antlrantlr4
csharp and java produce different result for identical input identical token
Bug
antlr 4 9 1 parser for grammar v4 idl idl g4 with the input show below be produce different result to be clear the parser should produce identical output but they do not the list of tokens be identical between java and csharp so the lexing be identical there be no action semantic predicate in idl g4 and I h...
antlrantlr4
fix codegen template for go parser
Bug
this fix 2826 it add the required pointer receiver and type assertion to the getinvokingcontext call no change to the runtime be necessary
antlrantlr4
fix 3052
Bug
fix 3052 the problem be cause by an undefined ruleindex attribute call getruleindex method instead of access the ruleindex attribute solve this problem
antlrantlr4
update ll1 analyzer
Bug
potentially fix 3042
antlrantlr4
split version number for target
Question
hiya pboyer mike lischke janyou ewanmellor hanjoe ericvergnaud lingyv li marcospassos eric have raise the point that it would be nice to be able to make quick patch to the various runtime e g there be a stop bug now in the javascript target he propose something along these line ...
antlrantlr4
update get start md
Duplicate
this fix 2895 this update get start md to point to the late version of antlr 4 7 1 4 8 this clarify some of the command be do
antlrantlr4
fix a npe
Bug
parrt bump into this bug with the js runtime cause I suspect by a bug which may affect all target the root cause would come from predictioncontext merge line 169 and 172 where an arraypredictioncontext be create from a singletonpredictioncontext which be some case be an emptypredictioncontext with a...
antlrantlr4
another attempt at solve this issue
Bug
there be already a patch to fix this issue 2037 but it have some problem and be close by the author after a while
antlrantlr4
general xpath fix for the python3 runtime
Bug
this commit fix some code that do not reflect the current api fix wrong xpath library behavior such as fail to apply the invert flag on certain operation do general style touch up further work be necessary such as implement test for this functionality so that further change to the api or runt...
antlrantlr4
fix javascript hash bug
Bug
completely fixes bug find by akajes thank parrt fully test good for merge
antlrantlr4
feature request support unicode category
Question
support match unicode category by something like p l see 1196 antlr grammar v4 1426 yes we can just copy paste from lexuincode g4 but it s 600 line long more than half of javascriptlexer g4 be unicode category definition generate from database and it s hard to manage if unicode a...
antlrantlr4
fix overlaping condition
Bug
fix proposition for
antlrantlr4
fix import in the python2 source
Bug
contrary to python3 the lexer and parser generate for python2 target support only relative import which cause a failure in case of standalone script the patch adapt these import to work in both case
antlrantlr4
fix index error in python3 getchild
Bug
fix 2485
antlrantlr4
fix python get text api
Bug
not sure how some stuff make it to master but incorrect semantic with interval and gettext have lead to lot of confusion purpose of this pr be to restore a unambiguous api such that contributor can rely on a clear contract
antlrantlr4
bugfix for python runtime tokenstreamrewriter gettext
Bug
this be a bug if I insert something after the last token that insertation will be execute twice a minimal working example be test g4 grammar test ruleabc aa eof test txt aa test py import sys from antlr4 import from testlexer import testlexer ...
antlrantlr4
allow modifying of parsetree
Question
I m currently write a language and would like to use the visitor listener to pre process the ast to simplify the compilation process this mostly mean modify the structure by add remove child my trouble be the iteration in parsetreewalker seem to assume the ast be immutable eg it cache the child count before itera...
antlrantlr4
be antlr use anltr to build
Question
hi all be antlr use antlr to build what be the g4 file to parse g4 grammar I want to fix this issue thank peter
antlrantlr4
avoid stringindexoutofboundexception
Bug
this fix issuecomment 397271786 clearly it s be an oversight since the same code have be fix for codepoint8bit in this commit
antlrantlr4
enable parseratnsimulator debug mode in python3 target
Bug
solve issue 2291 test on my sample file and it work as expect take the opportunity to sign contributor txt
antlrantlr4
javascript parse tree visitor check if ctx child be non null in visitchildren
Bug
I ve be encounter a problem where the default generate visitor in javascript it will crash because in the visit method it try to call accept on null because it have be pass a null object by visitchildren this seem like a bug to I as the child field be expect to sometimes be null as it be initialis...
antlrantlr4
unhelpful error message
Question
issue reproducible with antlr version 4 5 code generation target java with the follow grammar and start rule name l59 be expreof grammar g expreof expr eof expr uident expr uident uident a z a z ...
antlrantlr4
python3 runtime say 4 6 not 4 7
Invalid
def checkversion self toolversion runtimeversion 4 6 rvmajor rvminor self extractversion runtimeversion tvmajor tvminor self extractversion toolversion if rvmajor tvmajor or rvminor tvminor print antlr runtime and generate code ...
antlrantlr4
unify the python2 and python3 code basis into a single library compatible with both
Question
it be very awkward to see two entirely separate tree of code for python 2 7 vs python 3 how be these even maintain the normal thing for python library that support both be to write code compatible with both I strongly recommend unify they
antlrantlr4
add new keyword to return proper inputstream
Bug
currently the js runtime charstream fromstre sometimes return and mangle the global window object instead of return a proper inputstream this be prevent by use the new keyword in this and similar helper method bhamiltoncx please take a look perhaps I m do something wrong if so I m happ...
antlrantlr4
python 3 codegen probably didn t mean to limit atn segment size to 2 xor 31
Bug
notice this poking around in the python 3 codegen 2 31 be not 231 it s 2 xor 31 which be 29
antlrantlr4
a segmentation fault occur while output a parse tree
Question
I use class like the follow someparser h class someparser private std string vendor public antlr4 parser parser antlr4 lexer lexer public someparser std string vendor antlr4 tokensource get token const std string text std vector g...
antlrantlr4
grammar good practice for similar rule
Question
hi everyone I m contemplate on good practice and performance implication for the follow grammar scenario memberdef varmemberdef valmemberdef defmemberdef varmemberdef var nameid colon type memberblockstart memberblock valmemberdef val ...
antlrantlr4
support tree rewrite
Duplicate
while the focus of antlr4 be unfortunately no long for compiler interpreter transpiler writer I use it for a transpiler anyway antlr4 be so much nice grammar wise than antlr3 however the lack of tree rewrite mutation be drive I crazy this be for special case of course but when you do need it say fo...
antlrantlr4
use c anltr 4 5 3 stable code generation doesn t compile with error compareto
Invalid
hi use antlr4 5 3 with visual studio 2015 to process the cpp14 g4 grammar file on github fail to compile there be an error in the generate code compareto not be a method on a string in c it should be compareto capital c
antlrantlr4
remove generate swift file or add regression test
Invalid
the path to generate file this issue also relate to xpath issue
antlrantlr4
bailerrorstrategy in javascript
Bug
I m work with antlr 4 6 and the javascript target I m wonder if a bailerrorstrategy exist in javascript too I try something like this parser errhandler new antlr4 error bailerrorstrategy but I get error when I m try to parse input error parsecancellationexception be not a constructor ...
antlrantlr4
unable to resolve arrayinitlexer and arrayinitparser in definitive antlr4 book
Question
before submit an issue to antlr please check off these box x I be not submit a question on how to use antlr instead go to antlr4 discussion google group forum antlr discussion or ask at stackoverflow I have do a search of the exist issue to make sure I m not send in a duplicate ...
antlrantlr4
dynamic query parse issue use antlr4
Question
we be try to convert oracle pl sql to sql server t sql we be use the oracle grammar file as per the below url the pl sql block contain form a query dynamically like the example below exec stmt update dedupjobqueue set status complete where bank i d v bank i d and orgke...
antlrantlr4
python2 bug in intervalset py removeone cause exception when take complement
Bug
sorry for not include code right off but this look like an obvious bug with an obvious fix in the removeone function in runtime python2 src antlr4 intervalset py in the last elif case a range be use instead of an interval this cause a type error later on where an interval be expect instead of a list ...
antlrantlr4
explain I array2dhashset
Question
hello in atnconfigset configlookup l77 be type of array2dhashset in other word a set of array however getoraddimpl l83 use the same comparatorequality in set and in array bucket so for I we only can have a set of array with one element so I can a set be sufficient do I miss a ...
antlrantlr4
commontoken object have no attribute stopindex in python 2 3
Bug
python code consider the following python3 code and custom grammar separate python import sys from antlr4 import from separatedlexer import separatedlexer from separatedparser import separatedparser def main argv code open text r read codestream inputstr...
antlrantlr4
please remove lexer from antlr
Duplicate
I suggest to remove lexer completely in next version of antlr lexer be just bad design and feature limited parser that run in the first pass I suggest to allow multiple pass of multiple parser and remove lexer as be miss function like characte region and regular expression should be move to parser
antlrantlr4
python 2 target s errorstrategy create problematic token
Bug
before submit an issue to antlr please check off these box x I be not submit a question on how to use antlr instead go to antlr4 discussion google group forum antlr discussion or ask at stackoverflow x I have do a search of the exist issue to make sure I m not send in a duplicate ...
antlrantlr4
fix attributeerror when try to write an immutable variable in python
Bug
the removeone function of intervalset try to directly rewrite the start field of an immutable range variable when split an exist interval this cause attributeerror which be fix by the patch
antlrantlr4
tool how to generate a file per each child parserrulecontext
Question
hello I have read the stringtemplate documentation target java codegenpipeline java codegenerator java outputmodelcontroller java codegeneratorextension java despite all my effort I can not find what I need to do in target java I have add public boolean isoneclassperfile return f...
antlrantlr4
what be the meaning of different value of invokingstate
Question
on page 269 of the definitive antlr 4 reference there be a code as follow public class csvparser extend parser public final rowcontext row string column throw recognitionexception rowcontext localctx new rowcontext ctx 4 column en...
antlrantlr4
what s the meaning of input lt 1
Question
on page 210 of the definitive antlr 4 reference there be a code as follow keyif input lt 1 gettext equal if i d can anyone tell I what s the meaning of input lt 1 thank
antlrantlr4
help need in antlr parse performance issue
Question
we be face issue with antlr performance for parse oracle file the oracle file for conversion have significant large size 17 24 38 mb file while build the parsetree it take a lot of time and memory its even give core oom dump we try disable the building of parse tree however that doesnot work as the walker...
antlrantlr4
generate code work fine in java but hang forever in python 3
Duplicate
hello I be parse sas code which at a specific situation it have a possibility of write single line comment this be a comment the thing be this may also happen v 5 29 the 29 be a multiplication not a comment but this be a comment so I create this line comment grammar ide...
antlrantlr4
consider introduce an error code property to recognitionerror
Question
our team be face a very basic problem with antlr4 we need to throw exception for specific syntax error but we need to identify each of theses error we can not just extend the class add a error code because it need to be do at the root class the recognitionerror once antlr use error not only to tell tha...
antlrantlr4
antlr4 unable to identify parse multi line sql comment
Question
I be use antlr4 for parse oracle grammer I be try to read oracle file plsql as input and convert it to equivalent t sql construct I have use the grammer file for plsql present in github the exact grammar which address multiple line and single line comment be single line comment r n...
antlrantlr4
to improve language translation
Question
in defaulterrorstrategy class we have message for error but for two function they have no expection raise protect void reportunwantedtoken parser recognizer if inerrorrecoverymode recognizer return beginerrorcondition recognizer token t recognizer getcurrenttoken ...
antlrantlr4
go target generate code for java g4 grammar doesn t compile
Bug
before submit an issue to antlr please check off these box I be not submit a question on how to use antlr instead go to antlr4 discussion google group forum antlr discussion or ask at stackoverflow I have do a search of the exist issue to make sure I m not send in a duplicate ...
antlrantlr4
mvn compile fail could not resolve dependency
Bug
just try to compile antlr locally on macos sierra 10 12 1 follow this doc this be the end of the mvn compile run info info building antlr 4 tool test 4 6 snapshot info ...
antlrantlr4
issue with antlr4 java 7 grammar expression parser rule
Question
I find this issue for the follow input public string publishabsencesapprovalsevent map absencevalue inside this method there be a pretty much long string which span around 150 line when I try to create a parsetree for this input file it s get hang like forever I guess there be a decision mak...
antlrantlr4
parse slow like any thing
Question
in my source file I have a string like this string span across around 200 line string payload transactionid requestor org apache commons lang stringescapeutils escapexml personname ...
antlrantlr4
array2dhashset clear do not reset threshold
Bug
currently the implementation of array2dhashset clear do not set the value of the threshold field if one of these set be reuse after call clear it s likely that a large number of hash collision will occur when the set be use again
antlrantlr4
return directive generate improper c code
Bug
hi I be test one of the example of book the the definitive antlr4 reference which be in page 183 185 the code I write be grammar attr1 parser rule file local int I 0 hdr row row hdr text split I hdr row null row s...
antlrantlr4
exprlexer exprparser not find
Question
hi I create maven project with dependency antlr4 antlr4 runtime and plugin antlr4 maven plugin in intellij idea but when I try to run simple application like public class application public static void main string args throw exception antlrstringstream in new antlrfilestream d java ...
antlrantlr4
xpathlexer java miss from src
Question
when compile antlr4 master runtime java src I get the follow compilation error antlr4 master runtime java src org antlr v4 runtime tree xpath xpath java error 87 17 java can not find symbol symbol class xpathlexer location class org antlr v4 runtime tree xpath xpath
antlrantlr4
update python target md
Bug
add miss import statement for sys
antlrantlr4
how I can get the number of line and column for each token in antlr4
Question
I be new with antlr4 I search a lot to get number of line and column for each token in antlr4 I have a well knewoleadge on flex and bison and I make a complete compiler for php with flex and bison in flex and bison I be get the number of line and column by a simple code in bison y I define struct ...
antlrantlr4
how to build visitor to visit and print ast with antlr 4
Question
I build ast for my grammar expression with antlr 4 by eclipse and I want to build visitor to visit the ast and print the ast how I can build visitor hello g4 define a grammar call hello grammar hello parser header import java util map import java util hashmap ...
antlrantlr4
strange code in javascript predictioncontext js line 191
Bug
hi I search some way for optimization in antlr for javascript and find one strange line in code l191 I research like singletonpredictioncontext class implement I don t sure but singletonpredictioncontext doesn t have property empty return state always because predictioncontext call this hashstre l136 ...
antlrantlr4
parenthesis expression not return expect result
Duplicate
I m test this antlr grammar with version 4 5 3 and with the input 1 1 but the result be not the expect one be this a bug or do I make a mistake antlr grammar from tour chapter augment with action grammar expr header import java util parser member map variable new...
antlrantlr4
a bug of the antlr4 python3 runtime 4 5 3
Bug
in the file intervalset py the statement at line 147 be I start v 1 in which the variable I be of type range so its member start be readonly maybe it can be replace by self interval self interval index I range v 1 I stop
antlrantlr4
not skip white pace in lexical rule
Question
hey I m new in antlr and I have a problem with a white space in a lexer rule I m use antlr4 and write this test grammar grammar resturant option language java startrule reservation eof reservation drink drink furitshake ...
antlrantlr4
repalce string exception in python target
Bug
raise string exception in python be not support predictioncontext getreturnstate attempt this what be fix by the patch
antlrantlr4
many test fail on window due to invalid path
Bug
update I m retitle this issue to reflect the fact it be a bug and not just lack of understanding see pr 1268 for detail on the bug I m try to setup so I can contribute to the antlr project by follow the instruction for build antlr4 from source on a window 10 machine I initially start with how to bu...
antlrantlr4
bug format attribute seem not work properly no effect
Question
hello in stg template there be while occurrence than generate while la select in my case I need to generate while la sql symbol select where sql be symbol be a constant and select be varname can anyone help I to fix my problem
antlrantlr4
empty alternative in rule cause syntax error in parser py for python2 3 target
Bug
sample grammar grammar test token i d root i d semi eof semi ws t r n skip this generate follow snippet in testparser py for python2 and 3 if token in systemrdlparser i d self state 2 self m...
antlrantlr4
fix the initialization of conflictingalt in execatn in python target
Bug
the java target initialize the conflictingalt local variable base on the conflictingalt property of the target state however the python target reset it to none the patch make the initialization consistent
antlrantlr4
fix the type hint of semanticcontext filterprecedencepredicate parameter
Bug
semanticcontext filterprecedencepredicate take a set as parameter in python3 but the hint tell list instead the patch fix this
antlrantlr4
fix eoftoken access in listtokensource nexttoken by python target
Bug
at the end of the nexttoken function set the eoftoken field be attempt without the self keyword result in access and set a new local and unused variable the patch supplement the miss self keyword for both target
antlrantlr4
python2 api be too slow
Question
ncall tottime percall cumtime percall filename lineno function 1089345 11806 3 142 0 000 14 203 0 001 antlr4 atn parseratnsimulator py 1163 closure 1127090 1 653 0 000 1 653 0 000 antlr4 atn atnconfig py 45 init 1542899 1 401 0 000 5 0...
antlrantlr4
gettext method with argument not always work correctly
Bug
I create commontokenstream from list of token by the following way java list extend token preprocessortoken list lexer getalltoken listtokensource codetokensource new listtokensource token commontokenstream tokensstream new commontokenstream codetokensource after it I try to call m...
antlrantlr4
sll mode disambiguation performance
Duplicate
as outline in 994 some grammar have a bad timing behavior when use with antl4 as 994 recommend a two phase strategy should be use in this case the follow grammar be a badly behave grammar even use two phase strategy see grammar numexpr numexpr if statement eof if statement i...
antlrantlr4
use antlr4 v4 5 3 to parse a java file that have more than 3000 line give out of memory error
Duplicate
although increase the heap size help I m just wonder if there be a way to optimize the memory usage
antlrantlr4
grammar with bailerrorstrategy accept invalid input extra semicolon
Question
I have a grammar with a start rule that parse an expression follow by eof for this bug report I simplify the expression grammar to just the name rule antlr start expression eof expression name period name identifi period identifi ide...
antlrantlr4
java tokenize and
Question
hi in java8 there be two token shift right and two s if I define as shift right then I can t have rule generictype type type consider this 1 2 be match correctly typea typeb typec type which match a but really should be see as two s after ...
antlrantlr4
performance issue
Duplicate
dear sir I be use the oracle plsql g4 grammar available from here the code be generate use antlr 4 5 3 complete jar for a python 2 target visitor dlanguage python2 with the attach sql test file pcr in out detect release sql it appear that use the trace the analyzer freeze several time ar...
antlrantlr4
help understanding expect alt 1 n but be test failure
Question
any tip for what might be cause the error below this be from the go language target I m work on I haven t debug it deeply yet but be hope this might have a well know cause testambiguitynoloop org antlr v4 test runtime go testfullcontextparse time elapse 2 271 sec failure org junit comparison...
antlrantlr4
javascript target can t use wildcard
Bug
the javascript target compile to matchwildcard instead of this matchwildcard which raise an error manually change to this matchwildcard in the generate source seem to fix the problem
antlrantlr4
null
Question
I be use antlr in python java jar antlr jar file dlanguage python2 java8 g4 show error message in grammar I fix it after it in java8lexer py it show char undefine I change it to chr and fix it also but when run it for my file it show I think it be unable to read copyright symbol unexpected error ...
antlrantlr4
the demo code expr g4 in tpantlr2 code zip for antlr4 have one error
Duplicate
if you test the expression 3 4 5 you will get the result 0 why the code e v e v should modefie as a e v a v you will get the result 27
antlrantlr4
installation over http be unsafe
Question
hi antlr look great but the recommend download happen over http be a bad idea isn t it for the home page curl o
antlrantlr4
update python target md
Bug
update documentation so that python example will work example mygrammar have a lexer rule startrule as the root this should be change to parser rule startrule
antlrantlr4
fix initialization of atnconfig when compute sll prediction termination condition
Bug
the predictionmode hassllconflictterminatingprediction method aim to create atnconfig object from another atnconfig and semanticcontext object in case of the python target the initialization happen without keyword argument since the call init method have default value set for all the parameter the param...
antlrantlr4
same input target python3 seem not to terminate in reasonable time whereas it do when target java
Duplicate
test on antlr 4 5 2 4 5 3 the grammar lexer file I provide be generate automatically I attach also the file example gf that parse correctly when use the java target but seem not to terminate or at least I do not leave run enough when use python3 target I really beg your pardon for not give a more coin...
antlrantlr4
rule have non ll decision due to recursive rule invocation reachable from alt
Question
hi I be begini at antlr and when I attempt to generate parser I have this error 11 49 26 error 211 vv g 52 3 fatal rule expr have non ll decision due to recursive rule invocation reachable from alt 1 5 resolve by left factoring or use syntactic predicate or use backtrack true option 11 49 26 er...
antlrantlr4
avoid null entry for ambigous tree list
Invalid
might help in fix
antlrantlr4
match empty token at eof
Question
hi I m use lexer mode to match string in my grammar from an example it look like this antlr quote pushmode stringmode mode stringmode string r n r n string quote type quote popmode unterm string self input la 1 in ord r or...
antlrantlr4
mixfix operator operator extensibility
Question
so after do some fairly quick search perhaps use the wrong term I be wonder if it s indeed possible write grammar in antlr4 that allow user to define custom infix operator something like the technique describe here nad publication danielsson norell mixfix pdf so for instance if a user want to define a se...
antlrantlr4
bug grammar auto build java source even when it s not in a source directory
Invalid
I keep a bunch of g4 file in a doc folder of my project for refer to I don t intend for those to generate source despite set the correct source folder in my project setting the antlr tool still generate java source for any grammar it find regardless of their location in the project
antlrantlr4
antlr 4 and spring
Invalid
I m write a web application with a full accounting package to make it more configurable I m do all of the accounting function in a 4gl write in antlr I develop the language in a separate project and make sure it be work before I integrate it into my web project the web project work and the antlr project wor...
antlrantlr4
antlr4cs 4 4 3 c throw nullpointerexception when compile xpath grammar xpath g4
Invalid
development environment detail visual studio 2015 oracle jre 8u73 package antlr4 4 3 0 build antlr4 target 132 5 error ac0031 antlr can not generate org antlr v4 codegen csharp v4 5 2target code as of version 4 3 package antlr4 4 3 0 build antlr4 target 132 5 error ac1000 unknown build error ...
antlrantlr4
antlr4 go into infinite loop
Duplicate
try to answer issue bad parsing of ternary expression 1119 get antlr into an endless loop input be 3 between 9 and 10 and 4 between 65 and 76 start parse from expression ie java org antlr v4 gui testrig mssql expression gui trace token code be grammar mssql expression ...
antlrantlr4
context sensitive parse bug
Invalid
hi I ve come across a bug whilst try try to track down why the parser I m work on be resort to context sensitive parse the bug be reproducible use the simple grammar below with the follow sample input select a x b y in the grammar below the from table source clause rule be not actually use it should ul...
antlrantlr4
bug in generate javascript for recursive rule action
Duplicate
I have a lisp style recursive list construct in my grammar like so javascript we do this the old fashioned way because that s what the compiler want statement list return retval statement retval type stmt list head statement retval tail null statement statement list ...
antlrantlr4
c backtrack win t work
Invalid
grammar test option backtrack true memoize true language csharp3 prog code code bt console writeline bt other console writeline other bt abc other this grammar output input abc token abc select input acd 3 toke...
antlrantlr4
rfc incremental parse
Question
I be do some research on how to use antlr parser incrementally I come across some old discussion from 2009 this offer various solution outside antlr core itself since a lot of time have pass and new version of antlr have be create I want to check if there be a recommendation on how to implement antlr parser for ...
antlrantlr4
python3 generate invalid syntax
Invalid
use the version commit 01e6923dbd1c3cc37925459b491d9ad93eeb4ca6 date tue dec 8 11 39 09 2015 0800 use the input and the command java jar antlr4 tool target antlr4 4 5 2 snapshot jar dlanguage python3 g4 I get invalid syntax generate python3 4 antlrv4lexer py file antlrv4...
antlrantlr4
white space in antlr error message
Invalid
I have a lexer parser that work great and be set to ignore white space consequently I think no viable input at error message report a string of text with no white space separate the text rendering of the token find so far this be a hard to read error message and unfriendly to non antlr aware user what abo...
antlrantlr4
version information omit from manifest mf in antlr 4 5 1 complete jar
Bug
several property have be omit from meta inf manifest mf in antlr 4 5 1 complete jar I notice this when I add 4 5 1 to the antlr plugin for eclipse it show null in the version column screenshot attach here s what I m see in the file manifest version 1 0 archiver version plexus archiver build by par...