Ubuntu :: Lex / Yacc Bizarre - Parser Doesn't Recognizes The NUM Token
Mar 21, 2011
I'm writing a parser using lex and yacc for an IEEE standard language ( STIL ). Here's the lex file ( some of ).
[Code]....
stil_language is the start symbol. The bus variable is initialised at 0 ( There's a check in the main ). The problem is that the parser does not recognises the NUM token ! It just re writes any expression that corresponds to the "number" regular expression. Here's a prompt example :
Im having a rather bizarre problem with the gnome panel in ubuntu 11.04. When i go to places and try to home folder, desktop, etc with a mouse click, Nautilus does not open. Instead a really old looking program called textedit opens. The only thing that doesnt cause textedit to open is clicking on computer.
i will get directly to the problem. I'm a mid-experienced ubuntu user and i'm facing a harddisk problem in my opinion. When i try to install 11.04 and 10.10 ubuntu doesn't recognizes my w7sp1x64 volume (157 gb one). accually ubuntu acts like there is no ata device connected and no matter what i do is useless. at first i thought mybe my hdd is damaged but w7 boots like a charm; but i can't even install ubuntu. here are some pictures about my hdd:
I installed Ubuntu on a machine after erasing everything else and the wireless has never worked. It says that the wireless has already shut down even though it recognizes the wireless network and my other non-linux machines see the network and work fine.
I have just installed a Virtual Machine with Debian. My goal is to set up a LAMP server to work with. I have installed Apache, PHP and MySQL, everything without any problems and following WIKIs.
Now, I have a problem, because I'm trying to work with folder within my /var/www folder. If I use the address http://192.168.1.103 in my Host computer's browser, I can see the "It works!" from Apache without a problem.
Now, if I try to see: http://192.168.1.103/test/ I can't see the index.html that is within the folder test that is on the path: /var/www/test Why is this? What do I need to do and keep this simple?
Just done a yum update and emacs's fonts seem very strange. Additionally all "" characters are displayed as a bizarre horizontally barred "W". Edit: I think it's nothing to do with emacs but with the fonts update. The default fonts are now "Baemuk Gulin", by changing them (SHIFT-LEFT_MOUSE) to, eg, Arial I can display things correctly. But I think the times fonts are now missing. Very strange.
I have just changed something in preferences for Skins. Then I restarted my vlc media player and now I cant run vlc! I removed and reinstalled vlc Thousand times but it didn't work! When I type vlc in Terminal :
exc3llent@exc3llent:~$ vlc VLC media player 1.1.5 The Luggage (revision exported) Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS") Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE") Blocked: call to setlocale(6, "") Blocked: call to sigaction(17, 0xb752a0d4, 0xb752a04 Warning: call to signal(13, 0x1) Warning: call to signal(13, 0x1) Warning: call to srand(1289860942) Warning: call to rand() Blocked: call to setlocale(6, "")
(process:13965): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. Warning: call to signal(13, 0x1) Warning: call to signal(13, 0x1) [0x86ee1b4] vcdx access error: fread (): Is a directory [0x85a4aac] xml xml error: XML parser error (line 2) : Validation failed: no DTD found ! [0x858db84] skins2 interface error: no skins found : exiting Blocked: call to sigaction(17, 0xbfbfb4d8, 0xbfbfb44c) Blocked: call to sigaction(17, 0xbfbfb44c, (nil))
I am running 64 bit Arch Linux with fluxbox, chromium, ATI Radeon HD 4650 (xf86-video-ati), and flashplugin-prerelease (flash-square from AUR). Flash has worked great for weeks but all of the sudden started getting laggy in fullscreen. The odd thing is that if I make the video "pop out" and manually enlarge the window to full screen it runs great. I have tried installing firefox and testing in there but this makes no difference; I likewise tried installing catalyst which only made flash crash every time I hit full screen. I have also tried uninstalling flash and joining the html5 trial on .....; the videos do the same thing and get laggy the moment I hit full screen (but not when manually edited).
It seems to me that the issue may be with my video card. I can not think of anything that I was doing during this time period that may have caused this sudden problem [URL].. - the packages that have been upgraded today).
I'm programming an SQL grammar using YACC and during compilation I got this error: conflits: 1 shift/reduce, 2 reduce/reduce the first error : shift/reduce
Code: scalar_exp: scalar_exp PLUS scalar_exp | scalar_exp NEG scalar_exp |scalar_exp MULT scalar_exp |scalar_exp DIV scalar_exp | atom |column_ref |function_ref .....
I am getting shift/reduce and reduce/reduce conflict in my yacc grammar code. yacc generates (i.e yacc -d -v parser.y) its grammar and state information in the parser.output file.
How can i interpret the below information and understand which grammar state is conflicting with other grammar state? Please help me to understand.
State 159 conflicts: 1 shift/reduce State 1863 conflicts: 1 shift/reduce State 1865 conflicts: 1 shift/reduce State 1960 conflicts: 1 shift/reduce
I was going through this Lex/YACC tutorial: [URL]... and I was working along with it. The Lex examples worked fine, but the YACC one quit white compiling
I was using my old computer with ubuntu on it a few minutes ago, and when I loaded up firefox... All of a sudden the pac-man music started playing. There wasn't anything else open that could have caused that, and not even any other tabs up... It sounds like something a virus might do, but Linux is extremely resistant to that sort of thing.. Firefox works fine on my windows rig, so what the heck is going on?EDIT: I turned off javascript, and the noises stopped. But what javascript on firefox could be doing that, and why is it only on my linux?
I decided to try making a programming language again after my last unsuccessful attempt, so now I figured how to write a good AST and it works great when the nodes are hard-coded into a test program. But to make a language out of it, I need a parser to build the tree according to an input file. I ran into a problem here:
%token SEMICOLON INTEGER VARIABLE IF WHILE DO OPAREN CPAREN OBRACE CBRACE %right ASSIGN %left NE %left PLUS MINUS %left TIMES DIVIDE %% .....
As you might see, each nonterminal creates a Node* object and uses it as its value. The problem is that the literal tokens, however, don't return Node*'s and I don't know what to do. I would like to be able to convert literal tokens to nodes in the Lex file (which would avoid the problem), but the problem is with the assignment operator, which takes a Node* for the right-hand side and a variable name (not a Variable Node, because they just evaluate the the variable's value and you can't change the variable with them) for the left hand side.
What I am after is to get the string text from the clip tags. But for now I just tested to see if it can finds the command tags and print something if it does. But it doesn't find it. Anyone knows why ?
Looks like the xml is not good, i test it with a xml validator:
Got a really strange one here. Can connect fine to my 10.10 Netbook Remix desktop over OpenSSH & x11VNC.However, I cannot left-click on the sidebar (Unity). For example, if I click on one of the icons (say Firefox), nothing happens. Clicking anywhere else on the desktop is fine.
Clicking on the sidebar icons when at the netbook is fine. Furthermore, over VNC I can click on one of the sidebar icons and drag it, but can't click to open!
I have tried looking for expat xml parser version 2.0.1 rpm package for centos or RHEL but have not been able to find one. I did find one based for fedora (x86), can this be installed on centos without any issues? Also, I have found a tar package (expat-2.0.1.tar.gz), is the correct directory to decompress and install this under the /usr/local/bin?
Problem with this bizarre Wifi problem. I have searched and searched and cannot find a solutions. Unfortunately this affects 3 computers in my household. And as the resident amateur Linux tech support/Linux advocate, I will be held responsible if I don't figure out how to fix this quick. After some extensive playing around, this is the situation. I have this problem on Ubuntu 9.10, Mint 9 (based on Ubuntu 10.04) and PC Linux OS 2010.:
- About a week ago the wireless network I use stopped working. There was a major power failure on our block during this period. No idea if there was a connection. Since then, I have been able to connect, but I am no longer able to access the internet. I can ping my own IP and my router, but no website (niether by IP not URL).
- When I booted my computer in Windows, it connected to the internet. My neighbours (whose network I am using) are also windows users, and are able to access the internet without problems. - I have found exactly the same problem on my wife's laptop running Ubuntu 9.10 and on a Live CD of PC Linux OS 2010 - I am still able to log into all other wireless networks without problems.
I am perplexed. Is it possible for a wireless network to prevent internet access to linux computers? And inadvertently? I tried disabling IPv6 (which wasn't being used anyhow), but this didn't make a difference. I also tried manually entering an IP address and other network details into the network settings.
Using 11.2. Sound configuration tools have no effect. would suspect a hardware problem except that system notifications work. Also amarok is the only app that can play mp3's. Dvd's and videos have no sound. What can I do. Sound worked perfectlty in 11.0.
I Recently set up a dedicated server using CentOS as a new Linux wing of my Web services hosting business. To provision online varios Tucows services (names, blogs etc.) I need to use the Perl API provided by Tucows/OpenSRS. The API requires various extra perl modules including XML::Parser - without which the API will not function.
I was able to add with PPM to my Windows servers no problem but it will not install in CentOS.
As best I can tell the cause may be missing headers and libs for the c compile of Expat - required to build XML::Parser so after days of hunting I found your repository holds package expat-devel which claims to hold libs and headers for Expat similar to libexpat1-dev on other dists. I used YUM with success but although 3 libs were installed no headers were installed.
Is there a reason these headers are not included? I have downloaded them manually but am afraid of breaking something. Is there a reason I should not attempt to install with these headers? Is CentOS capable of using the Parser modules?
I have a dual-boot Compaq CQ60-420US laptop. It can connect wirelessly in Vista without a problem. I have not yet figured out how to connect it wirelessly in Ubuntu (10.04, Lucid), but that's not the problem here. The problem here is on the wired side. Whether I boot in Vista or Ubuntu, I cannot get it to go online. Ubuntu says that the Auto eth2 connection is established; I am able to disconnect and reconnect it normally; but I can't download updates and Firefox can't connect to CNN.com. Likewise, in Vista, diagnostics find no problem; everything seems to be fine; but no connection.
I thought the problem might be the laptop's ethernet port, so I bought a Trendnet TU2-ET100 USB-to-Ethernet adapter. It comes highly recommended; it seems to have installed successfully in Vista; it appears properly in Vista's Network Connections; its lights are blinking appropriately; and Ubuntu tells me that my Auto eth2 connection is established when I connect through that adapter. And yet still no connection to CNN.com and no downloads of updates in either OS.
I wondered if some other circuitry might be at issue, so I sent the laptop back to HP. They claim to have replaced the mobo. The symptoms remain unchanged before and after. I went through an extensive tech support call with HP. The last thing their technician could advise was to power cycle the laptop and router. The ethernet connection itself is good. I can unplug the cable from the laptop's ethernet port or the Trendnet unit, plug it into the desktop computer on which I am typing this note, and I'm connected with no problem.
I thought, well, maybe I have to have the laptop's wireless button on, even when I want to connect via wire, but that hasn't made a difference. I tried installing Windows drivers from the Trendnet website instead of from the CD; no joy. I suspect you will be as stumped as I am. I have gone through a lot of other people's comments. At this point, I am just interested in general possibilities. What, in theory, could be causing this?
I hadn't used my laptop in a month or so and it had a couple hundred updates to install. Everything went fine and upon reboot I am met with a bizarre login screen. It shows my like every process and program in a list, my username is in the list as is root. I can login as either, but when I do it only boots to terminal.
When I try and connect to a VNC session from KRDC; and I am prompted for a password, the keyboard just decides to stop working. I can't type anything into the password prompt... Then the keyboard stops working for all other open applications (Firefox etc.). If I close KRDC, it starts working again... Is this a bug? Has anyone else seen this?
I wrote a C++ program that uses two different parsers. The first parser is reading program arguments from command line:./mybin arg1 arg2 ...then during program execution there's an interactive prompt asking for more parameters:
... >> (second bunch of arguments here) ...
I'd like to run my program inside a bash script, but I don't know how to give the second level arguments.