Last updated at 11:24 am UTC on 5 January 2019
Part of refactoring tools, category 'AST-Core-Parser'.
This is not part of the Squeak release, it has to be loaded through SqueakMap.
RBParser takes a source code string and generates an AST for it. This is a hand-written, recursive descent parser and has been optimized for speed. The simplest way to call this is either 'RBParser parseExpression: aString' if you want the AST for an expression, or 'RBParser parseMethod: aString' if you want to parse an entire method.
The class RBParserTest shows how it is used.
The Refactoring Tools package uses its own meta-model:
It uses the following objects for its core model (source code model)
Chapter 4.2 Refactoring Browser
RB defines different models, each having a particular purpose.
The following three models are the main ones.
1. The refactoring model represents specific refactoring operations.
2. The changes model represents changes associated with refactorings.
3. The source code model, which is relevant for our study maps the program elements to entities which are manipulated for the rest of RB models.
Slide 20 - The RB Abstract Syntax Tree (AST)