jflex-users Mailing List for JFlex (Page 3)
The fast lexer generator for Java
Brought to you by:
lsf37,
steve_rowe
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(1) |
Oct
(5) |
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(3) |
Feb
(12) |
Mar
(14) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
(6) |
2003 |
Jan
(8) |
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
(5) |
Jun
|
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
|
Nov
(21) |
Dec
(7) |
2004 |
Jan
(6) |
Feb
(5) |
Mar
|
Apr
(1) |
May
(10) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
|
Nov
(2) |
Dec
(2) |
2005 |
Jan
(13) |
Feb
(2) |
Mar
(6) |
Apr
(4) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(12) |
Sep
(3) |
Oct
(6) |
Nov
(1) |
Dec
|
2006 |
Jan
(7) |
Feb
(3) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(13) |
Oct
|
Nov
(3) |
Dec
(6) |
2007 |
Jan
(1) |
Feb
(4) |
Mar
(2) |
Apr
|
May
(4) |
Jun
(11) |
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2008 |
Jan
(1) |
Feb
(4) |
Mar
(7) |
Apr
|
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
(3) |
Feb
(10) |
Mar
(6) |
Apr
|
May
(6) |
Jun
(8) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(4) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(15) |
May
|
Jun
(7) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(2) |
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(2) |
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2014 |
Jan
(8) |
Feb
(3) |
Mar
(5) |
Apr
|
May
(7) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2015 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
(1) |
From: Martin W. <wal...@we...> - 2014-01-22 03:47:00
|
Hello it is great to see the release of jflex 1.5.0 (already using it now). Thank you for making this happen. With the new release, the ant build has been superseeded by the maven project. However, a mvn build is not the best solution for everyone (like on Gentoo, where I have opened ticket #498874), and personally I do not like maven. So I would like to share this short recipe to "manually" build jflex from the source tarball: cd jflex-1.5.0 java -jar lib/jflex-1.5.0.jar --skel src/main/jflex/skeleton.nested src/main/jflex/LexScan.flex mv src/main/jflex/LexScan.java src/main/java/jflex/LexScan.java java -jar lib/java-cup-11a.jar -interface -parser LexParse src/main/cup/LexParse.cup mv LexParse.java sym.java src/main/java/jflex mkdir target javac -classpath /usr/share/ant/lib/ant.jar src/main/java/jflex/*.java src/main/java/jflex/*/*.java src/main/java/jflex/*/*/*.java src/main/java/java_cup/runtime/*.java -d target jar -cfe jflex-1.5.0.jar jflex.Main -C target java_cup -C target jflex -C src/main/resources jflex/Messages.properties -C src/main/resources jflex/skeleton.default (note: in the call to javac, you might need to adjust the classpath of ant) In related news: attached, you can find the adapted CUP2 patch from Andreas Wenger. A quick test in my project did not show any regressions. Regards, Martin Walch -- |
From: Paul G. <ge...@ie...> - 2014-01-14 15:52:44
|
On Tue, Jan 14, 2014 at 3:38 AM, Steve Rowe <sa...@od...> wrote: > Hi Adnan, > > Have you seen the user manual at http://jflex.de ? > > Steve > Steve's answer is a good one. I appreciate that learning something new like this can be intimidating (particularly when you're still a student), but the J/Flex manual has step-by-step instructions for getting it running, and building a simple lexer. It includes very clear examples, as well as the full set of options. The options may be intimidating, but the odds are good that you won't have to use most of them - if you ever do, then it will only be because you understand the system well enough to know that you need them. Not many projects make it this easy. (I'm writing this as a user of J/Flex, not as an author). If you do get stuck, then come back with some specific questions, and I'm sure you'll find someone who is willing to help out. Paul On 1/11/2014 4:00 PM, adnan shahid wrote: > > Hi, > I am new to JFlex and using it for my course. > > I have downloaded the JFlex. But I am not to sure how to use it or > whether it has installed properly. Can any one share me any link where I > can find tutorials (specially for beginner's) on how to run files or how to > use it > > Thanks in advance for your help. > > BR// > Adnan > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > > -- > jflex-users mailing listhttps://lists.sourceforge.net/lists/listinfo/jflex-users > > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > -- > jflex-users mailing list > https://lists.sourceforge.net/lists/listinfo/jflex-users > > |
From: Steve R. <sa...@od...> - 2014-01-14 08:38:24
|
Hi Adnan, Have you seen the user manual at http://jflex.de ? Steve On 1/11/2014 4:00 PM, adnan shahid wrote: > Hi, > I am new to JFlex and using it for my course. > > I have downloaded the JFlex. But I am not to sure how to use it or > whether it has installed properly. Can any one share me any link where > I can find tutorials (specially for beginner's) on how to run files or > how to use it > > Thanks in advance for your help. > > BR// > Adnan > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > -- > jflex-users mailing list > https://lists.sourceforge.net/lists/listinfo/jflex-users |
From: adnan s. <op...@ya...> - 2014-01-11 21:00:40
|
Hi, I am new to JFlex and using it for my course. I have downloaded the JFlex. But I am not to sure how to use it or whether it has installed properly. Can any one share me any link where I can find tutorials (specially for beginner's) on how to run files or how to use it Thanks in advance for your help. BR// Adnan |
From: Ruslan D. <rus...@ya...> - 2013-08-30 21:29:24
|
Thank you, that solved it! In fact, the JFlex 1.4.* manual states that it doesn't really support characters outside the 16-bit range unless you define them as macros: http://jflex.de/manual.html#SECTION000101000000000000000. I suspect that implies that a character range definition is out of the question, unless I'm missing something. Either way, I've documented that gotcha in my source code, so other developers at least have a starting point for debugging issues should they occur. Thanks, Ruslan ________________________________ From: Martin Walch <wal...@we...> To: jfl...@li...; Ruslan Dimov <rus...@ya...> Sent: Friday, August 30, 2013 5:26 AM Subject: Re: [jflex-users] [Help] Misbehaving JFLex rules - wrong rule matched Hi, > If you wouldn't mind, I'd rather point you to the question I posted today on > StackOverflow: > http://stackoverflow.com/questions/18520420/misbehaving-jflex-rules-wrong-r > ule-matched I am not a jflex expert, but I still give it a shot. Your code says: > han = [\u3400-\u9fff\uf900-\ufaff\u2f800-\u2fa1f] My guess is that handling the unicode characters \u2f800-\u2fa1f above number 65535 is not that easy in jflex. The manual states: > %unicode > %16bit > Both options cause the generated scanner to use the full 16 bit Unicode > input character set that Java supports natively (character code points > 0-65535). Maybe you can work around this by splitting those characters. You will probably need an additional scanner state for this. Regards Martin Walch -- |
From: Martin W. <wal...@we...> - 2013-08-30 12:27:06
|
Hi, > If you wouldn't mind, I'd rather point you to the question I posted today on > StackOverflow: > http://stackoverflow.com/questions/18520420/misbehaving-jflex-rules-wrong-r > ule-matched I am not a jflex expert, but I still give it a shot. Your code says: > han = [\u3400-\u9fff\uf900-\ufaff\u2f800-\u2fa1f] My guess is that handling the unicode characters \u2f800-\u2fa1f above number 65535 is not that easy in jflex. The manual states: > %unicode > %16bit > Both options cause the generated scanner to use the full 16 bit Unicode > input character set that Java supports natively (character code points > 0-65535). Maybe you can work around this by splitting those characters. You will probably need an additional scanner state for this. Regards Martin Walch -- |
From: Ruslan D. <rus...@ya...> - 2013-08-30 02:31:41
|
Hi JFlex users! I've been (unsuccessfully) trying to figure out why my seemingly unambiguous JFlex rules seem to be producing the wrong matches. I'm a JFlex newbie so probably my problem is due to inexperience. Unfortunately it's hard to come across JFlex experts at my workplace, and StackOverflow doesn't seem to get a lot of JFlex traffic either. If you wouldn't mind, I'd rather point you to the question I posted today on StackOverflow: http://stackoverflow.com/questions/18520420/misbehaving-jflex-rules-wrong-rule-matched Basically I'm trying to parse a sting and extract portions of it written in different scripts (e.g. Chinese and Latin script). This works when the segments in each script are separated by space or punctuation, but when they are glued together I run into problems. I'd be very grateful if you could help me out with this. Sincerely, Ruslan |
From: <de....@io...> - 2013-08-22 09:35:44
|
On Wed, 21 Aug 2013 23:58:25 +0000 Gerwin Klein <Ger...@ni...> wrote: > Hi, > > the problem appears to be in the macro definition. To refer to a macro you need to enclose it in braces, i.e. {NameLower} instead of just NameLower. The latter matches the literal string "NameLower" instead of the macro. > > This means, if you replace > > > NameLowerQualified = ((NameLower | NameUpper) ".")+ NameLower > > NameUpperQualified = ((NameLower | NameUpper) ".")+ NameUpper > > by > > > NameLowerQualified = (({NameLower} | {NameUpper}) ".")+ {NameLower} > > NameUpperQualified = (({NameLower} | {NameUpper}) ".")+ {NameUpper} > > > you should get the expected behaviour. > Right! Thank you. M |
From: Gerwin K. <Ger...@ni...> - 2013-08-21 23:58:37
|
Hi, the problem appears to be in the macro definition. To refer to a macro you need to enclose it in braces, i.e. {NameLower} instead of just NameLower. The latter matches the literal string "NameLower" instead of the macro. This means, if you replace > NameLowerQualified = ((NameLower | NameUpper) ".")+ NameLower > NameUpperQualified = ((NameLower | NameUpper) ".")+ NameUpper by > NameLowerQualified = (({NameLower} | {NameUpper}) ".")+ {NameLower} > NameUpperQualified = (({NameLower} | {NameUpper}) ".")+ {NameUpper} you should get the expected behaviour. Cheers, Gerwin On 21/08/2013, at 10:28 PM, de....@io... wrote: > Hello. > > I have the following macros: > > NameLower = [a-z] ([a-z] | [0-9] | "_" | "-")* > NameUpper = [A-Z] ([a-z] | [A-Z] | [0-9] | "_" | "-")* > NameLowerQualified = ((NameLower | NameUpper) ".")+ NameLower > NameUpperQualified = ((NameLower | NameUpper) ".")+ NameUpper > > (Note that I really do want [a-z] and [A-Z], as the target language > only allows ASCII identifiers). > > I then have the following rules: > > <YYINITIAL> { > { NameUpperQualified } { return tokenIdentifierUpperQualified (yytext(), this.position()); } > { NameLowerQualified } { return tokenIdentifierLowerQualified (yytext(), this.position()); } > { NameUpper } { return tokenIdentifierUpper (yytext(), this.position()); } > { NameLower } { return tokenIdentifierLower (yytext(), this.position()); } > } > > <<EOF>> { return tokenEOF (this.position()); } > > /* error fallback */ > .|\n { throw LexerError.error("Illegal character <"+ yytext()+">"); } > > The manual says: > > "When consuming its input, the scanner determines the regular > expression that matches the longest portion of the input (longest match > rule). If there is more than one regular expression that matches the > longest portion of input (i.e. they all match the same input), the > generated scanner chooses the expression that appears first in the > specification." > > However, when the generated lexer is given some input: > >> a > TokenIdentifierLower(Position(0,0),UnqualifiedNameLower(a)) >> a.b > TokenIdentifierLower(Position(1,0),UnqualifiedNameLower(a)) > Exception in thread "main" LexerError: Illegal character <.> > > So why is the NameLowerQualified regex not matching "a.b"? The regex > appears to be correct (if I've understood the documentation correctly), > and although NameLower would match the "a" part of the input, the > NameLowerQualified regex both matches the longer portion of the input > and is placed before NameLower in the rules. What's going on? > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > -- > 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. |
From: <de....@io...> - 2013-08-21 14:00:03
|
Hello. I have the following macros: NameLower = [a-z] ([a-z] | [0-9] | "_" | "-")* NameUpper = [A-Z] ([a-z] | [A-Z] | [0-9] | "_" | "-")* NameLowerQualified = ((NameLower | NameUpper) ".")+ NameLower NameUpperQualified = ((NameLower | NameUpper) ".")+ NameUpper (Note that I really do want [a-z] and [A-Z], as the target language only allows ASCII identifiers). I then have the following rules: <YYINITIAL> { { NameUpperQualified } { return tokenIdentifierUpperQualified (yytext(), this.position()); } { NameLowerQualified } { return tokenIdentifierLowerQualified (yytext(), this.position()); } { NameUpper } { return tokenIdentifierUpper (yytext(), this.position()); } { NameLower } { return tokenIdentifierLower (yytext(), this.position()); } } <<EOF>> { return tokenEOF (this.position()); } /* error fallback */ .|\n { throw LexerError.error("Illegal character <"+ yytext()+">"); } The manual says: "When consuming its input, the scanner determines the regular expression that matches the longest portion of the input (longest match rule). If there is more than one regular expression that matches the longest portion of input (i.e. they all match the same input), the generated scanner chooses the expression that appears first in the specification." However, when the generated lexer is given some input: > a TokenIdentifierLower(Position(0,0),UnqualifiedNameLower(a)) > a.b TokenIdentifierLower(Position(1,0),UnqualifiedNameLower(a)) Exception in thread "main" LexerError: Illegal character <.> So why is the NameLowerQualified regex not matching "a.b"? The regex appears to be correct (if I've understood the documentation correctly), and although NameLower would match the "a" part of the input, the NameLowerQualified regex both matches the longer portion of the input and is placed before NameLower in the rules. What's going on? |
From: Russell G. <rus...@gm...> - 2013-06-02 17:46:04
|
HI Gerwin, Thanks for the explanation. I can now get the maven plugin to process the spec successfully. - Russ On May 30, 2013, at 5:13 AM, Gerwin Klein <Ger...@ni...> wrote: > Hi Russel, > > the problem is that this rule could match nothing (the empty string) and therefore lead to an infinite loop. > > In more detail, in > >> <ACTION_END> ([^<>\'\"]|{SQUOT}|{DQUOT})*[^<>]*$ > > you have the structure > > A*B*$ > > which would match an empty line and make no progress matching it, i.e. it would match the same empty line again and again. Lex doesn't detect the problem because of the $, but JFlex does. > > It's possible that the problem never occurs in practise, because an empty line might be matched by a rule higher up in the spec that does make progress. Usually, this kind of rule still points to a bug in the lexer spec, though. > > It's often possible to just replace one or both of the * with a +, but that depends on the language you're trying to parse, of course. > > Since matching the empty line is definitely an error, most likely the language wants to have at least one of A or B there, so you could reformulate the rule as > > (A+B* | A*B+)$ > > This is what the Lex spec would be equivalent to if the empty line match is indeed caught by another rule higher up in the spec. > > Hope this helps! > > Cheers, > Gerwin > > On 30.05.2013, at 1:45 AM, Russell Gold <rus...@gm...> wrote: > >> I am attempting to convert some old files written a decade ago for Lex to JFlex. I am running into this error: >> >> Error in file "/Users/rgold/projects/plugin-tests/src/main/jflex/JspScanner.lex" (line 537): >> Lookahead expression must have match with at least length 1. >> <ACTION_END> ([^<>\'\"]|{SQUOT}|{DQUOT})*[^<>]*$ { return endAction(false, false); } >> >> >> Some earlier definitions which seem relevant: >> >> ANY=(.|\n|\r) >> SQUOT=("'"([^\'\\]|(\\{ANY}))*"'") >> DQUOT=("\""([^\"\\]|(\\{ANY}))*"\"") >> >> Could somebody explain what is wrong here? I know that there are some minor differences between Lex and JFlex, but I don't know what the issue is, here. >> >> Thanks, >> Russ >> >> >> ------------------------------------------------------------------------------ >> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET >> Get 100% visibility into your production application - at no cost. >> Code-level diagnostics for performance bottlenecks with <2% overhead >> Download for free and get started troubleshooting in minutes. >> http://p.sf.net/sfu/appdyn_d2d_ap1-- >> 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. |
From: Claude B. <cb_...@ya...> - 2013-06-02 11:46:36
|
Hi all, I'm discovering jflex and cup, and I am not an expert in java... I compile the example "cup" by running "make" with the cup/Makefile, all's good. Then, I build a cup.jar file: "jar cvfm cup.jar manifest.txt *.class", where "manifest.txt" tells where Main is. I try to launch "java -jar cup.jar test.txt" and I get "Exception in thread "main" java.lang.NoClassDefFoundError: java_cup/runtime/Scanner". CLASSPATH is set and contains jflex.jar and cup.jar, cup.jar actually contains all the classes generated by make, in particular Lexer.class where Scanner is implemented. Why doesn't java find with cup.jar the elements it finds when executing "java Main test.txt" ???? Any help ? |
From: Gerwin K. <Ger...@ni...> - 2013-05-30 09:13:56
|
Hi Russel, the problem is that this rule could match nothing (the empty string) and therefore lead to an infinite loop. In more detail, in > <ACTION_END> ([^<>\'\"]|{SQUOT}|{DQUOT})*[^<>]*$ you have the structure A*B*$ which would match an empty line and make no progress matching it, i.e. it would match the same empty line again and again. Lex doesn't detect the problem because of the $, but JFlex does. It's possible that the problem never occurs in practise, because an empty line might be matched by a rule higher up in the spec that does make progress. Usually, this kind of rule still points to a bug in the lexer spec, though. It's often possible to just replace one or both of the * with a +, but that depends on the language you're trying to parse, of course. Since matching the empty line is definitely an error, most likely the language wants to have at least one of A or B there, so you could reformulate the rule as (A+B* | A*B+)$ This is what the Lex spec would be equivalent to if the empty line match is indeed caught by another rule higher up in the spec. Hope this helps! Cheers, Gerwin On 30.05.2013, at 1:45 AM, Russell Gold <rus...@gm...> wrote: > I am attempting to convert some old files written a decade ago for Lex to JFlex. I am running into this error: > > Error in file "/Users/rgold/projects/plugin-tests/src/main/jflex/JspScanner.lex" (line 537): > Lookahead expression must have match with at least length 1. > <ACTION_END> ([^<>\'\"]|{SQUOT}|{DQUOT})*[^<>]*$ { return endAction(false, false); } > > > Some earlier definitions which seem relevant: > > ANY=(.|\n|\r) > SQUOT=("'"([^\'\\]|(\\{ANY}))*"'") > DQUOT=("\""([^\"\\]|(\\{ANY}))*"\"") > > Could somebody explain what is wrong here? I know that there are some minor differences between Lex and JFlex, but I don't know what the issue is, here. > > Thanks, > Russ > > > ------------------------------------------------------------------------------ > Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET > Get 100% visibility into your production application - at no cost. > Code-level diagnostics for performance bottlenecks with <2% overhead > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap1-- > 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. |
From: Russell G. <rus...@gm...> - 2013-05-29 15:45:52
|
I am attempting to convert some old files written a decade ago for Lex to JFlex. I am running into this error: Error in file "/Users/rgold/projects/plugin-tests/src/main/jflex/JspScanner.lex" (line 537): Lookahead expression must have match with at least length 1. <ACTION_END> ([^<>\'\"]|{SQUOT}|{DQUOT})*[^<>]*$ { return endAction(false, false); } Some earlier definitions which seem relevant: ANY=(.|\n|\r) SQUOT=("'"([^\'\\]|(\\{ANY}))*"'") DQUOT=("\""([^\"\\]|(\\{ANY}))*"\"") Could somebody explain what is wrong here? I know that there are some minor differences between Lex and JFlex, but I don't know what the issue is, here. Thanks, Russ |
From: Susana G. <sus...@gm...> - 2013-01-16 09:05:32
|
Hi, I want to use Jena in a project with bundles osgi, but it requires JFlex. Does anyone know where I can get the JFlex bundle osgi or the pom.xml to generate it? I've tried with the JFlex.jar in *jflex*.de but it is not packaged as bundle. Thanks a lot! Best regards, Susan |
From: Susana G. <sus...@gm...> - 2013-01-16 09:02:42
|
Hi, I want to use Jena in a project with bundles osgi, but it requires JFlex. Does anyone know where I can get the JFlex bundle osgi or the pom.xml to generate it? I've tried with the JFlex.jar in *jflex*.de but it is not packaged as bundle. Thanks a lot! Best regards, Susan |
From: Gerwin K. <ger...@ni...> - 2012-03-10 02:08:12
|
On 10/03/2012, at 4:39 AM, Martin Walch wrote: >> The manual states >> that there are functions "void yypushStream(java.io.Reader reader)" and >> "void yypopStream()". However, the manual also says that they are only >> available in the skeleton file and warns about customizing it. > > Now I think I have understood this: use skeleton.nested as skeleton file > (without modifications) and use yypushStream()/yypopStream() to be able to make > preprocesser style includes. Yes, that is what I would advocate for implementing lexers that support #include-style inputs. Including one lexer spec in another lexer spec is a different issue, but I don't think that is what you were trying to do. Cheers, Gerwin |
From: Martin W. <wal...@we...> - 2012-03-09 17:40:11
|
> The manual states > that there are functions "void yypushStream(java.io.Reader reader)" and > "void yypopStream()". However, the manual also says that they are only > available in the skeleton file and warns about customizing it. Now I think I have understood this: use skeleton.nested as skeleton file (without modifications) and use yypushStream()/yypopStream() to be able to make preprocesser style includes. |
From: Martin W. <wal...@we...> - 2012-03-07 00:54:44
|
Hi, when including a file like in C with "include" or like in Java with "import", what is the proper way to do this in jflex? The manual states that there are functions "void yypushStream(java.io.Reader reader)" and "void yypopStream()". However, the manual also says that they are only available in the skeleton file and warns about customizing it. I could let a preprocessor replace the include statements with the content of the files. However, that would be ugly, because I basically would have to write another scanner to properly find those include statements before passing the result to jflex. Another way could be to launch another instance of jflex from within the running instance. However, the new instance might have to know things from the invoking instance, making things ugly and hard to implement. What is the preferred way for doing this? Is there a simple, proper way that I have just overlooked? Regards Martin Walch -- |
From: Martin W. <wal...@we...> - 2012-02-28 19:47:15
|
Hello list, are there official code conventions for jflex as there are for Java? If there are, can they be included or referenced in the manual? If not, maybe they can be created? I saw a Lisp file for a jflex-mode in xemacs. What is that taking as reference? Regards Martin Walch mail search engine: code convention, formatting, style guide, indentation -- |
From: drthingums - <drt...@ms...> - 2011-09-22 05:00:20
|
I'm writing an Eclipse plugin to allow JFlex scanners to be built automatically. I also plan to add an editor later on. Should I release this as a separate project? What should I call it? |
From: Vivek M. <vma...@pt...> - 2011-09-08 13:45:11
|
Hi Régis, Thanks a lot for your suggestion. It worked. Thanks and Regards, Vivek On Thursday 08 September 2011 12:57 AM, Régis Décamps wrote: > Hello > > I believe you tried to compile from the wrong directory (from > ~/trunk/jflex instead of ~/trunk) > > Régis Décamps > > (from personal email) > > > From: Vivek Mahajan <vma...@pt... <mailto:vma...@pt...>> > > Date: 6 September 2011 7:47:12 PM AEST > > Subject: Compiling latest jFlex jar > > > > Hi Gerwin, > > > > Thanks for the great tool "jFlex". > > > > I wanted to compile the latest jFlex 1.5 jar from svn > https://jflex.svn.sourceforge.net/svnroot/jflex/trunk/ > > However the Maven build fails. Please refer the attached text file. > > > > Could you please guide me how to obtain the latest jFlex jar? > > > > Thanks and regards, > > Vivek > > > > > [INFO] Scanning for projects... > Downloading:http://repo1.maven.org/maven2/de/jflex/jflex-parent/2/jflex-parent-2.pom > [INFO] Unable to find resource 'de.jflex:jflex-parent:pom:2' in repository central (http://repo1.maven.org/maven2) > [INFO] ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] ------------------------------------------------------------------------ > [INFO] Error building POM (may not be this project's POM). > > > Project ID: null:jflex:jar:1.5.0-SNAPSHOT > > Reason: Cannot find parent: de.jflex:jflex-parent for project: null:jflex:jar:1.5.0-SNAPSHOT for project null:jflex:jar:1.5.0-SNAPSHOT > > > [INFO] ------------------------------------------------------------------------ > [INFO] Trace > org.apache.maven.reactor.MavenExecutionException: Cannot find parent: de.jflex:jflex-parent for project: null:jflex:jar:1.5.0-SNAPSHOT for project null:jflex:jar:1.5.0-SNAPSHOT > at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: de.jflex:jflex-parent for project: null:jflex:jar:1.5.0-SNAPSHOT for project null:jflex:jar:1.5.0-SNAPSHOT > at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396) > at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823) > at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508) > at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) > at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604) > at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487) > at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391) > ... 12 more > Caused by: org.apache.maven.project.ProjectBuildingException: POM 'de.jflex:jflex-parent' not found in repository: Unable to download the artifact from any repository > > de.jflex:jflex-parent:pom:2 > > from the specified remote repositories: > central (http://repo1.maven.org/maven2) > > for project de.jflex:jflex-parent > at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605) > at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392) > ... 18 more > Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository > > de.jflex:jflex-parent:pom:2 > > from the specified remote repositories: > central (http://repo1.maven.org/maven2) > > > at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228) > at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90) > at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558) > ... 19 more > Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository > at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404) > at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216) > ... 21 more > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 1 second > [INFO] Finished at: Tue Sep 06 15:10:35 IST 2011 > [INFO] Final Memory: 2M/180M > [INFO] ------------------------------------------------------------------------ |
From: Régis D. <de...@us...> - 2011-09-07 19:28:35
|
Hello I believe you tried to compile from the wrong directory (from ~/trunk/jflex instead of ~/trunk) Régis Décamps (from personal email) > > > From: Vivek Mahajan <vma...@pt...> > > Date: 6 September 2011 7:47:12 PM AEST > > Subject: Compiling latest jFlex jar > > > > Hi Gerwin, > > > > Thanks for the great tool "jFlex". > > > > I wanted to compile the latest jFlex 1.5 jar from svn > https://jflex.svn.sourceforge.net/svnroot/jflex/trunk/ > > However the Maven build fails. Please refer the attached text file. > > > > Could you please guide me how to obtain the latest jFlex jar? > > > > Thanks and regards, > > Vivek > > [INFO] Scanning for projects... Downloading: http://repo1.maven.org/maven2/de/jflex/jflex-parent/2/jflex-parent-2.pom [INFO] Unable to find resource 'de.jflex:jflex-parent:pom:2' in repository central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: null:jflex:jar:1.5.0-SNAPSHOT Reason: Cannot find parent: de.jflex:jflex-parent for project: null:jflex:jar:1.5.0-SNAPSHOT for project null:jflex:jar:1.5.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: de.jflex:jflex-parent for project: null:jflex:jar:1.5.0-SNAPSHOT for project null:jflex:jar:1.5.0-SNAPSHOT at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: de.jflex:jflex-parent for project: null:jflex:jar:1.5.0-SNAPSHOT for project null:jflex:jar:1.5.0-SNAPSHOT at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396) at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391) ... 12 more Caused by: org.apache.maven.project.ProjectBuildingException: POM 'de.jflex:jflex-parent' not found in repository: Unable to download the artifact from any repository de.jflex:jflex-parent:pom:2 from the specified remote repositories: central (http://repo1.maven.org/maven2) for project de.jflex:jflex-parent at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605) at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392) ... 18 more Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository de.jflex:jflex-parent:pom:2 from the specified remote repositories: central (http://repo1.maven.org/maven2) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558) ... 19 more Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216) ... 21 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Tue Sep 06 15:10:35 IST 2011 [INFO] Final Memory: 2M/180M [INFO] ------------------------------------------------------------------------ |
From: Kevin K. <kj...@gm...> - 2011-08-13 10:37:34
|
My lexer seems to be working, except for one thing: yylex() never returns. When it reaches the end of the data stream, it just hangs. Why would it do that? Its input stream is from Socket.getInputStream(), if that makes a difference. Thanks, K |
From: rohith hp <roh...@gm...> - 2011-08-10 03:33:38
|
----------------------------------------------------------------------- rohith hp wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-7cdb2c180b-3795613775-6CxSqzKsOqydr-AL5--PiWTERp8 You'll need to click this link to be able to chat with rohith hp. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with rohith hp, visit: http://mail.google.com/mail/a-7cdb2c180b-3795613775-6CxSqzKsOqydr-AL5--PiWTERp8 Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into "conversations" - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). |