The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
|
/ A Parser for the C# language (including preprocessors directives). / More...
Classes | |
class | CSharpLexer |
class | CSharpParser |
class | CSharpPreprocessorHooverLexer |
class | CSharpPreprocessorLexer |
class | CSharpTokenTypes |
class | CustomHiddenStreamToken |
A sub-class of antlr.CommonHiddenStreamToken that can be used to track the file from which a token was created. More... | |
Typedefs | |
using | Stream = System.IO.Stream |
using | TextReader = System.IO.TextReader |
using | Hashtable = System.Collections.Hashtable |
using | Comparer = System.Collections.Comparer |
using | TokenStreamException = antlr.TokenStreamException |
using | TokenStreamIOException = antlr.TokenStreamIOException |
using | TokenStreamRecognitionException = antlr.TokenStreamRecognitionException |
using | CharStreamException = antlr.CharStreamException |
using | CharStreamIOException = antlr.CharStreamIOException |
using | ANTLRException = antlr.ANTLRException |
using | CharScanner = antlr.CharScanner |
using | InputBuffer = antlr.InputBuffer |
using | ByteBuffer = antlr.ByteBuffer |
using | CharBuffer = antlr.CharBuffer |
using | Token = antlr.Token |
using | IToken = antlr.IToken |
using | CommonToken = antlr.CommonToken |
using | SemanticException = antlr.SemanticException |
using | RecognitionException = antlr.RecognitionException |
using | NoViableAltForCharException = antlr.NoViableAltForCharException |
using | MismatchedCharException = antlr.MismatchedCharException |
using | TokenStream = antlr.TokenStream |
using | LexerSharedInputState = antlr.LexerSharedInputState |
using | BitSet = antlr.collections.impl.BitSet |
using | TokenBuffer = antlr.TokenBuffer |
using | LLkParser = antlr.LLkParser |
using | NoViableAltException = antlr.NoViableAltException |
using | MismatchedTokenException = antlr.MismatchedTokenException |
using | ParserSharedInputState = antlr.ParserSharedInputState |
using | FileInfo = System.IO.FileInfo |
using | TokenCreator = antlr.TokenCreator |
using | CommonHiddenStreamToken = antlr.CommonHiddenStreamToken |
Enumerations | |
enum | CodeMaskEnums { CodeMaskEnums.PreprocessorDirectivesOnly = 0x0000, CodeMaskEnums.UsingDirectives = 0x0001, CodeMaskEnums.GlobalAttributes = 0x0002, CodeMaskEnums.Attributes = 0x0004, CodeMaskEnums.ClassMemberDeclarations = 0x0008, CodeMaskEnums.StructMemberDeclarations = 0x0010, CodeMaskEnums.InterfaceMemberDeclarations = 0x0020, CodeMaskEnums.NamespaceMemberDeclarations = 0x0040, CodeMaskEnums.Statements = 0x0080 } |
Bit masks for specifying valid CSharp syntax constructs in Parser productions. More... | |
/ A Parser for the C# language (including preprocessors directives). /
param.Identifier = id.Identifier; param.ParamType = typeExp; param.Line = i
[The "BSD licence"] Copyright (c) 2002-2005 Kunle Odutola All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/ / /
/
/ The Parser defined below is based on the "C# Language Specification" as documented in / the ECMA-334 standard dated December 2001. /
/ /
/ One notable feature of this parser is that it can handle input that includes "normalized" / C# preprocessing directives. In the simplest sense, normalized C# preprocessing directives / are directives that can be safely deleted from a source file without triggering any parsing / errors due to incomplete statements etc. /
/ /
/ The Abstract Syntax Tree that this parser constructs has special nodes that represents all the C# preprocessor directives defined in the ECMA-334 standard. /
/ /
/ History /
/ /
/ 31-May-2002 kunle Started work in earnest / 09-Feb-2003 kunle Separated Parser from the original combined Lexer/Parser grammar file
/ 20-Oct-2003 kunle Removed STMT_LIST from inside BLOCK nodes. A BLOCK node now directly contains / a list of statements. Finding the AST nodes that correspond to a selection / should now be easier.
/
/ /
typedef antlr ANTLRException Parser.ANTLRException |
Definition at line 22 of file CSharpLexer.cs.
typedef antlr collections impl BitSet Parser.BitSet |
Definition at line 36 of file CSharpLexer.cs.
typedef antlr ByteBuffer Parser.ByteBuffer |
Definition at line 25 of file CSharpLexer.cs.
typedef antlr CharBuffer Parser.CharBuffer |
Definition at line 26 of file CSharpLexer.cs.
typedef antlr CharScanner Parser.CharScanner |
Definition at line 23 of file CSharpLexer.cs.
typedef antlr CharStreamException Parser.CharStreamException |
Definition at line 20 of file CSharpLexer.cs.
typedef antlr CharStreamIOException Parser.CharStreamIOException |
Definition at line 21 of file CSharpLexer.cs.
using Parser.CommonHiddenStreamToken = typedef antlr.CommonHiddenStreamToken |
Definition at line 36 of file CustomHiddenStreamToken.cs.
typedef antlr CommonToken Parser.CommonToken |
Definition at line 29 of file CSharpLexer.cs.
typedef System Collections Comparer Parser.Comparer |
Definition at line 15 of file CSharpLexer.cs.
using Parser.FileInfo = typedef System.IO.FileInfo |
Definition at line 33 of file CustomHiddenStreamToken.cs.
typedef System Collections Hashtable Parser.Hashtable |
Definition at line 14 of file CSharpLexer.cs.
typedef antlr InputBuffer Parser.InputBuffer |
Definition at line 24 of file CSharpLexer.cs.
typedef antlr IToken Parser.IToken |
Definition at line 28 of file CSharpLexer.cs.
typedef antlr LexerSharedInputState Parser.LexerSharedInputState |
Definition at line 35 of file CSharpLexer.cs.
using Parser.LLkParser = typedef antlr.LLkParser |
Definition at line 91 of file CSharpParser.cs.
typedef antlr MismatchedCharException Parser.MismatchedCharException |
Definition at line 33 of file CSharpLexer.cs.
using Parser.MismatchedTokenException = typedef antlr.MismatchedTokenException |
Definition at line 97 of file CSharpParser.cs.
using Parser.NoViableAltException = typedef antlr.NoViableAltException |
Definition at line 96 of file CSharpParser.cs.
Definition at line 32 of file CSharpLexer.cs.
using Parser.ParserSharedInputState = typedef antlr.ParserSharedInputState |
Definition at line 99 of file CSharpParser.cs.
typedef antlr RecognitionException Parser.RecognitionException |
Definition at line 31 of file CSharpLexer.cs.
typedef antlr SemanticException Parser.SemanticException |
Definition at line 30 of file CSharpLexer.cs.
typedef System IO Stream Parser.Stream |
Definition at line 12 of file CSharpLexer.cs.
typedef System IO TextReader Parser.TextReader |
Definition at line 13 of file CSharpLexer.cs.
typedef antlr Token Parser.Token |
Definition at line 27 of file CSharpLexer.cs.
using Parser.TokenBuffer = typedef antlr.TokenBuffer |
Definition at line 87 of file CSharpParser.cs.
using Parser.TokenCreator = typedef antlr.TokenCreator |
Definition at line 35 of file CustomHiddenStreamToken.cs.
typedef antlr TokenStream Parser.TokenStream |
Definition at line 34 of file CSharpLexer.cs.
typedef antlr TokenStreamException Parser.TokenStreamException |
Definition at line 17 of file CSharpLexer.cs.
typedef antlr TokenStreamIOException Parser.TokenStreamIOException |
Definition at line 18 of file CSharpLexer.cs.
Definition at line 19 of file CSharpLexer.cs.
enum Parser.CodeMaskEnums |
Bit masks for specifying valid CSharp syntax constructs in Parser productions.
Enumerator | |
---|---|
PreprocessorDirectivesOnly | |
UsingDirectives | |
GlobalAttributes | |
Attributes | |
ClassMemberDeclarations | |
StructMemberDeclarations | |
InterfaceMemberDeclarations | |
NamespaceMemberDeclarations | |
Statements |
Definition at line 37 of file CodeMaskEnums.cs.