Bluefish scanning engine: DFA state table limit reached

In Bluefish, Gnome, open source, Programming on March 11, 2011 by oli4444

The Bluefish syntax scanning engine uses a DFA state table. To move from one state to the other we use a 16 bit unsigned integer. That means we can switch between 65536 states. But we now have a 100% complete HTML5 + SVG (+ all attributes of all tags in both languages) language definition, which needs about 70000 states.

A state table only needs to be able to switch to other states in the same context. Right now we keep all contexts in the same state table. A possible design change would be to create separate state tables for each context. That would raise the limit to 65536 states per context. Right now I cannot image which language file will hit this limit (but then, 640K memory is enough for a computer, right?)

Update: the new design is working, we have a  65536 state limit per context now, and right now no single language is getting even close to that limit.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: