It's UWAweek 42 (2nd semester, week 12)

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 selected article
Showing 1 of 143 articles.
Currently 78 other people reading this forum.


 UWA week 39 (2nd semester, week 9) ↓
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

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