Changeset c92bdcc for src/Parser
- Timestamp:
- May 10, 2024, 4:06:07 PM (8 weeks ago)
- Branches:
- master
- Children:
- 0f612d2
- Parents:
- 41c8312
- Location:
- src/Parser
- Files:
-
- 4 edited
- 16 moved
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // DeclarationNode.c c--7 // DeclarationNode.cpp -- 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 14 14 // 15 15 16 #include "DeclarationNode.h "17 18 #include <cassert> // for assert, assertf, strict_dynamic_cast19 #include <iterator> // for back_insert_iterator20 #include <list> // for list21 #include <memory> // for unique_ptr22 #include <ostream> // for operator<<, ostream, basic_ostream23 #include <string> // for string, operator+, allocator, char...24 25 #include "AST/Attribute.hpp" // for Attribute26 #include "AST/Copy.hpp" // for shallowCopy27 #include "AST/Decl.hpp" // for Decl28 #include "AST/Expr.hpp" // for Expr29 #include "AST/Print.hpp" // for print30 #include "AST/Stmt.hpp" // for AsmStmt, DirectiveStmt31 #include "AST/StorageClasses.hpp" // for Storage::Class32 #include "AST/Type.hpp" // for Type33 #include "Common/CodeLocation.h "// for CodeLocation34 #include "Common/Iterate.hpp" // for reverseIterate35 #include "Common/SemanticError.h "// for SemanticError36 #include "Common/UniqueName.h "// for UniqueName37 #include "Common/ utility.h"// for copy, spliceBegin38 #include "Parser/ExpressionNode.h "// for ExpressionNode39 #include "Parser/InitializerNode.h "// for InitializerNode40 #include "Parser/StatementNode.h "// for StatementNode41 #include "TypeData.h "// for TypeData, TypeData::Aggregate_t42 #include "TypedefTable.h "// for TypedefTable16 #include "DeclarationNode.hpp" 17 18 #include <cassert> // for assert, assertf, strict_dynami... 19 #include <iterator> // for back_insert_iterator 20 #include <list> // for list 21 #include <memory> // for unique_ptr 22 #include <ostream> // for operator<<, ostream, basic_ost... 23 #include <string> // for string, operator+, allocator, ... 24 25 #include "AST/Attribute.hpp" // for Attribute 26 #include "AST/Copy.hpp" // for shallowCopy 27 #include "AST/Decl.hpp" // for Decl 28 #include "AST/Expr.hpp" // for Expr 29 #include "AST/Print.hpp" // for print 30 #include "AST/Stmt.hpp" // for AsmStmt, DirectiveStmt 31 #include "AST/StorageClasses.hpp" // for Storage::Class 32 #include "AST/Type.hpp" // for Type 33 #include "Common/CodeLocation.hpp" // for CodeLocation 34 #include "Common/Iterate.hpp" // for reverseIterate 35 #include "Common/SemanticError.hpp" // for SemanticError 36 #include "Common/UniqueName.hpp" // for UniqueName 37 #include "Common/Utility.hpp" // for copy, spliceBegin 38 #include "Parser/ExpressionNode.hpp" // for ExpressionNode 39 #include "Parser/InitializerNode.hpp" // for InitializerNode 40 #include "Parser/StatementNode.hpp" // for StatementNode 41 #include "TypeData.hpp" // for TypeData, TypeData::Aggregate_t 42 #include "TypedefTable.hpp" // for TypedefTable 43 43 44 44 extern TypedefTable typedefTable; -
src/Parser/DeclarationNode.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // DeclarationNode.h --7 // DeclarationNode.hpp -- 8 8 // 9 9 // Author : Andrew Beach … … 16 16 #pragma once 17 17 18 #include "ParseNode.h "18 #include "ParseNode.hpp" 19 19 20 20 struct TypeData; -
src/Parser/ExpressionNode.cpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ExpressionNode.c c--7 // ExpressionNode.cpp -- 8 8 // 9 9 // Author : Peter A. Buhr … … 14 14 // 15 15 16 #include "ExpressionNode.h "16 #include "ExpressionNode.hpp" 17 17 18 18 #include <cassert> // for assert … … 26 26 #include "AST/Expr.hpp" // for NameExpr 27 27 #include "AST/Type.hpp" // for Type, LengthFlag, DimentionFlag 28 #include "Common/SemanticError.h "// for SemanticError29 #include "Common/ utility.h"// for maybeMoveBuild, maybeBuild, CodeLo...30 #include "DeclarationNode.h "// for DeclarationNode31 #include "InitializerNode.h "// for InitializerNode32 #include "TypeData.h "// for addType, build_basic_type, build_c...33 #include " parserutility.h"// for notZeroExpr28 #include "Common/SemanticError.hpp"// for SemanticError 29 #include "Common/Utility.hpp" // for maybeMoveBuild, maybeBuild, CodeLo... 30 #include "DeclarationNode.hpp" // for DeclarationNode 31 #include "InitializerNode.hpp" // for InitializerNode 32 #include "TypeData.hpp" // for addType, build_basic_type, build_c... 33 #include "ParserUtility.hpp" // for notZeroExpr 34 34 35 35 using namespace std; -
src/Parser/ExpressionNode.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ExpressionNode.h --7 // ExpressionNode.hpp -- 8 8 // 9 9 // Author : Andrew Beach … … 16 16 #pragma once 17 17 18 #include "ParseNode.h "18 #include "ParseNode.hpp" 19 19 20 20 struct InitializerNode; -
src/Parser/InitializerNode.cpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // InitializerNode.c c--7 // InitializerNode.cpp -- 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 14 14 // 15 15 16 #include "InitializerNode.h "16 #include "InitializerNode.hpp" 17 17 18 #include <iostream> // for operator<<, ostream, basic_ostream19 #include <list> // for list20 #include <string> // for operator<<, string18 #include <iostream> // for operator<<, ostream, basic_ostream 19 #include <list> // for list 20 #include <string> // for operator<<, string 21 21 22 #include "AST/Expr.hpp" // for Expr23 #include "AST/Init.hpp" // for Designator, Init, ListInit, Sing...24 #include "Common/SemanticError.h " // for SemanticError25 #include "Common/ utility.h" // for maybeBuild26 #include "ExpressionNode.h " // for ExpressionNode27 #include "DeclarationNode.h " // for buildList22 #include "AST/Expr.hpp" // for Expr 23 #include "AST/Init.hpp" // for Designator, Init, ListInit, Sing... 24 #include "Common/SemanticError.hpp" // for SemanticError 25 #include "Common/Utility.hpp" // for maybeBuild 26 #include "ExpressionNode.hpp" // for ExpressionNode 27 #include "DeclarationNode.hpp" // for buildList 28 28 29 29 using namespace std; -
src/Parser/InitializerNode.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // InitializerNode.h --7 // InitializerNode.hpp -- 8 8 // 9 9 // Author : Andrew Beach … … 16 16 #pragma once 17 17 18 #include "ParseNode.h "18 #include "ParseNode.hpp" 19 19 20 20 struct InitializerNode final : public ParseList<InitializerNode> { -
src/Parser/ParseNode.cpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ParseNode.c c--7 // ParseNode.cpp -- 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 14 14 // 15 15 16 #include "ParseNode.h "16 #include "ParseNode.hpp" 17 17 using namespace std; 18 18 -
src/Parser/ParseNode.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ParseNode.h --7 // ParseNode.hpp -- 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 16 16 #pragma once 17 17 18 #include <algorithm> // for move19 #include <cassert> // for assert, assertf20 #include <iosfwd> // for ostream21 #include <iterator> // for back_insert_iterator22 #include <list> // for list23 #include <memory> // for unique_ptr, pointer_traits24 #include <string> // for string18 #include <algorithm> // for move 19 #include <cassert> // for assert, assertf 20 #include <iosfwd> // for ostream 21 #include <iterator> // for back_insert_iterator 22 #include <list> // for list 23 #include <memory> // for unique_ptr, pointer_traits 24 #include <string> // for string 25 25 26 #include "AST/Expr.hpp" // for Expr, NameExprLogicalFlag27 #include "AST/Fwd.hpp" // for ptr, Decl, DeclWithType,28 #include "AST/Stmt.hpp" // for Stmt29 #include "Common/CodeLocation.h " // for CodeLocation30 #include "Common/SemanticError.h " // for SemanticError31 #include "Common/UniqueName.h " // for UniqueName32 #include "Parser/ parserutility.h" // for maybeBuild, maybeCopy26 #include "AST/Expr.hpp" // for Expr, NameExpr, LogicalFlag 27 #include "AST/Fwd.hpp" // for ptr, Decl, DeclWithType, 28 #include "AST/Stmt.hpp" // for Stmt 29 #include "Common/CodeLocation.hpp" // for CodeLocation 30 #include "Common/SemanticError.hpp" // for SemanticError 31 #include "Common/UniqueName.hpp" // for UniqueName 32 #include "Parser/ParserUtility.hpp" // for maybeBuild, maybeCopy 33 33 34 34 struct DeclarationNode; -
src/Parser/ParserTypes.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // parser.hh--7 // ParserTypes.hpp -- 8 8 // 9 9 // Author : Peter A. Buhr … … 20 20 21 21 #include <string> 22 #include "ParseNode.h "22 #include "ParseNode.hpp" 23 23 // External declarations for information sharing between lexer and scanner 24 24 class TypedefTable; -
src/Parser/ParserUtility.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // parserutility.h-- Collected utilities for the parser.7 // ParserUtility.hpp -- Collected utilities for the parser. 8 8 // 9 9 // Author : Rodolfo G. Esteves -
src/Parser/RunParser.cpp
r41c8312 rc92bdcc 18 18 #include "AST/TranslationUnit.hpp" // for TranslationUnit 19 19 #include "Common/CodeLocationTools.hpp" // for forceFillCodeLocations 20 #include "Parser/DeclarationNode.h "// for DeclarationNode, buildList21 #include "Parser/TypedefTable.h "// for TypedefTable20 #include "Parser/DeclarationNode.hpp" // for DeclarationNode, buildList 21 #include "Parser/TypedefTable.hpp" // for TypedefTable 22 22 23 23 // Variables global to the parsing code. -
src/Parser/StatementNode.cpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // StatementNode.c c-- Transform from parse data-structures to AST data-structures, usually deleting the parse7 // StatementNode.cpp -- Transform from parse data-structures to AST data-structures, usually deleting the parse 8 8 // data-structure after the transformation. 9 9 // … … 15 15 // 16 16 17 #include "StatementNode.h "17 #include "StatementNode.hpp" 18 18 19 19 #include <cassert> // for assert, strict_dynamic_cast, assertf … … 23 23 #include "AST/Label.hpp" // for Label 24 24 #include "AST/Stmt.hpp" // for Stmt, AsmStmt, BranchStmt, CaseCla... 25 #include "Common/SemanticError.h "// for SemanticError26 #include "Common/ utility.h"// for maybeMoveBuild, maybeBuild27 #include "DeclarationNode.h "// for DeclarationNode28 #include "ExpressionNode.h "// for ExpressionNode29 #include " parserutility.h"// for notZeroExpr25 #include "Common/SemanticError.hpp"// for SemanticError 26 #include "Common/Utility.hpp" // for maybeMoveBuild, maybeBuild 27 #include "DeclarationNode.hpp" // for DeclarationNode 28 #include "ExpressionNode.hpp" // for ExpressionNode 29 #include "ParserUtility.hpp" // for notZeroExpr 30 30 31 31 class Declaration; -
src/Parser/StatementNode.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // StatementNode.h --7 // StatementNode.hpp -- 8 8 // 9 9 // Author : Andrew Beach … … 16 16 #pragma once 17 17 18 #include "ParseNode.h "18 #include "ParseNode.hpp" 19 19 20 20 struct StatementNode final : public ParseList<StatementNode> { -
src/Parser/TypeData.cpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypeData.c c--7 // TypeData.cpp -- 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 14 14 // 15 15 16 #include "TypeData.h "17 18 #include <cassert> // for assert19 #include <ostream> // for operator<<, ostream, basic_ostream20 21 #include "AST/Attribute.hpp" // for Attribute22 #include "AST/Decl.hpp" // for AggregateDecl, ObjectDecl, TypeDe...23 #include "AST/Init.hpp" // for SingleInit, ListInit24 #include "AST/Print.hpp" // for print25 #include "AST/Type.hpp" // for Type26 #include "Common/SemanticError.h " // for SemanticError27 #include "Common/ utility.h" // for splice, spliceBegin28 #include "Common/Iterate.hpp" // for reverseIterate29 #include "Parser/ExpressionNode.h " // for ExpressionNode30 #include "Parser/StatementNode.h " // for StatementNode16 #include "TypeData.hpp" 17 18 #include <cassert> // for assert 19 #include <ostream> // for operator<<, ostream, basic_ostream 20 21 #include "AST/Attribute.hpp" // for Attribute 22 #include "AST/Decl.hpp" // for AggregateDecl, ObjectDecl, Type... 23 #include "AST/Init.hpp" // for SingleInit, ListInit 24 #include "AST/Print.hpp" // for print 25 #include "AST/Type.hpp" // for Type 26 #include "Common/SemanticError.hpp" // for SemanticError 27 #include "Common/Utility.hpp" // for splice, spliceBegin 28 #include "Common/Iterate.hpp" // for reverseIterate 29 #include "Parser/ExpressionNode.hpp" // for ExpressionNode 30 #include "Parser/StatementNode.hpp" // for StatementNode 31 31 32 32 class Attribute; -
src/Parser/TypeData.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypeData.h --7 // TypeData.hpp -- 8 8 // 9 9 // Author : Peter A. Buhr … … 22 22 #include "AST/CVQualifiers.hpp" // for CV 23 23 #include "AST/Fwd.hpp" // for Type 24 #include "DeclarationNode.h "// for DeclarationNode24 #include "DeclarationNode.hpp" // for DeclarationNode 25 25 26 26 struct TypeData { -
src/Parser/TypedefTable.cpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypedefTable.c c--7 // TypedefTable.cpp -- 8 8 // 9 9 // Author : Peter A. Buhr … … 15 15 16 16 17 #include "TypedefTable.h "17 #include "TypedefTable.hpp" 18 18 19 19 #include <cassert> // for assert … … 23 23 struct TypeData; 24 24 25 #include "ExpressionNode.h "// for LabelNode26 #include "ParserTypes.h " // for Token27 #include "StatementNode.h "// for CondCtl, ForCtrl25 #include "ExpressionNode.hpp" // for LabelNode 26 #include "ParserTypes.hpp" // for Token 27 #include "StatementNode.hpp" // for CondCtl, ForCtrl 28 28 // This (generated) header must come late as it is missing includes. 29 29 #include "parser.hh" // for IDENTIFIER, TYPEDEFname, TYPEGENname -
src/Parser/TypedefTable.hpp
r41c8312 rc92bdcc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypedefTable.h --7 // TypedefTable.hpp -- 8 8 // 9 9 // Author : Peter A. Buhr … … 18 18 #include <string> // for string 19 19 20 #include "Common/ScopedMap.h " // for ScopedMap20 #include "Common/ScopedMap.hpp" // for ScopedMap 21 21 22 22 class TypedefTable { -
src/Parser/lex.ll
r41c8312 rc92bdcc 44 44 45 45 #include "config.h" // configure info 46 #include "DeclarationNode.h "// for DeclarationNode47 #include "ExpressionNode.h "// for LabelNode48 #include "InitializerNode.h "// for InitializerNode49 #include "ParseNode.h "50 #include "ParserTypes.h "// for Token51 #include "StatementNode.h "// for CondCtl, ForCtrl52 #include "TypedefTable.h "46 #include "DeclarationNode.hpp" // for DeclarationNode 47 #include "ExpressionNode.hpp" // for LabelNode 48 #include "InitializerNode.hpp" // for InitializerNode 49 #include "ParseNode.hpp" 50 #include "ParserTypes.hpp" // for Token 51 #include "StatementNode.hpp" // for CondCtl, ForCtrl 52 #include "TypedefTable.hpp" 53 53 // This (generated) header must come late as it is missing includes. 54 54 #include "parser.hh" // generated info -
src/Parser/module.mk
r41c8312 rc92bdcc 20 20 21 21 SRC += \ 22 Parser/DeclarationNode.c c\23 Parser/DeclarationNode.h \24 Parser/ExpressionNode.c c\25 Parser/ExpressionNode.h \26 Parser/InitializerNode.c c\27 Parser/InitializerNode.h \22 Parser/DeclarationNode.cpp \ 23 Parser/DeclarationNode.hpp \ 24 Parser/ExpressionNode.cpp \ 25 Parser/ExpressionNode.hpp \ 26 Parser/InitializerNode.cpp \ 27 Parser/InitializerNode.hpp \ 28 28 Parser/lex.ll \ 29 Parser/ParseNode.c c\30 Parser/ParseNode.h \29 Parser/ParseNode.cpp \ 30 Parser/ParseNode.hpp \ 31 31 Parser/parser.yy \ 32 Parser/ParserTypes.h \33 Parser/parserutility.h \32 Parser/ParserTypes.hpp \ 33 Parser/parserutility.hpp \ 34 34 Parser/RunParser.cpp \ 35 35 Parser/RunParser.hpp \ 36 Parser/StatementNode.c c\37 Parser/StatementNode.h \38 Parser/TypeData.c c\39 Parser/TypeData.h \40 Parser/TypedefTable.c c\41 Parser/TypedefTable.h 36 Parser/StatementNode.cpp \ 37 Parser/StatementNode.hpp \ 38 Parser/TypeData.cpp \ 39 Parser/TypeData.hpp \ 40 Parser/TypedefTable.cpp \ 41 Parser/TypedefTable.hpp 42 42 43 MOSTLYCLEANFILES += Parser/lex.cc Parser/parser.cc Parser/parser.hh Parser/parser.output 43 MOSTLYCLEANFILES += \ 44 Parser/lex.cc \ 45 Parser/parser.cc \ 46 Parser/parser.hh \ 47 Parser/parser.output -
src/Parser/parser.yy
r41c8312 rc92bdcc 48 48 using namespace std; 49 49 50 #include "DeclarationNode.h "// for DeclarationNode, ...51 #include "ExpressionNode.h "// for ExpressionNode, ...52 #include "InitializerNode.h "// for InitializerNode, ...53 #include "ParserTypes.h "54 #include "StatementNode.h "// for build_...55 #include "TypedefTable.h "56 #include "TypeData.h "50 #include "DeclarationNode.hpp" // for DeclarationNode, ... 51 #include "ExpressionNode.hpp" // for ExpressionNode, ... 52 #include "InitializerNode.hpp" // for InitializerNode, ... 53 #include "ParserTypes.hpp" 54 #include "StatementNode.hpp" // for build_... 55 #include "TypedefTable.hpp" 56 #include "TypeData.hpp" 57 57 #include "AST/Type.hpp" // for BasicType, BasicKind 58 #include "Common/SemanticError.h "// error_str59 #include "Common/ utility.h"// for maybeMoveBuild, maybeBuild, CodeLo...58 #include "Common/SemanticError.hpp" // error_str 59 #include "Common/Utility.hpp" // for maybeMoveBuild, maybeBuild, CodeLo... 60 60 61 61 // lex uses __null in a boolean context, it's fine.
Note: See TracChangeset
for help on using the changeset viewer.