OpenASIP  2.0
Public Member Functions | Public Attributes | List of all members
AssemblerParser::definition< ScannerT > Struct Template Reference

#include <AssemblerParser.hh>

Collaboration diagram for AssemblerParser::definition< ScannerT >:
Collaboration graph

Public Member Functions

 definition (AssemblerParser const &self)
 
rule< ScannerT > const & start () const
 

Public Attributes

const AssemblerParserparent_
 
rule< ScannerT > comment
 
rule< ScannerT > my_space
 
rule< ScannerT > port
 
rule< ScannerT > name
 
rule< ScannerT > program
 
rule< ScannerT > area
 
rule< ScannerT > dataArea
 
rule< ScannerT > dataHeader
 
rule< ScannerT > dataLines
 
rule< ScannerT > dataLine
 
rule< ScannerT > initData
 
rule< ScannerT > uLiteral
 
rule< ScannerT > literal
 
rule< ScannerT > codeArea
 
rule< ScannerT > codeHeader
 
rule< ScannerT > codeLines
 
rule< ScannerT > codeLine
 
rule< ScannerT > literalOrExpression
 
rule< ScannerT > label
 
rule< ScannerT > codeLabel
 
rule< ScannerT > instruction
 
rule< ScannerT > emptyInstruction
 
rule< ScannerT > moves
 
rule< ScannerT > move
 
rule< ScannerT > emptyMove
 
rule< ScannerT > directive
 
rule< ScannerT > immediateSpec
 
rule< ScannerT > transport
 
rule< ScannerT > annotation
 
rule< ScannerT > initDataField
 
rule< ScannerT > guard
 
rule< ScannerT > invertFlag
 
rule< ScannerT > source
 
rule< ScannerT > destination
 
rule< ScannerT > dataLabel
 
rule< ScannerT > uNumber
 
rule< ScannerT > sNumber
 
rule< ScannerT > hexNumber
 
rule< ScannerT > binNumber
 
rule< ScannerT > index
 
rule< ScannerT > fuTerm
 
rule< ScannerT > indexTerm
 
rule< ScannerT > sLiteral
 
rule< ScannerT > backslashedChars
 
rule< ScannerT > regTerm
 
rule< ScannerT > offset
 
rule< ScannerT > symExpression
 
rule< ScannerT > expression
 
rule< ScannerT > immTerm
 
rule< ScannerT > busTerm
 

Detailed Description

template<typename ScannerT>
struct AssemblerParser::definition< ScannerT >

Definition at line 350 of file AssemblerParser.hh.

Constructor & Destructor Documentation

◆ definition()

template<typename ScannerT >
AssemblerParser::definition< ScannerT >::definition ( AssemblerParser const &  self)
inline

Definition at line 364 of file AssemblerParser.hh.

