It's UWAweek 47

help5501

This forum is provided to promote discussion amongst students enrolled in CITS5501 Software Testing and Quality Assurance. If posting a question, it's suggested you check first whether your question is answered in the unit Frequently Asked Questions (FAQ) list, and use the search box (on the right) to see if an answer to your question has already been posted.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Note that any posts must comply with the UWA Code of Conduct and the UWA Academic Conduct Policy. That means you should (a) treat everyone with respect and courtesy, and (b) not post your solutions to an assessment that's in progress.

If asking a programming question, it's recommended you read How do I ask a good question? If reporting or troubleshooting a bug in software used in the unit, it's recommend you read How to report bugs effectively.
Displaying the 5 articles in this topic
Showing 5 of 135 articles.
Currently 2 other people reading this forum.


 UWA week 39 (2nd semester, week 9) ↓
SVG not supported

Login to reply

👍?
helpful
3:57pm Fri 27th Sep, Joshua N.

Hi Arran, I created a BNF grammar for Q1. Copied it into BNF playground, pressed compile and watched as my browser crashed with a CODE_HUNG_ERROR. I have tried to incrementally add productions until I get it to crash to find the issue and it just seems like after I create a certain number of productions the browser will crash if I press compile. So, my plan is to just test sections of my BNF instead of the entire thing, however, the project spec states that I need to be able to copy my grammar into BNF playground and it should compile. What do I do? Or does the spec just mean to copy the augment I'm creating and not the entire 2.0 grammar? Thanks.


SVG not supported

Login to reply

👍?
helpful
4:54pm Fri 27th Sep, Arran S.

"Joshua Noble" [email protected] wrote:

Hi Arran,

I created a BNF grammar for Q1. Copied it into BNF playground, pressed compile and watched as my browser crashed with a CODE_HUNG_ERROR.

I have tried to incrementally add productions until I get it to crash to find the issue and it just seems like after I create a certain number of productions the browser will crash if I press compile.

So, my plan is to just test sections of my BNF instead of the entire thing, however, the project spec states that I need to be able to copy my grammar into BNF playground and it should compile. What do I do? Or does the spec just mean to copy the augment I'm creating and not the entire 2.0 grammar?

Thanks.

I'll see if I can clarify the spec wording a bit - the intention is that you only need to provide the "augmented" parts. Anything that was already in the original Domolect grammar, you can just refer to in your submitted grammar as if it were already defined. That is, you can use Domolect 1.7 non-terminals a bit like methods in a library, and just "call" them. If you can suggest any changes to the spec to make this clearer, let me know!

The BNF playground will indeed crash if there are too many rules. So one way around that is to just write "dummy" rules for non-terminals that will be defined elsewhere – e.g. you could write

  <number> ::= 42

and use that instead of a real rule for a number.

The other possibility is to use other tools instead to validate grammars. The BNF playground uses a Node.js library, the Nearley parser, as its backend. It has the advantage that it's very flexible, and usually provides good error messages, but the disadvantage that it uses a lot of memory. It's possible to write a grammar validator as, e.g. a Linux binary, which would do some basic validation (but with worse error messages), and that's what I'll be using in Moodle. If that is something you would find useful, let me know, and I'll look at providing it for download.

Cheers

Arran


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
8:11pm Wed 2nd Oct, Joshua N.

Hi Arran,

Thanks for clarifying. It would be great if you could provide the binary to download.

Thanks


SVG not supported

Login to reply

👍?
helpful
7:31pm Thu 3rd Oct, Joshua N.

Actually, don't worry about the binary, after using just the augment command it's easy to use BNF playground.


SVG not supported

Login to reply

👍?
helpful
12:29pm Fri 4th Oct, Arran S.

No worries. I'll likely release it anyhow, as I'm using it for Moodle.

"Joshua Noble" [email protected] wrote:

Actually, don't worry about the binary, after using just the augment command it's easy to use BNF playground.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy