![]() |
.. (לתיקייה המכילה) | |
When running Lex, the following error message is displayed: | |
First, this means that your Lex definitions are probably too complicated. See if you can simplify them by simplifying, re-using and merging definitions. If the problem persists: The problem is that Lex has a limit on the size of the state machine (automat) it builds. The default limit is too small for your program, so you need to increase it. To do that, add to the definitions section (after the %} which closes the C declarations section) the following lines: %e10000 %p10000 That will increase the number of parse tree nodes (%e) and the number of positions (%p) to 10,000, which is enough for your program. After you add these definitions, every time you run Lex you will get a message like this one: 1322/10000 nodes(%e), 3157/10000 positions(%p), 267/500 (%n), 7329 transitions, 607/10000 packed char classes(%k), 1927/2000 packed transitions(%a), 1936/3000 output slots(%o) ... don't worry, this is normal. If your program becomes too big again, you can tell by this message which parameter you need to increase (e.g, if you see that it says "501/500 (%n)", you need to set %n to something larger than 500, for example by adding the line: %n1000). For more details, you can read the Lex man. |
How do I connect to stud1? | |
Use: ssh stud1.cs.technion.ac.il However, this won't work from the Taub computer lab, so you must first telnet to t2, and from there run the command. |
When running the compiled parser, the parser finds a ^M at the end of each line. | |
This means that your input file was written on a Windows computer, where endline is represented by two characters: \r and \n. UNIX represents endline as \n alone, and the \r is what you're seeing as ^M. To remove the \r-s from the end of each line, you can run: dos2unix [myfile] > tmp mv tmp [myfile] You have to do this for every file you write on Windows, including your Lex definitions file. |
What is my password on stud1? | |
Your password should initially be the same as your password on t2, but not necessarily your current one (it might be one of your old t2 passwords). If you can't find your password, contact one of the councilors at the computer lab, or write to helpdesk@cs. |
Lex definitions file won't compile after comments were added | |
You can't add comments in the definition or rules section, only in the C declarations and C functions parts of the file. These are the parts where comments are allowed: %{ Declarations: comments allowed here %} Definitions: comments NOT allowed here %% Rules: comments NOT allowed here %% C functions: comments allowed here |
I can't connect to stud1 using ssh from the computer farm. | |
There's a problem with the SSH clients installed in the computer lab. Telnet to t2, and from there connect to stud1.cs. |
When running diff on the sample.out file from the website and my parser output, diff says every line is different, even though when I open sample.out it looks identical to my output. | |
That's because sample.out is in Windows "format", and you need to convert it using: dos2unix sample.out > tmp mv tmp sample.out |