Commit e9ab2d5b authored by anisko_r's avatar anisko_r
Browse files

2002-12-23 Robert Anisko <robert@lrde.epita.fr>

	* src/deterministic/Cpp-det.sdf: In some cases, a same piece of
	text can be parsed both as an expression or a declaration.  Add an
	annotation rule for expressions.

	* src/cpp-to-det/Main.r: Handle this new case.
	* src/det-to-cpp/Main.r: Handle this new case.
parent 81b9d8da
2002-12-23 Robert Anisko <robert@lrde.epita.fr>
* src/deterministic/Cpp-det.sdf: In some cases, a same piece of
text can be parsed both as an expression or a declaration. Add an
annotation rule for expressions.
* src/cpp-to-det/Main.r: Handle this new case.
* src/det-to-cpp/Main.r: Handle this new case.
2002-12-20 Robert Anisko <robert@lrde.epita.fr>
* src/deterministic/Cpp-det.sdf: Add a rule to be able to annotate
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 2)
(Project-Description "Meta/SDF Grammar for C++")
(Project-Version meta-c++-grammar 0 96)
(Parent-Version meta-c++-grammar 0 95)
(Version-Log "2002-12-20 Robert Anisko <robert@lrde.epita.fr>
(Project-Version meta-c++-grammar 0 97)
(Parent-Version meta-c++-grammar 0 96)
(Version-Log "2002-12-23 Robert Anisko <robert@lrde.epita.fr>
* src/deterministic/Cpp-det.sdf: Add a rule to be able to annotate
original definitions of namespaces.
* src/deterministic/Cpp-det.sdf: In some cases, a same piece of
text can be parsed both as an expression or a declaration. Add an
annotation rule for expressions.
* src/cpp-to-det/Main.r: Update with respect to this new rule.
* src/det-to-cpp/Main.r: Update with respect to this new rule.")
* src/cpp-to-det/Main.r: Handle this new case.
* src/det-to-cpp/Main.r: Handle this new case.")
(New-Version-Log "")
(Checkin-Time "Fri, 20 Dec 2002 21:51:22 +0100")
(Checkin-Time "Mon, 23 Dec 2002 14:58:48 +0100")
(Checkin-Login anisko_r)
(Populate-Ignore
(
......@@ -83,7 +84,7 @@
)
(Project-Keywords)
(Files
(ChangeLog (meta-c++-grammar/0_ChangeLog 1.93 640))
(ChangeLog (meta-c++-grammar/0_ChangeLog 1.94 640))
(Makefile.am (meta-c++-grammar/f/34_Makefile.a 1.2 640))
(TODO (meta-c++-grammar/f/27_TODO 1.2 640))
(README (meta-c++-grammar/g/37_README 1.1 644))
......@@ -190,7 +191,7 @@
(src/grammar/UsingDeclarations.sdf (meta-c++-grammar/b/28_UsingDecla 1.4 640))
(src/grammar/UsingDirectives.sdf (meta-c++-grammar/b/29_UsingDirec 1.5 640))
(src/deterministic/Cpp-det.sdf (meta-c++-grammar/g/38_Cpp-det.sd 1.6 644))
(src/deterministic/Cpp-det.sdf (meta-c++-grammar/g/38_Cpp-det.sd 1.7 644))
(src/deterministic/Makefile.am (meta-c++-grammar/g/39_Makefile.a 1.1 644))
(test/Makefile.am (meta-c++-grammar/f/45_Makefile.a 1.3 640))
......@@ -422,10 +423,10 @@
(src/signature/Makefile.am (meta-c++-grammar/g/33_Makefile.a 1.3 640))
(src/det-to-cpp/Makefile.am (meta-c++-grammar/g/40_Makefile.a 1.1 644))
(src/det-to-cpp/Main.r (meta-c++-grammar/g/41_Main.r 1.2 644))
(src/det-to-cpp/Main.r (meta-c++-grammar/g/41_Main.r 1.3 644))
(src/cpp-to-det/Makefile.am (meta-c++-grammar/g/42_Makefile.a 1.1 644))
(src/cpp-to-det/Main.r (meta-c++-grammar/g/43_Main.r 1.2 644))
(src/cpp-to-det/Main.r (meta-c++-grammar/g/43_Main.r 1.3 644))
(lib/stratego.pp.af (meta-c++-grammar/g/34_stratego.p 1.1 640))
(lib/stratego.pp (meta-c++-grammar/g/35_stratego.p 1.1 640))
......
......@@ -35,6 +35,8 @@ rules
Gram-Key-0 : Identifier5 (x) -> Identifier17 (x)
Expr-0 : x@AssignmentExpression-p1 (_) -> Expression3 (x)
strategies
expr-prim = Expr-Prim-0 + Expr-Prim-1 + Expr-Prim-2 + Expr-Prim-3
......@@ -43,8 +45,9 @@ strategies
namespace-def = Namespace-Def-0 + Namespace-Def-1
class = Class-0 + Class-1
gram-key = Gram-Key-0
expr = Expr-0
strategies
cpp-to-det = expr-prim + dcl-spec + dcl-enum + namespace-def + class + gram-key
cpp-to-det = expr-prim + dcl-spec + dcl-enum + namespace-def + class + gram-key + expr
main = iowrap (topdown (try (cpp-to-det)))
......@@ -36,6 +36,8 @@ rules
Gram-Key-0 : Identifier17 (x) -> Identifier5 (x)
Expr-0 : Expression3 (x) -> x
strategies
expr-prim = Expr-Prim-0 + Expr-Prim-1 + Expr-Prim-2 + Expr-Prim-3 + Expr-Prim-4
......@@ -44,8 +46,9 @@ strategies
namespace-def = Namespace-Def-0 + Namespace-Def-1 + Namespace-Def-2
class = Class-0 + Class-1
gram-key = Gram-Key-0
expr = Expr-0
strategies
det-to-cpp = expr-prim + dcl-spec + dcl-enum + namespace-def + class + gram-key
det-to-cpp = expr-prim + dcl-spec + dcl-enum + namespace-def + class + gram-key + expr
main = iowrap (topdown (try (det-to-cpp)))
......@@ -25,6 +25,7 @@ exports
"/*[qid]*/" -> LAYOUT { reject } %% QualifiedId
"/*[org]*/" -> LAYOUT { reject } %% OriginalNamespaceDefinition
"/*[etor]*/" -> LAYOUT { reject } %% Enumerator
"/*[expr]*/" -> LAYOUT { reject } %% Expression
"/*[!al]*/" -> LAYOUT { reject }
"/*[!cl]*/" -> LAYOUT { reject }
"/*[!en]*/" -> LAYOUT { reject }
......@@ -36,6 +37,7 @@ exports
"/*[!qui]*/" -> LAYOUT { reject }
"/*[!org]*/" -> LAYOUT { reject }
"/*[!etor]*/" -> LAYOUT { reject }
"/*[!expr]*/" -> LAYOUT { reject }
%% 5.1 [expr.prim]
%% Ambiguous rules in: grammar/IdExpressions.sdf
......@@ -45,6 +47,10 @@ exports
"/*[qid]*/" "::" TemplateId "/*[!qid]*/" -> QualifiedId { prefer }
"/*[nns]*/" NestedNameSpecifier "/*[!nns]*/" -> NestedNameSpecifier { prefer }
%% 5.18 [expr.comma]
%% Ambiguous rules in: grammar/Expressions.sdf
"/*[expr]*/" Expression "/*[!expr]*/" -> Expression { prefer }
%% 7.1 [dcl.spec]
%% Ambiguous rules in: grammar/Specifiers.sdf
"/*[dss]*/" DeclSpecifier+ "/*[!dss]*/" -> DeclSpecifierSeq { prefer }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment