Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(lex_queue.isEmpty()!=NULL)
- {
- Lexem a=lex_queue.dequeue();
- if( a.priority=0)
- {
- making.enqueue(a);
- }
- else
- {
- if(!operators.isEmpty())
- {
- Lexem cur = operators.pop();
- if (a.priority<=cur.priority)
- {
- making.enqueue(cur);
- operators.push(a);
- }
- else
- {
- operators.push(cur);
- operators.push(a);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement