Programming :: Implement Left-associative Operators In Parser That Does Not Allow Left Recursion?

Jan 20, 2011

The first is about implementing function calls. The way I currently have it is that functions are called with a C++ std::vector of nodes as the parameters. How would I turn a comma-seperated list of expressions into a C++ vector in the grammar?Second, how do you implement left-associative operators in a parser that does not allow left recursion?

And third, what would be the best internal representation of integers? A C++ int seems simplest, but limited. Using GMP seems more versatile, but I'm afraid it might seriously slow down the interpreter compared to C++ ints.

View 3 Replies


Programming :: Removing Left Recursion - Construct An AST From It By Executing A Piece Of Code For Every Nonterminal Matched?

Apr 7, 2011

I'm still a but confused about the standard way of removing it for left-associative operators: [URL] Especially about how to construct an AST from it by executing a peice of code for every nonterminal matched. And I'm still not totally convinced that it will be left-associative, I just barely understand it. Also, how would you remove left-recursion for something like this:

expr ::= expr "(" param_list ")"
| other stuff...?

View 8 Replies View Related

OpenSUSE Hardware :: Extend Desktop Left Instead Of Right - Background Application On The Screen To The Left?

Jun 28, 2011

I would like to use two monitors with my desktop, so connected them the other day and it worked straight away, which is good but... The monitor configuration app always want the primary monitor to be on the left hand side, thus it always extend my desktop right. Can I do anything to extend my desktop to the left instead of to the right so I can have background application on the screen to the left?

View 8 Replies View Related

Ubuntu :: Mouse Intermittently Double Left Clicks / When Single Left Click

Jun 15, 2011

I'm not sure if I should post this question in "hardware & laptops", or "Desktop Environments", because this is a hardware problem on a desktop computer.

Description of Problem:There is another thread that discussed this same problem that I'm having: However that thread is so old that the suggestions in it no longer work in Ubuntu 10.04 and for whatever reason I can not make a reply to that thread.As in the above thread, I've tried other input devices and rebooting the computer and using other USB ports, and my mouse still intermittently double left clicks randomly at times when I've only clicked the left mouse button once and at times and places when it should only produce a single click such as when selecting a drop down menu.

Has any one else had this problem, and does any one have any idea how to fix it or to trouble shoot this a bit more? Please let me know if there is any other information I can provide to further clarify or troubleshoot this issue.

View 2 Replies View Related

Ubuntu :: Have Gnome Open In The Upper Right Or Left Corner Instead Of The Lower Left Corner When Start It?

Apr 20, 2010

is there a way to have gnome open in the upper right or left corner instead of the lower left corner when i start it?

View 3 Replies View Related

Ubuntu :: "Swap Left Alt And Left Win" Keyboard Layout Works Intermittently?

Jul 10, 2011

When I swap my left alt with my left win key using the gnome keyboard layout options, the swap only works intermittently. I have an aluminum Apple keyboard with no numpad. No matter what layout options I choose, I can't seem to get it working.I also have the same setup on my laptop and work desktop and it works without issue. I've ensured my .Xmodmap doesn't exist.When I say "works intermittently" I mean when I'm trying to use "alt+b, alt+f" navigation in emacs or bash, it doesn't work but if I click around a bit then try again, it works. Also, I use alt+arrows to switch workspaces and that always works

View 7 Replies View Related

General :: /localhost Recursion/cache/iptables - Allow Localhost Recursion But Deny Recursion To External Clients?

Mar 8, 2011

I am a newbie in Linux. I have Fedora 13 OS 32 bits. I am working with PowerDNs and Poweradmin. How can I configure this with PowerDNS?

1. Allow localhost recursion but deny recursion to external clients. Is there a tutorial for that?

2. Set up cache nameserver for localhost (like caching-nameserver in Bind).
Is there a tutorial for that?

3. My Master Server with PowerDNS is working well from localhost but external clients cannot access it.

I have iptables with these rules:


View 1 Replies View Related

Programming :: Get The Number Of Left-right-double Click?

Jan 20, 2011

can i get the ocuurance of left click-right click-double click?i need the time of ocurance and the click(left-right-double) that happend.any software?any clue..i need it in linux environment(kde or gnome)

View 14 Replies View Related

Programming :: Lvalue Required As Left Operand Of Assignment?

Feb 3, 2011

it's been a long time since I did coding in C, but thought to pick up a very old project again, just to show off what I have been working on ten years ago.I deducted my problem as follows:

#include <stdio.h>
#include <stdlib.h>
#define bit1 1
#define bit2 2


Why is it saying that bar->act is not a valid lvalue while both bar->act and the bit are cast to (long long)?

View 6 Replies View Related

Programming :: Window That Appear At The Left Upper Corner, Which Command?

Jul 12, 2011

while writing script to send popup to another user i exposed to little window that appear at the left upper corner.i don't remember which command do it

View 2 Replies View Related

Programming :: Isatty - Terminal Emulators Don't Render Right To Left Languages Properly

Oct 13, 2010

I'm new to Linux and these forums, but programmed in C++ on other systems. I discovered several Linux terminal emulators don't render Right to Left languages properly and so as an exercise I writing my own. It based on GtkTextView widget. Basically is working, but the shell won't issue prompts because it doesn't think my terminal emulator is actually a terminal (isatty returns false)

View 3 Replies View Related

Programming :: Bash Script To Check How Much Free Space Is Left In /var Directory

Feb 24, 2011

I'm creating a bash script to check how much free space is left in /var directory then, if it hits a certain threshold, delete certain files with numbers for extensions (e.g. fileA.1, fileA.2 fileA.3, and fileA.4, fileB.1, fileB.2 fileB.3, and fileB.4 ). Here's a snippet from my script:


If I use a * as a wildcard for the number extension, the script fails. Maybe regex would work here, but I'm not particularly accomplished at it. Or some other construct.

View 18 Replies View Related

Programming :: Declare An Associative Array On The Command Line?

Apr 19, 2011

I am trying to declare an associative array on the command line. I get the following error, could somebody explain this and reslove

$ declare -A score_array
-bash: declare: -A: invalid option

View 1 Replies View Related

Programming :: Getting An Undefined Offset For The Associative Arrays [28-46] In Format

Dec 8, 2010

i'm getting an undefined offset for the associative arrays [28-46] in this format.


i have read that i can prevent the notices by doing the following, but it's not working for me

PHP Code:


View 5 Replies View Related

Programming :: Bash Background - & - With Control Operators -&&

Feb 11, 2009

I have a set of files to copy and decompress, and want to do these operations concurrently with a script.

Manually it would be something like:


The single & is intended to background the processes, while the && is intended to execute the gzip process if and only if the cp completes successfully.

My script is:


When I run it, bash gets angry with the following error:


So what is the proper syntax to accomplish this?

View 1 Replies View Related

Programming :: How Many Of PHP Functions And Operators Remembered To Code

Jun 7, 2011

So if you are a PHP-programmer (average one) and code for money, how many of funtions and operators of PHP should you remember by heart (in real life)? I was looking through and man there are millions of tons of them!

View 9 Replies View Related

Programming :: Parser Symbols With Different Types

Nov 27, 2010

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:

YACC input file:
#include "nodes/allnodes.h"
#include "Node.h"
int vars[26];

%right ASSIGN
%left NE
%% .....

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.

View 14 Replies View Related

Programming :: Parsing XML Using Sax Parser In Java

Jul 7, 2011

I'll show the code first:


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:


View 1 Replies View Related

Ubuntu :: Menu On Top Right Instead Of Top Left?

Apr 6, 2011

I am running 10.04 inside VirtualBox on a Mac. All is going great, but at some point my menu's moved to the top right instead of the top left. I have tried uninstalling/reinstalling the Guest Additions, logging off, and rebooting, all with no luck. There is a screenshot at Screenshot.jpg

View 3 Replies View Related

Ubuntu :: Hide Left And Top Bar?

Jun 3, 2011

In Ubuntu 11.04, how do I hide the left bar and top bar? I have a full screen opengl application that starts after the OS loads to the desktop.Unfortunately,the application bars are drawn on top of it.If they cannot be hidden on bootup, then just disabling them entirely would be acceptable.

View 2 Replies View Related

Fedora :: F12 Left Shift Key Troubles / Fix This?

Jan 6, 2010

Since F12 I've big troubles with my left shift key.

I've Fedora running on 3 hosts. 2 desktops and 1 laptop. Only on one of the desktops I've these troubles.

If I press the left shift key sometimes shift gets locked. If it's locked, no key can unlock it. Not the left, not the right shift, nor any other key... and I tried them all meanwhile;-)

It's a real shift lock, not a caps lock. After a (random?) time it releases itself without any user interaction. Releasetime varies between 1 and many seconds.

So, only waiting helps. I already followed the wiki entries for debugging keyboard (input-dev) issues. Watching the output of evtest shows exactly the same output for the usual case and the lock case. They both look like this... code...

View 2 Replies View Related

Fedora :: Laptop Display Is Put On The Left And All Other

Jan 8, 2010

I want to change the default behavior of my display hotkey combo (Fn+F7). I can do this in KDE, but in Gnome, the gnome-settings-daemon cycles through the options. Problem is, the option I want is not there. I want the laptop display on the right and the external display on the left. I know how to use xrandr to change this or to use System > Preferences > Display, but I want to use my hotkey combo. I see two ways to do this. Find the configuration file that selects the options that are cycled and manually edit it, or disable this hotkey combo for the gnome-settings-daemon and use my own script in /etc/acpi/actions, etc/acpi/events for the hotkey combo. Currently the gnome-settings-daemon intercepts the hotkey combo, so I can't use my own script. Anyone know anything about this, or do I need to file a bug report?


View 1 Replies View Related

Fedora :: No Space Left On Device

Jul 31, 2010

I have an WD 1TB external hard disk. When I try to write any file to it - even a 1kb text file - I get the message "no space left on device". I cannot write to the disk at all anymore - not files, not directories.The drive is formatted as an NTFS drive. I use F13. I can read from the drive without any apparent problem. Would anyone know what's causing this problem?

View 2 Replies View Related

OpenSUSE :: Ktorrent Stalls If Left On Its Own?

Oct 12, 2010

I've noticed this weird behavior where kTorrent would just stall downloading stuff if left on its own for a few hours. Once you activate kTorrent window from the panel it just gets on with the job, changing status from "stalled" to "downloading" in a few seconds.

Could it have something to do with the external disk I'm downloading on (some of the downloads, not all) being physically different one and connected via usb but mounted in a home directory?

I suspect this because Windows machine connected via samba also loses connection after a while as if there's some "time expiration" set on mounting drives into home.

Here is the fstab line for the suspected mount:

/dev/disk/by-id/usb-Seagate_FreeAgentDesktop_3QK0A0N7-0:0-part1 /home/stan/Seagate ext2 acl,user_xattr 1 2

View 9 Replies View Related

Ubuntu :: Files Left Behind After Uninstall?

Jan 3, 2010

I'm a recent migrant to Ubuntu from windows xp, and I definitely love linux. but, after years of windoze, I'm left with a few questions. today I tried installed kde, but it didn't work on my hardware, so I uninstalled it. i also tried to put google earth on my system, but it kept crashing so I removed it. after removing kde I had to reinstall a couple programs. all said, after doing all that, do I need to scan my system to remove trash files, or is that not a problem in linux?I'm also having some problems finding software after I've installed it in synaptic. when the package shows to be installed, I can't find any way to launch it through the menus. I don't have that problem if I use the ubuntu software center.

View 4 Replies View Related

Ubuntu :: Make Avant Appear On Right/left?

Mar 13, 2010

i am using avant for some days. it is great and works very well. but it always appears on the bottom. i want to make it appear on the left/right side of the screen. is it possible?

View 5 Replies View Related

Ubuntu :: Sound Out Of Left Speaker Only?

Apr 9, 2010

Everything was fine until I upgraded to the Beta 2, now the sound only comes out of my left headphone speaker and stereo speaker. My sound settings are the same and I have double checked them.Anyone else having this issue? Anyone know how to fix it?

View 6 Replies View Related

Ubuntu :: X _ Icons Are On The Left Side

May 2, 2010

Is there any possible way to fix this problem? And I honestly think this is one of the dumbest changes ubuntu have ever done.

View 9 Replies View Related

Ubuntu :: Can't Get Super Key Assigned To Left Win?

May 4, 2010

I've been working on this for a couple days, but I cannot seem to find a solution either on my own or through trusty Google. For whatever reason, I cannot get the Super key assigned to the Left Win as I have had it in the past. There does not seem to be an option to do that in the Keyboard layout thingy.

View 4 Replies View Related

Ubuntu :: New Theme (10.04) - On The Left Of The Screen Instead Of The Right

May 7, 2010

defult theme however the close, maximize and minimize buttons are on the left of the screen instead of the right. Is there a way to move thoes back to the right side of the screen?

View 4 Replies View Related

Copyrights 2005-15, All rights reserved