GithubHelp home page GithubHelp logo

Comments (4)

p6rt avatar p6rt commented on June 26, 2024

From @chromatic

The --debug-info and -g flags were not working in the perl6 binary. It would
have been enabled in this section of get_parser()​:

  if (defined $OPT{'debug-info'}) {
  if ($parser->can('Debug')) {
  $parser->Debug(1);
  }
  else {
  $parser->Replace(q!stmts​: __stmt[$arg[0]](s?) !);
  }
  }

Unfortunately, while $parser is blessed into the Parse​::RecDescent package,
the Debug() method in the grammar lives in
Parse​::RecDescent​::namespace000001. This patch corrects P6C​::Parser to put
Debug() in the Parse​::RecDescent package.

This may not be the ideal solution, but it fixes the problem for me.

-- c

from old-issue-tracker.

p6rt avatar p6rt commented on June 26, 2024

From @chromatic

p6cparser.patch
Index: languages/perl6/P6C/Parser.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/Parser.pm,v
retrieving revision 1.21
diff -u -r1.21 Parser.pm
--- languages/perl6/P6C/Parser.pm	12 Sep 2002 14:34:40 -0000	1.21
+++ languages/perl6/P6C/Parser.pm	15 Nov 2002 07:07:32 -0000
@@ -320,7 +320,7 @@
 
 my $seen_err;
 
-sub Debug {
+sub Parse::RecDescent::Debug {
     my ($parser, $on) = @_;
     if ($on) {
 	$parser->Replace("\nstmts:            __stmt[\$arg[0]](s?)\n");
@@ -593,7 +593,7 @@
 		| /\A/ stmts[0] /\z/ <commit> {$seen_err ? undef : 1} ''
 		| {got_err("Invalid statement", $text, $thisline); undef;}
 
-# this rule get's substiuted by �-g� switch in perl6
+# this rule gets substituted by �-g� switch in perl6
 # so that __stmt is used.
 stmts:		  _stmt[$arg[0]](s?)
 

from old-issue-tracker.

p6rt avatar p6rt commented on June 26, 2024

From [email protected]

Works for me. Applied.

/s

[chromatic <!--c--> <i>at</i> <!--a--> wgz.org - Fri Nov 15 00​:09​:28 2002]​:

The --debug-info and -g flags were not working in the perl6 binary.
It would
have been enabled in this section of get_parser()​:

if \(defined $OPT\{'debug\-info'\}\) \{
    if \($parser\->can\('Debug'\)\) \{
        $parser\->Debug\(1\);
    \}
    else \{
        $parser\->Replace\(q\!stmts&#8203;:  \_\_stmt\[$arg\[0\]\]\(s?\) \!\);
    \}
\}

Unfortunately, while $parser is blessed into the Parse​::RecDescent
package,
the Debug() method in the grammar lives in
Parse​::RecDescent​::namespace000001. This patch corrects P6C​::Parser
to put
Debug() in the Parse​::RecDescent package.

This may not be the ideal solution, but it fixes the problem for me.

-- c

from old-issue-tracker.

p6rt avatar p6rt commented on June 26, 2024

[email protected] - Status changed from 'new' to 'resolved'

from old-issue-tracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.