OSS Announcement: New lexer/scanner/matcher library for java

Matt Timmermans <matt.timmermans@gmail.com>
Sat, 17 Oct 2015 11:36:57 -0700 (PDT)

          From comp.compilers

Related articles
OSS Announcement: New lexer/scanner/matcher library for java matt.timmermans@gmail.com (Matt Timmermans) (2015-10-17)
| List of all articles for this month |

From: Matt Timmermans <matt.timmermans@gmail.com>
Newsgroups: comp.compilers
Date: Sat, 17 Oct 2015 11:36:57 -0700 (PDT)
Organization: Compilers Central
Keywords: available, lex, DFA, Java
Posted-Date: 19 Oct 2015 01:00:15 EDT

DFAlex: http://mtimmerm.github.io/dfalex/


Java programmers use regular expressions for all kinds of tasks...
but they are slow and dangerously use unbounded stack.


The DFA technology used in lexers supports faster and more robust ways
to do these sorts of things, but available implementations only build
lexers. (how annoying)


This library builds DFAs for you and helps you use them for all the
kinds of things we use regular expressions for. It gives you an easy
to use representation of the actual DFA, which you can use with
matcher classes or on its own.


Some features:


- arbitrary output types
- no code generation
- no dependencies
- transitions on character ranges (handy for unicode)
- generate multiple DFAs simultaneously. They will share equivalent states.
- methods for combining patterns specified with regexes or programmatically. (no need for quadruple backslashes!)
- really fast building + minimization
- can cache prebuilt DFAs if "really fast" building isn't fast enough.
- pretty nice modern Java 8 code


There will be a parser generator sometime too, that requires no code
generation and uses this DFA builder to make the LR DFA.


Cheers,


Matt


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.