Re: Grammar Help

2021-12-29 Thread Ralph Mellor
On Wed, Dec 29, 2021 at 5:10 PM Paul Procacci wrote: > > Ralph, > > So Ijust tried comma w/ grammar live view ... and I must say, > I'm blown away. \o/ > This really should be in the docs (it may be, but I didn't go looking for it). I just looked using googles such

Re: Grammar Help

2021-12-29 Thread Paul Procacci
Ralph, So Ijust tried comma w/ grammar live view because as I expand the logic to encompass other things it became further and further unwieldy ... and I must say, I'm blown away. This really should be in the docs (it may be, but I didn't go looking for it). It's really awe

Re: Grammar Help

2021-12-29 Thread Brian Duggan
On Sunday, December 26, Paul Procacci wrote: > > use Grammar::Tracer; > > and > > use Grammar::Tracer::Compact; > > Both I've found helpful, though obviously not fool proof. It'd be nice if > it show'd why it failed (i.e. what it encountered vs what

Re: Grammar Help

2021-12-26 Thread Paul Procacci
Hey all, Firstly, I want to thank everyone for all their responses. It helped greatly. I wanted to share what I ended up with that seems to be working. (below) I'm open to suggestions on how to improve this, tidy things up a bit, etc. Running on the below grammar yields the following wh

Re: Grammar Help

2021-12-26 Thread Paul Procacci
Hey Ralph, I don't use Comma. I'm not a fan of IDE's and generally stick to vi for all my needs. Old habits are hard to break especially once you've been using the same tool for ~25 years like I have. ;( I've been switching back and forth between: use Grammar::

Re: Grammar Help

2021-12-26 Thread Ralph Mellor
ave noted, you need `%%` instead of `%`. Grammar::Tracer isn't always intuitive. Have you tried CommaIDE's Grammar Live View? https://commaide.com/docs/grammar-live-view I wonder if you would have immediately known what the problem was with the latter or if the problem was just that you were th

Re: Grammar Help

2021-12-26 Thread William Michels via perl6-users
gt;>> >>> I was writing a little something tonight using Grammars and ran into >>> something that I can't seem to wrap my head around. I'm hoping someone >>> could explain in detail. >>> >>> Given the following data: >>&

Re: Grammar Help

2021-12-26 Thread Brad Gilbert
l. >> >> Given the following data: >> data - >> objectKey: >> { >> a = "bi"; >> b = "hi"; >> } >> end data - >> >> >> and the following logic partially taken from JSON

Re: Grammar Help

2021-12-26 Thread Simon Proctor
my head around. I'm hoping someone > could explain in detail. > > Given the following data: > data - > objectKey: > { > a = "bi"; > b = "hi"; > } > end data - > > > and the following logic partiall

Grammar Help

2021-12-25 Thread Paul Procacci
can't seem to wrap my head around. I'm hoping someone could explain in detail. Given the following data: data - objectKey: { a = "bi"; b = "hi"; } end data - and the following logic partially taken from JSON::Tiny:

FYI - Raku grammar compile speedup with preceding surrounder syntax

2020-12-26 Thread Darren Duncan
FYI, So I don't know the factors determining how fast Raku can compile ("perl6 -c filename") a grammar, but: Anecdotally I have just seen that using the surrounder syntax "left ~ right middle" rather than "left middle right" makes my 16KB MUON-defining

Re: Help with grammar

2020-05-23 Thread David Santiago
Thank you all for your replies. I was able to fix it and better understanding grammars :-) Regards, David Santiago Patrick R. Michaud escreveu no dia quinta, 21/05/2020 à(s) 21:05: > > On Thu, May 21, 2020 at 08:40:08PM +, David Santiago wrote: > > Can someone explain me wh

Re: Help with grammar

