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:
>
> Konsole output
> 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
|