ellson / MOTHBALLED-graphviz

Moved to https://gitlab.com/graphviz/graphviz
Eclipse Public License 1.0
1.29k stars 255 forks source link

Very long edge labels causes syntax error #86

Closed Tixii closed 8 years ago

Tixii commented 8 years ago

When using dot -Tps $filename > ../../graph_drawings/$filename2

I get the error: Error: graph.dot: syntax error in line 1076 near ''

The line in question is nearly 100,000 characters long. Im not trying to show the edge labels on the graph (for obvious reasons) but i would like to avoid having to regenerate the .dot files without the edge attributes.

I am wondering if you can extend the buffer so that the line can be read?

Thanks

magneticnorth commented 8 years ago

Greetings. You can just change YY_BUF_SIZ in lib/cgraph/scan.l (as shown in the line that is commented out) and recompile graphviz. It appears GNU flex does not support arbitrary length buffers.

Tixii commented 8 years ago

@magneticnorth

I am confused as to what line you are referring, could you give me a line number?

(im not used to c++)

magneticnorth commented 8 years ago

On May 2, 2016, at 2:05 PM, Tixii notifications@github.com wrote:

@magneticnorth https://github.com/magneticnorth I am confused as to what line you are referring, could you give me a line number?

(im not used to c++)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216312833 scan.l, line 21

// #define YY_BUF_SIZE 128000

It appears we were experimenting with setting the buffer size to 128K, but chose to comment it out. You can uncomment it and even increase the buffer.

The first PC I used was an Altair 8800 that had 8K of memory. Microsoft Basic (including floating point arithmetic) loaded in 8K of memory, leaving 2K to run Lunar Lander (a game).

Tixii commented 8 years ago

right... i dont know whether i just need more caffeine or what... https://github.com/ellson/graphviz/blob/c6ef0109a42fcd9ad3f4f7f4e8b1363e187dd819/lib/cgraph/scan.l

in that file line 21 says:

define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */

emdenrg commented 8 years ago

I'm a bit surprised that lex has not been fixed to have a streaming buffer, especially as no one anymore (except where I work) uses newlines, assuming the viewing software will format it properly.

On 05/02/2016 02:11 PM, Stephen North wrote:

On May 2, 2016, at 2:05 PM, Tixii notifications@github.com wrote:

@magneticnorth https://github.com/magneticnorth I am confused as to what line you are referring, could you give me a line number?

(im not used to c++)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216312833 scan.l, line 21

// #define YY_BUF_SIZE 128000

It appears we were experimenting with setting the buffer size to 128K, but chose to comment it out. You can uncomment it and even increase the buffer.

The first PC I used was an Altair 8800 that had 8K of memory. Microsoft Basic (including floating point arithmetic) loaded in 8K of memory, leaving 2K to run Lunar Lander (a game).

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216314716Web Bug from https://github.com/notifications/beacon/AFT_Mow7JHuQxbraWqbG_tor_1QZUaDKks5p9j5DgaJpZM4IUg8C.gif

magneticnorth commented 8 years ago

Since you can boot Microsoft Windows on an Apple Watch, and we have autonomous self-flying cars that deliver groceries, why should we still have to #define BUFSIZ or think about THERE ARE 4 SHIFT REDUCE CONFLICTS.

On May 2, 2016, at 2:27 PM, Emden R. Gansner notifications@github.com wrote:

I'm a bit surprised that lex has not been fixed to have a streaming buffer, especially as no one anymore (except where I work) uses newlines, assuming the viewing software will format it properly.

On 05/02/2016 02:11 PM, Stephen North wrote:

On May 2, 2016, at 2:05 PM, Tixii notifications@github.com wrote:

@magneticnorth https://github.com/magneticnorth I am confused as to what line you are referring, could you give me a line number?

(im not used to c++)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216312833 scan.l, line 21

// #define YY_BUF_SIZE 128000

It appears we were experimenting with setting the buffer size to 128K, but chose to comment it out. You can uncomment it and even increase the buffer.

The first PC I used was an Altair 8800 that had 8K of memory. Microsoft Basic (including floating point arithmetic) loaded in 8K of memory, leaving 2K to run Lunar Lander (a game).

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216314716Web Bug from https://github.com/notifications/beacon/AFT_Mow7JHuQxbraWqbG_tor_1QZUaDKks5p9j5DgaJpZM4IUg8C.gif

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216319577

