Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
4Activity
×
0 of .
Results for:
No results containing your search query
P. 1
Chapter 14. Language Application

Chapter 14. Language Application

Ratings: (0)|Views: 271|Likes:
Published by kims3515354178

More info:

Published by: kims3515354178 on Dec 05, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, PPT, TXT or read online from Scribd
See More
See less

09/28/2010

pdf

text

original

 
1
Practical Application:Web Programming and Bioinformatics
 
2
14. Web Programming and Bioinformatics
 
In Section 3.2, we learned how the syntax of Pascal programming language can be defined with a CFG. (Actually,Appendix A shows the whole definition of Pascal programming language in terms of a syntax flow graph.) Other  programming languages can also be defined formally with a grammar, except for a few exceptional cases of contextdependency, such as double declaration of a variable in a block and using numeric labels in DO-loop in FORTRAN.This chapter first shows that the major parts of the popular Web programming language HTML (Hypertext MarkupLanguage) and XML (Extensible Markup Language), which is designed for e-commerce, can also be defined in terms of a CFG. Then the chapter presents a potential application of the formal languages to molecular biology.
14.1 Hyper Text Markup Language (HTML) 41514.2 Document Type Definition (DTD) and XML 41814.3 Genetic code and grammar 425
 
3
14.1 Hyper Text Markup Language (HTML)
In this section, to see how our knowledge in the formal languages could be applicableto investigating the properties of programming languages, we shall first examineHTML. The left box below shows an informal definition (itemized for convenience) of an HTML
list
that would commonly appear in a text. To the right are CFG rulestranslated from the informal definition.
Web Programming and Bioinformatics(1
)
Char
denotes a character.
(2)
 
Text
is a sequence of characters.
(3) Doc
is a sequence of 
Elements
.
(4)
For a string
x
, we call <
x
> atag, and </
x
> the matching tag of <
x
>.
(5
)
Element
is a
Text,
or a
Doc
in- between a matching tag, or a
Doc
 with a tag at the front.
(6
)
ListItem
is a document withtag <LI> at the front. ListItem is anitem of a list.
(7)
List is a sequence of zero or 
(1)
 
Char 
 
a | A | . . . . . | z | Z| . .
(2)
 
Text 
 
 
Cha
Text 
|
ε
(3)
 
 Doc
 
 
 Element 
 
 Doc
|
ε
(4)
 
Tag 
<
Text 
> | </
Text 
>
(5)Elemen
 
 
Text 
|
a Doc in-between a matching tag 
| <
Text 
>
 Doc
 
(6)
 
 ListItem
 
<LI>
 Doc
(7)
 
 List 
 
 ListItem
 
 List 
|
ε

Activity (4)

You've already reviewed this. Edit your review.
1 hundred reads
xuke liked this
arnknr liked this
Sumit Pandey liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->