364  : parent_(self) {
365 
366  // ------------------------------------------------------------
367  // omits comments and update current line couter
368  // ------------------------------------------------------------
369  comment = str_p("#") >>
370  (*(anychar_p - '\n') >> ch_p('\n'))
371  [increment_a(self.parserTemp_.lineNumber)]
372  ;
373 
374  // ------------------------------------------------------------
375  // comment or any white empty space
376  // ------------------------------------------------------------
377  my_space =
378  comment
379  |
380 
381  str_p("\n")
382  [increment_a(self.parserTemp_.lineNumber)]
383  |
384 
385  space_p;
386 
387  // ------------------------------------------------------------
388  // all literals are stored to parserTemp_.lastNumber field
389  // ------------------------------------------------------------
390  binNumber = str_p("0b") >> bin_p
391  [assign_a(self.parserTemp_.lastNumber)]
392  [assign_a(self.parserTemp_.isLastSigned, MY_FALSE)];
393 
394  hexNumber = str_p("0x") >> hex_p
395  [assign_a(self.parserTemp_.lastNumber)]
396  [assign_a(self.parserTemp_.isLastSigned, MY_FALSE)];
397 
398  uNumber = uint_p
399  [assign_a(self.parserTemp_.lastNumber)]
400  [assign_a(self.parserTemp_.isLastSigned, MY_FALSE)];
401 
402  sNumber = int_p
403  [assign_a(self.parserTemp_.lastNumber)]
404  [assign_a(self.parserTemp_.isLastSigned, MY_TRUE)];
405 
406  // ------------------------------------------------------------
407  // unsigned literal
408  // ------------------------------------------------------------
410 
411  // ------------------------------------------------------------
412  // convert backslashed character " and also
413  // accept plain \-character
414  // ------------------------------------------------------------
416  str_p("\\\"")
417  ;
418 
419  // ------------------------------------------------------------
420  // string literal
421  // ------------------------------------------------------------
422  sLiteral =
423  eps_p
424  [assign_a(self.parserTemp_.sLiteral, "")] >>
425 
426  (ch_p('\"') >>
427 
428  +(backslashedChars |
429  (anychar_p - ch_p('\"')) ) >>
430 
431  ch_p('\"'))
432  [PrintString(std::string(
433  "String literals are not supported yet!\n").c_str())]
434  ;
435 
436  // ------------------------------------------------------------
437  // any literal
438  // ------------------------------------------------------------
440 
441  // ------------------------------------------------------------
442  // any valid string
443  // NOTE: we are not as liberal as ADF specification,
444  // we don't allow ':'
445  // ------------------------------------------------------------
446  name = (alpha_p | chset_p("_")) >> *(alnum_p | chset_p("_"));
447 
448  // ------------------------------------------------------------
449  // index is unsigned number and stored to parserTemp_.index field.
450  // ------------------------------------------------------------
451  index = uNumber[assign_a(self.parserTemp_.index,
452  self.parserTemp_.lastNumber)];
453 
454  // ------------------------------------------------------------
455  // {prev} and {next} reference which are not yet supported
456  // ------------------------------------------------------------
457  busTerm = '{' >>
458  (str_p("prev")
459  [assign_a(self.parserTemp_.busTerm.prev, MY_TRUE)]|
460  str_p("next")
461  [assign_a(self.parserTemp_.busTerm.prev, MY_FALSE)]) >> '}';
462 
463  // ------------------------------------------------------------
464  // unit.port[.operation] is stored to parserTemp_.fuTerm field
465  // ------------------------------------------------------------
466  fuTerm =
467  eps_p
468  [assign_a(self.parserTemp_.fuTerm.part3Used, MY_FALSE)] >>
469 
470  name
471  [assign_a(self.parserTemp_.fuTerm.part1)] >> '.' >>
472 
473  name
474  [assign_a(self.parserTemp_.fuTerm.part2)] >>
475 
476  !('.' >> name[assign_a(self.parserTemp_.fuTerm.part3)])
477  [assign_a(self.parserTemp_.fuTerm.part3Used, MY_TRUE)];
478 
479  // ------------------------------------------------------------
480  // rf[.port].index and fu.operation.index is stored to
481  // parserTemp_.indexTerm field
482  // ------------------------------------------------------------
483  indexTerm =
484  eps_p
485  [assign_a(self.parserTemp_.indexTerm.part2Used, MY_FALSE)] >>
486 
487  name
488  [assign_a(self.parserTemp_.indexTerm.part1)] >> '.' >>
489 
490  !(name[assign_a(self.parserTemp_.indexTerm.part2)] >> '.')
491  [assign_a(self.parserTemp_.indexTerm.part2Used, MY_TRUE)] >>
492 
493  index
494  [assign_a(self.parserTemp_.indexTerm.index,
495  self.parserTemp_.index)];
496 
497  // ------------------------------------------------------------
498  // copy last parsed term and its type to regTerm
499  // ------------------------------------------------------------
500  regTerm =
501  indexTerm
502  [assign_a(self.parserTemp_.regTerm.indexTerm,
503  self.parserTemp_.indexTerm)]
504  [assign_a(self.parserTemp_.regTerm.type, INDEX_TERM)]|
505 
506  fuTerm
507  [assign_a(self.parserTemp_.regTerm.fuTerm,
508  self.parserTemp_.fuTerm)]
509  [assign_a(self.parserTemp_.regTerm.type, FUNCTION_UNIT_TERM)]|
510 
511  busTerm
512  [assign_a(self.parserTemp_.regTerm.busTerm,
513  self.parserTemp_.busTerm)]
514  [assign_a(self.parserTemp_.regTerm.type, BUS_TERM)];
515 
516 
517  // ------------------------------------------------------------
518  // offset part of expression stored to parserTemp_.expression
519  // ------------------------------------------------------------
520  offset =
521  sign_p[assign_a(self.parserTemp_.expression.isMinus)] >>
522 
523  *my_space >>
524 
525  uLiteral
526  [assign_a(self.parserTemp_.expression.offset,
527  self.parserTemp_.lastNumber)];
528 
529  // ------------------------------------------------------------
530  // name[(+|-)offset] stored to parserTemp_.expression
531  // ------------------------------------------------------------
532  symExpression =
533  name
534  [assign_a(self.parserTemp_.expression.label)] >>
535 
536  !(*my_space >> offset)
537  [assign_a(self.parserTemp_.expression.hasOffset, MY_TRUE)];
538 
539  // ------------------------------------------------------------
540  // name[(+|-)offset][=literal] stored to parserTemp_.expression
541  // ------------------------------------------------------------
542  expression =
543  eps_p
544  [assign_a(self.parserTemp_.expression.hasValue, MY_FALSE)]
545  [assign_a(self.parserTemp_.expression.hasOffset, MY_FALSE)] >>
546 
547  symExpression >>
548 
549  !(*my_space >> '=' >> *my_space >> literal)
550  [assign_a(self.parserTemp_.expression.value,
551  self.parserTemp_.lastNumber)]
552  [assign_a(self.parserTemp_.expression.hasValue, MY_TRUE)];
553 
554  // ------------------------------------------------------------
555  // either literal or expression
556  // ------------------------------------------------------------
558  literal
559  [assign_a(self.parserTemp_.litOrExpr.value,
560  self.parserTemp_.lastNumber)]
561  [assign_a(self.parserTemp_.litOrExpr.isExpression, MY_FALSE)]
562  [assign_a(self.parserTemp_.litOrExpr.isSigned,
563  self.parserTemp_.isLastSigned)]|
564 
565  expression
566  [assign_a(self.parserTemp_.litOrExpr.expression,
567  self.parserTemp_.expression)]
568  [assign_a(self.parserTemp_.litOrExpr.isExpression, MY_TRUE)];
569 
570  // ------------------------------------------------------------
571  // store immediate term of move to parserTemp_.move
572  // ------------------------------------------------------------
573  immTerm =
575  [assign_a(self.parserTemp_.move.source.immTerm,
576  self.parserTemp_.litOrExpr)];
577 
578  // ------------------------------------------------------------
579  // store destination
580  // ------------------------------------------------------------
581  destination =
582  regTerm
583  [assign_a(self.parserTemp_.move.destination,
584  self.parserTemp_.regTerm)];
585 
586  // ------------------------------------------------------------
587  // store source
588  // ------------------------------------------------------------
589  source =
590  regTerm
591  [assign_a(self.parserTemp_.move.source.regTerm,
592  self.parserTemp_.regTerm)]
593  [assign_a(self.parserTemp_.move.source.isRegister, MY_TRUE)]|
594 
595  immTerm
596  [assign_a(self.parserTemp_.move.source.isRegister, MY_FALSE)];
597 
598  // ------------------------------------------------------------
599  // guards type
600  // ------------------------------------------------------------
601  invertFlag =
602  ch_p('?')[assign_a(self.parserTemp_.move.guard.isInverted,
603  MY_FALSE)]|
604 
605  ch_p('!')[assign_a(self.parserTemp_.move.guard.isInverted,
606  MY_TRUE)];
607 
608  // ------------------------------------------------------------
609  // port or register guard
610  // ------------------------------------------------------------
611  guard =
613  [assign_a(self.parserTemp_.move.guard.regTerm,
614  self.parserTemp_.regTerm)];
615 
616  // ------------------------------------------------------------
617  // [field-size:]init-value one init data field of data area
618  // definition
619  // ------------------------------------------------------------
620  initDataField =
621  eps_p
622  [assign_a(self.parserTemp_.initDataField.width, MY_ZERO)] >>
623 
624  !(uNumber >> *my_space >> ':' >> *my_space)
625  [assign_a(self.parserTemp_.initDataField.width,
626  self.parserTemp_.lastNumber)] >>
627 
629  [assign_a(self.parserTemp_.initDataField.litOrExpr,
630  self.parserTemp_.litOrExpr)];
631 
632  // ------------------------------------------------------------
633  // annotationes
634  //
635  // Only supported syntax for annotation is
636  // "{hexId value value ...}"
637  // ------------------------------------------------------------
638  annotation =
639  eps_p
640  [clear_a(self.parserTemp_.annotation.payload)] >>
641 
642  (ch_p('{') >> *my_space >>
643  hexNumber[assign_a(self.parserTemp_.annotation.id,
644  self.parserTemp_.lastNumber)] >>
645 
646  *(+my_space >>
647  initDataField[push_back_a(self.parserTemp_.annotation.payload,
648  self.parserTemp_.initDataField)]) >>
649 
650  *my_space >> ch_p('}'));
651 
652  // ------------------------------------------------------------
653  // one move that moves data through a bus
654  // ------------------------------------------------------------
655  transport =
656  eps_p
657  [assign_a(self.parserTemp_.move.guard.isGuarded, MY_FALSE)]
658  [clear_a(self.parserTemp_.move.annotationes)] >>
659 
660  !(guard >> *my_space)
661  [assign_a(self.parserTemp_.move.guard.isGuarded, MY_TRUE)] >>
662 
663  source >>
664  *my_space >> str_p("->") >> *my_space >>
665 
666  destination >>
667 
668  *(*my_space >> annotation[push_back_a(
670  self.parserTemp_.annotation)]);
671 
672  // ------------------------------------------------------------
673  // long immediates
674  // ------------------------------------------------------------
675  immediateSpec =
676  // moves destination stores immediate unit and register.
677  eps_p
678  [clear_a(self.parserTemp_.move.annotationes)] >>
679 
680  ch_p('[') >> *my_space >>
681  destination >>
682 
683  *my_space >> '=' >> *my_space >>
684 
685  // moves source is used as a value
687  [assign_a(self.parserTemp_.move.source.immTerm,
688  self.parserTemp_.litOrExpr)]
689  [assign_a(self.parserTemp_.move.source.isRegister,
690  MY_FALSE)] >>
691 
692  *my_space >> ch_p(']') >>
693 
694  *(*my_space >> annotation[push_back_a(
696  self.parserTemp_.annotation)]);
697  // ------------------------------------------------------------
698  // empty move
699  // ------------------------------------------------------------
700  emptyMove = str_p("...");
701 
702  // ------------------------------------------------------------
703  // one immediate, transport or empty move
704  // ------------------------------------------------------------
705  move =
706  emptyMove
707  [assign_a(self.parserTemp_.move.type, EMPTY_MOVE)] |
708 
709  transport
710  [assign_a(self.parserTemp_.move.type, TRANSPORT_MOVE)];
711 
712  // ------------------------------------------------------------
713  // parses instruction and adds moves to CodeSectionCreator
714  // ------------------------------------------------------------
715  moves =
716  move
717  [assign_a(self.parserTemp_.move.isBegin, MY_TRUE)]
718  [assign_a(self.parserTemp_.move.asmLineNumber,
719  self.parserTemp_.lineNumber)]
720  [AddMoveActor(
721  self.codeSectionCreator_, self.parserTemp_.move)] >>
722 
723  *(*my_space >> ',' >> *my_space >>
724  move
725  [assign_a(self.parserTemp_.move.isBegin, MY_FALSE)]
726  [assign_a(self.parserTemp_.move.asmLineNumber,
727  self.parserTemp_.lineNumber)]
728  [AddMoveActor(
729  self.codeSectionCreator_, self.parserTemp_.move)]);
730 
731  // ------------------------------------------------------------
732  // empty instruction
733  // ------------------------------------------------------------
735  str_p(". . .");
736 
737  // ------------------------------------------------------------
738  // empty or populated instruction
739  // ------------------------------------------------------------
740  instruction =
742  [AddMoveActor(
744  moves;
745 
746  // ------------------------------------------------------------
747  // label definitions
748  // ------------------------------------------------------------
749  label =
750  (name[assign_a(self.parserTemp_.label)] >> *my_space >> ':') ;
751 
752  // ------------------------------------------------------------
753  // code labels can be added straight to label manager,
754  // since we don't have to resolve address of label separately
755  // ------------------------------------------------------------
756  codeLabel =
757  label
758  [AddLabelActor(
759  self.labelManager_,
761  self.parserTemp_.label,
762  self.parserTemp_.codeLineCount)];
763 
764  // ------------------------------------------------------------
765  // directive definitions
766  // ------------------------------------------------------------
767  directive =
768  ch_p(':') >> *my_space >>
769 
770  ((str_p("procedure") >> +my_space >>
771  (name[assign_a(self.parserTemp_.directive)])
772 
774  self.labelManager_,
775  self.parserTemp_.directive,
776  self.parserTemp_.codeLineCount)]) |
777 
778  (str_p("global") >> +my_space >>
780 
781  // ------------------------------------------------------------
782  // one code line terminated by semicolon
783  // ------------------------------------------------------------
784  codeLine =
785  *(codeLabel >> *my_space) >>
786 
788  [increment_a(self.parserTemp_.codeLineCount)] >>
789 
790  // immediate encoding from dedicated instruction slots
791  *(*my_space >> immediateSpec)
792  [assign_a(self.parserTemp_.move.type, LONG_IMM)]
793  [AddMoveActor(
794  self.codeSectionCreator_, self.parserTemp_.move)];
795 
796  // ------------------------------------------------------------
797  // body of code section (instructions and directives)
798  // ------------------------------------------------------------
799  codeLines =
800  *((codeLine|directive) >>
801  *my_space >> ';' >> *my_space);
802 
803  // ------------------------------------------------------------
804  // code header with start address
805  // ------------------------------------------------------------
806  codeHeader =
807  eps_p
808  [assign_a(self.parserTemp_.lastNumber, MY_ZERO)] >>
809 
810  str_p("CODE") >>
811  !(+my_space >> literal) >> *my_space >> ';';
812 
813  // ------------------------------------------------------------
814  // code section (header and body)
815  // ------------------------------------------------------------
816  codeArea =
817  codeHeader
820 
821  +my_space >> codeLines;
822 
823  // ------------------------------------------------------------
824  // all init data fields of data line
825  // ------------------------------------------------------------
826  initData =
827  *(+my_space >>
829  [push_back_a(self.parserTemp_.dataLine.initData,
830  self.parserTemp_.initDataField)]);
831 
832  // ------------------------------------------------------------
833  // data label definitions
834  // ------------------------------------------------------------
835  dataLabel =
836  label
837  [push_back_a(self.parserTemp_.dataLine.labels,
838  self.parserTemp_.label)];
839 
840  // ------------------------------------------------------------
841  // one data line with data are definition and label
842  // ------------------------------------------------------------
843  dataLine =
844  *(dataLabel >> *my_space) >>
845 
846  str_p("DA") >> +my_space >>
847 
848  uNumber[assign_a(self.parserTemp_.dataLine.width,
849  self.parserTemp_.lastNumber)] >>
850 
851  initData;
852 
853  // ------------------------------------------------------------
854  // body of data section
855  // ------------------------------------------------------------
856  dataLines =
857  *((dataLine
858  [assign_a(self.parserTemp_.dataLine.asmLineNumber,
859  self.parserTemp_.lineNumber)]
862  [clear_a(self.parserTemp_.dataLine.initData)]
863  [clear_a(self.parserTemp_.dataLine.labels)] |
864 
865  directive) >>
866 
867  *my_space >> ';' >> *my_space);
868 
869  // ------------------------------------------------------------
870  // data section header with address space name and start address
871  // ------------------------------------------------------------
872  dataHeader =
873  str_p("DATA") >>
874  +my_space >>
875 
876  name[assign_a(self.parserTemp_.dataLine.dataSpace)] >>
877 
878  !(+my_space >> literal)
880  self.parserTemp_.lastNumber)] >>
881 
882  *my_space >> ';';
883 
884  // ------------------------------------------------------------
885  // data section definition (header and boby)
886  // ------------------------------------------------------------
887  dataArea =
888  dataHeader >>
889  +my_space >> dataLines;
890 
891  // ------------------------------------------------------------
892  // one data or code section
893  // ------------------------------------------------------------
894  area =
895  dataArea | codeArea;
896 
897  // ------------------------------------------------------------
898  // whole program (multiple sections)
899  // ------------------------------------------------------------
900  program =
901  (*(*my_space >> area) >> *my_space);
902  }

