parsing - Get array of tokens -


is there way store tokens have been passed on parser after lexing process (preferably in order in data structure array)? furthermore, possible convert these tokens string literals? if so, guidance regarding how go highly appreciated.

yes , yes.

each token contains pointer next token, tokens form linked list. if want them in array, can traverse list , put tokens array.

each token has image field contains character sequence token represents.

see javacc faq question 5.2 more detail. http://www.engr.mun.ca/~theo/javacc-faq/javacc-faq-moz.htm#tth_sec5.2


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -