k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: "Yuwen, Shijiao" <yuwen2 AT illinois.edu>
- To: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
- Subject: [K-user] specify sort :>
- Date: Fri, 26 Sep 2014 01:23:46 +0000
- Accept-language: en-US
- List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
- List-id: <k-user.cs.uiuc.edu>
Hi guys,
I have an ambiguity here:
Execution semantics:
[Warning] Inner Parser: Parsing ambiguity. Arbitrarily choosing the first.
1: LocalVarDecStmt ::= LocalVarDec ";"
'Invoke('QSuperMethod(Class:ClassType,, .K,, getConsName (
BaseClass:ClassType)),, [ Args:KList ]) ;
2: InternalUse ::= TypedVal ";"
'Invoke('QSuperMethod(Class:ClassType,, .K,, getConsName (
BaseClass:ClassType)),, [ Args:KList ]) ;
3: ExprStmt ::= StmtExp ";"
'Invoke('QSuperMethod(Class:ClassType,, .K,, getConsName (
BaseClass:ClassType)),, [ Args:KList ]) ;
File: /home/yuwen/java-semantics/src/exec/new-instance.k
Location: (269,15,269,83)
Compilation Phase: Ambiguity filter
Basically it doesn’t know which syntax to use.
I tried to use
rule isStmtExp('Invoke(_)) => true
to indicate that it is the third one, but not working.
I also tried to specify its sort by :>
(('Invoke('QSuperMethod(Class,, .K,, getConsName(BaseClass)),,[Args]);):> ExprStmt)
But it doesn't expect ":"
What is correct usage?
Thanks,
Shijiao
I have an ambiguity here:
Execution semantics:
[Warning] Inner Parser: Parsing ambiguity. Arbitrarily choosing the first.
1: LocalVarDecStmt ::= LocalVarDec ";"
'Invoke('QSuperMethod(Class:ClassType,, .K,, getConsName (
BaseClass:ClassType)),, [ Args:KList ]) ;
2: InternalUse ::= TypedVal ";"
'Invoke('QSuperMethod(Class:ClassType,, .K,, getConsName (
BaseClass:ClassType)),, [ Args:KList ]) ;
3: ExprStmt ::= StmtExp ";"
'Invoke('QSuperMethod(Class:ClassType,, .K,, getConsName (
BaseClass:ClassType)),, [ Args:KList ]) ;
File: /home/yuwen/java-semantics/src/exec/new-instance.k
Location: (269,15,269,83)
Compilation Phase: Ambiguity filter
Basically it doesn’t know which syntax to use.
I tried to use
rule isStmtExp('Invoke(_)) => true
to indicate that it is the third one, but not working.
I also tried to specify its sort by :>
(('Invoke('QSuperMethod(Class,, .K,, getConsName(BaseClass)),,[Args]);):> ExprStmt)
But it doesn't expect ":"
What is correct usage?
Thanks,
Shijiao
- [K-user] specify sort :>, Yuwen, Shijiao, 09/25/2014
Archive powered by MHonArc 2.6.16.