References BUS_TERM, EMPTY_BEGIN_MOVE, EMPTY_MOVE, FUNCTION_UNIT_TERM, INDEX_TERM, LONG_IMM, MY_FALSE, MY_TRUE, MY_ZERO, program, and TRANSPORT_MOVE.

Member Function Documentation

◆ start()

template<typename ScannerT >
rule<ScannerT> const& AssemblerParser::definition< ScannerT >::start ( ) const
inline

Spirits grammar interface.

Definition at line 920 of file AssemblerParser.hh.

920  {
921  if (parent_.codeLinesOnly()) {
922  return codeLines;
923  } else {
924  return program;
925  }
926  }

References AssemblerParser::codeLinesOnly(), and program.

Here is the call graph for this function:

Member Data Documentation

◆ annotation

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::annotation

Definition at line 911 of file AssemblerParser.hh.

◆ area

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::area

Definition at line 906 of file AssemblerParser.hh.

◆ backslashedChars

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::backslashedChars

Definition at line 914 of file AssemblerParser.hh.

◆ binNumber

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::binNumber

Definition at line 913 of file AssemblerParser.hh.

◆ busTerm

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::busTerm

Definition at line 915 of file AssemblerParser.hh.

◆ codeArea

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::codeArea

Definition at line 908 of file AssemblerParser.hh.

