Skip to main content

Tata Bahasa (Grammar)




  • Definisi
Grammar terdiri dari 4 hal yaitu :
1.      Suatu alfabet S yang disebut terminal, T,  yaitu sesuatu yang tidak dapat diganti atau diuraikan menjadi simbol lain
2.      Himpunan simbol Nonterminal, N, yaitu simbol yang dapat diganti menjadi simbol-simbol lain.
3.      Sebuah start simbol, S, merupakan elemen dari N.
4.      Himpunan aturan penggantian yang disebut produksi, P, yang berbentuk   a à b, dimana a,b : sembarang barisan simbol terminal dan atau nonterminal.

·         Macam-macam Grammar
1.      Context Sensitive Grammar (Grammar tipe-1) yang mendefinisikan bahasa tipe-1 (bahasa context sensitive)
2.      Context Free Grammar(Grammar tipe-2) yang mendefinisikan bahasa tipe-2 (bahasa context free)
3.      Regular grammar (grammar tipe-3) yang mendefinisikan bahasa tipe-3 (bahasa regular)


untuk lebih jelasnya langsung aja klik disini ......

Comments

Popular posts from this blog

Menentukan bilangan Genap dan Ganjil dengan Delphi

Menentukan bilangan  genap dan ganjil emhh langsung saja.. Dalam program ini kita membagi inputan bilangan menjadi 2 dengan perintah : if a mod 2 = 0 nah perintah mod  disini yaitu membagi bilangan. langsung desain form nya saja. Desain form : selanjutnya rubah properties :   setelah dirubah propertiesnya : nahh langsung aja kode program nya :) untuk button 1 (keluar) : procedure TForm1.Button1Click(Sender: TObject); begin close; end; untuk button 2 (proses) : procedure TForm1.Button2Click(Sender: TObject); var a : integer; begin a := strtoint(edit1.Text); if a mod 2 =0 then     begin       label4.Caption:= 'Bilangan Anda Genap';       end      else      label4.Caption:= 'Bilangan Anda Ganjil';   end; untuk button 3 (ulang) : procedure TForm1.Button3Click(Sender: TObject); begin edit1.clear; label4.Caption:='Hasil'; end; nahh itu td programnya kalo anda ingin yg udah jadi download disini ..

Menampilkan Tanggal dan Waktu pada netbean

Selamat malam teman, malam ini saya akan memberikan bagaimana cara untuk menampilkan jam serta tanggal otomatis pada nnetbean : pertama kita buat sebuah jFrame  Form dengan 2 buah jLabel yaitu jLabel1 dan jLabel2. kemudian pada Source kita utak atik : kita import dahulu untuk jamnya :    kita tulis dibawah   :                                package form; import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import javax.swing.Timer;        Source utama : //untuk perintah penampilan tanggal public void setTanggal(){     java.util.Date skrg = new java.util.Date();     java.text.SimpleDateFormat kal = new     java.text.SimpleDateFormat("dd/MM/yyyy");     jLabel1.setText(kal.format(skrg));     }     //untuk perintah penampilan tanggal public void setJam(){ ActionListener taskPerformer = new ActionListener() { public void actionPerformed(ActionEvent evt) { String nol_jam = "", nol_menit = "",no

Installing and Using Blogger Templates Created with Artisteer

Hosting Images Blogger does not support uploading images directly to Blogspot accounts, so you will need to select one of methods available in Artisteer for hosting template's images externally. Artisteer provides three image hosting options which may be used depending on your reliability and performance requirements: Picasa Web Albums This service is used by default and is suitable in most cases as Picasa utilizes the same Google account used for Blogger and does not require additional registration or configuration. To set the hosting options navigate please File -> Export -> Options -> Image Hosting . NOTE: Picasa does not support large images being accessed from custom domains, therefore when hosting your blog on a custom domain (eg. www.<yourname>.com) Artisteer will instead upload larger images to free ImageShack image hosting service. This may occasionally result in slower performance, therefore custom domain owners may consi