[Newcompiler] SmaCC question -- does Test pane work
for SqueakParser/SqueakScanner?
Mathieu Suen
mathieusuen at yahoo.fr
Mon Oct 30 08:57:52 UTC 2006
Doug Way a écrit :
> Hi all. I'm playing around with the NewCompiler, mainly just at the AST
> level, with SmaCC (Dev), and trying to fiddle with alternate syntaxes.
>
> Question: I went through the SmaCC tutorial successfully. However, if
> I try to load the NewCompiler (SqueakScanner/SqueakParser) classes into
> SmaCC and use the "Test" pane to test the parsing (for example "3 + 4"),
> I always get a parsing error (Token not expected). Same with some of
> the other parsers such as the JavaParser. However, the Test pane
> parsing works for the simple CalculatorParser from the tutorial.
>
> Any ideas? It will be kind of a pain to play around with SmaCC if I
> can't use the Test pane to test the changes.
>
> Steps to reproduce:
> - Start up a fresh Squeak3.9-RC3-7066 image
> - Open SqueakMap & install in this order:
> - Refactoring Engine v 20
> - SmaCCDev v 5 (from squeaksource)
> - AST v 88
> - NewCompiler v 117
> - In SmaCC window, follow the first part of the tutorial and create the
> CalculatorScanner/Parser
> - In the Test tab, enter "3 + 4" and Parse... this parses successfully
> - Back in the Compile tab, select SqueakScanner/Parser classes (or
> JavaScanner/Parser)
> - In the Test tab, enter "3 + 4" and Parse... error: "SmaCCParserError:
> Token not expected->"
>
>
> - Doug
>
> p.s. On a separate note, Goran gave me co-maintainer access to the
> "SqueakMap2 base" package, and I've published a new version (1.23) which
> fixes a bunch of display problems in the SqueakMap package loader.
>
>
The test pane is working . But it only use the first rule so you chould test a Method with SqueakParser:
foo
3 + 4
Math
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
More information about the Newcompiler
mailing list