[il-antlr-interest: 34421] [antlr-interest] Beginning ANTLR documentation. Need a few people to sanity check it before release.

2011-10-15 Thread The Researcher
To help other first time ANTLR users, I created some documentation, tutorials, and reference guides that I wish I had when starting. If you just want to see the documents then they should be *freely* available in a month or so depending upon quantity and the quality of the feedback. If you are in

[il-antlr-interest: 34165] [antlr-interest] Fwd: ANTLRWorks bug: Remove Left Recursion with comments in grammar

2011-09-26 Thread The Researcher
I forgot to give credit where credit is due. This grammar is from Aho, A. V., Lam, M. S., Sethi, R., & Ullman, J. D. (2007) Compilers: principles, techniques, & tools (2nd ed.). Boston: Pearson/Addison Wesley. pg. 47, Example 2.5 -- Forwarded message -- From: The Re

[il-antlr-interest: 34164] [antlr-interest] ANTLRWorks bug: Remove Left Recursion with comments in grammar

2011-09-26 Thread The Researcher
grammar Ambiguious001; string : string Plus string | string Minus string | Digit ; Digit : '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ; Minus : '-' ; Plus: '+' ; Remove All Left Recursion or Remove Left Recurs

[il-antlr-interest: 34135] Re: [antlr-interest] Binary support

2011-09-23 Thread The Researcher
Hi Andi, I have actually tried to modify ANTLR to read binary files and I eventually set it aside and went in a different direction. I did so knowing that it might not be right but to also understand WHY it might not be right. One of the first things you will learn on this endeavor is that K=0 bec

[il-antlr-interest: 34129] [antlr-interest] Fwd: ANTLR 3.4 version Jul 19, 2011 Incorrectly transforms test grammar.

2011-09-23 Thread The Researcher
Upon further investigation, matchRange('0','9'); will cause a compile error because ranges are only allowed in lexer rules not parser rules. Basically, ANTLR didn't give a error message when it should. -- Forwarded message -- From: The Researcher Date:

[il-antlr-interest: 34128] [antlr-interest] ANTLR 3.4 version Jul 19, 2011 Incorrectly transforms test grammar.

2011-09-23 Thread The Researcher
The following demo grammar causes ANTLR 3.4 to generate an invalid parser. The conditional for the if statement is empty. grammar Demo002; number : '0'..'9'; java -classpath /usr/local/lib/antlr-3.4-complete.jar org.antlr.Tool Demo002 In Demo002Parser.java // Demo002.g:3:9: ( '0'

[il-antlr-interest: 34124] [antlr-interest] Fwd: NullPointer exception and inline template

2011-09-22 Thread The Researcher
-- Forwarded message -- From: The Researcher Date: Thu, Sep 22, 2011 at 4:22 PM Subject: Re: [antlr-interest] NullPointer exception and inline template To: Gabriel Miro On Thu, Sep 22, 2011 at 3:46 PM, Gabriel Miro wrote: > It gives me a NullPointerException and I'

[il-antlr-interest: 34123] Re: [antlr-interest] NullPointer exception and inline template

2011-09-22 Thread The Researcher
On Thu, Sep 22, 2011 at 3:46 PM, Gabriel Miro wrote: > COMP_OP: '<>' -> template() "!=" >| '<=' >| '<' >| '>=' >| '>' >; > String templates are not my strong suit and I could not verify this in the book on on the web site, so there is a chance thi

[il-antlr-interest: 34119] Re: [antlr-interest] Antlr v3.3/3.4 documentation hurdles

2011-09-22 Thread The Researcher
On Wed, Aug 24, 2011 at 4:36 PM, Ramanand Mandayam < ramanand_manda...@yahoo.com> wrote: > > error(10): internal error: GTgrammar.g : java.lang.ClassCastException: > org.antlr.runtime.tree.CommonTree cannot be cast to > org.antlr.tool.GrammarAST I just stumbled upon a simple way to create this

[il-antlr-interest: 34082] Re: [antlr-interest] Need some advice which ANTLR versions should be used for my project (Target: Java or Python)

2011-09-16 Thread The Researcher
> > > BTW. PEARL as input language wasn't a typo. PEARL is an acronym for > Process and Experiment Automation Realtime Language and quite different > from > PERL. > > Thanks, looks interesting. > > Eric > List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org

[il-antlr-interest: 34078] Re: [antlr-interest] Binary support

2011-09-15 Thread The Researcher
For example, generating code for a target language > (e.g., C) to access a binary file format might call for a fairly > different syntax than a language that makes it easy to reverse engineer > existing unknown file formats by building up a format > description a bit at a time. > > > A walk on the

[il-antlr-interest: 34072] Re: [antlr-interest] Binary support

