Solved

AsmL Language Recogniser

Posted on 2003-11-05
3
541 Views
Last Modified: 2006-11-17
Requirements:
Given a state diagram for a language recogniser LR. LR should recognise the following sequence of events of the form: d ((c)+ b (a)* b )* d.  You need to implement an ASML application program for the LR-system. LR-system should report the result of recognition process.  You have to test your recogniser on each of the following event sets:
dd
dccbaaabcbbccbbd
dcbbcdabd
dccbaabbabd
dcbaaaaabd
dcbabcbaabcbd
d
dccbaaabcbbccbbdd

Input for recogniser: Sequence of events
Output: “Sequence is recognised” or “Sequence is not recognised”

Construction (“event / or sequence of events”)* means that “event / or sequence of events” can be repeated unlimited number of times or not appear at all;
Construction (“event  / or sequence of events”)+ means that “event / or sequence of events” can be repeated unlimited number of times and must appear at least once.    

In order to implement you LR-system you can use a state diagram on Figure 1. If the recogniser reaches the final state, a sequence of events is “acceptable”(recognised) otherwise a sequence is not recognised.

Figure 1. State diagram for the Recogniser [ d ((c)+  b (a)* b )* d ]
0
Comment
Question by:garyjohno
  • 2
3 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
this appears to be a homework assignment?  If so, then the EE guidelines strictly forbid any expert here from doing your work for you.

Please do not ask us to violate those rules.  it is a matter of intellectual integrity.

AW
0
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
in particular, the relevant passage of the membership agreement reads:

"Violating the guidelines for academic honesty or other unethical behavior, it is allowable to help a student with a project, but not doing it for them."

AW

0
 
LVL 100

Accepted Solution

by:
mlmcc earned 125 total points
Comment Utility
What have you gotten thus far?

Since most of will not understand ASML it might be a good idea to use pseudocode or an algorithm to explain what code you have thus far.

For instance
Read the first character
If not D then
  sequence not recognized
else
  Process rest of string

mlmcc
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now