English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

we are asked to output lexemes and tokens. thanks!

2006-07-13 22:00:46 · 3 answers · asked by savethelastdance_4me 2 in Computers & Internet Programming & Design

i still lack thoughts in mind so i can't stat wrting my code. how can break down the code into tokens when a space is optional?(e.g. a + (b+c))

2006-07-13 22:21:45 · update #1

3 answers

Could you post a link to the code?

2006-07-13 22:06:58 · answer #1 · answered by Anonymous · 0 0

Latin loanwords are particularly cool. modify ego - different self Quid professional quo - some thing for some thing Mea culpa - my personal fault Modus Operandi - frame of mind to operating once you've the want to make what you're putting forward look somewhat better subtle, throw in some Latin. and some adjustments from Spanish: Vamoose - from vamos, let's bypass Savvy - from saber, to attraction to close Booby - from bobo, stupid twister - from tornar, to tutor what's the determination one English loanword in German? Shitstorm - used in connection with the euro debt disaster..

2016-12-01 06:29:09 · answer #2 · answered by Anonymous · 0 0

I don't think posting here can solve the problem
I am interested in your problem and I would like to help
you can IM me xman0802003

the solution for the + * / - signs is very simple
Just sround each sing with spaces before your begin pasrsing

for example ((b+c)*2)
the could should be something like that

string a = "((b+c)*2)";
a.replace("("," ( ");
a.replace(")"," ) ");
a.replace("+"," + ");
a.replace("-"," - ");
a.replace("*"," * ");
a.replace("/"," / ");

now the string will be like that
( ( b + c ) * 2 )
now is it easier to prase?

2006-07-13 22:55:39 · answer #3 · answered by Mena 4 · 0 0

fedest.com, questions and answers