magneticnorth commented 8 years ago

Sorry, you are right. I did a git pull, too, but forgot I must have been trying this myself.

Anyway, around that line (say right before it) please insert

define YY_BUF_SIZE 128000

or some other excessive value larger than the entire amount of computer memory on the planet in the mid 1950s.

On May 2, 2016, at 2:23 PM, Tixii notifications@github.com wrote:

right... i dont know whether i just need more caffeine or what... https://github.com/ellson/graphviz/blob/c6ef0109a42fcd9ad3f4f7f4e8b1363e187dd819/lib/cgraph/scan.l https://github.com/ellson/graphviz/blob/c6ef0109a42fcd9ad3f4f7f4e8b1363e187dd819/lib/cgraph/scan.l in that file line 21 says:

define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216318340

emden commented 8 years ago

Well, shift reduce conflicts could be a sign of a bad ambiguity. Though I don't think anyone here has any idea what a shift reduce conflict is. There is even a dearth of knowledge about what a compiler does or how an OS works.

On 05/02/2016 02:35 PM, Stephen North wrote:

Since you can boot Microsoft Windows on an Apple Watch, and we have autonomous self-flying cars that deliver groceries, why should we still have to #define BUFSIZ or think about THERE ARE 4 SHIFT REDUCE CONFLICTS.

On May 2, 2016, at 2:27 PM, Emden R. Gansner notifications@github.com wrote:

I'm a bit surprised that lex has not been fixed to have a streaming buffer, especially as no one anymore (except where I work) uses newlines, assuming the viewing software will format it properly.

On 05/02/2016 02:11 PM, Stephen North wrote:

On May 2, 2016, at 2:05 PM, Tixii notifications@github.com wrote:

@magneticnorth https://github.com/magneticnorth I am confused as to what line you are referring, could you give me a line number?

(im not used to c++)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216312833 scan.l, line 21

// #define YY_BUF_SIZE 128000

It appears we were experimenting with setting the buffer size to 128K, but chose to comment it out. You can uncomment it and even increase the buffer.

The first PC I used was an Altair 8800 that had 8K of memory. Microsoft Basic (including floating point arithmetic) loaded in 8K of memory, leaving 2K to run Lunar Lander (a game).

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

https://github.com/ellson/graphviz/issues/86#issuecomment-216314716Web Bug from

https://github.com/notifications/beacon/AFT_Mow7JHuQxbraWqbG_tor_1QZUaDKks5p9j5DgaJpZM4IUg8C.gif

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216319577

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216321815Web Bug from https://github.com/notifications/beacon/ABdZPkIfbsrsn0pyA4m9bTXetWS24dteks5p9kQNgaJpZM4IUg8C.gif

Tixii commented 8 years ago

awesome. im not going totally mad!

thanks :)

Alice M Kaye, MMath (Oxon) Founder and CEO of GNOmics Patent pending with USPTO PhD candidate (UBC) - Bioinformatics Dr Wyeth Wassermans' Lab Centre for Molecular Medicine and Therapeutics Child and Family Research Institute Vancouver, BC, Canada

On Mon, May 2, 2016 at 11:43 AM, Stephen North notifications@github.com wrote:

Sorry, you are right. I did a git pull, too, but forgot I must have been trying this myself.

Anyway, around that line (say right before it) please insert

define YY_BUF_SIZE 128000

or some other excessive value larger than the entire amount of computer memory on the planet in the mid 1950s.

On May 2, 2016, at 2:23 PM, Tixii notifications@github.com wrote:

right... i dont know whether i just need more caffeine or what...

https://github.com/ellson/graphviz/blob/c6ef0109a42fcd9ad3f4f7f4e8b1363e187dd819/lib/cgraph/scan.l < https://github.com/ellson/graphviz/blob/c6ef0109a42fcd9ad3f4f7f4e8b1363e187dd819/lib/cgraph/scan.l

in that file line 21 says:

define GRAPH_EOF_TOKEN '@' /* lex class must be defined below */

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub < https://github.com/ellson/graphviz/issues/86#issuecomment-216318340>

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/ellson/graphviz/issues/86#issuecomment-216323939