2020-05-21 Thread Patrick R. Michaud
On Thu, May 21, 2020 at 08:40:08PM +, David Santiago wrote: > Can someone explain me why my grammar isn't working? Unfortunately i > can't figure it out :-( > > | headers > | | header > | | * MATCH "Proxy-Connection" > | | header-value &g

Re: Help with grammar

2020-05-21 Thread Gianni Ceccarelli
On 2020-05-21 David Santiago wrote: > Can someone explain me why my grammar isn't working? Unfortunately i > can't figure it out :-( Mixing ``rule``, ``token``, and ``regex`` apparently at random doesn't make for a good grammar… The text at https://docs.raku.org/lang

Help with grammar

2020-05-21 Thread David Santiago
Hi! Can someone explain me why my grammar isn't working? Unfortunately i can't figure it out :-( Full script attached (42 lines) - the new lines in the script are always only "\n" The output: TOP | request-line | | method | | * MATCH "CONNECT" |

Re: Grammar doesn't seem to match any token

2018-09-24 Thread Ralph Mellor
Do you use Grammar::Tracer and especially Grammar::Debugger? I'd say a TOP rule is... don't leave TOP without them. -- raiph

Re: Grammar doesn't seem to match any token

2018-09-24 Thread Brad Gilbert
m > > > On Sun, Sep 23, 2018 at 08:01:31PM -0400, yary wrote: > > Let's see. > > > > If you have my $input = '~i o<<<', then matches. > > > > 'rule' turns on :sigspace. If you use 'token' instead of 'r

Re: Grammar doesn't seem to match any token

2018-09-23 Thread Patrick R. Michaud
; Let's see. > > If you have my $input = '~i o<<<', then matches. > > 'rule' turns on :sigspace. If you use 'token' instead of 'rule' then > matches. > > I don't quite have the full picture of what's happen

Re: Grammar doesn't seem to match any token

2018-09-23 Thread yary
Let's see. If you have my $input = '~i o<<<', then matches. 'rule' turns on :sigspace. If you use 'token' instead of 'rule' then matches. I don't quite have the full picture of what's happening. -y On Sun, Sep 23, 2018 at 7:07

Grammar doesn't seem to match any token

2018-09-23 Thread Mark Carter
My grammar doesn't seem to match the 'other' rule. What's wrong with it? grammar Weave {     token TOP {  * }     rule el {  | |   }     rule lt { '<'  }     rule tilde { '~' \S+ }     rule other { .  } } class Weaver {   

Re: A grammar to provide substitution

2018-08-29 Thread yary
> ($input, %substitutions) { > * my $str = $input; > * for keys > > > %substitutions -> $key { > * $str ~~ s/$key/%substitutions{$key}/; > > > > * } > * return $str; > * } > sub format-string ($input, > > > > %substitutions) { > > > #`(Sub|21

Re: A grammar to provide substitution

2018-08-29 Thread Patrick Spek via perl6-users
> * } > sub format-string ($input, > > > %substitutions) { > > #`(Sub|214745424) ... } > > my %substitutes = '$(placeholder)' => > > "placeholder", '$(purpose)' => "testing"; > {$(placeholder) => > > placeholder

Re: A grammar to provide substitution

2018-08-29 Thread Timo Paulssen
, $(purpose) => testing} > > my $output = > format-string($input, %substitutes); > Here be a placeholder, for > testing purposes. > > say $output; > Here be a placeholder, for > testing purposes. > > I hope this helps. > > Cheers, > Laurent. > > >

Re: A grammar to provide substitution

2018-08-29 Thread Laurent Rosenfeld via perl6-users
just a quick syntactic example on how to perform substitution using the regex substitution operator, rather than a grammar. The OP did not give enough details anyway to be able to design a detailed solution. Cheers, Laurent. Le mer. 29 août 2018 à 16:22, Timo Paulssen a écrit : > There&

Re: A grammar to provide substitution

2018-08-29 Thread Timo Paulssen
, %substitutes); > Here be a placeholder, for testing purposes. > > say $output; > Here be a placeholder, for testing purposes. > > I hope this helps. > > Cheers, > Laurent. > > > > > Le mar. 28 août 2018 à 12:25, Patrick Spek via perl6-users mailto:perl6-us...

Fwd: A grammar to provide substitution

2018-08-28 Thread yary
Oops, forgot to hit "reply-all" this morning... similar answer to Laurent's with slightly different implementation. -y -- Forwarded message - From: yary Date: Tue, Aug 28, 2018 at 8:43 AM Subject: Re: A grammar to provide substitution this is simple enough t

Re: A grammar to provide substitution

2018-08-28 Thread Laurent Rosenfeld via perl6-users
s...@perl.org> a écrit : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi all, > > I'm trying to substitute parts of a string, and thought this might be a > good use of a grammar. Sadly, grammars aren't my strong suit, so I > thought I'd ask the

A grammar to provide substitution

2018-08-28 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi all, I'm trying to substitute parts of a string, and thought this might be a good use of a grammar. Sadly, grammars aren't my strong suit, so I thought I'd ask the wider community for help. Maybe you guys know an even better solu

perl6-debug-m Regex and Grammar Debugging

2018-05-17 Thread jeanpierre . carayol
Hi, I'm trying to use perl6-debug-m for doing Regex and Grammar Debugging. When I use Rakudo version 2016.10 , it's works fine. I get the behaviour which is described at https://perl6advent.wordpress.com/2012/12/05/a-perl-6-debugger/ in section "Regex and Grammar Debugging&quo

[perl #124018] Differing behavior of multi grammar rules with and without "multi"

2017-12-01 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Still reproducible (2017.11, HEAD(5929887)). It does print Nil instead of (Any), but same thing. On 2015-03-08 09:22:25, b...@abrij.org wrote: > > In a grammar that uses a proto+parameterized multi, the "multi" is > optional according to S05. However, the presence of the "m

[perl #124220] [BUG] Grammar waterbed-style issue

2017-09-07 Thread Brian S. Julin via RT
ellent idea, and I've already started binding Linux > libreadline in perl6. > > Anyway, thoughts for consideration. I'm not certain why the behavior > manifests itself, but I'm going to spend some time poking around. > > --cut here-- > use v6; > grammar Bug {

[perl #132004] infinite loop with grammar

2017-09-01 Thread via RT
.07 implementing Perl 6.c. › cat flail.pl use v6; grammar Flail { rule TOP { } rule B { 'x' 'y' | } rule A { '' | 'x' 'z' } rule C { 'w' | 'v' } } Flail.parse('x z x y

[perl #132003] grammar cannot parse from Blob/Buf

2017-09-01 Thread via RT
.07 implementing Perl 6.c. › cat calc.pl use v6; grammar Calculator { token TOP { [ | ] } rule add { '+' } rule sub { '-' } token num { \d+ } } say Calculator.parse('2 + 3'); say Calculator.parse(Blob

[perl #132003] grammar cannot parse from Blob/Buf

2017-08-31 Thread Sam S. via RT
In Perl 6.c, regexes/grammars can only parse strings (at the grapheme level). If you want to parse a Blob or Buf, you have to decode it into a string first by calling the `.decode` method¹ on it. Early Perl 6 design documents² suggested support for parsing at the byte or code-point level, but t

[perl #131972] [BUG] misleading grammar error output when referring to a missing rule with a similarly named sub-rule

2017-08-28 Thread via RT
-32-gcd41322e implementing Perl 6.c. When running the attached script, the error output should be: No such method 'hash' for invocant of type 'Matcher' Instead, the error given is: P6opaque: no such attribute '$!pos' in type Match when trying to get a value Test case

[perl #126558] [BUG] Grammar parse failure should probably return Nil not Any

2017-08-28 Thread Ron Schmidt via RT
Request for test cases now roast issue: https://github.com/perl6/roast/issues/297 Planning to close this ticket soon if no objection.

[perl #126558] [BUG] Grammar parse failure should probably return Nil not Any

2017-08-21 Thread Ron Schmidt via RT
Noticed that RT #131919 is new and may apply to 6.d and would like to take a few days to review further.

[perl #126558] [BUG] Grammar parse failure should probably return Nil not Any

2017-08-21 Thread Ron Schmidt via RT
Hopefully it's just a doc issue but: https://docs.perl6.org/routine/parse still says: >> Returns a Match object on success, and Nil on failure.

[perl #126558] [BUG] Grammar parse failure should probably return Nil not Any

2017-08-21 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Is this ticket relevant today? Note that we also have this: https://rt.perl.org/Ticket/Display.html?id=131919 On 2016-12-19 08:41:33, ronaldxs wrote: > On Tue, 03 Nov 2015 14:26:06 -0800, ronaldxs wrote: > > 18:07 mr_ron m: grammar G { token TOP { a+ } }; my Nil $x = > > G.parse(

[perl #131326] "Cannot invoke this object (REPR: Null; VMNull)" Error when using Grammar::Debugger

2017-05-18 Thread via RT
on MoarVM version 2017.04-64-g6d5ea042 implementing Perl 6.c. OS Version: *Linux Slackware64 - current, 64-bit* I get this error when I add "use Grammar::Debugger" to my code. *perl6 bin/galaxy.p6 laws cnf/laws * *TOP* *Cannot invoke this object (REPR: Null; VMNull)* * in block at /h

[perl #128969] [RFC] Proposal to move grammar related part of error messages behind a runtime flag

2017-04-13 Thread Zoffix Znet via RT
> infix stopper > > The first two parts are really helpful, but the "expecting any of" I > ignore. I understand that people doing fancy grammar related things > probably do find them very useful. However, my impression is that most > people "in the wild" writ

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Will Coleda
>> yary schreef op 2017-03-09 16:12: >>> >>> The method for defining reserved words in general is to have a rule >>> that matches them (typically "match anything in this array" or a long >>> alternation), and then modifying the rules where those

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
ef op 2017-03-09 16:12: The method for defining reserved words in general is to have a rule that matches them (typically "match anything in this array" or a long alternation), and then modifying the rules where those reserved words are not allowed to reject them. So for that grammar, you

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Theo van den Heuvel
ot; or a long alternation), and then modifying the rules where those reserved words are not allowed to reject them. So for that grammar, you want to change "identifier" to reject :i/WHERE/ The exact method of doing so, I don't know! -- Theo van den Heuvel Van den Heuvel HLT Consultancy

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread yary
The method for defining reserved words in general is to have a rule that matches them (typically "match anything in this array" or a long alternation), and then modifying the rules where those reserved words are not allowed to reject them. So for that grammar, you want to change "

Re: How to defined reversed word in a perl6 grammar ?

2017-03-09 Thread Timo Paulssen
Hi, Wouldn't it be enough to use something that backtracks? As you might know, "token" is "regex + ratcheting" and "rule" is "token + sigspace". HTH - Timo

How to defined reversed word in a perl6 grammar ?

2017-03-08 Thread jeanpierre . carayol
Hi, I'd like to know how can I define reserved word in a Perl6 grammar. If you have a look at https://gist.github.com/anonymous/2c04533cb3a61a00b8822ea20237ba7e , you will find a small perl grammar for parsing from clause of sql statement. The issue is when I execute this testcase tha

[perl #128833] [CONC][SEGV] async and grammar related data issue

2017-02-15 Thread jn...@jnthn.net via RT
On Wed, 19 Oct 2016 07:54:05 -0700, jn...@jnthn.net wrote: > > [jdv@wieldy ~]$ perl6 test_grammar_n_threads.p6 > > *** Error in `/home/jdv/rakudo/install/bin/moar': double free or > > corruption (fasttop): 0x0533c8a0 *** > > === Backtrace: = > > /lib64/libc.so.6(+0x77d9e)[0x7f6

[perl #130637] [SEGV] Odd segfaults with a small grammar

2017-01-31 Thread jn...@jnthn.net via RT
On Tue, 31 Jan 2017 08:21:34 -0800, jn...@jnthn.net wrote: > It golfs further still, it seems. This one also blows up: > > grammar Grammar::Foo { > token TOP { > 'z' | :i <[0..9]> ** 4 > } >} > my $res = Grammar::Foo.parse( '2603&#

[perl #130637] [SEGV] Odd segfaults with a small grammar

2017-01-31 Thread jn...@jnthn.net via RT
On Tue, 24 Jan 2017 22:58:44 -0800, comdog wrote: > This program consistently segfaults for me: > > grammar Grammar::Foo { > rule TOP { > 'z' | > } > token unicode_escape { '\\u' :i <[0..9a..f]> ** 4 } &g

[perl #130637] Odd segfaults with a small grammar

2017-01-24 Thread brian d foy
# New Ticket Created by "brian d foy" # Please include the string: [perl #130637] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130637 > This program consistently segfaults for me: grammar Grammar::Foo {

[perl #130527] [BUG] Override of internal character class in grammar won't combine with other character classes

2017-01-07 Thread via RT
classes: grammar g{ token alpha {<[2]>}; token alpha1 {<[2]>}; # same as alpha but without internal car class conflict token beta { <[q]> }; token delta {<+alpha +beta>}; token delta1 {<+alpha>}; token delta2 {<+alpha1 +be

[perl #130400] [BUG] Non-capturing subrule reference does not work outside grammar

2016-12-26 Thread via RT
en though one would expect it to. Compare: > my regex a { a }; regex a { a } > "aaa" ~~ // 「a」 a => 「a」 > "aaa" ~~ /<.a>/ No such method 'a' for invocant of type 'Cursor' in block at line 1 In a gramm

[perl #130083] [BUG] a grammar doesn't match when using perl6-debug-m and does when using perl6-m

2016-11-13 Thread via RT
# New Ticket Created by Daniel Green # Please include the string: [perl #130083] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130083 > perl6-debug-m -e 'grammar G { regex TOP {^^ "#" \s* "lin

[perl #128833] [CONC][SEGV] async and grammar related data issue

2016-10-19 Thread jn...@jnthn.net via RT
On Wed Aug 03 17:07:49 2016, jdv79 wrote: > [jdv@wieldy ~]$ perl6 test_grammar_n_threads.p6 > Use of uninitialized value $!made of type Any in string context > Any of .^name, .perl, .gist, or .say can stringify undefined things, > if > needed.Use of uninitialized value $!made of type Any in string

Re: [perl #129311] Simple Grammar Goes into infinite loop

2016-09-21 Thread Andrew Buchanan
Ok, that clarifies things. Now that I understand what is happening, it is straightforward to recognise and fix the problem. A sentence in the documentation might help other perl 5 transitioners from getting bitten, perhaps at the explanation of the * quantifier. > On 21 Sep 2016, at 6:35 PM

[perl #129311] Simple Grammar Goes into infinite loop

2016-09-20 Thread via RT
# New Ticket Created by Andrew Buchanan # Please include the string: [perl #129311] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129311 > This is a simple two-regex grammar. It is as if the ‘?’ modifier is set on

Re: [perl #129311] Simple Grammar Goes into infinite loop

2016-09-20 Thread Andrew Buchanan
Is this also technically correct, even though it clearly shouldn't match? perl6 -e '"foo" ~~ /(.*)+\:/' # hangs In either case, going into an infinite loop is not exactly DWIM. > On 20 Sep 2016, at 9:12 PM, Will Coleda via RT > wrote: > > On Tue Sep 20 06:06:59 2016, c...@zoffix.com wrote:

[perl #129311] Simple Grammar Goes into infinite loop

2016-09-20 Thread Zoffix Znet via RT
Here's a much shorter way to reproduce it: perl6 -e '"foo" ~~ /(.*)+/' # hangs While my previous explanation for why this occurs makes sense, it's worth noting this behaviour is not observed in Perl 5, for example: perl -e '"foo" =~ /(.*)+/' # does not hang

[perl #129311] Simple Grammar Goes into infinite loop

2016-09-20 Thread Zoffix Znet via RT
I'm not seeing the bug here, to be honest. The `Body` is asking for one or more tokens `Text`, *nothing* is a valid match for those tokens, so after matching the provided text, your grammar continues to match nothing infinite number of times.

[perl #129241] Odd corruption of attribute of type Grammar

2016-09-10 Thread via RT
# New Ticket Created by Andrew Buchanan # Please include the string: [perl #129241] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129241 > Running the test file will produce multiple successful outputs of grammar.parse, that

Re: [perl #128969] AutoReply: [RFC] Proposal to move grammar related part of error messages behind a runtime flag

2016-08-18 Thread Daniel Green
rated in response to the > creation of a trouble ticket regarding: > "[RFC] Proposal to move grammar related part of error messages > behind a runtime flag", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has

[perl #127108] [PRECOMP] Inexplicable failure of grammar post-CURI branch

2016-08-17 Thread Will Coleda via RT
t; error > > > > specifically, since the result of the bug is a failed grammar > > > > parse. > > > > > > > > The grammar of my SUPERNOVA project > > > > (https://github.com/ShimmerFairy/SUPERNOVA) has been failing > > > > si

[perl #128969] [RFC] Proposal to move grammar related part of error messages behind a runtime flag

2016-08-16 Thread via RT
-e:1 --> .say if /asdf \s+ \/⏏ expecting any of: infix stopper The first two parts are really helpful, but the "expecting any of" I ignore. I understand that people doing fancy grammar related things probably do find them very useful. However, my impression is that

[perl #128833] [BUG] async and grammar related data issue

2016-08-03 Thread via RT
# New Ticket Created by Justin DeVuyst # Please include the string: [perl #128833] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128833 > [jdv@wieldy ~]$ cat test_grammar_1_thread.p6 use v6; use XML; PROCESS::<$SCHEDULER>

[perl #123452] [BUG] Grammar fails unexpectedly and then succeeds when Grammar::Tracer is imported in Rakudo

2016-07-02 Thread Carl Mäsak via RT
TimToady_: ooc, do you agree that tracing a grammar breaks LTM matching? https://github.com/jnthn/grammar-debugger/issues/13#issuecomment-229940842 The solution, for whoever fancies implementing it, is probably to mix a role into the tracing closure that we hand back. Where said role has the

[perl #127945] [BUG] in a grammar calls &return in Rakudo, shouldn't

2016-04-21 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #127945] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127945 > m: grammar Foo { token TOP { }; token return { .+ }; }; Foo.parse(

[perl #127492] Calling .perl on an Match object produced by an inherited grammar fails with a Seq error

2016-02-08 Thread via RT
ing .perl on the Match object returned by a subclassed JSON::Tiny Grammar parser. $ perl6 Match.perl-error.t 1..3 ok 1 - myparse accepts proper JSON text ok 2 - Parsing result is a Match object This Seq has already been iterated, and its values consumed (you might solve this by adding .ca

[perl #127108] Inexplicable failure of grammar post-CURI branch

2016-01-19 Thread Will Coleda via RT
On Tue Jan 19 10:12:08 2016, coke wrote: > On Mon Jan 04 11:53:44 2016, coke wrote: > > On Thu Dec 31 05:04:23 2015, lue wrote: > > > There's unfortunately no real diagnostic I can provide for the > > > error > > > specifically, since the result o

[perl #127108] Inexplicable failure of grammar post-CURI branch

2016-01-19 Thread Will Coleda via RT
On Mon Jan 04 11:53:44 2016, coke wrote: > On Thu Dec 31 05:04:23 2015, lue wrote: > > There's unfortunately no real diagnostic I can provide for the error > > specifically, since the result of the bug is a failed grammar parse. > > > > The grammar of my SUPERNOVA

[perl #127108] Inexplicable failure of grammar post-CURI branch

2016-01-04 Thread Will Coleda via RT
On Thu Dec 31 05:04:23 2015, lue wrote: > There's unfortunately no real diagnostic I can provide for the error > specifically, since the result of the bug is a failed grammar parse. > > The grammar of my SUPERNOVA project > (https://github.com/ShimmerFairy/SUPERNOVA) has be

Re: [perl #127107] "duplicate definition of symbol grammar" using Grammar::Tracer in .pm6 file

2016-01-02 Thread Elizabeth Mattijsen
> On 31 Dec 2015, at 13:47, Faye (via RT) wrote: > > # New Ticket Created by Faye > # Please include the string: [perl #127107] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=127107 > > > &g

Re: [perl #127075] Error referencing non-ascii tokens on grammar

2015-12-31 Thread Elizabeth Mattijsen
27075 > > > > I can declare non-ascii tokens without problems on a grammar but I get an > encoding error if I refer to the token using the <> syntax. This happens on > MoarVM, it works fine on JVM. > > This runs OK: > > perl6 -c -e 'grammar { token TOP

Re: [perl #127107] "duplicate definition of symbol grammar" using Grammar::Tracer in .pm6 file

2015-12-31 Thread mt1957
On 12/31/2015 01:47 PM, Faye (via RT) wrote: # New Ticket Created by Faye # Please include the string: [perl #127107] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127107 > $ cat Foo.pm6 use Grammar::Tracer; $ perl6 -I.

[perl #127075] Error referencing non-ascii tokens on grammar

2015-12-31 Thread via RT
# New Ticket Created by Rúbio Terra # Please include the string: [perl #127075] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127075 > I can declare non-ascii tokens without problems on a grammar but I get an encoding er

[perl #127108] Inexplicable failure of grammar post-CURI branch

2015-12-31 Thread via RT
ince the result of the bug is a failed grammar parse. The grammar of my SUPERNOVA project (https://github.com/ShimmerFairy/SUPERNOVA) has been failing since the CURI branch was merged into mainline rakudo, for reasons that are unclear. I can verify that switching to a pre-CURI-merge com

[perl #127107] "duplicate definition of symbol grammar" using Grammar::Tracer in .pm6 file

2015-12-31 Thread via RT
# New Ticket Created by Faye # Please include the string: [perl #127107] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127107 > $ cat Foo.pm6 use Grammar::Tracer; $ perl6 -I. -e 'use Foo' ===SORRY!=== P6M M

[perl #126559] [BUG] Grammar parse failure should probably return Nil not Any

2015-11-03 Thread via RT
# New Ticket Created by Ron Schmidt # Please include the string: [perl #126559] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126559 > According to the docs: http://docs.perl6.org/type/Grammar#method_parse "Meth

[perl6/specs] 8fb3cd: various minor casing/spacing/grammar/syntax fixes

2015-10-14 Thread GitHub
/index.html Log Message: --- various minor casing/spacing/grammar/syntax fixes ◦ unicode→ Unicode [except unicode pragma] ◦ Perl6 → Perl 6 ◦ Perl5 → Perl 5 [except Perl5ish] ◦ a → an [before vowel

[perl6/specs] f8fc48: problems with grammar attributes and a solution

2015-10-12 Thread GitHub
S12-objects.pod Log Message: --- problems with grammar attributes and a solution One could say one cannot _declare_ grammar attributes but rakudo barks only when we use them. For more context: https://rt.perl.org/Ticket/Display.html?id=122253 http://irclog.perlgeek.de/perl6/2015-03

Re: [perl #126263] Problem when reentering the grammar engine from an action

2015-10-05 Thread Timo Paulssen
The thing is that G.parse('a') puts (well, tries to put) the parse result into $/. $/ is a part of your method's signature and by default those are read-only. That's why you're being accused of assigning to a readonly variable. what you'll need to do is either call the parameter something else

[perl #126263] Problem when reentering the grammar engine from an action

2015-10-04 Thread via RT
# New Ticket Created by Stephane Payrard # Please include the string: [perl #126263] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126263 > grammar G { token TOP() { 'a' } } class A { method TOP($/)

[perl #67128] [BUG] Null PMC access when matching against grammar G in module M in a rule in Rakudo

2015-09-23 Thread Larry Wall via RT
Don't need this, using the Top or other rule name is sufficient.

[perl #116373] [BUG] Error when using (supposedly) built-in subrule in grammar

2015-09-13 Thread Christian Bartolomaeus via RT
AFAIU the subrule is NYI. Therefore the inherited method print is used, which does not do the right thing on a cursor object (cmp. also https://rt.perl.org/Ticket/Display.html?id=65208).

Problem detecting identifiers in some grammar rules

2015-09-02 Thread mt1957
Problem is found in the following piece of code; 3 grammar Grammar { 4rule TOP { <.sentence>+ } 5rule sentence { ('c1'|'c2') '=' <+ dutch-chars - [aeiou]>+ } 6token dutch-chars { <[a..z]> } 7 } Grammar.parse('c1 = sdwbh')

[perl #114402] Grammar::Debugger likes PMCNULL Containers

2015-08-13 Thread Christian Bartolomaeus via RT
On Sat Aug 08 04:11:12 2015, Faye wrote: > Bug invalid now that parrot is no longer with us. Additionally this > appears at first glance to have been an issue with the module instead > of rakudo. That's what I thought, too. I'm closing this ticket as 'rejected'.

[perl #125518] NQPRoutine sneaking into Perl 6 land through the Grammar class

2015-06-30 Thread via RT
# New Ticket Created by Sam S. # Please include the string: [perl #125518] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125518 > Some of the methods of the Grammar class (such as FAILGOAL and !cursor_pos) are exposed

Regex vs Grammar

2015-05-23 Thread H.Merijn Brand
::Perl5 with Text::CSV_PP csv_gram.pl 14.226 A Grammar-based parser test.pl 44.541 A reference parser (when I started) test-t.pl 39.887 Current parser, all options implemented csv-parser.pl 25.712 Tony-o's parser So, currently for this kid of

[perl6/specs] 35bcd4: TBD: Redundant material in grammar/parser/syntax a...

2015-05-06 Thread GitHub
S99-glossary.pod Log Message: --- TBD: Redundant material in grammar/parser/syntax analysis

[perl #124220] Grammar waterbed-style issue

2015-03-31 Thread via RT
started binding Linux libreadline in perl6. Anyway, thoughts for consideration. I'm not certain why the behavior manifests itself, but I'm going to spend some time poking around. --cut here-- use v6; grammar Bug { #token TOP { * % \n } token TOP { * % \n } token term {

[perl #124197] Grammar OOM error

2015-03-27 Thread via RT
ne does :) It is a fairly extreme edge case, but if I did this by accident I'm sure someone else will. It also feels like something not resetting pos() after backtracking, but I don't claim to know the new regex's internals. The code is here: --cut here-- grammar Bug {

[perl #124018] Differing behavior of multi grammar rules with and without "multi"

2015-03-08 Thread Brian S. Julin
# New Ticket Created by "Brian S. Julin" # Please include the string: [perl #124018] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=124018 > In a grammar that uses a proto+parameterized multi, the "

[perl #123452] [BUG] Grammar fails unexpectedly and then succeeds when Grammar::Tracer is imported in Rakudo

2014-12-17 Thread Carl Mäsak via RT
I need to digest those comments, though. I don't understand where the grammar "eats the newline that TOP needs to progress". and, oh yes, I also noticed that changing 'token x' to 'regex x' made the bug go away. that's one thing I failed to include. .

[perl #123452] [BUG] Grammar fails unexpectedly and then succeeds when Grammar::Tracer is imported in Rakudo

2014-12-17 Thread Carl Mäsak via RT
masak: no, it makes the grammar behave wrong, it turns out in parsing B\n, it matches the right side of x under LTM, and eats the newline that TOP needs to progress, so the next match fails to progress because $$ doesn't match put a {} before the second \s* and it matches, because th

[perl #123452] [BUG] Grammar fails unexpectedly and then succeeds when Grammar::Tracer is imported in Rakudo

2014-12-17 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #123452] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=123452 > star: grammar G { regex TOP { [ [';' | $$] \s*]* }

[perl #121966] [BUG] Grammar::Debugger busted (for reasons which seem to have to do with Rakudo internals)

2014-12-15 Thread Christian Bartolomaeus via RT
akudo (on Moar, Parrot and JVM): $ PERL6LIB=lib perl6 -e 'my $*IN = role { method get() { "" } }; use Grammar::Debugger; grammar G { regex TOP { hi } }; G.parse("hi")' TOP > * MATCH "hi" I'm closing this ticket now.

[perl #121966] [BUG] Grammar::Debugger busted (for reasons which seem to have to do with Rakudo internals)

2014-05-26 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #121966] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=121966 > has Grammar::Debugger bitrotted? https://gist.github.com/masak/d9bd70d

[perl6/specs] d1e92c: grammar inheritance example fixed and completed - ...

2014-04-18 Thread GitHub
) Changed paths: M S05-regex.pod Log Message: --- grammar inheritance example fixed and completed - now testable

[perl6/specs] e7c777: grammar inheritance typo

2014-04-18 Thread GitHub
) Changed paths: M S05-regex.pod Log Message: --- grammar inheritance typo

[perl #109874] BUG: should match: grammar A { rule TOP { ^ } }; say A.parse(' ')

2014-04-13 Thread Alexander Moquin via RT
On Sun Jul 28 10:05:00 2013, masak wrote: > r: grammar G { token TOP { ^$ }; rule foo { foo } }; say ? > G.parse(" foo") > rakudo 96776b: OUTPUT«True␤» > r: grammar G { token TOP { ^$ }; rule foo {foo } }; say ? > G.parse(" foo") > rakudo 96776b: OUT

  1   2   3   4   5   >