reset password
Author Message
jpascua
Posts: 197
Posted 13:55 Nov 10, 2015 |

Prof. Sun,

In class you said that grammar is a one to one mapping in code. From reading the SimpleDB code, I noticed that Parser.java implements all the methods in SimpleDB's grammar. So from my understanding, this would mean that our modifications should go inside Parser.java?

I've messed a little with Parser.java and deleted line 57 lex.eatKeyword("select"); Even after deletion, I can still run the select query. Why is this?

cysun
Posts: 2935
Posted 15:35 Nov 10, 2015 |

Well, I think I said "almost one to one mapping ...", but anyway:

1. Yes, you'll need to modify Parser.java, but it's likely not the only file you'll need to change.

2. Remember most of the code in SimpleDB is used by the server. So after you make some changes, you need to re-run the server.

jpascua
Posts: 197
Posted 22:49 Nov 10, 2015 |

When I terminate the program and try to start up the server again, I get this error.

Attachments:
jpascua
Posts: 197
Posted 22:54 Nov 10, 2015 |

Restarting Eclipse seems to fix it. But do I need to restart Eclipse every time I want to reset the server?

cysun
Posts: 2935
Posted 23:19 Nov 10, 2015 |

You probably terminated the client but not the server. Switch to the console for the server (see the screenshot in this thread), click the red stop button to terminate it, and then you can run it again.

jpascua
Posts: 197
Posted 00:08 Nov 11, 2015 |

Thanks. :)