[il-antlr-interest: 25477] ( # ) FREE MAJOR SOFTWARE APPLICATIONS ACTIVATION/REGISTRATION KEYS FOR WINDOWS XP/ VISTA/WINDOWS7 ALL FOR FREE . THE DETAILS ARE FOUND THESE FOLLWING SITES( # ). http://

2009-08-26 Thread carissa de
( # ) FREE MAJOR SOFTWARE APPLICATIONS ACTIVATION/REGISTRATION KEYS FOR WINDOWS XP/ VISTA/WINDOWS7 ALL FOR FREE . THE DETAILS ARE FOUND THESE FOLLWING SITES( # ). http://www.rabinath.weebly.com --~--~-~--~~~---~--~~ You received this message because you are subscri

[il-antlr-interest: 25476] Re: [antlr-interest] Tokens that span across char streams

2009-08-26 Thread Stanislav Sokorac
That's very true. It's probably because performance is something that you can have a "feel" for as you look at some code, while memory usage takes a lot more (system-wide, sometimes) analysis to determine. Do you have any tips on how to keep the memory usage down for large files? And, how hungry i

[il-antlr-interest: 25475] Re: [antlr-interest] Tokens that span across char streams

2009-08-26 Thread David-Sarah Hopwood
Stanislav Sokorac wrote: > I guess the tricky thing will be to insert this functionality without > significantly adding to the run time.. If the stream has to check for > macros, and also mux between the regular stream and the macro definition, > I'm adding two 'if' checks on every single character

[il-antlr-interest: 25474] Re: [antlr-interest] Tokens that span across char streams

2009-08-26 Thread Stanislav Sokorac
I guess the tricky thing will be to insert this functionality without significantly adding to the run time.. If the stream has to check for macros, and also mux between the regular stream and the macro definition, I'm adding two 'if' checks on every single character. Maybe more if I'm also selectiv

[il-antlr-interest: 25473] Re: [antlr-interest] Recognizing 5-th hex digit

2009-08-26 Thread David-Sarah Hopwood
Kieran Beltran wrote: > Sam / Gavin thank-you. > > So, in the case I am receiving UTF-32 input, I would need to preprocess > (using UTF-32-->UTF-16 algorithim) for characters in the 1 to 10 > ranges and convert them into surrogate pairs, passing that input to > ANTLRInputStream. Or just u

[il-antlr-interest: 25472] Re: [antlr-interest] Tokens that span across char streams

2009-08-26 Thread David-Sarah Hopwood
Stanislav Sokorac wrote: > Who keeps track of line numbers and character positions? The char stream, or > the lexer? The char stream. It's actually fairly straightforward to override in your own subclass -- look at the source code for the consume method of ANTLRStringStream, for example:

[il-antlr-interest: 25471] Re: [antlr-interest] Recognizing 5-th hex digit [correction]

2009-08-26 Thread David-Sarah Hopwood
David-Sarah Hopwood wrote: > Kieran Beltran wrote: >> A review of the UCS documentation >> http://unicode.org/Public/UNIDATA/UnicodeData.txt indicates that indeed >> there is a 5-th hex digit that is used "publically", albeit infrequently - >> primarily for mathematics, musical symbols and other ar

[il-antlr-interest: 25470] Re: [antlr-interest] Recognizing 5-th hex digit

2009-08-26 Thread David-Sarah Hopwood
Kieran Beltran wrote: > I am working on an ANTLR grammar to support the ISO Standard Z notation > (specification language). The Z character set includes many non-ASCII > characters, so the lexer must recognize unicode character sequences, which, > for lexer token definitions comprising 4-hex escape

[il-antlr-interest: 25469] Re: [antlr-interest] Recognizing 5-th hex digit

2009-08-26 Thread Kieran Beltran
Sam / Gavin thank-you. So, in the case I am receiving UTF-32 input, I would need to preprocess (using UTF-32-->UTF-16 algorithim) for characters in the 1 to 10 ranges and convert them into surrogate pairs, passing that input to ANTLRInputStream. In my lexer definition, where appropriate,

[il-antlr-interest: 25467] Re: [antlr-interest] Recognizing 5-th hex digit

2009-08-26 Thread Sam Barnett-Cormack
Gavin Lambert wrote: > At 07:35 27/08/2009, Kieran Beltran wrote: >> I have encountered a problem when attempting to recognize two >> required Standard Z symbols which are "above" the four-hex set >> recognized by my generated lexer. The two symbols are \u1D538 and >> \u1D53D. > [...] >> Is the

[il-antlr-interest: 25468] Re: [antlr-interest] misunderstanding channel HIDDEN

2009-08-26 Thread David-Sarah Hopwood
Daniels, Troy (US SSA) wrote: > Your BLAH rule doesn't know that it can call UCODE between characters. > You want something like this. > > startrule: blah; /* Probably also want to include EOF here, otherwise > the parser will successfully run against "blahblah" */ > > blah: B L A H; > UCODE :

[il-antlr-interest: 25466] Re: [antlr-interest] misunderstanding channel HIDDEN

2009-08-26 Thread David-Sarah Hopwood
Ian Eyberg wrote: > Hi, > I think I'm misunderstanding the usage of $channel = HIDDEN > or skip(). > > I have text that looks like: > > 'b...@l^@a...@h^@' > > (most of the time the text is simply 'blah') > and then it should come out like this: > > 'blah' > > my relevant rules are: > >

[il-antlr-interest: 25464] Re: [antlr-interest] Tokens that span across char streams

2009-08-26 Thread Stanislav Sokorac
I failed to mention that the language requires a special character to be used before a macro *use*, which makes it easy to detect macros being used (and allows the flexibility of having it used just about anywhere)... the line below should read String a = #FOO end of a string"; Unfortunately, it'

[il-antlr-interest: 25463] Re: [antlr-interest] Tokens that span across char streams

2009-08-26 Thread Gavin Lambert
At 07:57 27/08/2009, Stanislav Sokorac wrote: >I have a language that allows macros to be used just about >anywhere, which makes things a bit difficult. For example, a >macro could define half a string, and something like this is >legal: > >#define FOO "start of a string >String a = FOO end of

[il-antlr-interest: 25461] Re: [antlr-interest] misunderstanding channel HIDDEN

2009-08-26 Thread Gavin Lambert
At 06:13 27/08/2009, Ian Eyberg wrote: >I have text that looks like: > > 'b...@l^@a...@h^@' > >(most of the time the text is simply 'blah') >and then it should come out like this: > > 'blah' [...] > UCODE : '\u'{ $channel = HIDDEN; }; > >I'm reading in through antlrinputstream

[il-antlr-interest: 25462] Re: [antlr-interest] Recognizing 5-th hex digit

2009-08-26 Thread Gavin Lambert
At 07:35 27/08/2009, Kieran Beltran wrote: >I have encountered a problem when attempting to recognize two >required Standard Z symbols which are "above" the four-hex set >recognized by my generated lexer. The two symbols are \u1D538 and >\u1D53D. [...] >Is the solution to include a fifth digit

[il-antlr-interest: 25460] [antlr-interest] Tokens that span across char streams

2009-08-26 Thread Stanislav Sokorac
I have a language that allows macros to be used just about anywhere, which makes things a bit difficult. For example, a macro could define half a string, and something like this is legal: #define FOO "start of a string String a = FOO end of a string"; If I do on-the-fly substitution of macros by

[il-antlr-interest: 25459] [antlr-interest] Recognizing 5-th hex digit

2009-08-26 Thread Kieran Beltran
I am working on an ANTLR grammar to support the ISO Standard Z notation (specification language). The Z character set includes many non-ASCII characters, so the lexer must recognize unicode character sequences, which, for lexer token definitions comprising 4-hex escaped unicode (\u), I believe

[il-antlr-interest: 25457] [antlr-interest] misunderstanding channel HIDDEN

2009-08-26 Thread Ian Eyberg
Hi, I think I'm misunderstanding the usage of $channel = HIDDEN or skip(). I have text that looks like: 'b...@l^@a...@h^@' (most of the time the text is simply 'blah') and then it should come out like this: 'blah' my relevant rules are: startrule : BLAH; BLAH: 'blah'; UCODE

[il-antlr-interest: 25458] Re: [antlr-interest] misunderstanding channel HIDDEN

2009-08-26 Thread Daniels, Troy (US SSA)
Your BLAH rule doesn't know that it can call UCODE between characters. You want something like this. startrule: blah; /* Probably also want to include EOF here, otherwise the parser will successfully run against "blahblah" */ blah: B L A H; UCODE : '\u'{ $channel = HIDDEN; }; B: 'b'; L: '

[il-antlr-interest: 25456] Re: [antlr-interest] Simplify tree construction rule

2009-08-26 Thread Martijn Reuvers
Hello, Does not really look that complex to me, but you could probably concatenate it in the lexer (but for that you need a real token) or use something like: tokens { SPACE = ' '; } aaa : 'TYPE' ' '? 'AAA' -> 'TYPE' SPACE 'AAA' ; However this will result in 3 nodes,

[il-antlr-interest: 25455] Re: [antlr-interest] ANTLR Javadocs

2009-08-26 Thread Sam Barnett-Cormack
Jim Idle wrote: > Ter, > > Run > > Mvn javadoc:javadoc > > And look under target/site > > I will make it part of the release cycle on my return from travel. And note that the options from David-Sarah Hopwood can easily be set in Maven as well, and for best appearance will be. Maven does set

[il-antlr-interest: 25454] ( # ) FREE MAJOR SOFTWARE APPLICATIONS ACTIVATION/REGISTRATION KEYS FOR WINDOWS XP/ VISTA/WINDOWS7 ALL FOR FREE . THE DETAILS ARE FOUND THESE FOLLWING SITES( # ). http://

2009-08-26 Thread villu da
( # ) FREE MAJOR SOFTWARE APPLICATIONS ACTIVATION/REGISTRATION KEYS FOR WINDOWS XP/ VISTA/WINDOWS7 ALL FOR FREE . THE DETAILS ARE FOUND THESE FOLLWING SITES( # ). http://www.rabinath.weebly.com http://www.hotbutts.weebly.com --~--~-~--~~~---~--~~ You received thi

[il-antlr-interest: 25453] [antlr-interest] Proper errorhandling in grammars for the C target

2009-08-26 Thread Heiko Folkerts
Hi all, I haven't found any example using the C target that uses things like rulecatch etc. for errorhandling. The chapter in the book uses java and exceptions but I don't know how to translate it to C correctly. So far I have a parser creating an AST and hooked up a displayRecognitionError fu

[il-antlr-interest: 25452] [antlr-interest] translating Java frontend code to C frontend code

2009-08-26 Thread Marco Trudel
Dear all I translated the "ANSI C grammar for ANTLR v3" from the grammar list (http://antlr.org/grammar/list) from Java to C. The original is here: http://antlr.org/grammar/1153358328744/C.g My new C one can be found here: http://mtsystems.ch/tmp/C.g Diff: http://mtsystems.ch/tmp/grammar-diff.tx