[antlr-interest] parsing MATLAB - 6.0/7.0 files
Monty Zukowski
monty at codetransform.com
Wed May 18 07:45:49 PDT 2005
rahul wrote:
> Unfortunately and 'end' can be used to end loops, IF and SWITCH
> blocks and has a special meaning within an indexed array construct
> like 'M(1:10, 5:end)', where 'M' is a two dimensional array and 'end'
> is the last element along that dimension.
> Which then brings me onto two solutions, implement a fast stripped
> down scanner-parser that matches the above constructs and omitts the
> rest. Detect the format and use the information later.
I think that would be easiest.
> Or then use
> exception handling to catch the error and straighten out the generated
> AST after parsing.
>
Sounds messier to me.
Monty
More information about the antlr-interest
mailing list