Karljürgen,
In order to run ANTLRWorks, you do not need 'javac', but 'java'.
'javac' is the compiler that will compile java source files into byte codes
that the JRE (Java Runtime Environment) interprets/executes.
'java' is the application that executes the byte codes produced by 'javac'.
Since
,
Andreas Stefik, Ph.D.
Assistant Professor
Department of Computer Science
Southern Illinois University Edwardsville
On Tue, Jan 26, 2010 at 12:19 PM, Bart Kiers bki...@gmail.com wrote:
Karljürgen,
In order to run ANTLRWorks, you do not need 'javac', but 'java'.
'javac' is the compiler
Security http://www.ebasedsecurity.com/
You're either hardened or you're hacked!
We Watch Your Website http://www.wewatchyourwebsite.com/
We Watch Your Website - so you don't have to.
*From:* Bart Kiers [mailto:bki...@gmail.com]
*Sent:* Thursday, February 04, 2010 6:29 AM
*To:* Thomas
Thomas,
I highly recommend *carefully* reading the book.
Forgive me for saying, but I doubt that you actually read it. And if so, you
could only have skimmed through it (you have ordered it only yesterday!).
Regards,
Bart.
On Fri, Feb 5, 2010 at 10:23 PM, Thomas Raef
Thomas,
Especially read the paragraph 'Element Labels' on page 95 carefully: that's
what you need to print the part(s) you're interested in.
Regards,
Bart.
On Fri, Feb 5, 2010 at 10:59 PM, Bart Kiers bki...@gmail.com wrote:
Thomas,
I highly recommend *carefully* reading the book.
Forgive
It just occurred to me that the PDF version has different page numbering...
My hard copy has 'Element Labels' on page 80.
Also see the entire chapter 6 Attributes and Actions.
Good luck!
Bart.
On Sat, Feb 6, 2010 at 7:20 AM, Bart Kiers bki...@gmail.com wrote:
Thomas,
Especially read
Hi Adam,
You could handle it in (plain) programming logic inside your grammar.
Here's a little demo:
grammar Test;
@parser::members {
public static void main(String[] args) throws Exception {
String text =
FIELD1\n+
REPEATING_GROUP fields=2 min=0, max=20\n+
Hi John,
On Thu, Feb 18, 2010 at 7:52 PM, John Pool j.p...@ision.nl wrote:
...
Question: how do I 'execute' such a grammar lexer in C# without feeding it
into a parser?
You probably meant to instantiate a FuzzyLexer instead of a FuzzyParser
(unless your lexer grammar is called
On Fri, Feb 19, 2010 at 5:13 PM, Ketan Maheshwari
ketancmaheshw...@gmail.com wrote:
...
For instance the following assignment statement :
in = [t1 hyde%patient:mr hyde, t1 argan%patient:mr argan]
is equivalent to the following xml:
source name=in type=String
array
On Thu, Feb 25, 2010 at 11:27 PM, Scott Stanchfield sc...@javadude.comwrote:
...
See http://javadude.com/misc/astvis.mp4 for the basic idea (the
stuttering is only due to the vid capture - the animation itself runs
smoothly). Edgar and I are thinking of integrating this into ANTLR IDE
once
On Tue, Mar 2, 2010 at 5:25 PM, Philippe Frankson
philippe.frank...@frsglobal.com wrote:
...
@int('444') is a function converting a string into integer.
If I don't have parentheses, then it is not a function, it is only a column
name. Ex.: @test, @integer, @in,
Here is a part of lexer
On Tue, Mar 2, 2010 at 7:00 PM, Bart Kiers bki...@gmail.com wrote:
On Tue, Mar 2, 2010 at 5:25 PM, Philippe Frankson
philippe.frank...@frsglobal.com wrote:
...
@int('444') is a function converting a string into integer.
If I don't have parentheses, then it is not a function, it is only
is given here:
http://www.antlr.org/pipermail/antlr-interest/2009-November/036719.html
Best of luck!
Regards,
Bart.
On 09.03.2010 15:04, Bart Kiers wrote:
Hi Chris,
Since the input ' .mine' does not contain any illegal tokens, the
parser just stops parsing since (statement)* will also match
FYI:
http://stackoverflow.com/questions/2412440/antlr-mismatchedtokenexception-on-simple-grammar
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
On Tue, Mar 16, 2010 at 4:54 AM, Brian Catlin bri...@sannas.org wrote:
When I compile the grammar with ANTLR, I get the following:
warning(149): Commands.g:0:0: rewrite syntax or operator with no output
option; setting output=AST
Hi Brian,
The '!' and '^' are tree-rewrite operators, so
On Tue, Mar 16, 2010 at 7:35 AM, Bart Kiers bki...@gmail.com wrote:
On Tue, Mar 16, 2010 at 4:54 AM, Brian Catlin bri...@sannas.org wrote:
When I compile the grammar with ANTLR, I get the following:
warning(149): Commands.g:0:0: rewrite syntax or operator with no output
option; setting
On Tue, Mar 16, 2010 at 8:10 AM, Brian Catlin bri...@sannas.org wrote:
While that gets rid of those warnings (why don't the warnings print a
reasonable line number? I would call that a BUG),
Note that the '!' is a valid operator inside your grammar, ANTLR just
assumes that you're building
On Tue, Mar 23, 2010 at 2:56 PM, Damien Urruty lepila...@hotmail.comwrote:
Hello
I have been working on the Java grammar,...
What is the Java grammar here? A ANTLR grammar you found on the net, or on
one of ANTLR's wiki pages[1]? If so, you might want to tell which one
(there's more than one
On Thu, Mar 25, 2010 at 9:19 AM, foxterri foxterri foxter...@hotmail.comwrote:
Hi
I have this left recursive problem which i cannot figure out how to solve
and ANTLR WORKS cannot recognize the left recursive problem.
There is no left recursive rule in the part of your grammar you posted.
On Thu, Mar 25, 2010 at 10:00 AM, Simon zack simonz...@gmail.com wrote:
hi,
I'm new to antler
tried writing a little grammer, but it tells me MismatchedTokenException
when I interpret namespace_specification
using the string:
hello.world
Then you start interpreting hello.world with the
On Thu, Mar 25, 2010 at 2:01 PM, Anders Sollander
anders.sollan...@mathworks.de wrote:
Hi,
I've been trying to write a lexer rule for strings with strings in them,
like
This has a quoted string within
Is there a simple lexer rule for this, or do I need some kind of look
ahead?
On Thu, Mar 25, 2010 at 2:50 PM, Bart Kiers bki...@gmail.com wrote:
On Thu, Mar 25, 2010 at 2:01 PM, Anders Sollander
anders.sollan...@mathworks.de wrote:
Hi,
I've been trying to write a lexer rule for strings with strings in them,
like
This has a quoted string within
On Sat, Mar 27, 2010 at 9:16 AM, Gouasmi Thouraya gthour...@yahoo.frwrote:
Hello,
I have to develop a tool which makes the generation of a
specification in CSP-Z from a specification Z, It is possible to use
your tool ANTLR to introduce the grammar of language Z and the grammar
of language
On Wed, Mar 31, 2010 at 11:47 AM, Anton Bychkov bychkov.an...@gmail.comwrote:
...
There is also a strange thing in rule view, it looks like antlr does
not see LParen and RParen in twiddle operator.
I attached screenshot with it.
Ah, I see. There are no other tokens than '(' and ')' defined,
-- Forwarded message --
From: Bart Kiers bki...@gmail.com
Date: Wed, Mar 31, 2010 at 12:01 PM
Subject: Re: [antlr-interest] Empty complement set?
To: antlr-interest@antlr.org
On Wed, Mar 31, 2010 at 11:47 AM, Anton Bychkov bychkov.an...@gmail.comwrote:
...
There is also
On Thu, Apr 1, 2010 at 11:05 AM, Kumar, Amitesh
amitesh.ku...@standardbank.com wrote:
Hi im trying to post to the antlr interest group but it seems I get
bouced everytime
Not any more: this one went through just fine.
Regards,
Bart.
List:
On Thu, Apr 1, 2010 at 1:21 PM, Christian Mayer
christian.ma...@bsse.ethz.ch wrote:
I am wondering how to transform the rewrite rule
Expr: mul_expr ( ( PLUS | MINUS )^ mul_expr )*;
Into the explicit form with the arrow
Expr: a=mul_expr ( op=( PLUS | MINUS ) b=mul_expr )* -
On Fri, Apr 9, 2010 at 10:56 AM, Dietmar Schaefer dietma...@online.dewrote:
...
DefSequence L { -- } works
DefSequence L { A1200} gives me MismatchedTokenException: line 1:16
mismatched input 'A1200' expecting '\u0006'
When stumbling upon the 'A' from 'A1200', the lexer tries to
On Wed, Apr 21, 2010 at 2:41 AM, Andy Hull an...@sunrunhome.com wrote:
Wow, thanks for the article. I was able to redefine the language to avoid
the problem in order to keep the parser as simple as possible (now using
to instead of ... ).
My parser needs to be able to handle nested array
On Mon, Apr 26, 2010 at 10:02 PM, David Blubaugh
davidblubaugh2...@yahoo.comhttp://us.mc1133.mail.yahoo.com/mc/compose?to=davidblubaugh2...@yahoo.com
wrote:
To All,
Has anyone developed a VHDL target within ANTLR??
Hi, do you really mean a VHDL-target (being able to generate VHDL
On Thu, May 6, 2010 at 3:44 PM, Nishanth singh singh.nishan...@gmail.comwrote:
...
This is the error I get when I try to compile:
$ javac locoTokensLexer.java
locoTokensLexer.java:3: package org.antlr.runtime does not exist
import org.antlr.runtime.*;
^
,
Bart Kiers.
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
/articles/antlr3xtut/
Kind regards,
Bart Kiers.
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
On Sat, May 22, 2010 at 1:33 PM, Sameh W. Zaky sameh...@gmail.com wrote:
Greetings,
I am still an ANTLR beginner..
I run a software where I generate the .g grammar file automatically. So I
would love to know how to generate the lexer and parser at runtime given
the
.g file?
When
On Thu, Jun 3, 2010 at 11:09 AM, Oliver Zeigermann
oliver.zeigerm...@gmail.com wrote:
Hi, I am pretty sure wildcards are *greedy* by default and ...
+ and * are normally greedy, except when preceded by a DOT. From the
Definitive ANTLR reference:
*What you really want to type, though, and
, you're still stuck, could you
post the grammar?
Is there a searchable archive I can trawl through?
Yes: http://antlr.markmail.org/
Regards,
Bart Kiers.
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email
Forgot to reply to the entire group...
On Fri, Aug 6, 2010 at 8:03 PM, Bill Andersen bill.ander...@mac.com wrote:
Is there a good way to do a partial parse of Java code to pick out
declarations (or any other structure). If it helps, I'm limiting this to
pretty vanilla Java assignment and
On Thu, Aug 12, 2010 at 7:10 AM, Victor Giordano
power_gio...@yahoo.com.arwrote:
...
The question is: How i can do this, without definig the class inside the
@menbers section. That class, in fact, is one of my program.. so i only
want to reuse that. ...
Hi Victor,
Define a class
On Fri, Oct 15, 2010 at 3:39 PM, Remi Marechal remi.marec...@gmail.comwrote:
if i create a rule like
LETTER: 'a'..'z' ;
With the '~' (tilde):
NON_LETTER
: ~LETTER
;
Note that the negation only works on single characters (or lexer rules that
match a single character). For example, you
On Sat, Oct 16, 2010 at 1:16 AM, Stephanie Balzer
stephanie.bal...@gmail.com wrote:
... What is the meaning of id+= above?
A java.util.List is defined at the start of the rule and
all Identifier-tokens are added to it.
Token id=null;
List list_id=null; *// - !!!*
On Thu, Oct 21, 2010 at 9:13 AM, Cremerius Ralf (DGS-EC/ECC3)
ralf.cremer...@de.bosch.com wrote:
...
SOMETOKEN
: ('a')*;
...
public static void main(String[] args) throws Exception
{
ANTLRStringStream input = new ANTLRStringStream();
problemLexer
Hi,
On Sun, Dec 5, 2010 at 10:14 AM, Chao Wang chaowan...@gmail.com wrote:
only an antlr-3.3-complete.jar file in the lib folder. The compiling failed
with only this file in classpath.
Can you post the stack trace? Can you post the grammar (assuming things go
wrong when generating a
On Sun, Dec 5, 2010 at 11:21 AM, Chao Wang chaowan...@gmail.com wrote:
here is the stack trace:
localhost:output mac$ javac TLexer.java TParser.java Test.java
Test.java:8: cannot find symbol
symbol : constructor ANTLRFileStream(java.io.InputStream)
location: class
with CSharp2.
Regards,
Bart Kiers.
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
On Sat, Jan 15, 2011 at 11:43 AM, fikin nikolai.fii...@gmail.com wrote:
most likely this is obviously stupid question, pardon me in advance please.
what exactly is wrong with this grammar?
lines : line (NEWLINE line)*;
line: '\u0020'..'\u007F'*;
NEWLINE : '\r'?
i also noticed that following works just fine:
lines : line (NEWLINE line)*;
line: CHAR*;
NEWLINE : '\r'? '\n';
CHAR: '\u0020'..'\u007F';
Yes, because you are now using the range operator inside a lexer rule (I
presume you know the difference between
On Sat, Jan 15, 2011 at 1:23 PM, fikin nikolai.fii...@gmail.com wrote:
right. is there a way to make the lexer provide line content as
single token as opposing to a container of char tokens?
Sure, like this:
lines : CHARS (NEWLINE CHARS)*;
NEWLINE : '\r'? '\n';
CHARS :
On Tue, Jan 18, 2011 at 7:41 AM, Kevin Jackson foamd...@gmail.com wrote:
Hi,
I know that this is a problem with my lexer and I'm doing something
stupid, but I have a problem with simple k,v pairs of the format:
[String quoted string with spaces and non-alhpa chars]
My grammar
On Wed, Jan 26, 2011 at 10:40 PM, Ching zchin...@gmail.com wrote:
Can anyone tell me why I got this exception? My output is AST. Thanks.
Err, that error is pretty self-explanatory: you're trying to cast
a org.antlr.runtime.CommonToken to a org.antlr.runtime.tree.Tree, which is
illegal. As you
Il 06/02/2011 17:04, Pavel Martynov ha scritto:
Hi!
with best regards, Pavel Martynov
Answered here:
http://stackoverflow.com/questions/4914073/partial-grammar-for-counting-class-count/4914224#4914224
as
well.
Hi,
On Tue, Feb 8, 2011 at 11:18 PM, Alex Lujan a...@apption.com wrote:
Im having an issue with parsing an input that contains unicode characters.
This is the code Im using to test the parser (messageBytes is an array
created by reading bytes from a binary file):
private static void
On Thu, Feb 10, 2011 at 6:08 PM, Roohul roohu...@yahoo.com wrote:
Hi,
I am working on a grammar which have some variables ending with In or Out
which is treated as the connector between two components. I do not know how
to handle this.
For example:
real abcIn
real abcOut
these are
On Fri, Feb 11, 2011 at 2:27 PM, Roohul roohu...@yahoo.com wrote:
Hi,
This is my sample grammar.. this did not work.. another thing is that my
variables and connectors both can have digits so I created Alpha : LETTER
(LETTER | DIGIT)*; for this but it also give an error.
The problem
On Fri, Feb 11, 2011 at 7:04 PM, Olivier Lefevre lefev...@yahoo.com wrote:
Great! Not to abuse but would you know in which section of
The Definitive ANTLR Reference this mentioned? I couldn't
find it. What is this syntax called?
It's called a validating semantic predicate which is explained
On Mon, Feb 14, 2011 at 6:50 PM, Filip Habr habr.fi...@seznam.cz wrote:
Hello, can you help me somebody? I wrote ExpressionParser in ANTLR, which
parse
math expression to a tree. I was using CommonTree class as a target. Now I
need
to create my own tree class, because I have to create
On Wed, Feb 16, 2011 at 9:18 AM, devdoer bird devdo...@gmail.com wrote:
...
As you see, the last ')' is missed.
So what's wrong with my grammar?
Nothing.
Given your grammar (and adding a `parse` rule to it):
grammar T;
parse
: logicExp EOF {System.out.println(parsed :: +
Hi,
2011/3/3 Juan Manuel Cámara juanm...@gmail.com
...
The Parser works fine, but its return is a flat tree, all tokens are childs
of the root.
Is this the normal use?
Can someone guess what I'm doing wrong, or tell me the way to get the
complete tree? ...
_You_ need to tell how the
On Fri, Mar 4, 2011 at 6:53 PM, g...@novadsp.com g...@novadsp.com wrote:
Is there a pattern to follow for creating tree grammars for subrules?
// parser rule. this works.
expression
: (a=term - $a) ( ( '|' b=term - ^(OR $expression $b)
| '|'- ^(OR
On Fri, Mar 4, 2011 at 11:23 PM, g...@novadsp.com g...@novadsp.com wrote:
On 04/03/2011 19:13, Bart Kiers wrote:
I'd expect that to become the tree-grammar rule:
expression
: term
| ^(OR expression term)
| ^(OR expression EPSILON)
;
Hello Bart
Once
Hi Jerry,.
On Sun, Mar 13, 2011 at 3:33 PM, g...@novadsp.com g...@novadsp.com wrote:
Sorry! Must remember to post plain-text only.
It would be useful to be able to #include a file in a grammar. use case:
grammar is generated by another tool but the lexer definitions are not.
i.e.
On Sat, Mar 19, 2011 at 8:14 PM, Wojciech Tomasz Cichon
wtcic...@googlemail.com wrote:
i decided to extend my grammar for characters
and i added:
factor : '-'? (NUMBER )
| character
;
character : AP (LETTER | NUMBER) AP;
AP : '\'';
LETTER : 'A'..'Z' | 'a'..'Z';
There's
On Thu, Mar 24, 2011 at 4:08 PM, Florian Franzmann
siflf...@hawo.stw.uni-erlangen.de wrote:
...
As I understand it the parser consumes 'Model' as IDENTIFIER and goes into
state block. It ignores a WS, then finds a '{'. This should be recognized
as
BLOCK_BEGIN, which is the next token
On Mon, Mar 28, 2011 at 5:58 PM, J. Talafous jtalaf...@gmail.com wrote:
Why am I getting an NPE on the following test grammar? Thanks.
I am having a hard time getting the @header into my grammar without
getting a NPE error. What am I doing wrong? Thanks for the help.
For ANTLR 3.x, the
On Thu, Mar 31, 2011 at 9:24 AM, piet...@agh.edu.pl wrote:
Hi,
I have problem with running this grammar (downloaded from ANTLR website).
Someone familiar with it?
I'm not, but the first line of the grammar says: *Fortran 77 grammar for
ANTLR 2.7.5. *So, my question to you is: are you
This is enough to demonstrate the problem. When I create a program such as:
state hello
{
}
}
The trailing close bracket is not detected as an error.
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
Try to anchor it by adding an EOF at the end of your entry-rule:
On Mon, Apr 11, 2011 at 8:49 AM, NeoPhyte 20neophyt...@gmail.com wrote:
Does ANTLR give me an option for interactive processing of input. ie
Processing every line of input one by one
From whatever I know till now, it starts processing after it encounters an
EOF.
Is there some way I can make
On Mon, Apr 11, 2011 at 6:31 PM, The Researcher researcher0...@gmail.comwrote:
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
On Sat, Apr 16, 2011 at 12:06 PM, Ruslan Zasukhin
ruslan_zasuk...@valentina-db.com wrote:
...
How to remove that quotes in v3? :-)
Here's a way:
DELIMITED
@init {
String q = null;
}
@after {
String text = getText();
// remove the first and last quote, replace all 2
On Mon, May 2, 2011 at 1:19 AM, Todd O'Bryan toddobr...@gmail.com wrote:
...
Does this make any sense? Is there some way to deal with it?
...
You could let '/]]' be matched in the 'R_TAG' rule and emit another token as
per the instructions described here:
On Wed, May 4, 2011 at 4:12 PM, Jean-Sebastien Vachon
jean-sebastien.vac...@wantedtech.com wrote:
No one can help me with this? :S
Let me know if something is not clear. I need to fix this issue as soon as
I can.
Thanks
The fact that you didn't provide the lexer rules (although they might
:
antlr-interest-boun...@antlr.org] On Behalf Of Bart Kiers
Sent: May-04-11 10:21 AM
To: antlr-interest@antlr.org
Subject: Re: [antlr-interest] Inserting missing nodes
On Wed, May 4, 2011 at 4:12 PM, Jean-Sebastien Vachon
jean-sebastien.vac...@wantedtech.com wrote:
No one can help me
Both parser- and lexer rules can take parameters of any (Java) type.
However, rules in ANTLR are translated to methods, and methods aren't
first class objects in Java. So providing a rule (read: method) to another
rule as parameter is not possible.
Perhaps you can elaborate a bit and explain what
Only at the end. You need to place the code-block *inside* the parenthesis
like this:
keysAndValues
: ('' key '' value
{
// Some code to read the key(s) and value(s) out.
System.out.println(key= + $key.text + , value= + $value.text);
}
)*
;
Regards,
I get the impression you think that when creating AST's, ANTLR inserts
parenthesis (brackets). This is not the case: I guess what you're seeing is
just the tree's `toStringTree()` that displays these parenthesis to make the
hierarchy of the tree apparent.
Or am I misinterpreting your question?
tree.
See: http://www.antlr.org/wiki/display/ANTLR3/Tree+construction
or:
http://stackoverflow.com/questions/4931346/how-to-output-the-ast-built-using-antlr
Regards,
Bart.
On Mon, May 9, 2011 at 4:10 PM, Bart Kiers bki...@gmail.com wrote:
I get the impression you think that when creating
CommonTokenStream inherits getTokens() which returns a List of Tokens.
You'll need to cast them to a Token (or something that extends a Token),
since it's a non-generics List list:
CommonTokenStream tokens = new CommonTokenStream(lexer);
for(Object o : tokens.getTokens()) {
Token t = (Token)o;
Hi David,
The snippet:
@header {
package parser;
import java.util.HashMap;
}
is short for:
@parser::header {
package parser;
import java.util.HashMap;
}
You'll need to do the following as well:
@lexer::header {
package parser;
import java.util.HashMap;
}
Regards,
Bart.
On Fri, May
Hi Rajesh,
Inside a parser rule, the `~` negates tokens, not characters. So if you have
no lexer rule that tokenizes one of: '%', ''^' or '$', then ~SEMICOLON won't
match any of such tokens/characters.
Your grammar (with minor modifications):
grammar Test;
options {
output=AST;
}
tokens {
Hi Ben,
You cannot use fragment rules inside parser rules. So yes, you need to make
LKU a normal token. If you don't want that (for whatever reason), you need
to include the '' in the 'NAME' rule:
NAME
: '' ('a'..'z')+
;
Regards,
Bart.
On Wed, May 18, 2011 at 3:00 PM, Ben Corne
Hi David,
Your parser does not handle:
ans = 3 * (-x + y) * 4
properly since `ans` is an ANS-token and not an IDENT-token. Therefor it
does not get matched by your `assignmentStatement` rule.
Also, you should probably add the EOF at the end of your `script` rule in
your combined grammar.
Hi
Your rule:
targetsExpr
: category ('CAND' targetsExpr)* - ^('CAND' category targetsExpr*)
;
is incorrect. You're always using `CAND` in your rewrite rule but that rule
could just match `category` only.
You'll probably want to do:
targetsExpr
: category ('CAND'^ targetsExpr)*
;
On Fri, May 20, 2011 at 9:54 PM, massimiliano.m...@gmail.com
massimiliano.m...@gmail.com wrote:
Hi,
On Fri, May 20, 2011 at 10:55 AM, Bart Kiers bki...@gmail.com wrote:
targetsExpr
: category ('CAND' targetsExpr)* - ^('CAND' category targetsExpr*)
;
is incorrect. You're always
Hi David,
Every root (or leaf) in the AST must be an instance of a `
org.antlr.runtime.tree.Tree`, so you can't create a node that is a
`java.util.List`.
By default, ANTLR creates its AST using `org.antlr.runtime.tree.CommonTree`
objects which inherits the `getChildren()` method from
Hi Patrick,
I have a hard time understanding what it is you're trying to do.
Instead of springing the entire grammar on us (or me), could you extract
only those rules that are causing the problem(s)? And could you include some
example input you'd like to match/parse?
Regards,
Bart Kiers
Hi David,
Can an `expr` match something that starts with `ID OPENP` and/or `ID GETS`?
Perhaps you can post your entire grammar? Or at least the `expr` rule?
Regards,
Bart.
On Thu, May 26, 2011 at 7:02 PM, David Smith david.sm...@cc.gatech.eduwrote:
I am having a difficult time
On Mon, May 30, 2011 at 9:23 PM, ante...@freemail.hu wrote:
On 5/30/2011 11:20 PM, Bart Kiers wrote:
On Mon, May 30, 2011 at 9:13 PM, ante...@freemail.hu wrote:
On 5/30/2011 10:41 PM, Bart Kiers wrote:
Could you stop spamming the ANTLR mailing list please?
Bart.
You may not know
) == '*') {
isJavaDoc = true;
}
}
(options {greedy=false;} : . )*
'*/'
;
Regards,
Bart Kiers.
On Mon, May 30, 2011 at 8:08 PM, Vijay Raj call.vijay...@yahoo.com wrote:
Hi -
I am trying to parse a given java file, with a code fragment that
consumes
On Mon, May 30, 2011 at 10:38 PM, Jim Idle j...@temporal-wave.com wrote:
It always been OK, but there is obvious common sense involved, such as not
posting such messages every week. For a start, I make a lot of my living
writing professional ANTLR grammars and occasionally, you need to ask for
Hi Nilo,
The grammar:
grammar Brasil;
parse
: WORD EOF
;
WORD
: ('\u00c0'..'\u00ff' | 'a'..'z' | 'A'..'Z' | '-')+
;
parses the input não just fine in ANTLRWorks.
I'm not really familiar with C#, but for those who are, could you perhaps
post *how* you are testing it? (post a
Hi George,
Sure, use Markmail: http://antlr.markmail.org/
http://antlr.markmail.org/Regards,
Bart.
On Sun, Jun 5, 2011 at 3:59 PM, George Spears geo...@woh.rr.com wrote:
Hello,
The ANTLR interest archives have a lot of valuable information in them..
Hi David,
Try this:
(ID GETS) = ID GETS expr SEMI? - ^(GETS ID expr SEMI?)
Regards,
Bart.
On Tue, Jun 7, 2011 at 1:41 PM, David Smith david.sm...@cc.gatech.eduwrote:
I'm parsing a grammar in which the semicolon on the end of a line is
optional. So two of the statement rules might be:
Jim,
From an earlier message, David wrote: *Yes, the language is Matlab and a
semicolon on the end of an assignment expression suppresses display of the
result of the assignment. ...*
Bart.
On Tue, Jun 7, 2011 at 6:30 PM, Jim Idle j...@temporal-wave.com wrote:
Why do you want the SEMI in
it to maximum (see
first line of attached screenshot)
However I see in my editor (antlrworks) in interpreter tab: Ignore
rules: WHITESPACE.
I wonder why, I did not ask for such ignore, and I do not see how to
remove this.
Maybe this occurs in generated code too.
Olivier
Le 6/8/11 12:58 PM, Bart
Meena,
You appear to be running a v3.1 lexer parser with the run-time classes
from v3.3.
On Stackoverflow I recommended you generate a new lexer and parser using
ANTLR v3.3 (and compile them!) which you can then use with the ANTLR v3.3
runt-time classes. Did you do that already?
Bart.
On Tue,
that *getNodeIndex(obj)*
Method is missing.
Thanks,
Meena.
*From:* Bart Kiers [mailto:bki...@gmail.com]
*Sent:* Tuesday, June 14, 2011 4:38 PM
*To:* Meena Subramanian (WT01 - Banking Financial Services)
*Cc:* antlr-interest@antlr.org
*Subject:* Re: [antlr-interest] Facing
The file `/META-INF/MANIFEST.MF` is missing the 'Main-Class' attribute. Add
the line:
Main-Class: org.antlr.Tool
to the file (inside the JAR) and all should be OK.
Regards,
Bart.
On Mon, Jun 20, 2011 at 6:28 PM, Julien BLACHE j...@jblache.org wrote:
A Z asicaddr...@gmail.com wrote:
(...) is returning a String.
Fabien.
Le 22/06/11 00:36, Bart Kiers a écrit :
Fabien, but what is the return type of this `merge(...)` method? Could you
post the method? Or even better: post a SSCCE http://sscce.orgthat
causes such an exception?
Regards,
Bart.
On Wed, Jun 22, 2011
The interpreter is only suitable for very small grammars (without
predicates!). For more complicated grammars, use ANTLRWorks' debugger
instead.
Regards,
Bart.
On Sat, Jun 25, 2011 at 10:25 PM, Mike Kappel mkap...@appfluent.com wrote:
I just downloaded ANTLRWorks and tried the example
Hi Fabien,
Can you post the grammar that produces the error?
Bart.
On Wed, Jun 29, 2011 at 5:57 AM, Fabien Hermenier hermenierfab...@gmail.com
wrote:
Hi
I am sorry, but this is another problem related to sequence of integer.
I don't understand my error(s), despite severals
pass on the
Hi Mark,
I presume you didn't see my answer on Stackoverflow:
http://stackoverflow.com/questions/6529359/how-to-pass-commontree-parameter-to-an-antlr-rule
?
If you did, is there anything that wasn't clear?
Regards,
Bart.
On Thu, Jun 30, 2011 at 2:26 PM, Mark Truluck
1 - 100 of 173 matches
Mail list logo