This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

expression handling


This is a brief overview of expression handling:


The Antlr parser generator is used to generate java classes
corresponding to the grammar defined in frysk-core/frysk/expr/cpp.g.
The generated files are <blddir>/frysk-core/frysk/expr/:
 CppLexer.java lexical analyzer
 CppParser.java parser
 CppTreeParser.java "backend" this is the antlr->frysk interface layer
 CppTreeParserTokenTypes.java
Note that the above files tend to produce warnings when compiled with
the ecj front end with warnings turned on.  CppSymTab.java is an
interface that the parser uses to access the frysk model of the symbol
table.  frysk-core/frysk/expr/cli/hpd/ExprSymTab.java implements this
interface.  More about that later.  The interface to expressions from
FryskGui or fhpd is frysk-core/frysk/expr/cli/hpd/SymTab.java.  SymTab
handles tab completion, what request (type/variable info), and where
request (frame info).  It passes the print and assign requests through
to get and put in ExprSymTab, which handles anything required of the
symbol table, or actually the parser does this by calling back into
ExprSymTab.  Currently ExprSymTab handles scalar variables, arrays,
and structs.  Currently ExprSymTab directly calls libdw via
frysk-imports/lib/dw/DwarfDie.java.  This is currently being split out
to form a more abstract model.  There are java versions of the dwarf
encodings in <blddir>/frysk-imports/lib/dw/Dw*Encodings.java. 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]