text: /*
  	Copyright (C) 2014 Chaos Software
  
  	Distributed under the Boost Software License, Version 1.0.
  	See accompanying file LICENSE_1_0.txt or copy at
  	http://www.boost.org/LICENSE_1_0.txt.
  */
  
  #ifndef __RULES_H__
  #define __RULES_H__
  
  namespace chaos { namespace cell {
  
  //! Identifiers for all grammar rules.
  enum RuleID
  {
  	RID_UNKNOWN = -1,
  
  // Identifiers
  
  	RID_IDENTIFIER,
  	RID_SYSTEM_IDENTIFIER,
  	
  // Literals
  
  	RID_INTEGER_LITERAL_HEX,
  	RID_INTEGER_LITERAL_OCT,
  	RID_INTEGER_LITERAL_DEC,
  	RID_INTEGER_LITERAL,
  
  	RID_REAL_LITERAL_1,
  	RID_REAL_LITERAL_2,
  	RID_REAL_LITERAL_3,
  	RID_REAL_LITERAL,
  
  	RID_BOOLEAN_LITERAL,
  
  	RID_LITERAL,
  
  // Basic concepts
  
  	RID_START_SYMBOL,
  	RID_TRANSLATION_UNIT,
  	RID_GLOBAL_DECLARATION,
  
  // Types
  
  	RID_TYPE_SPECIFIER,
  	RID_TYPE_MODIFIER,
  
  // Expressions
  
  	RID_ARGUMENT_LIST,
  	RID_PRIMARY_EXPRESSION,
  	RID_PRIMARY_EXPRESSION_HELPER,
  	RID_PARENTHESIZED_EXPRESSION,
  	RID_MEMBER_ACCESS,
  	RID_INVOCATION,
  	RID_ELEMENT_ACCESS,
  	RID_TYPE_CAST,
  	RID_EXPRESSION_LIST,
  	RID_ACCESS,
  	RID_OBJECT_CREATION_EXPRESSION,
  	RID_POSTFIX_EXPRESSION,
  	RID_UNARY_EXPRESSION, 
  	RID_MULTIPLICATIVE_EXPRESSION,
  	RID_ADDITIVE_EXPRESSION,
  	RID_SHIFT_EXPRESSION,
  	RID_RELATIONAL_EXPRESSION,
  	RID_EQUALITY_EXPRESSION,
  	RID_AND_EXPRESSION,
  	RID_AND_EXPRESSION_HELPER,
  	RID_EXCLUSIVE_OR_EXPRESSION,
  	RID_INCLUSIVE_OR_EXPRESSION,
  	RID_CONDITIONAL_AND_EXPRESSION,
  	RID_CONDITIONAL_OR_EXPRESSION,
  	RID_CONDITIONAL_EXPRESSION,
  	RID_ASSIGNMENT,
  	RID_ASSIGNMENT_OPERATOR,
  	RID_EXPRESSION,
  	RID_ARRAY_CREATION_EXPRESSION,
  
  // Statements
  
  	RID_STATEMENT,
  	RID_EMBEDDED_STATEMENT,
  	RID_BLOCK,
  	RID_STATEMENT_LIST,
  	RID_EMPTY_STATEMENT,
  	RID_DECLARATION_STATEMENT,
  	RID_GLOBAL_DECLARATION_STATEMENT,
  	RID_VARIABLE_DECLARATION,
  	RID_VARIABLE_DECLARATOR,
  	RID_EXPRESSION_STATEMENT,
  	RID_STATEMENT_EXPRESSION,
  	RID_SELECTION_STATEMENT,
  	RID_IF_STATEMENT,
  	RID_ELSE_STATEMENT,
  	RID_WHILE_STATEMENT,
  	RID_STATEMENT_EXPRESSION_LIST,
  	RID_QUIT_STATEMENT,
  	RID_QUALIFIED_IDENTIFIER,
  	RID_TYPE_DECLARATION,
  	RID_ARRAY_SPECIFIER,
  	
  	RID_LAST,
  
  	RID_FORCE_SIZE = 0x7FFFFFFF
  };
  
  //! Converts the specified rid to a human-readable name.
  //! Useful for debugging.
  const char* toString(RuleID rid);
  
  }} // chaos::cell
  
  #endif // __RULES_H__
  
  