Menu

#2 After block alternative not working correctly

open
nobody
5
2010-12-06
2010-12-06
No

loadgrammar('grammars/JavaEasy.g','Java',J),loadgrammar('grammars/SqlEasy.g','Sql',S),rule(J,'memberDecl',MEM),rule(S,'sql_stmt_core',DROP),"+
"body(MEM,B),body(DROP,DB),alternative(DB,2,A),"+
"afterModification(B,J,A,S),writegrammar('grammars/deneme.g',J)

output:
memberDecl
:fieldDeclaration
|methodDeclaration
|classDeclaration
|interfaceDeclaration detach_stmt
;

should be
memberDecl
:(fieldDeclaration
|methodDeclaration
|classDeclaration
|interfaceDeclaration) detach_stmt
;

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.