문제

Working with the latest Alloy analyzer currently available at the website (4.2 Build date: 2012-09-25) I realized that, when I put code between two /**/ like this /**/ <some code> /**/, the code <some code> seems to be ignored by the analyzer (although the editor seems to parse the code correctly).

For example, in the following code snippet the declaration of the fact is ignored by the analyzer:

/**/
fact traces {
    init [first]
    all d: Dinner - last | 
        let d' = next [d] | 
            some p,p': Philosopher, f: Fork | 
                pickLeftFork [d,d',p,p',f]
}
/**/

As soon as I put a space between /**/, that is, /* */, the code behaves as expected.

도움이 되었습니까?

해결책

Java-style doc comments have been recently added to Alloy, so in your example above, the /** token at the beginning starts a doc comment, and the **/ token at the very end closes is, so everything in between is parsed as a comment.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top