MixFix.hxx File Reference

#include <iostream>
#include "AST.hxx"
#include "shared_ptr.hxx"

Go to the source code of this file.

Enumerations

enum  Associativity { assoc_left = -1, assoc_right = 1, assoc_none = 0 }
enum  Fixity { prefix, postfix, infix, closed }
enum  SyntacticCategory { msc_keyword, msc_expr, msc_type, msc_kind }

Functions

boost::shared_ptr< ASTProcessMixFix (std::ostream &errStream, boost::shared_ptr< AST > mixAST)
 Given a mixfix expression AST, convert it into a expression tree according to the prevailing mixfix rules.
void mixfix_init ()
 Initialize the mixfix rule table (temporary expedient for testing).


Enumeration Type Documentation

enum Associativity

Bug:
This file may not survive, but the mixfix system was getting complicated enough to pull it out into a separate file. The issue I anticipate is that mixfix is statefule, so we may need to attach the mixfix state to the lexer. That's where all of the parser state lives, because Bison doesn't provide a straightforward way to have a parser object.
Enumerator:
assoc_left 
assoc_right 
assoc_none 

Definition at line 53 of file MixFix.hxx.

enum Fixity

Enumerator:
prefix 
postfix 
infix 
closed 

Definition at line 59 of file MixFix.hxx.

enum SyntacticCategory

Enumerator:
msc_keyword 
msc_expr 
msc_type 
msc_kind 

Definition at line 66 of file MixFix.hxx.


Function Documentation

void mixfix_init (  ) 

Initialize the mixfix rule table (temporary expedient for testing).

Definition at line 1180 of file MixFix.cxx.

References MixContext::add(), and TheMixContext.

Referenced by main().

boost::shared_ptr<AST> ProcessMixFix ( std::ostream &  errStream,
boost::shared_ptr< AST mixAST 
)

Given a mixfix expression AST, convert it into a expression tree according to the prevailing mixfix rules.


Generated on Thu May 17 23:59:16 2012 for BitC Compiler by  doxygen 1.4.7