[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [OT] Java Lexical Analyzer?


jbison
Roger,

I just found jbison using Google:

http://ftp.unicamp.br/pub/languages/java/jbison/

It is still a C program but emits java -

" The jb system allows Java (tm) parsers to be generated using the Gnu Bison
parser generator system. The parser is written using the standard Bison
language, but the action parts are written in Java. Jb takes the mixed
C-Java file output by Bison and scans it to extract the parse tables,
constants, and actions (in Java). Jb then scans various template files
specified by the user and inserts the extracted information at specified
points in the templates.

In addition to generating parsers, jb provides three methods of generating
corresponding lexers.

  1. Flex -- the jb system (starting with version 3.0) can also take lexers
     generated using the Gnu flex generator and translate them to execute in
     Java; this is accomplished with a program called jf that operates in a
     manner analogous to jb.

  2. yylex.generic -- A generic ad-hoc lexer that can be modified to produce
     lexers for typical programming languages.

  3. yytokenizer.generic -- A wrapper for the Java StreamTokenizer Class."


> Thanks Dare.  I looked (very) briefly at JavaCC.  It may in fact be very
> powerful, but I really like the simplicity of the lex notion of listing
> regex/action rule pairs, which are then automatically turned into a
> lexical analyzer.  JavaCC doesn't follow this approach (that I can
> tell).  It seems to be more procedural-oriented.  I will check out
> ANTLR.  Thanks!  /Roger
>
>

Perhaps this will do your job.

Regards,

Tom P



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.