Skip to content

Commit

Permalink
Add statements
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Oct 26, 2017
1 parent e6e1c59 commit bd7f1f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/subroutine1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ module subroutine1

subroutine some_subroutine
integer :: a, b, c
a = 1
b = 8
end subroutine

subroutine some_other_subroutine
integer :: a, b
integer :: x, y
y = 5
x = y
end subroutine

end module
6 changes: 5 additions & 1 deletion fortran.g4
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ modifier
;

subroutine
: 'subroutine' IDENT decl* 'end' 'subroutine'?
: 'subroutine' IDENT decl* statement* 'end' 'subroutine'?
;

statement
: IDENT '=' expr
;

NUMBER
Expand Down

0 comments on commit bd7f1f7

Please sign in to comment.