The C# code uses C# conventions in many (hopefully most) places.
input.LT(1).Text
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of karen
Sent: Thursday, November 17, 2011 6:25 AM
To: antlr-interest@antlr.org
Subject:
that identifies the version, I
think we were going to use the file extension for this reason. all
v3 grammars will be .g and people building v4 grammar should name
them .g4 Ter On Nov 6, 2011, at 9:29 AM, Eric wrote:
On Sun, Nov 6, 2011 at 12:22 PM, Terence Parr pa...@cs.usfca.edu
wrote:
Hi, Sam
Hi Maik,
Currently the delimiters syntax only works with group files
(TemplateGroupFile, *.stg), not standalone template files
(TemplateGroupDirectory, *.st).
Based on the error message you listed, I'm guessing this is the problem?
Sam
-Original Message-
From:
[mailto:andy.voel...@plantronics.com]
Sent: Friday, November 04, 2011 1:51 PM
To: antlr-interest@antlr.org
Cc: Eric; Sam Harwell (sharw...@pixelminegames.com)
Subject: StringTemplate and Antrl3.runtime version mess on C# target
I've done some further investigation on this problem, and it seems
I went ahead and edited the description of the Bootstrap release. Can you
check it and let me know if it makes things more clear?
Thanks,
Sam
From: Voelkel, Andy [mailto:andy.voel...@plantronics.com]
Sent: Friday, November 04, 2011 3:01 PM
To: Sam Harwell; antlr-interest@antlr.org
Cc
Do you have a stack trace or any other information about where the exception
occurs? In Visual Studio, you can get a stack trace even if you don't have
the source code by going to DebugExceptions..., checking the box next to
UriFormatException, and then looking at the Call Stack window after the
In the Java version, the rewrite syntax is the definitive way to specify the
type of a tree node.
In the newer versions of the C# port, you can specify tree node types as a
token option, so you could do this and be equivalent to your rewrite rule.
Note that I added a ^ as well; your first example
Hi Andy,
I just checked the Wiki and the downloads, and see the inconsistency.
ANTLR.exe uses StringTemplate for code generation, but now only depends on
ST4. I ended up removing ST3 from the Bootstrap download as a result.
You can download ST3 as a separate download from the wiki:
No, as far as I know Antlr 3 will always produce code for ST3. ANTLR 4 will
produce code for ST4 by default.
Sam
-Original Message-
From: Voelkel, Andy [mailto:andy.voel...@plantronics.com]
Sent: Friday, October 28, 2011 1:11 PM
To: Sam Harwell; 'ANTLR interest'
Subject: RE: [antlr
-Original Message-
From: Voelkel, Andy [mailto:andy.voel...@plantronics.com]
Sent: Friday, October 28, 2011 2:11 PM
To: Sam Harwell; 'ANTLR interest'
Subject: RE: [antlr-interest] tool version mismatch for C# target??
I didn't know there was an ANTLR 4. The website advertises 3.4
Hello,
I just ran your test, and it didn't throw any externally visible exceptions.
Internally I would expect a very large number of exceptions because your lexer
has no rules that match any of your input except comments, whitespace, the word
CREATE, and the semicolon at the end.
Sam
, October 21, 2011 2:10 PM
To: antlr-interest@antlr.org
Cc: Sam Harwell (sharw...@pixelminegames.com)
Subject: More problems with ANTRL C#3 target and tools
Hi,
I got over a first round of problems and got a few trivial example working.
I then moved on to trying to convert on of the examples from
Hi Andy Maik,
I agree that the C# target documentation is lacking in many ways. I try to
keep enough documentation at the following page to get you started on the
right path:
http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases
I've been using the CSharp3 target in a commercial product
Hi J. Rampon,
I have an application in which individual files frequently change, and
reparsing the entire set of 4000 files would take a significant amount of
time. I handle this situation by keeping the parsed information in a
loosely bound cache, so my incremental updates are simply reparsing a
I've never seen this occur before.
Can you send me a project with a grammar and input that exhibits this?
Thanks,
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Mari Matinlassi
Sent: Wednesday, September 28, 2011
I believe if(rest(args)) will evaluate to true if args has more than one
item.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Bill Andersen
Sent: Wednesday, September 14, 2011 1:26 PM
To: antlr-interest
Subject:
This is easy for a parser. Just add the following to your grammar.
@rulecatch{}
Aside from answering the single question In the input recognized by this
grammar? (yes/no), this is a rather useless thing to do. There are many,
many other ways to approach error handling that are more appropriate
12, 2011 10:40 AM
To: Sam Harwell
Subject: Re: [antlr-interest] ANTLRWorks 2 (for ANTLR v4)
Hi.
I think the @rulecatch has to be specified per rule, which makes it at least
cumbersome for pretty much all grammars. Please correct me if I am wrong.
How about the lexer?
Do you mean failing
With a carefully designed algorithm, autocomplete actually works quite well
in an ANTLR grammar. I went over portions of the algorithm with Ter in the
past, but it's outside the scope of what he's working on for ANTLR 4. A
partial implementation will be included in the next release of my Visual
I actually asked Dr. Parr recently about why the property is called
CharPositionInLine instead of just Column. The name was actually picked to
make it clear that tab and space are each treated as 1 character. When
talking about parsing, the term Column also always refers to the character
position
Hi Amelie,
You can find the latest version of the C# targets along with instructions
for setting up your project in Visual Studio at the following location:
http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases
Thanks,
Sam
-Original Message-
From:
to create them and navigate them and
manipulate them. Users can set up ASTLabelType as an option so that $x in
actions has the user's type instead of plain object.
Sam Harwell and I were talking today about restructuring all of the tree
interfaces. We're breaking it up into a hierarchy with Tree
In ANTLR 3, the output=template option is only able to produce code for
ST3. You'll have to remove that option and write all your own actions if you
want to target ST4.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of
license used for the
runtime.
Sam
From: Ranco Marcus [mailto:ranco.mar...@epirion.nl]
Sent: Friday, August 12, 2011 3:59 AM
To: antlr-interest@antlr.org
Cc: Sam Harwell [sharw...@pixelminegames.com]
Subject: CSharp3 code generation suggestions
Hi Sam,
I have a few rather small
The Visual Studio Express Editions do not support any extensions other than
simple code templates.
You *should* be able to use the ANTLR extension with the free Visual Studio
2010 Shell (Integrated Mode), but I haven't tried this. Here are links to
the installer and the SP1 update.
Visual Studio
be.
Sam
From: chris king [mailto:kingce...@gmail.com]
Sent: Thursday, August 11, 2011 2:59 PM
To: Sam Harwell; antlr-interest@antlr.org
Subject: Re: ANTLR build process performance improvement
Hey Sam, thanks! I'm using it now and it's faster. Love the VS tool-chain!
I'd be dead
Both the Tree and Token interfaces have a method getLine().
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of David Smith
Sent: Wednesday, August 10, 2011 9:02 AM
To: antlr-interest@antlr.org
Subject: [antlr-interest]
...@gmail.com]
Sent: Tuesday, August 09, 2011 11:47 PM
To: Sam Harwell
Cc: antlr-interest@antlr.org
Subject: Re: [antlr-interest] To Sam Harwell
Oops. Let's try this again...
On Tue, Aug 9, 2011 at 9:41 PM, Sam Harwell sharw...@pixelminegames.com
wrote:
Hi Chris,
You attached CSharp.cs instead
: Tuesday, August 09, 2011 6:29 PM
To: Sam Harwell; antlr-interest@antlr.org
Subject: Re: [antlr-interest] To Sam Harwell
Sam, hey, so I might have bumped into a code gen bug. I'm trying to access a
variable skipSection on the parent production of pp_conditional. It
looks like the generated code
. :)
Thanks,
Sam
From: chris king [mailto:kingce...@gmail.com]
Sent: Tuesday, August 09, 2011 9:56 PM
To: Sam Harwell; antlr-interest@antlr.org
Subject: Re: [antlr-interest] To Sam Harwell
Sam, hey. Sorry to shower you with e-mails today. :) I got your new version
setup up and building but now
Hello everyone,
I'm working on codegen optimization for grammars with output=AST. Medium to
large grammars should see a significant improvement in the way local
variables are handled in rules, *especially* when rewrite operators are
used.
Since this is currently an experimental
, tokens[0].Type);
Assert.AreEqual(inputText, tokens[0].Text);
Assert.AreEqual(PreprocessorLexer.EOF, tokens[1].Type);
}
Sam
From: chris king [mailto:kingce...@gmail.com]
Sent: Thursday, August 04, 2011 3:48 AM
To: Sam Harwell; antlr-interest@antlr.org
Subject: Re: Have I found
...@antlr.org] On Behalf Of chris king
Sent: Monday, July 25, 2011 6:39 PM
To: antlr-interest@antlr.org
Subject: [antlr-interest] To Sam Harwell
Sam, hey, hope this finds you. Very small suggestion follows :). In
Antlr3.StringTemplate.csproj could you use
AntlrBuildTaskPath$(MSBuildProjectDirectory)\..\bin
/Antlr3CSharpReleases
Also, if you end up using (and liking) my Visual Studio 2010 extensions, I
appreciate the reviews on the Visual Studio Gallery. :)
Thank you,
Sam Harwell
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest
grammar?
To: Sam Harwell sharw...@pixelminegames.com
Hi Sam,
Thanks for the info. I had seen both of those, but they are too heavyweight
for my needs - the editor must be a HTML5 construct. Shipping any desktop
tool is a no-no as this is a web-application.
Regarding You probably shouldn't try
[mailto:kingce...@gmail.com]
Sent: Thursday, July 28, 2011 4:19 PM
To: antlr-interest@antlr.org; Sam Harwell
Subject: Have I found an Antlr CSharp3 lexer bug if...
Have I found an Antlr lexer CSharp3 bug if I can alter program execution
(exception instead of no exception) by introducing a lexer
Hi Parsiad,
I believe he's referring to creating a new ANTLR target/runtime for Go
(option language=Go), as opposed to using ANTLR to compile Go files into
executable code.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf
To: Sam Harwell
Cc: antlr-interest@antlr.org
Subject: Re: Have I found an Antlr CSharp3 lexer bug if...
Sam, thanks so much for taking the time to look at that. If I could, let me
try and explain what I'm trying to do and tell me if you think it's
possible. For my own edification, I'm trying
You're reading the greedy option in reverse. :) I'd write the rule this way:
STRING_LITERAL
: ''
( options{greedy=true;}
: ''
| ~''
)*
''
;
Sam
-Original Message-
From:
You have the following rule in your lexer. Remove it:
DQUOTE : '';
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of G. Richard Bellamy
Sent: Wednesday, July 27, 2011 3:20 PM
Cc: antlr-interest@antlr.org
Subject: Re:
Hi Richard,
The double quote escape character in a verbatim string is , so what you're
actually passing to the parser is a single (unmatched) quote. To pass an
empty string, you'll need to use @.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
for bringing this to my attention.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of chris king
Sent: Monday, July 25, 2011 6:39 PM
To: antlr-interest@antlr.org
Subject: [antlr-interest] To Sam Harwell
Sam, hey, hope
Your example is ambiguous as well as left recursive. I assume you meant one
of the following:
a : a B | A;
a : A* B | A;
The first can be written as:
a : A (B^)*;
The second can be written as
a : A (A* B^)? | A | B;
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
To skip the AST, just don't use the output=AST option.
Here are some specs on the tokens. I'm including the overhead of having them in
a CommonTokenStream (or equivalent) because they're not very useful otherwise.
Java target, 32-bit VM: 48 bytes/token.
Java target, 64-bit VM: 64 bytes/token.
Were you generating code with the C# port of the tool (Antlr3.exe) or with
the Java version? I've only tested this feature with the C# version.
I believe if you use the Java version to generate it, you have to explicitly
state the terminal option. The C# port defaults to this option, but the Java
That's what it does now...?
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Douglas Godfrey
Sent: Saturday, July 16, 2011 10:13 AM
To: Terence Parr
Cc: antlr-interest@antlr.org
Subject: Re: [antlr-interest] Hi! about
In your partial class file that accompanies your grammar, you should add the
following function override:
partial class MyTreeParser {
public override IAstRuleReturnScope Bottomup() { return bottomup(); }
}
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
Also, make sure you back up a copy of the generated file you have. You don't
want to accidentally generate some code over the top of it only to find out
the new grammar wasn't yet complete. :)
-Original Message-
From: antlr-interest-boun...@antlr.org
You should throw a NotImplementedException instead of returning null.
The rewrite exception indicates a mismatch between the matching and rewrite
portions of the rules in your grammar. Typically that particular message
appears when you have a rule written like one of the following:
Example 1:
I'm not sure which templates are in use by AntlrWorks 1.4.2, but they
certainly aren't the latest/correct version for the CSharp3 target. Under
most conditions, the CSharp3 target doesn't emit the *_return classes at
all, and renaming the rules wouldn't affect that.
I suggest trying the latest
If your parser uses a special tree type, you should implement the following
method in your helper file to ensure that there's never a case where the
user forgets to set the tree adaptor.
partial void CreateTreeAdaptor(ref ITreeAdaptor adaptor) {
adaptor = new
-8052-113077
5473f8
Go Language Support (http://golang.org)
http://visualstudiogallery.msdn.microsoft.com/bd7675ba-1bf5-4395-8c5a-4fc19d
fc0d76
Thank you,
Sam Harwell
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr
I use the following rule for that:
genericBlock
: '{'
(genericBlock | ~('{'|'}'))*
'}'
;
Since the curly braces are inside the genericBlock rule, you'll have to modify
your componentStatement rule:
componentStatement
:'component'^
Hi Payam,
Any rule in a parser or tree parser can return 0 or more items. Since the
Java method implementing a rule can only return 0 or 1 items, some special
handling is in place to allow you to do what you're after. Consider a rule
foo which currently returns a single int:
foo returns [int x]
target could create a partial method, and a C/C++
targets could declare the method in a generated header.
Sam
From: Douglas Godfrey [mailto:douglasgodf...@gmail.com]
Sent: Tuesday, June 07, 2011 8:09 AM
To: Ranco Marcus
Cc: Sam Harwell; antlr-interest@antlr.org
Subject: Re: [antlr-interest
classes C
and D, then everything behaves like it was written in a single grammar. Do
you see any immediate problems with this potential approach?
-Original Message-
From: Ranco Marcus [mailto:ranco.mar...@epirion.nl]
Sent: Wednesday, May 25, 2011 4:26 PM
To: Sam Harwell; antlr-interest
My initial guess is the exceptions are being thrown in the lexer. By
default, the implementation of NextToken in the lexer catches any
RecognitionException and handles it by skipping the invalid token. Custom
handling of the exception depends on exactly what you're trying to
accomplish. One way to
[mailto:misc.us...@gmail.com]
Sent: Friday, May 20, 2011 3:58 AM
To: Sam Harwell
Cc: antlr-interest@antlr.org
Subject: Re: [antlr-interest] ANTLR C# port
I may have miscommunicated something here. I have a very simple Hello
World! style grammar that I wrote to learn ANTLR. I deliberately fed the
lexer
I think it translates to the following in ANTLR 3:
sql_literal :
(NUMBER | QUOTED_STRING | 'null')
- ^(SQL_LITERAL[sql_literal] NUMBER? QUOTED_STRING? 'null'?)
;
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of
Harwell
Cc: antlr-interest@antlr.org
Subject: Re: [antlr-interest] [C#] Lexer Not Throwing Errors
On Thu, Apr 21, 2011 at 1:06 PM, Sam Harwell sharw...@pixelminegames.com
wrote:
Hi Justin,
The exception does get thrown, but is handled in Lexer.NextToken() by
tossing out a character and continuing
Hi Joe,
This feature is not yet implemented in v3. I may be able to get it
implemented for release 3.4, but there are some technical issues that
prevent it from working in a few cases that make it difficult.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
-
From: Ranco Marcus [mailto:ranco.mar...@epirion.nl]
Sent: Thursday, April 07, 2011 6:49 AM
To: Sam Harwell; antlr-interest@antlr.org
Subject: RE: [antlr-interest] [CSharp3] rule visibility in composite
grammars
Sounds great, Sam!
What will be the visibility of the methods in the 'Delegated
was architected (it's
how I would have done it in hardware though!).
Martin
On 11-04-04 09:25 AM, Sam Harwell wrote:
I used a hand-crafted implementation of TokenSource between the lexer
and parser. In the preprocessor, whenever I manipulated a token I
used a new token class derived from
Hi Ranco,
I made the following changes so far:
* An imported grammar is always generated as an internal class instead of a
public class.
* Rules within the imported grammar are always declared public since they
are only called by the root grammar.
How does that sound?
Sam
-Original
Hi James,
In this case, I'm dealing with semantic predicates of the form {...}? and
gated semantic predicates of the form {...}?=. The ones you're using in
this case are syntactic predicates, which aren't processed by the Boolean
logic algorithm I've been working on recently.
Sam
-Original
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
-Original Message-
From: antlr-interest-boun...@antlr.org
The AST operators are the most efficient manner:
localVariableDeclaration
: LOCAL^ variableDeclarationList
;
variableDeclarationList
: variableDcl ( ','! variableDcl )*
;
Or use rewrites:
localVariableDeclaration
: LOCAL variableDeclarationList - ^(LOCAL
Hi everyone,
For certain cases of semantic predicates, ANTLR generates some *extremely*
long, complicated, and redundant conditionals in the output code. I've been
working on resolving this issue, and I'm looking for some examples of these
grammars to make sure my updates properly reduce these
, at 9:58 AM, Sam Harwell wrote:
Hi everyone,
For certain cases of semantic predicates, ANTLR generates some
*extremely* long, complicated, and redundant conditionals in the
output code. I've been working on resolving this issue, and I'm
looking for some examples of these grammars to make
Hi Loring,
Yes, all my changes are in SemanticContext.cs (which will be
SemanticContext.java in the Java version).
Sam
-Original Message-
From: Loring Craymer [mailto:lgcray...@yahoo.com]
Sent: Monday, April 04, 2011 12:50 PM
To: Sam Harwell; Terence Parr; antlr-interest Interest
Hi Peter,
The TraceIn/TraceOut methods in Parser and BaseRecognizer have different
signatures (2 parameters vs. 3). The code generator emits calls to the one
in Parser, which is supposed to forward the calls to BaseRecognizer. From
what I can tell from the code generation templates, the methods
I'm trying to use semantic predicates in a lexer. I'll try to explain
everything as I walk through the things I tried. I started with this:
TEXT
: ( ~('}'|''|'\n'|'\r'|'\\'|''|'')
| '\\' .
| {AnonymousTemplateLevel==0}? '}'
| {Outermost!=String}? ''
|
Visualizer / inspector is very useful; check it out:
http://www.antlr.org/wiki/display/ST4/StringTemplate+Inspector+GUI
Ports to C#, Python, Objective-C on the way thanks to Sam Harwell,
Benjamin Niemann, and Alan Condit.
A big thanks to Udo Borkowski for his incredible bug catching
= '='
LA5_0 = '\u'))
Sam
-Original Message-
From: Sam Harwell [mailto:sharw...@pixelminegames.com]
Sent: Thursday, March 31, 2011 10:15 AM
To: antlr-interest@antlr.org
Subject: Problem and commentary on semantic predicates and prediction
4. The test (LA5_0 in SetB) expands
Hi Martin,
For lexers you can implement CharStream (ICharStream in the C# target), and
for parsers you can implement TokenStream (ITokenStream in C# target). I've
successfully used the former for case-insensitive lexing, and the latter for
a preprocessor. ANTLRReaderStream is one of the included
Fowles [mailto:matt.fow...@gmail.com]
Sent: Wednesday, March 30, 2011 8:57 AM
To: Sam Harwell
Cc: Martin d'Anjou; antlr-interest@antlr.org
Subject: Re: [antlr-interest] antlr v4 wish list
Sam~
A token needs to know both start and end position. Especially when you add
in the restriction
Hi Martin,
Replying to the individual points:
1. A token only needs to know the start position in the input stream and the
length. Considering a file may easily have hundreds of thousands of tokens,
it's very important to not add any information to the token that can be
efficiently derived in
Hi Ranco,
As mentioned in the CSharp3 documentation, you need to use both
@lexer::namespace{...} and @parser::namespace{...} in a composite grammar.
If you use the templates included in my Visual Studio extension, then these
are automatically inserted for you (including using the correct
, 2011 9:12 AM
To: Sam Harwell
Cc: Ranco Marcus; antlr-interest@antlr.org
Subject: Re: [antlr-interest] [CSharp3] @namespace and composite grammars
@Sam, what is the name of the Visual Studio extension you are talking about?
I tried to search for anything with ANTLR in it and it couldn't find
Hi Ranco,
I'll add a simple delegate grammar example to the tests I use here and find
a way to make it work. :)
If you are using Visual Studio (or MSBuild in particular, which is the
standard VS build system), then you'll definitely want to use the C# port of
the tool. I highly recommend this
Hi Eric,
In the C# 3 documentation, section 4.4 discusses partial methods called when
a scope object is created.
http://www.antlr.org/download/CSharp3.pdf
Thanks,
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of The
Hi David,
Is there any way you can send me the full grammar you're using (you could
send it to just me if you don't want to send it to the public list)? I don't
use memoization in any of my grammars, so I don't have a way to test this
feature extensively.
Thanks,
Sam
-Original Message-
Hi Andrey,
Thanks for the info. I'll see to getting it in for the next release. :)
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Andrey Sirotkin
Sent: Friday, March 11, 2011 8:13 AM
To: antlr-interest@antlr.org
The CSharp2 target is currently broken, but it's in the process of getting
fixed. The maintainer has been very busy, and it's been especially difficult
given the extra features I've recently added to the CSharp3 target which
aren't supported in C# 2.
Sam
-Original Message-
From:
Hi Susanna,
Actions are not executed as part of a syntactic predicate. As a simplified
example, take the following:
rule : (x {Foo();}) = x;
Foo() will not be called here, instead, you should write:
rule : (x) = x {Foo();};
Sam
From: antlr-dev-boun...@antlr.org
Hi David,
Can you add the following template to the CSharp3 target's ST.stg which is
used for generating code. Let me know if it resolves the issue for you. If
this works, I'll clean it up (only overriding the necessary portion) and get
it checked in for the next release.
ruleLabelDefs() ::=
This is exactly when creating an IDE you (IDE developer) should always
include something like the following in the parse error handler (causing it
cancel out of the entire parse operation):
if (errorCount N)
throw new OperationCanceledException();
:)
Sam
-Original Message-
From:
Ternary for C++ is even stranger, though I'm not sure it's necessary to
support it at this point.
x ? a : b = c
should parse as this in C++:
(? x a (= b c))
But as this is C (which is found to be invalid at a later time since the
ternary operator cannot return an lvalue in C):
(= (? x a b) c)
Hi Peter,
This is fixed in the 3.3.1 release from last week. Here is a link to the
instructions which I keep updated. It includes a link to release 3.3.1 in
section 1.3.
http://www.tunnelvisionlabs.com/downloads/antlr/ANTLRCSharp3_VS2010.xps
Thanks,
Sam
-Original Message-
From:
(Begin objective section)
Inside the following rewrite:
e : e '*' b=e - ^(...);
e refers to the first e (the one right after the ':' in the rule)
$e refers to the enclosing rule (the tree created so far)
$b refers to the second e (the one labeled 'b=')
This is never ambiguous because the
Hi Simon,
Using the 3.3.1 build I posted last night, the only issue with the C# target
is the use of {$channel=HIDDEN;}. To match .NET naming conventions, the
hidden channel constant is Hidden, so they need to be changed to
{$channel=Hidden;}.
I updated the grammar you sent by:
1. Fixing the
Hi Bill,
You need to place the @header block after the options{} block.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Bill Schongar
Sent: Wednesday, February 16, 2011 8:04 AM
To: antlr-interest@antlr.org
Subject:
version of *Sam Harwell *C# port or
the Antlr tool?
*http://www.280z28.org/downloads/antlr/antlr-dotnet-binaries-3.2.0.6805.7z*
Thanks,
Chris
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http
That's actually on my list of things to discuss when I'm there. :)
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Terence Parr
Sent: Wednesday, February 16, 2011 5:43 PM
To: antlr-interest Interest
Subject: Re:
Hi Simon,
I assume you're using the grammar from this project:
http://code.google.com/p/phpparser/
If so, you'll need to modify the grammar to work with any target other than
the Java target. In the @header and @members blocks at the top, the
contained code is written in Java and will need to be
for ANTLR grammars with your project.
. Visual Studio 2010 highlighting and IntelliSense support for ANTLR
v3 grammars and highlighting support for StringTemplate v4 group files.
Thank you,
Sam Harwell
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http
Hi Max,
The CSharp3 target does not currently support ANTLRWorks-style debugging.
I'm planning to support debugging in a future release of the target.
Thanks,
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of
: Sam Harwell
Subject: Antrr 3.3 template Output
Hi, with Antlr 3.3 CSharp i try to use output = template, but generated
class not compile because of a creation of STAttrMap object.
Looking in the ST.stg at line 132 / 139 / 146 i found 3 template wich create
a new istance of STAttrMap object, but i
Here's my analysis of the problem. First and foremost, I'm treating the rule
args as though it were written args : ID+;
Problem 1: The rule args is not always executed behind the same predicate.
This is easily corrected by adding a second rule args2 and modifying the
element rule as follows:
When a semantic predicate is involved with decision making in a grammar, the
following rules should be considered absolute:
1. The predicate cannot access any argument to any rule.
2. The predicate cannot access any variables declared within an @init{}
block of any rule.
3. The predicate cannot
1 - 100 of 121 matches
Mail list logo