A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? Levente On Tue, 3 Feb 2015, Marcus Denker wrote:
On 02 Feb 2015, at 21:47, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi All,
code as in the double bars forming the end of block arguments and the beginning of block temporaries in
This is fixed in Pharo4 (I think we did that in Pharo3 already):
In general, I really am convinced that we should continue to reduce the number of Smalltalk parsers in the system. Imagine there would be only *one*, then bugs like this would never happen, we would have less code to maintain and every improvement would benefit directly all subsystems that use the Parser or the AST.
We already did that for the tools (RB) and the Compiler. We use the handwritten RBParser for now (I would like to use PetitParserâ¦). The next would be to replace the Shout Parser+Tokenstream⦠we already in all tools create an AST as soon as you select a method anyway. (the is for per-AST-Node Navigation + the âsuggestionsâ menu).
RBParser already has #parseFaultyMethod:, this means it can generate an AST even for incomplete input (with an error node). e.g. you can parse the expression â1+â:
There is already a SHRBTextStyler which uses it, we should finish that and replace the Shout parser.
Marcus