MOAR PARSING STUFF

This commit is contained in:
Hackerpilot 2013-06-03 00:50:13 +00:00
parent 0e58854fa9
commit 90b6d37c5d
3 changed files with 822 additions and 374 deletions

View File

@ -38,7 +38,6 @@ class ASTVisitor
/** */void visit(ArrayInitializer arrayInitializer) {} /** */void visit(ArrayInitializer arrayInitializer) {}
/** */void visit(ArrayLiteral arrayLiteral) {} /** */void visit(ArrayLiteral arrayLiteral) {}
/** */void visit(ArrayMemberInitialization arrayMemberInitialization) {} /** */void visit(ArrayMemberInitialization arrayMemberInitialization) {}
/** */void visit(ArrayMemberInitializations arrayMemberInitializations) {}
/** */void visit(AsmAddExp asmAddExp) {} /** */void visit(AsmAddExp asmAddExp) {}
/** */void visit(AsmAndExp asmAndExp) {} /** */void visit(AsmAndExp asmAndExp) {}
/** */void visit(AsmBrExp asmBrExp) {} /** */void visit(AsmBrExp asmBrExp) {}
@ -68,6 +67,8 @@ class ASTVisitor
/** */void visit(BlockStatement blockStatement) {} /** */void visit(BlockStatement blockStatement) {}
/** */void visit(BodyStatement bodyStatement) {} /** */void visit(BodyStatement bodyStatement) {}
/** */void visit(BreakStatement breakStatement) {} /** */void visit(BreakStatement breakStatement) {}
/** */void visit(BaseClass baseClass) {}
/** */void visit(BaseClassList baseClassList) {}
/** */void visit(BasicType builtinType) {} /** */void visit(BasicType builtinType) {}
/** */void visit(CaseRangeStatement caseRangeStatement) {} /** */void visit(CaseRangeStatement caseRangeStatement) {}
/** */void visit(CaseStatement caseStatement) {} /** */void visit(CaseStatement caseStatement) {}
@ -75,10 +76,8 @@ class ASTVisitor
/** */void visit(CastQualifier castQualifier) {} /** */void visit(CastQualifier castQualifier) {}
/** */void visit(Catch catch_) {} /** */void visit(Catch catch_) {}
/** */void visit(Catches catches) {} /** */void visit(Catches catches) {}
/** */void visit(ClassBody /// /** */void visit(ClassBody classBody) {}
classBody) {} /** */void visit(ClassDeclaration classDeclaration) {}
/** */void visit(ClassDeclaration ///
classDeclaration) {}
/** */void visit(CmpExpression cmpExpression) {} /** */void visit(CmpExpression cmpExpression) {}
/** */void visit(CompileCondition compileCondition) {} /** */void visit(CompileCondition compileCondition) {}
/** */void visit(ConditionalDeclaration conditionalDeclaration) {} /** */void visit(ConditionalDeclaration conditionalDeclaration) {}
@ -155,7 +154,6 @@ classDeclaration) {}
/** */void visit(NonEmptyStatement nonEmptyStatement) {} /** */void visit(NonEmptyStatement nonEmptyStatement) {}
/** */void visit(NonEmptyStatementNoCaseNoDefault nonEmptyStatementNoCaseNoDefault) {} /** */void visit(NonEmptyStatementNoCaseNoDefault nonEmptyStatementNoCaseNoDefault) {}
/** */void visit(NonVoidInitializer nonVoidInitializer) {} /** */void visit(NonVoidInitializer nonVoidInitializer) {}
/** */void visit(Opcode opcode) {}
/** */void visit(Operand operand) {} /** */void visit(Operand operand) {}
/** */void visit(Operands operands) {} /** */void visit(Operands operands) {}
/** */void visit(OrExpression orExpression) {} /** */void visit(OrExpression orExpression) {}
@ -170,7 +168,6 @@ classDeclaration) {}
/** */void visit(PragmaExpression pragmaExpression) {} /** */void visit(PragmaExpression pragmaExpression) {}
/** */void visit(PreIncDecExpression preIncDecExpression) {} /** */void visit(PreIncDecExpression preIncDecExpression) {}
/** */void visit(PrimaryExpression primaryExpression) {} /** */void visit(PrimaryExpression primaryExpression) {}
/** */void visit(ProtectionAttribute protectionAttribute) {}
/** */void visit(Register register) {} /** */void visit(Register register) {}
/** */void visit(RelExpression relExpression) {} /** */void visit(RelExpression relExpression) {}
/** */void visit(ReturnStatement returnStatement) {} /** */void visit(ReturnStatement returnStatement) {}
@ -337,7 +334,7 @@ class ArrayInitializer : ASTNode
{ {
public: public:
mixin(DEFAULT_ACCEPT); mixin(DEFAULT_ACCEPT);
/** */ArrayMemberInitializations arrayMemberInitializations; /** */ArrayMemberInitialization[] arrayMemberInitializations;
} }
/// ///
@ -357,14 +354,6 @@ public:
/** */NonVoidInitializer nonVoidInitializer; /** */NonVoidInitializer nonVoidInitializer;
} }
///
class ArrayMemberInitializations : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ArrayMemberInitialization[] arrayMemberInitializations;
}
/// ///
class AsmAddExp : ASTNode class AsmAddExp : ASTNode
{ {
@ -419,10 +408,9 @@ class AsmInstruction : ASTNode
{ {
public: public:
mixin(DEFAULT_ACCEPT); mixin(DEFAULT_ACCEPT);
/** */Token identifierOrInteger; /** */Token identifierOrIntegerOrOpcode;
/** */bool hasAlign; /** */bool hasAlign;
/** */AsmExp asmExp; /** */AsmExp asmExp;
/** */Opcode opcode;
/** */Operands operands; /** */Operands operands;
} }
@ -555,7 +543,7 @@ public:
mixin(DEFAULT_ACCEPT); mixin(DEFAULT_ACCEPT);
/** */TernaryExpression ternaryExpression; /** */TernaryExpression ternaryExpression;
/** */AssignExpression assignExpression; /** */AssignExpression assignExpression;
/** */Token operator; /** */TokenType operator;
} }
/// ///
@ -567,7 +555,7 @@ public:
/** */PostIncDecExpression postIncDecExpression; /** */PostIncDecExpression postIncDecExpression;
/** */UnaryExpression[] unaryExpressions; /** */UnaryExpression[] unaryExpressions;
/** */AssignExpression[] assignExpressions; /** */AssignExpression[] assignExpressions;
/** */Token[] assignOperators; /** */TokenType[] assignOperators;
} }
/// ///
@ -606,9 +594,8 @@ public:
/** */AlignAttribute alignAttribute; /** */AlignAttribute alignAttribute;
/** */PragmaExpression pragmaExpression; /** */PragmaExpression pragmaExpression;
/** */Deprecated deprecated_; /** */Deprecated deprecated_;
/** */ProtectionAttribute protectionAttribute;
/** */AtAttribute atAttribute; /** */AtAttribute atAttribute;
/** */Token attribute; /** */TokenType attribute;
} }
/// ///
@ -642,8 +629,25 @@ class BreakStatement : ASTNode
{ {
public: public:
mixin(DEFAULT_ACCEPT); mixin(DEFAULT_ACCEPT);
/** */Token identifier; /** */ Token identifier;
/** */bool hasIdentifier; /** */ bool hasIdentifier;
}
///
class BaseClass : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ IdentifierOrTemplateChain identifierOrTemplateChain;
/** */ TypeofExpression typeofExpression;
}
///
class BaseClassList : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ BaseClass[] baseClasses;
} }
/// ///
@ -828,8 +832,7 @@ public:
/** */ VariableDeclaration variableDeclaration; /** */ VariableDeclaration variableDeclaration;
/** */ AliasThisDeclaration aliasThisDeclaration; /** */ AliasThisDeclaration aliasThisDeclaration;
/** */ StructDeclaration structDeclaration; /** */ StructDeclaration structDeclaration;
/** */ ClassDeclaration /// /** */ ClassDeclaration classDeclaration;
classDeclaration;
/** */ InterfaceDeclaration interfaceDeclaration; /** */ InterfaceDeclaration interfaceDeclaration;
/** */ UnionDeclaration unionDeclaration; /** */ UnionDeclaration unionDeclaration;
/** */ EnumDeclaration enumDeclaration; /** */ EnumDeclaration enumDeclaration;
@ -927,7 +930,7 @@ class DoStatement : ASTNode
{ {
public: public:
mixin(DEFAULT_ACCEPT); mixin(DEFAULT_ACCEPT);
/** */ BlockStatement blockStatement; /** */ StatementNoCaseNoDefault statementNoCaseNoDefault;
/** */ Expression expression; /** */ Expression expression;
} }
@ -1485,14 +1488,6 @@ public:
} }
///
class Opcode : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ Token identifier;
}
/// ///
class Operand : ASTNode class Operand : ASTNode
{ {
@ -1631,14 +1626,6 @@ public:
ImportExpression importExpression; ImportExpression importExpression;
} }
///
class ProtectionAttribute : ASTNode
{
public:
mixin(DEFAULT_ACCEPT);
/** */ Token attribute;
}
/// ///
class Register : ASTNode class Register : ASTNode
{ {

3
std/d/gendoc.sh Normal file → Executable file
View File

@ -1 +1,4 @@
dmd -c -D lexer.d ../../../d-programming-language.org/std.ddoc -Df../../../hackerpilot.github.com/experimental/std_lexer/phobos/lexer.html -I../.. dmd -c -D lexer.d ../../../d-programming-language.org/std.ddoc -Df../../../hackerpilot.github.com/experimental/std_lexer/phobos/lexer.html -I../..
dmd -c -D ast.d ../../../d-programming-language.org/std.ddoc -Df../../../hackerpilot.github.com/experimental/std_lexer/phobos/ast.html -I../..
dmd -c -D parser.d ../../../d-programming-language.org/std.ddoc -Df../../../hackerpilot.github.com/experimental/std_lexer/phobos/parser.html -I../..

File diff suppressed because it is too large Load Diff