lexical parser for XML DOM tree

spardhy@yahoo.com (Sameer)
14 Jan 2002 01:59:09 -0500

          From comp.compilers

Related articles
lexical parser for XML DOM tree spardhy@yahoo.com (2002-01-14)
| List of all articles for this month |

From: spardhy@yahoo.com (Sameer)
Newsgroups: comp.compilers
Date: 14 Jan 2002 01:59:09 -0500
Organization: http://groups.google.com/
Keywords: parse, question
Posted-Date: 14 Jan 2002 01:59:09 EST

Hi all,


I want to build a lexical analyzer which parses an XML DOM tree of the
following nature


Input
-----


<FOR begin="i:=0"; until="i<5"; increment="i:=i+1">
<IF condition="i%2==0">
m := 5*i
<PRINT>m</PRINT>
</IF>
</FOR>


OUTPUT
------
I want the program to output tokens
Tokens: Conditionals FOR, IF
                Functions PRINT
                Variables i
Operators/Comparators := < % ==
                etc


Execution: The function pointer corresponding to the PRINT token
should be called with
the 'm' argument when i = 0; i = 2 and i = 4;


I know that the yacc tokenizer/parser can be used for an input file,
but are there any parsers especially in the Windows world, that can be
used for an input Microsoft XML DOM tree?


Also, the function calls like PRINT will be made on robotic
manipulator and so need to be done fast, ruling out XSLT from what
I've heard.


Thanks,
Sameer.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.