develooper Front page | perl.recdescent | Postings from October 2004

help: defining grammer?

Thread Previous | Thread Next
Prentice, Phillip R
October 25, 2004 16:10
help: defining grammer?
Message ID:


I was wondering if anyone could help me begin to write some grammer for
a conversion project.  I basically have a generic language where
variables, arrays, and hash's are defined.  I want these variables to be
translated to a tool specific datastructure, i.e TCL, scheme, etc.  I am
assuming I would have to create a different set of grammar(s) for each
language I want the variables translated to.  However, I am having
trouble defining the grammar for parsing the genericLanguange.  Could
you help me get started by showing me how I would go about parsing the
below 3 structures in the GenericLangauge section below.  I would
appreciate any insight or suggestions.


Thanks in advance,



e.g. for example




$var = 10

$var1 = "variable1"

@var2 = [1,2,3]

%var3 = {'key1'=>'value1', 'key2'=>'value2}




Define var1 = variable1

Define var2 = '(1 2 3)





Set var1 variable


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About