Hello,I am studying compiling principle of C
programming, but I have no idea where I can start with. For example, how can it
parse the text input by a user?To make the problem clearer, I will take an
example. Say you have an expression, like (a1.5) OR (b='abc') AND (2
of (c0, NOT(d1), (e='cde') AND (f+g*h/i1))... (the
expression: 2 of (c0, NOT(d1), (e='cde') AND (f+g*h/i1) means when 2
expressions in the brackets are true, the expression is true). When input by
user, those a, b, c,d will be replaced by real value, like (11.5) OR
('cde'='abc') AND (2 of (10, NOT(51), ('cde'='cde') AND
(4+8*2/31)). You must compute the result of the expression. Do you
know what I mean?What I want to know is whether you could kindly give me
some enlightenment. I really do not know what technique to use to parse the
expression, and how to use some data structure to compute the result, (using a
linked list, or something else, and also paying attention to the priority of the
operator.)Any real implementation or information resource will be
appreciated.
Cheng Xom