bad001.jl passing without error

3 views
Skip to first unread message

Per Fredelius

unread,
Mar 29, 2011, 6:07:23 AM3/29/11
to Compiler construction 2011
Is there some way to force bnfc to only accept closed comments?
bad001.jl is passing without errors for me. I'm working in Java and I
define comments as:

comment "//" ;
comment "#" ;
comment "/*" "*/" ;

I might have forgotten some discussion dealing with this.

Björn von Sydow

unread,
Mar 30, 2011, 5:25:33 AM3/30/11
to compiler-cons...@googlegroups.com
HI!

I think that your problem lies elsewhere. Your BNFC declaration of comments seems OK (the same as in Javalette.cf) and that should be exactly what's needed to reject bad001.jl.

Are other syntactically illegal files, as e.g. bad002.jl, rejected by your compiler?

Björn

Reply all
Reply to author
Forward
0 new messages