K
kitty
Hi,
Iam new to perl and iam still reading up on regular exp and modules
(its something that can be extended for a long time ) !!
I want to build a parser/lexer (which is more appropriate ?) for a text
file which has a format similar to an xml file.
<GRAPH NAME="471138343152490055" VERSION="V3.0" APP_VERSION="2.7.2.8">
<NODE GUID="471138342839500090" TYPE="######"/>
<PROP GUID="471138342839500090" NAME="Unit" TYPE="Unit Conversion"
ATTRIBUTES="propagates editable !graphical visible !members !required "
SETON="1138343152541" SETBY="kitty" EXPR="On" />
<PROP GUID="471138342839500090" NAME="ODE Solver Settings" TYPE="ODE
Solver Settings" ATTRIBUTES="propagates editable !graphical visible
!members !required " SETON="1138343152549" SETBY="kitty" EXPR="<E
Parameter_for_how_often_Jacobian_should_be_calculated="0.001"
The_Rounding_Unit="1e-16"
Absolute_Error_Tolerance="1e-15"
Relative_Error_Tolerance="1e-7" />" />
....
</GRAPH>
The output should list certain properties of a node..
NODE TYPE = "#######"
PROPERTIES :
NAME="Unit"
Value (EXPR) = "On"
NAME="ODE Solver Settings"
Value =
"Parameter_for_how_often_Jacobian_should_be_calculated="0.001"
The_Rounding_Unit="1e-16"
Absolute_Error_Tolerance="1e-15"
Relative_Error_Tolerance="1e-7" "
-------------------------------------------------------------------------------------------------
Also is it possible to change the value of the properties in the same
perl program after it is extracted using the parser/lexer ? I would
like to allow a user to see the above output for all the nodes in the
file , then modify the Value property (if needed).
If there is any modification i will rename the file along with the
modification time in the filename so the original file is left
untouched.
I have a feeling am going overboard with all these requests..but its
just an idea i had in mind which i want to implement.. I request you to
kindly help me out with your ideas and suggestions.
Thankyou all in advance .
Kitty
Iam new to perl and iam still reading up on regular exp and modules
(its something that can be extended for a long time ) !!
I want to build a parser/lexer (which is more appropriate ?) for a text
file which has a format similar to an xml file.
<GRAPH NAME="471138343152490055" VERSION="V3.0" APP_VERSION="2.7.2.8">
<NODE GUID="471138342839500090" TYPE="######"/>
<PROP GUID="471138342839500090" NAME="Unit" TYPE="Unit Conversion"
ATTRIBUTES="propagates editable !graphical visible !members !required "
SETON="1138343152541" SETBY="kitty" EXPR="On" />
<PROP GUID="471138342839500090" NAME="ODE Solver Settings" TYPE="ODE
Solver Settings" ATTRIBUTES="propagates editable !graphical visible
!members !required " SETON="1138343152549" SETBY="kitty" EXPR="<E
Parameter_for_how_often_Jacobian_should_be_calculated="0.001"
The_Rounding_Unit="1e-16"
Absolute_Error_Tolerance="1e-15"
Relative_Error_Tolerance="1e-7" />" />
....
</GRAPH>
The output should list certain properties of a node..
NODE TYPE = "#######"
PROPERTIES :
NAME="Unit"
Value (EXPR) = "On"
NAME="ODE Solver Settings"
Value =
"Parameter_for_how_often_Jacobian_should_be_calculated="0.001"
The_Rounding_Unit="1e-16"
Absolute_Error_Tolerance="1e-15"
Relative_Error_Tolerance="1e-7" "
-------------------------------------------------------------------------------------------------
Also is it possible to change the value of the properties in the same
perl program after it is extracted using the parser/lexer ? I would
like to allow a user to see the above output for all the nodes in the
file , then modify the Value property (if needed).
If there is any modification i will rename the file along with the
modification time in the filename so the original file is left
untouched.
I have a feeling am going overboard with all these requests..but its
just an idea i had in mind which i want to implement.. I request you to
kindly help me out with your ideas and suggestions.
Thankyou all in advance .
Kitty