It would depend on what my speed and size requirements are. If I need speed I would go with a plain DFA, until the state set gets too large. Then I would use a lexer + PDA parser generator.

On 12-09-04 10:46 AM, Seamus Abshere wrote:
hi Adrian,

The generated Ruby adds up to about 300KB as a table-driven FSM and is
plenty fast, especially because I can't imagine needing to parse very
much CREATE TABLE at a time :) It gets much bigger - about 1MB - as a
flat table. One question and one feature request:

1. Would you have written this as a |**| scanner? (Or done something
fundamentally structurally different?)

2. Would you add a command-line flag that puts "Ran action FOO with p=1"
whenever an action is run?
(https://github.com/seamusabshere/create_table/blob/master/Rakefile#L29
very messily injects debugging code at the top of all the action
statements it finds before compiling)

Best,
Seamus

PS. thanks again for Ragel - working with it is in the class of thorough
challenges that I think craftspeople of all trades seek.


On 8/30/12 1:11 PM, Adrian Thurston wrote:
Hi Seamus, I had a quick look and didn't see any glaring problems.

How big are your resulting state tables? My guess is that they would be
pretty big, but that's the price you pay for stackless parsing. Happy
with the speed?

How much of SQL are you handling?

-Adrian

On 12-08-24 06:52 PM, Seamus Abshere wrote:
hi again,

Here's a library that parses CREATE TABLE SQL statements with Ragel
(Ruby is the target language):

https://github.com/seamusabshere/create_table

Announcement is going out on Monday:

http://numbers.brighterplanet.com/2012/08/27/analyze-create-table-sql-with-ragel-and-ruby/


Please let me know if you see anything wrong.

Thanks,
Seamus

_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to