Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1640 > unrolled thread

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

Started byMatt Timmermans <matt.timmermans@gmail.com>
First post2015-10-17 11:36 -0700
Last post2015-10-17 11:36 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.compilers


Contents

  OSS Announcement: New lexer/scanner/matcher library for java Matt Timmermans <matt.timmermans@gmail.com> - 2015-10-17 11:36 -0700

#1640 — OSS Announcement: New lexer/scanner/matcher library for java

FromMatt Timmermans <matt.timmermans@gmail.com>
Date2015-10-17 11:36 -0700
SubjectOSS Announcement: New lexer/scanner/matcher library for java
Message-ID<15-10-013@comp.compilers>
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

[toc] | [standalone]


Back to top | Article view | comp.compilers


csiph-web