dollabs / pamela

Probabalistic Advanced Modeling and Execution Learning Architecture
Apache License 2.0
233 stars 13 forks source link

Parse error when last line is a comment #173

Open pmdoll opened 6 years ago

pmdoll commented 6 years ago

If the last line is a comment as below, pamela compiler generates following error.

(defpclass activities []
           :methods [
                     (defpmethod ftp-to [source destination size])
                     (defpmethod vtc-with [source destination org])
                     (defpmethod video-stream [source destination])
                     (defpmethod main []
                                 ;sequence(
                                 ;          Phase 1
                                 ;                Phase last
                                 ;                )
                                 )
                     ]
           )

;
;(defpmethod Phase 1 []
;  parallel(
;    (activities.ftp-to "src" "dst" "10mb")
;    (activities.ftp-to "s2" "d2" "20")
;))
;
;(defpmethod Phase last []
;  sequence(
;    (activities.video-stream :bounds [0 11] "s1" "d1")
;    (activities.vtc-with :bounds [0 21] "s4" "d3" "some org")
;))
pamela -i scenario.pamela -t "(activities.main)" htn
18-02-28 17:05:21 pablo-3 ERROR [pamela.parser:0] - parse: invalid input file: /Users/prakash/projects/pac2man/git-phabricator/pidgin/pamela-example/scenario.pamela
18-02-28 17:05:21 pablo-3 ERROR [pamela.parser:0] - {:index 928,
 :reason [{:tag :string, :expecting "("}],
 :line 29,
 :column 1,
 :text ";))"}

18-02-28 17:05:21 pablo-3 ERROR [pamela.cli:0] - unable to parse: [#object[java.io.File 0x269c3cc3 "/Users/prakash/projects/pac2man/git-phabricator/pidgin/pamela-example/scenario.pamela"]]
error: parse: invalid input file: /Users/prakash/projects/pac2man/git-phabricator/pidgin/pamela-example/scenario.pamela