◆ codeHeader

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::codeHeader

Definition at line 908 of file AssemblerParser.hh.

◆ codeLabel

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::codeLabel

Definition at line 909 of file AssemblerParser.hh.

◆ codeLine

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::codeLine

Definition at line 908 of file AssemblerParser.hh.

◆ codeLines

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::codeLines

Definition at line 908 of file AssemblerParser.hh.

◆ comment

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::comment

Definition at line 906 of file AssemblerParser.hh.

◆ dataArea

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::dataArea

Definition at line 906 of file AssemblerParser.hh.

◆ dataHeader

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::dataHeader

Definition at line 907 of file AssemblerParser.hh.

◆ dataLabel

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::dataLabel

Definition at line 912 of file AssemblerParser.hh.

◆ dataLine

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::dataLine

Definition at line 907 of file AssemblerParser.hh.

◆ dataLines

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::dataLines

Definition at line 907 of file AssemblerParser.hh.

◆ destination

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::destination

Definition at line 912 of file AssemblerParser.hh.

◆ directive

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::directive

Definition at line 910 of file AssemblerParser.hh.

◆ emptyInstruction

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::emptyInstruction

Definition at line 910 of file AssemblerParser.hh.

◆ emptyMove

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::emptyMove

Definition at line 910 of file AssemblerParser.hh.

