[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Grammatica-users] More JML Questions...
From: |
Brandon Silverstein |
Subject: |
[Grammatica-users] More JML Questions... |
Date: |
Wed, 7 Apr 2004 01:24:29 -0600 |
Per,
Thanks for your help so far. I'm still having some trouble solving
certain inherent ambiguities in my JML grammar. For example, I rewrote
the field declaration based on your suggestion from the first message I
wrote:
field = DOC_COMMENT* modifiers* declaration
| methodSpecification initOrStatement
| "axiom" predicate ";"
| ";";
declaration = memberDecl | jmlDeclaration;
initOrStatement = [ "static" ] compoundStatement | "static_initializer"
| "initializer";
But Grammatica returns an error message stating:
Error: in jml.grammar: lines 538-541:
inherent ambiguity in production 'field' starting with tokens
"forall", "old", "requires", "pre", "requires_redundantly",
"pre_redundantly", "diverges", "diverges_redundantly",
"assignable", "assignable_redundantly", "modifiable",
"modifiable_redundantly", "modifies", "modifies_redundantly",
"when", "when_redundantly", "working_space",
"working_space_redundantly", "duration", "duration_redundantly",
"ensures", "post", "ensures_redundantly", "post_redundantly",
"signals", "signals_redundantly", "exsures",
"exsures_redundantly", "{|", "public", "protected", "private",
"behavior", "exceptional_behavior", "normal_behavior",
"model_program", "code_contract", "implies_that", "for_example",
and "also"
Now this seemed strange to me because these tokens appear to be from
the jmlKeyword prodcution, but not all of the tokens from the
jmlKeyword list appear here. Also, tokens like "{|" appear in the
error message but this comes from a different production. Does this
have to do with the order in which my tokens are declared, or should
these tags be parsed seperately like you state in your second reply?
Thanks for your help.
Brandon
- [Grammatica-users] More JML Questions...,
Brandon Silverstein <=