Closed arporter closed 1 year ago
If I remove the space after gdept_1d(:)
then the match is fine. If I change it to ((gdept_1d ))
then the match is also fine. This indicates a problem with the matching of the slice notation I think.
Weirdly, (gdept_1d(:) )
is matched OK.
When match fails (because of space after gdept_1d(:)
:
Variable('zdepth(:)') -> 'zdepth(:)'
Name('gdept_1d') -> 'gdept_1d'
Part_Name('gdept_1d') -> 'gdept_1d'
Subscript_Triplet(':') -> ':'
Section_Subscript(':') -> ':'
Section_Subscript_List(':') -> ':'
Part_Ref('gdept_1d(:)') -> 'gdept_1d(:)'
When that space is deleted so that the match succeeds:
Variable('zdepth(:)') -> 'zdepth(:)'
Name('gdept_1d') -> 'gdept_1d'
Part_Name('gdept_1d') -> 'gdept_1d'
Subscript_Triplet(':') -> ':'
Section_Subscript(':') -> ':'
Section_Subscript_List(':') -> ':'
Part_Ref('gdept_1d(:)') -> 'gdept_1d(:)'
Name('gdept_1d') -> 'gdept_1d'
Part_Name('gdept_1d') -> 'gdept_1d'
Subscript_Triplet(':') -> ':'
Section_Subscript(':') -> ':'
Section_Subscript_List(':') -> ':'
Part_Ref('gdept_1d(:)') -> 'gdept_1d(:)'
Data_Ref('gdept_1d(:)') -> 'gdept_1d(:)'
Level_1_Expr('gdept_1d(:)') -> 'gdept_1d(:)'
Mult_Operand('gdept_1d(:)') -> 'gdept_1d(:)'
Add_Operand('gdept_1d(:)') -> 'gdept_1d(:)'
Level_2_Unary_Expr('gdept_1d(:)') -> 'gdept_1d(:)'
Level_2_Expr('gdept_1d(:)') -> 'gdept_1d(:)'
Level_3_Expr('gdept_1d(:)') -> 'gdept_1d(:)'
Level_4_Expr('gdept_1d(:)') -> 'gdept_1d(:)'
And_Operand('gdept_1d(:)') -> 'gdept_1d(:)'
Or_Operand('gdept_1d(:)') -> 'gdept_1d(:)'
Equiv_Operand('gdept_1d(:)') -> 'gdept_1d(:)'
Level_5_Expr('gdept_1d(:)') -> 'gdept_1d(:)'
Expr('gdept_1d(:)') -> 'gdept_1d(:)'
Parenthesis('(gdept_1d(:))') -> '(gdept_1d(:))'
Level_1_Expr('(gdept_1d(:))') -> '(gdept_1d(:))'
Mult_Operand('(gdept_1d(:))') -> '(gdept_1d(:))'
Add_Operand('(gdept_1d(:))') -> '(gdept_1d(:))'
Level_2_Unary_Expr('(gdept_1d(:))') -> '(gdept_1d(:))'
Level_2_Expr('(gdept_1d(:))') -> '(gdept_1d(:))'
Level_3_Expr('(gdept_1d(:))') -> '(gdept_1d(:))'
Level_4_Expr('(gdept_1d(:))') -> '(gdept_1d(:))'
And_Operand('(gdept_1d(:))') -> '(gdept_1d(:))'
Or_Operand('(gdept_1d(:))') -> '(gdept_1d(:))'
Equiv_Operand('(gdept_1d(:))') -> '(gdept_1d(:))'
Level_5_Expr('(gdept_1d(:))') -> '(gdept_1d(:))'
Expr('(gdept_1d(:))') -> '(gdept_1d(:))'
Parenthesis('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Level_1_Expr('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Mult_Operand('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Add_Operand('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Level_2_Unary_Expr('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Level_2_Expr('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Level_3_Expr('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Level_4_Expr('((gdept_1d(:)))') -> '((gdept_1d(:)))'
And_Operand('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Or_Operand('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Equiv_Operand('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Level_5_Expr('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Expr('((gdept_1d(:)))') -> '((gdept_1d(:)))'
Assignment_Stmt('zdepth(:) = ((gdept_1d(:)))') -> 'zdepth(:) = ((gdept_1d(:)))'
In NEMO 4.2,
fldread.f90
contains a line:which causes fparser2 to choke. Removing all the un-needed parentheses on the RHS fixes the issue.