◆ expression

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::expression

Definition at line 915 of file AssemblerParser.hh.

◆ fuTerm

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::fuTerm

Definition at line 913 of file AssemblerParser.hh.

◆ guard

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::guard

Definition at line 911 of file AssemblerParser.hh.

◆ hexNumber

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::hexNumber

Definition at line 913 of file AssemblerParser.hh.

◆ immediateSpec

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::immediateSpec

Definition at line 911 of file AssemblerParser.hh.

◆ immTerm

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::immTerm

Definition at line 915 of file AssemblerParser.hh.

◆ index

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::index

Definition at line 913 of file AssemblerParser.hh.

◆ indexTerm

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::indexTerm

Definition at line 914 of file AssemblerParser.hh.

◆ initData

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::initData

Definition at line 907 of file AssemblerParser.hh.

◆ initDataField

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::initDataField

Definition at line 911 of file AssemblerParser.hh.

◆ instruction

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::instruction

Definition at line 909 of file AssemblerParser.hh.

◆ invertFlag

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::invertFlag

Definition at line 912 of file AssemblerParser.hh.

◆ label

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::label

Definition at line 909 of file AssemblerParser.hh.

◆ literal

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::literal

Definition at line 908 of file AssemblerParser.hh.

◆ literalOrExpression

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::literalOrExpression

Definition at line 909 of file AssemblerParser.hh.

◆ move

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::move

Definition at line 910 of file AssemblerParser.hh.

◆ moves

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::moves

Definition at line 910 of file AssemblerParser.hh.

◆ my_space

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::my_space

Definition at line 906 of file AssemblerParser.hh.

◆ name

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::name

Definition at line 906 of file AssemblerParser.hh.

◆ offset

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::offset

Definition at line 914 of file AssemblerParser.hh.

◆ parent_

template<typename ScannerT >
const AssemblerParser& AssemblerParser::definition< ScannerT >::parent_

Definition at line 352 of file AssemblerParser.hh.

◆ port

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::port

Definition at line 906 of file AssemblerParser.hh.

◆ program

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::program

Definition at line 906 of file AssemblerParser.hh.

◆ regTerm

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::regTerm

Definition at line 914 of file AssemblerParser.hh.

◆ sLiteral

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::sLiteral

Definition at line 914 of file AssemblerParser.hh.

◆ sNumber

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::sNumber

Definition at line 912 of file AssemblerParser.hh.

◆ source

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::source

Definition at line 912 of file AssemblerParser.hh.

◆ symExpression

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::symExpression

Definition at line 915 of file AssemblerParser.hh.

◆ transport

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::transport

Definition at line 911 of file AssemblerParser.hh.

◆ uLiteral

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::uLiteral

Definition at line 908 of file AssemblerParser.hh.

◆ uNumber

template<typename ScannerT >
rule<ScannerT> AssemblerParser::definition< ScannerT >::uNumber

Definition at line 912 of file AssemblerParser.hh.


The documentation for this struct was generated from the following file:
AssemblerParser::definition::label
rule< ScannerT > label
Definition: AssemblerParser.hh:909
AssemblerParser::definition::offset
rule< ScannerT > offset
Definition: AssemblerParser.hh:914
AssemblerParser::definition::dataArea
rule< ScannerT > dataArea
Definition: AssemblerParser.hh:906
NewCodeSectionActor
Definition: AssemblerParser.hh:208
AssemblerParser::definition::codeArea
rule< ScannerT > codeArea
Definition: AssemblerParser.hh:908
AssemblerParser::definition::busTerm
rule< ScannerT > busTerm
Definition: AssemblerParser.hh:915
AddProcedureActor
Definition: AssemblerParser.hh:286
Expression::isMinus
bool isMinus
Is offset minus.
Definition: ParserStructs.hh:211
ParserTemp::index
UValue index
Last parsed index.
Definition: AssemblerParser.hh:103
FUTerm::part2
std::string part2
Port name.
Definition: ParserStructs.hh:83
FUTerm::part3Used
bool part3Used
Is operation part of the term used.
Definition: ParserStructs.hh:79
AssemblerParser::definition::literal
rule< ScannerT > literal
Definition: AssemblerParser.hh:908
ParserTemp::indexTerm
IndexTerm indexTerm
Last parsed rf[.port].index or fu.operation.index reference.
Definition: AssemblerParser.hh:112
ParserTemp::expression
Expression expression
Last parsed label reference form: name[(+|-)offset][=literal].
Definition: AssemblerParser.hh:119
AssemblerParser::definition::annotation
rule< ScannerT > annotation
Definition: AssemblerParser.hh:911
ParserMove::isBegin
bool isBegin
Tells whether the slot is the first of the instruction.
Definition: ParserStructs.hh:404
AssemblerParser::definition::destination
rule< ScannerT > destination
Definition: AssemblerParser.hh:912
Expression::hasValue
bool hasValue
Is resolved value defined in struct.
Definition: ParserStructs.hh:204
AssemblerParser::labelManager_
LabelManager labelManager_
Creates symbol and relocation sections.
Definition: AssemblerParser.hh:952
ParserTemp::initDataField
InitDataField initDataField
Last init data field.
Definition: AssemblerParser.hh:134
BusTerm::prev
bool prev
Previous or next bus register.
Definition: ParserStructs.hh:56
ParserTemp::lastNumber
UValue lastNumber
Last parsed numeric value.
Definition: AssemblerParser.hh:97
AssemblerParser::definition::codeLabel
rule< ScannerT > codeLabel
Definition: AssemblerParser.hh:909
ParserTemp::dataLine
DataLine dataLine
Last data line.
Definition: AssemblerParser.hh:137
ParserTemp::litOrExpr
LiteralOrExpression litOrExpr
Last parsed literal or expression.
Definition: AssemblerParser.hh:122
ParserGuard::isGuarded
bool isGuarded
Is guard used.
Definition: ParserStructs.hh:308
ParserTemp::busTerm
BusTerm busTerm
Last parsed bus reference.
Definition: AssemblerParser.hh:106
BUS_TERM
const RegisterTerm::TermType BUS_TERM
Definition: AssemblerParser.hh:324
ParserMove::type
MoveType type
Type of move.
Definition: ParserStructs.hh:401
RegisterTerm::busTerm
BusTerm busTerm
The bus term, if type field is BUS. Otherwise not used.
Definition: ParserStructs.hh:152
AssemblerParser::definition::initDataField
rule< ScannerT > initDataField
Definition: AssemblerParser.hh:911
Expression::label
std::string label
Name of the label.
Definition: ParserStructs.hh:201
AssemblerParser::definition::codeLines
rule< ScannerT > codeLines
Definition: AssemblerParser.hh:908
FUNCTION_UNIT_TERM
const RegisterTerm::TermType FUNCTION_UNIT_TERM
Definition: AssemblerParser.hh:325
LONG_IMM
const ParserMove::MoveType LONG_IMM
Definition: AssemblerParser.hh:322
SetStartAddressActor
Definition: AssemblerParser.hh:238
ParserTemp::move
ParserMove move
Last parsed source, destination and guard.
Definition: AssemblerParser.hh:125
DataLine::dataSpace
std::string dataSpace
Address space whose MAUs are initialized.
Definition: ParserStructs.hh:482
AddMoveActor
Definition: AssemblerParser.hh:223
ParserTemp::annotation
Annotation annotation
Last annotation.
Definition: AssemblerParser.hh:146
ParserTemp::fuTerm
FUTerm fuTerm
Last parsed unit.port[.operation] reference.
Definition: AssemblerParser.hh:109
ParserGuard::regTerm
RegisterTerm regTerm
Guard port or register.
Definition: ParserStructs.hh:312
IndexTerm::part2
std::string part2
Port or operation name.
Definition: ParserStructs.hh:112
ParserTemp::isLastSigned
bool isLastSigned
Should lastNumber be interpret as signed or unsigned value.
Definition: AssemblerParser.hh:100
Expression::value
UValue value
Resolved value.
Definition: ParserStructs.hh:206
AssemblerParser::definition::expression
rule< ScannerT > expression
Definition: AssemblerParser.hh:915
InitDataField::width
UValue width
Number of MAUs that are initialized by the init field.
Definition: ParserStructs.hh:342
LiteralOrExpression::isExpression
bool isExpression
Does object contain expression or literal.
Definition: ParserStructs.hh:251
AssemblerParser::definition::hexNumber
rule< ScannerT > hexNumber
Definition: AssemblerParser.hh:913
AssemblerParser::codeLinesOnly
bool codeLinesOnly() const
Definition: AssemblerParser.hh:938
IndexTerm::part1
std::string part1
Unit name.
Definition: ParserStructs.hh:110
ParserGuard::isInverted
bool isInverted
Is guard inverted.
Definition: ParserStructs.hh:310
AssemblerParser::definition::moves
rule< ScannerT > moves
Definition: AssemblerParser.hh:910
AssemblerParser::definition::area
rule< ScannerT > area
Definition: AssemblerParser.hh:906
IndexTerm::index
UValue index
Register or operand index.
Definition: ParserStructs.hh:114
ParserTemp::codeLineCount
UValue codeLineCount
Line number of currently parsed code line.
Definition: AssemblerParser.hh:143
IndexTerm::part2Used
bool part2Used
Is port name used.
Definition: ParserStructs.hh:108
RegisterTerm::type
TermType type
Type of terminal that is represented by this object.
Definition: ParserStructs.hh:149
ParserTemp::lineNumber
UValue lineNumber
Line number of currently parsed line.
Definition: AssemblerParser.hh:140
AssemblerParser::definition::program
rule< ScannerT > program
Definition: AssemblerParser.hh:906
AssemblerParser::definition::index
rule< ScannerT > index
Definition: AssemblerParser.hh:913
ParserTemp::sLiteral
std::string sLiteral
Definition: AssemblerParser.hh:94
EMPTY_BEGIN_MOVE
const ParserMove EMPTY_BEGIN_MOVE(ParserMove::EMPTY, true)
Empty parser move with isBegin flag set.
AssemblerParser::definition::transport
rule< ScannerT > transport
Definition: AssemblerParser.hh:911
AssemblerParser::definition::source
rule< ScannerT > source
Definition: AssemblerParser.hh:912
AssemblerParser::definition::immTerm
rule< ScannerT > immTerm
Definition: AssemblerParser.hh:915
AssemblerParser::dataSectionCreator_
DataSectionCreator dataSectionCreator_
Creates data sections.
Definition: AssemblerParser.hh:948
AssemblerParser::definition::fuTerm
rule< ScannerT > fuTerm
Definition: AssemblerParser.hh:913
AssemblerParser::definition::dataLine
rule< ScannerT > dataLine
Definition: AssemblerParser.hh:907
InitDataField::litOrExpr
LiteralOrExpression litOrExpr
Initialisation value.
Definition: ParserStructs.hh:344
DataLine::initData
std::vector< InitDataField > initData
Init data fields of data line. Uninitilized data line, if empty.
Definition: ParserStructs.hh:485
AssemblerParser::definition::move
rule< ScannerT > move
Definition: AssemblerParser.hh:910
INDEX_TERM
const RegisterTerm::TermType INDEX_TERM
Definition: AssemblerParser.hh:326
ParserSource::regTerm
RegisterTerm regTerm
If register, the register. Otherwise not used.
Definition: ParserStructs.hh:284
LiteralOrExpression::value
UValue value
If literal, the literal. Otherwise not used.
Definition: ParserStructs.hh:256
ParserMove::annotationes
std::vector< Annotation > annotationes
Definition: ParserStructs.hh:415
ParserSource::immTerm
LiteralOrExpression immTerm
If immediate value, the literal or expression. Otherwise not used.
Definition: ParserStructs.hh:286
AddDataLineActor
Definition: AssemblerParser.hh:253
LiteralOrExpression::isSigned
bool isSigned
Sign of the value.
Definition: ParserStructs.hh:258
AssemblerParser::resourceManager_
MachineResourceManager resourceManager_
Generates string, resource, null and address space sections.
Definition: AssemblerParser.hh:946
PrintString
Definition: AssemblerParser.hh:195
RegisterTerm::indexTerm
IndexTerm indexTerm
The index term, if type field is INDEX. Otherwise not used.
Definition: ParserStructs.hh:156
DataLine::asmLineNumber
UValue asmLineNumber
Line number where in source code this DA line is found.
Definition: ParserStructs.hh:490
AssemblerParser::definition::codeLine
rule< ScannerT > codeLine
Definition: AssemblerParser.hh:908
AssemblerParser::parserTemp_
ParserTemp parserTemp_
Temp-structure containing most recent parsed tokens.
Definition: AssemblerParser.hh:955
AssemblerParser::definition::regTerm
rule< ScannerT > regTerm
Definition: AssemblerParser.hh:914
MY_TRUE
const bool MY_TRUE
Definition: AssemblerParser.hh:316
MY_ZERO
const UValue MY_ZERO
Definition: AssemblerParser.hh:318
AssemblerParser::definition::sLiteral
rule< ScannerT > sLiteral
Definition: AssemblerParser.hh:914
ParserMove::destination
RegisterTerm destination
Destination field.
Definition: ParserStructs.hh:411
AssemblerParser::definition::symExpression
rule< ScannerT > symExpression
Definition: AssemblerParser.hh:915
RegisterTerm::fuTerm
FUTerm fuTerm
The fu term, if type field is FUNCTION_UNIT. Otherwise not used.
Definition: ParserStructs.hh:154
Annotation::id
UValue id
Definition: ParserStructs.hh:367
AssemblerParser::definition::emptyInstruction
rule< ScannerT > emptyInstruction
Definition: AssemblerParser.hh:910
AssemblerParser::definition::binNumber
rule< ScannerT > binNumber
Definition: AssemblerParser.hh:913
AssemblerParser::definition::uNumber
rule< ScannerT > uNumber
Definition: AssemblerParser.hh:912
AssemblerParser::definition::literalOrExpression
rule< ScannerT > literalOrExpression
Definition: AssemblerParser.hh:909
AssemblerParser::definition::invertFlag
rule< ScannerT > invertFlag
Definition: AssemblerParser.hh:912
AssemblerParser::definition::name
rule< ScannerT > name
Definition: AssemblerParser.hh:906
AssemblerParser::definition::dataHeader
rule< ScannerT > dataHeader
Definition: AssemblerParser.hh:907
ParserMove::source
ParserSource source
Source field.
Definition: ParserStructs.hh:409
DataLine::labels
std::vector< std::string > labels
Labels of this data line.
Definition: ParserStructs.hh:487
AssemblerParser::definition::immediateSpec
rule< ScannerT > immediateSpec
Definition: AssemblerParser.hh:911
AssemblerParser::definition::initData
rule< ScannerT > initData
Definition: AssemblerParser.hh:907
AssemblerParser::codeSectionCreator_
CodeSectionCreator codeSectionCreator_
Creates code section.
Definition: AssemblerParser.hh:950
Expression::offset
UValue offset
Value of offset.
Definition: ParserStructs.hh:213
AssemblerParser::definition::comment
rule< ScannerT > comment
Definition: AssemblerParser.hh:906
MY_FALSE
const bool MY_FALSE
Definition: AssemblerParser.hh:317
AssemblerParser::definition::indexTerm
rule< ScannerT > indexTerm
Definition: AssemblerParser.hh:914
Annotation::payload
std::vector< InitDataField > payload
Definition: ParserStructs.hh:369
AssemblerParser::definition::directive
rule< ScannerT > directive
Definition: AssemblerParser.hh:910
AssemblerParser::definition::parent_
const AssemblerParser & parent_
Definition: AssemblerParser.hh:352
LiteralOrExpression::expression
Expression expression
If expression the expression, Otherwise not used.
Definition: ParserStructs.hh:253
Expression::hasOffset
bool hasOffset
Is offset defined.
Definition: ParserStructs.hh:209
TRANSPORT_MOVE
const ParserMove::MoveType TRANSPORT_MOVE
Definition: AssemblerParser.hh:321
AssemblerParser::definition::backslashedChars
rule< ScannerT > backslashedChars
Definition: AssemblerParser.hh:914
ParserMove::guard
ParserGuard guard
Guard field.
Definition: ParserStructs.hh:407
AssemblerParser::definition::instruction
rule< ScannerT > instruction
Definition: AssemblerParser.hh:909
AssemblerParser::definition::emptyMove
rule< ScannerT > emptyMove
Definition: AssemblerParser.hh:910
MachineResourceManager::codeAddressSpace
TPEF::ASpaceElement * codeAddressSpace()
Definition: MachineResourceManager.cc:213
AssemblerParser::definition::my_space
rule< ScannerT > my_space
Definition: AssemblerParser.hh:906
AddLabelActor
Definition: AssemblerParser.hh:268
AssemblerParser::definition::sNumber
rule< ScannerT > sNumber
Definition: AssemblerParser.hh:912
SetGlobalActor
Definition: AssemblerParser.hh:303
AssemblerParser::definition::codeHeader
rule< ScannerT > codeHeader
Definition: AssemblerParser.hh:908
AssemblerParser::definition::dataLabel
rule< ScannerT > dataLabel
Definition: AssemblerParser.hh:912
AssemblerParser::definition::uLiteral
rule< ScannerT > uLiteral
Definition: AssemblerParser.hh:908
FUTerm::part1
std::string part1
Unit name.
Definition: ParserStructs.hh:81
FUTerm::part3
std::string part3
Operation name.
Definition: ParserStructs.hh:85
EMPTY_MOVE
const ParserMove::MoveType EMPTY_MOVE
Definition: AssemblerParser.hh:320
AssemblerParser::definition::guard
rule< ScannerT > guard
Definition: AssemblerParser.hh:911
AssemblerParser::definition::dataLines
rule< ScannerT > dataLines
Definition: AssemblerParser.hh:907
ParserTemp::regTerm
RegisterTerm regTerm
Last parsed register term (copy of most recent parsed bus, fu or index term).
Definition: AssemblerParser.hh:116
ParserTemp::label
std::string label
Last label name.
Definition: AssemblerParser.hh:128
ParserTemp::directive
std::string directive
Last directive parameter string.
Definition: AssemblerParser.hh:131
DataLine::width
UValue width
Number of MAUs initialized by this data line.
Definition: ParserStructs.hh:480
ParserSource::isRegister
bool isRegister
Is source register or immediate reference.
Definition: ParserStructs.hh:282
ParserMove::asmLineNumber
UValue asmLineNumber
Line number of source code for errors.
Definition: ParserStructs.hh:413