Going through every token/word on every line

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by John Youren

I am after a method of
1). Going through every line in the document
2). Going through every word/token in the document

as I am writing a wizard that looks for variables that start with a number

the code would look something like

For i as int16 = 0 to rows.count - 1
for j as int16 = 0 to row(i).words.count - 1
// Do code with row(i).words.item(J)
next j

Would someone show me how this is done, thank you!

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Hi John,

That's exactly what a TokenStream is for. The "Parsing Guide / Lexical Parsing" topic tells you how to get a TokenStream. Then just use its methods to navigate through the Token objects in a Document.

Actipro Software Support

The latest build of this product (v24.1.0) was released 5 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.