2011-09-15 Thread The Researcher
> What I did until now, when reading binary files, is to write interface > classes (in C# or Java), generate code out them and use reflection. In > principal I like this approach, but with ANTLR, I was heading to be on an > even higher level of abstraction, more language independent and hoped to be

[il-antlr-interest: 34069] Re: [antlr-interest] Binary support

2011-09-15 Thread The Researcher
? Which version? It's > all a bit foggy. It would also only be helpful for any binary format which > could be described using ASN.1, which isn't quite all of them. > > Sam > > > On 15/09/2011 18:36, The Researcher wrote: > >> seems

[il-antlr-interest: 34067] Re: [antlr-interest] Binary support

2011-09-15 Thread The Researcher
seems to be an uncharted territory? See: http://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One There are ANTLR gramamars for it. http://www.antlr.org/grammar/list *ASN.1* and *SMI/SPPI/ASN.1 parser*

[il-antlr-interest: 34065] Re: [antlr-interest] Binary support

2011-09-15 Thread The Researcher
Hi Andi, Yes it can be done with ANTLR, but ANTLR is not the correct tool for parsing binary files. The closest example for a binary file is *Java .class file grammar* Basically you will be using semantic predicates for everything, whi

[il-antlr-interest: 34060] Re: [antlr-interest] Need some advice which ANTLR versions should be used for my project (Target: Java or Python)

2011-09-15 Thread The Researcher
Hi Stefan, FWIW Each of the different target languages is created and maintained by different people/groups. See http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets If you check http://www.antlr.org/wiki/display/ANTLR3/Antlr3PythonTarget you will see "Please note that the Python tar

[il-antlr-interest: 34050] Re: [antlr-interest] Should ANTLR 3.4 be backward compatible with 3.3?

2011-09-14 Thread The Researcher
Hi Alan > > On Sep 12, 2011, at 10:30 PM, Alan D. Cabrera wrote: > The ANTLR file generates bad Java code. Is there something I should do to > report this? I tried the Jira but there doesn't seem to be a place to > register. > I have been reporting them here. Terence doesn't seem to mind. FWIW

[il-antlr-interest: 34036] Re: [antlr-interest] ANTLRWorks 2 (for ANTLR v4)

2011-09-13 Thread The Researcher
On Tue, Sep 13, 2011 at 1:07 PM, Terence Parr wrote: > > On Sep 13, 2011, at 7:57 AM, Gary Miller wrote: > > > * Interpreter only works with combined grammars > > actually, it only works with grammars without actions... might not work > with combined either. > > I have also not found a way to do

[il-antlr-interest: 34017] Re: [antlr-interest] "type cannot be resolved or is not a field"

2011-09-12 Thread The Researcher
Hi Phil, Try doing it this way from the command line for the first version of the grammar, but read the explanations in the 5-minute introduction. Create these four files and run the highlighted commands. I showed you a full run show you could see what to expect. Also, notice that CLASSPAH only

[il-antlr-interest: 34011] Re: [antlr-interest] How to recognize a String

2011-09-12 Thread The Researcher
Opps. There's a semi-colon missing. grammar Mail001; stmt: val EOF; val : '(' '\'' ID '\'' ')'; ID : ('a'..'z'|'A'..'Z')+ ; NEWLINE:'\r'? '\n' {skip();} ; WS : (&#

[il-antlr-interest: 34009] Re: [antlr-interest] How to recognize a String

2011-09-12 Thread The Researcher
from the parenthesis, the rest is generated by > ANTLRWorks. Using the interpreter to match the string ' ' (single quotes > and > one space, or any letter between the quotes), I get a > MismatchedTokenException(4!=10). It only matches '' (single quote without > space)

[il-antlr-interest: 33988] Re: [antlr-interest] How to recognize a String

2011-09-09 Thread The Researcher
Hi Gabriel, It would help if you could post your entire grammar and the exact error message here. Also, don't you mean LPAREN: '("; RPAREN: ')'; Don't worry we have all been there. Thanks, Eric On Fri, Sep 9, 2011 at 5:34 PM, Gabriel Miro wrote: > Hello all! > I'm new to ANTLR and I'm tr

[il-antlr-interest: 33929] Re: [antlr-interest] Problem using ANTLRWorks 1.4.3 with Java 1.7 and Win 7 Pro

2011-09-06 Thread The Researcher
Hi Bary, > For the debugger, you most likely need a driver program. The Interpreter >> supplies a driver program, but the debugger requires you to create one. >> > I was thinking about the command line requiring user written driver when I mentioned the debugger. My bad. The debugger should be abl

[il-antlr-interest: 33927] Re: [antlr-interest] Problem using ANTLRWorks 1.4.3 with Java 1.7 and Win 7 Pro

2011-09-06 Thread The Researcher
> > Hi Bary, > > > > For Interpreter Tab ... just click OK. It is not an error it is a warning > about predicates, the Interpreter should still work for entry level > grammars. > > See the glossary for definition of predicates. > http://www.antlr.org/doc/glossary.html > > > > For the debugger, you

[il-antlr-interest: 33916] Re: [antlr-interest] bi-directional grammar

2011-09-06 Thread The Researcher
On Tue, Sep 6, 2011 at 7:13 AM, Erel Segal wrote: > ANTLR parsers normally work in a single direction - they get an input > document and return some information related to it (e.g. the parse tree). > Is > it possible to create, using the same grammar, a generator that will work > in > the opposit

[il-antlr-interest: 33894] Re: [antlr-interest] ANTLRWorks 2 (for ANTLR v4)

2011-09-02 Thread The Researcher
Intelligent search of grammars. Every now and then I search the grammars in the examples and grammars list to see possible ways to do something. Sometimes I don't know enough and scan everything, but other times I know that I need a predicate, cardinality, a tree conversion, lexer rule, etc. List

[il-antlr-interest: 33881] [antlr-interest] ANTLR 3.4 Jul, 19 2001 accepts -Xdbgconverson without warning, should be -Xdbgconversion

2011-09-01 Thread The Researcher
ANTLR 3.4 Jul, 19 2001 accepts -Xdbgconverson without warning, should be -Xdbgconversion Note the missing i near the end. Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this

[il-antlr-interest: 33876] Re: [antlr-interest] ANTLRWorks 2 (for ANTLR v4)

2011-09-01 Thread The Researcher
> > All, > First let me say that having started with ANLTR at 2.x using the command line then seeing ANTLRWorks was a WOW!. Nice job and great stake in the ground. While I am somewhere in between the things that I think would benefit the next version would be 1. More documentation. It took me so

[il-antlr-interest: 33842] [antlr-interest] Is this a Maven related bug? syntax error @[1, 9] in ._Antlr3ErrorLog.java

2011-08-30 Thread The Researcher
Hi, This is my first time using Maven. My goal was to build the Tool because I needed to flip a debug flag in the analysis code. Yes, I know that I probably only need uber jar, but for first time I stuck to the instructions. I based this on the instructions in BUILD.txt. Yes I did read the comme

[il-antlr-interest: 33807] Re: [antlr-interest] Match token {n} times

2011-08-28 Thread The Researcher
> On Sun, Aug 28, 2011 at 3:20 PM, Jonne Zutt > wrote: > > > Dear all, > > > > Is it possible with antlr to match a token exactly n times? > > Something like the following: > > > > ACCOUNT : NUMBER{8}; > > > Hi Jonne, Bart is correct in that matching a exact quantity is not built in to ANTLR, an

[il-antlr-interest: 33803] Re: [antlr-interest] how to implement a regular expression engine

2011-08-27 Thread The Researcher
Hi Nicolas, To get you started take a look at http://antlr.markmail.org/ and search for "regular expression." Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message becau

[il-antlr-interest: 33798] [antlr-interest] org.antlr.Tool API documentation

2011-08-26 Thread The Researcher
Hi all, Just to make sure I didn't miss it. The runtime API can be found at www.antlr.org/api/ but the tool api has to be built on your own machine using JavaDoc. i.e class org.antlr.Tool Thanks, Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/

[il-antlr-interest: 33792] Re: [antlr-interest] Ignoring white space in the interpreter.

2011-08-26 Thread The Researcher
Hi Mike, > don't see where I can download 3.2 http://www.antlr.org/download (and would rather hate to be limited by an older version of ANTLR. Already backed off to Helios from Indigo just to get it installed.) If you use virtual machines like VirtualBox http://www.virtualbox.org/ , these

[il-antlr-interest: 33786] Re: [antlr-interest] Antlr v3.3/3.4 documentation hurdles

2011-08-25 Thread The Researcher
Hi Ramanand, Just to let you know that you are not alone in having trouble finding the documentation. For two days I have been looking for an explanation of alt1 when using the option -Xdfaverbose and just found it explained in Ter's blog. http://www.antlr.org/blog/antlr3/lookahead.html But I als

[il-antlr-interest: 33778] Re: [antlr-interest] AST within Qt's QTreeWidget?

2011-08-25 Thread The Researcher
FWIW I have been generating many dot files lately and the applications for them run from turning them into static images, to standalone viewers, to integrable components, to editors. The dotty app from the graphviz site is nice for a quick view but the best integration I have seen so far is what i

[il-antlr-interest: 33771] Re: [antlr-interest] Problems with Tree Grammars outputting Templates in C#

2011-08-25 Thread The Researcher
Hi Maik, Sorry this is not an answer to your question. It sounds like you need Sam's help. > I am working through the "Language Implementation Patterns" book and I am > translating all examples to C#. I was planning on doing the same in a few months, but if you would be willing to donate the fi

[il-antlr-interest: 33752] Re: [antlr-interest] Antlr v3.3/3.4 documentation hurdles

2011-08-24 Thread The Researcher
Hi Ramanand, Any suggestions, pointers, or clues where to look to? My last option when all others have been exhausted is to just compile a version of ANTLR with the source code, not the jar, and start debugging. Even though I prefer the C# version I have worked in the Java version to hunt down th

[il-antlr-interest: 33751] Re: [antlr-interest] -Xgrtree not working in 3.4 Jul, 19 2001

2011-08-24 Thread The Researcher
Ter, No problem, no rush. I am actually glad they are getting queued up. Again, thank you and all the others that make ANTLR such a great and free tool. Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-a

[il-antlr-interest: 33746] [antlr-interest] Command line option -Xnoprune, what does it do?

2011-08-24 Thread The Researcher
In my endeavor to understand all of the ANTLR options I am currently working on -Xnoprune: do not test EBNF block exit branches. I did search for an answer using Google, the book, the wiki, markmail, and nothing of detail was found. Comparing the parser code with and without the option, it is ap

[il-antlr-interest: 33744] [antlr-interest] Simplifier.g generates invalid Java for release 3.4 Jul, 19 2001

2011-08-24 Thread The Researcher
Usnig Simplifier.g from http://www.antlr.org/download *examples-v3.tar.gz* java/polydiff student@antlr:~/polydiff$ java -classpath /home/student/antlr-3.3-complete.jar org.antlr.Tool Simplifier.g student@antlr:~/polydiff$ javac *.java student@ant

[il-antlr-interest: 33730] [antlr-interest] -nfa -dfa command line options not working for release 3.4 Jul, 19 2011

2011-08-23 Thread The Researcher
Please repost to dev list if needed there. student@antlr:~/cminus$ java -classpath /home/student/antlr-3.3-complete.jar org.antlr.Tool -nfa CMinus.g student@antlr:~/cminus$ java -classpath /home/student/antlr-3.4-complete.jar org.antlr.Tool -nfa CMinus.g Exception in thread "main" java.lang.Exce

[il-antlr-interest: 33729] [antlr-interest] Is the -profile option suppose to work with tree grammars?

2011-08-23 Thread The Researcher
>From http://www.antlr.org/download examples-v3.tar.gz java/simplecTreeParser I tried java org.antlr.Tool -profile SiimpleC.g SimpleCWalker.g javac *.java and received error org.antlr.runtime.debug.Profiler can not be applied to (SimpleCWalker) Is the error correct, did I miss something, or is

[il-antlr-interest: 33682] [antlr-interest] ANTLR IDE, Run (Java) selection causing ANTLR Event Listener internal error

2011-08-19 Thread The Researcher
Hi all, I am writing a document on how to build a working ANTLR environment for a first time user. While I am more of a Windows/C# person, this is being done with LINUX and Eclipse so that it can be distributed for free. When I try to use the Run (Java) selection for ANTLR IDE see http://antlrv3

[il-antlr-interest: 33614] Re: [antlr-interest] Test dynamic scope presence

2011-08-13 Thread The Researcher
Hi Joel, If I understand your basic problem you are just trying to spy on the method calls. While it is probably possible to use dynamic scopes have you considered a global scope. Personally, when I debug a few rules for a special case, I just modify the source code directly after ANTLR generate

[il-antlr-interest: 33555] Re: [antlr-interest] Fedora antlr3-tool command line antlr returns version 2.7.7

2011-08-09 Thread The Researcher
> > Kevin, > Thanks, I know that took a few some time. Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-i

[il-antlr-interest: 33550] Re: [antlr-interest] Fedora antlr3-tool command line antlr returns version 2.7.7

2011-08-09 Thread The Researcher
Hi Jim, Thanks for the response. Last week I spent a few days documenting how to install Linux on a virtual machine, Java, ANTLR, Eclipse, ANTLR IDE and ANTLRWorks without using packages and it does work, but the instructions have screen shots for each Enter or mouse click and thus are very long,

[il-antlr-interest: 33549] Re: [antlr-interest] Fedora antlr3-tool command line antlr returns version 2.7.7

2011-08-09 Thread The Researcher
> > Hi Kevin, Thanks, I never thought about there being a second antlr command. I was also only looking for jar files not directories or commands. Also antlr3 is also in /usr/bin as you note. Not being a Linux person I have to ask how do you determine where the files in a package were installed

[il-antlr-interest: 33546] Re: [antlr-interest] Fedora antlr3-tool command line antlr returns version 2.7.7

2011-08-09 Thread The Researcher
Hi John, Thanks for the response. No, I don't consider it noise. I never noticed the difference between antlr.Tool and org.antlr.Tool. I actually use a Visual Studio environment with ANTLRWorks and have been for many years. I am working to make it easier for a first time user of ANTLR to get st

[il-antlr-interest: 33543] [antlr-interest] Fedora antlr3-tool command line antlr returns version 2.7.7

2011-08-09 Thread The Researcher
I am test building ANTLR on Fedora 15 and installed package antlr3-tool using the GUI. Using the command line I entered antlr only to see version 2.7.7 not 3.x. While I know that 2.x versions are needed for 3.x versions to build, if I were to run from the command line shouldn't the antlr command

[il-antlr-interest: 33523] Re: [antlr-interest] Are the Eclipse ANTLR plugins stable?

2011-08-07 Thread The Researcher
Here are the Fedora packages that I found using yum. If anyone knows of a better packace for any of these, please let me know. elipse-jdt antlr3-tool.noarch antlrworks.noarch ANTLR IDE will be done manually. Thanks, Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: h

[il-antlr-interest: 33519] Re: [antlr-interest] Are the Eclipse ANTLR plugins stable?

2011-08-07 Thread The Researcher
Hi Shmuel, I'll give it a go. Could you just identify the correct names of the packages to use. Not being a Fedora/Linux person I often find the wrong package. ie. ANTLR when I really need ANTLR 3., or gnome when I need gnome-core. Thanks, Eric List: http://www.antlr.org/mailman/listinfo/antlr-

[il-antlr-interest: 33517] Re: [antlr-interest] Are the Eclipse ANTLR plugins stable?

2011-08-07 Thread The Researcher
Jay, Thanks for the reply. I had problems getting ANTLR IDE 2.1.1installed at first but using Debian 6 (Squeeze), Eclipse 3.5 (Galileo), and ANTLR IDE 2.0.2 I was able to install and give it a quick test. I still need to do a full test with it. The biggest problem I am facing is that I can not f

[il-antlr-interest: 33491] Re: [antlr-interest] Are the Eclipse ANTLR plugins stable?

2011-08-04 Thread The Researcher
Stephen, Thanks for the response. An appliance is a application that can run as a virtual machine. I am making one for people just learning ANTLR but that have trouble installing the various components, or possibly in classroom use. Think VMware or Virtual Box. Since posing the question I checke

[il-antlr-interest: 33458] [antlr-interest] Are the Eclipse ANTLR plugins stable?

2011-08-01 Thread The Researcher
I am working on building an ANTLR appliance and being a C# person have never spent much if any time with Eclipse ANTLR plugins. Checking the wiki page"Integration with Development Environments" I see two plugins for Eclipse. AntlrDT and ANTLR IDE. Does anyone know if they are stable enoungh to inc

[il-antlr-interest: 33139] Re: [antlr-interest] desperate noob

2011-07-12 Thread The Researcher
Hi Louis, In the comments of the source code for each rule should be the original rule from the grammar. I don't know of any tool in or out of ANTLR that will automate the task so you will have to extract it by hand. HTH Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscr

[il-antlr-interest: 33134] Re: [antlr-interest] Can one identify the type of parser needed for a given BNF grammar

2011-07-12 Thread The Researcher
FYI The following info should be in a Wiki topic for parsing C++ with ANTLR, but I am putting it here for others quietly following this thread. One of the major problems with parsing C++ is the ambiguities. A more through listing of the ambiguities of C++ can be found in appendix F.2 of "Meta-Co

[il-antlr-interest: 33126] Re: [antlr-interest] ANTLR virtual appliance i.e. prebundled ANTLR for a virtual machine.

2011-07-11 Thread The Researcher
Hi Parsiad, I am more than open to any suggestions. This is not for me but for those learning ANTLR. My primary goal for this at present is : 1. Make it easier for people to jump into ANTLR, preferably knowing only Java and using "The Definitive ANTLR Reference" 2. Make it easier for people who

[il-antlr-interest: 33124] Re: [antlr-interest] Can one identify the type of parser needed for a given BNF grammar

2011-07-11 Thread The Researcher
Douglas and Loring, I truly appreciate your feedback and will be taking the time to understand it in enough detail so that I can explain it to others by creating some prototype code. The only other point of note is that if others are quietly reading this thread and are interested in creating a C+

[il-antlr-interest: 33120] [antlr-interest] ANTLR virtual appliance i.e. prebundled ANTLR for a virtual machine.

2011-07-11 Thread The Researcher
Since ANTLR is a starting point for a lot of people learning parsing I was wondering if we should create an ANTLR virtual appliance. For those not familiar with the term virtual appliance, it is an application such as ANTLR that is preconfigured and installed on an OS and then converted into a set

[il-antlr-interest: 33118] Re: [antlr-interest] Can one identify the type of parser needed for a given BNF grammar

2011-07-11 Thread The Researcher
Loring, Never, never, never would I suggest adding a feedback mechanism that couples parser to lexer. I agree with that and will try to hold true to that rule when I create my parser. Thanks Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailm

[il-antlr-interest: 33114] Re: [antlr-interest] Can one identify the type of parser needed for a given BNF grammar

2011-07-11 Thread The Researcher
Douglas, Thanks. This is not meant to be a real-time parser, ease of learning is more important than speed, but quality is more important than ease of learning so what you suggest bears some weight. But I would be willing to trade off better documentation if a more complex solution is used. Her

[il-antlr-interest: 33108] Re: [antlr-interest] Can one identify the type of parser needed for a given BNF grammar

2011-07-11 Thread The Researcher
> > Loring, Thanks for the feedback. While I now can understand your answer, I still don't have enough experience to implement any approach correctly. As a help to others who are working on this in private or interested in creating a C++ parser I will gloss what Loring said because last week

[il-antlr-interest: 33106] [antlr-interest] Can one identify the type of parser needed for a given BNF grammar

2011-07-11 Thread The Researcher
Maybe I dreaming but maybe lady luck is with me today. Does anyone know of program, paper, algorithm that given a BNF grammar it will tell you what type of algorithm/parser can parse it. Types of algorithms/parsers would be Regular Expression (RE), LL, LR, LALR, GLR, SLR and how much look ahead i

[il-antlr-interest: 32837] [antlr-interest] ANTLR 3.4 BSD clean version, Thanks!

2011-06-20 Thread The Researcher
Ter, Sam, and others I just wanted to say thanks for all of the work. I know it is a significant step for ANTLR and took a more than a significant amount of work. Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/you

[il-antlr-interest: 32776] Re: [antlr-interest] minimalistic grammar approach

2011-06-14 Thread The Researcher
Hi Arturo, I would start with "Compilers Principles, Techniques, & Tools" by Aho, Lam, Sethi, and Ullman a.k.a the Dragon Book. If you don't have it you really should for a project of that level. http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools Eric List: http://www.an

[il-antlr-interest: 32764] Re: [antlr-interest] object oriented compiler implementation

2011-06-13 Thread The Researcher
Another place worth searching is http://lambda-the-ultimate.org/ Searching for "design" turns up some interesting info. Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this mess

[il-antlr-interest: 32621] Re: [antlr-interest] Random code generator

2011-05-31 Thread The Researcher
Hi Arturo, If you are referening to generating test phrases for input to your parser, then Ter did a quick take on this. http://www.antlr.org/wiki/display/ANTLR3/Random+phrase+generation+using+an+ANTLR+grammar which will lead you to the RandomPhrase.java in the distribution with the following no

[il-antlr-interest: 32597] Re: [antlr-interest] antlr.org down for about 24 hours

2011-05-28 Thread The Researcher
Ter, It's the messages like this and the free support that that are truly appreciated and help to make ANTLR great. Hope you're enjoying the trip. Thanks, Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-emai

[il-antlr-interest: 32525] Re: [antlr-interest] Superclasses = best practise ...?

2011-05-24 Thread The Researcher
I am currently converting the C++ grammar from a C back-end to a C# back-end. The original C back-end code has support code, support initialization code and utility code. Several versions of the grammar are being developed at the same time; ISO, Microsoft, Test, etc. Each version of the grammar ha

[il-antlr-interest: 32521] Re: [antlr-interest] Automated BNF text combinations generator with constraints

2011-05-23 Thread The Researcher
FYI for others looking for same. Ter did a quick take on this. http://www.antlr.org/wiki/display/ANTLR3/Random+phrase+generation+using+an+ANTLR+grammar which will lead you to the RandomPhrase.java in the distribution with the following note. NOTE: this does not work well for large grammars...it

[il-antlr-interest: 32511] [antlr-interest] Automated BNF text combinations generator with constraints

2011-05-21 Thread The Researcher
I am sure this is an age old question and I did find some initial results on Google. I am looking for a program, preferably open source, that can generate all of the text combinations for a given BNF. Obviously the program should allow constraints to be set that limit such tings as number of chara

[il-antlr-interest: 32445] Re: [antlr-interest] @declarations

2011-05-12 Thread The Researcher
Gentlemen, Thank you. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, s

[il-antlr-interest: 32440] [antlr-interest] @declarations

2011-05-12 Thread The Researcher
I am working on converting the C++ grammar by *Aurelian Melinte* from a C back end to a C# back end and for the life of me cannot find out how to property convert the @declarations section to C#. The searching of @declarations in both Google, and MarkMail drop the @ and then the results become mea

[il-antlr-interest: 32303] Re: [antlr-interest] (qid) Qualified Identifiers

2011-04-26 Thread The Researcher
> Jim, Thanks. :) Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group,

[il-antlr-interest: 32301] [antlr-interest] (qid) Qualified Identifiers

2011-04-26 Thread The Researcher
I am creating qualified identifiers and saw the message http://markmail.org/message/to72c6jlem5zcrjk parser grammar qid : ID (DOT^ ID)* ; and tree grammar qid : ^(DOT qid) | ID ; but to get the AST parse to work for my tree grammar required qid : ^(DOT qid ID) note ID added af

[il-antlr-interest: 32287] Re: [antlr-interest] ANTLR4

2011-04-23 Thread The Researcher
> Hi Ben, ANTLR 4 is only in the initial concept and proof of concepts phase. From info in the forum, it will be based on String Template 4 which was recently released, will have all of the code from know developers so that it can conform to the license agreement which the current code cannot, an

[il-antlr-interest: 32203] Re: [antlr-interest] Sample scannerless parser with AST construction in unmodified ANTLR

2011-04-14 Thread The Researcher
Ter, Nice List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to

[il-antlr-interest: 32199] Re: [antlr-interest] Previous rule element reference in a scope

2011-04-14 Thread The Researcher
Graham, I have a similar problem and scopes are working for me, but to do it I have to build the trees with code and don't have the trees building correctly, but do expect it to work. My problem is that I have field definitions with names and also allow alias names for my field definitions. So I

[il-antlr-interest: 32194] Re: [antlr-interest] |! in antlr2

2011-04-14 Thread The Researcher
Hi Ben, I don't do ANTLR 2 any more, but found this. http://www.antlr2.org/doc/lexer.html#lexicalrules As a shorthand notation, you may suffix an alternative or rule with '!' to indicate the alternative or rule should not pass any text back to the invoking rule or parser (if nonprotected): //

[il-antlr-interest: 32192] Re: [antlr-interest] Tree rewriting -- adding subtrees

2011-04-14 Thread The Researcher
It's nice to know others have the same problems as me. Since you are in this realm, other things to watch out for are 1. Don't rely on ToStringTree() alone. My current version is modified to return the token type value and token type name. If you hit a bug an the match does not work as expected,

[il-antlr-interest: 32183] Re: [antlr-interest] Tree rewriting -- adding subtrees

2011-04-13 Thread The Researcher
Stephen, For what its worth, I too am spending a considerable amount of time rewriting trees, and any time I get to something not in "The Definitive ANTLR Reference", I immediately jump to using code. At first it was a royal pain because I tried to write the code from scratch. I then turned to wr

[il-antlr-interest: 32181] Re: [antlr-interest] help

2011-04-13 Thread The Researcher
I believe I found the cause of your problem. CREATE in CREATE OR REPLACE from the input is parsed as --> sqlplus_filepaser rule --> create_objectpaser rule --> create_package_body paser rule --> CREATE paser rule --> CREATE : 'create' ;

[il-antlr-interest: 32173] Re: [antlr-interest] Validating AST

2011-04-12 Thread The Researcher
> Jim, thanks I may use that in the future. I am using C# on Windows and > would have to do some work to get it working on my machine. The specific problem I had was that I created a token in source code with one token type and text implying another token type. Using ToTreeString only showed the

[il-antlr-interest: 32171] [antlr-interest] Validating AST

2011-04-12 Thread The Researcher
For some AST transformations I have to resort to writing code. A recent bug of mine was due to incorrectly building a AST. Is there any code to validate the structure of an AST? Thanks, Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/opti

[il-antlr-interest: 32166] Re: [antlr-interest] help

2011-04-12 Thread The Researcher
There is not enough info in the e-mail for me to determine the exact problem. If there is a problem with the grammar ANTLRWorks should catch it when building. If ANTLRWorks correctly builds the lexer and parser, and then the error appears when parsing, I would check the input against what the gram

[il-antlr-interest: 32156] Re: [antlr-interest] Need pointers for getting comment statements in trees produced by v3 grammer files

2011-04-11 Thread The Researcher
> Hi Ankit, If I understand the question correctly, then have you tried removing {$channel=HIDDEN;} from the lexer rule? i.e. LINE_COMMENT : '//' ~('\n' | '\r')* '\r'? '\n' {$channel=HIDDEN;} ; should be LINE_COMMENT : '//' ~('\n' | '\r')* '\r'? '\n' ; Eric List: http://www.

[il-antlr-interest: 32118] Re: [antlr-interest] Debugging ANTLR tree grammar...

2011-04-07 Thread The Researcher
Thanks to Michalel also, we just happen to be writing our answers at the same time. Another great resource from and for this interest list is http://antlr.markmail.org/ Eric List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-inte

[il-antlr-interest: 32115] Re: [antlr-interest] Debugging ANTLR tree grammar...

2011-04-06 Thread The Researcher
This is not an exact answer to your question, but a possible direction to take for solving your problem. I would suggest looking at the AST from the parser using ToTokenString() and ToStringTree(). ToTokenString() will print the AST as a stream of tokens, with DOWN and UP tokens noted in the erro

[il-antlr-interest: 32089] Re: [antlr-interest] Which to use StringTempates version 3 or 4?

2011-04-05 Thread The Researcher
On Tue, Apr 5, 2011 at 11:01 AM, Sam Harwell wrote: > ST4 is *tremendously* faster than ST3 and includes the most useful debugger > for any template engine I've seen to date. For a new application, it's not > even a question IMO - definitely ST4. > > Sam > Thanks, Eric List: http://www.antlr.org

[il-antlr-interest: 32087] [antlr-interest] Which to use StringTempates version 3 or 4?

2011-04-05 Thread The Researcher
I have the lexing, parsing and tree rewriting completed and will now be doing a proof of concept for the next phase to see if StringTemplates will work as expected. This will be my first use of StringTemplates. Since ST4 is so new and is not documented in the books, should I start with ST3 or jump

[il-antlr-interest: 32047] Re: [antlr-interest] Imaginary node modifies tree unexpectedly. Bug, Grrr, or not what I expected?

2011-04-01 Thread The Researcher
As a work around, use dupTree(). Note: This is example code, change as necessary. a scope { CommonTree b1tree; } @init { $a::b1tree = null; } : b1 = b { $a::b1tree = (CommonTree)adaptor.DupTree((CommonTree)$b1.tree); } b2 = b ; List: http://www.antlr.org/mailman/listinfo/antlr-interest

[il-antlr-interest: 32041] [antlr-interest] Imaginary node modifies tree unexpectedly. Bug, Grrr, or not what I expected?

2011-03-31 Thread The Researcher
Imaginary node modifies tree unexpectedly. Bug, Grrr, or not what I expected? In the following grammar, rule a invokes rule b twice sequentially. The first b is captured as b1, and the second b is captured as b2. If rule b does not create an imaginary token, then both the trees for b1 and b2 are c

[il-antlr-interest: 31970] Re: [antlr-interest] antlr v4 wish list

2011-03-26 Thread The Researcher
ase for someone who is more accustomed to > using Lex/Yacc or comes from a more traditional or academic > parser-building background. > > Best regards, > Jason Doege > > On 3/25/2011 9:19 AM, The Researcher wrote: > > > > > > On Thu, Mar 24, 2011 at 2:32 PM,

[il-antlr-interest: 31960] Re: [antlr-interest] antlr v4 wish list

2011-03-25 Thread The Researcher
On Thu, Mar 24, 2011 at 2:32 PM, The Researcher wrote: > > > On Thu, Mar 24, 2011 at 1:23 PM, Terence Parr wrote: > >> added >> >> * Tree parser error handling should skip subtrees not nodes; these are >> programming errors not input errors. The fl

[il-antlr-interest: 31952] Re: [antlr-interest] antlr v4 wish list

2011-03-24 Thread The Researcher
On Thu, Mar 24, 2011 at 1:23 PM, Terence Parr wrote: > added > > * Tree parser error handling should skip subtrees not nodes; these are > programming errors not input errors. The flat stream makes it hard to > resync. > > Ter > On Mar 24, 2011, at 2:07 AM, Iztok Kavkler wrote: > > >> Howdy, I'm

[il-antlr-interest: 31872] Re: [antlr-interest] Code Generation Concerns

2011-03-23 Thread The Researcher
On Wed, Mar 23, 2011 at 1:55 PM, Jim Idle wrote: > Copy the code gen template and take those pieces out. > > Jim > > > -Original Message- > > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > > boun...@antlr.org] On Behalf Of Kevin Cherry > > Sent: Wednesday, March 23, 2011

[il-antlr-interest: 31902] [antlr-interest] Phases of tree rewriting; is there any Zen to this?

2011-03-22 Thread The Researcher
I am getting ready to refine my transformations, and currently have three phases but each phase has no particular purpose other than to allow me to do transformations that I could not figure out how to do combined with a previous phase, or to keep me from making silly mistakes because the transform

[il-antlr-interest: 31901] Re: [antlr-interest] Imaginary Node Constructor T[token-ref, "text"] throws error: missing attribute access on rule scope: token-ref

2011-03-22 Thread The Researcher
On Tue, Mar 22, 2011 at 7:28 PM, John B. Brodie wrote: > On Tue, 2011-03-22 at 17:21 -0400, The Researcher wrote: > > On Tue, Mar 22, 2011 at 5:14 PM, John B. Brodie wrote: > > > > > On Tue, 2011-03-22 at 16:46 -0400, The Researcher wrote: > > > > FYI >

[il-antlr-interest: 31891] Re: [antlr-interest] antlr-interest Digest, Vol 76, Issue 21

2011-03-22 Thread The Researcher
> Same here. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email

[il-antlr-interest: 31888] Re: [antlr-interest] Imaginary Node Constructor T[token-ref, "text"] throws error: missing attribute access on rule scope: token-ref

2011-03-22 Thread The Researcher
On Tue, Mar 22, 2011 at 5:14 PM, John B. Brodie wrote: > On Tue, 2011-03-22 at 16:46 -0400, The Researcher wrote: > > FYI > > > > In using Imaginary Node Constructor T[token-ref,"text"] as documented > in > > "The Definitive ANTLR Reference"

  1   2   >