Ignore:
Timestamp:
Sep 12, 2016, 9:52:12 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
101e0bd
Parents:
b6424d9
Message:

more refactoring of parser code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rb6424d9 r5b639ee  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 26 16:45:44 2016
    13 // Update Count     : 1964
     12// Last Modified On : Mon Sep 12 17:29:45 2016
     13// Update Count     : 1969
    1414//
    1515
     
    827827                { $$ = new StatementNode( build_while( $3, $5 ) ); }
    828828        | DO statement WHILE '(' comma_expression ')' ';'
    829                 { $$ = new StatementNode( build_while( $5, $2 ) ); }
     829                { $$ = new StatementNode( build_while( $5, $2, true ) ); }
    830830        | FOR '(' push for_control_expression ')' statement
    831831                { $$ = new StatementNode( build_for( $4, $6 ) ); }
     
    13631363                { $$ = DeclarationNode::newBasicType( DeclarationNode::Int ); }
    13641364        | LONG
    1365                 { $$ = DeclarationNode::newModifier( DeclarationNode::Long ); }
     1365                { $$ = DeclarationNode::newLength( DeclarationNode::Long ); }
    13661366        | SHORT
    1367                 { $$ = DeclarationNode::newModifier( DeclarationNode::Short ); }
     1367                { $$ = DeclarationNode::newLength( DeclarationNode::Short ); }
    13681368        | SIGNED
    1369                 { $$ = DeclarationNode::newModifier( DeclarationNode::Signed ); }
     1369                { $$ = DeclarationNode::newSignedNess( DeclarationNode::Signed ); }
    13701370        | UNSIGNED
    1371                 { $$ = DeclarationNode::newModifier( DeclarationNode::Unsigned ); }
     1371                { $$ = DeclarationNode::newSignedNess( DeclarationNode::Unsigned ); }
    13721372        | VOID
    13731373                { $$ = DeclarationNode::newBasicType( DeclarationNode::Void ); }
     
    13751375                { $$ = DeclarationNode::newBasicType( DeclarationNode::Bool ); }
    13761376        | COMPLEX                                                                                       // C99
    1377                 { $$ = DeclarationNode::newBasicType( DeclarationNode::Complex ); }
     1377                { $$ = DeclarationNode::newComplexType( DeclarationNode::Complex ); }
    13781378        | IMAGINARY                                                                                     // C99
    1379                 { $$ = DeclarationNode::newBasicType( DeclarationNode::Imaginary ); }
     1379                { $$ = DeclarationNode::newComplexType( DeclarationNode::Imaginary ); }
    13801380        | VALIST                                                                                        // GCC, __builtin_va_list
    13811381                { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); }
     
    18491849type_class:                                                                                             // CFA
    18501850        OTYPE
    1851                 { $$ = DeclarationNode::Type; }
     1851                { $$ = DeclarationNode::Otype; }
    18521852        | DTYPE
    18531853                { $$ = DeclarationNode::Ftype; }
Note: See TracChangeset for help on using the changeset viewer.