grammatica-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Grammatica-users] JML Parser


From: Brandon Silverstein
Subject: [Grammatica-users] JML Parser
Date: Sun, 21 Mar 2004 21:06:55 -0700

Hello,

I am new to Grammatica and I am trying to develop a JML parser in C#. I am converting the grammar found at http://www.cs.iastate.edu/~leavens/JML/jmlrefman/jmlrefman_20.html to a format that Grammatica can understand and parse. After creating a whole bunch of tokens and reformatting the file, I am getting individual errors saying:

production 'myProduction' is invalid, as zero elements can be matched (minimum is one)

I've tried to figure out what the problem is, and I think it has something to do with reformatting the "optional" text in the original JML file. Anytime a ... appears, I surround the optional text with { brackets }. Anyway, I made a test file with the example production shown in the Grammatica reference manual.

Prod = "1"? | "2"* ...... and so on. When I try to parse this file, I get the same error message. I am intrigued by the statement right below the yellow box where this production is located in the manual. It states that Grammatica does not allow null production alternatives, but "the same result can be obtained by making all references to the production optional." I still can't figure out how to solve this problem.

Any help is appreciated.

Thanks,
Brandon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]