LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-28-2006, 01:23 AM   #1
ricka343
Member
 
Registered: Jun 2006
Posts: 54

Rep: Reputation: 15
converting lex files to flex files


I have got some .lx files and hav converted them to .c .they are working properly

now i need them to convert to flex files so that i can get .java files thru jflex any help or any tutorials for tht please
 
Old 06-28-2006, 01:35 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
AFAIK, anything that lex can process, flex can process. As far as using it to generate java code, that I cannot speak to.

--- rod.
 
Old 06-28-2006, 01:54 AM   #3
ricka343
Member
 
Registered: Jun 2006
Posts: 54

Original Poster
Rep: Reputation: 15
i converted the flex files to java code through jflex and while running i got following errors


Exception in thread "main" java.lang.UnsupportedClassVersionError: percent (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
 
Old 06-28-2006, 09:11 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I'll hazard a guess, based on how flex works in the C universe. I think your java code may require a class library that is part of the flex package. In C, you have to link flex output with libl.a. In java, there may be a similar library. This is, as I say, speculation.

--- rod.
 
Old 06-28-2006, 03:51 PM   #5
ricka343
Member
 
Registered: Jun 2006
Posts: 54

Original Poster
Rep: Reputation: 15
even if the java code are generated by jflex itself????
 
Old 06-28-2006, 04:35 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The online documentation for jflex states 'include the file lib\JFlex.jar in your CLASSPATH environment variable'.

--- rod.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FLEX/LEX input question ankit4u1 Programming 16 07-14-2006 05:37 AM
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 03:07 PM
For people how want to play WMA files without converting MP3 files waelaltaqi Linux - Software 15 11-17-2005 08:30 AM
Flex or Lex Mandrivia maurovezz Linux - Distributions 2 07-04-2005 03:09 AM
flex your lex chens_83 Linux - General 2 06-02-2002 03:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration