That’s right.
If it can be both at the beginning of the line or not, you could just define
comment = ;[a-zA-Z0-9]+
Cheers,
Gerwin
On 02.03.2015, at 02:39, master <ma...@lu...<mailto:ma...@lu...>> wrote:
Am 01.03.2015 um 15:22 schrieb master:
Hi,
I'am new to JFlex and started with a simple scanner for assembler text files.
A comment line in this assembler starts with ';' and kann appear at the beginning of a line, or somewhere after an expression.
In the macro section I defined a macro for comments as follows:
comment = ^;([a-zA-Z0-9]+) | (;[a-zA-Z0-9]+)
But running jFlex always stated:
Syntax error.
comment = ^;([a-zA-Z0-9]+) | (;[a-zA-Z0-9]+)
^
where he points to the '^' sign.
Why can I not use the legal '^' sign here for referencing the beginning of a line?
Best regards
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
--
jflex-users mailing list
https://lists.sourceforge.net/lists/listinfo/jflex-users
Hi,
after reading the manual again, I found the reason in chapter 4.2.11 Macrodefinition:
... must not contain the ^, / or $ operators.
):
Best regards
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/--
jflex-users mailing list
https://lists.sourceforge.net/lists/listinfo/jflex-users
________________________________
The information in this e-mail may be confidential and subject to legal professional privilege and/or copyright. National ICT Australia Limited accepts no liability for any damage caused by this email or its attachments.
|