monodimensional or bidimensional context-free grammar?

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
napier
Posts: 2
Joined: Mon May 01, 2006 12:07 am

monodimensional or bidimensional context-free grammar?

Post by napier »

Hi,
I would like to understand a theoretical foundation about the software. Are the context-free grammars implemented in the software bidimensional? Are they an extension of the 1D context-free grammars?

raimondious
Posts: 12
Joined: Thu Apr 13, 2006 3:45 pm

Post by raimondious »

Could you clarify the difference between 1-D and 2-D CFGs? ContextFree implements the same kind of CFG as does yacc, bison:
Ones like:

S -> A|B|aSb
A -> c|B
B -> d|S

where capitals are rules that can expand to other rules, terminal symbols (the lowercases, which are shapes in CF's case), or a combination of the two.

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn »

I think that Chris can answer this question best, but here goes...

Context Free interprets a CFDG grammar to produce a 'sentence'. The sentence is an ordered list of simple shapes (squares, circles, and triangles). Each shape has a 2-D affine transform associated with it that falls out of the grammar along with the shape. This sentence is then translated into a 2-D image, but the sentence itself is a 1-D string of shape symbols. If we created a 3-D version of Context Free then the sentence would be translated into a 3-D output but it would still be 1-D.

napier
Posts: 2
Joined: Mon May 01, 2006 12:07 am

Post by napier »

Ok, now I've understood, it's the 1D case.
Raimondious, in the 2D case CFGs produce "pictures" instead of words/strings. If you want to know something more about you could search for "bidimensional grammar" on Google.

Bye bye!

Post Reply