[prev in list] [next in list] [prev in thread] [next in thread] 

List:       antlr-interest
Subject:    Re: [antlr-interest] urgent help required ...
From:       James Ladd <james_ladd () hotmail ! com>
Date:       2011-12-27 8:03:17
Message-ID: BAY149-W42BCB252B60022FBA5E4A3EDAF0 () phx ! gbl
[Download RAW message or body]


Hi Bart and all ....

The main no viable alternative errors occur around line 25 of Smalltalk.g
in the rule:

method returns [Method n]
   
 :    o = NAME c= '_class_'? '>>'  messagePattern '[' primitive? 
temporaries? statements  ']' {$n = MethodFactory.create($o.text, 
$c.text, $messagePattern.n, $primitive.n, $temporaries.n, 
$statements.n);}
    ;

To get started with building and 
parsing you can either use Antrl works or the getting started here: 
http://www.redline.st/discover/getting-started.html
The project sources are here:  https://github.com/redline-smalltalk/redline-smalltalk

In  a nutshell there are a few binarySymbol methods that cause this rule to break \
with a "no viable" alternative.

If you goto the file Magnitude.st and change line 14 from 

- \> aMagnitude

to

- > aMagnitude

You will then start to get the error.

If you were to make the line

- , aMagnitude

That will cause the error as well and it should not.

The second error I get is on the same rule. Essentially I changed the file \
PreProcessor.g to spit out a '_class_' rather than 'class' to overcome a no viable \
alternative error I was getting. Id like to make sure the preprocessor did NOT put \
out _class_ and that the method pattern rule on line 25 of Smalltalk.g was ok with 'o \
= NAME c= 'class'? '>>'  messagePattern'

Not it is ok for a method to look like the following:

- class
  ^ nil

You could modify Magnitude.st to have a method like this for testing.

Rgs, James.


Date: Tue, 27 Dec 2011 08:41:35 +0100
Subject: Re: [antlr-interest] urgent help required ...
From: bkiers@gmail.com
To: james_ladd@hotmail.com
CC: antlr-interest@antlr.org

Hi James,
On Mon, Dec 26, 2011 at 10:05 PM, James Ladd <james_ladd@hotmail.com> wrote:






You are right Bart.

This list is always very quick to respond and very thorough with the responses.
I don't mean to be demanding.

No problem James.


Jim has helped me previously and has offered to help again, so I'll wait to see


how this turns out. Should I post again, Ill be sure to do as you suggest, and
include the rules and errors.

Yes, please do. 

Thanks All.

Rgs, James.

Regards,
Bart. 		 	   		  

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic