diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index 7abd943..e77bd7b 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -67,8 +67,9 @@ public class Vala.Genie.Parser : CodeVisitor {
 		STATIC = 1 << 6,
 		VIRTUAL = 1 << 7,
 		PRIVATE = 1 << 8,
-		ASYNC = 1 << 9,
-		SEALED = 1 << 10
+		PROTECTED = 1 << 9,
+		ASYNC = 1 << 10,
+		SEALED = 1 << 11
 	}
 
 	public Parser () {
@@ -216,8 +217,10 @@ public class Vala.Genie.Parser : CodeVisitor {
 	}
 
 	inline  SymbolAccessibility get_access (string s) {
-		if (s[0] == '_') {
+		if (s.has_prefix("__")) {
 			return SymbolAccessibility.PRIVATE;
+		} else if (s[0] == '_') {
+			return SymbolAccessibility.PROTECTED;
 		}
 
 		return SymbolAccessibility.PUBLIC;
@@ -276,6 +279,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 		case TokenType.PASS:
 		case TokenType.PRINT:
 		case TokenType.PRIVATE:
+		case TokenType.PROTECTED:
 		case TokenType.PROP:
 		case TokenType.RAISE:
 		case TokenType.RAISES:
@@ -2642,10 +2646,15 @@ public class Vala.Genie.Parser : CodeVisitor {
 
 		if (ModifierFlags.PRIVATE in flags) {
 			cl.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			cl.access = SymbolAccessibility.PROTECTED;
 		} else {
-			/* class must always be Public unless its name starts with underscore */
-			if (sym.name[0] == '_') {
+			/* class must always be Public unless its name starts with 
+			 * underscore (protected) or doubleunderscore (private)*/
+			if (sym.name.has_prefix("__")) {
 				cl.access = SymbolAccessibility.PRIVATE;
+			} else if (sym.name[0] == '_') {
+				cl.access = SymbolAccessibility.PROTECTED;
 			} else {
 				cl.access = SymbolAccessibility.PUBLIC;
 			}
@@ -2810,6 +2819,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 
 		if (ModifierFlags.PRIVATE in flags) {
 			f.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			f.access = SymbolAccessibility.PROTECTED;
 		} else {
 			f.access = get_access (id);
 		}
@@ -2922,6 +2933,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		var method = new Method (id, type, get_src (begin), comment); 
 		if (ModifierFlags.PRIVATE in flags) {
 			method.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			method.access = SymbolAccessibility.PROTECTED;
 		} else {
 			method.access = get_access (id);
 		}
@@ -3059,6 +3072,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		var prop = new Property (id, type, null, null, get_src (begin), comment);
 		if (ModifierFlags.PRIVATE in flags) {
 			prop.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			prop.access = SymbolAccessibility.PROTECTED;
 		} else {
 			prop.access = get_access (id);
 		}
@@ -3175,7 +3190,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 			if (needs_var) {
 				/* automatic property accessor body generation */
 				var variable_type = prop.property_type.copy ();
-				prop.field = new Field ("_%s".printf (prop.name), variable_type, prop.initializer, prop.source_reference);
+				prop.field = new Field ("__%s".printf (prop.name), variable_type, prop.initializer, prop.source_reference);
 				prop.field.access = SymbolAccessibility.PRIVATE;
 				prop.field.binding = prop.binding;
 			}
@@ -3213,6 +3228,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		var sig = new Vala.Signal (id, type, get_src (begin), comment);
 		if (ModifierFlags.PRIVATE in flags) {
 			sig.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			sig.access = SymbolAccessibility.PROTECTED;
 		} else {
 			sig.access = get_access (id);
 		}
@@ -3284,6 +3301,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		var st = new Struct (sym.name, get_src (begin), comment);
 		if (ModifierFlags.PRIVATE in flags) {
 			st.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			st.access = SymbolAccessibility.PROTECTED;
 		} else {
 			st.access = get_access (sym.name);
 		}
@@ -3346,6 +3365,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		var iface = new Interface (sym.name, get_src (begin), comment);
 		if (ModifierFlags.PRIVATE in flags) {
 			iface.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			iface.access = SymbolAccessibility.PROTECTED;
 		} else {
 			iface.access = get_access (sym.name);
 		}
@@ -3414,6 +3435,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		var en = new Enum (sym.name, get_src (begin), comment);
 		if (ModifierFlags.PRIVATE in flags) {
 			en.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			en.access = SymbolAccessibility.PROTECTED;
 		} else {
 			en.access = get_access (sym.name);
 		}
@@ -3472,6 +3495,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		var ed = new ErrorDomain (sym.name, get_src (begin), comment);
 		if (ModifierFlags.PRIVATE in flags) {
 			ed.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			ed.access = SymbolAccessibility.PROTECTED;
 		} else {
 			ed.access = get_access (sym.name);
 		}
@@ -3540,6 +3565,11 @@ public class Vala.Genie.Parser : CodeVisitor {
 				next ();
 				flags |= ModifierFlags.PRIVATE;
 				break;
+				
+			case TokenType.PROTECTED:
+				next ();
+				flags |= ModifierFlags.PROTECTED;
+				break;
 
 			default:
 				return flags;
@@ -3595,6 +3625,10 @@ public class Vala.Genie.Parser : CodeVisitor {
 				next ();
 				flags |= ModifierFlags.PRIVATE;
 				break;
+			case TokenType.PROTECTED:
+				next ();
+				flags |= ModifierFlags.PROTECTED;
+				break;	
 			default:
 				return flags;
 			}
@@ -3738,6 +3772,8 @@ public class Vala.Genie.Parser : CodeVisitor {
 		
 		if (ModifierFlags.PRIVATE in flags) {
 			d.access = SymbolAccessibility.PRIVATE;
+		} else if (ModifierFlags.PROTECTED in flags) {
+			d.access = SymbolAccessibility.PROTECTED;
 		} else {
 			d.access = get_access (sym.name);
 		}
