Make a web page in your repo explaining a topic in this course, with related software, which may be used in teaching BLM 320
Write a small microJ program
due on Monday, May 6, before 5pm
Show the final version of your project
due on Monday, April 22, before 5pm
Complete all class works in you repo
Modify microJ1 parser with two rules:
identList → withValue | identList , withValue
withValue → ident | ident = number
E -> TX
X -> ε | +TX | -TX
T -> FY
Y -> ε | *FY | /FY
F -> n | (E) | i(E)
Include several test cases such as (n-i(n+n))/i(n*n)
Ref:
due on Monday, April 8, before 5pm
Beste Soft’ta ilk haftanız, daha üçüncü gün size bir iş verdiler
- Şu aritmetik programı var ya, Hasan Bey yazmıştı...
- Expression.html mi?
- Evet, müşteri "fonksiyonlar da olsun" diyor
- Hangi fonksiyonları koyalım?
- Ne kadar çok olursa o kadar iyi
- Math içindeki bütün fonksiyonlar?
- Orada 40 tane fonksiyon var, hangi biriyle uğraşacaksın?
- getOwnPropertyNames() ile hepsini bir kalemde yaparım
- O da ne?
- Object altında güzel bir özellik...
- Elin değmişken bir de % işlemini ekler misin?
- Hiç sorun değil...
T -> F | T*F | T/F | T%F
F -> n | (E) | (E)^n | i(E)
Hasan Bey işten ayrılmadan önce çalışan bir jar bırakmış ama kaynak kodunu saklamış
F = Object.getOwnPropertyNames(Math)
a = F.filter(k => Math[k].length == 1)
ÖDEVİNİZİ GÖSTERMEDEN ÖNCE REPOYA KOYMAYIN
Modify Expression.html
Implement toTree() methods
Add one more rule for power operation
F → n | (E) | (E)^n
Ref:
1. Study Expression.html and show a sample derivation with these rules:
E → T | E+T | E-T
T → F | T*F | T/F
F → n | (E)
(use exactly 4 operations)
2. Suggest two extensions for the grammar defined above
3. Modify CFG1.html for the grammar shown below:
S → 0S0 | 1S1 | p
(palindromes with the mid-point mark)
Ref:
due on Monday, March 11, at 5pm
Make a web page in your repo that colors the strings blue and the arrays red
Remove pattern selection – it is fixed in the program
No report no demo on this Assignment
Copy and modify RegExp.html -- add two interesting items in the menu
Put your work in your repo. Send me the link your page and a screenshot.
Ref:
Modify and combine DFA & NFA for L = (1+0)*00 Find an array of integers less than 50 accepted by each automaton Do the same for the RegExp e = /00$/
let a = []
for (let n=1; n<50; n++) {
let w = n.toString(2) // to binary
if (accept(w)) a.push(n);
}
Bonus: Put your work in your repo (must be different from Auto)
Ref:
1) How are these string concepts of Sec 1.5 implemented in JavaScript? Alphabet, empty string, length, concatenation
2) Find an accepted string and a rejected string for the FA in Problem 2.2.11
3) Here is a model for L = (1+0)*10 = { w | binary w ends with 10 } |
Modify the code and the web page for another DFA that you choose.
Ref: