Jump to content
IndiaDivine.org

Ashtadyayi and Backus/Naur grammars

Rate this topic


Guest guest

Recommended Posts

Dear list members,

 

The syntax and entities of computer programming languages such as

"fortran","pascal","c","c++" is sometimes described by whats known as

"Backus/Naur notation" .

 

This "Backus/Naur" notation is a simple system of tokens to describe valid

entities in the computer language, where evermore complicated entities and

statements are described in simpler ones.

 

For example:

<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

<letter> ::= A | B | C | D | E | F |G | H | I | J | K | L | M | N | O | P |

Q | R | S | T | U | V | W | X | Y | Z

 

The "|" in the above statement means "or" so the above "backus/Naur"

statementS means the entity "digit" is either a 0,1,2,3,4,5,6,7,8,9 or 0 and

the entity "letter" is either A,B,C,D ... Z .

 

The Astadhyayi also defines entities, for example:

vRddir Adaic

adeG guNaH

 

One of the techniques a "Backus/Naur" description uses for brevity is a kind

of recursion for example:

<variable name> ::= <letter> | <variable name><digit> | <variable

name><letter>

 

The above Backus/Naur statement defines a valid "variable name" to be any

combination and number of letters and digits that starts with a letter.

 

For brevity it uses a "recursive" definition of a valid variable name:

<variable name> ::= <letter> | <variable name><digit> | <variable

name><letter>

means:

1. A valid variable name is a letter.

2. A valid variable name is any valid variable name followed by a letter

3. A valid variable name is any valid variable name followed by a number.

 

Does the astadhyayi also use "recursive" definitions?

I.e. in the astadhyayi any definitions like:

Entity x is defined as "y" , and any valid entity x followed by "z" is also

a valid entity "x".

 

Thanks,

Harry

 

Harry Spier

371 Brickman Rd.

Hurleyville, New York

USA 12747

 

_______________

Express yourself instantly with MSN Messenger! Download today - it's FREE!

http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...